From 94d3a03ca840e3c67fafefa6b5cd53000265cea6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 10 Feb 2025 10:53:55 +0000 Subject: [PATCH] Add webapp-schulverwaltung build 3249d45b --- public/apps/webapp-schulverwaltung/README.md | 2 +- .../webapp-schulverwaltung/chunk-26VH6QDS.js | 1 + .../webapp-schulverwaltung/chunk-2AZMKO7X.js | 1 - .../webapp-schulverwaltung/chunk-2D243XFA.js | 2 -- .../{chunk-3PSL2UAK.js => chunk-2ZRHGKSY.js} | 2 +- .../webapp-schulverwaltung/chunk-37I3VMAS.js | 1 - .../webapp-schulverwaltung/chunk-5YNREB6T.js | 2 ++ .../webapp-schulverwaltung/chunk-66LIMDSV.js | 2 ++ .../webapp-schulverwaltung/chunk-6W5EYLX6.js | 3 +++ .../{chunk-CXJU4L5R.js => chunk-A7EOJZ46.js} | 2 +- .../webapp-schulverwaltung/chunk-AXC265QM.js | 1 - .../webapp-schulverwaltung/chunk-B5LBXM2A.js | 1 - .../{chunk-QPVGZCED.js => chunk-BGWLZKVI.js} | 2 +- .../webapp-schulverwaltung/chunk-DFJBP4SC.js | 1 - .../webapp-schulverwaltung/chunk-DJNW6R6G.js | 3 +++ .../webapp-schulverwaltung/chunk-DQSLVCJO.js | 1 - .../webapp-schulverwaltung/chunk-EJNJ2ZNZ.js | 1 - .../{chunk-KV3V2W4Q.js => chunk-ETZGBBG5.js} | 2 +- .../webapp-schulverwaltung/chunk-EUJUXKHH.js | 2 -- .../{chunk-HVJBOTRL.js => chunk-F4XODHS2.js} | 2 +- .../webapp-schulverwaltung/chunk-FGETUL3R.js | 1 + .../webapp-schulverwaltung/chunk-FMUJPUYQ.js | 1 + .../webapp-schulverwaltung/chunk-FN7XEGJE.js | 1 + .../webapp-schulverwaltung/chunk-G5HWFMIA.js | 1 + .../webapp-schulverwaltung/chunk-GCWE54XA.js | 1 + .../{chunk-SWPDWQYJ.js => chunk-GIRYST4Y.js} | 2 +- .../webapp-schulverwaltung/chunk-H664QRX4.js | 1 + .../webapp-schulverwaltung/chunk-HK7T6V6Q.js | 1 + .../{chunk-HLAFRD2O.js => chunk-HQSONWXM.js} | 2 +- .../webapp-schulverwaltung/chunk-IYHUHAMR.js | 3 --- .../webapp-schulverwaltung/chunk-JGKXAFYO.js | 1 + .../{chunk-XBIMNMBY.js => chunk-K42F6AEW.js} | 2 +- .../webapp-schulverwaltung/chunk-K7OUA36X.js | 1 - .../webapp-schulverwaltung/chunk-KQORGECX.js | 2 ++ .../{chunk-NK7SMC5C.js => chunk-LQUABKN6.js} | 2 +- .../webapp-schulverwaltung/chunk-LY5STZD6.js | 3 --- .../webapp-schulverwaltung/chunk-LZEJSWWW.js | 1 - .../webapp-schulverwaltung/chunk-M5HHSMYB.js | 1 - .../webapp-schulverwaltung/chunk-MJ4YAPVT.js | 2 -- .../{chunk-RC3KCROY.js => chunk-N2RKIMWO.js} | 2 +- .../webapp-schulverwaltung/chunk-NBXL4QFT.js | 1 + .../{chunk-A7CCEKNQ.js => chunk-NC6UEGAF.js} | 2 +- .../webapp-schulverwaltung/chunk-NEW5VGRB.js | 9 +++++++++ .../webapp-schulverwaltung/chunk-PFRWXAMB.js | 1 - .../webapp-schulverwaltung/chunk-PMHSF6LH.js | 1 + .../webapp-schulverwaltung/chunk-PUOZNCOL.js | 2 ++ .../webapp-schulverwaltung/chunk-QB4CDTWV.js | 1 + .../webapp-schulverwaltung/chunk-QE74EW6O.js | 1 - .../{chunk-QTBTUQ3W.js => chunk-RXRYDGZR.js} | 2 +- .../webapp-schulverwaltung/chunk-S3H6YSFW.js | 9 --------- .../webapp-schulverwaltung/chunk-S7HYT6Z5.js | 1 + .../webapp-schulverwaltung/chunk-SGUU3JRZ.js | 1 - .../webapp-schulverwaltung/chunk-SKUS47ZU.js | 1 + .../webapp-schulverwaltung/chunk-SL67CYEF.js | 1 + .../webapp-schulverwaltung/chunk-SME4UDGV.js | 1 + .../webapp-schulverwaltung/chunk-T2Q3L4WP.js | 2 -- .../webapp-schulverwaltung/chunk-TMXWSOGF.js | 1 - .../webapp-schulverwaltung/chunk-TO3HOIOR.js | 1 - .../webapp-schulverwaltung/chunk-UN6AN2DI.js | 1 - .../webapp-schulverwaltung/chunk-UPTESATB.js | 1 - .../webapp-schulverwaltung/chunk-UZJ4FIXB.js | 1 + .../{chunk-T2GDLGV4.js => chunk-VANM6WSB.js} | 2 +- .../webapp-schulverwaltung/chunk-VMIOSRDB.js | 1 + .../webapp-schulverwaltung/chunk-W6XALPR5.js | 2 -- .../webapp-schulverwaltung/chunk-WHFJNRLF.js | 2 ++ .../webapp-schulverwaltung/chunk-XKNLLORS.js | 1 - .../webapp-schulverwaltung/chunk-XYEOQKXF.js | 1 - .../{chunk-PU3XKQPJ.js => chunk-Y3BQLEPF.js} | 2 +- .../webapp-schulverwaltung/chunk-ZELJ2QPT.js | 1 + .../doc/{reactivity.md => angular.md} | 17 ++++++++++++++++- public/apps/webapp-schulverwaltung/index.html | 2 +- public/apps/webapp-schulverwaltung/main.js | 2 +- 72 files changed, 77 insertions(+), 62 deletions(-) create mode 100644 public/apps/webapp-schulverwaltung/chunk-26VH6QDS.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-2AZMKO7X.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-2D243XFA.js rename public/apps/webapp-schulverwaltung/{chunk-3PSL2UAK.js => chunk-2ZRHGKSY.js} (86%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-37I3VMAS.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-5YNREB6T.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-66LIMDSV.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-6W5EYLX6.js rename public/apps/webapp-schulverwaltung/{chunk-CXJU4L5R.js => chunk-A7EOJZ46.js} (87%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-AXC265QM.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-B5LBXM2A.js rename public/apps/webapp-schulverwaltung/{chunk-QPVGZCED.js => chunk-BGWLZKVI.js} (81%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-DFJBP4SC.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-DJNW6R6G.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-DQSLVCJO.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-EJNJ2ZNZ.js rename public/apps/webapp-schulverwaltung/{chunk-KV3V2W4Q.js => chunk-ETZGBBG5.js} (98%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-EUJUXKHH.js rename public/apps/webapp-schulverwaltung/{chunk-HVJBOTRL.js => chunk-F4XODHS2.js} (92%) create mode 100644 public/apps/webapp-schulverwaltung/chunk-FGETUL3R.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-FMUJPUYQ.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-FN7XEGJE.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-G5HWFMIA.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-GCWE54XA.js rename public/apps/webapp-schulverwaltung/{chunk-SWPDWQYJ.js => chunk-GIRYST4Y.js} (81%) create mode 100644 public/apps/webapp-schulverwaltung/chunk-H664QRX4.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-HK7T6V6Q.js rename public/apps/webapp-schulverwaltung/{chunk-HLAFRD2O.js => chunk-HQSONWXM.js} (82%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-IYHUHAMR.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-JGKXAFYO.js rename public/apps/webapp-schulverwaltung/{chunk-XBIMNMBY.js => chunk-K42F6AEW.js} (88%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-K7OUA36X.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-KQORGECX.js rename public/apps/webapp-schulverwaltung/{chunk-NK7SMC5C.js => chunk-LQUABKN6.js} (89%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-LY5STZD6.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-LZEJSWWW.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-M5HHSMYB.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-MJ4YAPVT.js rename public/apps/webapp-schulverwaltung/{chunk-RC3KCROY.js => chunk-N2RKIMWO.js} (83%) create mode 100644 public/apps/webapp-schulverwaltung/chunk-NBXL4QFT.js rename public/apps/webapp-schulverwaltung/{chunk-A7CCEKNQ.js => chunk-NC6UEGAF.js} (99%) create mode 100644 public/apps/webapp-schulverwaltung/chunk-NEW5VGRB.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-PFRWXAMB.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-PMHSF6LH.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-PUOZNCOL.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-QB4CDTWV.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-QE74EW6O.js rename public/apps/webapp-schulverwaltung/{chunk-QTBTUQ3W.js => chunk-RXRYDGZR.js} (99%) delete mode 100644 public/apps/webapp-schulverwaltung/chunk-S3H6YSFW.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-S7HYT6Z5.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-SGUU3JRZ.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-SKUS47ZU.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-SL67CYEF.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-SME4UDGV.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-T2Q3L4WP.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-TMXWSOGF.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-TO3HOIOR.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-UN6AN2DI.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-UPTESATB.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-UZJ4FIXB.js rename public/apps/webapp-schulverwaltung/{chunk-T2GDLGV4.js => chunk-VANM6WSB.js} (78%) create mode 100644 public/apps/webapp-schulverwaltung/chunk-VMIOSRDB.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-W6XALPR5.js create mode 100644 public/apps/webapp-schulverwaltung/chunk-WHFJNRLF.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-XKNLLORS.js delete mode 100644 public/apps/webapp-schulverwaltung/chunk-XYEOQKXF.js rename public/apps/webapp-schulverwaltung/{chunk-PU3XKQPJ.js => chunk-Y3BQLEPF.js} (90%) create mode 100644 public/apps/webapp-schulverwaltung/chunk-ZELJ2QPT.js rename public/apps/webapp-schulverwaltung/doc/{reactivity.md => angular.md} (62%) diff --git a/public/apps/webapp-schulverwaltung/README.md b/public/apps/webapp-schulverwaltung/README.md index 3e5ca194..29747314 100644 --- a/public/apps/webapp-schulverwaltung/README.md +++ b/public/apps/webapp-schulverwaltung/README.md @@ -32,4 +32,4 @@ Although it can be used standalone during development, the _webapp-schulverwaltu - [Internationalization (i18n)](doc/i18n.md) – Translating texts - [Browser Testing](doc/browser-testing.md) – Support & BrowserStack.com - [Data Decoding with io-ts](doc/io-ts.md) – API data contract -- [Reactivity](doc/reactivity.md) – Dos and don'ts when using signals & observables +- [Angular Conventions](doc/angular.md) – Best practices for Angular & reactivity diff --git a/public/apps/webapp-schulverwaltung/chunk-26VH6QDS.js b/public/apps/webapp-schulverwaltung/chunk-26VH6QDS.js new file mode 100644 index 00000000..3fc1e503 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-26VH6QDS.js @@ -0,0 +1 @@ +import{a as N}from"./chunk-JGKXAFYO.js";import{b as x}from"./chunk-ZELJ2QPT.js";import{a as F}from"./chunk-HQSONWXM.js";import{$ as h,La as C,Mc as r,Nc as n,Oc as T,P as a,Sc as i,Tc as L,Vc as v,Vd as D,Wd as c,X as R,Zc as s,_c as l,a as y,ad as p,dd as m,fd as E,hd as $,mc as A,n as I,qc as S}from"./chunk-NEW5VGRB.js";var Q=(()=>{class o{constructor(){this.i18n=h(x)}transform(t,e){switch(this.i18n.detectLanguage()){case"fr-CH":return Array.from(e).map(g=>t=t.replace(g," ".concat(g))),t;default:return t}}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275pipe=C({name:"addSpace",type:o,pure:!0})}}return o})();var H=i({Id:n,JobTrainer:s(n),ApprenticeshipManagerId:n,ContractDateFrom:s(m),ContractDateTo:s(m)}),Y=i({Id:n,StudentId:n,CompanyName:l(r),CompanyNameAddition:l(r)});var j=i({Id:n,RepresentativeId:n,RepresentativeAfterMajority:T});var V=i({Id:n}),B=L({HRef:s(r)}),G=L({From:m,To:m,EventNumber:r,EventDesignation:r,Designation:s(r)}),J=v([V,B,G]),k=i({Id:r,LessonRef:J,StudentRef:p,TypeRef:p,Type:s(r),ConfirmationState:s(r),ConfirmationStateId:n,Comment:s(r),StudentFullName:r,RegistrationId:n,HRef:r});var M=i({Id:r,LessonRef:p,StudentRef:p,TypeRef:p,Type:s(r),Comment:s(r),StudentFullName:r,HRef:r});var U=i({LessonRef:p,StudentRef:p,TypeRef:p,Comment:s(r),StudentFullName:r,Type:s(r),RegistrationId:n,HRef:r});var w=i({Id:n,From:m,To:m,EventId:n,EventNumber:r,EventDesignation:r,EventLocation:s(r),EventManagerInformation:l(r)});var b=class extends F{constructor(f,t,e,u,g,O="Id"){super(f,t,e,u),this.labelAttr=g,this.keyAttr=O,this.typeaheadCodec=i(E(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(f,t){let e={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${f}*`}};return this.http.get(`${this.baseUrl}/`,t?this.mergeHttpParams(e,t):e).pipe(a(c(this.typeaheadCodec)),I(u=>u.map(g=>({Key:g[this.keyAttr],Value:g[this.labelAttr]}))))}getTypeaheadItemByKey(f){return this.http.get(`${this.baseUrl}/${f}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(a(D(this.typeaheadCodec)),I(t=>({Key:t[this.keyAttr],Value:t[this.labelAttr]})))}mergeHttpParams(f,t){let e={params:y(y({},f.params),t.params)};return t.params.fields&&(e.params.fields=f.params.fields.concat(",",t.params.fields)),e}};var $t=(()=>{class o extends b{constructor(){let t=h(S),e=h($);super(t,e,N,"Students","FullName")}getLegalRepresentatives(t,e){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:e}).pipe(a(c(j)))}getCurrentApprenticeshipContracts(t,e){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,e).pipe(a(c(H)))}getLessonAbsences(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:e}).pipe(a(c(k)))}getLessonIncidents(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:e}).pipe(a(c(U)))}getLessonDispensations(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:e}).pipe(a(c(M)))}getTimetableEntries(t,e={}){return e instanceof A||(e=new A({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(a(c(w)))}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{H as a,Y as b,k as c,w as d,b as e,$t as f,Q as g}; diff --git a/public/apps/webapp-schulverwaltung/chunk-2AZMKO7X.js b/public/apps/webapp-schulverwaltung/chunk-2AZMKO7X.js deleted file mode 100644 index 1adf4854..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-2AZMKO7X.js +++ /dev/null @@ -1 +0,0 @@ -import{d as Q}from"./chunk-HLAFRD2O.js";import{m as Y,n as z,o as W,p as H,q}from"./chunk-QTBTUQ3W.js";import{$a as c,Ga as M,H as y,J as w,K as D,Ld as P,Na as $,O as k,Pa as R,Qa as u,Ra as U,S as v,Va as f,X as F,Ya as j,Za as E,_a as s,ea as T,eb as N,f as h,fa as S,gb as O,h as _,hb as a,n as m,r as C,rb as p,tb as V,xa as L,ya as i}from"./chunk-S3H6YSFW.js";var Z=(t,o)=>o.id;function G(t,o){if(t&1&&(s(0,"a",2)(1,"i",3),p(2,"description"),c()()),t&2){let n=a();U("disabled",n.disableIfUnavailable&&n.reports.length===0),u("href",n.reports.length>0&&n.reports[0].url,L)}}function J(t,o){if(t&1){let n=N();s(0,"button",7),O("click",function(){let r=T(n).$implicit,d=a(2);return S(d.openReport(r))}),p(1),c()}if(t&2){let n=o.$implicit;i(),V(" ",n.title," ")}}function K(t,o){if(t&1&&(s(0,"div",1)(1,"a",4)(2,"i",3),p(3,"description"),c()(),s(4,"div",5),j(5,J,2,1,"button",6,Z),c()()),t&2){let n=a();i(),u("id",n.dropdownId),i(3),R("aria-labelledby",n.dropdownId),i(),E(n.reports)}}var ct=(()=>{class t{constructor(){this.reports=[],this.disableIfUnavailable=!1,this.dropdownId=P("reports-link-dropdown")}openReport(n){window.open(n.url,"_blank")}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=M({type:t,selectors:[["bkd-reports-link"]],inputs:{reports:"reports",disableIfUnavailable:"disableIfUnavailable"},decls:2,vars:2,consts:[["target","_blank",1,"btn","btn-primary","btn-icon",3,"href","disabled"],["ngbDropdown","",1,"d-inline-block"],["target","_blank",1,"btn","btn-primary","btn-icon",3,"href"],[1,"material-icons"],["ngbDropdownToggle","",1,"btn","btn-primary","btn-icon","d-flex","align-items-center",3,"id"],["ngbDropdownMenu",""],["ngbDropdownItem",""],["ngbDropdownItem","",3,"click"]],template:function(e,r){e&1&&$(0,G,3,3,"a",0)(1,K,7,2,"div",1),e&2&&(f(r.reports.length===1||r.reports.length===0&&r.disableIfUnavailable?0:-1),i(),f(r.reports.length>1?1:-1))},dependencies:[q,H,W,z,Y],styles:["a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}"]})}}return t})();var b="default",mt=(()=>{class t{constructor(){this.action$=new h,this.loadingCounts$=C(this.action$.pipe(D((n,{action:e,context:r})=>{switch(e){case"increment":return n[r]=(n[r]||0)+1,n;case"decrement":return n[r]=Math.max(0,(n[r]||0)-1),n;default:return n}},{}),k({})),{connector:()=>new _(1)}),this.loading$=this.loading(),this.loadingCountsSub=this.loadingCounts$.connect()}ngOnDestroy(){this.loadingCountsSub.unsubscribe()}loading(n=b){return this.loadingCounts$.pipe(m(e=>e[n]),m(tt),y())}load(n,e=b){let r=typeof e=="string"?e:e.context||b,d=typeof e=="object"&&e.stopOnFirstValue||!1,g=this.decrementLoadingCount(r),I=!0;function B(){I&&(g(),I=!1)}return n.pipe(Q(this.incrementLoadingCount(r)),d?v(B):w(g))}incrementLoadingCount(n){return()=>this.action$.next({action:"increment",context:n})}decrementLoadingCount(n){return()=>this.action$.next({action:"decrement",context:n})}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=F({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function tt(t){return(t||0)!==0}var nt=Math.pow(10,8)*24*60*60*1e3,ft=-nt,bt=6048e5,xt=864e5,gt=6e4,It=36e5,ht=1e3;var et=3600;var A=et*24,_t=A*7,ot=A*365.2425,rt=ot/12,Ct=rt*3,x=Symbol.for("constructDateFrom");function l(t,o){return typeof t=="function"?t(o):t&&typeof t=="object"&&x in t?t[x](o):t instanceof Date?new t.constructor(o):new Date(o)}function vt(t,o){return l(o||t,t)}function St(t,...o){let n=l.bind(null,t||o.find(e=>typeof e=="object"));return o.map(n)}export{bt as a,xt as b,gt as c,It as d,ht as e,l as f,vt as g,St as h,ct as i,mt as j}; diff --git a/public/apps/webapp-schulverwaltung/chunk-2D243XFA.js b/public/apps/webapp-schulverwaltung/chunk-2D243XFA.js deleted file mode 100644 index 03eb1bef..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-2D243XFA.js +++ /dev/null @@ -1,2 +0,0 @@ -import{a as Gt}from"./chunk-QPVGZCED.js";import{a as Nt}from"./chunk-KV3V2W4Q.js";import{a as jt,b as Ot,c as Vt}from"./chunk-3PSL2UAK.js";import{f as Fe,g as Ee}from"./chunk-LZEJSWWW.js";import{b as Dt,d as Et}from"./chunk-UN6AN2DI.js";import"./chunk-CXJU4L5R.js";import"./chunk-M5HHSMYB.js";import{a as Ht}from"./chunk-EJNJ2ZNZ.js";import{C as Y,D as me,E as Lt,F as Rt,G as Pt,H as Bt,b as xt,c as It,f as De,i as he,j as Ue,u as Tt,v as kt,w as Mt,y as de}from"./chunk-W6XALPR5.js";import{a as St,d as ue}from"./chunk-XBIMNMBY.js";import{e as At,o as _e}from"./chunk-A7CCEKNQ.js";import{i as $t,j as Ft}from"./chunk-2AZMKO7X.js";import{b as wt}from"./chunk-HLAFRD2O.js";import{c as ut,d as ft,e as bt,f as yt,g as _t,h as ht,i as vt,l as gt,x as te,z as Ct}from"./chunk-QTBTUQ3W.js";import{a as pe}from"./chunk-HVJBOTRL.js";import{$a as c,$b as Se,Ab as N,Ac as Ae,Ad as ae,Bb as J,Bd as we,Cb as w,Cd as Pe,Db as se,Dd as ee,Eb as Z,F as E,Fb as oe,Ga as k,J as Qe,Jb as r,Jd as ce,Ka as ge,Kb as l,L as ze,Lb as P,M as B,Na as h,O as Ye,P as L,Pd as le,Qa as b,Qd as D,R as Xe,Ra as ne,Sd as G,Ta as et,Uc as qe,Va as C,X as ie,Xa as Ce,Xb as at,Ya as K,Za as Q,_ as j,_a as a,a as Ve,ab as S,cc as z,cd as dt,dc as ct,dd as H,ea as I,eb as O,f as ve,fa as T,g as He,gb as g,gd as Ie,h as Ge,hb as _,ia as Je,ic as pt,id as mt,jd as Te,kd as ke,l as q,ma as Ze,n as y,nb as tt,o as x,ob as it,od as Me,pb as nt,qb as R,qd as Le,rb as d,sb as $,sd as Re,tb as f,td as $e,ub as X,x as W,xb as st,xc as lt,ya as o,yb as ot,yc as xe,za as u,zb as rt,zc as re}from"./chunk-S3H6YSFW.js";var je=(()=>{class t{constructor(e,i,n,s,p,v,A,F){this.fb=e,this.router=i,this.toastService=n,this.translate=s,this.presenceTypesService=p,this.updateService=v,this.storageService=A,this.settings=F,this.formGroup=this.createFormGroup(),this.saving$=new He(!1),this.submitted$=new He(!1),this.absenceTypes$=x([this.getConfirmationTypes(),this.getHalfDayType()]).pipe(y(([U,M])=>M?[...U,M]:U)),this.absenceTypeIdErrors$=St(q(this.formGroup),this.submitted$,"absenceTypeId"),this.destroy$=new ve}ngOnInit(){this.selectedLessonIds$.pipe(E(1),W(Rt)).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(y(e=>e.length))}getConfirmationTypes(){return this.presenceTypesService.confirmationTypes$.pipe(y(e=>e.filter(i=>i.IsAbsence&&i.Id!==this.settings.halfDayPresenceTypeId)))}getHalfDayType(){return q(null)}createFormGroup(){return this.fb.group({absenceTypeId:[null,mt.required]})}save(e){this.saving$.next(!0),this.selectedLessonIds$.pipe(E(1),L(i=>this.updateService.editLessonPresences(i,[Number(this.storageService.getPayload()?.id_person)],e)),Qe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-absences.confirm.save-success")),this.navigateBack()}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(dt))}}static{this.\u0275cmp=k({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return t})();var fe=(()=>{class t{constructor(e,i,n){this.settings=e,this.storageService=i,this.studentsService=n,this.studentId$=new Ge(1),this.lessonAbsences$=this.studentId$.pipe(L(this.loadLessonAbsences.bind(this)),B(1)),this.lessonIncidents$=this.studentId$.pipe(L(this.loadLessonIncidents.bind(this)),B(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$=x([this.openAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.checkableLessonAbsences$=x([this.checkableAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.excusedLessonAbsences$=x([this.excusedAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.unexcusedLessonAbsences$=x([this.unexcusedAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.incidentsLessonAbsences$=x([this.incidents$.pipe(W(te)),this.lessonIncidents$]).pipe(y(ue(this.getLessonIncidents.bind(this))),B(1)),this.counts$=this.getCounts();let s=this.storageService.getPayload()?.id_person;s&&this.studentId$.next(Number(s))}reset(){this.studentId$.pipe(E(1)).subscribe(e=>this.studentId$.next(e))}getLessonPresences(){return this.getCached(x([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(L(([e,i,n])=>this.loadTimetableEntries(e,i,n).pipe(y(s=>this.buildLessonPresences(i,n,s)))),y(Mt)))}getAbsences(e){return this.getCached(this.lessonPresences$.pipe(y(i=>i?.filter(n=>n.ConfirmationStateId===e)||null)))}getLessonAbsences(e,i){let n=e.map(s=>s.LessonRef.Id);return i.filter(s=>n.includes(s.LessonRef.Id))}getLessonIncidents(e,i){let n=e.map(s=>s.LessonRef.Id);return i.filter(s=>n.includes(s.LessonRef.Id))}getCounts(){return x([this.getCount(this.checkableAbsences$),this.getCount(this.openAbsences$),this.getCount(this.excusedAbsences$),this.getCount(this.unexcusedAbsences$),this.getCount(this.incidents$)]).pipe(y(([e,i,n,s,p])=>({checkableAbsences:e,openAbsences:i,excusedAbsences:n,unexcusedAbsences:s,incidents:p,halfDays:null})))}getCached(e){return e.pipe(Ye(null),ze({connector:()=>new Ge(1)}))}getCount(e){return e.pipe(y(i=>i?.length??null))}loadLessonAbsences(e){return this.studentsService.getLessonAbsences(e)}loadLessonIncidents(e){return this.studentsService.getLessonIncidents(e)}loadTimetableEntries(e,i,n){return this.studentsService.getTimetableEntries(e,{"filter.Id":`;${[...i,...n].map(s=>s.LessonRef.Id).join(";")}`})}buildLessonPresences(e,i,n){return[...e,...i].map(s=>this.buildLessonPresence(s,n)).filter(te)}buildLessonPresence(e,i){let n=i.find(s=>s.Id===e.LessonRef.Id);return n?{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:n.EventDesignation,HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:n.From,LessonDateTimeTo:n.To,Comment:null,Date:n.From,Type:e.Type,StudentFullName:e.StudentFullName,StudyClassNumber:"",TeacherInformation:n.EventManagerInformation??null}:null}static{this.\u0275fac=function(i){return new(i||t)(j(H),j(G),j(Fe))}}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var pi=(t,m)=>m.Id,li=t=>({count:t}),di=t=>({"border-top pt-3":t});function mi(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;o(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ui(t,m){if(t&1&&(K(0,mi,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);Q(l(2,0,e.absenceTypeIdErrors$))}}function fi(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,ui,3,2),r(6,"async"),c()),t&2){let e,i,n=m.$implicit,s=m.$index,p=_();b("ngClass",oe(12,di,n.IsHalfDay)),o(),ne("is-invalid",((e=(e=l(2,8,p.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+s)("value",n.Id),o(2),b("for","absence-type-"+s),o(),f(" ",n.Designation," "),o(),C(((i=(i=l(6,10,p.absenceTypes$))==null?null:i.length)!==null&&i!==void 0?i:0)-1===s?5:-1)}}function bi(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var zt=(()=>{class t extends je{constructor(e,i,n,s,p,v,A,F,U,M){super(e,i,n,s,p,v,A,F),this.myAbsencesService=U,this.selectionService=M,this.titleKey="my-absences.confirm.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(Oe=>ce(ee(Oe.map(Ne=>Ne.lessonIds))))),this.confirmationStateId=this.settings.unconfirmedAbsencesRefreshTime}onSaveSuccess(){this.selectionService.clear(),this.myAbsencesService.reset(),super.onSaveSuccess()}navigateBack(){this.router.navigate(["/my-absences"])}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(H),u(fe),u(de))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ge],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(i,n){if(i&1){let s=O();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),N(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),g("ngSubmit",function(){return I(s),T(n.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),K(15,fi,7,14,"div",5,pi),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),g("click",function(){return I(s),T(n.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,bi,3,0,"div",10),r(31,"async"),c()()()()}if(i&2){o(2),$(l(3,11,n.titleKey));let s=l(6,13,n.getSelectedCount());o(5),f(" ",P(8,15,s===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,li,s))," "),o(2),b("formGroup",n.formGroup),o(3),X("",l(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),o(3),Q(l(17,23,n.absenceTypes$)),o(4),f(" ",l(20,25,"my-absences.confirm.remark")," "),o(3),b("disabled",l(23,27,n.saving$)),o(2),f(" ",l(25,29,"my-absences.confirm.cancel")," "),o(2),b("disabled",l(27,31,n.saving$)),o(2),f(" ",l(29,33,"my-absences.confirm.save")," "),o(2),C(l(31,35,n.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var be=(()=>{class t extends Ot{get preventAbsencesAfterStart(){if(this._preventAbsencesAfterStart==null){let e=this.storageService.getPayload()?.instance_id,i=this.settings.preventStudentAbsenceAfterLessonStart;this._preventAbsencesAfterStart=e?i.includes(e):!1}return this._preventAbsencesAfterStart}constructor(e,i,n,s,p,v){super(e,i,v,n,"/my-absences/report"),this.studentsService=s,this.storageService=p}getInitialFilter(){return{dateFrom:null,dateTo:null}}isValidFilter(e){return!!(e.dateFrom||e.dateTo)}loadEntries(e,i,n){let s=this.buildRequestParamsFromFilter(e).set("sort","From.asc");return this.loadingService.load(this.loadTimetableEntries(s).pipe(y(p=>this.filterAbsencesAfterLessonStart(p)),L(p=>x([q(p),this.loadLessonAbsences(p),this.loadLessonDispensations(p)])),y(([p,v,A])=>this.buildLessonPresences(p,v,A)),y(p=>({offset:0,total:p.length,entries:p}))),jt)}filterAbsencesAfterLessonStart(e){return this.preventAbsencesAfterStart?e.filter(i=>i.From.getTime()>=new Date().getTime()):e}buildParamsFromFilter(e){let{dateFrom:i,dateTo:n}=e,s={};return i&&(s.dateFrom=_e(i,"yyyy-MM-dd")),n&&(s.dateTo=_e(n,"yyyy-MM-dd")),s}buildRequestParamsFromFilter(e){let i=new pt;return e.dateFrom&&(i=i.set("filter.From",`>${_e(It(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(i=i.set("filter.To",`<${_e(xt(e.dateTo,1),"yyyy-MM-dd")}`)),i}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(i=>i.Id).join(";")}`}):q([])}loadLessonDispensations(e){return e.length>0?this.studentsService.getLessonDispensations(this.studentId,{"filter.Id":`;${e.map(i=>i.Id).join(";")}`}):q([])}buildLessonPresences(e,i,n){return e.map(s=>this.buildLessonPresence(s,i,n))}buildLessonPresence(e,i,n){let s=i.find(A=>A.LessonRef.Id===e.Id),p=n.find(A=>A.LessonRef.Id===e.Id),v=this.buildLessonPresenceTypeRef(s,p);return{Id:"",LessonRef:{Id:e.Id,HRef:null},StudentRef:(s||p)?.StudentRef||{Id:this.studentId,HRef:null},EventRef:{Id:0,HRef:null},TypeRef:v,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:s?.ConfirmationStateId||p&&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:(s||p)?.Type||null,StudentFullName:(s||p)?.StudentFullName||"",StudyClassNumber:"",TeacherInformation:e.EventManagerInformation??null}}buildLessonPresenceTypeRef(e,i){return e?Ve({},e.TypeRef):i?Ve({},i.TypeRef):{Id:null,HRef:null}}static{this.\u0275fac=function(i){return new(i||t)(j(at),j(Ft),j(H),j(Fe),j(G),j(Vt))}}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var ye=(()=>{class t extends Tt{constructor(){super(...arguments),this.selectedIds$=this.selection$.pipe(y(kt))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Je(t)))(n||t)}})()}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var yi=(t,m)=>m.Id,_i=t=>({count:t}),hi=t=>({"border-top pt-3":t});function vi(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;o(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gi(t,m){if(t&1&&(K(0,vi,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);Q(l(2,0,e.absenceTypeIdErrors$))}}function Ci(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,gi,3,2),r(6,"async"),c()),t&2){let e,i,n=m.$implicit,s=m.$index,p=_();b("ngClass",oe(12,hi,n.IsHalfDay)),o(),ne("is-invalid",((e=(e=l(2,8,p.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+s)("value",n.Id),o(2),b("for","absence-type-"+s),o(),f(" ",n.Designation," "),o(),C(((i=(i=l(6,10,p.absenceTypes$))==null?null:i.length)!==null&&i!==void 0?i:0)-1===s?5:-1)}}function Si(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var Jt=(()=>{class t extends je{constructor(e,i,n,s,p,v,A,F,U,M){super(e,i,n,s,p,v,A,F),this.state=U,this.selectionService=M,this.titleKey="my-absences.report.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(Oe=>ce(ee(Oe.map(Ne=>Ne.lessonIds))))),this.confirmationStateId=this.settings.checkableAbsenceStateId}getHalfDayType(){return this.presenceTypesService.getPresenceType(this.settings.halfDayPresenceTypeId).pipe(y(e=>e.Active?e:null))}onSaveSuccess(){this.selectionService.clear(),this.state.resetEntries(),super.onSaveSuccess()}navigateBack(){this.state.queryParams$.pipe(E(1)).subscribe(e=>{this.router.navigate(["/my-absences/report"],{queryParams:e})})}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(H),u(be),u(ye))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ge],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(i,n){if(i&1){let s=O();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),N(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),g("ngSubmit",function(){return I(s),T(n.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),K(15,Ci,7,14,"div",5,yi),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),g("click",function(){return I(s),T(n.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,Si,3,0,"div",10),r(31,"async"),c()()()()}if(i&2){o(2),$(l(3,11,n.titleKey));let s=l(6,13,n.getSelectedCount());o(5),f(" ",P(8,15,s===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,_i,s))," "),o(2),b("formGroup",n.formGroup),o(3),X("",l(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),o(3),Q(l(17,23,n.absenceTypes$)),o(4),f(" ",l(20,25,"my-absences.confirm.remark")," "),o(3),b("disabled",l(23,27,n.saving$)),o(2),f(" ",l(25,29,"my-absences.confirm.cancel")," "),o(2),b("disabled",l(27,31,n.saving$)),o(2),f(" ",l(29,33,"my-absences.confirm.save")," "),o(2),C(l(31,35,n.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var xi=()=>["/my-absences"],ei=(()=>{class t{constructor(){this.filter={dateFrom:null,dateTo:null},this.filterChange=new Ze,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:Zt(this.filter.dateFrom),dateTo:Zt(this.filter.dateTo)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[se([{provide:ht,useClass:gt},{provide:vt,useClass:Nt}])],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(i,n){i&1&&(S(0,"bkd-backlink",0),a(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1)(5,"div",2)(6,"label",3),d(7),r(8,"translate"),c(),a(9,"bkd-date-select",4),g("valueChange",function(p){return n.updateDateFrom(p)}),c()(),a(10,"div",2)(11,"label",3),d(12),r(13,"translate"),c(),a(14,"bkd-date-select",4),rt("valueChange",function(p){return ot(n.filter.dateTo,p)||(n.filter.dateTo=p),p}),c()(),a(15,"div",5)(16,"button",6),g("click",function(){return n.show()}),d(17),r(18,"translate"),c()()()),i&2&&(b("link",Z(17,xi)),o(2),$(l(3,9,"my-absences.report.title")),o(5),$(l(8,11,"my-absences.report.header.date-from")),o(2),b("minDate",n.minDate)("value",n.filter.dateFrom),o(3),$(l(13,13,"my-absences.report.header.date-to")),o(2),b("minDate",n.minDate),st("value",n.filter.dateTo),o(3),f(" ",l(18,15,"my-absences.report.header.show")," "))},dependencies:[Bt,Gt,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})}}return t})();function Zt(t){return t?At(t):null}var Ai=(t,m)=>m.Id;function Ii(t,m){t&1&&S(0,"bkd-spinner")}function Ti(t,m){if(t&1){let e=O();a(0,"div",8)(1,"input",9,2),r(3,"async"),g("change",function(){I(e);let n=_().$implicit,s=_(5);return T(s.selectionService.toggle(n))}),c()()}if(t&2){let e=_().$implicit,i=_(5);o(),b("checked",l(3,1,i.selectionService.isSelected$(e)))}}function ki(t,m){if(t&1&&(a(0,"div")(1,"i",13),d(2),c()()),t&2){_();let e=w(2);et("checkbox presence-category ",e.category,""),o(2),$(e.icon)}}function Mi(t,m){if(t&1&&d(0),t&2){let e=_().$implicit;f(" , ",e.StudyClassNumber," ")}}function Li(t,m){if(t&1&&(a(0,"div",20),d(1),c()),t&2){_();let e=w(15);o(),f(" ",e," ")}}function Ri(t,m){if(t&1){let e=O();a(0,"div",15,1),g("click",function(n){I(e);let s=R(1),p=_(5);return T(p.onRowClick(n,s))}),N(2),r(3,"async"),h(4,Ti,4,3,"div",8)(5,ki,3,4,"div",16),a(6,"div",17),d(7),h(8,Mi,1,1),c(),a(9,"div",18),d(10),r(11,"date"),r(12,"date"),c(),a(13,"div",19),d(14),c(),N(15),r(16,"async"),h(17,Li,2,1,"div",20),a(18,"div",21),d(19),r(20,"date"),c(),a(21,"div",22),d(22),r(23,"bkdDaysDifference"),c(),a(24,"div",23),d(25),r(26,"date"),r(27,"bkdDaysDifference"),c()()}if(t&2){let e=m.$implicit,i=_(5);o(2);let n=J(l(3,11,i.getPresenceCategory(e)));o(2),C(n?5:4),o(3),f(" ",e.EventDesignation," "),o(),C(e.StudyClassNumber?8:-1),o(2),X(" ",P(11,14,e.LessonDateTimeFrom,"HH:mm"),"\u2013",P(12,17,e.LessonDateTimeTo,"HH:mm")," "),o(4),f(" ",e.TeacherInformation," "),o();let s=J(l(16,20,i.getPresenceTypeDesignation(e)));o(2),C(s?17:-1),o(2),f(" ",P(20,23,e.LessonDateTimeFrom,"dd.MM.yyyy")," "),o(3),f(" ",l(23,26,e.LessonDateTimeFrom)," "),o(3),X(" ",P(26,28,e.LessonDateTimeFrom,"dd.MM.yyyy"),", ",l(27,31,e.LessonDateTimeFrom)," ")}}function $i(t,m){if(t&1){let e=O();a(0,"div")(1,"div",7,0),g("click",function(n){I(e);let s=R(2),p=_(4);return T(p.onRowClick(n,s))}),a(3,"div",8)(4,"input",9),r(5,"async"),g("change",function(n){I(e);let s=_(4);return T(s.toggleAll(n.target==null?null:n.target.checked))}),c()(),a(6,"div",10),d(7),r(8,"translate"),c(),a(9,"div",11)(10,"a",12),r(11,"async"),a(12,"i",13),d(13,"edit"),c()()()(),K(14,Ri,28,33,"div",14,Ai),c()}if(t&2){let e,i=_(4),n=w(0);o(4),b("checked",l(5,4,i.allSelected$)),o(3),f(" ",l(8,6,"my-absences.report.list.all")," "),o(3),ne("disabled",((e=l(11,8,i.selectionService.selection$))==null?null:e.length)===0),o(4),Q(n)}}function wi(t,m){t&1&&S(0,"bkd-spinner",6)}function Pi(t,m){if(t&1&&(a(0,"div",5),h(1,$i,16,10,"div")(2,wi,1,0,"bkd-spinner",6),c()),t&2){_(3);let e=w(0),i=w(2);o(),C(e&&e.length>0?1:-1),o(),C(i?2:-1)}}function Di(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(o(),f(" ",l(2,1,"my-absences.report.no-entries")," "))}function Fi(t,m){if(t&1&&h(0,Pi,3,2,"div",5)(1,Di,3,3,"p",4),t&2){_(2);let e=w(0),i=w(2);C(e&&e.length>0||i?0:1)}}function Ei(t,m){if(t&1&&(h(0,Ii,1,0,"bkd-spinner"),r(1,"async"),h(2,Fi,2,1)),t&2){let e=_();C(l(1,1,e.state.loading$)?0:2)}}function Bi(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(o(),$(l(2,1,"my-absences.report.no-filter")))}var ti=(()=>{class t{constructor(e,i,n,s,p,v){this.state=e,this.selectionService=i,this.route=n,this.scrollPosition=s,this.presenceTypesService=p,this.settings=v,this.filterFromParams$=this.route.queryParams.pipe(y(ji)),this.allSelected$=x([this.selectionService.selection$,this.state.entries$.pipe(L(A=>x(A.map(F=>this.getPresenceType(F)))))]).pipe(y(([A,F])=>A.length>0&&A.length===F.filter(Ct(De)).length)),this.destroy$=new ve}ngOnInit(){this.filterFromParams$.pipe(E(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(Xe(this.destroy$)).subscribe(()=>this.selectionService.clear())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}getPresenceCategory(e){return this.getPresenceType(e).pipe(y(i=>De(i)?e.ConfirmationStateId===this.settings.checkableAbsenceStateId?{category:he.Unapproved,icon:Ue(he.Unapproved)}:{category:he.Absent,icon:Ue(he.Absent)}:null))}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(y(i=>e.TypeRef.Id&&i.find(n=>n.Id===e.TypeRef.Id)?.Designation||null))}toggleAll(e){x([this.state.entries$.pipe(E(1)),this.presenceTypesService.presenceTypes$.pipe(E(1))]).subscribe(([i,n])=>{let s=n.filter(p=>De(p)).map(p=>p.Id);this.selectionService.clear(e?i.filter(p=>p.TypeRef.Id==null||!s.includes(p.TypeRef.Id)):null)})}onRowClick(e,i){let n=i.querySelector('input[type="checkbox"]');n&&e.target!==n&&!e.target.closest(".buttons")&&n.click()}getPresenceType(e){return this.presenceTypesService.presenceTypes$.pipe(y(i=>e.TypeRef.Id&&i.find(n=>n.Id===e.TypeRef.Id)||null))}static{this.\u0275fac=function(i){return new(i||t)(u(be),u(ye),u(lt),u(Ht),u(Y),u(H))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-list"]],decls:9,vars:12,consts:[["all",""],["row",""],["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"inline"],[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"],[1,"entry"],[1,"entry",3,"click"],[3,"class"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(i,n){if(i&1){let s=O();N(0),r(1,"async"),N(2),r(3,"async"),a(4,"bkd-my-absences-report-header",3),r(5,"async"),g("filterChange",function(v){return I(s),T(n.state.setFilter(v))}),c(),h(6,Ei,3,3),r(7,"async"),h(8,Bi,3,3,"p",4)}i&2&&(J(l(1,2,n.state.entries$)),o(2),J(l(3,5,n.state.loadingPage$)),o(2),b("filter",l(5,8,n.filterFromParams$)),o(2),C(l(7,10,n.state.isFilterValid$)?6:8))},dependencies:[ei,Ae,wt,z,ct,D,Lt],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})}}return t})();function ji(t){return{dateFrom:t.dateFrom?qe(t.dateFrom):null,dateTo:t.dateTo?qe(t.dateTo):null}}var ii=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report"]],features:[se([be,ye])],decls:1,vars:0,template:function(i,n){i&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var Oi=["link"],Ni=()=>["/my-absences/report"],ni=(()=>{class t{onClick(){this.link.nativeElement.click()}constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-link"]],viewQuery:function(i,n){if(i&1&&tt(Oi,5),i&2){let s;it(s=nt())&&(n.link=s.first)}},hostBindings:function(i,n){i&1&&g("click",function(p){return n.onClick(p)})},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(i,n){i&1&&(a(0,"h5",1),d(1),r(2,"translate"),c(),a(3,"a",2,0)(5,"div",3)(6,"i",4),d(7,"keyboard_arrow_right"),c()()()),i&2&&(o(),f(" ",l(2,2,"my-absences.report.title"),` -`),o(2),b("routerLink",Z(4,Ni)))},dependencies:[Ae,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})}}return t})();var si=()=>[];function Vi(t,m){}function Hi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.checkableAbsences,") ")}}function Gi(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.checkableAbsences$)}}function qi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.openAbsences,") ")}}function Ui(t,m){if(t&1&&(S(0,"bkd-student-dossier-absences",16),r(1,"translate"),r(2,"async")),t&2){let e,i=_();b("absences$",i.myAbsencesService.openAbsences$)("selectionService",i.absencesSelectionService)("defaultAbsenceSelectionMessage",l(1,4,"my-absences.show.default-absence-selection-message"))("reports",(e=l(2,6,i.openAbsencesReports$))!==null&&e!==void 0?e:Z(8,si))}}function Wi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.excusedAbsences,") ")}}function Ki(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.excusedAbsences$)}}function Qi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.unexcusedAbsences,") ")}}function zi(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",17),t&2){let e=_();b("absences$",e.myAbsencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function Yi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.incidents,") ")}}function Xi(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.incidents$)}}var oi=(()=>{class t{constructor(e,i,n){this.reportsService=e,this.myAbsencesService=i,this.absencesSelectionService=n,this.openAbsencesReports$=this.loadOpenAbsencesReports(),this.allAbsencesReports$=this.loadAllAbsencesReports()}loadOpenAbsencesReports(){return x([this.absencesSelectionService.selectedWithoutPresenceType$,this.absencesSelectionService.selectedIds$]).pipe(L(([e,i])=>e.length===0&&i.length>0?this.getOpenAbsencesRecordIds(ce(ee(i.map(n=>n.lessonIds)))):q([])),L(e=>this.reportsService.getStudentConfirmationReports(e)),B(1))}loadAllAbsencesReports(){return x([this.myAbsencesService.openLessonAbsences$,this.myAbsencesService.checkableLessonAbsences$,this.myAbsencesService.excusedLessonAbsences$,this.myAbsencesService.unexcusedLessonAbsences$,this.myAbsencesService.incidentsLessonAbsences$]).pipe(y(e=>this.getAllAbsencesRecordIds(ee(e))),L(e=>this.reportsService.getMyAbsencesReports(e)),B(1))}getAllAbsencesRecordIds(e){return e.map(i=>`${i.LessonRef.Id}_${i.RegistrationId}`)}getOpenAbsencesRecordIds(e){return this.myAbsencesService.openLessonAbsences$.pipe(y(i=>i.filter(n=>e.includes(n.LessonRef.Id)).map(n=>`${n.LessonRef.Id}_${n.RegistrationId}`)))}static{this.\u0275fac=function(i){return new(i||t)(u(Et),u(fe),u(de))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-show"]],decls:70,vars:38,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],[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"],[3,"absences$"],[3,"absences$","selectionService","defaultAbsenceSelectionMessage","reports"],[3,"absences$","displayPresenceType"]],template:function(i,n){if(i&1){let s=O();N(0),r(1,"async"),a(2,"div",5)(3,"h1"),d(4),r(5,"translate"),c(),a(6,"div",6)(7,"div"),d(8),r(9,"translate"),c(),a(10,"div",7),S(11,"bkd-reports-link",8),r(12,"async"),c()(),a(13,"div",9)(14,"div",10)(15,"div",11),S(16,"bkd-my-absences-report-link"),c(),a(17,"div",12)(18,"div",13),h(19,Vi,0,0,"ng-template"),c()()(),a(20,"div",10,0)(22,"div",11)(23,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(21);return T(v.toggle())}),d(24),r(25,"translate"),h(26,Hi,1,1),c()(),a(27,"div",12)(28,"div",13),h(29,Gi,1,1,"ng-template"),c()()(),a(30,"div",10,1)(32,"div",11)(33,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(31);return T(v.toggle())}),d(34),r(35,"translate"),h(36,qi,1,1),c()(),a(37,"div",12)(38,"div",13),h(39,Ui,3,9,"ng-template"),c()()(),a(40,"div",10,2)(42,"div",11)(43,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(41);return T(v.toggle())}),d(44),r(45,"translate"),h(46,Wi,1,1),c()(),a(47,"div",12)(48,"div",13),h(49,Ki,1,1,"ng-template"),c()()(),a(50,"div",10,3)(52,"div",11)(53,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(51);return T(v.toggle())}),d(54),r(55,"translate"),h(56,Qi,1,1),c()(),a(57,"div",12)(58,"div",13),h(59,zi,1,2,"ng-template"),c()()(),a(60,"div",10,4)(62,"div",11)(63,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(61);return T(v.toggle())}),d(64),r(65,"translate"),h(66,Yi,1,1),c()(),a(67,"div",12)(68,"div",13),h(69,Xi,1,1,"ng-template"),c()()()()()}if(i&2){let s,p=R(21),v=R(31),A=R(41),F=R(51),U=R(61),M=J(l(1,18,n.myAbsencesService.counts$));o(4),$(l(5,21,"my-absences.title")),o(4),$(l(9,23,"my-absences.description")),o(3),b("reports",(s=l(12,25,n.allAbsencesReports$))!==null&&s!==void 0?s:Z(37,si)),o(12),b("opened",!p.collapsed),o(),f(" ",l(25,27,"shared.profile.checkable-absences")," "),o(2),C((M==null?null:M.checkableAbsences)!==null?26:-1),o(7),b("opened",!v.collapsed),o(),f(" ",l(35,29,"shared.profile.open-absences")," "),o(2),C((M==null?null:M.openAbsences)!==null?36:-1),o(7),b("opened",!A.collapsed),o(),f(" ",l(45,31,"shared.profile.excused-absences")," "),o(2),C((M==null?null:M.excusedAbsences)!==null?46:-1),o(7),b("opened",!F.collapsed),o(),f(" ",l(55,33,"shared.profile.unexcused-absences")," "),o(2),C((M==null?null:M.unexcusedAbsences)!==null?56:-1),o(7),b("opened",!U.collapsed),o(),f(" ",l(65,35,"shared.profile.incidents")," "),o(2),C((M==null?null:M.incidents)!==null?66:-1)}},dependencies:[$t,_t,yt,bt,ni,ft,ut,Dt,Pt,z,D],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();var ri=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences"]],features:[se([fe,de])],decls:1,vars:0,template:function(i,n){i&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var Ws=[{path:"",component:ri,children:[{path:"",component:oi},{path:"confirm",component:zt},{path:"report",component:ii,children:[{path:"",component:ti,data:{restoreScrollPositionFrom:["/my-absences/report/confirm"]}},{path:"confirm",component:Jt}]}]}];export{Ws as MY_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-3PSL2UAK.js b/public/apps/webapp-schulverwaltung/chunk-2ZRHGKSY.js similarity index 86% rename from public/apps/webapp-schulverwaltung/chunk-3PSL2UAK.js rename to public/apps/webapp-schulverwaltung/chunk-2ZRHGKSY.js index e50a3b59..3c6e12f6 100644 --- a/public/apps/webapp-schulverwaltung/chunk-3PSL2UAK.js +++ b/public/apps/webapp-schulverwaltung/chunk-2ZRHGKSY.js @@ -1 +1 @@ -import{b as P}from"./chunk-CXJU4L5R.js";import{d as F}from"./chunk-XBIMNMBY.js";import{Aa as v,C as b,D as S,F as p,Gd as x,H as c,Id as g,K as u,M as n,R as y,X as l,f as o,g as h,n as s,o as f,w as a,x as m}from"./chunk-S3H6YSFW.js";var R="page",L=(()=>{class r{constructor(t,i,$,j,E){this.location=t,this.loadingService=i,this.sortService=$,this.settings=j,this.loading$=this.loadingService.loading$,this.loadingPage$=this.loadingService.loading(R),this.sorting$=this.sortService.sorting$,this.filter$=new h(this.getInitialFilter()),this.isFilterValid$=this.filter$.pipe(s(this.isValidFilter.bind(this))),this.validFilter$=this.filter$.pipe(m(this.isValidFilter.bind(this)),c(g),n(1)),this.resetEntries$=new o,this.nextPage$=new o,this.page$=a(this.nextPage$.pipe(s(()=>"next")),a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>"reset"))).pipe(u((e,d)=>d==="next"?e+1:0,0)),this.offset$=this.page$.pipe(s(e=>e*this.settings.paginationLimit)),this.pageResult$=f([this.validFilter$,this.sorting$,this.offset$]).pipe(S(10),b(F(this.loadEntries.bind(this))),n(1)),this.entries$=a(a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>({action:"reset"}))),this.pageResult$.pipe(s(e=>e.offset===0?{action:"reset",entries:e.entries}:{action:"append",entries:e.entries}))).pipe(u(this.entriesActionReducer.bind(this),[]),n(1)),this.total$=this.pageResult$.pipe(s(({total:e})=>e)),this.hasMore$=this.pageResult$.pipe(s(({offset:e,total:d})=>ethis.location.replaceState(E,e)),this.sortService.setSorting(this.getInitialSorting())}ngOnDestroy(){this.destroy$.next()}setFilter(t){this.filter$.next(x(t))}nextPage(){this.hasMore$.pipe(p(1)).subscribe(t=>{t&&this.nextPage$.next()})}resetEntries(){this.resetEntries$.next()}getInitialSorting(){return null}entriesActionReducer(t,i){switch(i.action){case"append":return[...t,...i.entries];case"reset":return i.entries?i.entries:[];default:return t}}static{this.\u0275fac=function(i){v()}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();var M=(()=>{class r{getSortingChar$(t){return this.sorting$.pipe(s(i=>i&&t===i.key?i.ascending?"\u2193":"\u2191":""))}constructor(){this.sortingSubject$=new h(null),this.sorting$=this.sortingSubject$.asObservable().pipe(c(g),n(1))}setSorting(t){this.sortingSubject$.next(t)}toggleSorting(t){this.sorting$.pipe(p(1)).subscribe(i=>{let $=i&&i.key===t?!i.ascending:!0;this.sortingSubject$.next({key:t,ascending:$})})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{R as a,L as b,M as c}; +import{b as F}from"./chunk-A7EOJZ46.js";import{d as P}from"./chunk-K42F6AEW.js";import{Aa as v,C as b,D as S,F as p,H as c,K as u,Kd as x,M as n,Md as g,R as y,X as l,f as o,g as h,n as s,o as f,w as a,x as m}from"./chunk-NEW5VGRB.js";var R="page",L=(()=>{class r{constructor(t,i,$,j,E){this.location=t,this.loadingService=i,this.sortService=$,this.settings=j,this.loading$=this.loadingService.loading$,this.loadingPage$=this.loadingService.loading(R),this.sorting$=this.sortService.sorting$,this.filter$=new h(this.getInitialFilter()),this.isFilterValid$=this.filter$.pipe(s(this.isValidFilter.bind(this))),this.validFilter$=this.filter$.pipe(m(this.isValidFilter.bind(this)),c(g),n(1)),this.resetEntries$=new o,this.nextPage$=new o,this.page$=a(this.nextPage$.pipe(s(()=>"next")),a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>"reset"))).pipe(u((e,d)=>d==="next"?e+1:0,0)),this.offset$=this.page$.pipe(s(e=>e*this.settings.paginationLimit)),this.pageResult$=f([this.validFilter$,this.sorting$,this.offset$]).pipe(S(10),b(P(this.loadEntries.bind(this))),n(1)),this.entries$=a(a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>({action:"reset"}))),this.pageResult$.pipe(s(e=>e.offset===0?{action:"reset",entries:e.entries}:{action:"append",entries:e.entries}))).pipe(u(this.entriesActionReducer.bind(this),[]),n(1)),this.total$=this.pageResult$.pipe(s(({total:e})=>e)),this.hasMore$=this.pageResult$.pipe(s(({offset:e,total:d})=>ethis.location.replaceState(E,e)),this.sortService.setSorting(this.getInitialSorting())}ngOnDestroy(){this.destroy$.next()}setFilter(t){this.filter$.next(x(t))}nextPage(){this.hasMore$.pipe(p(1)).subscribe(t=>{t&&this.nextPage$.next()})}resetEntries(){this.resetEntries$.next()}getInitialSorting(){return null}entriesActionReducer(t,i){switch(i.action){case"append":return[...t,...i.entries];case"reset":return i.entries?i.entries:[];default:return t}}static{this.\u0275fac=function(i){v()}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();var M=(()=>{class r{getSortingChar$(t){return this.sorting$.pipe(s(i=>i&&t===i.key?i.ascending?"\u2193":"\u2191":""))}constructor(){this.sortingSubject$=new h(null),this.sorting$=this.sortingSubject$.asObservable().pipe(c(g),n(1))}setSorting(t){this.sortingSubject$.next(t)}toggleSorting(t){this.sorting$.pipe(p(1)).subscribe(i=>{let $=i&&i.key===t?!i.ascending:!0;this.sortingSubject$.next({key:t,ascending:$})})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{R as a,L as b,M as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-37I3VMAS.js b/public/apps/webapp-schulverwaltung/chunk-37I3VMAS.js deleted file mode 100644 index f9fadbc3..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-37I3VMAS.js +++ /dev/null @@ -1 +0,0 @@ -import{a as F}from"./chunk-XKNLLORS.js";import{a as G,e as u}from"./chunk-HLAFRD2O.js";import{D as V,Ec as P,Fc as R,Gc as m,Hc as U,Ic as a,Jc as x,Kc as h,M as I,Mc as A,Md as s,Nc as l,O as S,Oc as o,P as n,S as O,Sc as C,Tc as _,Vc as v,X as g,_ as f,_c as d,dd as $,f as T,mc as j,n as c}from"./chunk-S3H6YSFW.js";function M(e){var r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}function k(e,r,t){t===void 0&&(t=e.name);var i=M(e);return i.validate=r,i.decode=function(p){return r(p,_(i))},i.name=t,i}function y(e,r,t){return t===void 0&&(t="withFallback("+e.name+")"),k(e,function(i,p){return P(function(){return m(r)})(e.validate(i,p))},t)}var q=o({Key:a,Value:a}),D=o({Id:a,Settings:C(l(q))}),b=d.pipe(o({mail:y(h,!1),gui:y(h,!1),phoneMobile:y(h,!1)})),E=new U("NotificationTypesInactive",e=>Array.isArray(e)&&e.every(r=>typeof r=="string"),(e,r)=>typeof e=="string"?m(e.split(";").filter(Boolean)):R(e,r),e=>e.join(";")),z=function(e){return e.Grid="grid",e.List="list",e}(z||{}),w=d.pipe(o({presenceControl:A({grid:null,list:null})})),Q=o({eventId:v(x),group:v(F.props.Key)}),N=d.pipe(C(l(Q))),Y=o({AccessInfo:o({Roles:l(a),Permissions:l(a)})});var L=(()=>{class e extends G{constructor(t,i){super(t,i,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)),c(({AccessInfo:t})=>t))}static{this.\u0275fac=function(i){return new(i||e)(f(j),f($))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tt=100,H="presenceControlViewMode",W="presenceControlGroupView",B="notification",J="notificationTypesInactive",vt=(()=>{class e{constructor(t){this.settingsRestService=t,this.refetch$=new T,this.settings$=this.refetch$.pipe(S(null),V(tt),n(()=>this.settingsRestService.getUserSettingsCst()),c(i=>i.Settings),I(1)),this.accessInfo$=this.settingsRestService.getAccessInfo().pipe(I(1))}refetch(){this.refetch$.next()}getSetting(t){return this.settings$.pipe(c(i=>i.find(p=>p.Key===t)?.Value??null))}saveSetting(t,i){return this.settingsRestService.updateUserSettingsCst(this.buildSettings(t,i)).pipe(O(()=>this.refetch$.next()))}getPresenceControlViewMode(){return this.getSetting(H).pipe(u('{"presenceControl":"grid"}'),n(s(w)),c(({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(c(({Roles:t,Permissions:i})=>[...t,...i]),S(null))}buildSettings(t,i){return{Id:"Cst",Settings:[{Key:t,Value:i}]}}static{this.\u0275fac=function(i){return new(i||e)(f(L))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{z as a,vt as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-5YNREB6T.js b/public/apps/webapp-schulverwaltung/chunk-5YNREB6T.js new file mode 100644 index 00000000..c70cc75d --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-5YNREB6T.js @@ -0,0 +1,2 @@ +import{a as Bi}from"./chunk-GIRYST4Y.js";import{a as Oi,b as Pi,c as Vi}from"./chunk-VANM6WSB.js";import{a as Di}from"./chunk-Y3BQLEPF.js";import{a as Ii}from"./chunk-FN7XEGJE.js";import{a as xi}from"./chunk-SME4UDGV.js";import"./chunk-GCWE54XA.js";import"./chunk-DJNW6R6G.js";import"./chunk-N2RKIMWO.js";import{a as ui,c as gi,e as Ti}from"./chunk-FMUJPUYQ.js";import{a as He}from"./chunk-SKUS47ZU.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import{a as Ni}from"./chunk-BGWLZKVI.js";import{a as Fi}from"./chunk-ETZGBBG5.js";import{a as wi,b as Ai,c as ki}from"./chunk-2ZRHGKSY.js";import{e as vi,f as Ei}from"./chunk-26VH6QDS.js";import"./chunk-JGKXAFYO.js";import{a as Ci}from"./chunk-A7EOJZ46.js";import"./chunk-ZELJ2QPT.js";import{a as Li}from"./chunk-UZJ4FIXB.js";import{A as at,D as _i,b as di,c as it,d as nt,e as Ie,f as je,i as mi,j as rt,z as fi}from"./chunk-KQORGECX.js";import{a as We,c as st,d as yi}from"./chunk-K42F6AEW.js";import{e as hi}from"./chunk-NC6UEGAF.js";import{i as bi}from"./chunk-SL67CYEF.js";import{h as Si}from"./chunk-HQSONWXM.js";import{B as pi,h as si,i as ri,l as ai,z as we}from"./chunk-RXRYDGZR.js";import{a as li}from"./chunk-F4XODHS2.js";import{$ as _,$a as $,$b as Nt,A as _t,Ad as ti,Ba as E,Bb as q,Bc as Ve,Cb as U,Cc as $t,D as gt,Da as It,Db as Q,Dc as Ht,Eb as oe,Ec as jt,Ed as ii,F as ee,Fb as le,Fd as Re,Gb as z,Gd as ni,Hb as pe,Ia as j,Ib as kt,J as Ct,Ja as wt,Jb as X,Ka as M,Kb as Dt,Lb as Bt,M as ue,Mb as Lt,Mc as Xe,Nb as d,Nc as et,Nd as oi,O as bt,Oa as Pe,Ob as u,P as Ee,Pa as g,Pb as te,R as V,Ra as J,Rb as ce,Rd as $e,S as vt,Sa as m,Sc as Wt,Sd as me,Ta as W,Tb as Ot,Ub as L,Vb as Se,W as Et,Wa as ze,Wd as ci,X as Z,Xa as y,Y as yt,Yc as tt,Z as Tt,Za as Te,_a as R,_b as Pt,a as ge,ab as l,b as De,bb as c,cb as B,da as ye,db as At,dc as Vt,ea as b,eb as Ft,f as re,fa as v,fb as Ne,fc as Je,g as Ue,gb as N,gc as be,hc as Mt,hd as he,i as ht,ia as St,ib as w,id as Gt,j as mt,ja as Qe,jb as h,jd as qt,kb as Ke,kd as Ut,l as ft,lb as Ye,ma as D,mb as fe,md as xe,n as T,na as xt,nb as Ze,nd as Me,o as Be,ob as H,od as Qt,pb as _e,qb as F,qc as Rt,ra as ae,rb as k,rd as zt,sd as Kt,t as ve,ub as G,ud as Yt,vb as p,w as Le,wb as x,wd as Zt,x as Oe,xb as C,xd as Jt,ya as o,yb as Ce,yd as Xt,za as S,zd as ei}from"./chunk-NEW5VGRB.js";var ie=(()=>{class t extends Ai{constructor(){let e=_(Nt),i=_(bi),n=_(ki),r=_(he);super(e,i,n,r,"/edit-absences"),this.lessonPresencesService=_(Ti),this.presenceTypesService=_(je),this.dropDownItemsService=_(He),this.weekdays$=this.loadWeekdays().pipe(ue(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(ue(1)),this.absenceConfirmationStates$=this.loadAbsenceConfirmationStates().pipe(T(ui),ue(1)),this.presenceControlEntries$=Be([this.entries$,this.presenceTypes$,this.absenceConfirmationStates$]).pipe(T(yi(Bi)),ue(1)),this.selected=[],this.queryParamsString$.pipe(V(this.destroy$)).subscribe(a=>this.confirmBackLinkParams={returnparams:a})}resetSelection(){this.selected=[]}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null}}isValidFilter(e){return!!(e.student||e.educationalEvent||e.studyClass||e.teacher||e.dateFrom||e.dateTo||e.weekdays||e.presenceTypes||e.confirmationStates||e.incidentTypes)}loadEntries(e,i,n){let r={sort:"StudentFullName.asc,LessonDateTimeFrom.asc"};return this.loadingService.load(this.lessonPresencesService.getFilteredList(e,n,r),wi)}buildParamsFromFilter(e){return Oi(e)}loadWeekdays(){return this.loadingService.load(this.dropDownItemsService.getWeekdays())}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.activePresenceTypes$)}loadAbsenceConfirmationStates(){return this.loadingService.load(this.dropDownItemsService.getAbsenceConfirmationStates())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var O=function(t){return t.Absent="absent",t.Dispensation="dispensation",t.HalfDay="half-day",t.Incident="incident",t.Present="present",t}(O||{}),Ri=(()=>{class t{constructor(){this.updateService=_(di),this.settings=_(he)}update(e,i,n,r,a,f){let I=[];switch(n){case O.Present:I=this.createResetBulkRequests(e);break;case O.Absent:I=this.createAbsentEditBulkRequests(e,i,r,a);break;case O.Dispensation:I=this.createEditBulkRequests(e,null,this.settings.dispensationPresenceTypeId);break;case O.HalfDay:I=this.createEditBulkRequests(e,null,this.settings.halfDayPresenceTypeId);break;case O.Incident:I=this.createEditBulkRequests(e,null,f);break}return Be(I).pipe(T(()=>{}))}createAbsentEditBulkRequests(e,i,n,r){return n===this.settings.excusedAbsenceStateId?this.createEditBulkRequests(e,n,r):n===this.settings.unexcusedAbsenceStateId?this.createEditBulkRequests(e,n,this.settings.absencePresenceTypeId):[...this.createEditBulkRequests(e.filter(Mi(i,this.settings)),n,this.settings.absencePresenceTypeId),...this.createEditBulkRequests(e.filter(we(Mi(i,this.settings))),n,null)]}createResetBulkRequests(e){return at(e).map(({lessonIds:i,personIds:n})=>this.updateService.removeLessonPresences(i,n))}createEditBulkRequests(e,i,n){return at(e).map(({lessonIds:r,personIds:a})=>this.updateService.editLessonPresences(r,a,n||void 0,i||void 0))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Mi(t,s){return e=>{let i=t.find(n=>n.Id===e.TypeRef.Id);return!i||i.Id===s.dispensationPresenceTypeId||i.Id===s.halfDayPresenceTypeId||i.IsIncident}}var cn=(t,s)=>s.Key,$i=(t,s)=>s.Id;function dn(t,s){if(t&1&&(l(0,"div",3),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",te(2,1,"global.validation-errors."+e.error,e.params)," ")}}function un(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;m("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function pn(t,s){if(t&1&&(l(0,"select",17),d(1,"async"),l(2,"option",18),p(3),d(4,"translate"),c(),R(5,un,2,2,"option",18,$i),d(7,"async"),c()),t&2){let e,i=h(5);W("is-invalid",((e=u(1,4,i.absenceTypeIdErrors$))==null?null:e.length)||!1),o(2),m("ngValue",null),o(),C(" ",u(4,6,"edit-absences.edit.absence-type-placeholder")," "),o(2),$(u(7,8,i.absenceTypes$))}}function hn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",te(2,1,"global.validation-errors."+e.error,e.params)," ")}}function mn(t,s){if(t&1&&(l(0,"div",13),B(1,"input",14),l(2,"label",11),p(3),c(),g(4,pn,8,10,"select",15),R(5,hn,3,4,"div",16,Te),d(7,"async"),c()),t&2){let e=s.$implicit,i=h(4);o(),m("id","state-"+e.Key)("value",e.Key),o(),fe("for","state-"+e.Key),o(),C(" ",e.Value," "),o(),y(i.isExcused(e)?4:-1),o(),$(u(7,5,i.absenceTypeIdErrors$))}}function fn(t,s){if(t&1&&(l(0,"div",12),R(1,mn,8,7,"div",13,cn),c()),t&2){h(3);let e=z(0);o(),$(e)}}function _n(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;m("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function gn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",te(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Cn(t,s){if(t&1&&(l(0,"div",12)(1,"select",19),d(2,"async"),l(3,"option",18),p(4),d(5,"translate"),c(),R(6,_n,2,2,"option",18,$i),d(8,"async"),c(),R(9,gn,3,4,"div",16,Te),d(11,"async"),c()),t&2){let e,i=h(3);o(),W("is-invalid",((e=u(2,4,i.incidentIdErrors$))==null?null:e.length)||!1),o(2),m("ngValue",null),o(),C(" ",u(5,6,"edit-absences.edit.incident-placeholder")," "),o(2),$(u(8,8,i.incidents$)),o(3),$(u(11,10,i.incidentIdErrors$))}}function bn(t,s){if(t&1&&(l(0,"div",5),B(1,"input",10),l(2,"label",11),p(3),d(4,"translate"),c(),g(5,fn,3,0,"div",12)(6,Cn,12,12,"div",12),c()),t&2){let e=s.$implicit,i=h(2);o(),m("id","category-"+e)("value",e),o(),fe("for","category-"+e),o(),C(" ",u(4,6,"edit-absences.edit.categories."+e)," "),o(2),y(i.isAbsent(e)?5:-1),o(),y(i.isIncident(e)?6:-1)}}function vn(t,s){t&1&&(l(0,"div",9)(1,"span",20),p(2,"Loading..."),c()())}function En(t,s){if(t&1){let e=N();l(0,"form",2),w("ngSubmit",function(){b(e);let n=h();return v(n.onSubmit())}),R(1,dn,3,4,"div",3,Te),d(3,"async"),l(4,"div",4),R(5,bn,7,8,"div",5,Te),c(),l(7,"div",6)(8,"button",7),d(9,"async"),w("click",function(){b(e);let n=h();return v(n.cancel())}),p(10),d(11,"translate"),c(),l(12,"button",8),d(13,"async"),p(14),d(15,"translate"),g(16,vn,3,0,"div",9),d(17,"async"),c()()()}if(t&2){let e=h(),i=z(2),n=z(4);m("formGroup",n),o(),$(u(3,6,e.formErrors$)),o(4),$(i),o(3),m("disabled",u(9,8,e.saving$)),o(2),C(" ",u(11,10,"edit-absences.edit.cancel")," "),o(2),m("disabled",u(13,12,e.saving$)),o(2),C(" ",u(15,14,"edit-absences.edit.save")," "),o(2),y(u(17,16,e.saving$)?16:-1)}}var Hi=(()=>{class t{constructor(){this.fb=_(ii),this.router=_(Ht),this.route=_(Ve),this.toastService=_(li),this.translate=_($e),this.state=_(ie),this.dropDownItemsService=_(He),this.presenceTypesService=_(je),this.updateService=_(Ri),this.settings=_(he),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.incidents$=this.presenceTypesService.incidentTypes$,this.formGroup$=this.createFormGroup(),this.saving$=new Ue(!1),this.submitted$=new Ue(!1),this.formErrors$=We(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=We(this.formGroup$,this.submitted$,"absenceTypeId"),this.incidentIdErrors$=We(this.formGroup$,this.submitted$,"incidentId"),this.availableCategories=[O.Absent,O.Dispensation,O.HalfDay,O.Incident,O.Present],this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(T(this.sortAbsenceConfirmationStates.bind(this)),ue(1)),this.activeCategories$=this.presenceTypesService.halfDayActive$.pipe(T(e=>e?this.availableCategories:this.availableCategories.filter(i=>i!==O.HalfDay))),this.destroy$=new re}ngOnInit(){this.state.selected.length===0&&this.navigateBack(),st(this.formGroup$,"category").pipe(V(this.destroy$)).subscribe(this.updateConfirmationValueDisabled.bind(this)),st(this.formGroup$,"confirmationValue").pipe(V(this.destroy$)).subscribe(this.updateAbsenceTypeIdDisabled.bind(this))}ngOnDestroy(){this.destroy$.next()}isAbsent(e){return e===O.Absent}isExcused(e){return e.Key===this.settings.excusedAbsenceStateId}isIncident(e){return e===O.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(T(e=>this.fb.group({category:[O.Absent,xe.required],confirmationValue:[this.settings.excusedAbsenceStateId,xe.required],absenceTypeId:[e,xe.required],incidentId:[{value:null,disabled:!0},xe.required]})),ue(1))}getInitialAbsenceTypeId(){return this.absenceTypes$.pipe(ee(1),T(e=>{let i=e.map(r=>r.Id),n=oi(this.state.selected.map(r=>r.TypeRef.Id));return n.length===1&&n[0]!=null&&i.includes(n[0])?n[0]:null}))}updateConfirmationValueDisabled(){this.formGroup$.pipe(ee(1)).subscribe(e=>{let i=e.get("category"),n=e.get("confirmationValue"),r=e.get("absenceTypeId"),a=e.get("incidentId");i&&n&&r&&a&&(i.value===O.Absent?(n.enable(),this.updateAbsenceTypeIdDisabled()):(n.disable(),r.disable()),i.value===O.Incident?a.enable():a.disable())})}updateAbsenceTypeIdDisabled(){this.formGroup$.pipe(ee(1)).subscribe(e=>{let i=e.get("confirmationValue"),n=e.get("absenceTypeId");i&&n&&(i.value===this.settings.excusedAbsenceStateId?n.enable():n.disable())})}save(e){this.saving$.next(!0);let{category:i,confirmationValue:n,absenceTypeId:r,incidentId:a}=e.value;this.presenceTypesService.presenceTypes$.pipe(Ee(f=>this.updateService.update(this.state.selected,f,i,n,r,a)),Ct(()=>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(i=>{this.router.navigate(["/edit-absences"],{queryParams:De(ge({},Ci(i.returnparams)),{reload:e})})})}sortAbsenceConfirmationStates(e){return e.slice().sort((i,n)=>i.Key===this.settings.excusedAbsenceStateId?-1:n.Key===this.settings.excusedAbsenceStateId?1:i.Value.localeCompare(n.Value))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-edit"]],decls:11,vars:13,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","category",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"ms-5"],[1,"form-check","mt-2","mb-2"],["type","radio","formControlName","confirmationValue",1,"form-check-input",3,"id","value"],["formControlName","absenceTypeId",1,"form-select","mt-1",3,"is-invalid"],[1,"invalid-feedback"],["formControlName","absenceTypeId",1,"form-select","mt-1"],[3,"ngValue"],["formControlName","incidentId",1,"form-select","mt-1"],[1,"visually-hidden"]],template:function(i,n){if(i&1&&(oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),l(6,"h1"),p(7),d(8,"translate"),c(),l(9,"div",0),g(10,En,18,18,"form",1),c()),i&2){let r=le(u(1,2,n.confirmationStates$));o(2),le(u(3,5,n.activeCategories$)),o(2);let a=le(u(5,8,n.formGroup$));o(3),x(u(8,11,"edit-absences.title")),o(3),y(a&&r?10:-1)}},dependencies:[Re,Kt,ei,ti,Ut,Xt,Yt,Me,Qt,ni,Zt,Jt,be,me],encapsulation:2,changeDetection:0})}}return t})();var ot=(()=>{class t extends fi{static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=St(t)))(n||t)}})()}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var yn=["content"],Tn=["scroll"],Sn=["padding"],Gi=["*"],Fe=t=>({searchTerm:t});function xn(t,s){if(t&1&&(l(0,"div",3),Ne(1,6),c()),t&2){let e=h();o(),m("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",X(2,Fe,e.filterValue))}}function In(t,s){if(t&1&&(l(0,"div",5),Ne(1,6),c()),t&2){let e=h();o(),m("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",X(2,Fe,e.filterValue))}}var wn=["searchInput"],An=["clearButton"],Fn=(t,s,e)=>({item:t,clear:s,label:e}),kn=(t,s)=>({items:t,clear:s}),Dn=(t,s,e,i)=>({item:t,item$:s,index:e,searchTerm:i});function Bn(t,s){if(t&1&&(l(0,"div",19),p(1),c()),t&2){let e=h(2);o(),x(e.placeholder)}}function Ln(t,s){}function On(t,s){if(t&1&&g(0,Bn,2,1,"ng-template",null,1,ce)(2,Ln,0,0,"ng-template",18),t&2){let e=G(1),i=h();o(2),m("ngTemplateOutlet",i.placeholderTemplate||e)}}function Pn(t,s){if(t&1){let e=N();l(0,"span",22),w("click",function(){b(e);let n=h().$implicit,r=h(2);return v(r.unselect(n))}),p(1,"\xD7"),c(),B(2,"span",23)}if(t&2){let e=h().$implicit,i=h(2);o(2),m("ngItemLabel",e.label)("escape",i.escapeHTML)}}function Nn(t,s){}function Vn(t,s){if(t&1&&(l(0,"div",21),g(1,Pn,3,2,"ng-template",null,2,ce)(3,Nn,0,0,"ng-template",12),c()),t&2){let e=s.$implicit,i=G(2),n=h(2);W("ng-value-disabled",e.disabled),o(3),m("ngTemplateOutlet",n.labelTemplate||i)("ngTemplateOutletContext",Bt(4,Fn,e.value,n.clearItem,e.label))}}function Mn(t,s){if(t&1&&R(0,Vn,4,8,"div",20,ze().trackByOption,!0),t&2){let e=h();$(e.selectedItems)}}function Rn(t,s){}function $n(t,s){if(t&1&&g(0,Rn,0,0,"ng-template",12),t&2){let e=h();m("ngTemplateOutlet",e.multiLabelTemplate)("ngTemplateOutletContext",Dt(2,kn,e.selectedValues,e.clearItem))}}function Hn(t,s){t&1&&B(0,"div",24)}function jn(t,s){}function Wn(t,s){if(t&1&&g(0,Hn,1,0,"ng-template",null,3,ce)(2,jn,0,0,"ng-template",18),t&2){let e=G(1),i=h();o(2),m("ngTemplateOutlet",i.loadingSpinnerTemplate||e)}}function Gn(t,s){if(t&1&&Ne(0,18),t&2){let e=h(2);m("ngTemplateOutlet",e.clearButtonTemplate)}}function qn(t,s){if(t&1&&(l(0,"span",25,4)(2,"span",26),p(3,"\xD7"),c()()),t&2){let e=h(2);fe("title",e.clearAllText)}}function Un(t,s){if(t&1&&g(0,Gn,1,1,"ng-container",18)(1,qn,4,1,"span",25),t&2){let e=h();y(e.clearButtonTemplate?0:1)}}function Qn(t,s){if(t&1&&B(0,"span",31),t&2){let e=h().$implicit,i=h(2);m("ngItemLabel",e.label)("escape",i.escapeHTML)}}function zn(t,s){}function Kn(t,s){if(t&1){let e=N();l(0,"div",30),w("click",function(){let n=b(e).$implicit,r=h(2);return v(r.toggleItem(n))})("mouseover",function(){let n=b(e).$implicit,r=h(2);return v(r.onItemHover(n))}),g(1,Qn,1,2,"ng-template",null,5,ce)(3,zn,0,0,"ng-template",12),c()}if(t&2){let e=s.$implicit,i=G(2),n=h(2);W("ng-option-disabled",e.disabled)("ng-option-selected",e.selected)("ng-optgroup",e.children)("ng-option",!e.children)("ng-option-child",!!e.parent)("ng-option-marked",e===n.itemsList.markedItem),J("role",e.children?"group":"option")("aria-selected",e.selected)("id",e==null?null:e.htmlId),o(3),m("ngTemplateOutlet",e.children?n.optgroupTemplate||i:n.optionTemplate||i)("ngTemplateOutletContext",Lt(17,Dn,e.value,e,e.index,n.searchTerm))}}function Yn(t,s){if(t&1&&(l(0,"span")(1,"span",33),p(2),c(),p(3),c()),t&2){let e=h(3);o(2),x(e.addTagText),o(),C('"',e.searchTerm,'"')}}function Zn(t,s){}function Jn(t,s){if(t&1){let e=N();l(0,"div",32),w("mouseover",function(){b(e);let n=h(2);return v(n.itemsList.unmarkItem())})("click",function(){b(e);let n=h(2);return v(n.selectTag())}),g(1,Yn,4,2,"ng-template",null,6,ce)(3,Zn,0,0,"ng-template",12),c()}if(t&2){let e=G(2),i=h(2);W("ng-option-marked",!i.itemsList.markedItem),o(3),m("ngTemplateOutlet",i.tagTemplate||e)("ngTemplateOutletContext",X(4,Fe,i.searchTerm))}}function Xn(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),x(e.notFoundText)}}function es(t,s){}function ts(t,s){if(t&1&&g(0,Xn,2,1,"ng-template",null,7,ce)(2,es,0,0,"ng-template",12),t&2){let e=G(1),i=h(2);o(2),m("ngTemplateOutlet",i.notFoundTemplate||e)("ngTemplateOutletContext",X(2,Fe,i.searchTerm))}}function is(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),x(e.typeToSearchText)}}function ns(t,s){}function ss(t,s){if(t&1&&g(0,is,2,1,"ng-template",null,8,ce)(2,ns,0,0,"ng-template",18),t&2){let e=G(1),i=h(2);o(2),m("ngTemplateOutlet",i.typeToSearchTemplate||e)}}function rs(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),x(e.loadingText)}}function as(t,s){}function os(t,s){if(t&1&&g(0,rs,2,1,"ng-template",null,9,ce)(2,as,0,0,"ng-template",12),t&2){let e=G(1),i=h(2);o(2),m("ngTemplateOutlet",i.loadingTextTemplate||e)("ngTemplateOutletContext",X(2,Fe,i.searchTerm))}}function ls(t,s){if(t&1){let e=N();l(0,"ng-dropdown-panel",27),w("update",function(n){b(e);let r=h();return v(r.viewPortItems=n)})("scroll",function(n){b(e);let r=h();return v(r.scroll.emit(n))})("scrollToEnd",function(n){b(e);let r=h();return v(r.scrollToEnd.emit(n))})("outsideClick",function(){b(e);let n=h();return v(n.close())}),At(1),R(2,Kn,4,22,"div",28,ze().trackByOption,!0),g(4,Jn,4,6,"div",29),Ft(),g(5,ts,3,4)(6,ss,3,1)(7,os,3,4),c()}if(t&2){let e=h();W("ng-select-multiple",e.multiple),m("virtualScroll",e.virtualScroll)("bufferAmount",e.bufferAmount)("appendTo",e.appendTo)("position",e.dropdownPosition)("headerTemplate",e.headerTemplate)("footerTemplate",e.footerTemplate)("filterValue",e.searchTerm)("items",e.itemsList.filteredItems)("markedItem",e.itemsList.markedItem)("ngClass",e.appendTo?e.ngClass?e.ngClass:e.classes:null)("id",e.dropdownId),J("aria-label",e.ariaLabelDropdown),o(2),$(e.viewPortItems),o(2),y(e.showAddTag?4:-1),o(),y(e.showNoItemsFound()?5:-1),o(),y(e.showTypeToSearch()?6:-1),o(),y(e.loading&&e.itemsList.filteredItems.length===0?7:-1)}}var qi=/[&<>"']/g,cs=RegExp(qi.source),ds={"&":"&","<":"<",">":">",'"':""","'":"'"};function us(t){return t&&cs.test(t)?t.replace(qi,s=>ds[s]):t}function A(t){return t!=null}function Ae(t){return typeof t=="object"&&A(t)}function ps(t){return t instanceof Promise}function qe(t){return t instanceof Function}var hs=(()=>{class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?us(this.ngItemLabel):this.ngItemLabel}static{this.\u0275fac=function(i){return new(i||t)(S(ae))}}static{this.\u0275dir=M({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[ye]})}}return t})(),dt=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-option-tmp",""]]})}}return t})(),ut=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-optgroup-tmp",""]]})}}return t})(),ms=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-label-tmp",""]]})}}return t})(),pt=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-multi-label-tmp",""]]})}}return t})(),fs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-header-tmp",""]]})}}return t})(),_s=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-footer-tmp",""]]})}}return t})(),gs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-notfound-tmp",""]]})}}return t})(),Cs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-placeholder-tmp",""]]})}}return t})(),bs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-typetosearch-tmp",""]]})}}return t})(),vs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-loadingtext-tmp",""]]})}}return t})(),Es=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-tag-tmp",""]]})}}return t})(),ys=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-loadingspinner-tmp",""]]})}}return t})(),Ts=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(S(E))}}static{this.\u0275dir=M({type:t,selectors:[["","ng-clearbutton-tmp",""]]})}}return t})();function Ui(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var Ss={"\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 Ge(t){let s=e=>Ss[e]||e;return t.replace(/[^\u0000-\u007E]/g,s)}var lt=class{constructor(s,e){this._ngSelect=s,this._selectionModel=e,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 s=this.selectedItems.length-1;for(;s>=0;s--){let e=this.selectedItems[s];if(!e.disabled)return e}return null}setItems(s){this._items=s.map((e,i)=>this.mapItem(e,i)),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(s){if(s.selected||this.maxItemsSelected)return;let e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(s,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(s)}unselect(s){s.selected&&(this._selectionModel.unselect(s,this._ngSelect.multiple),this._ngSelect.hideSelected&&A(s.index)&&this._ngSelect.multiple&&this._showSelected(s))}findItem(s){let e;return this._ngSelect.compareWith?e=i=>this._ngSelect.compareWith(i.value,s):this._ngSelect.bindValue?e=i=>!i.children&&this.resolveNested(i.value,this._ngSelect.bindValue)===s:e=i=>i.value===s||!i.children&&i.label&&i.label===this.resolveNested(s,this._ngSelect.bindLabel),this._items.find(i=>e(i))}addItem(s){let e=this.mapItem(s,this._items.length);return this._items.push(e),this._filteredItems.push(e),e}clearSelected(s=!1){this._selectionModel.clear(s),this._items.forEach(e=>{e.selected=s&&e.selected&&e.disabled,e.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(s){return s=Ge(s).toLocaleLowerCase(),this.filteredItems.find(e=>Ge(e.label).toLocaleLowerCase().substr(0,s.length)===s)}filter(s){if(!s){this.resetFilteredItems();return}this._filteredItems=[],s=this._ngSelect.searchFn?s:Ge(s).toLocaleLowerCase();let e=this._ngSelect.searchFn||this._defaultSearchFn,i=this._ngSelect.hideSelected;for(let n of Array.from(this._groups.keys())){let r=[];for(let a of this._groups.get(n)){if(i&&(a.parent&&a.parent.selected||a.selected))continue;let f=this._ngSelect.searchFn?a.value:a;e(s,f)&&r.push(a)}if(r.length>0){let[a]=r.slice(-1);if(a.parent){let f=this._items.find(I=>I===a.parent);this._filteredItems.push(f)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(s=>!s.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(s){this._markedIndex=this._filteredItems.indexOf(s)}markSelectedOrDefault(s){if(this._filteredItems.length===0)return;let e=this._getLastMarkedIndex();e>-1?this._markedIndex=e:this._markedIndex=s?this.filteredItems.findIndex(i=>!i.disabled):-1}resolveNested(s,e){if(!Ae(s))return s;if(e.indexOf(".")===-1)return s[e];{let i=e.split("."),n=s;for(let r=0,a=i.length;rthis.selectedItems.indexOf(e)===-1))}_showSelected(s){if(this._filteredItems.push(s),s.parent){let e=s.parent;this._filteredItems.find(n=>n===e)||this._filteredItems.push(e)}else if(s.children)for(let e of s.children)e.selected=!1,this._filteredItems.push(e);this._filteredItems=[...this._filteredItems.sort((e,i)=>e.index-i.index)]}_hideSelected(s){this._filteredItems=this._filteredItems.filter(e=>e!==s),s.parent?s.parent.children.every(i=>i.selected)&&(this._filteredItems=this._filteredItems.filter(i=>i!==s.parent)):s.children&&(this._filteredItems=this.filteredItems.filter(e=>e.parent!==s))}_defaultSearchFn(s,e){return Ge(e.label).toLocaleLowerCase().indexOf(s)>-1}_getNextItemIndex(s){return s>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(s){this._filteredItems.length===0||this._filteredItems.every(e=>e.disabled)||(this._markedIndex=this._getNextItemIndex(s),this.markedItem.disabled&&this._stepToItem(s))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let s=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&s<0?-1:Math.max(this.markedIndex,s)}_groupBy(s,e){let i=new Map;if(s.length===0)return i;if(Array.isArray(s[0].value[e])){for(let a of s){let f=(a.value[e]||[]).map((I,P)=>this.mapItem(I,P));i.set(a,f)}return i}let n=qe(this._ngSelect.groupBy),r=a=>{let f=n?e(a.value):a.value[e];return A(f)?f:void 0};for(let a of s){let f=r(a),I=i.get(f);I?I.push(a):i.set(f,[a])}return i}_flatten(s){let e=qe(this._ngSelect.groupBy),i=[];for(let n of Array.from(s.keys())){let r=i.length;if(n===void 0){let K=s.get(void 0)||[];i.push(...K.map(Y=>(Y.index=r++,Y)));continue}let a=Ae(n),f={label:a?"":String(n),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:Ui()},I=e?this._ngSelect.bindLabel:this._ngSelect.groupBy,P=this._ngSelect.groupValue||(()=>a?n.value:{[I]:n}),se=s.get(n).map(K=>(K.parent=f,K.children=void 0,K.index=r++,K));f.children=se,f.value=P(n,se.map(K=>K.value)),i.push(f),i.push(...se)}return i}},Qi=(()=>{class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,i,n){let r=this._dimensions,a=r.itemHeight*i,I=Math.max(0,e)/a*i,P=Math.min(i,Math.ceil(I)+(r.itemsPerViewport+1)),K=Math.max(0,P-r.itemsPerViewport),Y=Math.min(K,Math.floor(I)),ke=r.itemHeight*Math.ceil(Y)-r.itemHeight*Math.min(Y,n);return ke=isNaN(ke)?0:ke,Y=isNaN(Y)?-1:Y,P=isNaN(P)?-1:P,Y-=n,Y=Math.max(0,Y),P+=n,P=Math.min(i,P),{topPadding:ke,scrollHeight:a,start:Y,end:P}}setDimensions(e,i){let n=Math.max(1,Math.floor(i/e));this._dimensions={itemHeight:e,panelHeight:i,itemsPerViewport:n}}getScrollTo(e,i,n){let{panelHeight:r}=this.dimensions,a=e+i,f=n,I=f+r;return r>=a&&n===e?null:a>I?f+a-I:e<=f?e:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})(),ji=["top","right","bottom","left"],xs=typeof requestAnimationFrame<"u"?mt:ht,Wi=(()=>{class t{constructor(e,i,n,r,a){this._renderer=e,this._zone=i,this._panelService=n,this._document=a,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new D,this.scroll=new D,this.scrollToEnd=new D,this.outsideClick=new D,this._destroy$=new re,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=r.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:i}=this._panelService.dimensions,n=this.markedItem.index*e;return i>n?0:n}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 i=e.items;this._onItemsChange(i.currentValue,i.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,i=!1){if(!e)return;let n=this.items.indexOf(e);if(n<0||n>=this.itemsLength)return;let r;if(this.virtualScroll){let a=this._panelService.dimensions.itemHeight;r=this._panelService.getScrollTo(n*a,a,this._lastScrollPosition)}else{let a=this._dropdown.querySelector(`#${e.htmlId}`),f=i?a.offsetTop:this._lastScrollPosition;r=this._panelService.getScrollTo(a.offsetTop,a.clientHeight,f)}A(r)&&(this._scrollablePanel.scrollTop=r)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),ji.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){ji.forEach(n=>{let r=`ng-select-${n}`;this._renderer.removeClass(this._dropdown,r),this._renderer.removeClass(this._select,r)});let i=`ng-select-${e}`;this._renderer.addClass(this._dropdown,i),this._renderer.addClass(this._select,i)}_handleScroll(){this._zone.runOutsideAngular(()=>{ve(this.scrollElementRef.nativeElement,"scroll").pipe(V(this._destroy$),_t(0,xs)).subscribe(e=>{let i=e.path||e.composedPath&&e.composedPath();if(!i||i.length===0&&!e.target)return;let n=!i||i.length===0?e.target.scrollTop:i[0].scrollTop;this._onContentScrolled(n)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Le(ve(this._document,"touchstart",{capture:!0}),ve(this._document,"click",{capture:!0})).pipe(V(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let i=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&i&&i[0]&&this._select.contains(i[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,i){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let i=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,i),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 i=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(i.scrollHeight),this._contentPanel.style.transform=`translateY(${i.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(i.start,i.end)),this.scroll.emit({start:i.start,end:i.end})}),A(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 n=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${n*this.itemsLength}px`;let r=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(n,r),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let i=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=i.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let i=this._select.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop,r=i.top+window.pageYOffset,a=i.height,f=e.getBoundingClientRect().height;return r+a+f>n+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(),i=this._parent.getBoundingClientRect(),n=e.left-i.left;this._dropdown.style.left=n+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),n=e.height;if(this._currentPosition==="top"){let r=i.bottom-e.bottom;this._dropdown.style.bottom=r+n+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let r=e.top-i.top;this._dropdown.style.top=r+n+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{ve(this._dropdown,"mousedown").pipe(V(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}static{this.\u0275fac=function(i){return new(i||t)(S(It),S(xt),S(Qi),S(ae),S(Pt,8))}}static{this.\u0275cmp=j({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,n){if(i&1&&(_e(yn,7,ae),_e(Tn,7,ae),_e(Sn,7,ae)),i&2){let r;F(r=k())&&(n.contentElementRef=r.first),F(r=k())&&(n.scrollElementRef=r.first),F(r=k())&&(n.paddingElementRef=r.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",L],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Pe,ye],ngContentSelectors:Gi,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(i,n){i&1&&(Ke(),g(0,xn,2,4,"div",3),l(1,"div",4,0),B(3,"div",null,1),l(5,"div",null,2),Ye(7),c()(),g(8,In,2,4,"div",5)),i&2&&(y(n.headerTemplate?0:-1),o(3),W("total-padding",n.virtualScroll),o(2),W("scrollable-content",n.virtualScroll&&n.items.length),o(3),y(n.footerTemplate?8:-1))},dependencies:[Je],encapsulation:2,changeDetection:0})}}return t})(),Is=(()=>{class t{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new re}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()}static{this.\u0275fac=function(i){return new(i||t)(S(ae))}}static{this.\u0275cmp=j({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",L]},features:[Pe,ye],ngContentSelectors:Gi,decls:1,vars:0,template:function(i,n){i&1&&(Ke(),Ye(0))},encapsulation:2,changeDetection:0})}}return t})(),ne=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Esc=27]="Esc",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.Backspace=8]="Backspace",t}(ne||{});function zi(){return new ct}var ct=class{constructor(){this._selected=[]}get value(){return this._selected}select(s,e,i){if(s.selected=!0,(!s.children||!e&&i)&&this._selected.push(s),e)if(s.parent){let n=s.parent.children.length,r=s.parent.children.filter(a=>a.selected).length;s.parent.selected=n===r}else s.children&&(this._setChildrenSelectedState(s.children,!0),this._removeChildren(s),i&&this._activeChildren(s)?this._selected=[...this._selected.filter(n=>n.parent!==s),s]:this._selected=[...this._selected,...s.children.filter(n=>!n.disabled)])}unselect(s,e){if(this._selected=this._selected.filter(i=>i!==s),s.selected=!1,e)if(s.parent&&s.parent.selected){let i=s.parent.children;this._removeParent(s.parent),this._removeChildren(s.parent),this._selected.push(...i.filter(n=>n!==s&&!n.disabled)),s.parent.selected=!1}else s.children&&(this._setChildrenSelectedState(s.children,!1),this._removeChildren(s))}clear(s){this._selected=s?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(s,e){for(let i of s)i.disabled||(i.selected=e)}_removeChildren(s){this._selected=[...this._selected.filter(e=>e.parent!==s),...s.children.filter(e=>e.parent===s&&e.disabled&&e.selected)]}_removeParent(s){this._selected=this._selected.filter(e=>e!==s)}_activeChildren(s){return s.children.every(e=>!e.disabled||e.selected)}},ws=(()=>{class t{constructor(){this.fixedPlaceholder=!0,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"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),As=(()=>{class t{warn(e){console.warn(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Ki=new Tt("ng-select-selection-model"),Yi=(()=>{class t{constructor(e,i,n,r,a,f,I){this.classes=e,this.autoFocus=i,this.config=n,this._cd=f,this._console=I,this.ariaLabelDropdown="Options List",this.markFirst=!0,this.fixedPlaceholder=!0,this.preventToggleOnRightClick=!1,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.ngClass=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new D,this.focusEvent=new D,this.changeEvent=new D,this.openEvent=new D,this.closeEvent=new D,this.searchEvent=new D,this.clearEvent=new D,this.addEvent=new D,this.removeEvent=new D,this.scroll=new D,this.scrollToEnd=new D,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Ui(),this.escapeHTML=!0,this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new re,this._keyPress$=new re,this._items=[],this.keyDownFn=P=>!0,this.clearItem=P=>{let se=this.selectedItems.find(K=>K.value===P);this.unselect(se)},this.trackByOption=(P,se)=>this.trackByFn?this.trackByFn(se.value):se,this._onChange=P=>{},this._onTouched=()=>{},this._mergeGlobalConfig(n),this.itemsList=new lt(this,r?r():zi()),this.element=a.nativeElement}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get disabled(){return this.readonly||this._disabled}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!qe(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return A(this._clearSearchOnAdd)?this._clearSearchOnAdd:A(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return A(this._deselectOnClick)?this._deselectOnClick:A(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}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}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(i=>i.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(i=>i.label.toLowerCase()===e))&&!this.loading}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}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}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=A(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),A(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 i=e.target;this.clearButton&&this.clearButton.nativeElement===i?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){if(this.preventToggleOnRightClick&&e.button===2)return!1;let i=e.target;if(i.tagName!=="INPUT"&&e.preventDefault(),i.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(i.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}i.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())}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(),this._onSelectionChanged()}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),this._onSelectionChanged())}selectTag(){let e;qe(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let i=n=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(n,null):this.itemsList.addItem(n);ps(e)?e.then(n=>this.select(i(n))).catch(()=>{}):e&&this.select(i(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}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(i=>i.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 i=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=A(i)?!Ae(i):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&A(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=n=>{this.items=n.map(r=>({$ngOptionValue:r.value,$ngOptionLabel:r.elementRef.nativeElement.innerHTML,disabled:r.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},i=()=>{let n=Le(this.ngOptions.changes,this._destroy$);Le(...this.ngOptions.map(r=>r.stateChange$)).pipe(V(n)).subscribe(r=>{let a=this.itemsList.findItem(r.value);a.disabled=r.disabled,a.label=r.label||a.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(bt(this.ngOptions),V(this._destroy$)).subscribe(n=>{this.bindLabel=this._defaultLabel,e(n),i()})}_isValidWriteValue(e){if(!A(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let i=n=>!A(this.compareWith)&&Ae(n)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(n)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(n=>i(n)):(this._console.warn("Multiple select ngModel should be array."),!1):i(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let i=n=>{let r=this.itemsList.findItem(n);if(r)this.itemsList.select(r);else{let a=Ae(n),f=!a&&!this.bindValue;a||f?this.itemsList.select(this.itemsList.mapItem(n,null)):this.bindValue&&(r={[this.bindLabel]:null,[this.bindValue]:n},this.itemsList.select(this.itemsList.mapItem(r,null)))}};this.multiple?e.forEach(n=>i(n)):i(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(V(this._destroy$),vt(e=>this._pressedKeys.push(e)),gt(200),Oe(()=>this._pressedKeys.length>0),T(()=>this._pressedKeys.join(""))).subscribe(e=>{let i=this.itemsList.findByLabel(e);i&&(this.isOpen?(this.itemsList.markItem(i),this._scrollToMarked(),this._cd.markForCheck()):this.select(i)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,i=ge({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let n of Object.keys(i))e.setAttribute(n,i[n])}_updateNgModel(){let e=[];for(let n of this.selectedItems)if(this.bindValue){let r=null;if(n.children){let a=this.groupValue?this.bindValue:this.groupBy;r=n.value[a||this.groupBy]}else r=this.itemsList.resolveNested(n.value,this.bindValue);e.push(r)}else e.push(n.value);let i=this.selectedItems.map(n=>n.value);this.multiple?(this._onChange(e),this.changeEvent.emit(i)):(this._onChange(A(e[0])?e[0]:null),this.changeEvent.emit(i[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 i=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(i<0||i===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.fixedPlaceholder=this.fixedPlaceholder||e.fixedPlaceholder,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=A(this.virtualScroll)?this.virtualScroll:A(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=A(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}static{this.\u0275fac=function(i){return new(i||t)(Qe("class"),Qe("autofocus"),S(ws),S(Ki,8),S(ae),S(Ot),S(As))}}static{this.\u0275cmp=j({type:t,selectors:[["ng-select"]],contentQueries:function(i,n,r){if(i&1&&(H(r,dt,5,E),H(r,ut,5,E),H(r,ms,5,E),H(r,pt,5,E),H(r,fs,5,E),H(r,_s,5,E),H(r,gs,5,E),H(r,Cs,5,E),H(r,bs,5,E),H(r,vs,5,E),H(r,Es,5,E),H(r,ys,5,E),H(r,Ts,5,E),H(r,Is,5)),i&2){let a;F(a=k())&&(n.optionTemplate=a.first),F(a=k())&&(n.optgroupTemplate=a.first),F(a=k())&&(n.labelTemplate=a.first),F(a=k())&&(n.multiLabelTemplate=a.first),F(a=k())&&(n.headerTemplate=a.first),F(a=k())&&(n.footerTemplate=a.first),F(a=k())&&(n.notFoundTemplate=a.first),F(a=k())&&(n.placeholderTemplate=a.first),F(a=k())&&(n.typeToSearchTemplate=a.first),F(a=k())&&(n.loadingTextTemplate=a.first),F(a=k())&&(n.tagTemplate=a.first),F(a=k())&&(n.loadingSpinnerTemplate=a.first),F(a=k())&&(n.clearButtonTemplate=a.first),F(a=k())&&(n.ngOptions=a)}},viewQuery:function(i,n){if(i&1&&(_e(Wi,5),_e(wn,7),_e(An,5)),i&2){let r;F(r=k())&&(n.dropdownPanel=r.first),F(r=k())&&(n.searchInput=r.first),F(r=k())&&(n.clearButton=r.first)}},hostVars:20,hostBindings:function(i,n){i&1&&w("keydown",function(a){return n.handleKeyDown(a)}),i&2&&W("ng-select-typeahead",n.typeahead)("ng-select-multiple",n.multiple)("ng-select-taggable",n.addTag)("ng-select-searchable",n.searchable)("ng-select-clearable",n.clearable)("ng-select-opened",n.isOpen)("ng-select",n.useDefaultClass)("ng-select-filtered",n.filtered)("ng-select-single",n.single)("ng-select-disabled",n.disabled)},inputs:{ariaLabelDropdown:"ariaLabelDropdown",bindLabel:"bindLabel",bindValue:"bindValue",ariaLabel:"ariaLabel",markFirst:[2,"markFirst","markFirst",L],placeholder:"placeholder",fixedPlaceholder:"fixedPlaceholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",preventToggleOnRightClick:"preventToggleOnRightClick",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",L],closeOnSelect:[2,"closeOnSelect","closeOnSelect",L],hideSelected:[2,"hideSelected","hideSelected",L],selectOnTab:[2,"selectOnTab","selectOnTab",L],openOnEnter:[2,"openOnEnter","openOnEnter",L],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",Se],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",Se],virtualScroll:[2,"virtualScroll","virtualScroll",L],selectableGroup:[2,"selectableGroup","selectableGroup",L],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",L],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",L],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",Se],readonly:[2,"readonly","readonly",L],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",L],minTermLength:[2,"minTermLength","minTermLength",Se],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",L],ngClass:"ngClass",typeahead:"typeahead",multiple:[2,"multiple","multiple",L],addTag:"addTag",searchable:[2,"searchable","searchable",L],clearable:[2,"clearable","clearable",L],isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick",keyDownFn:"keyDownFn"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[pe([{provide:Gt,useExisting:Et(()=>t),multi:!0},Qi]),Pe,ye],decls:13,vars:19,consts:[["searchInput",""],["defaultPlaceholderTemplate",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-input"],["aria-autocomplete","list","role","combobox",3,"blur","change","compositionend","compositionstart","focus","input","disabled","readOnly","value"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[3,"ngTemplateOutlet"],[1,"ng-placeholder"],[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"],[1,"ng-spinner-loader"],["role","button","tabindex","0",1,"ng-clear-wrapper",3,"title"],["aria-hidden","true",1,"ng-clear"],["role","listbox",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(i,n){if(i&1){let r=N();l(0,"div",10),w("mousedown",function(f){return b(r),v(n.handleMousedown(f))}),l(1,"div",11),g(2,On,3,1)(3,Mn,2,0)(4,$n,1,5,null,12),l(5,"div",13)(6,"input",14,0),w("blur",function(f){return b(r),v(n.onInputBlur(f))})("change",function(f){return b(r),v(f.stopPropagation())})("compositionend",function(){b(r);let f=G(7);return v(n.onCompositionEnd(f.value))})("compositionstart",function(){return b(r),v(n.onCompositionStart())})("focus",function(f){return b(r),v(n.onInputFocus(f))})("input",function(){b(r);let f=G(7);return v(n.filter(f.value))}),c()()(),g(8,Wn,3,1)(9,Un,2,1),l(10,"span",15),B(11,"span",16),c()(),g(12,ls,8,18,"ng-dropdown-panel",17)}i&2&&(W("ng-appearance-outline",n.appearance==="outline")("ng-has-value",n.hasValue),o(2),y(n.selectedItems.length===0&&!n.searchTerm||n.fixedPlaceholder===!0?2:-1),o(),y((!n.multiLabelTemplate||!n.multiple)&&n.selectedItems.length>0?3:-1),o(),y(n.multiple&&n.multiLabelTemplate&&n.selectedValues.length>0?4:-1),o(2),m("disabled",n.disabled)("readOnly",!n.searchable||n.itemsList.maxItemsSelected)("value",n.searchTerm?n.searchTerm:""),J("aria-activedescendant",n.isOpen?n.itemsList==null||n.itemsList.markedItem==null?null:n.itemsList.markedItem.htmlId:null)("aria-controls",n.isOpen?n.dropdownId:null)("aria-expanded",n.isOpen)("aria-label",n.ariaLabel)("id",n.labelForId)("tabindex",n.tabIndex),o(2),y(n.loading?8:-1),o(),y(n.showClear()?9:-1),o(3),y(n.isOpen?12:-1))},dependencies:[Je,hs,Wi,Vt],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:unset;user-select:unset;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})}}return t})(),Zi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=wt({type:t})}static{this.\u0275inj=yt({providers:[{provide:Ki,useValue:zi}]})}}return t})();var ks=(t,s)=>s.Key;function Ds(t,s){if(t&1){let e=N();l(0,"div",4),p(1),l(2,"span",5),w("click",function(){let n=b(e).$implicit,r=h().clear;return v(r(n))}),p(3,"\xD7"),c()()}if(t&2){let e=s.$implicit;o(),C(" ",e.Value," ")}}function Bs(t,s){if(t&1&&R(0,Ds,4,1,"div",4,ks),t&2){let e=s.items;$(e)}}function Ls(t,s){if(t&1&&(B(0,"input",6),p(1)),t&2){let e=s.item,i=s.item$,n=s.index;Ze("id","item-",n,""),m("ngModel",i.selected),o(),C(" ",e.Group," ")}}function Os(t,s){if(t&1&&(B(0,"input",6),p(1)),t&2){let e=s.item,i=s.item$,n=s.index;Ze("id","item-",n,""),m("ngModel",i.selected),o(),C(" ",e.Value," ")}}var Ji=(()=>{class t{constructor(){this.options=[],this.values=[],this.valuesChange=new D}itemsChanged(){this.valuesChange.emit(this.values)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=j({type:t,selectors:[["bkd-multiselect"]],inputs:{options:"options",values:"values"},outputs:{valuesChange:"valuesChange"},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",""],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"],["type","checkbox",3,"id","ngModel"]],template:function(i,n){i&1&&(l(0,"ng-select",0),d(1,"translate"),Q("ngModelChange",function(a){return U(n.values,a)||(n.values=a),a}),w("click",function(){return n.itemsChanged()})("clear",function(){return n.itemsChanged()}),g(2,Bs,2,0,"ng-template",1)(3,Ls,2,4,"ng-template",2)(4,Os,2,4,"ng-template",3),c()),i&2&&(fe("placeholder",u(1,8,"shared.select.empty-option")),m("items",n.options)("multiple",!0)("selectableGroup",!0)("selectableGroupAsModel",!1)("closeOnSelect",!1),q("ngModel",n.values),m("clearable",!0))},dependencies:[Zi,Yi,ut,dt,pt,Re,qt,Me,zt,me],encapsulation:2})}}return t})();var Xi=Wt({HRef:Xe,Id:et,TeacherId:et,FullName:Xe});var en=(()=>{class t extends vi{constructor(){let e=_(Rt),i=_(he);super(e,i,Xi,"TeacherResources","FullName","FullName")}getTypeaheadItemByKey(e){return this.http.get(`${this.baseUrl}/`,{params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${e}*`}}).pipe(Ee(ci(this.typeaheadCodec)),Ee(i=>ft({Key:i[0].FullName,Value:`${i[0].FullName}`})))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var nn=(()=>{class t{constructor(){this.studentsService=_(Ei),this.educationalEventsService=_(Vi),this.studyClassService=_(Ii),this.teacherResourcesService=_(en),this.state=_(ie),this.translate=_($e),this.filter={student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null},this.filterChange=new D,this.weekdaysGrouped$=this.state.weekdays$.pipe(T(e=>Ie(e,this.translate.instant("shared.multiselect.all-option")))),this.absenceConfirmationStatesGrouped$=this.state.absenceConfirmationStates$.pipe(T(e=>Ie(e,this.translate.instant("shared.multiselect.all-option")))),this.presenceTypesGrouped$=this.state.presenceTypes$.pipe(T(e=>e.filter(we(mi)).filter(we(rt))),T(it),T(nt),T(e=>Ie(e,this.translate.instant("shared.multiselect.all-option")))),this.incidentTypesGrouped$=this.state.presenceTypes$.pipe(T(e=>e.filter(rt)),T(it),T(nt),T(e=>Ie(e,this.translate.instant("shared.multiselect.all-option")))),this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(De(ge({},this.filter),{dateFrom:tn(this.filter.dateFrom),dateTo:tn(this.filter.dateTo)}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[pe([{provide:si,useClass:ai},{provide:ri,useClass:Fi}])],decls:60,vars:60,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"],[3,"valuesChange","options","values"],[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div",1)(2,"label",2),p(3),d(4,"translate"),c(),l(5,"bkd-typeahead",3),Q("valueChange",function(a){return U(n.filter.student,a)||(n.filter.student=a),a}),c()(),l(6,"div",1)(7,"label",2),p(8),d(9,"translate"),c(),l(10,"bkd-typeahead",3),Q("valueChange",function(a){return U(n.filter.educationalEvent,a)||(n.filter.educationalEvent=a),a}),c()(),l(11,"div",1)(12,"label",2),p(13),d(14,"translate"),c(),l(15,"bkd-typeahead",4),Q("valueChange",function(a){return U(n.filter.studyClass,a)||(n.filter.studyClass=a),a}),c()(),l(16,"div",1)(17,"label",2),p(18),d(19,"translate"),c(),l(20,"bkd-typeahead",3),Q("valueChange",function(a){return U(n.filter.teacher,a)||(n.filter.teacher=a),a}),c()(),l(21,"div",1)(22,"label",2),p(23),d(24,"translate"),c(),l(25,"bkd-date-select",5),Q("valueChange",function(a){return U(n.filter.dateFrom,a)||(n.filter.dateFrom=a),a}),c()(),l(26,"div",1)(27,"label",2),p(28),d(29,"translate"),c(),l(30,"bkd-date-select",5),Q("valueChange",function(a){return U(n.filter.dateTo,a)||(n.filter.dateTo=a),a}),c()(),l(31,"div",1)(32,"label",2),p(33),d(34,"translate"),c(),l(35,"bkd-multiselect",6),d(36,"async"),Q("valuesChange",function(a){return U(n.filter.weekdays,a)||(n.filter.weekdays=a),a}),c()()(),l(37,"div",7)(38,"div",8)(39,"label",2),p(40),d(41,"translate"),c(),l(42,"bkd-multiselect",6),d(43,"async"),Q("valuesChange",function(a){return U(n.filter.confirmationStates,a)||(n.filter.confirmationStates=a),a}),c()(),l(44,"div",8)(45,"label",2),p(46),d(47,"translate"),c(),l(48,"bkd-multiselect",6),d(49,"async"),Q("valuesChange",function(a){return U(n.filter.presenceTypes,a)||(n.filter.presenceTypes=a),a}),c()(),l(50,"div",8)(51,"label",2),p(52),d(53,"translate"),c(),l(54,"bkd-multiselect",6),d(55,"async"),Q("valuesChange",function(a){return U(n.filter.incidentTypes,a)||(n.filter.incidentTypes=a),a}),c()(),l(56,"div",9)(57,"button",10),w("click",function(){return n.show()}),p(58),d(59,"translate"),c()()()),i&2&&(o(3),x(u(4,30,"edit-absences.header.student")),o(2),m("typeaheadService",n.studentsService),q("value",n.filter.student),o(3),x(u(9,32,"edit-absences.header.module-instance")),o(2),m("typeaheadService",n.educationalEventsService),q("value",n.filter.educationalEvent),o(3),x(u(14,34,"edit-absences.header.study-class")),o(2),m("typeaheadService",n.studyClassService),q("value",n.filter.studyClass),m("additionalHttpParams",n.classesHttpFilter),o(3),x(u(19,36,"edit-absences.header.teacher")),o(2),m("typeaheadService",n.teacherResourcesService),q("value",n.filter.teacher),o(3),x(u(24,38,"edit-absences.header.date-from")),o(2),q("value",n.filter.dateFrom),o(3),x(u(29,40,"edit-absences.header.date-to")),o(2),q("value",n.filter.dateTo),o(3),x(u(34,42,"edit-absences.header.weekdays")),o(2),m("options",u(36,44,n.weekdaysGrouped$)),q("values",n.filter.weekdays),o(5),x(u(41,46,"edit-absences.header.confirmation-state")),o(2),m("options",u(43,48,n.absenceConfirmationStatesGrouped$)),q("values",n.filter.confirmationStates),o(4),x(u(47,50,"edit-absences.header.presence-type")),o(2),m("options",u(49,52,n.presenceTypesGrouped$)),q("values",n.filter.presenceTypes),o(4),x(u(53,54,"edit-absences.header.incident")),o(2),m("options",u(55,56,n.incidentTypesGrouped$)),q("values",n.filter.incidentTypes),o(4),C(" ",u(59,58,"edit-absences.header.show")," "))},dependencies:[Di,Ni,Ji,be,me],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return t})();function tn(t){return t?hi(t):null}var Ps=(t,s)=>s.id,Ns=()=>[],sn=t=>({count:t}),rn=t=>({returnparams:t}),Vs=t=>["student",t,"absences"];function Ms(t,s){t&1&&B(0,"bkd-spinner")}function Rs(t,s){if(t&1&&(l(0,"div",5)(1,"div",9),p(2),d(3,"async"),d(4,"translate"),d(5,"translate"),c(),l(6,"a",10),d(7,"async"),l(8,"i",11),p(9,"edit"),c()()()),t&2){let e=h(4),i=z(0);o(2),Ce(" ",te(4,7,"edit-absences.list.total",X(15,sn,u(3,5,e.state.total$)||0)),", ",te(5,10,"edit-absences.list.selected",X(17,sn,i.length))," "),o(4),W("disabled",i.length===0),m("queryParams",X(19,rn,u(7,13,e.state.queryParamsString$)))}}function $s(t,s){if(t&1){let e=N();l(0,"tr")(1,"td",14),w("click",function(n){b(e);let r=G(3),a=h(5);return v(a.onCheckboxCellClick(n,r))}),l(2,"input",12,0),d(4,"async"),w("change",function(){let n=b(e).$implicit,r=h(5);return v(r.selectionService.toggle(n.lessonPresence))}),c()(),l(5,"td",13),d(6,"translate"),l(7,"span",15)(8,"i",11),p(9),c()()(),l(10,"td"),d(11,"translate"),l(12,"a",16),d(13,"async"),p(14),c(),B(15,"br"),p(16),c(),l(17,"td"),d(18,"translate"),p(19),d(20,"date"),c(),l(21,"td"),d(22,"translate"),p(23),d(24,"date"),d(25,"date"),c(),l(26,"td"),d(27,"translate"),p(28),c(),l(29,"td",17),d(30,"translate"),p(31),c(),l(32,"td"),d(33,"translate"),p(34),c()()}if(t&2){let e=s.$implicit,i=h(5);o(2),m("checked",u(4,21,i.selectionService.isSelected$(e.lessonPresence))),o(3),J("data-label",u(6,23,"edit-absences.list.header.presence")),o(2),m("className",e.presenceCategory),o(2),x(e.presenceCategoryIcon),o(),J("data-label",u(11,25,"edit-absences.list.header.mobil-student-module-instance-study-class")),o(2),m("routerLink",X(48,Vs,e.lessonPresence.StudentRef.Id))("queryParams",X(50,rn,u(13,27,i.profileReturnParams$))),o(2),C(" ",e.lessonPresence.StudentFullName," "),o(2),Ce(" ",e.lessonPresence.EventDesignation,", ",e.lessonPresence.StudyClassNumber," "),o(),J("data-label",u(18,29,"edit-absences.list.header.date")),o(2),C(" ",te(20,31,e.lessonPresence.LessonDateTimeFrom,"mediumDate")," "),o(2),J("data-label",u(22,34,"edit-absences.list.header.time")),o(2),Ce(" ",te(24,36,e.lessonPresence.LessonDateTimeFrom,"shortTime"),"\u2013",te(25,39,e.lessonPresence.LessonDateTimeTo,"shortTime")," "),o(3),J("data-label",u(27,42,"edit-absences.list.header.confirmation-state")),o(2),C(" ",e.confirmationState==null?null:e.confirmationState.Value," "),o(),J("data-label",u(30,44,"edit-absences.list.header.mobil-presence-type-incident")),o(2),C(" ",e.presenceType==null?null:e.presenceType.Designation," "),o(),J("data-label",u(33,46,"edit-absences.list.header.teacher")),o(2),C(" ",e.lessonPresence.TeacherInformation," ")}}function Hs(t,s){if(t&1){let e=N();l(0,"table",6)(1,"thead")(2,"tr")(3,"th")(4,"input",12),w("change",function(n){b(e);let r=h(4);return v(r.toggleAll(n.currentTarget==null?null:n.currentTarget.checked))}),c()(),l(5,"th",13),p(6),d(7,"translate"),c(),l(8,"th"),p(9),d(10,"translate"),B(11,"br"),p(12),d(13,"translate"),d(14,"translate"),c(),l(15,"th"),p(16),d(17,"translate"),c(),l(18,"th"),p(19),d(20,"translate"),c(),l(21,"th"),p(22),d(23,"translate"),c(),l(24,"th"),p(25),d(26,"translate"),d(27,"translate"),c(),l(28,"th"),p(29),d(30,"translate"),c()()(),l(31,"tbody"),R(32,$s,35,52,"tr",null,Ps),c()()}if(t&2){h(4);let e=z(0),i=z(2);o(4),m("checked",e.length===i.length),o(2),C(" ",u(7,11,"edit-absences.list.header.presence")," "),o(3),C(" ",u(10,13,"edit-absences.list.header.student")," "),o(3),Ce(" ",u(13,15,"edit-absences.list.header.module-instance"),", ",u(14,17,"edit-absences.list.header.study-class")," "),o(4),C(" ",u(17,19,"edit-absences.list.header.date")," "),o(3),x(u(20,21,"edit-absences.list.header.time")),o(3),C(" ",u(23,23,"edit-absences.list.header.confirmation-state")," "),o(3),Ce(" ",u(26,25,"edit-absences.list.header.presence-type")," / ",u(27,27,"edit-absences.list.header.incident")," "),o(4),x(u(30,29,"edit-absences.list.header.teacher")),o(3),$(i)}}function js(t,s){t&1&&B(0,"bkd-spinner",7)}function Ws(t,s){if(t&1){let e=N();l(0,"button",18),w("click",function(){b(e);let n=h(4);return v(n.state.nextPage())}),p(1),d(2,"translate"),c()}t&2&&(o(),C(" ",u(2,1,"global.pagination.load-more")," "))}function Gs(t,s){if(t&1){let e=N();l(0,"div",4),w("scrolled",function(){b(e);let n=h(3);return v(n.onScroll())}),g(1,Rs,10,21,"div",5)(2,Hs,34,31,"table",6)(3,js,1,0,"bkd-spinner",7)(4,Ws,3,3,"button",8),c()}if(t&2){h(3);let e=z(2),i=z(4),n=z(6);o(),y(e&&e.length>0?1:-1),o(),y(e&&e.length>0?2:-1),o(),y(n?3:-1),o(),y(i&&!n?4:-1)}}function qs(t,s){t&1&&(l(0,"p",2),p(1),d(2,"translate"),c()),t&2&&(o(),x(u(2,1,"edit-absences.no-entries")))}function Us(t,s){if(t&1&&g(0,Gs,5,4,"div",3)(1,qs,3,3,"p",2),t&2){h(2);let e=z(2),i=z(6);y(e&&e.length>0||i?0:1)}}function Qs(t,s){if(t&1&&(g(0,Ms,1,0,"bkd-spinner"),d(1,"async"),g(2,Us,2,1)),t&2){let e=h();y(u(1,1,e.state.loading$)?0:2)}}function zs(t,s){t&1&&(l(0,"p",2),p(1),d(2,"translate"),c()),t&2&&(o(),x(u(2,1,"edit-absences.no-filter")))}var an=(()=>{class t{constructor(){this.state=_(ie),this.selectionService=_(ot),this.scrollPosition=_(Li),this.route=_(Ve),this.filterFromParams$=this.route.queryParams.pipe(T(Ks)),this.profileReturnParams$=this.state.queryParamsString$,this.destroy$=new re}ngOnInit(){this.filterFromParams$.pipe(ee(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(V(this.destroy$)).subscribe(()=>this.selectionService.clear()),this.selectionService.selection$.pipe(V(this.destroy$)).subscribe(e=>this.state.selected=e),this.route.queryParams.pipe(ee(1),T(({reload:e})=>e),Oe(pi)).subscribe(()=>this.state.resetEntries())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){this.state.entries$.pipe(ee(1)).subscribe(i=>this.selectionService.clear(e?i:null))}onCheckboxCellClick(e,i){e.target!==i&&i.click()}onScroll(){this.state.nextPage()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-list"]],features:[pe([ot])],decls:16,vars:22,consts:[["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],["infiniteScroll","",1,"py-3"],["infiniteScroll","",1,"py-3",3,"scrolled"],[1,"d-flex","align-items-center","justify-content-between"],[1,"table","table-striped"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],[1,"total"],["routerLink","/edit-absences/edit",1,"edit","btn","btn-primary","btn-icon","mt-1","mb-2",3,"queryParams"],[1,"material-icons"],["type","checkbox",3,"change","checked"],[1,"presence-category"],[1,"edit-absences-checkbox",3,"click"],[3,"className"],[1,"student",3,"routerLink","queryParams"],[1,"designation-incident"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let r=N();oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),oe(6),d(7,"async"),l(8,"h1"),p(9),d(10,"translate"),c(),l(11,"bkd-edit-absences-header",1),d(12,"async"),w("filterChange",function(f){return b(r),v(n.state.setFilter(f))}),c(),g(13,Qs,3,3),d(14,"async"),g(15,zs,3,3,"p",2)}if(i&2){let r;le((r=u(1,3,n.selectionService.selection$))!==null&&r!==void 0?r:kt(21,Ns)),o(2),le(u(3,6,n.state.presenceControlEntries$)),o(2),le(u(5,9,n.state.hasMore$)),o(2),le(u(7,12,n.state.loadingPage$)),o(3),x(u(10,15,"edit-absences.title")),o(2),m("filter",u(12,17,n.filterFromParams$)),o(2),y(u(14,19,n.state.isFilterValid$)?13:15)}},dependencies:[nn,Pi,jt,Si,be,Mt,me],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})}}return t})();function Ks(t){return{student:t.student?Number(t.student):null,educationalEvent:t.educationalEvent?Number(t.educationalEvent):null,studyClass:t.studyClass?Number(t.studyClass):null,teacher:t.teacher??null,dateFrom:t.dateFrom?tt(t.dateFrom):null,dateTo:t.dateTo?tt(t.dateTo):null,weekdays:t.weekdays?t.weekdays.split(","):null,presenceTypes:t.presenceTypes?t.presenceTypes.split(",").map(Number):null,confirmationStates:t.confirmationStates?t.confirmationStates.split(",").map(Number):null,incidentTypes:t.incidentTypes?t.incidentTypes.split(",").map(Number):null}}var on=(()=>{class t{constructor(){this.state=_(ie)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences"]],features:[pe([ie,{provide:gi,useExisting:ie},_i])],decls:1,vars:0,template:function(i,n){i&1&&B(0,"router-outlet")},dependencies:[$t],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Bo=[{path:"",component:on,children:[{path:"",component:an,data:{restoreScrollPositionFrom:["/edit-absences/edit","/edit-absences/student/:id/addresses","/edit-absences/student/:id/absences","/edit-absences/student/:id/grades"]}},{path:"edit",component:Hi},xi]}];export{Bo as EDIT_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-66LIMDSV.js b/public/apps/webapp-schulverwaltung/chunk-66LIMDSV.js new file mode 100644 index 00000000..e74ff348 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-66LIMDSV.js @@ -0,0 +1,2 @@ +import{b as Me}from"./chunk-QB4CDTWV.js";import{b as Se}from"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import{h as _e}from"./chunk-HQSONWXM.js";import{a as be}from"./chunk-F4XODHS2.js";import{$ as m,$a as M,Bb as Z,Cb as ee,Cc as se,Db as te,Eb as L,Ed as he,Fb as A,Fd as F,Gb as j,Gd as fe,H as q,Hb as ie,Ia as u,J as G,M as D,N as z,Nb as c,Nd as ge,Ob as d,P as N,Pa as y,Pd as ye,R as w,Ra as S,Rd as ve,Sa as h,Sd as O,Ta as B,Tb as ne,U as R,Ud as Ce,W as H,X as Y,Xa as b,Za as Q,_a as _,a as E,ab as a,b as P,bb as s,cb as g,f as U,g as K,gc as oe,hd as ae,ib as X,id as re,jb as x,jd as le,l as I,ma as J,n as C,nd as $,od as pe,rd as ce,sd as de,vb as f,w as W,wb as v,wd as me,xb as T,xd as ue,ya as o}from"./chunk-NEW5VGRB.js";var xe=(()=>{class t{constructor(){this.settings=m(ae),this.storage=m(Ce),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 ge(this.settings.notificationTypesAssignments.reduce((e,{roles:i,types:n})=>this.hasAnyRole(i)?[...e,...n]:e,[]))}hasAnyRole(e){return this.currentRoles===null&&(this.currentRoles=Se(this.storage.getPayload()?.roles)),this.currentRoles.some(i=>e.includes(i))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Te=(()=>{class t{constructor(){this.id=null,this.label=null,this.disabled=!1,this.value=!1,this.valueChange=new J,this.fallbackId=ye("bkd-switch")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-switch"]],inputs:{id:"id",label:"label",disabled:"disabled",value:"value"},outputs:{valueChange:"valueChange"},decls:3,vars:5,consts:[["type","checkbox",3,"ngModelChange","disabled","ngModel"]],template:function(i,n){if(i&1&&(a(0,"input",0),X("ngModelChange",function(p){return n.valueChange.emit(p)}),s(),a(1,"label"),f(2),s()),i&2){let r,p;h("disabled",n.disabled)("ngModel",n.value),S("id",(r=n.id)!==null&&r!==void 0?r:n.fallbackId),o(),S("for",(p=n.id)!==null&&p!==void 0?p:n.fallbackId),o(),v(n.label)}},dependencies:[F,le,$,ce],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})}}return t})();function Ee(t,l){if(t&1&&(a(0,"div"),f(1),s()),t&2){let e=l.$implicit;o(),T(" ",e," ")}}function Pe(t,l){if(t&1&&(a(0,"div",3),_(1,Ee,2,1,"div",null,Q),s()),t&2){let e=x();o(),M(e.descriptionLines)}}var ke=(()=>{class t{constructor(){this.cd=m(ne),this.id="",this.label="",this.description=null,this.disabled=!1,this.onChange=e=>{},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()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-notifications-toggle"]],inputs:{id:"id",label:"label",description:"description",disabled:"disabled"},features:[ie([{provide:re,useExisting:H(()=>t),multi:!0}])],decls:5,vars:6,consts:[[1,"d-flex","align-items-center"],[1,"flex-fill"],[3,"valueChange","id","value","disabled"],[1,"form-text"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"label",1),f(2),s(),a(3,"bkd-switch",2),te("valueChange",function(p){return ee(n.value,p)||(n.value=p),p}),s()(),y(4,Pe,3,0,"div",3)),i&2&&(o(),S("for",n.id),o(),T(" ",n.label," "),o(),h("id",n.id),Z("value",n.value),h("disabled",n.disabled),o(),b(n.description?4:-1))},dependencies:[Te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ne=(t,l)=>l.key;function Ie(t,l){t&1&&(a(0,"div",2),g(1,"bkd-spinner",5),s())}function Ge(t,l){if(t&1&&(g(0,"bkd-my-settings-notifications-toggle",7),c(1,"async"),c(2,"async")),t&2){let e=l.$implicit,i=l.$index;B("mt-4",i>0),h("id","notification-channels-"+e.key)("label",d(1,6,e.label))("description",d(2,8,e.description))("formControlName",e.key)}}function De(t,l){if(t&1&&(a(0,"form",3),_(1,Ge,3,10,"bkd-my-settings-notifications-toggle",6,Ne),s()),t&2){let e=x(),i=j(0);h("formGroup",i),o(),M(e.channelsSettings)}}function Re(t,l){if(t&1&&(g(0,"bkd-my-settings-notifications-toggle",7),c(1,"async"),c(2,"async")),t&2){let e=l.$implicit,i=l.$index;B("mt-4",i>0),h("id","notification-types-"+e.key)("label",d(1,6,e.label))("description",d(2,8,e.description))("formControlName",e.key)}}function Be(t,l){if(t&1&&(a(0,"form",3),_(1,Re,3,10,"bkd-my-settings-notifications-toggle",6,Ne),s()),t&2){let e=x(),i=j(2);h("formGroup",i),o(),M(e.typesSettings)}}var we=(()=>{class t{constructor(){this.userSettings=m(Me),this.formBuilder=m(he),this.toastService=m(be),this.translate=m(ve),this.notificationTypes=m(xe),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(e=>{let{label:i,description:n}=this.translate.currentLang==="fr-CH"?e.text.fr:e.text.de;return{key:e.key,label:I(i),description:I(n)}}),this.channelsValue$=this.userSettings.getNotificationChannels(),this.typesValue$=this.userSettings.getNotificationTypesInactive().pipe(C(this.typesArrayToRecord.bind(this))),this.channelsFormGroup$=this.channelsValue$.pipe(C(e=>this.createFormGroup(this.channelsSettings,e)),D(1)),this.allChannelsInactive$=W(this.channelsValue$,this.channelsFormGroup$.pipe(N(e=>e.valueChanges))).pipe(C(e=>Object.values(e).every(i=>!i)),q()),this.typesFormGroup$=this.typesValue$.pipe(R(this.allChannelsInactive$),C(([e,i])=>this.createFormGroup(this.typesSettings,e,!0,i)),D(1)),this.saving$=new K(!1),this.destroy$=new U}ngOnInit(){this.userSettings.refetch(),this.allChannelsInactive$.pipe(z(1),R(this.typesFormGroup$),w(this.destroy$)).subscribe(([e,i])=>{Object.values(i.controls).forEach(n=>e?n.disable():n.enable())}),this.channelsFormGroup$.pipe(w(this.destroy$),N(e=>e.valueChanges)).subscribe(this.saveChannels.bind(this)),this.typesFormGroup$.pipe(w(this.destroy$),N(e=>e.valueChanges)).subscribe(this.saveTypes.bind(this))}ngOnDestroy(){this.destroy$.next()}createFormGroup(e,i,n=!1,r=!1){return this.formBuilder.group(e.reduce((p,{key:V})=>P(E({},p),{[V]:[{value:i[V]??n,disabled:r}]}),{}))}saveChannels(e){this.saving$.next(!0),this.userSettings.saveNotificationChannels(e).pipe(G(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}saveTypes(e){this.saving$.next(!0),this.userSettings.saveNotificationTypesInactive(this.typesRecordToArray(e)).pipe(G(()=>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((n,{key:r})=>P(E({},n),{[r]:!e.includes(r)}),{})}typesRecordToArray(e){return Object.keys(e).reduce((n,r)=>e[r]?n:[...n,r],[])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-notifications"]],decls:17,vars:17,consts:[[1,"pb-4"],[1,"m-0","pb-3","d-flex","align-items-stretch"],[1,"position-relative"],[3,"formGroup"],[1,"mt-4","form-text"],[1,"position-absolute","inline","small","d-inline-block","ms-2"],[3,"id","label","description","formControlName","mt-4"],[3,"id","label","description","formControlName"]],template:function(i,n){if(i&1&&(L(0),c(1,"async"),L(2),c(3,"async"),a(4,"div",0)(5,"h2",1)(6,"span"),f(7),c(8,"translate"),s(),y(9,Ie,2,0,"div",2),c(10,"async"),s(),y(11,De,3,1,"form",3),a(12,"p",4),f(13),c(14,"translate"),s(),g(15,"hr"),y(16,Be,3,1,"form",3),s()),i&2){let r=A(d(1,5,n.channelsFormGroup$));o(2);let p=A(d(3,8,n.typesFormGroup$));o(5),v(d(8,11,"my-settings.notifications.title")),o(2),b(d(10,13,n.saving$)?9:-1),o(2),b(r?11:-1),o(2),T(" ",d(14,15,"my-settings.notifications.privacy-hint")," "),o(3),b(p?16:-1)}},dependencies:[_e,F,de,$,pe,fe,me,ue,ke,oe,O],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important}"],changeDetection:0})}}return t})();var $e=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-show"]],decls:5,vars:3,consts:[[1,"bkd-container","bkd-container-limited"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"h1"),f(2),c(3,"translate"),s(),g(4,"bkd-my-settings-notifications"),s()),i&2&&(o(2),v(d(3,1,"my-settings.title")))},dependencies:[we,O],encapsulation:2})}}return t})();var Fe=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings"]],decls:1,vars:0,template:function(i,n){i&1&&g(0,"router-outlet")},dependencies:[se],encapsulation:2,changeDetection:0})}}return t})();var $t=[{path:"",component:Fe,children:[{path:"",component:$e}]}];export{$t as MY_SETTINGS_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-6W5EYLX6.js b/public/apps/webapp-schulverwaltung/chunk-6W5EYLX6.js new file mode 100644 index 00000000..84134822 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-6W5EYLX6.js @@ -0,0 +1,3 @@ +import{a as rt}from"./chunk-FGETUL3R.js";import{a as nt,b as st}from"./chunk-LQUABKN6.js";import{a as Gi}from"./chunk-FN7XEGJE.js";import{a as St}from"./chunk-SME4UDGV.js";import{e as Li}from"./chunk-GCWE54XA.js";import{a as _t,b as xi,c as bi,d as Ti,e as Ei,f as Je,g as et,h as wi,i as ki,k as Pi,l as ue,m as Ii,o as De,q as Mi,r as Oi,s as $i,t as Di,u as it,v as Le}from"./chunk-DJNW6R6G.js";import{e as Si}from"./chunk-FMUJPUYQ.js";import{b as Qe}from"./chunk-SKUS47ZU.js";import{a as _i}from"./chunk-Y4QYVF5K.js";import{a as Fi}from"./chunk-ETZGBBG5.js";import{a as at,c as Ri}from"./chunk-2ZRHGKSY.js";import{a as vi,b as Ci}from"./chunk-26VH6QDS.js";import{b as yi,d as tt}from"./chunk-JGKXAFYO.js";import{a as gi,d as fi}from"./chunk-A7EOJZ46.js";import{D as hi,H as Ge,u as ui}from"./chunk-KQORGECX.js";import{a as Oe,c as ci,d as $e}from"./chunk-K42F6AEW.js";import{o as mi}from"./chunk-NC6UEGAF.js";import{i as _e,j as Xe}from"./chunk-SL67CYEF.js";import{a as Ze,h as me}from"./chunk-HQSONWXM.js";import{a as zt,b as ne,h as ii,i as ni,k as ri,l as si,r as Ke,w as pi,x as ce}from"./chunk-RXRYDGZR.js";import{a as Ye}from"./chunk-F4XODHS2.js";import{$ as h,$a as H,B as Pt,Bb as Se,Bc as ie,Bd as ze,C as It,Cb as ye,Cc as Ce,Cd as qe,D as Mt,Db as xe,Dc as ke,Dd as Jt,Eb as L,Ec as Z,Ed as ei,F as se,Fb as V,Fd as Ie,Gb as P,Gd as ti,H as q,Ha as Te,Hb as te,Ia as _,Ib as we,J as He,Jb as D,K as Ot,Ka as Vt,Kb as Ct,La as At,M as K,Md as ai,Nb as p,Nd as oi,O as $t,Ob as c,P as M,Pa as b,Pb as O,Pd as di,R as ge,Rd as re,Sa as u,Sb as Nt,Sd as w,Ta as oe,Ud as Me,Wb as j,Wd as li,X as ae,Xa as S,Xb as Ut,Za as Ee,_a as A,a as G,ab as s,b as F,ba as Dt,bb as a,ca as Lt,cb as C,da as be,dc as le,ea as T,f as J,fa as E,g as N,gb as $,gc as W,h as ft,ha as Gt,hc as ve,hd as pe,ib as x,jb as m,jc as Wt,ka as Ft,kb as Ht,kd as Ne,l as B,lb as jt,m as kt,ma as Q,mb as de,md as Pe,n as y,nb as Re,nd as Ue,o as U,od as qt,pa as Rt,qa as R,qc as je,ra as Bt,rd as Kt,sd as Yt,ta as vt,td as We,ub as fe,ud as Zt,vb as l,w as Ae,wb as v,wd as Qt,x as he,xa as ee,xb as f,xd as Xt,ya as r,yb as Be}from"./chunk-NEW5VGRB.js";var Bn=10300,Vn=10260,An=10250,Hn=14030,jn=10350;function ot(t){let{HasEvaluationStarted:o,EvaluationUntil:e,HasTestGrading:i}=t.EvaluationStatusRef;if(o===!0&&(t.StatusId===Hn||t.StatusId===jn))return{value:X.Rating};if(o===!0&&i===!1){if(e)return{value:X.RatingUntil};if(t.StatusId===Bn)return{value:X.IntermediateRating}}return o===!1&&i===!0&&t.StatusId!==Vn&&t.StatusId!==An?{value:X.Tests}:o===!0&&i===!0?e?{value:X.Tests,label:X.RatingUntil}:{value:X.Tests,label:X.IntermediateRating}:null}function Bi(t){return t.EvaluationStatusRef.HasEvaluationStarted===!0}function Vi(t){return t.EvaluationStatusRef.HasReviewOfEvaluationStarted===!0&&!!t.FinalGrades?.length}function dt(t){let o=t.Classes?t.Classes.map(e=>e.Number).join(", "):null;return o?t.Designation+", "+o:t.Designation}function Ai(t,o){return t?(o.Leadership??"").split(",").some(e=>e.trim()===t.fullname):!1}function Hi(t,o){let e=new URLSearchParams({returnlink:o});return o.startsWith("/dashboard")?`/dashboard/students/${t}?${e}`:o.startsWith("/events/current")?`/events/current/${t}?${e}`:`/events/${t}/students?${e}`}function ji(t){let o=t.ParticipatingStudents?.map(e=>({id:e.Id,name:e.FullName,email:e.DisplayEmail??void 0}))??[];return{eventId:t.Id,eventDesignation:t.Designation,studyClasses:(t.Classes??[]).map(e=>e.Designation).sort(),entries:o}}function yt(t,o){return F(G({},t),{entries:t.entries.map(e=>{let i=o.find(d=>d.StudentId===e.id),n=i?[i.CompanyName,i.CompanyNameAddition].filter(Boolean).join(" \u2013 "):void 0;return F(G({},e),{company:n})})})}function xt(t,o,e,{eventDesignation:i,emailFallback:n}={}){return{eventId:t,eventDesignation:i??e[0]?.EventDesignation??"",studyClasses:[],entries:o.map(d=>{let g=e.find(k=>k.PersonId===d.Id);return{id:d.Id,subscriptionId:g?.Id,name:d.FullName,email:(n?d.DisplayEmail??d.Email:d.DisplayEmail)??void 0,status:g?.Status,registrationDate:g?.RegistrationDate??void 0}})}}function Ni(t,o){return F(G({},t),{entries:t.entries.map(e=>F(G({},e),{studyClass:o.find(i=>i.StudentRef.Id===e.id)?.StudyClassNumber}))})}var X=function(t){return t.Rating="rating",t.RatingUntil="rating-until",t.IntermediateRating="intermediate-rating",t.Tests="add-tests",t}(X||{}),Fe=(()=>{class t{constructor(){this.coursesRestService=h(ue),this.eventsRestService=h(rt),this.studyClassRestService=h(Gi),this.subscriptionsRestService=h(De),this.loadingService=h(_e),this.storageService=h(Me),this.translate=h(re),this.router=h(ke),this.settings=h(pe),this.loading$=this.loadingService.loading$,this.searchFields$=new N(["designation"]),this.searchSubject$=new N(""),this.search$=this.searchSubject$.asObservable(),this.roles$=new N(null),this.isClassTeacher$=this.roles$.pipe(y(e=>_i(e,"ClassTeacherRole")),K(1)),this.withStudyCourses$=new N(!1),this.unratedCourses$=this.roles$.pipe(M(this.loadUnratedCourses.bind(this)),K(1)),this.studyCourses$=this.withStudyCourses$.pipe(M(this.loadStudyCourses.bind(this)),K(1)),this.formativeAssessments$=this.isClassTeacher$.pipe(M(this.loadFormativeAssessments.bind(this)),K(1)),this.studyClasses$=this.isClassTeacher$.pipe(M(this.loadStudyClasses.bind(this)),K(1)),this.events$=this.getEvents().pipe(K(1)),this.filteredEvents$=U([this.events$,this.searchFields$,this.search$]).pipe(y($e(st)))}setSearch(e){this.searchSubject$.next(e)}setRoles(e){this.roles$.next(e)}setWithStudyCourses(e){this.withStudyCourses$.next(e)}setSearchFields(e){this.searchFields$.next(e)}getEntries(e=!1){return this.filteredEvents$.pipe(y(i=>e?i.filter(n=>n.evaluationText):i))}getEvents(){return this.loadingService.load(U([this.unratedCourses$,this.studyCourses$,this.formativeAssessments$,this.studyClasses$]),{stopOnFirstValue:!0}).pipe(y($e(this.createAndSortEvents.bind(this))))}loadUnratedCourses(e){return this.coursesRestService.getExpandedCourses(e).pipe(y(i=>i.filter(n=>!Vi(n))))}loadStudyCourses(e){if(!e)return B([]);let i=this.storageService.getPayload();return this.eventsRestService.getStudyCourseEvents().pipe(y(n=>n.filter(d=>Ai(i,d))),M(n=>this.subscriptionsRestService.getSubscriptionCountsByEvents(n.map(d=>d.Id)).pipe(y(d=>n.map(g=>F(G({},g),{StudentCount:d[g.Id]??0}))))))}loadFormativeAssessments(e){return e?this.studyClassRestService.getActiveFormativeAssessments():B([])}loadStudyClasses(e){return e?this.studyClassRestService.getActive():B([])}createAndSortEvents(e,i,n,d){let g=d.filter(k=>!n.map(Y=>Y.Id).includes(k.Id));return[...this.createFromCourses(e),...this.createFromStudyCourses(i),...this.createFromAssessments(n),...this.createFromStudyClasses(g)].sort((k,Y)=>k.designation.localeCompare(Y.designation))}createFromCourses(e){return e.map(i=>{let n=ot(i);return{id:i.Id,designation:dt(i),detailLink:this.buildStudentsLink(i.Id),studentCount:i.AttendanceRef.StudentCount||0,dateFrom:i.DateFrom,dateTo:i.DateTo,state:n?.value||null,evaluationText:this.getEvaluationText(n,i.EvaluationStatusRef.EvaluationUntil),evaluationLink:n?.value&&n?.value!==X.Tests?this.buildEvaluationLink(i.Id):null}})}createFromStudyCourses(e){return e.map(i=>({id:i.Id,designation:i.Designation,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}createFromAssessments(e){return this.createFromStudyClasses(e).map(n=>F(G({},n),{state:X.Rating,evaluationText:this.translate.instant("events.state.rating"),evaluationLink:this.buildEvaluationLink(n.id)}))}createFromStudyClasses(e){return e.map(i=>({id:i.Id,designation:i.Number,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}getEvaluationText(e,i){let n=e?.label||e?.value;return n?this.translate.instant(`events.state.${n}`)+(n===X.RatingUntil?` ${i?mi(i,"dd.MM.yyyy"):""}`:""):""}buildStudentsLink(e){return Hi(e,this.router.url)}buildEvaluationLink(e){return(this.settings.eventlist.evaluation??"").replace(":id",String(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ae({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Nn=t=>[t,"tests"];function Un(t,o){if(t&1&&(s(0,"span"),l(1),p(2,"date"),C(3,"wbr"),l(4),p(5,"date"),a()),t&2){let e=m();r(),f("",O(2,2,e.event().dateFrom,"dd.MM.yyyy"),"\u2013"),r(3),v(O(5,5,e.event().dateTo,"dd.MM.yyyy"))}}function Wn(t,o){if(t&1&&(s(0,"a",6)(1,"i",8),l(2,"arrow_right_alt"),a(),s(3,"span",9),l(4),a()()),t&2){let e=m(2);u("routerLink",D(2,Nn,e.event().id)),r(4),v(e.event().evaluationText)}}function zn(t,o){if(t&1&&(s(0,"a",7)(1,"i",8),l(2,"arrow_right_alt"),a(),s(3,"span",9),l(4),a()()),t&2){let e=m(2);u("href",e.event().evaluationLink,ee),r(4),f("",e.event().evaluationText," ")}}function qn(t,o){if(t&1&&(s(0,"div",5),b(1,Wn,5,4,"a",6)(2,zn,5,2,"a",7),a()),t&2){let e=m();r(),S(e.event().evaluationLink?-1:1),r(),S(e.event().evaluationLink?2:-1)}}var Ui=(()=>{class t{constructor(){this.event=R.required(),this.withRatings=R(!0),this.link=j(()=>fi(this.event().detailLink))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-list-entry"]],inputs:{event:[1,"event"],withRatings:[1,"withRatings"]},decls:11,vars:9,consts:[[1,"designation"],[3,"routerLink","queryParams"],[1,"date"],[1,"registrations"],[1,"registrations-label"],[1,"rating"],[1,"d-flex",3,"routerLink"],[1,"d-flex",3,"href"],[1,"material-icons"],[1,"ps-1"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"a",1),l(2),a()(),s(3,"div",2),b(4,Un,6,8,"span"),a(),s(5,"div",3),l(6),s(7,"span",4),l(8),p(9,"translate"),a()(),b(10,qn,3,2,"div",5)),i&2&&(r(),u("routerLink",n.link().link)("queryParams",n.link().params),r(),v(n.event().designation),r(2),S(n.event().dateFrom&&n.event().dateTo?4:-1),r(2),f(" ",n.event().studentCount," "),r(2),v(c(9,7,n.event().studentCount===1?"events.registration":"events.registrations")),r(2),S(n.withRatings()&&n.event().evaluationText?10:-1))},dependencies:[Z,ve,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}}']})}}return t})();var Kn=(t,o)=>o.id,Yn=()=>[];function Zn(t,o){t&1&&C(0,"bkd-spinner")}function Qn(t,o){t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2&&(r(),f(" ",c(2,1,"events.rating")," "))}function Xn(t,o){if(t&1&&C(0,"bkd-events-list-entry",8),t&2){let e=o.$implicit,i=m(3);u("event",e)("withRatings",i.withRatings)}}function Jn(t,o){if(t&1&&(s(0,"div",3)(1,"div",4),l(2),p(3,"translate"),a(),s(4,"div",5),l(5),p(6,"translate"),a(),s(7,"div",6),l(8),p(9,"translate"),a(),b(10,Qn,3,3,"div",7),a(),A(11,Xn,1,2,"bkd-events-list-entry",8,Kn)),t&2){let e=m(2),i=P(0);r(2),v(c(3,4,"events.designation")),r(3),v(c(6,6,"events.date")),r(3),f(" ",c(9,8,"events.registrations")," "),r(2),S(e.withRatings?10:-1),r(),H(i)}}function er(t,o){t&1&&(s(0,"p",2),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events.no-events")))}function tr(t,o){if(t&1&&b(0,Jn,13,10)(1,er,3,3,"p",2),t&2){m();let e=P(0);S(e.length>0?0:1)}}var Wi=["designation"],ir=[...Wi,"evaluationText"],lt=(()=>{class t{constructor(){this.state=h(Fe),this.storage=h(Me),this.withStudyCourses=!1,this.withRatings=!0,this.state.setRoles(this.storage.getPayload()?.roles??null)}ngOnChanges(e){e.withStudyCourses&&this.state.setWithStudyCourses(e.withStudyCourses.currentValue),e.withRatings&&this.state.setSearchFields(e.withRatings.currentValue?ir:Wi)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-list"]],inputs:{withStudyCourses:"withStudyCourses",withRatings:"withRatings"},features:[be],decls:10,vars:17,consts:[[1,"bkd-container"],[1,"d-flex","search",3,"valueChange","value","placeholder","label","disabled"],[1,"mt-3"],[1,"event-header"],[1,"designation"],[1,"date"],[1,"registrations"],[1,"rating"],[3,"event","withRatings"]],template:function(i,n){if(i&1){let d=$();L(0),p(1,"async"),s(2,"div",0)(3,"bkd-resettable-input",1),p(4,"async"),p(5,"translate"),p(6,"translate"),x("valueChange",function(k){return T(d),E(n.state.setSearch(k))}),a(),b(7,Zn,1,0,"bkd-spinner"),p(8,"async"),b(9,tr,2,1),a()}if(i&2){let d,g=V((d=c(1,5,n.state.getEntries(n.withRatings)))!==null&&d!==void 0?d:we(16,Yn));r(3),u("value",c(4,8,n.state.search$))("placeholder",c(5,10,"events.search-by"))("label",c(6,12,"events.search"))("disabled",!g),r(4),S(c(8,14,n.state.loading$)?7:9)}},dependencies:[nt,me,W,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}}']})}}return t})();var zi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-current-list"]],decls:4,vars:5,consts:[[3,"withStudyCourses","withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),l(1),p(2,"translate"),a(),C(3,"bkd-events-list",0)),i&2&&(r(),v(c(2,3,"events.current.title")),r(2),u("withStudyCourses",!0)("withRatings",!1))},dependencies:[lt,w],encapsulation:2,changeDetection:0})}}return t})();var qi=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-current"]],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[Ce],encapsulation:2})}}return t})();var Ki=(()=>{class t extends Ze{constructor(){let e=h(je),i=h(pe);super(e,i,vi,"ApprenticeshipContracts")}getCompaniesForStudents(e){if(e.length===0)return B([]);let i=new Date,n={"filter.StudentId":`;${e.join(";")}`,"filter.ApprenticeshipDateFrom":`<${i.toISOString()}`,"filter.ApprenticeshipDateTo":`>${i.toISOString()}`,fields:"Id,StudentId,CompanyName,CompanyNameAddition"};return this.http.get(`${this.baseUrl}/`,{params:n}).pipe(M(li(Ci)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ae({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Yi(t,o,e){o||Lt(t);let i=o??h(Ft);return e?Dt(i,e):i}function Ve(t,o){let e=Yi(Ve,o?.injector),i;return j(()=>(i||(i=Ut(()=>ne(t,F(G({},o),{injector:e})))),i()))}var pt=1;var Zi=10,ct=(()=>{class t{constructor(){this.route=h(ie),this.loadingService=h(_e),this.eventsService=h(rt),this.coursesService=h(ue),this.subscriptionsService=h(De),this.personsService=h(Qe),this.apprenticeshipContractsService=h(Ki),this.lessonPresencesService=h(Si),this.reportsService=h(tt),this.eventId$=U([this.route.paramMap,this.route.parent?.paramMap??B(null)]).pipe(y(([e,i])=>Number(e.get("id")||i?.get("id"))),q()),this.eventSummary$=this.eventId$.pipe(M(this.loadEventSummary.bind(this)),K(1)),this.eventSummary=Ve(this.eventSummary$,{initialValue:null}),this.eventTypeId=j(()=>this.eventSummary()?.EventTypeId??null),this.studentEntries=Ve(this.loadStudentEntries(),{initialValue:null}),this.isStudyCourse=j(()=>this.eventTypeId()===pt),this.loading=ne(this.loadingService.loading(at)),this.title=j(()=>this.getTitle(this.studentEntries())),this.multipleStudyClasses=j(()=>(this.studentEntries()?.studyClasses?.length??0)>1),this.searchTerm=vt(""),this.sortCriteria=vt({primarySortKey:"name",ascending:!0}),this.entries=j(()=>this.studentEntries()?.entries??[]),this.sortedEntries=j(()=>this.sortStudentEntries(this.entries(),this.sortCriteria())),this.filteredEntries=j(()=>st(this.sortedEntries(),["name","status","company","studyClass"],this.searchTerm())),this.mailtoLink=j(()=>this.getMailtoLink(this.eventTypeId(),this.entries())),this.reports=Ve(this.eventSummary$.pipe(he(ce)).pipe(M(this.loadReports.bind(this))),{initialValue:[]})}loadEventSummary(e){return this.loadingService.load(this.eventsService.getEventSummary(e),at)}loadStudentEntries(){return this.eventSummary$.pipe(M(e=>{let i=()=>{if(!e)return B(null);switch(e.EventTypeId){case pt:return this.loadStudyCourseStudents(e);case Zi:return this.loadStudyClassStudents(e.Id);default:return this.loadCourseStudents(e.Id)}};return this.loadingService.load(i(),at)}))}toggleSort(e){this.sortCriteria.set({primarySortKey:e,ascending:this.sortCriteria().primarySortKey===e?!this.sortCriteria().ascending:!0})}loadStudyCourseStudents({Id:e,Designation:i}){return this.subscriptionsService.getSubscriptionsByCourse(e).pipe(M(n=>this.personsService.getSummaries(n.map(({PersonId:d})=>d).filter(ce)).pipe(y(d=>xt(e,d,n,{eventDesignation:i})))))}loadStudyClassStudents(e){return this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.IsOkay":"=1"}).pipe(M(i=>{let n=i.map(({PersonId:d})=>d).filter(ce);return U([this.personsService.getSummaries(n),this.apprenticeshipContractsService.getCompaniesForStudents(n)]).pipe(y(([d,g])=>{let k=xt(e,d,i,{emailFallback:!0});return yt(k,g)}))}))}loadCourseStudents(e){return this.coursesService.getExpandedCourseWithParticipants(e).pipe(y(ji),M(i=>U([this.apprenticeshipContractsService.getCompaniesForStudents(i.entries.map(({id:n})=>n)),this.lessonPresencesService.getLessonStudyClassesByEvent(e)]).pipe(y(([n,d])=>{let g=yt(i,n);return Ni(g,d)}))))}getTitle(e){if(!e||!e.eventDesignation)return null;let{eventDesignation:i,studyClasses:n}=e;return[i,...n].join(", ")}getMailtoLink(e,i){if(e===null||e===pt)return null;let n=i.map(d=>d.email).filter(Boolean);return n.length>0?`mailto:${n.join(";")}`:null}loadReports({Id:e,EventTypeId:i}){switch(i){case null:case pt:return B([]);case Zi:return this.reportsService.getStudyClassStudentsReports(e);default:return this.reportsService.getCourseStudentsReports(e)}}sortStudentEntries(e,i){return[...e].sort(nr(i))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ae({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function nr(t){return(o,e)=>{switch(t.primarySortKey){case"registrationDate":return rr(o,e,t);case"name":return sr(t,o,e);default:throw new ui(t.primarySortKey,"Unhandled sort criteria")}}}function rr(t,o,e){let i=t.registrationDate?new Date(t.registrationDate).getTime():0,n=o.registrationDate?new Date(o.registrationDate).getTime():0;return e.ascending?i-n:n-i}function sr(t,o,e){return t.ascending?o.name.localeCompare(e.name):e.name.localeCompare(o.name)}var Qi=(()=>{class t{constructor(){this.entry=R.required(),this.multipleStudyClasses=R(!1),this.returnLink=R(null),this.link=j(()=>["student",this.entry().id,"addresses"]),this.linkParams=j(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-course-entry"]],inputs:{entry:[1,"entry"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"]},decls:7,vars:10,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],[1,"name",3,"title","routerLink","queryParams"],[1,"study-class"],[1,"company",3,"title"]],template:function(i,n){i&1&&(C(0,"bkd-avatar",0),s(1,"a",1),l(2),a(),s(3,"div",2),l(4),a(),s(5,"div",3),l(6),a()),i&2&&(u("studentId",n.entry().id)("link",n.link())("linkParams",n.linkParams()),r(),u("title",n.entry().name)("routerLink",n.link())("queryParams",n.linkParams()),r(),v(n.entry().name),r(2),f(" ",n.multipleStudyClasses()?n.entry().studyClass:"",` +`),r(),u("title",n.entry().company),r(),v(n.entry().company))},dependencies:[Z,Li],styles:['[_nghost-%COMP%]{display:grid;grid-template-columns:min-content 1fr;grid-template-rows:min-content min-content 1fr;grid-template-areas:"avatar name" "avatar study-class" "avatar company";padding:2rem 1rem}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.name[_ngcontent-%COMP%]{grid-area:name}.study-class[_ngcontent-%COMP%]{grid-area:study-class;font-size:.875rem}.company[_ngcontent-%COMP%]{grid-area:company;align-content:end;padding-bottom:1.5rem}.name[_ngcontent-%COMP%], .company[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}'],changeDetection:0})}}return t})();var ar=t=>({count:t});function or(t,o){if(t&1&&(s(0,"div",0),l(1),p(2,"translate"),a()),t&2){m();let e=P(2);r(),f(" ",O(2,1,e===1?"events-students.registration":"events-students.registrations",D(4,ar,e))," ")}}var mt=(()=>{class t{constructor(){this.title=R.required(),this.count=R(null),this.searchTerm=Te()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-header"]],inputs:{title:[1,"title"],count:[1,"count"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:7,vars:10,consts:[[1,"additional-info"],[1,"search",3,"valueChange","value","placeholder","label"]],template:function(i,n){if(i&1){let d=$();s(0,"h1"),l(1),a(),L(2),b(3,or,3,6,"div",0),s(4,"bkd-resettable-input",1),p(5,"translate"),p(6,"translate"),x("valueChange",function(k){return T(d),E(n.searchTerm.set(k))}),a()}if(i&2){r(),v(n.title()),r();let d=V(n.count());r(),S(d!==null?3:-1),r(),u("value",n.searchTerm())("placeholder",c(5,6,"events-students.search-placeholder"))("label",c(6,8,"events-students.search"))}},dependencies:[w,nt],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.search[_ngcontent-%COMP%]{margin-top:1rem;display:flex;max-width:300px}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"],changeDetection:0})}}return t})();var dr=(t,o)=>o.id;function lr(t,o){t&1&&(s(0,"p"),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events-students.no-entries")))}function pr(t,o){if(t&1&&C(0,"bkd-events-students-course-entry",2),t&2){let e=o.$implicit,i=m();u("entry",e)("multipleStudyClasses",i.multipleStudyClasses())("returnLink",i.returnLink())}}var Xi=(()=>{class t{constructor(){this.title=R.required(),this.count=R.required(),this.entries=R.required(),this.multipleStudyClasses=R(!1),this.returnLink=R(null),this.searchTerm=Te()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:5,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[3,"entry","multipleStudyClasses","returnLink"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),xe("searchTermChange",function(g){return ye(n.searchTerm,g)||(n.searchTerm=g),g}),a(),s(1,"section",1),b(2,lr,3,3,"p"),A(3,pr,1,3,"bkd-events-students-course-entry",2,dr),a()),i&2&&(u("title",n.title())("count",n.count()),Se("searchTerm",n.searchTerm),r(2),S(n.entries().length===0?2:-1),r(),H(n.entries()))},dependencies:[w,mt,Qi],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}section.list[_ngcontent-%COMP%]{width:calc(100% + 1px);margin-top:1rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}bkd-events-students-course-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;border-right:1px solid #dee2e6}"],changeDetection:0})}}return t})();var Ji=(()=>{class t{constructor(){this.entry=R.required(),this.returnLink=R(null),this.link=j(()=>["study-course-student",this.entry().id]),this.linkParams=j(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-study-course-entry"]],inputs:{entry:[1,"entry"],returnLink:[1,"returnLink"]},decls:7,vars:8,consts:[[1,"name",3,"routerLink","queryParams"],[1,"status"],[1,"registration-date"]],template:function(i,n){i&1&&(s(0,"a",0),l(1),a(),s(2,"div",1),l(3),a(),s(4,"div",2),l(5),p(6,"date"),a()),i&2&&(u("routerLink",n.link())("queryParams",n.linkParams()),r(),v(n.entry().name),r(2),v(n.entry().status),r(2),f(" ",O(6,5,n.entry().registrationDate,"dd.MM.yyyy"),` +`))},dependencies:[Z,Wt,ve],styles:['[_nghost-%COMP%]{display:grid;align-items:center;grid-template-areas:"name status registration-date";grid-template-columns:2fr 1fr 1fr;border-bottom:1px solid #dee2e6}.name[_ngcontent-%COMP%], .status[_ngcontent-%COMP%], .registration-date[_ngcontent-%COMP%]{padding:1rem}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.status[_ngcontent-%COMP%]{grid-area:status;padding-left:0}.registration-date[_ngcontent-%COMP%]{grid-area:registration-date}@media (max-width: 750px){[_nghost-%COMP%]{grid-template-areas:"name registration-date" "status registration-date";grid-template-columns:2fr 1fr}.name[_ngcontent-%COMP%]{padding-bottom:0}.status[_ngcontent-%COMP%]{padding-top:0;padding-left:1rem;font-size:.875rem}}'],changeDetection:0})}}return t})();var cr=(t,o)=>o.id;function mr(t,o){if(t&1){let e=$();s(0,"div",2)(1,"div",4),x("click",function(){T(e);let n=m();return E(n.toggleSort.emit("name"))}),l(2),p(3,"translate"),s(4,"span",5),l(5),a()(),s(6,"div",6),x("click",function(){T(e);let n=m();return E(n.toggleSort.emit("registrationDate"))}),l(7),p(8,"translate"),s(9,"span",5),l(10),a()()()}if(t&2){let e=m();r(),u("className",e.primarySortKey),r(),f(" ",c(3,5,"events-students.list.header.name")," "),r(3),v(e.getSortDirectionCharacter("name")),r(2),f(" ",c(8,7,"events-students.list.header.registration-date")," "),r(3),v(e.getSortDirectionCharacter("registrationDate"))}}function ur(t,o){t&1&&(s(0,"p"),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events-students.no-entries")))}function hr(t,o){if(t&1&&C(0,"bkd-events-students-study-course-entry",3),t&2){let e=o.$implicit,i=m();u("entry",e)("returnLink",i.returnLink())}}var en=(()=>{class t{constructor(){this.title=R.required(),this.count=R.required(),this.entries=R.required(),this.returnLink=R(null),this.sortCriteria=R.required(),this.toggleSort=Rt(),this.searchTerm=Te()}getSortDirectionCharacter(e){return this.sortCriteria().primarySortKey!==e?"":this.sortCriteria().ascending?"\u2191":"\u2193"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-study-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],returnLink:[1,"returnLink"],sortCriteria:[1,"sortCriteria"],searchTerm:[1,"searchTerm"]},outputs:{toggleSort:"toggleSort",searchTerm:"searchTermChange"},features:[te([])],decls:6,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[1,"list-header"],[3,"entry","returnLink"],[1,"name",3,"click","className"],[1,"sort-direction"],[1,"registration-date",3,"click"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),xe("searchTermChange",function(g){return ye(n.searchTerm,g)||(n.searchTerm=g),g}),a(),s(1,"section",1),b(2,mr,11,9,"div",2)(3,ur,3,3,"p"),A(4,hr,1,2,"bkd-events-students-study-course-entry",3,cr),a()),i&2&&(u("title",n.title())("count",n.count()),Se("searchTerm",n.searchTerm),r(2),S(n.entries().length>0?2:3),r(2),H(n.entries()))},dependencies:[w,mt,Ji],styles:[".list-header[_ngcontent-%COMP%]{cursor:pointer;display:grid;grid-template-columns:3fr 1fr;align-items:center;border-bottom:2px solid #dee2e6}.name[_ngcontent-%COMP%], .registration-date[_ngcontent-%COMP%]{padding:1rem}.name[_ngcontent-%COMP%]{flex:3}.registration-date[_ngcontent-%COMP%]{flex:1}@media (max-width: 750px){.list-header[_ngcontent-%COMP%]{grid-template-columns:2fr 1fr}.name[_ngcontent-%COMP%]{flex:2}.registration-date[_ngcontent-%COMP%]{flex:1;white-space:nowrap}}"],changeDetection:0})}}return t})();var gr=t=>[t];function fr(t,o){if(t&1&&(s(0,"a",4)(1,"i",6),l(2,"mail"),a()()),t&2){let e=m(2);u("href",e.state.mailtoLink(),ee)}}function vr(t,o){if(t&1&&(s(0,"bkd-backlink",0)(1,"div",3),b(2,fr,3,1,"a",4),C(3,"bkd-reports-link",5),a()()),t&2){let e=m(),i=P(0);u("link",D(3,gr,i)),r(2),S(e.state.mailtoLink()?2:-1),r(),u("reports",e.state.reports())}}function Cr(t,o){t&1&&C(0,"bkd-spinner")}function _r(t,o){t&1&&(s(0,"p"),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events-students.no-entries")))}function Sr(t,o){if(t&1){let e=$();s(0,"bkd-events-students-study-course-list",7),x("toggleSort",function(n){T(e);let d=m();return E(d.state.toggleSort(n))}),xe("searchTermChange",function(n){T(e);let d=m();return ye(d.state.searchTerm,n)||(d.state.searchTerm=n),E(n)}),a()}if(t&2){let e=m();u("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("returnLink",e.returnLink())("sortCriteria",e.state.sortCriteria()),Se("searchTerm",e.state.searchTerm)}}function yr(t,o){if(t&1){let e=$();s(0,"bkd-events-students-course-list",8),xe("searchTermChange",function(n){T(e);let d=m();return ye(d.state.searchTerm,n)||(d.state.searchTerm=n),E(n)}),a()}if(t&2){let e=m();u("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("multipleStudyClasses",e.state.multipleStudyClasses())("returnLink",e.returnLink()),Se("searchTerm",e.state.searchTerm)}}var tn=(()=>{class t{constructor(){this.state=h(ct),this.route=h(ie),this.returnLink=ne(this.route.queryParams.pipe(y(({returnlink:e})=>e?decodeURIComponent(e):null)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-list"]],decls:6,vars:3,consts:[[3,"link"],[3,"title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"title","count","entries","multipleStudyClasses","returnLink","searchTerm"],[1,"d-flex"],["target","_blank",1,"mail","btn","btn-primary","btn-icon","me-2",3,"href"],[1,"ms-2",3,"reports"],[1,"material-icons"],[3,"toggleSort","searchTermChange","title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"searchTermChange","title","count","entries","multipleStudyClasses","returnLink","searchTerm"]],template:function(i,n){if(i&1&&(L(0),b(1,vr,4,5,"bkd-backlink",0)(2,Cr,1,0,"bkd-spinner")(3,_r,3,3,"p")(4,Sr,1,6,"bkd-events-students-study-course-list",1)(5,yr,1,6,"bkd-events-students-course-list",2)),i&2){let d=V(n.returnLink());r(),S(d?1:-1),r(),S(n.state.loading()?2:n.state.entries().length===0?3:n.state.isStudyCourse()?4:5)}},dependencies:[w,me,Ge,Xe,Xi,en],encapsulation:2,changeDetection:0})}}return t})();var xr=(t,o)=>o.id;function br(t,o){if(t&1&&(l(0),p(1,"date")),t&2){m(2);let e=P(2);f(" ",O(1,1,e.Birthdate,"dd.MM.yyyy")," ")}}function Tr(t,o){if(t&1&&l(0),t&2){m(2);let e=P(2);f(" (",e.Gender,") ")}}function Er(t,o){if(t&1&&(l(0),C(1,"br")),t&2){m(2);let e=P(2);f(" ",e.AddressLine1,"")}}function wr(t,o){if(t&1&&(l(0),C(1,"br")),t&2){m(2);let e=P(2);f(" ",e.AddressLine2,"")}}function kr(t,o){if(t&1&&(l(0),C(1,"br")),t&2){m(2);let e=P(2);Be(" ",e.Zip," ",e.Location,"")}}function Pr(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Re("href","tel:",e.PhonePrivate,"",ee),r(),v(e.PhonePrivate)}}function Ir(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Re("href","tel:",e.PhoneMobile,"",ee),r(),v(e.PhoneMobile)}}function Mr(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Re("href","mailto:",e.Email,"",ee),r(),f(" ",e.Email," ")}}function Or(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Re("href","mailto:",e.Email2,"",ee),r(),f(" ",e.Email2," ")}}function $r(t,o){if(t&1&&(s(0,"h1"),l(1),a(),s(2,"span",3),b(3,br,2,4)(4,Tr,1,1),a(),s(5,"address"),b(6,Er,2,1)(7,wr,2,1)(8,kr,2,2)(9,Pr,3,3)(10,Ir,3,3)(11,Mr,3,3)(12,Or,3,3),a()),t&2){m();let e=P(2);r(),v(e.FullName),r(2),S(e.Birthdate?3:-1),r(),S(e.Gender?4:-1),r(2),S(e.AddressLine1?6:-1),r(),S(e.AddressLine2?7:-1),r(),S(e.Zip&&e.Location?8:-1),r(),S(e.PhonePrivate?9:-1),r(),S(e.PhoneMobile?10:-1),r(),S(e.Email?11:-1),r(),S(e.Email2?12:-1)}}function Dr(t,o){if(t&1&&(s(0,"div",2),l(1),p(2,"translate"),s(3,"span",5),l(4),a()()),t&2){m();let e=P(4);r(),f(" ",c(2,2,"events-students.study-course-detail.status"),": "),r(3),v(e)}}function Lr(t,o){if(t&1&&(s(0,"div",6)(1,"h2"),l(2),a()()),t&2){let e=m().$implicit;r(2),v(e.label)}}function Gr(t,o){if(t&1&&(s(0,"a",7),l(1),a()),t&2){let e=m(2).$implicit;de("href",e.file,ee),r(),v(e.value)}}function Fr(t,o){if(t&1&&l(0),t&2){let e=m(2).$implicit;f(" ",e.value," ")}}function Rr(t,o){if(t&1&&(s(0,"div",6)(1,"div"),l(2),a(),b(3,Gr,2,2,"a",7)(4,Fr,1,1),a()),t&2){let e=m().$implicit;r(2),v(e.label),r(),S(e.file!==null?3:4)}}function Br(t,o){if(t&1&&b(0,Lr,3,1,"div",6)(1,Rr,5,2,"div",6),t&2){let e=o.$implicit;S(e.heading?0:e.value?1:-1)}}function Vr(t,o){t&1&&C(0,"bkd-spinner")}var nn=(()=>{class t{constructor(){this.settings=h(pe),this.route=h(ie),this.personsService=h(Qe),this.subscriptionsService=h(De),this.storageService=h(Me),this.loadingService=h(_e),this.eventId$=this.route.parent?.paramMap.pipe(y(e=>Number(e.get("id"))))??B(0),this.personId$=this.route.paramMap.pipe(y(e=>Number(e.get("id")))),this.person=ne(this.personId$.pipe(M(e=>this.personsService.get(e))),{initialValue:null}),this.subscription=ne(this.loadSubscription()),this.subscriptionId=j(()=>this.subscription()?.Id??null),this.subscriptionDetails=ne(this.loadSubscriptionDetails(),{initialValue:[]}),this.backLink=ne(this.route.queryParams.pipe(y(({returnparams:e})=>e),y(gi))),this.loading=ne(this.loadingService.loading$,{initialValue:!0})}loadSubscription(){return this.loadingService.load(U([this.eventId$,this.personId$]).pipe(M(([e,i])=>this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.PersonId":`=${i}`})),y(e=>e[0]??null)),{stopOnFirstValue:!0})}loadSubscriptionDetails(){return this.loadingService.load(zt(this.subscriptionId).pipe(he(ce),M(e=>this.subscriptionsService.getSubscriptionDetailsById(e)),y(e=>e.map(i=>this.toSubscriptionDetailsEntry(i)))),{stopOnFirstValue:!0})}toSubscriptionDetailsEntry(e){let i=e.Value??"";return i=this.normalizeSubscriptionDetailsDropdownValue(e,i),{id:e.Id,label:e.VssDesignation,value:i,file:this.buildFileUrl(e),heading:e.VssStyle==="HE"}}normalizeSubscriptionDetailsDropdownValue(e,i){return e.DropdownItems&&e.VssStyle!=="CB"?e.DropdownItems.find(n=>String(n.Key)===i)?.Value??i:i}buildFileUrl(e){if(e.VssStyle==="PD"||e.VssStyle==="PF"||e.VssStyle==="DA"){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/SubscriptionDetails/${e.Id}?token=${i}`}return null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-study-course-detail"]],decls:9,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],["link","../..",3,"params"],[1,"status"],[1,"additional-info"],[3,"href"],[1,"ms-2"],[1,"detail"],["target","_blank",3,"href"]],template:function(i,n){if(i&1&&(s(0,"div",0),C(1,"bkd-backlink",1),L(2),b(3,$r,13,10),L(4),b(5,Dr,5,4,"div",2),A(6,Br,2,1,null,null,xr),b(8,Vr,1,0,"bkd-spinner"),a()),i&2){let d;r(),u("params",n.backLink()),r();let g=V(n.person());r(),S(g?3:-1),r();let k=V((d=n.subscription())==null?null:d.Status);r(),S(k?5:-1),r(),H(n.subscriptionDetails()),r(2),S(n.loading()?8:-1)}},dependencies:[w,ve,Ge,me],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}address[_ngcontent-%COMP%]{margin:1rem 0}.status[_ngcontent-%COMP%]{display:flex;align-items:center;padding:1rem 0;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.detail[_ngcontent-%COMP%]{max-width:70ch;padding-top:1rem}.detail[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.detail[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0})}}return t})();var rn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students"]],features:[te([ct])],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[Ce],encapsulation:2,changeDetection:0})}}return t})();var sn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-tests"]],decls:4,vars:4,consts:[[3,"withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),l(1),p(2,"translate"),a(),C(3,"bkd-events-list",0)),i&2&&(r(),v(c(2,2,"events.title")),r(2),u("withRatings",!0))},dependencies:[lt,w],encapsulation:2})}}return t})();var an=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events"]],features:[te([Fe,hi])],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[Ce],encapsulation:2})}}return t})();function on(t){return o=>{let e=Number(o.value);return e<=t?{greaterThan:{value:e,greaterThanValue:t}}:null}}function bt(t){return t.map(({finalGrade:o})=>o).filter(Ar)}function Ar(t){return t!==null}function pn(t,o,e,i){return t?.map(n=>({student:n,finalGrade:jr(n,e,i),grades:Hr(n,o)}))}function Hr(t,o){return o.map(e=>{if(e.Results===void 0||e.Results?.length===0)return{kind:"no-result",test:e};let i=e.Results?.find(n=>n.StudentId===t.Id);return i!==void 0?{kind:"grade",result:i,test:e}:{kind:"no-result",test:e}})}function jr(t,o,e){let i=o.find(d=>d.StudentId===t.Id);if(i)return{gradingId:i.Id,gradeId:i.GradeId??void 0,average:i.AverageTestResult||void 0,canGrade:i.CanGrade};let n=e.find(d=>d.StudentId===t.Id);if(n)return{finalGradeValue:n.Grade,average:n.AverageTestResult||void 0,canGrade:!1};throw new Error(`Student ${t.FullName} has neither a grading and nor a final grade, this should not happen`)}var cn=({key:t,ascending:o})=>(e,i)=>{let n=o?1:-1;switch(t){case"FullName":return n*e.student.FullName.localeCompare(i.student.FullName);case"FinalGrade":return!e.finalGrade?.gradeId||!i.finalGrade?.gradeId?n*-1:n*dn(e.finalGrade.gradeId,i.finalGrade.gradeId);case"TestsMean":return!e.finalGrade?.average||!i.finalGrade?.average?n*-1:n*dn(e.finalGrade.average,i.finalGrade.average)}return n*Nr(t,e,i)},Nr=(t,o,e)=>{let i=o.grades.filter(ln).find(d=>d.test.Id===t.Id),n=e.grades.filter(ln).find(d=>d.test.Id===t.Id);return t.IsPointGrading&&i?.result.GradeId===n?.result.GradeId?(i?.result.Points??0)-(n?.result.Points??0):((i?.result.GradeId??Number.POSITIVE_INFINITY)-(n?.result.GradeId??Number.POSITIVE_INFINITY))*-1};function dn(t,o){return t===o?0:te.average).filter(e=>e!=null&&e!==0).map(Number);return _t(o)}function hn(t,o){return _t(t.map(e=>Ur(e,o)).filter(pi))}function Ur({gradeId:t,finalGradeValue:o},e){let i;t?i=e.find(g=>g.Key===t)?.Value:i=o;let n=Number(i);return isNaN(n)?0:n}var gn=(()=>{class t extends Ze{constructor(){let e=h(je),i=h(pe);super(e,i,Pi,"Gradings")}updateGrade(e,i){return this.http.put(`${this.baseUrl}/${e}`,{GradeId:i}).pipe(y(()=>e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ae({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Tt(t,o){return[...o.filter(e=>e.Id!==t?.Id),t].filter(e=>e!=null)}function fn({id:t,selectedGradeId:o},e){return e.map(i=>i.Id!==t?i:F(G({},i),{GradeId:o}))}function vn(t,o){switch(o.type){case"reset":return o.payload;case"updateResult":return t?F(G({},t),{Tests:bi(o.payload.testResult,t.Tests||[],o.payload.ignore),Gradings:o.payload.grading?Tt(o.payload.grading,t.Gradings||[]):t.Gradings}):null;case"deleteResult":return t?F(G({},t),{Tests:Ti(o.payload.testId,o.payload.studentId,t.Tests||[]),Gradings:o.payload.grading?Tt(o.payload.grading,t.Gradings||[]):t.Gradings||[]}):null;case"toggle-test-state":return t?F(G({},t),{Tests:Ei(o.payload,t.Tests||[])}):null;case"final-grade-overwritten":return t?F(G({},t),{Gradings:fn({id:o.payload.id,selectedGradeId:o.payload.selectedGradeId},t.Gradings||[])}):null;case"replace-grades":return t?F(G({},t),{Gradings:o.payload}):null;case"delete-test":return t?F(G({},t),{Tests:wi(o.payload,t.Tests||[])}):null;default:return t}}var Et={onlyMine:!1,hidePublished:!1},z=(()=>{class t{constructor(){this.coursesRestService=h(ue),this.gradingScalesRestService=h(Ii),this.gradingsRestService=h(gn),this.loadingService=h(_e),this.sortService=h(Ri),this.action$=new ft(1),this.loading$=this.loadingService.loading$,this._courseId$=new ft(1),this.courseId$=this._courseId$.asObservable(),this.fetchedCourse$=this._courseId$.pipe(M(e=>this.loadingService.load(this.coursesRestService.getExpandedCourse(e))),K(1)),this.course$=Ae(this.action$,this.fetchedCourse$.pipe(he(ce),y(e=>({type:"reset",payload:e})))).pipe(Ot(vn,null),he(ce),K(1)),this.tests$=this.course$.pipe(y(e=>e.Tests||[]),y(ki)),this.hasTests$=this.tests$.pipe(y(e=>e.length>0)),this.filterSubject$=new N(Et),this.filter$=this.filterSubject$.asObservable(),this.expandedHeaderSubject$=new N(!1),this.expandedHeader$=this.expandedHeaderSubject$.asObservable(),this.filteredTests$=U([this.tests$,this.filter$]).pipe(y(([e,i])=>e.filter(n=>(!i.onlyMine||n.IsOwner)&&(!i.hidePublished||!n.IsPublished)))),this.sorting$=this.sortService.sorting$,this.studentGrades$=U([this.course$,this.filteredTests$,this.sorting$]).pipe(y($e(this.toStudentGrades.bind(this)))),this.canSetFinalGrade$=this.course$.pipe(y(Bi)),this.gradingScaleIds$=this.course$.pipe(y(e=>oi([...(e.Tests??[]).map(i=>i.GradingScaleId),e.GradingScaleId]).filter(ce)),q(ai),K(1)),this.gradingScales$=this.gradingScaleIds$.pipe(M(e=>this.gradingScalesRestService.getGradingScales(e)),K(1)),this.UNDEFINED_GRADINGSCALE_ID=-1,this.gradingScalesOptions$=this.gradingScales$.pipe(y(e=>e.map(i=>{let n=i?.Id||this.UNDEFINED_GRADINGSCALE_ID,d=i?.Grades.map(g=>({Key:g.Id,Value:g.Designation}))||[];return{id:n,options:d}}).reduce((i,n)=>F(G({},i),{[n.id]:n.options}),{})),K(1)),this.meanOfStudentGradesForCourse$=this.studentGrades$.pipe(y(e=>un(bt(e)))),this.meanOfFinalGradesForCourse$=U([this.gradingScalesOptions$,this.studentGrades$]).pipe(M($e(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(M(e=>this.gradingOptions$(e.GradingScaleId)))}toStudentGrades(e,i=[],n){return pn(e.ParticipatingStudents??[],i,e.Gradings??[],e.FinalGrades??[]).sort(cn(n))}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(se(1),y(i=>{let{originalResult:n,updatedResult:d}=this.buildOptimisticResultUpdate(i,e);return this.updateTestResult(d,null),n}))}saveGrade(e,i){this.course$.pipe(se(1),M(n=>this.coursesRestService.updateTestResult(n.Id,e).pipe(Pt(d=>(i&&this.updateTestResult(G({},i),null),kt(()=>d)))))).subscribe(({testResult:n,grading:d})=>this.updateOrDeleteTestResult(e.testId,e.studentId,n,d,"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 n=xi(e,i.testId,i.studentId),d=n?G({},n):{Id:"",TestId:i.testId,StudentId:i.studentId,CourseRegistrationId:0,GradeId:null,GradeValue:null,GradeDesignation:null,Points:null};return d.GradeId="gradeId"in i?i.gradeId:n?.GradeId??null,d.Points="points"in i?i.points:n?.Points??null,{originalResult:n,updatedResult:d}}updateOrDeleteTestResult(e,i,n,d,g){n?this.updateTestResult(n,d,g):this.deleteTestResult(e,i,d)}updateTestResult(e,i,n){this.action$.next({type:"updateResult",payload:{testResult:e,grading:i??null,ignore:n}})}deleteTestResult(e,i,n){this.action$.next({type:"deleteResult",payload:{testId:e,studentId:i,grading:n}})}toggleTestPublishedState(e){this.action$.next({type:"toggle-test-state",payload:e})}gradingOptions$(e){return e===null?B(null):this.gradingScalesOptions$.pipe(y(i=>i[e]),K(1))}meanOfOverwrittenGradesForCourse(e,i){return this.course$.pipe(y(n=>{if(n.GradingScaleId===null||e[n.GradingScaleId]===void 0)return null;let d=e[n.GradingScaleId];return hn(bt(i),d)}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ae({token:t,factory:t.\u0275fac})}}return t})();var zr=t=>["/events",t,"tests"];function qr(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",O(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Kr(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",O(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Yr(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",O(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Zr(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",O(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Qr(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",O(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Xr(t,o){if(t&1&&(s(0,"div",29)(1,"div",30)(2,"div",16)(3,"label",31),l(4),p(5,"translate"),a(),s(6,"div",32),C(7,"input",33),p(8,"async"),A(9,Zr,3,4,"div",7,Ee),p(11,"async"),a()()(),s(12,"div",30)(13,"div",16)(14,"label",34),l(15),p(16,"translate"),a(),s(17,"div",32),C(18,"input",35),p(19,"async"),A(20,Qr,3,4,"div",7,Ee),p(22,"async"),a()()()(),s(23,"div",36),Gt(),s(24,"math")(25,"mi"),l(26),p(27,"translate"),a(),s(28,"mo"),l(29,"="),a(),s(30,"mfrac")(31,"mrow")(32,"mi"),l(33),p(34,"translate"),a(),s(35,"mo"),l(36,"\xD7"),a(),s(37,"mn"),l(38,"5"),a()(),s(39,"mi"),l(40),p(41,"translate"),a()(),s(42,"mo"),l(43,"+"),a(),s(44,"mn"),l(45,"1"),a()()()),t&2){let e,i,n=m(2);r(4),v(c(5,9,"tests.form.max-points")),r(3),oe("is-invalid",((e=c(8,11,n.maxPointsErrors$))==null?null:e.length)||!1),r(2),H(c(11,13,n.maxPointsErrors$)),r(6),v(c(16,15,"tests.form.max-points-adjusted")),r(3),oe("is-invalid",((i=c(19,17,n.maxPointsAdjustedErrors$))==null?null:i.length)||!1),r(2),H(c(22,19,n.maxPointsAdjustedErrors$)),r(6),f(" ",c(27,21,"tests.form.math.grade")," "),r(7),f(" ",c(34,23,"tests.form.math.points")," "),r(7),v(c(41,25,"tests.form.math.max-points"))}}function Jr(t,o){t&1&&(s(0,"div",28)(1,"span",37),l(2,"Loading..."),a()())}function es(t,o){if(t&1){let e=$();s(0,"form",2),x("ngSubmit",function(){T(e);let n=m();return E(n.onSubmit())}),s(1,"div",3)(2,"div",4)(3,"label",5),l(4),p(5,"translate"),a(),C(6,"input",6),p(7,"async"),p(8,"translate"),A(9,qr,3,4,"div",7,Ee),p(11,"async"),a(),s(12,"div",8)(13,"label",9),l(14),p(15,"translate"),a(),s(16,"div",10)(17,"span",11)(18,"i",12),l(19,"calendar_today"),a()(),s(20,"input",13,0),p(22,"async"),p(23,"translate"),x("click",function(){T(e);let n=fe(21);return E(n.toggle())}),a(),A(24,Kr,3,4,"div",7,Ee),p(26,"async"),a()()(),s(27,"div",14)(28,"label",15),l(29),p(30,"translate"),a(),s(31,"div",4)(32,"div",16)(33,"label",17),l(34),p(35,"translate"),a(),s(36,"div",18),C(37,"input",19),p(38,"async"),A(39,Yr,3,4,"div",7,Ee),p(41,"async"),a()()()(),s(42,"div")(43,"label",15),l(44),p(45,"translate"),a(),s(46,"div",20),C(47,"input",21),s(48,"label",22),l(49),p(50,"translate"),a()(),s(51,"div",20),C(52,"input",23),s(53,"label",24),l(54),p(55,"translate"),a()(),b(56,Xr,46,27),a(),s(57,"div",25)(58,"button",26),p(59,"async"),l(60),p(61,"translate"),a(),s(62,"button",27),l(63),p(64,"translate"),b(65,Jr,3,0,"div",28),a()()()}if(t&2){let e,i,n,d,g=m();u("formGroup",g.formGroup),r(4),v(c(5,26,"tests.form.designation")),r(2),oe("is-invalid",((e=c(7,28,g.designationErrors$))==null?null:e.length)||!1),u("placeholder",c(8,30,"tests.form.designation-placeholder")),r(3),H(c(11,32,g.designationErrors$)),r(5),v(c(15,34,"tests.form.date")),r(3),u("id",g.componentId),r(3),oe("is-invalid",((i=c(22,36,g.dateErrors$))==null?null:i.length)||!1),u("placeholder",c(23,38,"shared.date-select.default-placeholder")),r(4),H(c(26,40,g.dateErrors$)),r(5),v(c(30,42,"tests.form.weight")),r(5),v(c(35,44,"tests.form.factor")),r(3),oe("is-invalid",((n=c(38,46,g.weightErrors$))==null?null:n.length)||!1),r(2),H(c(41,48,g.weightErrors$)),r(5),v(c(45,50,"tests.form.grading-type")),r(3),u("value",!1),r(2),v(c(50,52,"tests.form.grades")),r(3),u("value",!0),r(2),v(c(55,54,"tests.form.points")),r(2),S((d=g.formGroup.get("isPointGrading"))!=null&&d.value?56:-1),r(2),u("disabled",g.saving)("routerLink",D(62,zr,c(59,56,g.courseId$))),r(2),f(" ",c(61,58,"tests.form.cancel")," "),r(2),u("disabled",g.saving),r(),f(" ",c(64,60,"tests.form.save")," "),r(2),S(g.saving?65:-1)}}var ut=(()=>{class t{constructor(){this.fb=h(ei),this.translate=h(re),this.testStateService=h(z),this.test=null,this.saving=!1,this.save=new Q,this.componentId=di("bkd-tests-edit-form"),this.formGroup=this.createFormGroup(),this.submitted$=new N(!1),this.destroy$=new J,this.designationErrors$=Oe(B(this.formGroup),this.submitted$,"designation"),this.dateErrors$=Oe(B(this.formGroup),this.submitted$,"date"),this.maxPointsErrors$=Oe(B(this.formGroup),this.submitted$,"maxPoints"),this.maxPointsAdjustedErrors$=Oe(B(this.formGroup),this.submitted$,"maxPointsAdjusted"),this.weightErrors$=Oe(B(this.formGroup),this.submitted$,"weight"),this.courseId$=this.testStateService.courseId$}ngOnInit(){this.test&&this.setInitialValues(this.test),ci(B(this.formGroup),"isPointGrading").pipe(ge(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:["",Pe.required],date:[null,Pe.required],weight:[1,Pe.compose([Pe.required,on(0)])],isPointGrading:[!1],maxPoints:[{value:null,disabled:!0},Pe.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}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-edit-form"]],inputs:{test:"test",saving:"saving"},outputs:{save:"save"},features:[te([{provide:ii,useClass:si},{provide:ni,useClass:Fi}])],decls:1,vars:1,consts:[["dp","ngbDatepicker"],[3,"formGroup"],[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"],[1,"invalid-feedback"],[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"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[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"],[1,"visually-hidden"]],template:function(i,n){i&1&&b(0,es,66,64,"form",1),i&2&&S(n.formGroup?0:-1)},dependencies:[Ie,Yt,Ne,We,Zt,Ue,qt,Jt,qe,ze,ti,Qt,Xt,ri,Z,W,w],styles:["#factor[_ngcontent-%COMP%], #max-points[_ngcontent-%COMP%], #max-points-adjusted[_ngcontent-%COMP%]{width:5em}"]})}}return t})();var Cn=(()=>{class t{constructor(){this.route=h(ie),this.courseService=h(ue),this.toastService=h(Ye),this.translate=h(re),this.router=h(ke),this.saving$=new N(!1),this.courseId$=this.route.paramMap.pipe(y(e=>Number(e.get("id"))),q())}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:d,isPointGrading:g,maxPoints:k,maxPointsAdjusted:Y}=e;this.courseId$.pipe(M(gt=>this.courseService.add(gt,n,i,d,g,k,Y)),He(()=>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=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-add"]],decls:6,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],[3,"save","saving"]],template:function(i,n){i&1&&(s(0,"h1"),l(1),p(2,"translate"),a(),s(3,"div",0)(4,"bkd-tests-edit-form",1),p(5,"async"),x("save",function(g){return n.save(g)}),a()()),i&2&&(r(),v(c(2,2,"tests.add-title")),r(3),u("saving",c(5,4,n.saving$)))},dependencies:[ut,W,w],encapsulation:2})}}return t})();var _n=(()=>{class t{constructor(){this.activeModal=h(Ke)}get canDeleteTest(){return(this.test?.Results?.filter(i=>i.GradeId!==null||i.GradeValue!==null||i.Points!==null)||[]).length===0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-delete"]],inputs:{test:"test"},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,n){i&1&&(s(0,"div",0)(1,"p",1),l(2),p(3,"translate"),a()(),s(4,"div",2)(5,"button",3),x("click",function(){return n.activeModal.dismiss()}),s(6,"span",4),l(7),p(8,"translate"),a()(),s(9,"button",5),x("click",function(){return n.activeModal.close(n.canDeleteTest?n.test:null)}),s(10,"span",6),l(11),p(12,"translate"),a()()()),i&2&&(r(2),f(" ",c(3,4,n.canDeleteTest?"tests.form.confirm":"tests.form.delete-not-allowed")," "),r(3),u("hidden",!n.canDeleteTest),r(2),f(" ",c(8,6,"tests.dialog.no")," "),r(4),f(" ",c(12,8,n.canDeleteTest?"tests.dialog.yes":"tests.dialog.ok")," "))},dependencies:[w],encapsulation:2})}}return t})();var ts=t=>({test:t});function is(t,o){t&1&&C(0,"bkd-spinner")}function ns(t,o){if(t&1){let e=$();s(0,"div",1)(1,"h1"),l(2),p(3,"translate"),a(),s(4,"button",2),x("click",function(){T(e);let n=m(),d=P(0);return E(n.openDeleteModal(d))}),s(5,"i",3),l(6,"delete"),a()()(),s(7,"bkd-tests-edit-form",4),x("save",function(n){T(e);let d=m();return E(d.save(n))}),a()}if(t&2){m();let e=P(0),i=P(2);r(2),f(" ",O(3,3,"tests.edit-title",D(6,ts,e.Designation))," "),r(5),u("test",e)("saving",i)}}var Sn=(()=>{class t{constructor(){this.state=h(z),this.courseService=h(ue),this.route=h(ie),this.toastService=h(Ye),this.translate=h(re),this.router=h(ke),this.modalService=h(it),this.saving$=new N(!1),this.testId$=this.route.paramMap.pipe(y(e=>Number(e.get("testId"))),q()),this.test$=U([this.state.tests$,this.testId$]).pipe(y(([e,i])=>e.find(n=>n.Id===i)))}openDeleteModal(e){let i=this.modalService.open(_n);i.componentInstance.test=e,i.result.then(n=>{n&&this.courseService.delete(e.CourseId,e.Id).subscribe(this.onDeleteSuccess.bind(this))},()=>{})}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:d,isPointGrading:g,maxPoints:k,maxPointsAdjusted:Y}=e;U([this.state.courseId$,this.testId$]).pipe(se(1),M(([gt,Rn])=>this.courseService.update(gt,Rn,i,n,d,g,k,Y)),He(()=>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(se(1)).subscribe(e=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-edit"]],decls:8,vars:9,consts:[[1,"bkd-container","bkd-container-limited"],[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,n){if(i&1&&(L(0),p(1,"async"),L(2),p(3,"async"),s(4,"div",0),b(5,is,1,0,"bkd-spinner"),p(6,"async"),b(7,ns,8,8),a()),i&2){let d=V(c(1,1,n.test$));r(2),V(c(3,4,n.saving$)),r(3),S(c(6,7,n.state.loading$)?5:d?7:-1)}},dependencies:[ut,me,W,w],encapsulation:2})}}return t})();var rs=t=>({designation:t}),yn=(()=>{class t{constructor(){this.activeModal=h(Ke)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-publish-test"]],inputs:{test:"test"},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,n){i&1&&(s(0,"div",0)(1,"p",1),l(2),p(3,"translate"),a()(),s(4,"div",2)(5,"button",3),x("click",function(){return n.activeModal.dismiss()}),l(6),p(7,"translate"),a(),s(8,"button",4),x("click",function(){return n.activeModal.close(!0)}),l(9),p(10,"translate"),a()()),i&2&&(r(2),f(" ",O(3,3,n.test.IsPublished?"tests.publishing.unpublish":"tests.publishing.publish",D(10,rs,n.test.Designation))," "),r(4),f(" ",c(7,6,"tests.publishing.cancel")," "),r(3),f(" ",c(10,8,"tests.publishing.confirm")," "))},dependencies:[w],encapsulation:2})}}return t})();var ss=t=>({maxPoints:t});function as(t,o){if(t&1&&(s(0,"div",6),l(1),p(2,"translate"),a()),t&2){let e=m(2);r(),f(" ",O(2,1,"global.validation-errors.invalidPoints",D(4,ss,e.maxPoints))," ")}}function os(t,o){if(t&1){let e=$();s(0,"div",3)(1,"input",5,0),x("ngModelChange",function(){T(e);let n=fe(2),d=m();return E(d.onPointsChange(n.value))}),a(),b(3,as,3,6,"div",6),a()}if(t&2){let e=fe(2),i=m();r(),oe("is-invalid",e.errors),de("max",i.maxPoints),de("tabindex",i.tabIndex),u("disabled",i.grade.test.IsPublished||i.hasFinalGrade)("ngModel",i.grade.kind==="grade"?i.grade.result.Points:null),r(2),S(e.errors?3:-1)}}var ds=1250,xn=(()=>{class t{constructor(){this.state=h(z),this.hasFinalGrade=!1,this.maxPoints=0,this.pointsSubject$=new J,this.gradeSubject$=new J,this.gradingScaleDisabledSubject$=new N(!0),this.gradingScaleDisabled$=this.gradingScaleDisabledSubject$.asObservable(),this.destroy$=new J}ngOnInit(){this.gradingScaleDisabledSubject$.next(this.isGradingScaleDisabled()),this.maxPoints=mn(this.grade),this.initSave(this.pointsSubject$.pipe(he(this.isValid.bind(this)),y(e=>({studentId:this.student.Id,testId:this.grade.test.Id,points:e?Number(e):null})))),this.initSave(this.gradeSubject$.pipe(y(e=>({studentId:this.student.Id,testId:this.grade.test.Id,gradeId:e}))))}ngOnChanges(){this.gradingScaleDisabledSubject$.next(this.isGradingScaleDisabled())}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(It(i=>this.state.optimisticallyUpdateGrade(i).pipe(y(n=>({params:i,originalResult:n})))),Mt(ds),ge(this.destroy$)).subscribe(({params:i,originalResult:n})=>this.state.saveGrade(i,n))}isGradingScaleDisabled(){return this.grade.test.IsPublished||this.hasFinalGrade||this.grade.test.IsPointGrading&&this.grade.kind==="grade"&&this.grade.result.Points!=null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-grade"]],inputs:{grade:"grade",student:"student",tabIndex:"tabIndex",gradeOptions:"gradeOptions",hasFinalGrade:"hasFinalGrade"},features:[be],decls:5,vars:8,consts:[["points","ngModel"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"point-input-container","me-2","me-md-3"],["data-testid","grade-select",1,"grade-select",3,"valueChange","options","allowEmpty","value","disabled","tabindex"],["type","number","step","0.01","min","0","data-testid","point-input",1,"form-control",3,"ngModelChange","max","disabled","tabindex","ngModel"],["data-testid","validation-error-message",1,"invalid-feedback"]],template:function(i,n){i&1&&(s(0,"div",1)(1,"div",2),b(2,os,4,7,"div",3),s(3,"bkd-select",4),p(4,"async"),x("valueChange",function(g){return n.onGradeChange(g)}),a()()()),i&2&&(r(2),S(n.grade.test.IsPointGrading?2:-1),r(),u("options",n.gradeOptions)("allowEmpty",!0)("value",n.grade.kind==="grade"?n.grade.result.GradeId:null)("disabled",c(4,6,n.gradingScaleDisabled$))("tabindex",n.tabIndex))},dependencies:[Ie,Ne,We,Ue,qe,ze,Kt,Le,W,w],styles:[".point-input-container[_ngcontent-%COMP%]{width:4em}[_nghost-%COMP%] select{width:127px}@media (min-width: 576px){.point-input-container[_ngcontent-%COMP%]{width:5em}}"]})}}return t})();function ls(t,o){if(t&1&&(s(0,"span",1),l(1),a()),t&2){let e=m();r(),v(e.calculatePointsAverage(e.test))}}var bn=(()=>{class t{constructor(){this.locale=h(Nt)}calculatePointsAverage(e){return this.safeAverage(e,2,Je)}calculateGradeAverage(e){return this.safeAverage(e,3,et)}safeAverage(e,i,n){try{return $i(n(e),this.locale,i)}catch{return Mi}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-average-grades"]],inputs:{test:"test"},decls:4,vars:2,consts:[[1,"d-flex","flex-row","w-100"],["data-testid","average-points",1,"mr-2","mr-md-3","average-points"],["data-testid","average-grade"]],template:function(i,n){i&1&&(s(0,"div",0),b(1,ls,2,1,"span",1),s(2,"span",2),l(3),a()()),i&2&&(r(),S(n.test.IsPointGrading?1:-1),r(2),v(n.calculateGradeAverage(n.test)))},styles:[".average-points[_ngcontent-%COMP%]{min-width:4.5em}@media (min-width: 576px){.average-points[_ngcontent-%COMP%]{min-width:6em}}"]})}}return t})();var Tn=(()=>{class t{constructor(){this.disabled=!1,this.width="127px",this.gradeIdSelected=new Q}onGradeChange(e){this.gradeId?.valueOf()!==void 0&&this.gradeIdSelected.emit({id:this.gradeId?.valueOf(),selectedGradeId:e})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-grade-select"]],inputs:{options:"options",valueId:"valueId",gradeId:"gradeId",disabled:"disabled",width:"width"},outputs:{gradeIdSelected:"gradeIdSelected"},decls:1,vars:5,consts:[["data-testid","grade-select",3,"valueChange","options","allowEmpty","value","disabled","width"]],template:function(i,n){i&1&&(s(0,"bkd-select",0),x("valueChange",function(g){return n.onGradeChange(g)}),a()),i&2&&u("options",n.options)("allowEmpty",!0)("value",n.valueId)("disabled",n.disabled)("width",n.width)},dependencies:[Le],encapsulation:2})}}return t})();var ps=576,En=(()=>{class t{constructor(){this.portal=h(Di),this.state=h(z),this.destroy$=new J,this.handleWindowScroll=()=>{this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleWindowResize=()=>{this.updateStickyWidth(),this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleTableScroll=()=>{this.updateStickyLeftOffset()}}ngOnInit(){U([this.state.filteredTests$,this.state.expandedHeader$]).pipe(ge(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":t,"btn-outline-secondary":o}),kn=(()=>{class t{constructor(){this.filter=Et,this.filterChange=new Q}showOnlyMine(){this.filterChange.next(F(G({},this.filter),{onlyMine:!0}))}showAll(){this.filterChange.next(F(G({},this.filter),{onlyMine:!1}))}onHidePublishedChange(e){let i=(e.target&&e.target instanceof HTMLInputElement&&e.target?.checked)??!1;this.filterChange.next(F(G({},this.filter),{hidePublished:i}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-test-table-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},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,n){i&1&&(s(0,"div",0)(1,"button",1),x("click",function(){return n.showAll()}),l(2),p(3,"translate"),a(),s(4,"button",2),x("click",function(){return n.showOnlyMine()}),l(5),p(6,"translate"),a()(),s(7,"div",3)(8,"div",4)(9,"input",5),x("change",function(g){return n.onHidePublishedChange(g)}),a(),s(10,"label",6),l(11),p(12,"translate"),a()()()),i&2&&(r(),u("ngClass",Ct(12,wn,!n.filter.onlyMine,n.filter.onlyMine)),r(),f(" ",c(3,6,"tests.all-tests")," "),r(2),u("ngClass",Ct(15,wn,n.filter.onlyMine,!n.filter.onlyMine)),r(),f(" ",c(6,8,"tests.owned-tests")," "),r(4),u("checked",n.filter.hidePublished),r(2),f(" ",c(12,10,"tests.hide-published")," "))},dependencies:[le,Ie,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}"]})}}return t})();var cs=["*"],Pn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-preserve-line-height"]],ngContentSelectors:cs,decls:3,vars:0,template:function(i,n){i&1&&(Ht(),s(0,"div"),jt(1),l(2,"\xA0"),a())},encapsulation:2})}}return t})();var In=(()=>{class t{constructor(){this.translate=h(re)}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")}`:""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=At({name:"testSummaryShort",type:t,pure:!0})}}return t})();var ms=t=>[t,"edit"];function us(t,o){t&1&&(s(0,"i",9),l(1,"edit"),a())}function hs(t,o){if(t&1&&(s(0,"div",5)(1,"div",7)(2,"bkd-preserve-line-height"),l(3),p(4,"date"),a(),s(5,"a",8),b(6,us,2,0,"i",9),a()(),s(7,"bkd-preserve-line-height"),l(8),p(9,"testSummaryShort"),a(),s(10,"bkd-preserve-line-height"),l(11),a()()),t&2){let e=m();r(3),v(O(4,5,e.test.Date,"dd.MM.yyyy")),r(2),u("routerLink",D(10,ms,e.test.Id)),r(),S(e.test.IsOwner&&e.test.IsPublished===!1?6:-1),r(2),f(" ",c(9,8,e.test)," "),r(3),v(e.test.Owner)}}function gs(t,o){if(t&1){let e=$();s(0,"div",6)(1,"a",10),p(2,"translate"),x("click",function(){T(e);let n=m();return E(n.unpublishTest())}),s(3,"i",11),l(4,"lock"),a(),s(5,"span"),l(6),p(7,"translate"),a()(),s(8,"bkd-caret",12),x("click",function(){T(e);let n=m();return E(n.emitToggleHeader())}),a()()}if(t&2){let e=m();r(),de("title",c(2,3,"tests.edit")),r(5),v(c(7,5,"tests.published")),r(2),u("expanded",e.expanded)}}function fs(t,o){if(t&1){let e=$();s(0,"div",6)(1,"a",13),p(2,"translate"),x("click",function(){T(e);let n=m();return E(n.publishTest())}),s(3,"i",11),l(4,"lock_open"),a(),s(5,"span"),l(6),p(7,"translate"),a()(),s(8,"bkd-caret",12),x("click",function(){T(e);let n=m();return E(n.emitToggleHeader())}),a()()}if(t&2){let e=m();r(),de("title",c(2,3,"tests.publish")),r(5),v(c(7,5,"tests.not-published")),r(2),u("expanded",e.expanded)}}var Mn=(()=>{class t{constructor(){this.toggleHeader=new Q,this.publish=new Q,this.unpublish=new Q}emitToggleHeader(){this.toggleHeader.emit(!this.expanded)}publishTest(){this.publish.emit(this.test)}unpublishTest(){this.unpublish.emit(this.test)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-test-table-header"]],inputs:{test:"test",expanded:"expanded"},outputs:{toggleHeader:"toggleHeader",publish:"publish",unpublish:"unpublish"},decls:9,vars:5,consts:[[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"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","align-items-center","justify-content-between","test-status"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-link","p-0","edit",3,"routerLink"],[1,"material-icons"],[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,n){i&1&&(s(0,"div",0)(1,"div",1),x("click",function(){return n.emitToggleHeader()}),s(2,"div",2),l(3),a(),C(4,"bkd-caret",3),a(),s(5,"div",4),b(6,hs,12,12,"div",5)(7,gs,9,7,"div",6)(8,fs,9,7,"div",6),a()()),i&2&&(r(2),u("ngClass",n.expanded?"expanded":"collapsed"),r(),f(" ",n.test.Designation," "),r(),u("expanded",n.expanded),r(2),S(n.expanded?6:-1),r(),S(n.test.IsPublished?7:8))},dependencies:[le,yi,Pn,Z,ve,w,In],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: 811px){.test-designation[_ngcontent-%COMP%]{display:inherit!important}.test-status[_ngcontent-%COMP%]{order:initial}.expand-mobile[_ngcontent-%COMP%]{display:none!important}}"]})}}return t})();var vs=["bkdTestEditGradesHeader",""],wt=(t,o)=>o.Id,Cs=t=>({"test-point-grading":t}),_s=t=>({selected:t});function Ss(t,o){if(t&1){let e=$();s(0,"th",3)(1,"bkd-test-table-header",14),x("toggleHeader",function(n){T(e);let d=m();return E(d.state.toggleHeader(n))})("publish",function(n){T(e);let d=m();return E(d.publish.emit(n))})("unpublish",function(n){T(e);let d=m();return E(d.unpublish.emit(n))}),a()()}if(t&2){let e=o.$implicit,i=m(),n=P(4);u("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),u("test",e)("expanded",n)}}function ys(t,o){if(t&1){let e=$();s(0,"th",4)(1,"bkd-test-table-header",14),x("toggleHeader",function(n){T(e);let d=m();return E(d.state.toggleHeader(n))})("publish",function(n){T(e);let d=m();return E(d.publish.emit(n))})("unpublish",function(n){T(e);let d=m();return E(d.unpublish.emit(n))}),a()()}if(t&2){let e=o.$implicit,i=m(),n=P(4);u("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),u("test",e)("expanded",n)}}function xs(t,o){if(t&1){let e=$();s(0,"div",15)(1,"span",16),x("click",function(){T(e);let n=m().$implicit,d=m();return E(d.state.sortBy(n))}),l(2),p(3,"translate"),a()()}t&2&&(r(2),f("",c(3,1,"tests.points")," "))}function bs(t,o){if(t&1){let e=$();s(0,"th",13)(1,"div",8),b(2,xs,4,3,"div",15),s(3,"div",9)(4,"span",16),x("click",function(){let n=T(e).$implicit,d=m();return E(d.state.sortBy(n))}),l(5),p(6,"translate"),a()(),s(7,"div",10),l(8),p(9,"async"),a()()()}if(t&2){let e=o.$implicit,i=m();u("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(2),S(e.IsPointGrading?2:-1),r(3),v(c(6,4,"tests.grade")),r(3),f(" ",c(9,6,i.state.getSortingChar$(e))," ")}}var On=(()=>{class t{constructor(){this.state=h(z),this.element=h(Bt),this.sticky=!1,this.publish=new Q,this.unpublish=new Q}set shown(e){let i=this.element.nativeElement.classList;e?i.add("shown"):i.remove("shown")}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.getRowsAndColumns().map(e=>e.map(i=>i.getBoundingClientRect().width))}setColumnWidths(e){let i=this.getRowsAndColumns();if(i.length!==e.length||!i.every((n,d)=>n.length===e[d].length))throw new Error("Given column widths do not match number of header rows/columns");i.forEach((n,d)=>n.forEach((g,k)=>{g.style.width=`${e[d][k]}px`,g.style.minWidth=`${e[d][k]}px`}))}getStickyColumnsHeights(){return this.getRowsAndColumns(".sticky").map(e=>e.map(i=>i.getBoundingClientRect().height))}setStickyColumnHeights(e){let i=this.getRowsAndColumns(".sticky");if(i.length!==e.length||!i.every((n,d)=>n.length===e[d].length))throw new Error("Given column heights do not match number of sticky header columns");i.forEach((n,d)=>n.forEach((g,k)=>{g.style.height=`${e[d][k]}px`})),this.getRows().forEach((n,d)=>{let g=e[d].reduce((k,Y)=>Math.max(k,Y),0);n.style.height=`${g}px`})}getRowsAndColumns(e){return this.getRows().map(i=>Array.from(i.querySelectorAll(`th:not(.header-mobile)${e??""}`)))}getRows(){return Array.from(this.element.nativeElement.querySelectorAll("tr"))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["thead","bkdTestEditGradesHeader",""]],hostVars:2,hostBindings:function(i,n){i&2&&oe("sticky",n.sticky)},inputs:{selectedTest:"selectedTest",sticky:"sticky",shown:"shown"},outputs:{publish:"publish",unpublish:"unpublish"},attrs:vs,decls:42,vars:32,consts:[[1,"header-collapsible"],["colspan","3",1,"desktop","sticky"],[3,"filterChange","filter"],["container","body",1,"test-grade","grade","test-info-desktop",3,"ngClass"],["container","body","colspan","3",1,"test-grade","header-mobile","test-info-mobile",3,"ngClass"],[1,"filler"],[3,"ngClass"],[1,"sticky","student-name",3,"click"],[1,"d-flex"],[1,"column-title"],[1,"sort-direction","ms-1"],[1,"sticky","student-grade","desktop",3,"click","ngClass"],[1,"border-end","sticky","student-average","desktop",3,"click"],["container","body",1,"test-grade",3,"ngClass"],[3,"toggleHeader","publish","unpublish","test","expanded"],[1,"column-title","point-input-container","me-2","me-md-3"],[3,"click"]],template:function(i,n){if(i&1){let d=$();L(0),p(1,"async"),L(2),p(3,"async"),L(4),p(5,"async"),s(6,"tr",0)(7,"th",1)(8,"bkd-test-table-filter",2),x("filterChange",function(k){return T(d),E(n.state.setFilter(k))}),a()(),A(9,Ss,2,3,"th",3,wt),A(11,ys,2,3,"th",4,wt),C(13,"th",5),a(),s(14,"tr",6)(15,"th",7),x("click",function(){return T(d),E(n.state.sortBy("FullName"))}),s(16,"div",8)(17,"div",9),l(18),p(19,"translate"),a(),s(20,"div",10),l(21),p(22,"async"),a()()(),s(23,"th",11),x("click",function(){return T(d),E(n.state.sortBy("FinalGrade"))}),s(24,"div",8)(25,"div",9),l(26),p(27,"translate"),a(),s(28,"div",10),l(29),p(30,"async"),a()()(),s(31,"th",12),x("click",function(){return T(d),E(n.state.sortBy("TestsMean"))}),s(32,"div",8)(33,"div",9),l(34),p(35,"translate"),a(),s(36,"div",10),l(37),p(38,"async"),a()()(),A(39,bs,10,8,"th",13,wt),C(41,"th",5),a()}if(i&2){let d=c(1,9,n.state.filteredTests$),g=c(3,11,n.state.filter$);r(4),V(c(5,13,n.state.expandedHeader$)),r(4),u("filter",g),r(),H(d),r(2),H(d),r(3),u("ngClass",D(28,Cs,n.selectedTest==null?null:n.selectedTest.IsPointGrading)),r(4),f(" ",c(19,16,"tests.student.name")," "),r(3),f(" ",c(22,18,n.state.getSortingChar$("FullName"))," "),r(2),u("ngClass",D(30,_s,n.selectedTest===void 0)),r(3),f(" ",c(27,20,"tests.grade")," "),r(3),f(" ",c(30,22,n.state.getSortingChar$("FinalGrade"))," "),r(5),f(" ",c(35,24,"tests.mean")," "),r(3),f(" ",c(38,26,n.state.getSortingChar$("TestsMean"))," "),r(2),H(d)}},dependencies:[W,le,w,kn,Mn],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}.sticky[_nghost-%COMP%]{position:fixed;top:0;left:0;z-index:1000;display:none}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}@media (min-width: 811px){.sticky.shown[_nghost-%COMP%]{display:table-header-group}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}.sticky[_nghost-%COMP%]{margin-left:var(--test-columns-offset)}.sticky[_nghost-%COMP%] th.sticky[_ngcontent-%COMP%]{position:fixed}}"],changeDetection:0})}}return t})();var Ts=(t,o)=>o.student.Id,Es=(t,o)=>o.Id,ws=(t,o)=>o.id,ks=t=>({"test-point-grading":t}),$n=t=>({selected:t}),Ps=t=>["student",t,"grades"],Is=t=>({"visible-on-mobile":t});function Ms(t,o){if(t&1&&(s(0,"div"),l(1),a()),t&2){let e=m().$implicit;r(),f(" ",e.finalGrade.finalGradeValue," ")}}function Os(t,o){if(t&1){let e=$();s(0,"bkd-grade-select",19),p(1,"async"),p(2,"async"),x("gradeIdSelected",function(n){T(e);let d=m(2);return E(d.state.overwriteFinalGrade(n))}),a()}if(t&2){let e,i,n=m().$implicit,d=m();u("options",c(1,4,d.state.gradingOptionsForCourse$()))("valueId",(e=n.finalGrade.gradeId)!==null&&e!==void 0?e:null)("gradeId",(i=n.finalGrade.gradingId)!==null&&i!==void 0?i:null)("disabled",c(2,6,d.isEditFinalGradesAllowed(n))===!1)}}function $s(t,o){if(t&1&&(L(0),s(1,"td",11),C(2,"bkd-grade",20),p(3,"async"),a()),t&2){let e=o.$implicit,i=o.$index,n=m(),d=n.$implicit,g=n.$index,k=m(),Y=e.grade;r(),u("ngClass",k.selectedTest!==void 0&&Y.test.Id===k.selectedTest.Id?"selected":""),r(),u("grade",Y)("gradeOptions",c(3,6,k.state.gradingOptionsForTest$(Y.test)))("student",d.student)("hasFinalGrade",!!d.finalGrade.finalGradeValue)("tabIndex",(1+i)*1e3+g)}}function Ds(t,o){if(t&1&&(s(0,"tr")(1,"td",6)(2,"a",15)(3,"div"),l(4),a(),s(5,"div",8),l(6),p(7,"translate"),p(8,"decimalOrDash"),a()()(),s(9,"td",16),b(10,Ms,2,1,"div")(11,Os,3,8,"bkd-grade-select",17),a(),s(12,"td",18),l(13),p(14,"decimalOrDash"),a(),A(15,$s,4,8,"td",11,ws),C(17,"td",12),a()),t&2){let e=o.$implicit,i=m();r(2),u("routerLink",D(15,Ps,e.student.Id)),r(2),v(e.student.FullName),r(2),Be(" ",c(7,7,"tests.mean"),": ",O(8,9,e.finalGrade.average,"1-3")," "),r(3),u("ngClass",D(17,$n,i.selectedTest===void 0)),r(),S(e.finalGrade.finalGradeValue?10:11),r(3),f(" ",O(14,12,e.finalGrade.average,"1-3")," "),r(2),H(i.getGrades(e))}}function Ls(t,o){if(t&1&&(s(0,"td",11),C(1,"bkd-average-grades",21),a()),t&2){let e=o.$implicit,i=m();u("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)||e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),u("test",e)}}function Gs(t,o){if(t&1){let e=$();s(0,"button",22),x("click",function(){T(e);let n=m();return E(n.setAverageAsFinalGrade())}),l(1),p(2,"translate"),a()}if(t&2){let e=m(),i=P(2);u("ngClass",D(4,Is,!i||!e.selectedTest)),r(),f(" ",c(2,2,"tests.set-final-grade")," ")}}var Dn=(()=>{class t{constructor(){this.state=h(z),this.modalService=h(it)}ngOnInit(){this.state.setSorting({key:"FullName",ascending:!0})}setAverageAsFinalGrade(){this.state.course$.pipe(se(1)).subscribe(e=>this.state.setAveragesAsFinalGrades({CourseIds:[e.Id]}))}isEditFinalGradesAllowed(e){return this.state.course$.pipe(y(i=>!!(ot(i)?.value&&e.finalGrade?.canGrade)))}getGrades(e){return e.grades.flatMap(i=>({id:`${e.student.Id}-${i.test.Id}`,grade:i}))}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))}calculatePointsAverage(e){return this.safeAverage(e,Je)}calculateGradeAverage(e){return this.safeAverage(e,et)}safeAverage(e,i){try{return i(e).toString()}catch{return"\u2013"}}openModal(e){let i=this.modalService.open(yn);return i.componentInstance.test=e,i}onCloseModal(e,i){e.result.then(n=>{n&&i()},()=>{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-test-edit-grades"]],inputs:{selectedTest:"selectedTest"},features:[te([Fe])],decls:40,vars:45,consts:[["inlineHeader",""],["stickyHeader",""],[1,"table-responsive-wrapper"],["bkdTestEditGradesHeaderSticky","",1,"table","table-hover","h-100",3,"ngClass","inlineHeader","stickyHeader"],["bkdTestEditGradesHeader","",3,"publish","unpublish","selectedTest"],["bkdTestEditGradesHeader","",3,"publish","unpublish","sticky","selectedTest"],[1,"sticky","student-name"],[1,"d-flex","flex-column"],[1,"student-average-inline"],[1,"desktop","sticky","student-grade",3,"ngClass"],[1,"desktop","border-end","sticky","student-average"],[1,"test-grade",3,"ngClass"],[1,"filler"],[1,"action-buttons"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"ngClass"],[3,"routerLink"],[1,"sticky","student-grade",3,"ngClass"],[3,"options","valueId","gradeId","disabled"],[1,"border-end","sticky","student-average"],[3,"gradeIdSelected","options","valueId","gradeId","disabled"],[3,"grade","gradeOptions","student","hasFinalGrade","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,n){if(i&1){let d=$();L(0),p(1,"async"),L(2),p(3,"async"),L(4),p(5,"async"),s(6,"div",2)(7,"table",3)(8,"thead",4,0),x("publish",function(k){return T(d),E(n.publish(k))})("unpublish",function(k){return T(d),E(n.unpublish(k))}),a(),s(10,"thead",5,1),x("publish",function(k){return T(d),E(n.publish(k))})("unpublish",function(k){return T(d),E(n.unpublish(k))}),a(),s(12,"tbody"),A(13,Ds,18,19,"tr",null,Ts),s(15,"tr")(16,"td",6)(17,"div",7)(18,"div"),l(19),p(20,"translate"),a(),s(21,"div",8),l(22),p(23,"translate"),p(24,"async"),p(25,"decimalOrDash"),a()()(),s(26,"td",9),l(27),p(28,"async"),p(29,"decimalOrDash"),a(),s(30,"td",10),l(31),p(32,"async"),p(33,"decimalOrDash"),a(),A(34,Ls,2,2,"td",11,Es),C(36,"td",12),a()()(),s(37,"div",13),b(38,Gs,3,6,"button",14),p(39,"async"),a()()}if(i&2){let d=fe(9),g=fe(11),k=c(1,13,n.state.filteredTests$);r(2),V(c(3,15,n.state.hasTests$));let Y=c(5,18,n.state.studentGrades$);r(5),u("ngClass",D(41,ks,n.selectedTest==null?null:n.selectedTest.IsPointGrading))("inlineHeader",d)("stickyHeader",g),r(),u("selectedTest",n.selectedTest),r(2),u("sticky",!0)("selectedTest",n.selectedTest),r(3),H(Y),r(6),v(c(20,20,"tests.average")),r(3),Be(" ",c(23,22,"tests.mean"),": ",O(25,26,c(24,24,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(4),u("ngClass",D(43,$n,n.selectedTest===void 0)),r(),f(" ",O(29,31,c(28,29,n.state.meanOfFinalGradesForCourse$),"1-3")," "),r(4),f(" ",O(33,36,c(32,34,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(3),H(k),r(4),S(c(39,39,n.state.canSetFinalGrade$)?38:-1)}},dependencies:[le,Z,Tn,xn,bn,W,w,Oi,En,On],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-decoration:underline}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.student-average-inline[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem;line-height:1}@media (min-width: 811px){.table-responsive-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0}.action-buttons[_ngcontent-%COMP%]{position:sticky;left:0}}@media (max-width: 810px){.apply-average-button[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var Fs=()=>["/events"],Rs=t=>({count:t});function Bs(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=m();r(),f(" ",O(2,1,e.course.ParticipatingStudents.length===1?"courses.registration":"courses.registrations",D(4,Rs,e.course.ParticipatingStudents.length))," ")}}var Ln=(()=>{class t{constructor(){this.reportsService=h(tt),this.course$=new N(null),this.reports$=this.course$.pipe(y(e=>e?.Id),q(),M(e=>e?this.reportsService.getCourseTestsReports(e):B([])),$t([]))}ngOnChanges(e){e.course&&this.course$.next(e.course.currentValue)}getDesignation(){return dt(this.course)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-header"]],inputs:{course:"course"},features:[be],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"],[1,"additional-info"]],template:function(i,n){i&1&&(s(0,"bkd-backlink",0)(1,"div",1)(2,"a",2)(3,"i",3),l(4,"add"),a()(),C(5,"bkd-reports-link",4),p(6,"async"),C(7,"div",5),a()(),s(8,"div",6)(9,"h1"),l(10),a(),b(11,Bs,3,6,"div",7),a()),i&2&&(u("link",we(6,Fs)),r(5),u("reports",c(6,4,n.reports$)),r(5),v(n.getDesignation()),r(),S(n.course.ParticipatingStudents?11:-1))},dependencies:[Ge,Z,Xe,W,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}"]})}}return t})();var Vs=()=>[],As=t=>({"visible-on-mobile":t});function Hs(t,o){t&1&&C(0,"bkd-spinner")}function js(t,o){if(t&1){let e=$();s(0,"bkd-select",4),x("valueChange",function(n){T(e);let d=m(2);return E(n&&d.testSelected(n))}),a(),C(1,"bkd-test-edit-grades",5)}if(t&2){m(2);let e=P(6),i=P(8),n=P(10);u("options",e)("value",i)("allowEmpty",!1),r(),u("selectedTest",n)}}function Ns(t,o){t&1&&(s(0,"p",2),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"tests.no-tests")))}function Us(t,o){if(t&1&&(s(0,"a",3),p(1,"async"),s(2,"i",6),l(3,"arrow_right_alt"),a(),s(4,"span",7),l(5),p(6,"translate"),a()()),t&2){let e=m(2),i=P(4),n=P(10);de("href",c(1,3,e.buildLinkToRatingOverview()),ee),u("ngClass",D(7,As,!i||!n)),r(5),v(c(6,5,"tests.link-to-rating-overview"))}}function Ws(t,o){if(t&1&&(C(0,"bkd-tests-header",1),b(1,js,2,4)(2,Ns,3,3,"p",2)(3,Us,7,9,"a",3),p(4,"async")),t&2){let e=m(),i=P(0),n=P(2);u("course",i),r(),S(n.length>0?1:2),r(2),S(c(4,3,e.state.canSetFinalGrade$)?3:-1)}}var Gn=(()=>{class t{constructor(){this.settings=h(pe),this.state=h(z),this.translate=h(re),this.selectTest$=new J,this.testOptions$=this.state.tests$.pipe(y(e=>[{Key:-1,Value:this.translate.instant("tests.grade")},...e.map(i=>({Key:i.Id,Value:i.Designation}))]),q()),this.selectedTestId$=Ae(this.selectTest$,this.state.tests$.pipe(se(1),y(e=>e[0]?.Id))).pipe(q()),this.selectedTest$=this.selectedTestId$.pipe(M(e=>this.state.tests$.pipe(y(i=>i.find(n=>n.Id===e)))),q())}testSelected(e){this.selectTest$.next(e)}buildLinkToRatingOverview(){return this.state.course$.pipe(se(1),y(e=>this.settings.eventlist.evaluation.replace(":id",String(e.Id))))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-list"]],decls:16,vars:22,consts:[[1,"bkd-container"],[3,"course"],[1,"mt-3","px-3"],[1,"rating-overview","d-flex","justify-content-end","pe-3","border-top","pt-3",3,"ngClass","href"],["width","100%",1,"tests-dropdown",3,"valueChange","options","value","allowEmpty"],[3,"selectedTest"],[1,"material-icons","fw-bold"],[1,"ps-1"]],template:function(i,n){if(i&1&&(L(0),p(1,"async"),L(2),p(3,"async"),L(4),p(5,"async"),L(6),p(7,"async"),L(8),p(9,"async"),L(10),p(11,"async"),s(12,"div",0),b(13,Hs,1,0,"bkd-spinner"),p(14,"async"),b(15,Ws,5,5),a()),i&2){let d;V(c(1,1,n.state.course$)),r(2),V((d=c(3,4,n.state.tests$))!==null&&d!==void 0?d:we(21,Vs)),r(2),V(c(5,7,n.state.hasTests$)),r(2),V(c(7,10,n.testOptions$)),r(2),V(c(9,13,n.selectedTestId$)),r(2),V(c(11,16,n.selectedTest$)),r(3),S(c(14,19,n.state.loading$)?13:15)}},dependencies:[Ln,Le,Dn,le,me,W,w],styles:[".tests-dropdown[_ngcontent-%COMP%]{display:block;padding:1rem 0}@media (min-width: 811px){.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: 810px){a.rating-overview[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var ht=(()=>{class t{constructor(){this.state=h(z),this.route=h(ie),this.courseId$=this.route.paramMap.pipe(y(e=>Number(e.get("id"))),q()),this.destroy$=new J}ngOnInit(){this.courseId$.pipe(ge(this.destroy$)).subscribe(e=>this.state.setCourseId(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests"]],features:[te([z])],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[Ce],encapsulation:2})}}return t})();function Fn(t){return{path:t,component:rn,children:[{path:"",component:tn},{path:"study-course-student/:id",component:nn},St]}}var Zm=[{path:"",component:an,children:[{path:"",component:sn},{path:"current",component:qi,children:[{path:"",component:zi},Fn(":id")]},{path:":id",component:ht,children:[{path:"tests",component:Gn},Fn("students")]},{path:":id/tests/:testId/edit",component:ht,children:[{path:"",component:Sn}]},{path:":id/tests/add",component:ht,children:[{path:"",component:Cn}]},{path:":id/tests",children:[St]}]}];export{Hi as a,Fn as b,Zm as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-CXJU4L5R.js b/public/apps/webapp-schulverwaltung/chunk-A7EOJZ46.js similarity index 87% rename from public/apps/webapp-schulverwaltung/chunk-CXJU4L5R.js rename to public/apps/webapp-schulverwaltung/chunk-A7EOJZ46.js index 2e2d9dad..abb70f98 100644 --- a/public/apps/webapp-schulverwaltung/chunk-CXJU4L5R.js +++ b/public/apps/webapp-schulverwaltung/chunk-A7EOJZ46.js @@ -1 +1 @@ -import{a as o,b as s,sc as c,tc as l}from"./chunk-S3H6YSFW.js";function u(e){return String(e||"").replace(/^\?/,"").split("&").reduce((t,r)=>{let[n,i]=r.split("=");return s(o({},t),{[n]:i})},{})}function p(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return[...t,n==null?r:`${r}=${n}`]},[]).join("&")}function f(e){let i=new l().parse(e)?.root.children[c]?.segments;return i?i[0].path:null}function g(e){let{pathname:t,search:r}=new URL(e,window.location.href);return{link:t,params:u(r)}}export{u as a,p as b,f as c,g as d}; +import{a as o,b as s,wc as c,xc as l}from"./chunk-NEW5VGRB.js";function u(e){return String(e||"").replace(/^\?/,"").split("&").reduce((t,r)=>{let[n,i]=r.split("=");return s(o({},t),{[n]:i})},{})}function p(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return[...t,n==null?r:`${r}=${n}`]},[]).join("&")}function f(e){let i=new l().parse(e)?.root.children[c]?.segments;return i?i[0].path:null}function g(e){let{pathname:t,search:r}=new URL(e,window.location.href);return{link:t,params:u(r)}}export{u as a,p as b,f as c,g as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-AXC265QM.js b/public/apps/webapp-schulverwaltung/chunk-AXC265QM.js deleted file mode 100644 index 1f689ddf..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-AXC265QM.js +++ /dev/null @@ -1 +0,0 @@ -import{a as Y}from"./chunk-RC3KCROY.js";import{a as se,b as ce}from"./chunk-UPTESATB.js";import{f as le,g as de}from"./chunk-LZEJSWWW.js";import{d as K}from"./chunk-XBIMNMBY.js";import{g as q,h as O,j as me}from"./chunk-2AZMKO7X.js";import{a as J,c as Q}from"./chunk-HLAFRD2O.js";import{x as Z}from"./chunk-QTBTUQ3W.js";import{$a as m,Ac as oe,Ga as I,Ic as d,Ja as te,Jb as u,Jc as U,Kb as x,Lb as k,Na as b,Oc as z,P as F,Qa as ne,Qd as pe,Ra as ie,Sd as N,Va as p,Vc as h,Wc as R,X as L,_ as f,_a as c,ab as s,ac as ae,da as ee,dc as re,dd as j,hb as l,kc as B,l as M,lb as y,mc as w,n as G,o as E,rb as r,sb as _,tb as C,ub as v,x as X,xa as g,ya as a,za as V}from"./chunk-S3H6YSFW.js";function ve(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.student.AddressLine2,"")}}function Se(t,o){if(t&1&&(c(0,"a",0),r(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhonePrivate,"",g),a(),C(" ",e.student.PhonePrivate," ")}}function _e(t,o){if(t&1&&(c(0,"a",0),r(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhoneMobile,"",g),a(),C(" ",e.student.PhoneMobile," ")}}function be(t,o){if(t&1&&(c(0,"a",0),r(1),m()),t&2){let e=l();y("href","mailto:",e.email,"",g),a(),C(" ",e.email," ")}}var Qe=(()=>{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}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-address"]],inputs:{student:"student",emailProperty:"emailProperty"},decls:9,vars:7,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),r(1),s(2,"br"),b(3,ve,2,1),r(4),s(5,"br"),b(6,Se,3,3)(7,_e,3,3)(8,be,2,3,"a",0),m()),i&2&&(a(),C(" ",n.student.AddressLine1,""),a(2),p(n.student.AddressLine2?3:-1),a(),v(" ",n.postalCode||""," ",n.student.Location,""),a(2),p(n.student.PhonePrivate?6:-1),a(),p(n.student.PhoneMobile?7:-1),a(),p(n.email?8:-1))},encapsulation:2,changeDetection:0})}}return t})();var $=(()=>{class t{transform(e){return e?.DisplayEmail||e?.Email||e?.Email2||null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=te({name:"bkdPersonEmail",type:t,pure:!0})}}return t})();function Pe(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyName,"")}}function Me(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyNameAddition,"")}}function Ie(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Lastname)||""," ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Firstname)||"","")}}function Ae(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine1,"")}}function Te(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine2,"")}}function De(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PostalCode," ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Location,"")}}function Ee(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness,"",g),a(),_(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness)}}function Le(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.company.apprenticeshipManager),"",g),a(2),_(x(3,5,e.company.apprenticeshipManager))}}function je(t,o){if(t&1&&(c(0,"div",1),r(1),u(2,"translate"),u(3,"addSpace"),s(4,"br"),r(5),u(6,"date"),u(7,"date"),m()),t&2){let e=l();a(),v(" ",x(2,4,"shared.profile.apprenticeship-period"),"",k(3,6,":",":"),""),a(4),v(" ",k(6,9,e.company.apprenticeshipContract.ContractDateFrom,"dd.MM.yyyy"),"\u2013",k(7,12,e.company.apprenticeshipContract.ContractDateTo,"dd.MM.yyyy")," ")}}function ke(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l(2);v(" ",e.company.jobTrainer.Lastname||""," ",e.company.jobTrainer.Firstname||"","")}}function Re(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneBusiness,"",g),a(),_(e.company.jobTrainer.PhoneBusiness)}}function Fe(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneMobile,"",g),a(),_(e.company.jobTrainer.PhoneMobile)}}function Be(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l(2);y("href","mailto:",x(1,3,e.company.jobTrainer),"",g),a(2),_(x(3,5,e.company.jobTrainer))}}function we(t,o){if(t&1&&(c(0,"div",1),r(1),u(2,"translate"),u(3,"addSpace"),c(4,"address"),b(5,ke,2,2)(6,Re,3,3,"a",0)(7,Fe,3,3,"a",0)(8,Be,4,7,"a",0),u(9,"bkdPersonEmail"),m()()),t&2){let e=l();a(),v(" ",x(2,6,"shared.profile.job-trainer"),"",k(3,8,":",":")," "),a(4),p(e.company.jobTrainer.Lastname||e.company.jobTrainer.Firstname?5:-1),a(),p(e.company.jobTrainer.PhoneBusiness?6:-1),a(),p(e.company.jobTrainer.PhoneMobile?7:-1),a(),p(x(9,11,e.company.jobTrainer)?8:-1)}}var at=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-apprenticeship-company"]],inputs:{company:"company"},decls:12,vars:12,consts:[[3,"href"],[1,"subentry"]],template:function(i,n){i&1&&(c(0,"address"),b(1,Pe,2,1)(2,Me,2,1)(3,Ie,2,2)(4,Ae,2,1)(5,Te,2,1)(6,De,2,2)(7,Ee,3,3,"a",0)(8,Le,4,7,"a",0),u(9,"bkdPersonEmail"),m(),b(10,je,8,15,"div",1)(11,we,10,13,"div",1)),i&2&&(a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyName?1:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyNameAddition?2:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Lastname||n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Firstname?3:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine1?4:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine2?5:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PostalCode&&(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Location)?6:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PhoneBusiness?7:-1),a(),p(x(9,10,n.company.apprenticeshipManager)?8:-1),a(2),p(n.company.apprenticeshipContract.ContractDateFrom?10:-1),a(),p(n.company.jobTrainer?11:-1))},dependencies:[re,pe,de,$],styles:[".subentry[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();function Ue(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine1,"")}}function ze(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine2,"")}}function Ne(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",e.person.Zip," ",e.person.Location,"")}}function Oe(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhonePrivate,"",g),a(),_(e.person.PhonePrivate)}}function Je(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhoneMobile,"",g),a(),_(e.person.PhoneMobile)}}function Ye(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.person),"",g),a(2),_(x(3,5,e.person))}}var pt=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-legal-representative"]],inputs:{person:"person"},decls:10,vars:10,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),r(1),s(2,"br"),b(3,Ue,2,1)(4,ze,2,1)(5,Ne,2,2)(6,Oe,3,3,"a",0)(7,Je,3,3,"a",0)(8,Ye,4,7,"a",0),u(9,"bkdPersonEmail"),m()),i&2&&(a(),v(" ",n.person.LastName," ",n.person.FirstName,""),a(2),p(n.person.AddressLine1?3:-1),a(),p(n.person.AddressLine2?4:-1),a(),p(n.person.Zip&&n.person.Zip?5:-1),a(),p(n.person.PhonePrivate?6:-1),a(),p(n.person.PhoneMobile?7:-1),a(),p(x(9,8,n.person)?8:-1))},dependencies:[$],encapsulation:2,changeDetection:0})}}return t})();function W(t,o){let e=+q(t)-+q(o);return e<0?-1:e>0?1:e}function ue(t,o,e){let[i,n]=O(e?.in,t,o);return i.getFullYear()-n.getFullYear()}function he(t,o,e){let[i,n]=O(e?.in,t,o),S=W(i,n),A=Math.abs(ue(i,n));i.setFullYear(1584),n.setFullYear(1584);let T=W(i,n)===-S,P=S*(A-+T);return P===0?0:P}var $e=18;function fe(t){return he(new Date,t.Birthdate||new Date)>=$e}var ge=z({Email:h(d),Email2:h(d),PhoneBusiness:h(d),CompanyName:R(d),CompanyNameAddition:R(d),Firstname:h(d),Lastname:h(d),AddressLine1:R(d),AddressLine2:R(d),PostalCode:h(d),Location:h(d),Id:U});var ye=(()=>{class t extends J{constructor(e,i){super(e,i,ge,"ApprenticeshipManagers")}static{this.\u0275fac=function(i){return new(i||t)(f(w),f(j))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ce=z({Email:h(d),Email2:h(d),PhoneBusiness:h(d),PhoneMobile:h(d),Firstname:h(d),Lastname:h(d),Id:U});var xe=(()=>{class t extends J{constructor(e,i){super(e,i,Ce,"JobTrainers")}static{this.\u0275fac=function(i){return new(i||t)(f(w),f(j))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ot=(()=>{class t{constructor(e,i,n,S,A,T,P){this.studentService=e,this.personsService=i,this.apprenticeshipManagersService=n,this.jobTrainersService=S,this.loadingService=A,this.dropDownItemsService=T,this.storageService=P,this.loading$=this.loadingService.loading$}getProfile(e){return this.loadingService.load(E([this.loadStudent(e),this.loadLegalRepresentatives(e),this.loadApprenticeshipContracts(e)]).pipe(F(K(this.mapToProfile.bind(this)))))}getMyProfile(){let i=(this.storageService.getPayload()?.roles?.split(";")??[]).includes("StudentRole");return this.loadingService.load(this.personsService.getMyself({context:new B().set(Y,{disableErrorHandlingForStatus:[403]})}).pipe(F(n=>E([M(n),i?this.loadLegalRepresentatives(n.Id):M([]),i?this.loadApprenticeshipContracts(n.Id):M([]),this.loadStayPermitValue(n.StayPermit)]))).pipe(F(K(this.mapToProfile.bind(this))),X(Z)))}loadStudent(e){return this.studentService.get(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(Q())}loadLegalRepresentatives(e){return this.studentService.getLegalRepresentatives(e)}loadApprenticeshipContracts(e){return this.studentService.getCurrentApprenticeshipContracts(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(Q([]))}loadStayPermitValue(e){return this.dropDownItemsService.getStayPermits().pipe(G(i=>i.find(n=>n.Key===e)?.Value||null))}mapToProfile(e,i,n,S=null){return e?(i=this.getRelevantLegalRepresentatives(e,i),E([this.loadLegalRepresentativPersons(i),this.loadJobTrainers(n),this.loadApprenticeshipManagers(n)]).pipe(G(([A,T,P])=>this.createProfile(e,S,i,A,n,P,T)))):M(null)}loadLegalRepresentativPersons(e){return e.length===0?M([]):this.personsService.getListForIds(e.map(i=>i.RepresentativeId))}loadJobTrainers(e){let i=e.map(n=>n.JobTrainer).filter(n=>typeof n=="number");return i.length===0?M([]):E(i.map(n=>this.jobTrainersService.get(n)))}loadApprenticeshipManagers(e){let i=e.map(n=>n.ApprenticeshipManagerId);return i.length===0?M([]):E(i.map(n=>this.apprenticeshipManagersService.get(n)))}createProfile(e,i,n,S,A,T,P){return{student:e,stayPermitValue:i||void 0,legalRepresentativePersons:n.map(H=>this.findPerson(H.RepresentativeId,S)).filter(Z),apprenticeshipCompanies:A.map(H=>this.createApprenticeshipCompany(H,T,P))}}getRelevantLegalRepresentatives(e,i){let n=fe(e);return i.filter(S=>!n||S.RepresentativeAfterMajority)}createApprenticeshipCompany(e,i,n){return{apprenticeshipContract:e,jobTrainer:this.findPerson(e.JobTrainer,n),apprenticeshipManager:this.findPerson(e.ApprenticeshipManagerId,i)}}findPerson(e,i){return e&&i.find(n=>n.Id===e)||null}static{this.\u0275fac=function(i){return new(i||t)(f(le),f(ce),f(ye),f(xe),f(me),f(se),f(N))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gt=(()=>{class t{constructor(e,i){this.settings=e,this.storageService=i,this.avatarStyles={}}ngOnChanges(e){e.studentId&&(this.avatarStyles=this.buildAvatarStyles(this.studentId))}buildAvatarStyles(e){return{"background-image":[this.buildAvatarUrl(e),this.fallbackAvatarUrl].map(i=>`url(${i})`).join(", ")}}buildAvatarUrl(e){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/personPictures/${e}?token=${i}`}get fallbackAvatarUrl(){return`${this.settings.scriptsAndAssetsPath}/assets/images/avatar-placeholder.png`}static{this.\u0275fac=function(i){return new(i||t)(V(j),V(N))}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-avatar"]],inputs:{studentId:"studentId",link:"link",linkParams:"linkParams"},features:[ee],decls:1,vars:5,consts:[[1,"avatar",3,"routerLink","queryParams","ngStyle"]],template:function(i,n){i&1&&s(0,"a",0),i&2&&(ie("disabled",!n.link),ne("routerLink",n.link)("queryParams",n.linkParams)("ngStyle",n.avatarStyles))},dependencies:[oe,ae],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}"]})}}return t})();export{Ot as a,Qe as b,at as c,pt as d,Gt as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-B5LBXM2A.js b/public/apps/webapp-schulverwaltung/chunk-B5LBXM2A.js deleted file mode 100644 index fd5c652b..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-B5LBXM2A.js +++ /dev/null @@ -1 +0,0 @@ -import{a as we,b as De}from"./chunk-NK7SMC5C.js";import{b as ve,d as Oe,e as $e}from"./chunk-TMXWSOGF.js";import{b as Ie}from"./chunk-UPTESATB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import{a as z}from"./chunk-EJNJ2ZNZ.js";import{C as ke,E as Pe,G as Ee,H as Te,a as ge,q as ye,r as Se,s as xe,x as Ae,y}from"./chunk-W6XALPR5.js";import{d as Q}from"./chunk-XBIMNMBY.js";import"./chunk-A7CCEKNQ.js";import{j as Le}from"./chunk-2AZMKO7X.js";import{b as Me}from"./chunk-HLAFRD2O.js";import{A as Ce,B as _e}from"./chunk-QTBTUQ3W.js";import"./chunk-HVJBOTRL.js";import{$a as r,Ab as F,Ac as be,Bb as U,Cb as I,Db as ae,Eb as j,F as _,Fb as K,Ga as P,Gb as pe,Jb as a,Kb as l,Lb as B,M as N,Na as w,P as V,Pd as he,Qa as C,Qd as fe,R as Y,Ra as se,Va as R,X as ie,Xa as oe,Ya as G,Za as J,_ as T,_a as c,ab as x,cc as q,dc as le,ea as O,eb as D,f as k,fa as $,g as W,gb as M,hb as f,k as ee,n as b,o as S,qb as re,rb as u,sb as v,tb as E,ub as ce,w as te,x as ne,xc as de,ya as s,yc as me,za as h,zc as ue}from"./chunk-S3H6YSFW.js";var Ue=["studentFullName","studyClassNumber"],A=(()=>{class n{constructor(e,t,i,o){this.lessonPresencesService=e,this.selectionService=t,this.loadingService=i,this.translate=o,this.loading$=this.loadingService.loading$,this.search$=new W(""),this.updateUnconfirmedAbsences$=new k,this.unconfirmedAbsences$=te(this.loadUnconfirmedAbsences(),this.updateUnconfirmedAbsences$).pipe(N(1)),this.entries$=this.unconfirmedAbsences$.pipe(b(ye),N(1)),this.sortCriteriaSubject$=new W({primarySortKey:"date",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=S([this.entries$,this.sortCriteria$]).pipe(b(Q(Se))),this.filteredEntries$=S([this.sortedEntries$,this.search$]).pipe(b(([d,p])=>De(d,Ue,p)),N(1)),this.currentDetail=null}getUnconfirmedAbsences(e,t){return this.entries$.pipe(b(i=>{let o=i.find(d=>d.dateString===e&&d.studentId===t);return o?o.absences:[]}))}getAllUnconfirmedAbsencesForStudent(e){return this.entries$.pipe(b(t=>t.filter(i=>i.studentId===e).reduce((i,o)=>i.concat(o.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(b(Q(xe))).subscribe(e=>{this.selectionService.clear(),this.updateUnconfirmedAbsences$.next(e)})}buildMailToString(e,t){let i=e.Email,o=this.translate.instant("open-absences.detail.mail.subject"),d=t.map(L=>Ae(L)).join("%0D%0A"),p=`${this.translate.instant("open-absences.detail.mail.body")}%0D%0A${d}`;return p.length>=1600&&(p=`${p.substring(0,1500)}%0D%0A${this.translate.instant("open-absences.detail.mail.bodyToLargeForEmailTo")}`),`${i}?subject=${o}&body=${p}`}loadUnconfirmedAbsences(){return this.loadingService.load(this.lessonPresencesService.getListOfUnconfirmed())}static{this.\u0275fac=function(t){return new(t||n)(T($e),T(y),T(Le),T(he))}}static{this.\u0275prov=ie({token:n,factory:n.\u0275fac})}}return n})();var qe=()=>["/open-absences"],Be=(()=>{class n{constructor(e,t,i,o,d,p,L){this.router=e,this.route=t,this.openAbsencesService=i,this.presenceTypesService=o,this.personService=d,this.selectionService=p,this.scrollPosition=L,this.absences$=this.route.paramMap.pipe(V(this.getAbsencesForParams.bind(this))),this.hasAbsences$=this.absences$.pipe(b(Ce(1))),this.studentFullName$=this.absences$.pipe(b(m=>m[0]&&m[0].StudentFullName||null)),this.allSelected$=S([this.absences$,this.selectionService.selection$]).pipe(b(([m,H])=>m.length===H.length)),this.studentEmail$=this.absences$.pipe(b(m=>m[0]&&m[0].StudentRef.Id||null),V(m=>m?this.personService.getByIdWithEmailInfos(m):ee)),this.allUnconfirmedAbsencesForStudent$=this.route.paramMap.pipe(V(this.getAbsencesForStudentParam.bind(this))),this.mailTo$=S([this.studentEmail$,this.allUnconfirmedAbsencesForStudent$]).pipe(b(([m,H])=>this.openAbsencesService.buildMailToString(m,H))),this.destroy$=new k}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$),ne(ge(_e))).subscribe(()=>void 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(b(t=>e.TypeRef.Id&&t.find(i=>i.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")))}static{this.\u0275fac=function(t){return new(t||n)(h(ue),h(de),h(A),h(ke),h(Ie),h(y),h(z))}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences-detail"]],decls:6,vars:10,consts:[[3,"link"],[3,"absences$","selectionService","confirmLink","displayEmail","mailTo$"]],template:function(t,i){t&1&&(c(0,"div"),x(1,"bkd-backlink",0),c(2,"h1"),u(3),a(4,"async"),r()(),x(5,"bkd-student-dossier-absences",1)),t&2&&(s(),C("link",j(9,qe)),s(2),v(l(4,7,i.studentFullName$)),s(2),C("absences$",i.absences$)("selectionService",i.selectionService)("confirmLink","/open-absences/confirm")("displayEmail",!0)("mailTo$",i.mailTo$))},dependencies:[Te,Ee,q],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})}}return n})();var ze=(n,g)=>g.id,Ne=()=>[],Z=n=>({count:n}),He=(n,g)=>["detail",n,g];function We(n,g){if(n&1&&(c(0,"div",2)(1,"div",5),u(2),a(3,"translate"),r(),c(4,"a",6)(5,"i",7),u(6,"edit"),r()()()),n&2){f();let e=I(0);s(2),E(" ",B(3,3,"open-absences.selected",K(6,Z,e.length))," "),s(2),se("disabled",e.length===0)}}function Ye(n,g){n&1&&x(0,"bkd-spinner")}function Ge(n,g){n&1&&(c(0,"p",3),u(1),a(2,"translate"),r()),n&2&&(s(),v(l(2,1,"open-absences.noEntries")))}function Je(n,g){if(n&1&&(c(0,"span",13),u(1),r()),n&2){let e=f().$implicit,t=f(2),i=I(4);s(),v(t.getSortDirectionCharacter(i,e))}}function Qe(n,g){if(n&1){let e=D();c(0,"div",12),M("click",function(){let i=O(e).$implicit,o=f(2);return $(o.openAbsencesService.toggleSort(i))}),u(1),a(2,"translate"),w(3,Je,2,1,"span",13),r()}if(n&2){let e=g.$implicit;f(2);let t=I(4);C("className",e),s(),E(" ",l(2,3,"open-absences.list.header."+e)," "),s(2),R(t?3:-1)}}function Xe(n,g){if(n&1){let e=D();c(0,"div")(1,"div",14)(2,"div",15),M("click",function(i){O(e);let o=re(4),d=f(2);return $(d.onCheckboxCellClick(i,o))}),c(3,"input",10,0),a(5,"async"),M("change",function(){let i=O(e).$implicit,o=f(2);return $(o.selectionService.toggle(i))}),r()(),c(6,"div",16)(7,"a",17),u(8),r()(),c(9,"div",18),u(10),r(),c(11,"div",19),u(12),a(13,"translate"),r(),c(14,"div",20),u(15),a(16,"translate"),r(),c(17,"div",21),u(18),a(19,"bkdDaysDifference"),r(),c(20,"div",22),u(21),a(22,"date"),r()()()}if(n&2){let e=g.$implicit,t=f(2);s(3),C("checked",l(5,9,t.selectionService.isSelected$(e))),s(4),C("routerLink",pe(22,He,e.studentId,e.dateString)),s(),v(e.studentFullName),s(2),E(" ",e.studyClassNumber," "),s(2),E(" ",B(13,11,t.getLessonsCountKey(e),K(25,Z,e.lessonsCount))," "),s(3),ce(" ",e.studyClassNumber,", ",B(16,14,t.getLessonsCountKey(e),K(27,Z,e.lessonsCount))," "),s(3),E(" ",l(19,17,e.date)," "),s(3),v(B(22,19,e.date,"dd.MM.yyyy"))}}function Ze(n,g){if(n&1){let e=D();c(0,"div",4)(1,"div",8)(2,"div",9)(3,"input",10),M("change",function(i){O(e);let o=f();return $(o.onToggleAll(i.currentTarget==null?null:i.currentTarget.checked))}),r()(),G(4,Qe,4,5,"div",11,oe),r(),G(6,Xe,23,29,"div",null,ze),r()}if(n&2){let e=f(),t=I(0),i=I(2);s(3),C("checked",t.length===i.length),s(),J(e.primarySortKeys),s(2),J(i)}}var Ve=(()=>{class n{constructor(e,t,i){this.openAbsencesService=e,this.selectionService=t,this.scrollPosition=i,this.primarySortKeys=["name","date"],this.destroy$=new k}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"}`}static{this.\u0275fac=function(t){return new(t||n)(h(A),h(y),h(z))}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences-list"]],decls:22,vars:29,consts:[["checkbox",""],[1,"d-flex","header-search",3,"valueChange","value","placeholder","label"],[1,"d-flex","align-items-center","justify-content-between","mt-1"],[1,"mt-3"],[1,"content"],[1,"selection-count","ps-1"],["routerLink","/open-absences/confirm",1,"edit","btn","btn-primary","btn-edit","mt-1","mb-2"],[1,"material-icons"],[1,"absence-header"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[3,"className"],[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"]],template:function(t,i){if(t&1){let o=D();F(0),a(1,"async"),F(2),a(3,"async"),F(4),a(5,"async"),F(6),a(7,"async"),c(8,"h1"),u(9),a(10,"translate"),r(),c(11,"div")(12,"div")(13,"bkd-resettable-input",1),a(14,"async"),a(15,"translate"),a(16,"translate"),M("valueChange",function(p){return O(o),$(i.openAbsencesService.search$.next(p))}),r(),w(17,We,7,8,"div",2),r(),w(18,Ye,1,0,"bkd-spinner"),a(19,"async"),w(20,Ge,3,3,"p",3)(21,Ze,8,1,"div",4),r()}if(t&2){let o,d,p;U((o=l(1,6,i.selectionService.selection$))!==null&&o!==void 0?o:j(27,Ne)),s(2);let L=U((d=l(3,9,i.openAbsencesService.filteredEntries$))!==null&&d!==void 0?d:j(28,Ne));s(2),U(l(5,12,i.openAbsencesService.sortCriteria$));let m=((p=(p=l(7,15,i.openAbsencesService.sortedEntries$))==null?null:p.length)!==null&&p!==void 0?p:0)===0||L.length===0;s(5),v(l(10,17,"open-absences.title")),s(4),C("value",l(14,19,i.openAbsencesService.search$))("placeholder",l(15,21,"open-absences.search-by-name-or-class"))("label",l(16,23,"open-absences.search")),s(4),R(m?-1:17),s(),R(l(19,25,i.openAbsencesService.loading$)?18:m?20:21)}},dependencies:[we,be,Me,q,le,fe,Pe],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})}}return n})();var Re=(()=>{class n{constructor(){}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences"]],features:[ae([A,y,{provide:ve,useExisting:A}])],decls:1,vars:0,template:function(t,i){t&1&&x(0,"router-outlet")},dependencies:[me],encapsulation:2,changeDetection:0})}}return n})();var Bt=[{path:"",component:Re,children:[{path:"",component:Ve,data:{restoreScrollPositionFrom:["/open-absences/detail/:personId/:date","/open-absences/confirm"]}},{path:"detail/:personId/:date",component:Be,data:{restoreScrollPositionFrom:["/open-absences/confirm"]}},{path:"confirm",component:Oe}]}];export{Bt as OPEN_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QPVGZCED.js b/public/apps/webapp-schulverwaltung/chunk-BGWLZKVI.js similarity index 81% rename from public/apps/webapp-schulverwaltung/chunk-QPVGZCED.js rename to public/apps/webapp-schulverwaltung/chunk-BGWLZKVI.js index dd131c14..d144cfb7 100644 --- a/public/apps/webapp-schulverwaltung/chunk-QPVGZCED.js +++ b/public/apps/webapp-schulverwaltung/chunk-BGWLZKVI.js @@ -1 +1 @@ -import{k as y}from"./chunk-QTBTUQ3W.js";import{$a as d,Bd as k,Ga as g,Jb as c,Kb as s,Ld as w,Pa as h,Qa as l,Qd as S,_a as p,ea as a,eb as f,fa as o,gb as v,gd as _,jd as b,ma as m,nd as M,qb as D,rb as C,ya as r}from"./chunk-S3H6YSFW.js";var z=(()=>{class t{constructor(){this.value=null,this.placeholder="shared.date-select.default-placeholder",this.minDate=null,this.valueChange=new m,this.componentId=w("bkd-date-select-")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=g({type:t,selectors:[["bkd-date-select"]],inputs:{value:"value",placeholder:"placeholder",minDate:"minDate"},outputs:{valueChange:"valueChange"},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 u=f();p(0,"div",1)(1,"span",2)(2,"i",3),C(3,"calendar_today"),d()(),p(4,"input",4,0),c(6,"translate"),c(7,"translate"),v("click",function(){a(u);let n=D(5);return o(n.toggle())})("ngModelChange",function(n){return a(u),o(e.valueChange.emit(n))}),d()()}i&2&&(r(),l("id",e.componentId),r(3),l("minDate",e.minDate)("ngModel",e.value),h("placeholder",s(6,6,e.placeholder))("aria-label",s(7,8,e.placeholder))("aria-describedby",e.componentId))},dependencies:[y,k,_,b,M,S],encapsulation:2})}}return t})();export{z as a}; +import{k as y}from"./chunk-RXRYDGZR.js";import{Fd as k,Ia as g,Nb as c,Ob as s,Pd as w,Ra as h,Sa as l,Sd as S,ab as p,bb as d,ea as a,fa as o,gb as f,ib as v,kd as _,ma as m,nd as b,rd as M,ub as D,vb as C,ya as r}from"./chunk-NEW5VGRB.js";var z=(()=>{class t{constructor(){this.value=null,this.placeholder="shared.date-select.default-placeholder",this.minDate=null,this.valueChange=new m,this.componentId=w("bkd-date-select-")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=g({type:t,selectors:[["bkd-date-select"]],inputs:{value:"value",placeholder:"placeholder",minDate:"minDate"},outputs:{valueChange:"valueChange"},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 u=f();p(0,"div",1)(1,"span",2)(2,"i",3),C(3,"calendar_today"),d()(),p(4,"input",4,0),c(6,"translate"),c(7,"translate"),v("click",function(){a(u);let n=D(5);return o(n.toggle())})("ngModelChange",function(n){return a(u),o(e.valueChange.emit(n))}),d()()}i&2&&(r(),l("id",e.componentId),r(3),l("minDate",e.minDate)("ngModel",e.value),h("placeholder",s(6,6,e.placeholder))("aria-label",s(7,8,e.placeholder))("aria-describedby",e.componentId))},dependencies:[y,k,_,b,M,S],encapsulation:2})}}return t})();export{z as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-DFJBP4SC.js b/public/apps/webapp-schulverwaltung/chunk-DFJBP4SC.js deleted file mode 100644 index 02dbb8ff..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-DFJBP4SC.js +++ /dev/null @@ -1 +0,0 @@ -import{a as ye,b as Se,c as ge}from"./chunk-T2GDLGV4.js";import{a as be}from"./chunk-PU3XKQPJ.js";import{a as _e}from"./chunk-TO3HOIOR.js";import{a as ue}from"./chunk-DQSLVCJO.js";import"./chunk-AXC265QM.js";import"./chunk-LY5STZD6.js";import"./chunk-RC3KCROY.js";import{b as oe,e as M}from"./chunk-TMXWSOGF.js";import"./chunk-UPTESATB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import{a as ve,b as Ce,c as fe}from"./chunk-3PSL2UAK.js";import{f as de}from"./chunk-LZEJSWWW.js";import{d as me}from"./chunk-UN6AN2DI.js";import"./chunk-CXJU4L5R.js";import"./chunk-M5HHSMYB.js";import{a as he}from"./chunk-EJNJ2ZNZ.js";import{C as se,y as re}from"./chunk-W6XALPR5.js";import"./chunk-XBIMNMBY.js";import"./chunk-A7CCEKNQ.js";import{i as le,j as pe}from"./chunk-2AZMKO7X.js";import{b as ce}from"./chunk-HLAFRD2O.js";import{u as ae}from"./chunk-QTBTUQ3W.js";import"./chunk-HVJBOTRL.js";import{$a as r,$b as Y,Ab as $,Ac as ie,Bb as j,Cb as S,Db as J,Eb as K,F as W,Fb as N,Ga as x,Jb as s,Kb as l,M as q,Na as C,P as V,Pa as z,Qa as v,Qd as D,R as U,Va as b,X as G,Xb as Q,Ya as I,Za as F,_ as E,_a as o,ab as k,cc as Z,dd as ne,ea as L,eb as P,fa as T,gb as h,hb as p,ma as X,n as H,rb as m,sb as y,tb as f,xb as w,xc as ee,ya as a,yb as R,yc as te,za as _,zb as B}from"./chunk-S3H6YSFW.js";var Ee=(()=>{class e{constructor(t,i,n){this.studentsService=t,this.educationalEventsService=i,this.studyClassesService=n,this.filter={student:null,educationalEvent:null,studyClass:null},this.filterChange=new X,this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(this.filter)}static{this.\u0275fac=function(i){return new(i||e)(_(de),_(ge),_(_e))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},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,n){i&1&&(o(0,"div",0)(1,"div",1)(2,"label",2),m(3),s(4,"translate"),r(),o(5,"bkd-typeahead",3),B("valueChange",function(d){return R(n.filter.student,d)||(n.filter.student=d),d}),r()(),o(6,"div",1)(7,"label",2),m(8),s(9,"translate"),r(),o(10,"bkd-typeahead",3),B("valueChange",function(d){return R(n.filter.educationalEvent,d)||(n.filter.educationalEvent=d),d}),r()(),o(11,"div",1)(12,"label",2),m(13),s(14,"translate"),r(),o(15,"bkd-typeahead",4),B("valueChange",function(d){return R(n.filter.studyClass,d)||(n.filter.studyClass=d),d}),r()(),o(16,"div",5)(17,"button",6),h("click",function(){return n.show()}),m(18),s(19,"translate"),r()()()),i&2&&(a(3),y(l(4,11,"evaluate-absences.header.student")),a(2),v("typeaheadService",n.studentsService),w("value",n.filter.student),a(3),y(l(9,13,"evaluate-absences.header.module-instance")),a(2),v("typeaheadService",n.educationalEventsService),w("value",n.filter.educationalEvent),a(3),y(l(14,15,"evaluate-absences.header.study-class")),a(2),v("typeaheadService",n.studyClassesService),w("value",n.filter.studyClass),v("additionalHttpParams",n.classesHttpFilter),a(3),f(" ",l(19,17,"evaluate-absences.header.show")," "))},dependencies:[be,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:1rem 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return e})();var g=(()=>{class e extends Ce{constructor(t,i,n,u,d){super(t,i,d,n,"/evaluate-absences"),this.lessonPresenceService=u,this.queryParamsString$.pipe(U(this.destroy$)).subscribe(A=>this.confirmBackLinkParams={returnparams:A})}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,n){return this.loadingService.load(this.lessonPresenceService.getStatistics(t,i,n),ve)}buildParamsFromFilter(t){return ye(t)}static{this.\u0275fac=function(i){return new(i||e)(E(Q),E(pe),E(ne),E(M),E(fe))}}static{this.\u0275prov=G({token:e,factory:e.\u0275fac})}}return e})();var ke=(e,c)=>c.key,Pe=(e,c)=>c.StudentRef.Id,Ie=()=>[],Fe=e=>["student",e,"absences"],we=e=>({returnparams:e});function Re(e,c){e&1&&k(0,"bkd-spinner")}function Be(e,c){if(e&1){let t=P();o(0,"th",9),h("click",function(){let n=L(t).$implicit,u=p(4);return T(u.state.sortService.toggleSorting(n.key))}),o(1,"div",10)(2,"div",11),s(3,"translate"),m(4),s(5,"translate"),r(),o(6,"div",12),m(7),s(8,"async"),r()()()}if(e&2){let t=c.$implicit,i=p(4);v("ngClass",t.label),a(2),v("ngbTooltip",l(3,4,"evaluate-absences.list.header."+t.label)),a(2),f(" ",l(5,6,"evaluate-absences.list.header."+t.label)," "),a(3),f(" ",l(8,8,i.state.sortService.getSortingChar$(t.key))," ")}}function $e(e,c){if(e&1&&(o(0,"a",13),s(1,"async"),m(2),r()),e&2){let t=p().$implicit,i=p().$implicit,n=p(5);v("routerLink",N(5,Fe,i.StudentRef.Id))("queryParams",N(7,we,l(1,3,n.profileReturnParams$))),a(2),f(" ",i[t.key]," ")}}function je(e,c){if(e&1&&m(0),e&2){let t=p().$implicit,i=p().$implicit;f(" ",i[t.key]," ")}}function De(e,c){if(e&1&&(o(0,"td"),s(1,"translate"),C(2,$e,3,9,"a",13)(3,je,1,1),r()),e&2){let t=c.$implicit;z("data-label",l(1,2,"evaluate-absences.list.header."+t.label)),a(2),b(t.key==="StudentFullName"?2:3)}}function Me(e,c){if(e&1&&(o(0,"tr"),I(1,De,4,4,"td",null,ke),r()),e&2){let t=p(5);a(),F(t.columns)}}function Ve(e,c){if(e&1&&(o(0,"tbody"),I(1,Me,3,0,"tr",null,Pe),r()),e&2){p(4);let t=S(0);a(),F(t)}}function Ne(e,c){e&1&&k(0,"bkd-spinner",7)}function Oe(e,c){if(e&1){let t=P();o(0,"button",14),h("click",function(){L(t);let n=p(4);return T(n.state.nextPage())}),m(1),s(2,"translate"),r()}e&2&&(a(),f(" ",l(2,1,"global.pagination.load-more")," "))}function He(e,c){if(e&1){let t=P();o(0,"div",2)(1,"div",3),k(2,"bkd-reports-link",4),s(3,"async"),r(),o(4,"table",5),h("scrolled",function(){L(t);let n=p(3);return T(n.onScroll())}),o(5,"thead")(6,"tr"),I(7,Be,9,10,"th",6,ke),r()(),C(9,Ve,3,0,"tbody"),r(),C(10,Ne,1,0,"bkd-spinner",7)(11,Oe,3,3,"button",8),r()}if(e&2){let t,i=p(3),n=S(0),u=S(2),d=S(4);a(2),v("reports",(t=l(3,4,i.reports$))!==null&&t!==void 0?t:K(6,Ie)),a(5),F(i.columns),a(2),b(n&&n.length>0?9:-1),a(),b(d?10:-1),a(),b(u&&!d?11:-1)}}function We(e,c){e&1&&(o(0,"p",1),m(1),s(2,"translate"),r()),e&2&&(a(),f(" ",l(2,1,"evaluate-absences.no-entries")," "))}function qe(e,c){if(e&1&&C(0,He,12,7,"div",2)(1,We,3,3,"p",1),e&2){p(2);let t=S(0),i=S(4);b(t&&t.length>0||i?0:1)}}function Ue(e,c){if(e&1&&(C(0,Re,1,0,"bkd-spinner"),s(1,"async"),C(2,qe,2,1)),e&2){let t=p();b(l(1,1,t.state.loading$)?0:2)}}function Ge(e,c){e&1&&(o(0,"p",1),m(1),s(2,"translate"),r()),e&2&&(a(),y(l(2,1,"evaluate-absences.no-filter")))}var Ae=(()=>{class e{constructor(t,i,n,u,d,A){this.state=t,this.scrollPosition=i,this.route=n,this.presenceTypesService=u,this.reportsService=d,this.lessonPresencesService=A,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(H(Xe)),this.profileReturnParams$=this.state.queryParamsString$}ngOnInit(){this.filterFromParams$.pipe(W(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(V(t=>this.lessonPresencesService.getLessonRefs(t)),V(t=>t.length>0?this.reportsService.getEvaluateAbsencesReports(this.getReportRecordIds(t)):[]),q(1))}getReportRecordIds(t){return t.map(i=>`${i.LessonRef.Id}_${i.RegistrationRef.Id}`)}static{this.\u0275fac=function(i){return new(i||e)(_(g),_(he),_(ee),_(se),_(me),_(M))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences-list"]],decls:14,vars:18,consts:[[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"buttons"],[1,"mb-2",3,"reports"],["infiniteScroll","",1,"table","table-striped","table-fixed",3,"scrolled"],["scope","col",3,"ngClass"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],["scope","col",3,"click","ngClass"],[1,"d-flex"],[1,"column-title",3,"ngbTooltip"],[1,"sort-direction"],[1,"student",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let u=P();$(0),s(1,"async"),$(2),s(3,"async"),$(4),s(5,"async"),o(6,"h1"),m(7),s(8,"translate"),r(),o(9,"bkd-evaluate-absences-header",0),s(10,"async"),h("filterChange",function(A){return L(u),T(n.state.setFilter(A))}),r(),C(11,Ue,3,3),s(12,"async"),C(13,Ge,3,3,"p",1)}i&2&&(j(l(1,3,n.state.entries$)),a(2),j(l(3,6,n.state.hasMore$)),a(2),j(l(5,9,n.state.loadingPage$)),a(3),y(l(8,12,"evaluate-absences.title")),a(2),v("filter",l(10,14,n.filterFromParams$)),a(2),b(l(12,16,n.state.isFilterValid$)?11:13))},dependencies:[Ee,le,Se,Y,ae,ie,ce,Z,D],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})}}return e})();function Xe(e){return{student:e.student?Number(e.student):null,educationalEvent:e.educationalEvent?Number(e.educationalEvent):null,studyClass:e.studyClass?Number(e.studyClass):null}}var Le=(()=>{class e{constructor(t){this.state=t}static{this.\u0275fac=function(i){return new(i||e)(_(g))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences"]],features:[J([g,{provide:oe,useExisting:g},re])],decls:1,vars:0,template:function(i,n){i&1&&k(0,"router-outlet")},dependencies:[te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Bt=[{path:"",component:Le,children:[{path:"",component:Ae,data:{restoreScrollPositionFrom:["/evaluate-absences/student/:id"]}},ue]}];export{Bt as EVALUATE_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-DJNW6R6G.js b/public/apps/webapp-schulverwaltung/chunk-DJNW6R6G.js new file mode 100644 index 00000000..311d8d1c --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-DJNW6R6G.js @@ -0,0 +1,3 @@ +import{a as Ge}from"./chunk-Y4QYVF5K.js";import{a as ye}from"./chunk-H664QRX4.js";import{a as _e,c as we,d as De}from"./chunk-JGKXAFYO.js";import{e as Rt,o as Mt}from"./chunk-NC6UEGAF.js";import{i as Te}from"./chunk-SL67CYEF.js";import{a as it}from"./chunk-HQSONWXM.js";import{D as vt,c as he,d as Se,e as Ie,f as be,g as ve,r as Ce,s as xe,x as bt}from"./chunk-RXRYDGZR.js";import{$ as c,$a as Q,$c as ne,Ad as ue,Bd as me,Cd as ge,D as Gt,Eb as dt,Fb as lt,Fd as St,Gb as N,Gd as fe,H as Kt,Ia as w,Ib as Jt,Jb as gt,K as zt,La as J,M as wt,Mc as h,Nb as u,Nc as a,Ob as f,Oc as M,P as b,Pa as x,Pb as j,Qb as Yt,R as Dt,Rc as _,Rd as It,Sa as T,Sb as Qt,Sc as I,Sd as P,Ta as Et,Tc as ft,Vc as Pt,Vd as L,Wd as A,X as E,Xa as y,Zc as m,_a as Y,a as $,ab as l,b as R,bb as d,bc as Zt,c as Ut,cb as Z,da as k,dd as H,ea as z,ec as te,f as ct,fa as X,fd as re,g as O,gb as tt,gc as B,h as st,hc as ee,hd as U,ib as F,ic as ie,jb as S,kd as se,l as _t,m as Lt,ma as Xt,mb as mt,md as $t,n as g,nd as ht,o as ot,qc as et,qd as oe,rd as ae,s as ut,td as de,ub as at,vb as p,vd as le,w as Wt,wb as D,x as qt,xb as v,ya as s,yd as pe,zd as ce}from"./chunk-NEW5VGRB.js";var Ee=I({Id:a,Designation:h,StudentCount:a,Number:h});var Ot=I({Id:h,TestId:a,CourseRegistrationId:a,GradeId:m(a),GradeValue:m(a),GradeDesignation:m(h),Points:m(a),StudentId:a});var Pe=I({Id:a,CourseId:a,Date:H,Designation:h,Weight:a,WeightPercent:a,IsPointGrading:M,MaxPoints:m(a),MaxPointsAdjusted:m(a),IsPublished:M,IsOwner:M,Owner:m(h),GradingScaleId:m(a),Results:m(_(Ot))});var $e=I({Id:a}),Re=ft({HRef:m(h)}),ei=ft({HasEvaluationStarted:M,EvaluationUntil:m(H),HasReviewOfEvaluationStarted:M,HasTestGrading:M,Id:a}),ii=Pt([$e,Re,ei]),ni=ft({Id:a,StudentCount:a}),ri=Pt([$e,Re,ni]),si=I({Grade:h,AverageTestResult:a,Id:a,StudentId:a}),Ft=I({AverageTestResult:a,CanGrade:M,EventId:a,GradeId:m(a),GradeValue:m(a),Id:a,StudentId:a}),W=I({HRef:h,Id:a,Number:h,Designation:h,DateFrom:m(H),DateTo:m(H),StatusId:a,GradingScaleId:m(a),FinalGrades:m(_(si)),Gradings:m(_(Ft)),Tests:m(_(Pe)),EvaluationStatusRef:ii,AttendanceRef:ri,ParticipatingStudents:m(_(_e)),Classes:m(_(Ee))}),Me=I({TestResults:_(Ot),Gradings:_(Ft)}),Oe=I({Gradings:_(Ft)});var Ct=(()=>{class e extends it{constructor(){let t=c(et),i=c(U);super(t,i,W,"Courses"),this.statusCodec=I(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(b(A(this.statusCodec)),g(t=>t.filter(i=>i.EvaluationStatusRef.HasEvaluationStarted===!0)),g(t=>t.length))}getExpandedCourses(t){return Ge(t,"TeacherRole")?this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef,AttendanceRef,Classes,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(b(A(W))):_t([])}getExpandedCourse(t){return this.http.get(`${this.baseUrl}/${t}?expand=ParticipatingStudents,EvaluationStatusRef,Tests,Gradings,FinalGrades,Classes`).pipe(b(L(W)))}getExpandedCourseWithParticipants(t){return this.http.get(`${this.baseUrl}/${t}?expand=ParticipatingStudents,Classes,AttendanceRef`).pipe(b(L(W)))}getExpandedCoursesForDossier(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades,EvaluationStatusRef,ParticipatingStudents,Classes&filter.StatusId=;${this.settings.eventlist.statusfilter}`).pipe(b(A(W)))}getExpandedCoursesForStudent(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"StudentRole"}}).pipe(b(A(W)))}add(t,i,n,o,C,V,rt){let K={Tests:[{Date:Mt(Rt(i),"yyyy-MM-dd'T'HH:mm:ss"),Designation:n,Weight:o,IsPointGrading:C,MaxPoints:V,MaxPointsAdjusted:rt}]};return this.http.put(`${this.baseUrl}/${t}/Tests/New`,K).pipe(g(()=>{}))}update(t,i,n,o,C,V,rt,K){let pt={Tests:[{Id:i,Designation:n,Date:Mt(Rt(o),"yyyy-MM-dd'T'HH:mm:ss"),Weight:C,IsPointGrading:V,MaxPoints:rt,MaxPointsAdjusted:K}]};return this.http.put(`${this.baseUrl}/${t}/Tests/Update`,pt).pipe(g(()=>{}))}delete(t,i){let n={TestIds:[i]};return this.http.put(`${this.baseUrl}/${t}/Tests/Delete`,n).pipe(g(()=>i))}updateTestResult(t,i){let K=i,{studentId:n,testId:o}=K,C=Ut(K,["studentId","testId"]),V={StudentIds:[n],TestId:o},rt="gradeId"in C?R($({},V),{GradeId:C.gradeId}):R($({},V),{Points:C.points});return this.http.put(`${this.baseUrl}/${t}/SetTestResult`,rt).pipe(b(L(Me)),b(({TestResults:pt,Gradings:Ht})=>pt.length<=1&&Ht.length===1?_t({courseId:t,testResult:pt[0]??null,grading:Ht[0]}):Lt(()=>new Error("`TestResults` or `Gradings` does not contain a single value"))))}setAverageAsFinalGrade(t){return this.http.put(`${this.baseUrl}/SetAverageTestResult`,t).pipe(b(L(Oe)))}publishTest(t){let i={TestIds:[t]};return this.http.put(`${this.baseUrl}/PublishTest`,i).pipe(g(()=>t))}unpublishTest(t){let i={TestIds:[t]};return this.http.put(`${this.baseUrl}/UnpublishTest`,i).pipe(g(()=>t))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Fe=I({Id:h,SubscriptionId:a,VssId:a,EventId:a,DropdownItems:m(_(ye)),IdPerson:a,ShowAsRadioButtons:M,Value:m(h),VssDesignation:h,VssStyle:h,VssType:h}),Bt=I({Id:a,EventId:m(a),PersonId:m(a),Status:h,EventDesignation:m(h),RegistrationDate:m(H)});var Be=(()=>{class e extends it{constructor(){let t=c(et),i=c(U);super(t,i,Bt,"Subscriptions")}getSubscriptionIdsByStudentAndCourse(t,i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.PersonId":`=${t}`,"filter.EventId":`;${i}`}}).pipe(b(A(ne)),g(n=>n.map(o=>o.Id)))}getSubscriptionCountsByEvents(t){return this.http.get(`${this.baseUrl}/`,{params:{"filter.EventId":`;${t.join(";")}`,fields:["Id","EventId"].join(",")}}).pipe(b(A(I({Id:a,EventId:a}))),g(i=>i.reduce((n,o)=>(n[o.EventId]=n[o.EventId]?n[o.EventId]+1:1,n),{})))}getSubscriptionsByCourse(t,i){return this.http.get(`${this.baseUrl}/`,{params:R($({"filter.EventId":`=${t}`},i),{fields:["Id","EventId","EventDesignation","PersonId","Status","RegistrationDate"].join(",")})}).pipe(b(A(Bt)))}getSubscriptionDetailsById(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(b(A(Fe)))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ae(e){return e.length===0?0:At(e.map(({value:r,weight:t})=>r*t))/At(e.map(({weight:r})=>r))}function Vt(e){return e.length===0?0:Number(At(e)/e.length)}function At(e){return e.reduce(oi,0)}function oi(e,r){return e+r}function yn(e,r,t){return e?e.Tests?.reduce((i,n)=>i||n.Id===r&&n.Results?.find(o=>o.TestId===r&&o.StudentId===t)||null,null)??null:null}function Tn(e,r,t){return r.map(i=>i.Id===e.TestId?Nt(e,i,t):i)}function _n(e,r,t){return t.map(i=>i.Id===e?ai(r,i):i)}function Gn(e,r){return r.map(t=>t.Id===e?R($({},t),{IsPublished:!t.IsPublished}):t)}function wn(e){let r=li(e);if(r.length===0)throw new Error("unable to calculate averages without results");return Vt(r)}function kt(e){return e.MaxPointsAdjusted||e.MaxPoints}function Dn(e){let r=di(e);if(r.length===0)throw new Error("unable to calculate averages without results");return Vt(r)}function q(e,r){return r.Results?.find(t=>t.StudentId===e)}function En(e,r){return r===null?null:r.filter(t=>t.Id!==e)}function Nt(e,r,t){let i=t&&r.Results?.find(o=>o.TestId===e.TestId&&o.StudentId===e.StudentId),n=r.Results?.filter(o=>!(o.TestId===e.TestId&&o.StudentId===e.StudentId))||[];return i&&t==="grade"?e.GradeId=i.GradeId:i&&t==="points"&&(e.Points=i.Points),R($({},r),{Results:[...n,e]})}function ke(e){return e.slice().sort((r,t)=>t.Date.getTime()-r.Date.getTime())}function xt(e,r){return r?.find(t=>t.Id===e.GradingScaleId)||null}function ai(e,r){return R($({},r),{Results:r.Results?.filter(t=>t.StudentId!==e)||[]})}function di(e){return e.Results?.filter(r=>r.GradeDesignation!==null).map(r=>Number(r.GradeDesignation)).filter(r=>!isNaN(r))||[]}function li(e){return e.Results?.map(r=>r.Points!==null?r.Points:Ve).filter(r=>r>Ve)||[]}var Ve=-1;var pi=I({Id:a,Designation:h}),jt=I({Id:a,Grades:_(pi)});var Ne=(()=>{class e extends it{constructor(){let t=c(et),i=c(U);super(t,i,jt,"GradingScales")}getGradingScale(t){return this.http.get(`${this.baseUrl}/${t}`).pipe(b(L(jt)))}getGradingScales(t){return ut(t.map(this.getGradingScale.bind(this)))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var yt=(()=>{class e{constructor(){this.coursesRestService=c(Ct),this.subscriptionRestService=c(Be),this.reportsService=c(De),this.loadingService=c(Te),this.gradingScalesRestService=c(Ne),this.settings=c(U),this.studentId$=new st(1),this.initialStudentCourses$=this.studentId$.pipe(Kt(),b(this.loadCourses.bind(this)),g(t=>t.sort((i,n)=>i.Designation.localeCompare(n.Designation))),wt(1)),this.action$=new st(1),this.studentCourses$=Wt(this.action$,this.initialStudentCourses$.pipe(g(t=>({type:"initializeCourses",payload:t})))).pipe(zt(this.coursesReducer.bind(this),[]),wt(1)),this.loading$=this.loadingService.loading$,this.studentCourseIds$=this.studentCourses$.pipe(g(t=>t.flatMap(i=>i.Id))),this.subscriptionIds$=ot([this.studentId$,this.studentCourseIds$]).pipe(b(([t,i])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(t,i))),this.testReports$=this.subscriptionIds$.pipe(g(t=>this.reportsService.getTeacherSubscriptionGradesReports(t))),this.tests$=this.studentCourses$.pipe(g(t=>t.flatMap(i=>i.Tests).filter(bt))),this.gradingScaleIdsFromTests$=this.tests$.pipe(g(t=>[...t.map(i=>i.GradingScaleId)].filter(bt).filter(vt))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(g(t=>t.flatMap(i=>i.GradingScaleId).filter(bt).filter(vt))),this.gradingScaleIds$=ot([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(g(([t,i])=>t.concat(i).filter(vt))),this.gradingScales$=this.gradingScaleIds$.pipe(b(t=>ut(t.map(i=>this.gradingScalesRestService.getGradingScale(i)))))}setStudentId(t){this.studentId$.next(t)}getFinalGradeForStudent(t,i){return t?.FinalGrades?.find(n=>n.StudentId===i)}getGradingForStudent(t,i){return t?.Gradings?.find(n=>n.StudentId===i)}getGradingScaleOfCourse(t,i){return i?.find(n=>n.Id===t.GradingScaleId)}getGradesForStudent(t,i,n){return t.Tests?.flatMap(o=>({value:Number(xt(o,n)?.Grades.find(V=>V.Id===q(i,o)?.GradeId)?.Designation),weight:o.Weight})).filter(({value:o})=>!!o)||[]}updateStudentCourses(t){this.action$.next({type:"updateCourses",payload:t})}loadCourses(t){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForDossier().pipe(g(i=>i.filter(n=>n.ParticipatingStudents?.find(o=>o.Id===t)))))}coursesReducer(t,i){switch(i.type){case"initializeCourses":return i.payload;case"updateCourses":return this.updateCourses([...t],i.payload);default:return t}}updateCourses(t,i){return t.map(n=>R($({},n),{Tests:n.Tests!==null?n.Tests.map(o=>o.Id===i.Id?i:o):null}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac})}}return e})();var je=(()=>{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}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var He=(()=>{class e{constructor(){this.modal=c(xe),this.portal=c(je)}open(...t){let i=this.modal.open(...t);return this.applyPortalOffsetAndMaxHeight(i),this.disablePortalScrolling(i),i}get activeInstances(){return this.modal.activeInstances}dismissAll(...t){return this.modal.dismissAll(...t)}hasOpenModals(...t){return this.modal.hasOpenModals(...t)}applyPortalOffsetAndMaxHeight(t){let i=this.getModalWindowElement(t);if(!i){console.warn("Trying to apply portal offset to , but element is not present!");return}this.portal.window&&(i.style.top=`${this.getModalIframeOffset()}px`,i.style.maxHeight=`${this.getModalHeight()}px`)}disablePortalScrolling(t){if(this.portal.window&&this.portal.document){let i=this.portal.window.innerWidth-this.portal.document.clientWidth;this.portal.document.style.paddingRight=`${i}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}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ui=(e,r)=>r.Key,mi=e=>({width:e});function gi(e,r){if(e&1&&(l(0,"option",1),p(1),u(2,"translate"),d()),e&2){let t=S();T("ngValue",null),s(),v(" ",f(2,2,t.emptyLabel)," ")}}function fi(e,r){if(e&1&&(l(0,"option",1),p(1),d()),e&2){let t=r.$implicit;T("ngValue",t),s(),v(" ",t.Value," ")}}var Ue=(()=>{class e{constructor(){this.options=[],this.allowEmpty=!0,this.emptyLabel="",this.value=null,this.disabled=!1,this.tabindex=0,this.width="auto",this.valueChange=new Xt,this.options$=new O([]),this.rawValue$=new O(null),this.value$=ot([this.rawValue$,this.options$]).pipe(g(([t,i])=>i&&i.find(n=>n.Key===t)||null))}ngOnChanges(t){t.value&&this.rawValue$.next(t.value.currentValue),t.options&&this.options$.next(t.options.currentValue)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-select"]],inputs:{options:"options",allowEmpty:"allowEmpty",emptyLabel:"emptyLabel",value:"value",disabled:"disabled",tabindex:"tabindex",width:"width"},outputs:{valueChange:"valueChange"},features:[k],decls:6,vars:9,consts:[[1,"form-select",3,"ngModelChange","tabindex","ngStyle","disabled","ngModel"],[3,"ngValue"]],template:function(i,n){i&1&&(l(0,"select",0),u(1,"async"),F("ngModelChange",function(C){return n.valueChange.emit(C&&C.Key)}),x(2,gi,3,4,"option",1),Y(3,fi,2,2,"option",1,ui),p(5,` > +`),d()),i&2&&(mt("tabindex",n.tabindex),T("ngStyle",gt(7,mi,n.width))("disabled",n.disabled)("ngModel",f(1,5,n.value$)),s(2),y(n.allowEmpty?2:-1),s(),Q(n.options))},dependencies:[St,ce,ue,pe,ht,ae,B,te,P],encapsulation:2,changeDetection:0})}}return e})();function Tt(e,r,t){return r?r.Grade:hi(e,t)||e?.GradeValue}function hi(e,r){return r?.Grades.find(t=>t.Id===e?.GradeId)?.Designation}var Si="1-3",We="\u2013",qe=(()=>{class e{constructor(){this.locale=c(Qt)}transform(t,i,n){let o=Number(t??null);return isNaN(o)?We:Ii(Number(t??null),n??this.locale,i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=J({name:"decimalOrDash",type:e,pure:!0})}}return e})();function Ii(e,r,t){return e===0?We:Zt(e,r,`1.${bi(t)}`)}function bi(e){return e?String(e).includes("-")?String(e):`${e}-${e}`:Si}var Ke=(()=>{class e{constructor(){}getGradeForStudent(){return Tt(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-dossier-grades-final-grade"]],inputs:{finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:14,vars:11,consts:[[1,"final-entry"],["data-testid","final-grade"],["data-testid","average-test-results"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div"),p(2),u(3,"translate"),d(),l(4,"div",1)(5,"span"),p(6),d()(),l(7,"div"),p(8),u(9,"translate"),d(),l(10,"div",2)(11,"span"),p(12),u(13,"decimalOrDash"),d()()()),i&2&&(s(2),D(f(3,4,"dossier.grade")),s(4),D(n.getGradeForStudent()||"\u2013"),s(2),D(f(9,6,"dossier.average")),s(4),D(j(13,8,n.average,"1-3")))},dependencies:[P,qe],styles:[".final-entry[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:repeat(2,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}"]})}}return e})();var ze=(()=>{class e{constructor(){this.translate=c(It)}transform(t,i,n,o="tests.points"){return t.IsPointGrading&&(t.IsPublished||n)?`${q(i,t)?.Points||"\u2013"} / ${t.MaxPointsAdjusted||t.MaxPoints} ${this.translate.instant(o)}`:""}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=J({name:"bkdTestPoints",type:e,pure:!0})}}return e})();var Xe=(()=>{class e{constructor(){this.translate=c(It)}transform(t){return`${this.translate.instant("tests.factor")} ${t.Weight} (${t.WeightPercent}%)`}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=J({name:"bkdTestWeight",type:e,pure:!0})}}return e})();var vi=e=>({maxPoints:e});function Ci(e,r){if(e&1&&(l(0,"div",13),p(1),u(2,"translate"),d()),e&2){let t=S(2);s(),v(" ",j(2,1,"global.validation-errors.invalidPoints",gt(4,vi,t.maxPoints))," ")}}function xi(e,r){if(e&1){let t=tt();l(0,"div",3)(1,"label",11),p(2),u(3,"translate"),d(),l(4,"div",6)(5,"input",12,0),F("input",function(){z(t);let n=at(6),o=S();return X(o.onPointsChange(n.value))}),d()(),x(7,Ci,3,6,"div",13),d()}if(e&2){let t=S();s(2),D(f(3,8,"dossier.dialog.points")),s(2),Et("is-invalid",t.pointsInput.errors),s(),Et("is-invalid",t.pointsInput.errors),mt("max",t.maxPoints),T("formControl",t.pointsInput),s(2),y(t.pointsInput.errors?7:-1)}}var Je=500,Ye=(()=>{class e{constructor(){this.activeModal=c(Ce),this.courseService=c(Ct),this.maxPoints=0,this.gradeSubject$=new ct,this.pointsSubject$=new ct,this.closeButtonDisabled$=new O(!1),this.gradingScaleDisabled$=new O(!0),this.grade$=this.gradeSubject$.pipe(Gt(Je)),this.points$=this.pointsSubject$.pipe(Gt(Je),qt(this.isValid.bind(this)),g(Number)),this.destroy$=new ct}ngOnInit(){this.maxPoints=kt(this.test),this.pointsInput=new oe({value:this.points,disabled:!1},[$t.min(0),$t.pattern("[0-9]+([\\.][0-9]+)?"),this.maxPointValidator()]),this.gradingScaleDisabled$.next(this.test.IsPointGrading&&this.points>0),this.points$.pipe(Dt(this.destroy$)).subscribe(t=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,points:t})),this.grade$.pipe(Dt(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:i})=>{this.gradeId=i?.GradeId??null,this.updatedTestResult=i,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)>kt(this.test)?{customMax:!0}:null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-dossier-grades-edit"]],inputs:{test:"test",gradeId:"gradeId",gradeOptions:"gradeOptions",points:"points",studentId:"studentId"},decls:19,vars:20,consts:[["pointInput",""],[1,"modal-body"],[1,"mb-4"],[1,"form-group","row"],[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"],["for","points",1,"col-6","col-form-label"],["id","points","type","number","step","0.01","min","0",1,"form-control",3,"input","max","formControl"],["data-testid","validation-error-message",1,"invalid-feedback","col-6","offset-6"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"p",2),p(2),d(),x(3,xi,8,10,"div",3),l(4,"div",4)(5,"label",5),p(6),u(7,"translate"),d(),l(8,"div",6)(9,"bkd-select",7),u(10,"async"),F("valueChange",function(C){return C&&n.onGradeChange(C)}),d()()(),l(11,"p",8),p(12),u(13,"translate"),d()(),l(14,"div",9)(15,"button",10),u(16,"async"),F("click",function(){return n.activeModal.close(n.updatedTestResult)}),p(17),u(18,"translate"),d()()),i&2&&(s(2),D(n.test.Designation),s(),y(n.test.IsPointGrading?3:-1),s(3),D(f(7,10,"dossier.dialog.grade")),s(3),T("options",n.gradeOptions)("value",n.gradeId)("allowEmpty",!1)("disabled",f(10,12,n.gradingScaleDisabled$)),s(3),v(" ",f(13,14,n.test.IsPointGrading?"dossier.dialog.hint.points":"dossier.dialog.hint.grade")," "),s(3),T("disabled",f(16,16,n.closeButtonDisabled$)),s(2),v(" ",f(18,18,"dossier.dialog.close")," "))},dependencies:[St,se,de,ht,ge,me,fe,le,Ue,B,P],encapsulation:2})}}return e})();function yi(e,r){if(e&1){let t=tt();l(0,"a",10),F("click",function(){z(t);let n=S(2),o=N(0);return X(n.editGrading(o))}),l(1,"i",11),p(2,"edit"),d(),l(3,"span",5),p(4),d()()}if(e&2){S(2);let t=N(2);s(4),D(t)}}function Ti(e,r){if(e&1&&(l(0,"span",5),p(1),d()),e&2){S(2);let t=N(2);s(),D(t)}}function _i(e,r){if(e&1&&(l(0,"div",9),p(1),u(2,"translate"),d()),e&2){S(2);let t=N(0);s(),v(" ",f(2,1,t.IsPublished?"tests.published":"tests.not-published")," ")}}function Gi(e,r){if(e&1&&(l(0,"div",0)(1,"div",1),p(2),d(),l(3,"div",2),p(4),u(5,"date"),d(),l(6,"div",3),x(7,yi,5,1,"a",4)(8,Ti,2,1,"span",5),d(),l(9,"div",6),p(10),u(11,"bkdTestWeight"),d(),l(12,"div",7)(13,"span"),p(14),u(15,"bkdTestPoints"),d()(),l(16,"div",8),p(17),d(),x(18,_i,3,3,"div",9),d()),e&2){let t=S(),i=N(0);s(2),v(" ",i.Designation," "),s(2),v(" ",j(5,7,i.Date,"dd.MM.yyyy")," "),s(3),y(t.isEditable&&i.IsOwner?7:8),s(3),v(" ",f(11,10,i)," "),s(4),D(Yt(15,12,i,t.studentId,t.isEditable,"dossier.points")),s(3),v(" ",i.Owner," "),s(),y(t.isEditable?18:-1)}}var Qe=(()=>{class e{constructor(){this.gradeService=c(yt),this.modalService=c(He),this.test$=new st(1),this.grading$=this.test$.pipe(g(this.getGrading.bind(this)))}ngOnChanges(t){t.test&&this.test$.next(this.test)}editGrading(t){let i=this.modalService.open(Ye,{backdrop:"static"});i.componentInstance.test=t,i.componentInstance.gradeId=this.getGradeId(t),i.componentInstance.gradeOptions=e.mapToOptions(this.gradingScale),i.componentInstance.studentId=this.studentId,i.componentInstance.points=this.getPoints(t),i.result.then(n=>{n&&this.updateStudentGrade(n,t)},()=>{})}updateStudentGrade(t,i){let n=Nt(t,i);this.gradeService.updateStudentCourses(n)}getGrading(t){return this.gradingScale?.Grades.find(i=>i.Id===this.getGradeId(t))?.Designation||"\u2013"}getGradeId(t){return q(this.studentId,t)?.GradeId||null}getPoints(t){return q(this.studentId,t)?.Points||null}static mapToOptions(t){return t?.Grades.map(i=>({Key:i.Id,Value:i.Designation}))||null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-dossier-single-test"]],inputs:{test:"test",studentId:"studentId",gradingScale:"gradingScale",isEditable:"isEditable"},features:[k],decls:5,vars:7,consts:[[1,"test-entry"],["data-testid","test-designation",1,"designation"],["data-testid","test-date",1,"date"],[1,"grade"],["aria-label","edit grade",1,"btn","btn-link"],["data-testid","test-grade"],["data-testid","test-factor",1,"factor"],["data-testid","test-points",1,"points"],["data-testid","test-teacher",1,"teacher"],["data-testid","test-status",1,"state"],["aria-label","edit grade",1,"btn","btn-link",3,"click"],["data-testid","test-grade-edit-icon",1,"material-icons"]],template:function(i,n){if(i&1&&(dt(0),u(1,"async"),dt(2),u(3,"async"),x(4,Gi,19,17,"div",0)),i&2){let o=lt(f(1,1,n.test$));s(2),lt(f(3,4,n.grading$)),s(2),y(o?4:-1)}},dependencies:[B,ee,P,ze,Xe],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)}}']})}}return e})();var wi=(e,r)=>r.Id,Di=()=>[];function Ei(e,r){if(e&1&&Z(0,"bkd-dossier-single-test",2),e&2){let t=r.$implicit,i=S(2);T("test",t)("studentId",i.studentId)("gradingScale",i.getGradingScaleOfTest(t))("isEditable",i.isEditable)}}function Pi(e,r){if(e&1&&(l(0,"div"),Z(1,"bkd-dossier-grades-final-grade",1),Y(2,Ei,1,4,"bkd-dossier-single-test",2,wi),d()),e&2){let t=S(),i=N(0);s(),T("finalGrade",t.decoratedCourse.finalGrade)("grading",t.decoratedCourse.grading)("gradingScale",t.decoratedCourse.gradingScale)("average",t.decoratedCourse.average),s(),Q(i)}}function $i(e,r){e&1&&(l(0,"p",0),p(1),u(2,"translate"),d()),e&2&&(s(),v(" ",f(2,1,"dossier.no-tests")," "))}var Ze=(()=>{class e{ngOnChanges(t){t.decoratedCourse&&this.sortedTests$.next(this.sortedTests())}constructor(){this.sortedTests$=new O([])}sortedTests(){return this.decoratedCourse.course.Tests?ke(this.decoratedCourse.course.Tests):[]}getGradingScaleOfTest(t){return xt(t,this.gradingScales)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-dossier-course-tests"]],inputs:{studentId:"studentId",decoratedCourse:"decoratedCourse",gradingScales:"gradingScales",isEditable:"isEditable"},features:[k],decls:4,vars:5,consts:[["data-testid","message-no-tests",1,"p-3"],[3,"finalGrade","grading","gradingScale","average"],[3,"test","studentId","gradingScale","isEditable"]],template:function(i,n){if(i&1&&(dt(0),u(1,"async"),x(2,Pi,4,4,"div")(3,$i,3,3,"p",0)),i&2){let o,C=lt((o=f(1,1,n.sortedTests$))!==null&&o!==void 0?o:Jt(4,Di));s(2),y(C.length>0?2:3)}},dependencies:[Ke,Qe,B,P],encapsulation:2})}}return e})();function Ri(e,r){if(e&1&&(l(0,"span",0),p(1),d()),e&2){let t=S();s(),v(" (",t.grade,")")}}function Mi(e,r){if(e&1&&(l(0,"span",1),p(1),u(2,"number"),d()),e&2){let t=S();s(),v(" (",j(2,1,t.average,"1.1-3"),")")}}var ti=(()=>{class e{constructor(){}get grade(){return this.getGradeForStudent()}getGradeForStudent(){return Tt(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-dossier-grades-course-header"]],inputs:{designation:"designation",finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:3,vars:3,consts:[["data-testId","grade",1,"grade"],["data-testId","average",1,"average"]],template:function(i,n){i&1&&(p(0),x(1,Ri,2,1,"span",0)(2,Mi,3,4,"span",1)),i&2&&(v("",n.designation,` +`),s(),y(n.grade?1:-1),s(),y(!n.grade&&n.average?2:-1))},dependencies:[ie],styles:[".average[_ngcontent-%COMP%]{color:#00000080}"]})}}return e})();var Oi=(e,r)=>r.course.Id;function Fi(e,r){if(e&1&&Z(0,"bkd-dossier-course-tests",9),e&2){let t=S().$implicit,i=S(2);T("decoratedCourse",t)("studentId",i.studentId)("gradingScales",i.gradingScales)("isEditable",i.isEditable)}}function Bi(e,r){if(e&1){let t=tt();l(0,"div")(1,"div",2)(2,"div",3,0)(4,"div",4)(5,"bkd-student-dossier-entry-header",5),F("click",function(){z(t);let n=at(3);return X(n.toggle())}),Z(6,"bkd-dossier-grades-course-header",6),d()(),l(7,"div",7)(8,"div",8),x(9,Fi,1,4,"ng-template"),d()()()()()}if(e&2){let t=r.$implicit,i=at(3);s(5),T("opened",!i.collapsed),s(),T("designation",t.course.Designation)("finalGrade",t.finalGrade)("grading",t.grading)("gradingScale",t.gradingScale)("average",t.average)}}function Ai(e,r){if(e&1&&(Y(0,Bi,10,6,"div",null,Oi),u(2,"async")),e&2){let t=S();Q(f(2,0,t.decoratedCoursesSubject$))}}function Vi(e,r){e&1&&(l(0,"p",1),p(1),u(2,"translate"),d()),e&2&&(s(),v(" ",f(2,1,"dossier.no-courses")," "))}var Ds=(()=>{class e{constructor(){this.dossierGradesService=c(yt),this.isEditable=!0,this.decoratedCoursesSubject$=new O([])}ngOnChanges(){this.decoratedCoursesSubject$.next(this.decorateCourses())}decorateCourses(){return this.courses.map(t=>{let i=this.dossierGradesService.getFinalGradeForStudent(t,this.studentId),n=this.dossierGradesService.getGradesForStudent(t,this.studentId,this.gradingScales);return{course:t,finalGrade:i,grading:this.dossierGradesService.getGradingForStudent(t,this.studentId),gradingScale:this.dossierGradesService.getGradingScaleOfCourse(t,this.gradingScales),average:i?.AverageTestResult||Ae(n)}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["bkd-dossier-grades-view"]],inputs:{courses:"courses",studentId:"studentId",gradingScales:"gradingScales",isEditable:"isEditable"},features:[k],decls:2,vars:1,consts:[["courses","ngbAccordionItem"],["data-testid","message-no-courses",1,"py-3"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[3,"designation","finalGrade","grading","gradingScale","average"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"decoratedCourse","studentId","gradingScales","isEditable"]],template:function(i,n){i&1&&x(0,Ai,3,2)(1,Vi,3,3,"p",1),i&2&&y(n.courses.length>0?0:1)},dependencies:[ve,be,Ie,we,ti,Se,he,Ze,B,P],encapsulation:2})}}return e})();export{Vt as a,yn as b,Tn as c,_n as d,Gn as e,wn as f,Dn as g,En as h,ke as i,Ee as j,Ft as k,Ct as l,Ne as m,Fe as n,Be as o,yt as p,We as q,qe as r,Ii as s,je as t,He as u,Ue as v,Ds as w}; diff --git a/public/apps/webapp-schulverwaltung/chunk-DQSLVCJO.js b/public/apps/webapp-schulverwaltung/chunk-DQSLVCJO.js deleted file mode 100644 index 08343b91..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-DQSLVCJO.js +++ /dev/null @@ -1 +0,0 @@ -import{a as we,b as Ee,c as je,d as Ve,e as Me}from"./chunk-AXC265QM.js";import{t as R,w as Fe}from"./chunk-LY5STZD6.js";import{d as $e,e as Te}from"./chunk-TMXWSOGF.js";import{b as te}from"./chunk-UN6AN2DI.js";import{a as Be}from"./chunk-CXJU4L5R.js";import{C as Z,G as Le,H as Re,y as Ie}from"./chunk-W6XALPR5.js";import{i as Pe}from"./chunk-2AZMKO7X.js";import{b as ee}from"./chunk-HLAFRD2O.js";import{c as Y,d as z,e as J,f as K,g as X}from"./chunk-QTBTUQ3W.js";import{a as ke}from"./chunk-HVJBOTRL.js";import{$a as a,Ab as g,Ac as ye,Bb as y,Bc as Se,Cb as v,Db as W,Eb as re,Fb as ae,Ga as I,Jb as d,Kb as m,L as me,Lb as ve,M as ue,Na as c,O as oe,P as E,Pd as De,Qa as p,Qd as M,R as U,Ra as fe,Va as _,Wa as _e,X as Q,Ya as N,Za as O,_ as L,_a as r,a as j,ab as b,b as V,cc as w,dc as Ce,dd as Ae,ea as k,eb as F,f as q,fa as D,g as ce,gb as $,h as se,hb as l,ib as be,jb as he,k as de,l as pe,n as P,o as le,qb as h,rb as u,sb as H,tb as f,xc as xe,ya as n,yc as ge,za as x}from"./chunk-S3H6YSFW.js";var ie=(()=>{class e{constructor(t,i,s,C,B){this.settings=t,this.lessonPresencesService=i,this.presenceTypesService=s,this.toastService=C,this.translate=B,this.studentId$=new se(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(t){this.studentId$.next(t)}getAbsences(t){return this.studentId$.pipe(E(t),oe(null),me({connector:()=>new se(1)}))}getCounts(){return this.studentId$.pipe(E(t=>le([this.loadStatistics(t).pipe(oe(null)),this.openAbsences$.pipe(P(i=>i?.length??null)),this.checkableAbsences$.pipe(P(i=>i?.length??null))])),P(([t,i,s])=>({openAbsences:i,checkableAbsences:s,excusedAbsences:t?.TotalAbsencesValidExcuse??null,unexcusedAbsences:t?.TotalAbsencesWithoutExcuse??null,incidents:t?.TotalIncidents??null,halfDays:t?.TotalHalfDays??null})))}loadStatistics(t){return this.lessonPresencesService.getStatistics({student:t,educationalEvent:null,studyClass:null},null,0).pipe(E(({entries:i})=>i.length>0?pe(i[0]):(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),de)))}loadOpenAbsences(t){return this.lessonPresencesService.getListOfUnconfirmed(this.getBaseParams(t))}loadCheckableAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.checkableAbsenceStateId}`})})}loadExcusedAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.excusedAbsenceStateId}`})})}loadUnexcusedAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.unexcusedAbsenceStateId}`})})}loadIncidents(t){return this.presenceTypesService.incidentTypes$.pipe(P(i=>V(j({},this.getBaseParams(t)),{"filter.TypeRef":`;${i.map(s=>s.Id).join(";")}`})),E(i=>this.lessonPresencesService.getList({params:i})))}loadHalfDays(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.TypeRef":`=${this.settings.halfDayPresenceTypeId}`})})}getBaseParams(t){return{sort:"LessonDateTimeFrom.asc","filter.StudentRef":`=${t}`}}static{this.\u0275fac=function(i){return new(i||e)(L(Ae),L(Te),L(Z),L(ke),L(De))}}static{this.\u0275prov=Q({token:e,factory:e.\u0275fac})}}return e})();var T=(()=>{class e{constructor(t,i){this.profileService=t,this.route=i,this.currentDossier$=new ce("addresses"),this.studentId$=this.route.paramMap.pipe(P(s=>Number(s.get("id")))),this.profile$=this.studentId$.pipe(E(s=>this.profileService.getProfile(s)),ue(1)),this.returnParams$=this.route.queryParams.pipe(P(({returnparams:s})=>s)),this.backlinkQueryParams$=this.returnParams$.pipe(P(Be)),this.loading$=this.profileService.loading$}static{this.\u0275fac=function(i){return new(i||e)(L(we),L(xe))}}static{this.\u0275prov=Q({token:e,factory:e.\u0275fac})}}return e})();function ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.checkableAbsences,") ")}}function Je(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.checkableAbsences$)}}function Ke(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.openAbsences,") ")}}function Xe(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",14),e&2){let t=l();p("absences$",t.absencesService.openAbsences$)("selectionService",t.absencesSelectionService)}}function Ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.excusedAbsences,") ")}}function et(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.excusedAbsences$)}}function tt(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.unexcusedAbsences,") ")}}function it(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let t=l();p("absences$",t.absencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function nt(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.incidents,") ")}}function st(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.incidents$)}}function ot(e,o){if(e&1&&u(0),e&2){l(2);let t=v(0);f(" (",t==null?null:t.halfDays,") ")}}function rt(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let t=l(2);p("absences$",t.absencesService.halfDays$)("displayPresenceType",!1)}}function at(e,o){if(e&1){let t=F();r(0,"div",12,5)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),c(6,ot,1,1),a()(),r(7,"div",10)(8,"div",11),c(9,rt,1,2,"ng-template"),a()()()}if(e&2){let t=h(1);l();let i=v(0);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,3,"shared.profile.half-days")," "),n(2),_((i==null?null:i.halfDays)!==null?6:-1)}}var Ge=(()=>{class e{constructor(t,i,s,C){this.state=t,this.presenceTypesService=i,this.absencesService=s,this.absencesSelectionService=C,this.halfDayActive$=this.presenceTypesService.halfDayActive$,this.destroy$=new q,this.state.currentDossier$.next("absences")}ngOnInit(){this.state.studentId$.pipe(U(this.destroy$)).subscribe(t=>this.absencesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(Z),x(ie),x(Ie))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-absences"]],features:[W([ie])],decls:55,vars:31,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["halfDays","ngbAccordionItem"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","","id","half-days"],[3,"absences$"],[3,"absences$","selectionService"],[3,"absences$","displayPresenceType"]],template:function(i,s){if(i&1){let C=F();g(0),d(1,"async"),r(2,"div",6)(3,"div",7,0)(5,"div",8)(6,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(4);return D(S.toggle())}),u(7),d(8,"translate"),c(9,ze,1,1),a()(),r(10,"div",10)(11,"div",11),c(12,Je,1,1,"ng-template"),a()()(),r(13,"div",7,1)(15,"div",8)(16,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(14);return D(S.toggle())}),u(17),d(18,"translate"),c(19,Ke,1,1),a()(),r(20,"div",10)(21,"div",11),c(22,Xe,1,2,"ng-template"),a()()(),r(23,"div",7,2)(25,"div",8)(26,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(24);return D(S.toggle())}),u(27),d(28,"translate"),c(29,Ze,1,1),a()(),r(30,"div",10)(31,"div",11),c(32,et,1,1,"ng-template"),a()()(),r(33,"div",7,3)(35,"div",8)(36,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(34);return D(S.toggle())}),u(37),d(38,"translate"),c(39,tt,1,1),a()(),r(40,"div",10)(41,"div",11),c(42,it,1,2,"ng-template"),a()()(),r(43,"div",7,4)(45,"div",8)(46,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(44);return D(S.toggle())}),u(47),d(48,"translate"),c(49,nt,1,1),a()(),r(50,"div",10)(51,"div",11),c(52,st,1,1,"ng-template"),a()()(),c(53,at,10,5,"div",12),d(54,"async"),a()}if(i&2){let C=h(4),B=h(14),S=h(24),Ue=h(34),Qe=h(44),A=y(m(1,16,s.absencesService.counts$));n(6),p("opened",!C.collapsed),n(),f(" ",m(8,19,"shared.profile.checkable-absences")," "),n(2),_((A==null?null:A.checkableAbsences)!==null?9:-1),n(7),p("opened",!B.collapsed),n(),f(" ",m(18,21,"shared.profile.open-absences")," "),n(2),_((A==null?null:A.openAbsences)!==null?19:-1),n(7),p("opened",!S.collapsed),n(),f(" ",m(28,23,"shared.profile.excused-absences")," "),n(2),_((A==null?null:A.excusedAbsences)!==null?29:-1),n(7),p("opened",!Ue.collapsed),n(),f(" ",m(38,25,"shared.profile.unexcused-absences")," "),n(2),_((A==null?null:A.unexcusedAbsences)!==null?39:-1),n(7),p("opened",!Qe.collapsed),n(),f(" ",m(48,27,"shared.profile.incidents")," "),n(2),_((A==null?null:A.incidents)!==null?49:-1),n(4),_(m(54,29,s.halfDayActive$)?53:-1)}},dependencies:[X,K,J,te,z,Y,Le,w,M],encapsulation:2,changeDetection:0})}}return e})();var ct=(e,o)=>o.apprenticeshipContract.Id,dt=(e,o)=>o.Id;function pt(e,o){if(e&1&&b(0,"bkd-student-dossier-legal-representative",9),e&2){let t=o.$implicit;p("person",t)}}function lt(e,o){if(e&1&&N(0,pt,1,1,"bkd-student-dossier-legal-representative",9,dt),e&2){l(3);let t=v(0);O(t.legalRepresentativePersons)}}function mt(e,o){if(e&1){let t=F();r(0,"div",4,0)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),a()(),r(6,"div",7)(7,"div",8),c(8,lt,2,0,"ng-template"),a()()()}if(e&2){let t=h(1);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,2,"shared.profile.legal-representation")," ")}}function ut(e,o){if(e&1&&u(0),e&2){let t=l().$index;f(" ",t+1," ")}}function ft(e,o){if(e&1&&b(0,"bkd-student-dossier-apprenticeship-company",10),e&2){let t=l().$implicit;p("company",t)}}function _t(e,o){if(e&1){let t=F();r(0,"div",4,1)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),c(6,ut,1,1),a()(),r(7,"div",7)(8,"div",8),c(9,ft,1,1,"ng-template"),a()()()}if(e&2){let t=h(1);l(2);let i=v(0);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,3,"shared.profile.apprenticeship-company")," "),n(2),_(i.apprenticeshipCompanies.length>1?6:-1)}}function bt(e,o){if(e&1&&(b(0,"bkd-student-dossier-address",2),r(1,"div",3),c(2,mt,9,4,"div",4),N(3,_t,10,5,"div",4,ct),a()),e&2){l();let t=v(0);p("student",t.student),n(2),_(t.legalRepresentativePersons.length>0?2:-1),n(),O(t.apprenticeshipCompanies)}}var Ne=(()=>{class e{constructor(t){this.state=t,this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(i){return new(i||e)(x(T))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-addresses"]],decls:3,vars:4,consts:[["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"profile-entry",3,"student"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(i,s){if(i&1&&(g(0),d(1,"async"),c(2,bt,5,2)),i&2){let C=y(m(1,1,s.state.profile$));n(2),_(C?2:-1)}},dependencies:[Ee,X,K,J,te,z,Y,Ve,je,w,M],styles:[".profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}"],changeDetection:0})}}return e})();function vt(e,o){e&1&&b(0,"bkd-spinner")}function Ct(e,o){if(e&1&&b(0,"bkd-dossier-grades-view",0),e&2){l();let t=v(0),i=v(2),s=v(4);p("courses",t)("studentId",i)("gradingScales",s)}}var Oe=(()=>{class e{constructor(t,i){this.state=t,this.dossierGradesService=i,this.destroy$=new q}ngOnInit(){this.state.currentDossier$.next("grades"),this.state.studentId$.pipe(U(this.destroy$)).subscribe(t=>this.dossierGradesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(R))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-grades"]],decls:9,vars:12,consts:[[3,"courses","studentId","gradingScales"]],template:function(i,s){i&1&&(g(0),d(1,"async"),g(2),d(3,"async"),g(4),d(5,"async"),c(6,vt,1,0,"bkd-spinner"),d(7,"async"),c(8,Ct,1,3,"bkd-dossier-grades-view",0)),i&2&&(y(m(1,1,s.dossierGradesService.studentCourses$)),n(2),y(m(3,4,s.state.studentId$)),n(2),y(m(5,7,s.dossierGradesService.gradingScales$)),n(2),_(m(7,10,s.dossierGradesService.loading$)?6:8))},dependencies:[Fe,ee,w],encapsulation:2})}}return e})();var xt=["*"];function gt(e,o){if(e&1&&(r(0,"div",5)(1,"span",6),u(2),d(3,"date"),a(),r(4,"span",7),u(5),a()()),e&2){let t=l();n(2),H(ve(3,2,t.student.Birthdate,"dd.MM.yyyy")),n(3),f("(",t.student.Gender,")")}}var He=(()=>{class e{constructor(){this.link="/"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-student-backlink"]],inputs:{link:"link",queryParams:"queryParams",studentId:"studentId",studentName:"studentName",student:"student"},ngContentSelectors:xt,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"],[1,"additional-info"],[1,"birthday"],[1,"gender"]],template:function(i,s){i&1&&(be(),r(0,"div",0)(1,"bkd-backlink",1),he(2),a(),r(3,"div",2),b(4,"bkd-avatar",3),r(5,"div",4)(6,"h1"),u(7),a(),c(8,gt,6,5,"div",5),a()()()),i&2&&(n(),p("link",s.link)("params",s.queryParams),n(3),p("studentId",s.studentId),n(3),H(s.student?s.student.FullName:s.studentName),n(),_(s.student?8:-1))},dependencies:[Re,Me,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})}}return e})();var yt=()=>["addresses","absences","grades"],St=()=>[],At=e=>({returnparams:e}),kt=e=>[e];function Dt(e,o){e&1&&b(0,"bkd-spinner")}function It(e,o){if(e&1&&b(0,"bkd-reports-link",3),e&2){let t;l(2);let i=v(4);p("reports",(t=i)!==null&&t!==void 0?t:re(1,St))}}function $t(e,o){if(e&1&&(r(0,"a",5),d(1,"async"),r(2,"button",6,0),u(4),d(5,"translate"),a()()),e&2){let t=o.$implicit,i=h(3),s=l(2);p("queryParams",ae(9,At,m(1,5,s.state.returnParams$)))("routerLink",ae(11,kt,t)),n(2),fe("btn-outline-secondary",!i.isActive),n(2),f(" ",m(5,7,"dossier."+t)," ")}}function Tt(e,o){e&1&&(r(0,"div"),b(1,"router-outlet"),a())}function Pt(e,o){e&1&&(r(0,"p"),u(1),d(2,"translate"),a()),e&2&&(n(),H(m(2,1,"shared.profile.no-profile")))}function Lt(e,o){if(e&1&&(r(0,"bkd-student-backlink",2),d(1,"async"),d(2,"async"),c(3,It,1,2,"bkd-reports-link",3),a(),r(4,"div",4),N(5,$t,6,13,"a",5,_e),a(),c(7,Tt,2,0,"div")(8,Pt,3,3,"p")),e&2){let t=l(),i=v(0),s=v(2);p("link","../..")("queryParams",m(1,6,t.state.backlinkQueryParams$))("studentId",m(2,8,t.state.studentId$))("student",i&&i.student),n(3),_(s==="grades"?3:-1),n(2),O(re(10,yt)),n(2),_(i?7:8)}}var qe=(()=>{class e{constructor(t,i){this.state=t,this.dossierGradesService=i,this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(R))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-student-dossier"]],features:[W([T,R])],decls:10,vars:12,consts:[["rla","routerLinkActive"],[1,"bkd-container","bkd-container-limited"],[1,"mb-2",3,"link","queryParams","studentId","student"],[1,"ms-2",3,"reports"],[1,"d-flex","flex-row","py-3","flex-wrap"],[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(i,s){i&1&&(g(0),d(1,"async"),g(2),d(3,"async"),g(4),d(5,"async"),r(6,"div",1),c(7,Dt,1,0,"bkd-spinner"),d(8,"async"),c(9,Lt,9,11),a()),i&2&&(y(m(1,1,s.state.profile$)),n(2),y(m(3,4,s.state.currentDossier$)),n(2),y(m(5,7,s.dossierGradesService.testReports$)),n(3),_(m(8,10,s.state.loading$)?7:9))},dependencies:[He,Pe,ye,Se,ge,ee,w,M],encapsulation:2,changeDetection:0})}}return e})();var Li={path:"student/:id",children:[{path:"",component:qe,children:[{path:"addresses",component:Ne},{path:"absences",component:Ge},{path:"grades",component:Oe}]},{path:"absences/confirm",component:$e}]};export{Li as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-EJNJ2ZNZ.js b/public/apps/webapp-schulverwaltung/chunk-EJNJ2ZNZ.js deleted file mode 100644 index 17af5031..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-EJNJ2ZNZ.js +++ /dev/null @@ -1 +0,0 @@ -import{F as s,M as p,P as f,Q as d,R as n,X as g,_ as h,f as c,gc as S,l,n as a,p as u,uc as v,vc as m,wc as P,x as e,zc as $}from"./chunk-S3H6YSFW.js";var I=(()=>{class o{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 c,this.activationEnd$=this.router.events.pipe(e(R)),this.navigationEnd$=this.router.events.pipe(e(C)),this.navigationStart$=this.router.events.pipe(e(y)),this.scrollPosition$=this.navigationStart$.pipe(a(this.getScrollPosition.bind(this))),this.route$=this.activationEnd$.pipe(s(1)).pipe(u(r=>[l(r),this.navigationEnd$.pipe(f(()=>this.activationEnd$.pipe(s(1))))]),d(),a(r=>r.snapshot),p(1)),this.scrollPosition$.pipe(n(this.destroy$)).subscribe(r=>this.currentScrollPosition=r),this.route$.pipe(n(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(s(1),n(this.destroy$),e(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}static{this.\u0275fac=function(i){return new(i||o)(h($),h(S))}}static{this.\u0275prov=g({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function R(o){return o instanceof P}function y(o){return o instanceof v}function C(o){return o instanceof m}export{I as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-KV3V2W4Q.js b/public/apps/webapp-schulverwaltung/chunk-ETZGBBG5.js similarity index 98% rename from public/apps/webapp-schulverwaltung/chunk-KV3V2W4Q.js rename to public/apps/webapp-schulverwaltung/chunk-ETZGBBG5.js index 2662d874..18a41417 100644 --- a/public/apps/webapp-schulverwaltung/chunk-KV3V2W4Q.js +++ b/public/apps/webapp-schulverwaltung/chunk-ETZGBBG5.js @@ -1 +1 @@ -import{b as _}from"./chunk-W6XALPR5.js";import{a as O,b as M,c as Y,d as I,g as Yr,h as Ir,i as Er,j as Hr,k as hr,l as qr,m as Lr,n as yr,o as vr}from"./chunk-A7CCEKNQ.js";import{c as Mr,d as _r,e as Or,f as d,g as w}from"./chunk-2AZMKO7X.js";import{i as Nr}from"./chunk-QTBTUQ3W.js";import{X as Tr,ia as kr}from"./chunk-S3H6YSFW.js";function Qr(){return Object.assign({},O())}function Rr(o,r){let t=w(o,r?.in).getDay();return t===0?7:t}function Fr(o,r){let t=Vr(r)?new r(0):d(r,0);return t.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),t.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),t}function Vr(o){return typeof o=="function"&&o.prototype?.constructor===o}var Zr=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=Zr;subPriority=-1;constructor(r,t){super(),this.context=r||(e=>d(t,e))}set(r,t){return t.timestampIsSet?r:d(r,Fr(r,this.context))}};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,l=t[5]?parseInt(t[5],10):0;return{value:e*(s*_r+i*Mr+l*Or),rest:r.slice(t[0].length)}}function v(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 Q(o,r){let t=r>0,e=t?r:1-r,s;if(e<=50)s=o||100;else{let i=e+50,l=Math.trunc(i/100)*100,y=o>=i%100;s=o+l-(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 l=Q(e.year,s);return r.setFullYear(l,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=Q(e.year,i);return r.setFullYear(y,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}let l=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(l,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=d(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,t?.in),s=Hr(e,t)-r;return e.setDate(e.getDate()-s*7),w(e,t?.in)}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,t){let e=w(o,t?.in),s=Ir(e,t)-r;return e.setDate(e.getDate()-s*7),e}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 Kr=[31,28,31,30,31,30,31,31,30,31,30,31],$r=[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<=$r[i]:t>=1&&t<=Kr[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,t?.in),l=i.getDay(),dr=(r%7+7)%7,D=7-s,N=r<0||r>6?r-(l+D)%7:(dr+D)%7-(l+D)%7;return _(i,N,t)}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=l=>{let y=Math.floor((l-1)/7)*7;return(l+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=l=>{let y=Math.floor((l-1)/7)*7;return(l+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,t){let e=w(o,t?.in),s=Rr(e,t),i=r-s;return _(e,i,t)}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:d(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:d(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","X"]};var fr=class extends n{priority=40;parse(r){return v(r)}set(r,t,e){return[d(r,e*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var lr=class extends n{priority=20;parse(r){return v(r)}set(r,t,e){return[d(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 jr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ur=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jr=/^'([^]*?)'?$/,Sr=/''/g,re=/\S/,ee=/[a-zA-Z]/;function Xr(o,r,t,e){let s=()=>d(e?.in||t,NaN),i=Qr(),l=e?.locale??i.locale??Yr,y=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,dr=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!r)return o?s():w(t,e?.in);let D={firstWeekContainsDate:y,weekStartsOn:dr,locale:l},N=[new q(e?.in,t)],zr=r.match(Ur).map(m=>{let f=m[0];if(f in hr){let b=hr[f];return b(m,l.formatLong)}return m}).join("").match(jr),wr=[];for(let m of zr){!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:Dr}=b;if(Array.isArray(Dr)){let gr=wr.find(Pr=>Dr.includes(Pr.token)||Pr.token===f);if(gr)throw new RangeError(`The format string mustn't contain \`${gr.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,l.match,D);if(!xr)return s();N.push(xr.setter),o=xr.rest}else{if(f.match(ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(m==="''"?m="'":f==="'"&&(m=te(m)),o.indexOf(m)===0)o=o.slice(m.length);else return s()}}if(o.length>0&&re.test(o))return s();let Ar=N.map(m=>m.priority).sort((m,f)=>f-m).filter((m,f,b)=>b.indexOf(m)===f).map(m=>N.filter(f=>f.priority===m).sort((f,b)=>b.subPriority-f.subPriority)).map(m=>m[0]),g=w(t,e?.in);if(isNaN(+g))return s();let br={};for(let m of Ar){if(!m.validate(g,D))return s();let f=m.set(g,br,D);Array.isArray(f)?(g=f[0],Object.assign(br,f[1])):g=f}return g}function te(o){return o.match(Jr)[1].replace(Sr,"'")}var Fs=(()=>{class o extends Nr{parse(t){let e=t?Xr(t,"dd.MM.yyyy",new Date):null;return e?{year:e.getFullYear(),month:e.getMonth(),day:e.getDay()}:null}format(t){return t?vr(new Date(t.year,t.month-1,t.day),"dd.MM.yyyy"):""}static{this.\u0275fac=(()=>{let t;return function(s){return(t||(t=kr(o)))(s||o)}})()}static{this.\u0275prov=Tr({token:o,factory:o.\u0275fac})}}return o})();export{Fs as a}; +import{g as _}from"./chunk-KQORGECX.js";import{a as O,b as M,c as Y,d as I,g as Yr,h as Ir,i as Er,j as Hr,k as hr,l as qr,m as Lr,n as yr,o as vr}from"./chunk-NC6UEGAF.js";import{c as Mr,d as _r,e as Or,f as d,g as w}from"./chunk-SL67CYEF.js";import{i as Nr}from"./chunk-RXRYDGZR.js";import{X as Tr,ia as kr}from"./chunk-NEW5VGRB.js";function Qr(){return Object.assign({},O())}function Rr(o,r){let t=w(o,r?.in).getDay();return t===0?7:t}function Fr(o,r){let t=Vr(r)?new r(0):d(r,0);return t.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),t.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),t}function Vr(o){return typeof o=="function"&&o.prototype?.constructor===o}var Zr=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=Zr;subPriority=-1;constructor(r,t){super(),this.context=r||(e=>d(t,e))}set(r,t){return t.timestampIsSet?r:d(r,Fr(r,this.context))}};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,l=t[5]?parseInt(t[5],10):0;return{value:e*(s*_r+i*Mr+l*Or),rest:r.slice(t[0].length)}}function v(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 Q(o,r){let t=r>0,e=t?r:1-r,s;if(e<=50)s=o||100;else{let i=e+50,l=Math.trunc(i/100)*100,y=o>=i%100;s=o+l-(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 l=Q(e.year,s);return r.setFullYear(l,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=Q(e.year,i);return r.setFullYear(y,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}let l=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(l,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=d(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,t?.in),s=Hr(e,t)-r;return e.setDate(e.getDate()-s*7),w(e,t?.in)}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,t){let e=w(o,t?.in),s=Ir(e,t)-r;return e.setDate(e.getDate()-s*7),e}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 Kr=[31,28,31,30,31,30,31,31,30,31,30,31],$r=[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<=$r[i]:t>=1&&t<=Kr[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,t?.in),l=i.getDay(),dr=(r%7+7)%7,D=7-s,N=r<0||r>6?r-(l+D)%7:(dr+D)%7-(l+D)%7;return _(i,N,t)}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=l=>{let y=Math.floor((l-1)/7)*7;return(l+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=l=>{let y=Math.floor((l-1)/7)*7;return(l+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,t){let e=w(o,t?.in),s=Rr(e,t),i=r-s;return _(e,i,t)}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:d(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:d(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","X"]};var fr=class extends n{priority=40;parse(r){return v(r)}set(r,t,e){return[d(r,e*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var lr=class extends n{priority=20;parse(r){return v(r)}set(r,t,e){return[d(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 jr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ur=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jr=/^'([^]*?)'?$/,Sr=/''/g,re=/\S/,ee=/[a-zA-Z]/;function Xr(o,r,t,e){let s=()=>d(e?.in||t,NaN),i=Qr(),l=e?.locale??i.locale??Yr,y=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,dr=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!r)return o?s():w(t,e?.in);let D={firstWeekContainsDate:y,weekStartsOn:dr,locale:l},N=[new q(e?.in,t)],zr=r.match(Ur).map(m=>{let f=m[0];if(f in hr){let b=hr[f];return b(m,l.formatLong)}return m}).join("").match(jr),wr=[];for(let m of zr){!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:Dr}=b;if(Array.isArray(Dr)){let gr=wr.find(Pr=>Dr.includes(Pr.token)||Pr.token===f);if(gr)throw new RangeError(`The format string mustn't contain \`${gr.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,l.match,D);if(!xr)return s();N.push(xr.setter),o=xr.rest}else{if(f.match(ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(m==="''"?m="'":f==="'"&&(m=te(m)),o.indexOf(m)===0)o=o.slice(m.length);else return s()}}if(o.length>0&&re.test(o))return s();let Ar=N.map(m=>m.priority).sort((m,f)=>f-m).filter((m,f,b)=>b.indexOf(m)===f).map(m=>N.filter(f=>f.priority===m).sort((f,b)=>b.subPriority-f.subPriority)).map(m=>m[0]),g=w(t,e?.in);if(isNaN(+g))return s();let br={};for(let m of Ar){if(!m.validate(g,D))return s();let f=m.set(g,br,D);Array.isArray(f)?(g=f[0],Object.assign(br,f[1])):g=f}return g}function te(o){return o.match(Jr)[1].replace(Sr,"'")}var Fs=(()=>{class o extends Nr{parse(t){let e=t?Xr(t,"dd.MM.yyyy",new Date):null;return e?{year:e.getFullYear(),month:e.getMonth(),day:e.getDay()}:null}format(t){return t?vr(new Date(t.year,t.month-1,t.day),"dd.MM.yyyy"):""}static{this.\u0275fac=(()=>{let t;return function(s){return(t||(t=kr(o)))(s||o)}})()}static{this.\u0275prov=Tr({token:o,factory:o.\u0275fac})}}return o})();export{Fs as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-EUJUXKHH.js b/public/apps/webapp-schulverwaltung/chunk-EUJUXKHH.js deleted file mode 100644 index b1813984..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-EUJUXKHH.js +++ /dev/null @@ -1,2 +0,0 @@ -import{b as Te}from"./chunk-37I3VMAS.js";import{b as Me}from"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import{b as xe}from"./chunk-HLAFRD2O.js";import{a as Ce}from"./chunk-HVJBOTRL.js";import{$a as s,Ab as V,Ad as ge,Bb as U,Bd as O,Cb as K,Cd as ye,Db as oe,Ga as u,H,J as R,Jb as d,Jd as ve,Kb as m,Ld as be,M as j,N as Y,Na as v,P as $,Pa as M,Pb as se,Pd as Se,Qa as h,Qd as E,R as F,Ra as A,Sd as _e,U as B,Va as b,W as J,X as Q,Xa as Z,Ya as x,Za as T,_ as L,_a as r,a as P,ab as g,b as G,cc as ae,dd as le,ed as ce,f as W,fd as pe,g as q,gb as ee,hb as k,jd as I,kd as de,l as D,ma as X,n as _,nd as me,od as ue,rb as f,sb as C,sd as he,tb as N,td as fe,w as z,xb as te,ya as o,yb as ie,yc as re,za as y,zb as ne}from"./chunk-S3H6YSFW.js";var ke=(()=>{class t{constructor(){this.id=null,this.label=null,this.disabled=!1,this.value=!1,this.valueChange=new X,this.fallbackId=be("bkd-switch")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-switch"]],inputs:{id:"id",label:"label",disabled:"disabled",value:"value"},outputs:{valueChange:"valueChange"},decls:3,vars:5,consts:[["type","checkbox",3,"ngModelChange","disabled","ngModel"]],template:function(i,n){if(i&1&&(r(0,"input",0),ee("ngModelChange",function(l){return n.valueChange.emit(l)}),s(),r(1,"label"),f(2),s()),i&2){let a,l;h("disabled",n.disabled)("ngModel",n.value),M("id",(a=n.id)!==null&&a!==void 0?a:n.fallbackId),o(),M("for",(l=n.id)!==null&&l!==void 0?l:n.fallbackId),o(),C(n.label)}},dependencies:[O,pe,I,me],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})}}return t})();function Ge(t,p){if(t&1&&(r(0,"div"),f(1),s()),t&2){let e=p.$implicit;o(),N(" ",e," ")}}function De(t,p){if(t&1&&(r(0,"div",3),x(1,Ge,2,1,"div",null,Z),s()),t&2){let e=k();o(),T(e.descriptionLines)}}var Ne=(()=>{class t{constructor(e){this.cd=e,this.id="",this.label="",this.description=null,this.disabled=!1,this.onChange=i=>{},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()}static{this.\u0275fac=function(i){return new(i||t)(y(se))}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-notifications-toggle"]],inputs:{id:"id",label:"label",description:"description",disabled:"disabled"},features:[oe([{provide:ce,useExisting:J(()=>t),multi:!0}])],decls:5,vars:6,consts:[[1,"d-flex","align-items-center"],[1,"flex-fill"],[3,"valueChange","id","value","disabled"],[1,"form-text"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"label",1),f(2),s(),r(3,"bkd-switch",2),ne("valueChange",function(l){return ie(n.value,l)||(n.value=l),l}),s()(),v(4,De,3,0,"div",3)),i&2&&(o(),M("for",n.id),o(),N(" ",n.label," "),o(),h("id",n.id),te("value",n.value),h("disabled",n.disabled),o(),b(n.description?4:-1))},dependencies:[ke],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var we=(()=>{class t{constructor(e,i){this.settings=e,this.storage=i,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 ve(this.settings.notificationTypesAssignments.reduce((e,{roles:i,types:n})=>this.hasAnyRole(i)?[...e,...n]:e,[]))}hasAnyRole(e){return this.currentRoles===null&&(this.currentRoles=Me(this.storage.getPayload()?.roles)),this.currentRoles.some(i=>e.includes(i))}static{this.\u0275fac=function(i){return new(i||t)(L(le),L(_e))}}static{this.\u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $e=(t,p)=>p.key;function je(t,p){t&1&&(r(0,"div",2),g(1,"bkd-spinner",5),s())}function Be(t,p){if(t&1&&(g(0,"bkd-my-settings-notifications-toggle",7),d(1,"async"),d(2,"async")),t&2){let e=p.$implicit,i=p.$index;A("mt-4",i>0),h("id","notification-channels-"+e.key)("label",m(1,6,e.label))("description",m(2,8,e.description))("formControlName",e.key)}}function Le(t,p){if(t&1&&(r(0,"form",3),x(1,Be,3,10,"bkd-my-settings-notifications-toggle",6,$e),s()),t&2){let e=k(),i=K(0);h("formGroup",i),o(),T(e.channelsSettings)}}function Ae(t,p){if(t&1&&(g(0,"bkd-my-settings-notifications-toggle",7),d(1,"async"),d(2,"async")),t&2){let e=p.$implicit,i=p.$index;A("mt-4",i>0),h("id","notification-types-"+e.key)("label",m(1,6,e.label))("description",m(2,8,e.description))("formControlName",e.key)}}function Ve(t,p){if(t&1&&(r(0,"form",3),x(1,Ae,3,10,"bkd-my-settings-notifications-toggle",6,$e),s()),t&2){let e=k(),i=K(2);h("formGroup",i),o(),T(e.typesSettings)}}var Fe=(()=>{class t{constructor(e,i,n,a,l){this.userSettings=e,this.formBuilder=i,this.toastService=n,this.translate=a,this.notificationTypes=l,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(c=>{let{label:S,description:Ee}=this.translate.currentLang==="fr-CH"?c.text.fr:c.text.de;return{key:c.key,label:D(S),description:D(Ee)}}),this.channelsValue$=this.userSettings.getNotificationChannels(),this.typesValue$=this.userSettings.getNotificationTypesInactive().pipe(_(this.typesArrayToRecord.bind(this))),this.channelsFormGroup$=this.channelsValue$.pipe(_(c=>this.createFormGroup(this.channelsSettings,c)),j(1)),this.allChannelsInactive$=z(this.channelsValue$,this.channelsFormGroup$.pipe($(c=>c.valueChanges))).pipe(_(c=>Object.values(c).every(S=>!S)),H()),this.typesFormGroup$=this.typesValue$.pipe(B(this.allChannelsInactive$),_(([c,S])=>this.createFormGroup(this.typesSettings,c,!0,S)),j(1)),this.saving$=new q(!1),this.destroy$=new W}ngOnInit(){this.userSettings.refetch(),this.allChannelsInactive$.pipe(Y(1),B(this.typesFormGroup$),F(this.destroy$)).subscribe(([e,i])=>{Object.values(i.controls).forEach(n=>e?n.disable():n.enable())}),this.channelsFormGroup$.pipe(F(this.destroy$),$(e=>e.valueChanges)).subscribe(this.saveChannels.bind(this)),this.typesFormGroup$.pipe(F(this.destroy$),$(e=>e.valueChanges)).subscribe(this.saveTypes.bind(this))}ngOnDestroy(){this.destroy$.next()}createFormGroup(e,i,n=!1,a=!1){return this.formBuilder.group(e.reduce((l,{key:c})=>G(P({},l),{[c]:[{value:i[c]??n,disabled:a}]}),{}))}saveChannels(e){this.saving$.next(!0),this.userSettings.saveNotificationChannels(e).pipe(R(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}saveTypes(e){this.saving$.next(!0),this.userSettings.saveNotificationTypesInactive(this.typesRecordToArray(e)).pipe(R(()=>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((n,{key:a})=>G(P({},n),{[a]:!e.includes(a)}),{})}typesRecordToArray(e){return Object.keys(e).reduce((n,a)=>e[a]?n:[...n,a],[])}static{this.\u0275fac=function(i){return new(i||t)(y(Te),y(ge),y(Ce),y(Se),y(we))}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-notifications"]],decls:17,vars:17,consts:[[1,"pb-4"],[1,"m-0","pb-3","d-flex","align-items-stretch"],[1,"position-relative"],[3,"formGroup"],[1,"mt-4","form-text"],[1,"position-absolute","inline","small","d-inline-block","ms-2"],[3,"id","label","description","formControlName","mt-4"],[3,"id","label","description","formControlName"]],template:function(i,n){if(i&1&&(V(0),d(1,"async"),V(2),d(3,"async"),r(4,"div",0)(5,"h2",1)(6,"span"),f(7),d(8,"translate"),s(),v(9,je,2,0,"div",2),d(10,"async"),s(),v(11,Le,3,1,"form",3),r(12,"p",4),f(13),d(14,"translate"),s(),g(15,"hr"),v(16,Ve,3,1,"form",3),s()),i&2){let a=U(m(1,5,n.channelsFormGroup$));o(2);let l=U(m(3,8,n.typesFormGroup$));o(5),C(m(8,11,"my-settings.notifications.title")),o(2),b(m(10,13,n.saving$)?9:-1),o(2),b(a?11:-1),o(2),N(" ",m(14,15,"my-settings.notifications.privacy-hint")," "),o(3),b(l?16:-1)}},dependencies:[xe,O,ue,I,de,ye,he,fe,Ne,ae,E],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important}"],changeDetection:0})}}return t})();var Ie=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-show"]],decls:5,vars:3,consts:[[1,"bkd-container","bkd-container-limited"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"h1"),f(2),d(3,"translate"),s(),g(4,"bkd-my-settings-notifications"),s()),i&2&&(o(2),C(m(3,1,"my-settings.title")))},dependencies:[Fe,E],encapsulation:2})}}return t})();var Oe=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings"]],decls:1,vars:0,template:function(i,n){i&1&&g(0,"router-outlet")},dependencies:[re],encapsulation:2,changeDetection:0})}}return t})();var Nt=[{path:"",component:Oe,children:[{path:"",component:Ie}]}];export{Nt as MY_SETTINGS_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HVJBOTRL.js b/public/apps/webapp-schulverwaltung/chunk-F4XODHS2.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-HVJBOTRL.js rename to public/apps/webapp-schulverwaltung/chunk-F4XODHS2.js index 1ba52209..d26c2787 100644 --- a/public/apps/webapp-schulverwaltung/chunk-HVJBOTRL.js +++ b/public/apps/webapp-schulverwaltung/chunk-F4XODHS2.js @@ -1 +1 @@ -import{F as r,Id as c,X as n,g as a}from"./chunk-S3H6YSFW.js";var h=(()=>{class i{constructor(){this.toastsSubject=new a([]),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(s=>!c(s,t)))}addUnique(t){this.updateToasts(e=>{if(!this.exists(e,t))return[...e,t]})}exists(t,e){return!!t.find(s=>s.message===e.message&&s.header===e.header)}updateToasts(t){this.toasts$.pipe(r(1)).subscribe(e=>{let s=t(e);s&&this.toastsSubject.next(s)})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{h as a}; +import{F as r,Md as c,X as n,g as a}from"./chunk-NEW5VGRB.js";var h=(()=>{class i{constructor(){this.toastsSubject=new a([]),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(s=>!c(s,t)))}addUnique(t){this.updateToasts(e=>{if(!this.exists(e,t))return[...e,t]})}exists(t,e){return!!t.find(s=>s.message===e.message&&s.header===e.header)}updateToasts(t){this.toasts$.pipe(r(1)).subscribe(e=>{let s=t(e);s&&this.toastsSubject.next(s)})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{h as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FGETUL3R.js b/public/apps/webapp-schulverwaltung/chunk-FGETUL3R.js new file mode 100644 index 00000000..0a6c72fe --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-FGETUL3R.js @@ -0,0 +1 @@ +import{n as y}from"./chunk-DJNW6R6G.js";import{a as v}from"./chunk-HQSONWXM.js";import{$ as o,Mc as i,Nc as n,P as s,Sc as p,Wd as m,X as c,_c as d,hd as l,mc as u,n as a,qc as f}from"./chunk-NEW5VGRB.js";var g=p({Id:n,Designation:i,Leadership:d(i),StudentCount:n}),E=p({Id:n,EventType:i,EventTypeId:n,Designation:i});var U=(()=>{class e extends v{constructor(){let t=o(f),r=o(l);super(t,r,g,"Events")}getStudyCourseEvents(){let t=new u().set("filter.EventTypeId","=1");return this.getList({params:t})}getSubscriptionDetailsDefinitions(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(s(m(y)))}getEventSummary(t){let r={fields:"Id,EventTypeId,EventType,Designation","filter.Id":`=${t}`};return this.http.get(`${this.baseUrl}/`,{params:r}).pipe(s(m(E)),a(b=>b[0]??null))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{U as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FMUJPUYQ.js b/public/apps/webapp-schulverwaltung/chunk-FMUJPUYQ.js new file mode 100644 index 00000000..d61aa6c3 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-FMUJPUYQ.js @@ -0,0 +1 @@ +import{a as ze}from"./chunk-SKUS47ZU.js";import{a as W}from"./chunk-Y4QYVF5K.js";import{D as st,b as Je,f as Ye,g as et,h as it,y as nt}from"./chunk-KQORGECX.js";import{a as ae,b as w,c as Ze,d as ot}from"./chunk-K42F6AEW.js";import{e as pe,o as I}from"./chunk-NC6UEGAF.js";import{h as tt}from"./chunk-SL67CYEF.js";import{a as Qe}from"./chunk-HQSONWXM.js";import{x as _}from"./chunk-RXRYDGZR.js";import{a as He}from"./chunk-F4XODHS2.js";import{$ as d,$a as G,Bc as Ee,Dc as Ae,Eb as P,Ec as De,Ed as Oe,F as T,Fb as X,Fd as Xe,Gb as F,Gd as Fe,Ia as ve,Ib as Le,J as be,Jb as $e,M as te,Mc as m,Nb as a,Nc as g,Ob as p,Oc as ke,P as f,Pa as k,Pb as H,R as j,Rd as Ke,Sa as C,Sc as S,Sd as qe,Ta as Ce,Ud as We,Wd as v,X as ge,Xa as B,Z as Se,Za as se,Zc as $,_a as M,a as V,ab as c,ad as h,b as U,bb as l,bd as K,cb as O,dd as D,ea as ie,ed as Be,f as he,fa as ne,fd as re,g as Z,gb as Re,gc as _e,hd as q,ib as oe,jb as x,kd as Pe,l as ee,lc as xe,mc as L,md as we,n as y,nd as Ne,o as A,od as Ve,qc as Ie,s as ye,sd as Ue,ud as je,vb as u,wb as Te,wd as Me,x as R,xb as b,xd as Ge,ya as r}from"./chunk-NEW5VGRB.js";function ce(i,o){return i.pipe(y(e=>e.find(t=>t.Key===o)||null))}function Rt(i){return i.slice().sort((o,e)=>o.Value.localeCompare(e.Value))}function rt(i,o,e){let[t,n]=tt(e?.in,i,o);return+pe(t)==+pe(n)}var at=new Se("Confirm Absences Service");var dt=(i,o)=>o.Id,mt=i=>({count:i}),lt=()=>["/edit-absences"];function ft(i,o){if(i&1&&(c(0,"div",4),u(1),a(2,"translate"),l()),i&2){let e=o.$implicit;r(),b(" ",H(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ut(i,o){if(i&1&&(c(0,"div",21),u(1),a(2,"translate"),l()),i&2){let e=o.$implicit;r(),b(" ",H(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ht(i,o){if(i&1&&(M(0,ut,3,4,"div",21,se),a(2,"async")),i&2){let e=x(4);G(p(2,0,e.absenceTypeIdErrors$))}}function yt(i,o){if(i&1&&(c(0,"div",16),O(1,"input",19),a(2,"async"),c(3,"label",20),u(4),l(),k(5,ht,3,2),a(6,"async"),l()),i&2){let e,t,n=o.$implicit,s=o.$index,E=x(3);r(),Ce("is-invalid",((e=(e=p(2,7,E.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),C("id","absence-type-"+s)("value",n.Id),r(2),C("for","absence-type-"+s),r(),b(" ",n.Designation," "),r(),B(((t=(t=p(6,9,E.absenceTypes$))==null?null:t.length)!==null&&t!==void 0?t:0)-1===s?5:-1)}}function bt(i,o){if(i&1&&(M(0,yt,7,11,"div",16,dt),a(2,"async"),c(3,"div",17),u(4),a(5,"translate"),c(6,"a",18),u(7),a(8,"translate"),l()()),i&2){let e=x(2);G(p(2,3,e.absenceTypes$)),r(4),b(" ",p(5,5,"open-absences.edit.remark")," "),r(2),C("routerLink",Le(9,lt)),r(),b(" ",p(8,7,"edit-absences.title")," ")}}function gt(i,o){i&1&&(c(0,"div",15)(1,"span",22),u(2,"Loading..."),l()())}function St(i,o){if(i&1){let e=Re();c(0,"form",3),oe("ngSubmit",function(){ie(e);let n=x();return ne(n.onSubmit())}),M(1,ft,3,4,"div",4,se),a(3,"async"),c(4,"div",5)(5,"div",6),O(6,"input",7),c(7,"label",8),u(8),l(),k(9,bt,9,10),l(),c(10,"div",9),O(11,"input",10),c(12,"label",11),u(13),l()()(),c(14,"div",12)(15,"button",13),a(16,"async"),oe("click",function(){ie(e);let n=x();return ne(n.cancel())}),u(17),a(18,"translate"),l(),c(19,"button",14),a(20,"async"),u(21),a(22,"translate"),k(23,gt,3,0,"div",15),a(24,"async"),l()()()}if(i&2){let e=x(),t=F(0),n=F(2),s=F(4);C("formGroup",t),r(),G(p(3,11,e.formErrors$)),r(5),C("value",s.Key),r(2),b(" ",s.Value," "),r(),B(t.get("absenceTypeId")?9:-1),r(2),C("value",n.Key),r(2),b(" ",n.Value," "),r(2),C("disabled",p(16,13,e.saving$)),r(2),b(" ",p(18,15,"open-absences.edit.cancel")," "),r(2),C("disabled",p(20,17,e.saving$)),r(2),b(" ",p(22,19,"open-absences.edit.save")," "),r(2),B(p(24,21,e.saving$)?23:-1)}}var zt=(()=>{class i{constructor(){this.fb=d(Oe),this.router=d(Ae),this.activatedRoute=d(Ee),this.toastService=d(He),this.translate=d(Ke),this.selectionService=d(st),this.dropDownItemsService=d(ze),this.presenceTypesService=d(Ye),this.updateService=d(Je),this.settings=d(q),this.openAbsencesEditService=d(at,{optional:!0}),this.formGroup$=this.selectionService.selectedWithoutPresenceType$.pipe(y(this.createFormGroup.bind(this)),te(1)),this.saving$=new Z(!1),this.submitted$=new Z(!1),this.formErrors$=ae(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=ae(this.formGroup$,this.submitted$,"absenceTypeId"),this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(te(1)),this.excusedState$=ce(this.confirmationStates$,this.settings.excusedAbsenceStateId),this.unexcusedState$=ce(this.confirmationStates$,this.settings.unexcusedAbsenceStateId),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.destroy$=new he}ngOnInit(){this.selectionService.selectedIds$.pipe(T(1)).subscribe(e=>{e.length===0&&this.navigateBack()}),Ze(this.formGroup$,"confirmationValue").pipe(j(this.destroy$)).subscribe(e=>{typeof e=="number"&&this.updateAbsenceTypeIdDisabled(e)}),A([w(this.formGroup$,"confirmationValue").pipe(R(_)),w(this.formGroup$,"absenceTypeId").pipe(R(_)),this.saving$]).pipe(j(this.destroy$)).subscribe(([e,t,n])=>{n?(e.disable(),t.disable()):(e.enable(),this.updateAbsenceTypeIdDisabled(e.value))}),A([w(this.formGroup$,"confirmationValue").pipe(R(_)),this.excusedState$.pipe(T(1),R(_))]).pipe(j(this.destroy$)).subscribe(([e,t])=>e.setValue(t.Key))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(T(1)).subscribe(e=>{if(e.valid){let{confirmationValue:t,absenceTypeId:n}=e.value;this.save(t,n)}})}cancel(){this.navigateBack()}getSelectedCount(){return this.selectionService.selectedLessons$.pipe(y(e=>e.length))}createFormGroup(e){return e.length>0?this.fb.group({confirmationValue:[null],absenceTypeId:[null,we.required]}):this.fb.group({confirmationValue:[null]})}updateAbsenceTypeIdDisabled(e){A([w(this.formGroup$,"absenceTypeId").pipe(T(1),R(_)),this.excusedState$.pipe(T(1),R(_))]).subscribe(([t,n])=>{e===n.Key?t.enable():t.disable()})}save(e,t){this.saving$.next(!0),A([this.selectionService.selectedIds$.pipe(T(1)),this.unexcusedState$.pipe(T(1),R(_))]).pipe(f(([n,s])=>A(n.map(({lessonIds:E,personId:Y,presenceTypeId:N})=>this.updateService.confirmLessonPresences(E,[Y],this.getNewAbsenceTypeId(N,e,Number(s.Key),t),e)))),be(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}getNewAbsenceTypeId(e,t,n,s){if(!e)throw new Error("absence type id cannot be null");return t===n?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})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=ve({type:i,selectors:[["bkd-confirm-absences"]],decls:16,vars:21,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[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"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"form-check","my-3"],[1,"remark"],[3,"routerLink"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback"],[1,"visually-hidden"]],template:function(t,n){if(t&1&&(P(0),a(1,"async"),P(2),a(3,"async"),P(4),a(5,"async"),c(6,"div",0)(7,"h1"),u(8),a(9,"translate"),l(),c(10,"div",1),P(11),a(12,"async"),u(13),a(14,"translate"),l(),k(15,St,25,23,"form",2),l()),t&2){let s=X(p(1,3,n.formGroup$));r(2);let E=X(p(3,6,n.unexcusedState$));r(2);let Y=X(p(5,9,n.excusedState$));r(4),Te(p(9,12,"open-absences.edit.title"));let N=p(12,14,n.getSelectedCount());r(5),b(" ",H(14,16,N===1?"open-absences.edit.lesson-selected":"open-absences.edit.lessons-selected",$e(19,mt,N))," "),r(2),B(s&&E&&Y?15:-1)}},dependencies:[Xe,Ue,Pe,je,Ne,Ve,Fe,Me,Ge,De,_e,qe],encapsulation:2,changeDetection:0})}}return i})();var pt=S({StudentRef:h,StudentFullName:m,TotalAbsences:g,TotalAbsencesUnconfirmed:g,TotalAbsencesValidExcuse:g,TotalAbsencesWithoutExcuse:g,TotalAbsencesUnchecked:g,TotalDispensations:g,TotalHalfDays:g,TotalIncidents:g});var de=S({Id:m,LessonRef:h,StudentRef:h,EventRef:h,TypeRef:K,RegistrationRef:K,StudyClassRef:K,ConfirmationStateId:$(g),EventDesignation:m,HasStudyCourseConfirmationCode:ke,LessonDateTimeFrom:D,LessonDateTimeTo:D,Comment:$(m),Date:$(Be),Type:$(m),StudentFullName:m,StudyClassNumber:m,TeacherInformation:$(m)});var J=S({LessonRef:h,EventRef:h,StudyClassNumber:m,StudentRef:h});var me=S({LessonRef:h,EventRef:h,EventDesignation:m,StudyClassNumber:m,TeacherInformation:$(m),LessonDateTimeFrom:D,LessonDateTimeTo:D});function le(i){return o=>o.pipe(f(e=>{let t=Number(e.headers.get("X-Pagination-Offset")),n=Number(e.headers.get("X-Pagination-Total"));return v(i)(e.body).pipe(y(s=>({offset:t,total:n,entries:s})))}))}function Q(i,o,e=new L){return e.set("offset",String(i)).set("limit",String(o))}function fe(i=new xe){return i.set("X-Pagination-Total","on")}var Ii=(()=>{class i extends Qe{constructor(){let e=d(Ie),t=d(q);super(e,t,de,"LessonPresences"),this.storage=d(We),this.lessonPresenceRefCodec=S(re(this.codec.props,["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"])),this.lessonPresenceIdCodec=S(re(this.codec.props,["Id"]))}getLessonsByDate(e){let t={fields:Object.keys(me.props).join(","),"filter.LessonDateTimeFrom":`=${I(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(f(v(me)))}getLessonStudyClassesByDate(e){let t={fields:Object.keys(J.props).join(","),"filter.LessonDateTimeFrom":`=${I(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(f(v(J)))}getLessonStudyClassesByEvent(e){let t={"filter.EventRef":`=${e}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(f(v(J)))}getListByLessons(e){if(e.length===0)return ee([]);let n={"filter.LessonRef":`;${e.map(s=>s.LessonRef.Id).join(";")}`};return this.getList({params:n,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListByDateStudentClass(e,t,n){let s={"filter.LessonDateTimeFrom":`=${I(e,"yyyy-MM-dd")}`,"filter.StudentRef":`=${t}`};return n!=null&&(s["filter.StudyClassRef"]=`=${n}`),this.getList({params:s,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListForToday(){return this.http.get(`${this.baseUrl}/Today`,{headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(f(v(this.codec)))}getListOfUnconfirmed(e){return W(this.storage.getPayload()?.roles,"ClassTeacherRole")?ye([this.getListOfUnconfirmedClassTeacher(e),this.getListOfUnconfirmedLessonTeacher(e)]).pipe(y(ot(nt))):W(this.storage.getPayload()?.roles,"LessonTeacherRole")?this.getListOfUnconfirmedLessonTeacher(e):W(this.storage.getPayload()?.roles,"AbsenceAdministratorRole")?this.getListOfUnconfirmedAbsenceAdministrator(e):ee([])}getStatistics(e,t,n){let s=ue([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return s=vt(t,s),s=Q(n,this.settings.paginationLimit,s),this.http.get(`${this.baseUrl}/Statistics`,{params:s,headers:fe(),observe:"response"}).pipe(le(pt))}getLessonRefs(e){let t=ue([[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(f(v(this.lessonPresenceRefCodec)))}getRegistrationRefsByEventIds(e){let t=new L;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(f(v(this.lessonPresenceRefCodec)))}getFilteredList(e,t,n){let s=ue([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]],new L({fromObject:n}));return e.teacher&&(s=s.set("filter.TeacherInformation",`~*${e.teacher}*`)),e.dateFrom&&e.dateTo&&rt(e.dateFrom,e.dateTo)?s=s.set("filter.LessonDateTimeFrom",`=${I(e.dateFrom,"yyyy-MM-dd")}`):(e.dateFrom&&(s=s.set("filter.LessonDateTimeFrom",`>${I(it(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(s=s.set("filter.LessonDateTimeTo",`<${I(et(e.dateTo,1),"yyyy-MM-dd")}`))),e.weekdays&&(s=s.set("filter.WeekdayId",`;${e.weekdays.join(";")}`)),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:Q(t,this.settings.paginationLimit,s),headers:fe(),observe:"response"}).pipe(le(de))}hasLessonsLessonTeacher(){let e=new L().set("fields","Id");return this.http.get(`${this.baseUrl}/`,{params:Q(0,1,e),headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(f(v(this.lessonPresenceIdCodec)),y(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(f(v(this.lessonPresenceIdCodec)),y(e=>e.length))}getListOfUnconfirmedLessonTeacher(e){return this.getList({headers:{"X-Role-Restriction":"LessonTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=false"})})}getListOfUnconfirmedClassTeacher(e){return this.getList({headers:{"X-Role-Restriction":"ClassTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=true"})})}getListOfUnconfirmedAbsenceAdministrator(e){return this.getList({headers:{"X-Role-Restriction":"AbsenceAdministratorRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`})})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ge({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function ue(i,o=new L){return i.reduce((e,[t,n])=>t&&n?e.set(`filter.${n}`,`=${t}`):e,o)}function vt(i,o=new L){return i?o.set("sort",`${i.key}.${i.ascending?"asc":"desc"}`):o}export{Rt as a,rt as b,at as c,zt as d,Ii as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FN7XEGJE.js b/public/apps/webapp-schulverwaltung/chunk-FN7XEGJE.js new file mode 100644 index 00000000..76390018 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-FN7XEGJE.js @@ -0,0 +1 @@ +import{j as e}from"./chunk-DJNW6R6G.js";import{e as m}from"./chunk-26VH6QDS.js";import{$ as i,P as s,Wd as o,X as c,hd as p,qc as n}from"./chunk-NEW5VGRB.js";var I=(()=>{class t extends m{constructor(){let a=i(n),r=i(p);super(a,r,e,"StudyClasses","Number")}getActive(){return this.http.get(`${this.baseUrl}/?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(s(o(e)))}getActiveFormativeAssessments(){return this.http.get(`${this.baseUrl}/FormativeAssessments?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(s(o(e)))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{I as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-G5HWFMIA.js b/public/apps/webapp-schulverwaltung/chunk-G5HWFMIA.js new file mode 100644 index 00000000..4c5c3e52 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-G5HWFMIA.js @@ -0,0 +1 @@ +import{a as Te,b as Ie}from"./chunk-LQUABKN6.js";import{c as xe,d as Ae,e as $e}from"./chunk-FMUJPUYQ.js";import{b as Oe}from"./chunk-SKUS47ZU.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import{a as U}from"./chunk-UZJ4FIXB.js";import{C as Se,D as v,E as Pe,G as Ee,H as Le,a as ue,f as he,v as _e,w as ve,x as ye}from"./chunk-KQORGECX.js";import{d as Y}from"./chunk-K42F6AEW.js";import"./chunk-NC6UEGAF.js";import{i as ke}from"./chunk-SL67CYEF.js";import{h as Me}from"./chunk-HQSONWXM.js";import{A as fe,B as Ce}from"./chunk-RXRYDGZR.js";import"./chunk-F4XODHS2.js";import{$ as p,$a as W,Bc as pe,Cc as le,Dc as de,Eb as I,Ec as me,F as C,Fb as j,Gb as E,Hb as re,Ia as $,Ib as w,Jb as V,Kb as ce,M as F,Nb as a,Ob as l,P as B,Pa as L,Pb as D,R as z,Rd as be,Sa as f,Sd as ge,Ta as ne,X as te,Xa as N,Za as ie,_a as H,ab as c,bb as o,cb as S,ea as k,f as A,fa as O,g as q,gb as T,gc as R,hc as ae,ib as P,jb as h,k as X,n as m,o as y,ub as se,vb as d,w as Z,wb as _,x as ee,xb as M,ya as s,yb as oe}from"./chunk-NEW5VGRB.js";var Ne=["studentFullName","studyClassNumber"],x=(()=>{class n{constructor(){this.lessonPresencesService=p($e),this.selectionService=p(v),this.loadingService=p(ke),this.translate=p(be),this.loading$=this.loadingService.loading$,this.search$=new q(""),this.updateUnconfirmedAbsences$=new A,this.unconfirmedAbsences$=Z(this.loadUnconfirmedAbsences(),this.updateUnconfirmedAbsences$).pipe(F(1)),this.entries$=this.unconfirmedAbsences$.pipe(m(_e),F(1)),this.sortCriteriaSubject$=new q({primarySortKey:"date",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=y([this.entries$,this.sortCriteria$]).pipe(m(Y(ve))),this.filteredEntries$=y([this.sortedEntries$,this.search$]).pipe(m(([e,t])=>Ie(e,Ne,t)),F(1)),this.currentDetail=null}getUnconfirmedAbsences(e,t){return this.entries$.pipe(m(i=>{let r=i.find(g=>g.dateString===e&&g.studentId===t);return r?r.absences:[]}))}getAllUnconfirmedAbsencesForStudent(e){return this.entries$.pipe(m(t=>t.filter(i=>i.studentId===e).reduce((i,r)=>i.concat(r.absences),[])))}toggleSort(e){this.sortCriteriaSubject$.pipe(C(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(){y([this.unconfirmedAbsences$.pipe(C(1)),this.selectionService.selectedIds$.pipe(C(1))]).pipe(m(Y(ye))).subscribe(e=>{this.selectionService.clear(),this.updateUnconfirmedAbsences$.next(e)})}buildMailToString(e,t){let i=e.Email,r=this.translate.instant("open-absences.detail.mail.subject"),g=t.map(K=>Se(K)).join("%0D%0A"),b=`${this.translate.instant("open-absences.detail.mail.body")}%0D%0A${g}`;return b.length>=1600&&(b=`${b.substring(0,1500)}%0D%0A${this.translate.instant("open-absences.detail.mail.bodyToLargeForEmailTo")}`),`${i}?subject=${r}&body=${b}`}loadUnconfirmedAbsences(){return this.loadingService.load(this.lessonPresencesService.getListOfUnconfirmed())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=te({token:n,factory:n.\u0275fac})}}return n})();var je=()=>["/open-absences"],we=(()=>{class n{constructor(){this.router=p(de),this.route=p(pe),this.openAbsencesService=p(x),this.presenceTypesService=p(he),this.personService=p(Oe),this.selectionService=p(v),this.scrollPosition=p(U),this.absences$=this.route.paramMap.pipe(B(this.getAbsencesForParams.bind(this))),this.hasAbsences$=this.absences$.pipe(m(fe(1))),this.studentFullName$=this.absences$.pipe(m(e=>e[0]&&e[0].StudentFullName||null)),this.allSelected$=y([this.absences$,this.selectionService.selection$]).pipe(m(([e,t])=>e.length===t.length)),this.studentEmail$=this.absences$.pipe(m(e=>e[0]&&e[0].StudentRef.Id||null),B(e=>e?this.personService.getByIdWithEmailInfos(e):X)),this.allUnconfirmedAbsencesForStudent$=this.route.paramMap.pipe(B(this.getAbsencesForStudentParam.bind(this))),this.mailTo$=y([this.studentEmail$,this.allUnconfirmedAbsencesForStudent$]).pipe(m(([e,t])=>this.openAbsencesService.buildMailToString(e,t))),this.destroy$=new A}ngOnInit(){this.selectionService.clearNonLessonPresences(),this.route.paramMap.pipe(z(this.destroy$)).subscribe(e=>this.openAbsencesService.currentDetail={date:String(e.get("date")),personId:Number(e.get("personId"))}),this.hasAbsences$.pipe(z(this.destroy$),ee(ue(Ce))).subscribe(()=>void this.router.navigate(["/open-absences"]))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){e?this.absences$.pipe(C(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(i=>i.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")))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=$({type:n,selectors:[["bkd-open-absences-detail"]],decls:6,vars:10,consts:[[3,"link"],[3,"absences$","selectionService","confirmLink","displayEmail","mailTo$"]],template:function(t,i){t&1&&(c(0,"div"),S(1,"bkd-backlink",0),c(2,"h1"),d(3),a(4,"async"),o()(),S(5,"bkd-student-dossier-absences",1)),t&2&&(s(),f("link",w(9,je)),s(2),_(l(4,7,i.studentFullName$)),s(2),f("absences$",i.absences$)("selectionService",i.selectionService)("confirmLink","/open-absences/confirm")("displayEmail",!0)("mailTo$",i.mailTo$))},dependencies:[Le,Ee,R],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})}}return n})();var Ve=(n,u)=>u.id,De=()=>[],J=n=>({count:n}),Re=(n,u)=>["detail",n,u];function Ue(n,u){if(n&1&&(c(0,"div",2)(1,"div",5),d(2),a(3,"translate"),o(),c(4,"a",6)(5,"i",7),d(6,"edit"),o()()()),n&2){h();let e=E(0);s(2),M(" ",D(3,3,"open-absences.selected",V(6,J,e.length))," "),s(2),ne("disabled",e.length===0)}}function Ke(n,u){n&1&&S(0,"bkd-spinner")}function qe(n,u){n&1&&(c(0,"p",3),d(1),a(2,"translate"),o()),n&2&&(s(),_(l(2,1,"open-absences.noEntries")))}function ze(n,u){if(n&1&&(c(0,"span",13),d(1),o()),n&2){let e=h().$implicit,t=h(2),i=E(4);s(),_(t.getSortDirectionCharacter(i,e))}}function He(n,u){if(n&1){let e=T();c(0,"div",12),P("click",function(){let i=k(e).$implicit,r=h(2);return O(r.openAbsencesService.toggleSort(i))}),d(1),a(2,"translate"),L(3,ze,2,1,"span",13),o()}if(n&2){let e=u.$implicit;h(2);let t=E(4);f("className",e),s(),M(" ",l(2,3,"open-absences.list.header."+e)," "),s(2),N(t?3:-1)}}function We(n,u){if(n&1){let e=T();c(0,"div")(1,"div",14)(2,"div",15),P("click",function(i){k(e);let r=se(4),g=h(2);return O(g.onCheckboxCellClick(i,r))}),c(3,"input",10,0),a(5,"async"),P("change",function(){let i=k(e).$implicit,r=h(2);return O(r.selectionService.toggle(i))}),o()(),c(6,"div",16)(7,"a",17),d(8),o()(),c(9,"div",18),d(10),o(),c(11,"div",19),d(12),a(13,"translate"),o(),c(14,"div",20),d(15),a(16,"translate"),o(),c(17,"div",21),d(18),a(19,"bkdDaysDifference"),o(),c(20,"div",22),d(21),a(22,"date"),o()()()}if(n&2){let e=u.$implicit,t=h(2);s(3),f("checked",l(5,9,t.selectionService.isSelected$(e))),s(4),f("routerLink",ce(22,Re,e.studentId,e.dateString)),s(),_(e.studentFullName),s(2),M(" ",e.studyClassNumber," "),s(2),M(" ",D(13,11,t.getLessonsCountKey(e),V(25,J,e.lessonsCount))," "),s(3),oe(" ",e.studyClassNumber,", ",D(16,14,t.getLessonsCountKey(e),V(27,J,e.lessonsCount))," "),s(3),M(" ",l(19,17,e.date)," "),s(3),_(D(22,19,e.date,"dd.MM.yyyy"))}}function Ye(n,u){if(n&1){let e=T();c(0,"div",4)(1,"div",8)(2,"div",9)(3,"input",10),P("change",function(i){k(e);let r=h();return O(r.onToggleAll(i.currentTarget==null?null:i.currentTarget.checked))}),o()(),H(4,He,4,5,"div",11,ie),o(),H(6,We,23,29,"div",null,Ve),o()}if(n&2){let e=h(),t=E(0),i=E(2);s(3),f("checked",t.length===i.length),s(),W(e.primarySortKeys),s(2),W(i)}}var Fe=(()=>{class n{constructor(){this.openAbsencesService=p(x),this.selectionService=p(v),this.scrollPosition=p(U),this.primarySortKeys=["name","date"],this.destroy$=new A}ngOnInit(){this.openAbsencesService.currentDetail=null,this.selectionService.clearNonOpenAbsencesEntries()}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}onToggleAll(e){this.openAbsencesService.filteredEntries$.pipe(C(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"}`}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=$({type:n,selectors:[["bkd-open-absences-list"]],decls:22,vars:29,consts:[["checkbox",""],[1,"d-flex","header-search",3,"valueChange","value","placeholder","label"],[1,"d-flex","align-items-center","justify-content-between","mt-1"],[1,"mt-3"],[1,"content"],[1,"selection-count","ps-1"],["routerLink","/open-absences/confirm",1,"edit","btn","btn-primary","btn-edit","mt-1","mb-2"],[1,"material-icons"],[1,"absence-header"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[3,"className"],[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"]],template:function(t,i){if(t&1){let r=T();I(0),a(1,"async"),I(2),a(3,"async"),I(4),a(5,"async"),I(6),a(7,"async"),c(8,"h1"),d(9),a(10,"translate"),o(),c(11,"div")(12,"div")(13,"bkd-resettable-input",1),a(14,"async"),a(15,"translate"),a(16,"translate"),P("valueChange",function(b){return k(r),O(i.openAbsencesService.search$.next(b))}),o(),L(17,Ue,7,8,"div",2),o(),L(18,Ke,1,0,"bkd-spinner"),a(19,"async"),L(20,qe,3,3,"p",3)(21,Ye,8,1,"div",4),o()}if(t&2){let r,g,b;j((r=l(1,6,i.selectionService.selection$))!==null&&r!==void 0?r:w(27,De)),s(2);let K=j((g=l(3,9,i.openAbsencesService.filteredEntries$))!==null&&g!==void 0?g:w(28,De));s(2),j(l(5,12,i.openAbsencesService.sortCriteria$));let Q=((b=(b=l(7,15,i.openAbsencesService.sortedEntries$))==null?null:b.length)!==null&&b!==void 0?b:0)===0||K.length===0;s(5),_(l(10,17,"open-absences.title")),s(4),f("value",l(14,19,i.openAbsencesService.search$))("placeholder",l(15,21,"open-absences.search-by-name-or-class"))("label",l(16,23,"open-absences.search")),s(4),N(Q?-1:17),s(),N(l(19,25,i.openAbsencesService.loading$)?18:Q?20:21)}},dependencies:[Te,me,Me,R,ae,ge,Pe],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})}}return n})();var Be=(()=>{class n{constructor(){}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=$({type:n,selectors:[["bkd-open-absences"]],features:[re([x,v,{provide:xe,useExisting:x}])],decls:1,vars:0,template:function(t,i){t&1&&S(0,"router-outlet")},dependencies:[le],encapsulation:2,changeDetection:0})}}return n})();var Gt=[{path:"",component:Be,children:[{path:"",component:Fe,data:{restoreScrollPositionFrom:["/open-absences/detail/:personId/:date","/open-absences/confirm"]}},{path:"detail/:personId/:date",component:we,data:{restoreScrollPositionFrom:["/open-absences/confirm"]}},{path:"confirm",component:Ae}]}];export{Gt as OPEN_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-GCWE54XA.js b/public/apps/webapp-schulverwaltung/chunk-GCWE54XA.js new file mode 100644 index 00000000..e4380248 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-GCWE54XA.js @@ -0,0 +1 @@ +import{a as Y}from"./chunk-N2RKIMWO.js";import{a as pe,b as le}from"./chunk-SKUS47ZU.js";import{f as ce,g as me}from"./chunk-26VH6QDS.js";import{d as K}from"./chunk-K42F6AEW.js";import{g as Z,h as J,i as se}from"./chunk-SL67CYEF.js";import{a as O,b as q}from"./chunk-HQSONWXM.js";import{x as V}from"./chunk-RXRYDGZR.js";import{$ as u,Ec as oe,Ia as M,La as ee,Mc as d,Nb as h,Nc as U,Ob as x,P as F,Pa as b,Pb as j,Sa as te,Sc as z,Sd as re,Ta as ne,Ud as N,X as D,Xa as p,Zc as f,_c as R,ab as c,bb as m,cb as s,da as X,ec as ie,hc as ae,hd as E,jb as l,l as P,n as G,nb as y,o as T,oc as B,qc as w,vb as o,wb as S,x as W,xa as g,xb as C,ya as a,yb as v}from"./chunk-NEW5VGRB.js";function xe(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.student.AddressLine2,"")}}function ve(t,r){if(t&1&&(c(0,"a",0),o(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhonePrivate,"",g),a(),C(" ",e.student.PhonePrivate," ")}}function Se(t,r){if(t&1&&(c(0,"a",0),o(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhoneMobile,"",g),a(),C(" ",e.student.PhoneMobile," ")}}function _e(t,r){if(t&1&&(c(0,"a",0),o(1),m()),t&2){let e=l();y("href","mailto:",e.email,"",g),a(),C(" ",e.email," ")}}var Ge=(()=>{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}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["bkd-student-dossier-address"]],inputs:{student:"student",emailProperty:"emailProperty"},decls:9,vars:7,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),o(1),s(2,"br"),b(3,xe,2,1),o(4),s(5,"br"),b(6,ve,3,3)(7,Se,3,3)(8,_e,2,3,"a",0),m()),i&2&&(a(),C(" ",n.student.AddressLine1,""),a(2),p(n.student.AddressLine2?3:-1),a(),v(" ",n.postalCode||""," ",n.student.Location,""),a(2),p(n.student.PhonePrivate?6:-1),a(),p(n.student.PhoneMobile?7:-1),a(),p(n.email?8:-1))},encapsulation:2,changeDetection:0})}}return t})();var $=(()=>{class t{transform(e){return e?.DisplayEmail||e?.Email||e?.Email2||null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=ee({name:"bkdPersonEmail",type:t,pure:!0})}}return t})();function be(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyName,"")}}function Pe(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyNameAddition,"")}}function Me(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();v(" ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Lastname)||""," ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Firstname)||"","")}}function Ie(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine1,"")}}function Ae(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine2,"")}}function Te(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();v(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PostalCode," ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Location,"")}}function De(t,r){if(t&1&&(c(0,"a",0),o(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness,"",g),a(),S(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness)}}function Ee(t,r){if(t&1&&(c(0,"a",0),h(1,"bkdPersonEmail"),o(2),h(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.company.apprenticeshipManager),"",g),a(2),S(x(3,5,e.company.apprenticeshipManager))}}function Le(t,r){if(t&1&&(c(0,"div",1),o(1),h(2,"translate"),h(3,"addSpace"),s(4,"br"),o(5),h(6,"date"),h(7,"date"),m()),t&2){let e=l();a(),v(" ",x(2,4,"shared.profile.apprenticeship-period"),"",j(3,6,":",":"),""),a(4),v(" ",j(6,9,e.company.apprenticeshipContract.ContractDateFrom,"dd.MM.yyyy"),"\u2013",j(7,12,e.company.apprenticeshipContract.ContractDateTo,"dd.MM.yyyy")," ")}}function ke(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l(2);v(" ",e.company.jobTrainer.Lastname||""," ",e.company.jobTrainer.Firstname||"","")}}function je(t,r){if(t&1&&(c(0,"a",0),o(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneBusiness,"",g),a(),S(e.company.jobTrainer.PhoneBusiness)}}function Re(t,r){if(t&1&&(c(0,"a",0),o(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneMobile,"",g),a(),S(e.company.jobTrainer.PhoneMobile)}}function Fe(t,r){if(t&1&&(c(0,"a",0),h(1,"bkdPersonEmail"),o(2),h(3,"bkdPersonEmail"),m()),t&2){let e=l(2);y("href","mailto:",x(1,3,e.company.jobTrainer),"",g),a(2),S(x(3,5,e.company.jobTrainer))}}function Be(t,r){if(t&1&&(c(0,"div",1),o(1),h(2,"translate"),h(3,"addSpace"),c(4,"address"),b(5,ke,2,2)(6,je,3,3,"a",0)(7,Re,3,3,"a",0)(8,Fe,4,7,"a",0),h(9,"bkdPersonEmail"),m()()),t&2){let e=l();a(),v(" ",x(2,6,"shared.profile.job-trainer"),"",j(3,8,":",":")," "),a(4),p(e.company.jobTrainer.Lastname||e.company.jobTrainer.Firstname?5:-1),a(),p(e.company.jobTrainer.PhoneBusiness?6:-1),a(),p(e.company.jobTrainer.PhoneMobile?7:-1),a(),p(x(9,11,e.company.jobTrainer)?8:-1)}}var Xe=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["bkd-student-dossier-apprenticeship-company"]],inputs:{company:"company"},decls:12,vars:12,consts:[[3,"href"],[1,"subentry"]],template:function(i,n){i&1&&(c(0,"address"),b(1,be,2,1)(2,Pe,2,1)(3,Me,2,2)(4,Ie,2,1)(5,Ae,2,1)(6,Te,2,2)(7,De,3,3,"a",0)(8,Ee,4,7,"a",0),h(9,"bkdPersonEmail"),m(),b(10,Le,8,15,"div",1)(11,Be,10,13,"div",1)),i&2&&(a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyName?1:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyNameAddition?2:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Lastname||n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Firstname?3:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine1?4:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine2?5:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PostalCode&&(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Location)?6:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PhoneBusiness?7:-1),a(),p(x(9,10,n.company.apprenticeshipManager)?8:-1),a(2),p(n.company.apprenticeshipContract.ContractDateFrom?10:-1),a(),p(n.company.jobTrainer?11:-1))},dependencies:[ae,re,me,$],styles:[".subentry[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();function we(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine1,"")}}function Ue(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine2,"")}}function ze(t,r){if(t&1&&(o(0),s(1,"br")),t&2){let e=l();v(" ",e.person.Zip," ",e.person.Location,"")}}function Ne(t,r){if(t&1&&(c(0,"a",0),o(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhonePrivate,"",g),a(),S(e.person.PhonePrivate)}}function Oe(t,r){if(t&1&&(c(0,"a",0),o(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhoneMobile,"",g),a(),S(e.person.PhoneMobile)}}function Je(t,r){if(t&1&&(c(0,"a",0),h(1,"bkdPersonEmail"),o(2),h(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.person),"",g),a(2),S(x(3,5,e.person))}}var nt=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["bkd-student-dossier-legal-representative"]],inputs:{person:"person"},decls:10,vars:10,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),o(1),s(2,"br"),b(3,we,2,1)(4,Ue,2,1)(5,ze,2,2)(6,Ne,3,3,"a",0)(7,Oe,3,3,"a",0)(8,Je,4,7,"a",0),h(9,"bkdPersonEmail"),m()),i&2&&(a(),v(" ",n.person.LastName," ",n.person.FirstName,""),a(2),p(n.person.AddressLine1?3:-1),a(),p(n.person.AddressLine2?4:-1),a(),p(n.person.Zip&&n.person.Zip?5:-1),a(),p(n.person.PhonePrivate?6:-1),a(),p(n.person.PhoneMobile?7:-1),a(),p(x(9,8,n.person)?8:-1))},dependencies:[$],encapsulation:2,changeDetection:0})}}return t})();var de=z({Email:f(d),Email2:f(d),PhoneBusiness:f(d),CompanyName:R(d),CompanyNameAddition:R(d),Firstname:f(d),Lastname:f(d),AddressLine1:R(d),AddressLine2:R(d),PostalCode:f(d),Location:f(d),Id:U});var ue=(()=>{class t extends O{constructor(){let e=u(w),i=u(E);super(e,i,de,"ApprenticeshipManagers")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var he=z({Email:f(d),Email2:f(d),PhoneBusiness:f(d),PhoneMobile:f(d),Firstname:f(d),Lastname:f(d),Id:U});var fe=(()=>{class t extends O{constructor(){let e=u(w),i=u(E);super(e,i,he,"JobTrainers")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Q(t,r){let e=+Z(t)-+Z(r);return e<0?-1:e>0?1:e}function ge(t,r,e){let[i,n]=J(e?.in,t,r);return i.getFullYear()-n.getFullYear()}function ye(t,r,e){let[i,n]=J(e?.in,t,r),_=Q(i,n),L=Math.abs(ge(i,n));i.setFullYear(1584),n.setFullYear(1584);let k=Q(i,n)===-_,A=_*(L-+k);return A===0?0:A}var $e=18;function Ce(t){return ye(new Date,t.Birthdate||new Date)>=$e}var qt=(()=>{class t{constructor(){this.studentService=u(ce),this.personsService=u(le),this.apprenticeshipManagersService=u(ue),this.jobTrainersService=u(fe),this.loadingService=u(se),this.dropDownItemsService=u(pe),this.storageService=u(N),this.loading$=this.loadingService.loading$}getProfile(e){return this.loadingService.load(T([this.loadStudent(e),this.loadLegalRepresentatives(e),this.loadApprenticeshipContracts(e)]).pipe(F(K(this.mapToProfile.bind(this)))))}getMyProfile(){let i=(this.storageService.getPayload()?.roles?.split(";")??[]).includes("StudentRole");return this.loadingService.load(this.personsService.getMyself({context:new B().set(Y,{disableErrorHandlingForStatus:[403]})}).pipe(F(n=>T([P(n),i?this.loadLegalRepresentatives(n.Id):P([]),i?this.loadApprenticeshipContracts(n.Id):P([]),this.loadStayPermitValue(n.StayPermit)]))).pipe(F(K(this.mapToProfile.bind(this))),W(V)))}loadStudent(e){return this.studentService.get(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(q())}loadLegalRepresentatives(e){return this.studentService.getLegalRepresentatives(e)}loadApprenticeshipContracts(e){return this.studentService.getCurrentApprenticeshipContracts(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(q([]))}loadStayPermitValue(e){return this.dropDownItemsService.getStayPermits().pipe(G(i=>i.find(n=>n.Key===e)?.Value||null))}mapToProfile(e,i,n,_=null){return e?(i=this.getRelevantLegalRepresentatives(e,i),T([this.loadLegalRepresentativPersons(i),this.loadJobTrainers(n),this.loadApprenticeshipManagers(n)]).pipe(G(([L,k,A])=>this.createProfile(e,_,i,L,n,A,k)))):P(null)}loadLegalRepresentativPersons(e){return e.length===0?P([]):this.personsService.getListForIds(e.map(i=>i.RepresentativeId))}loadJobTrainers(e){let i=e.map(n=>n.JobTrainer).filter(n=>typeof n=="number");return i.length===0?P([]):T(i.map(n=>this.jobTrainersService.get(n)))}loadApprenticeshipManagers(e){let i=e.map(n=>n.ApprenticeshipManagerId);return i.length===0?P([]):T(i.map(n=>this.apprenticeshipManagersService.get(n)))}createProfile(e,i,n,_,L,k,A){return{student:e,stayPermitValue:i||void 0,legalRepresentativePersons:n.map(H=>this.findPerson(H.RepresentativeId,_)).filter(V),apprenticeshipCompanies:L.map(H=>this.createApprenticeshipCompany(H,k,A))}}getRelevantLegalRepresentatives(e,i){let n=Ce(e);return i.filter(_=>!n||_.RepresentativeAfterMajority)}createApprenticeshipCompany(e,i,n){return{apprenticeshipContract:e,jobTrainer:this.findPerson(e.JobTrainer,n),apprenticeshipManager:this.findPerson(e.ApprenticeshipManagerId,i)}}findPerson(e,i){return e&&i.find(n=>n.Id===e)||null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var on=(()=>{class t{constructor(){this.settings=u(E),this.storageService=u(N),this.avatarStyles={}}ngOnChanges(e){e.studentId&&(this.avatarStyles=this.buildAvatarStyles(this.studentId))}buildAvatarStyles(e){return{"background-image":[this.buildAvatarUrl(e),this.fallbackAvatarUrl].map(i=>`url(${i})`).join(", ")}}buildAvatarUrl(e){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/personPictures/${e}?token=${i}`}get fallbackAvatarUrl(){return`${this.settings.scriptsAndAssetsPath}/assets/images/avatar-placeholder.png`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["bkd-avatar"]],inputs:{studentId:"studentId",link:"link",linkParams:"linkParams"},features:[X],decls:1,vars:5,consts:[[1,"avatar",3,"routerLink","queryParams","ngStyle"]],template:function(i,n){i&1&&s(0,"a",0),i&2&&(ne("disabled",!n.link),te("routerLink",n.link)("queryParams",n.linkParams)("ngStyle",n.avatarStyles))},dependencies:[oe,ie],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}"]})}}return t})();export{qt as a,Ge as b,Xe as c,nt as d,on as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SWPDWQYJ.js b/public/apps/webapp-schulverwaltung/chunk-GIRYST4Y.js similarity index 81% rename from public/apps/webapp-schulverwaltung/chunk-SWPDWQYJ.js rename to public/apps/webapp-schulverwaltung/chunk-GIRYST4Y.js index 30be171d..f398f6ec 100644 --- a/public/apps/webapp-schulverwaltung/chunk-SWPDWQYJ.js +++ b/public/apps/webapp-schulverwaltung/chunk-GIRYST4Y.js @@ -1 +1 @@ -import{k as u}from"./chunk-W6XALPR5.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{p as u}from"./chunk-KQORGECX.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/chunk-H664QRX4.js b/public/apps/webapp-schulverwaltung/chunk-H664QRX4.js new file mode 100644 index 00000000..1e3640f5 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-H664QRX4.js @@ -0,0 +1 @@ +import{Mc as t,Nc as n,Sc as o,Uc as r}from"./chunk-NEW5VGRB.js";var i=o({Key:r([n,t]),Value:t});export{i as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HK7T6V6Q.js b/public/apps/webapp-schulverwaltung/chunk-HK7T6V6Q.js new file mode 100644 index 00000000..10d16cfe --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-HK7T6V6Q.js @@ -0,0 +1 @@ +import{a as re,b as ve}from"./chunk-QB4CDTWV.js";import{a as cn}from"./chunk-FGETUL3R.js";import{a as an,b as pn}from"./chunk-LQUABKN6.js";import{b as dn}from"./chunk-GIRYST4Y.js";import{a as sn}from"./chunk-SME4UDGV.js";import{e as on}from"./chunk-GCWE54XA.js";import{n as nn,u as _e}from"./chunk-DJNW6R6G.js";import{a as Xe}from"./chunk-N2RKIMWO.js";import{b as Nt,c as Kt,e as Re}from"./chunk-FMUJPUYQ.js";import{a as Ft}from"./chunk-SKUS47ZU.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import{a as ln}from"./chunk-ETZGBBG5.js";import{c as Je,g as tn}from"./chunk-26VH6QDS.js";import{b as en}from"./chunk-JGKXAFYO.js";import{a as zt,b as Jt}from"./chunk-A7EOJZ46.js";import"./chunk-ZELJ2QPT.js";import{a as mn}from"./chunk-UZJ4FIXB.js";import{D as Qt,F as Ye,H as rn,b as At,f as he,l as jt,m as Fe,q as Ae,r as Ht,s as qt,t as ze,z as Wt}from"./chunk-KQORGECX.js";import{d as ie}from"./chunk-K42F6AEW.js";import{e as Gt,o as Ut}from"./chunk-NC6UEGAF.js";import{g as q,i as ne}from"./chunk-SL67CYEF.js";import{a as Be,e as Xt,f as Yt,g as Zt,h as Ce}from"./chunk-HQSONWXM.js";import{h as Tt,i as kt,j as Qe,k as Lt,l as $t,m as Ot,o as Dt,p as Et,q as ge,r as te,x as Rt,z as Ve}from"./chunk-RXRYDGZR.js";import{a as fe}from"./chunk-F4XODHS2.js";import{$ as p,$a as D,$b as yt,Ab as vt,B as rt,Bc as Oe,C as st,Cc as St,D as He,Eb as F,Ec as De,F as L,Fa as dt,Fb as K,Fd as ee,Gb as j,H as Te,Hb as pe,Hd as Ke,Ia as k,Ib as Se,Jb as Y,K as at,Kb as bt,L as ct,M as $,Md as Ee,N as qe,Nb as l,Nd as xe,O as ke,Ob as m,P as w,Pa as I,Pb as A,R as N,Rd as H,Sa as P,Sd as E,Ta as W,Ua as mt,Ud as Bt,Va as Le,Wd as Vt,X as V,Xa as M,Yc as xt,Za as ut,_a as O,a as se,ab as a,b as ae,bb as c,cb as U,da as pt,dc as Pt,ea as C,f as T,fa as _,g as ce,gb as y,gc as Z,h as be,hc as le,hd as R,ia as lt,ib as h,jb as f,kd as wt,l as z,ma as X,n as u,nb as Q,nd as Mt,o as x,oc as We,od as de,pd as me,qc as $e,rd as It,s as ye,sb as gt,sd as ue,tb as ft,u as ot,ub as ht,vb as d,w as J,wb as S,x as Pe,xb as v,ya as s,yb as Ct,zb as _t}from"./chunk-NEW5VGRB.js";function un(n,o){return+q(n)<+q(o)}function gn(n,o){return+q(n)==+q(o)}function fn(n,o,e){let t=+q(n,e?.in),[i,r]=[+q(o.start,e?.in),+q(o.end,e?.in)].sort((g,b)=>g-b);return t>=i&&t<=r}var Ge=(()=>{class n extends Be{constructor(){let e=p($e),t=p(R);super(e,t,nn,"SubscriptionDetails")}getListForEvent(e){return this.getList({params:{IdEvent:String(e)}})}update(e,t){let i={IdPerson:t.IdPerson,EventId:t.EventId,Value:e};return this.http.put(`${this.baseUrl}/${t.Id}`,i).pipe(u(()=>{}))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=V({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function hn(n,o,e){let t=o.map(r=>({eventId:r,group:n})),i=e.map(r=>t.find(g=>g.eventId===r.eventId)||r);return[...new Set([...i,...t])].filter(r=>r.group!==null)}var Ze=(()=>{class n extends Wt{static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=lt(n)))(i||n)}})()}static{this.\u0275prov=V({token:n,factory:n.\u0275fac})}}return n})();function Cn(n,o){return[...n].sort(Gn(o))}function Gn(n){return(o,e)=>{switch(n.primarySortKey){case"name":{let t=o.name.localeCompare(e.name);return n.ascending?t*-1:t}case"group":{let t=(o.detail.Value||"").localeCompare(e.detail.Value||"");return n.ascending?t*-1:t}}}}function _n(n,o){return n.map(e=>Nn(e,o))}function Nn(n,o){return{id:n.IdPerson,name:o.find(e=>e.StudentRef.Id===n.IdPerson)?.StudentFullName||"",group:n.Value,detail:n}}function vn(n,o){return n.filter(e=>e.VssId===o.subscriptionDetailGroupId)}function et(n,o){return n.find(e=>e.VssId===o.subscriptionDetailGroupId)}var bn="presence-control-group",oe=(()=>{class n{constructor(){this.userSettings=p(ve),this.eventService=p(cn),this.subscriptionDetailsService=p(Ge),this.loadingService=p(ne),this.settings=p(R),this.selectGroup$=new T,this.selectedLesson$=new be,this.lessonPresences$=new be,this.reloadSubscriptionDetails$=new T,this.defaultGroup=null,this.savedGroup$=this.selectedLesson$.pipe(w(e=>this.userSettings.getPresenceControlGroupView().pipe(u(t=>this.findGroupByLesson(t,e))))),this.group$=J(this.selectGroup$,this.savedGroup$).pipe(ke(this.defaultGroup),$(1)),this.loading$=this.loadingService.loading(bn),this.subscriptionDetailsDefinitions$=this.selectedLesson$.pipe(u(e=>e?.getEventIds()||[]),w(e=>ye(e.map(t=>this.eventService.getSubscriptionDetailsDefinitions(t)))),$(1)),this.groupsAvailability$=this.subscriptionDetailsDefinitions$.pipe(u(e=>e.every(t=>et(t,this.settings))),$(1)),this.subscriptionDetails$=x([this.selectedLesson$,this.groupsAvailability$,this.reloadSubscriptionDetails$.pipe(u(()=>!1),ke(!0))]).pipe(w(([e,t,i])=>e&&t?this.loadSubscriptionDetailsForLesson(e,i):z([])),u(e=>vn(e,this.settings)),$(1)),this.subscriptionDetailPersonIds$=x([this.group$,this.subscriptionDetails$]).pipe(u(([e,t])=>t.filter(i=>i.Value===e).map(i=>i.IdPerson)),ke([]))}selectGroup(e){this.selectGroup$.next(e)}setSelectedLesson(e){this.selectedLesson$.next(e)}setLessonPresences(e){this.lessonPresences$.next(e)}getSubscriptionDetailsDefinitions(){return this.subscriptionDetailsDefinitions$.pipe(u(Ke),u(e=>et(e,this.settings)))}getSubscriptionDetailsForStudents(){return x([this.subscriptionDetails$,this.lessonPresences$]).pipe(u(ie(_n)))}reloadSubscriptionDetails(){this.reloadSubscriptionDetails$.next(void 0)}loadSubscriptionDetailsForLesson(e,t=!0){return this.loadingService.load(ye(xe(e.getEventIds()).map(i=>this.subscriptionDetailsService.getListForEvent(i))),t?void 0:bn).pipe(u(Ke))}findGroupByLesson(e,t){return e.find(r=>r.eventId===t?.getEventIds()[0])?.group||this.defaultGroup}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=V({token:n,factory:n.\u0275fac})}}return n})();var yn=(()=>{class n extends Be{constructor(){let e=p($e),t=p(R);super(e,t,Je,"LessonTeachers")}loadOtherTeachersLessonAbsences(e,t,i){let r=`${this.baseUrl}/except/${e}/LessonAbsences?expand=LessonRef`;return t&&t.length>0&&(r=r.concat("&filter.StudentRef=;"+t.join(";"))),this.http.get(r,{params:i}).pipe(w(Vt(Je)))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=V({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Pn(n,o){return n===null&&o===null||n!==null&&o!==null&&n.TeacherInformation===o.TeacherInformation&&n.LessonDateTimeFrom.getTime()===o.LessonDateTimeFrom.getTime()&&n.LessonDateTimeTo.getTime()===o.LessonDateTimeTo.getTime()}function Sn(n){let o=new tt(n.TeacherInformation,n.LessonDateTimeFrom,n.LessonDateTimeTo);return o.addLesson(n),o}var tt=class{constructor(o,e,t){this.TeacherInformation=o,this.LessonDateTimeFrom=e,this.LessonDateTimeTo=t,this.lessons=[]}addLesson(o){this.lessons.some(e=>Ae(e,o))||(this.lessons.push(o),this.updateId(),this.updateStudyClassNumbers(),this.updateEventDesignations())}getIds(){return[...new Set(this.lessons.map(o=>o.LessonRef.Id))]}getEventIds(){return[...new Set(this.lessons.map(o=>o.EventRef.Id))]}updateId(){this.id=[...new Set(this.lessons.map(o=>o.LessonRef.Id).sort())].join("-")}updateStudyClassNumbers(){this.studyClassNumbers=[...new Set(this.lessons.map(o=>o.StudyClassNumber).sort((o,e)=>o.localeCompare(e)))].join(", ")}updateEventDesignations(){this.eventDesignations=[...new Set(this.lessons.map(o=>o.EventDesignation).sort())].join(", ")}};function xn(n){return Un(n).reduce((o,e)=>{let t=o.find(r=>Pn(r,e));if(t)return t.addLesson(e),o;let i=Sn(e);return[...o,i]},[]).sort(ze)}function wn(n){if(n.length===0)return null;let o=new Date;if(n=[...n].sort(ze),Nt(o,n[0].LessonDateTimeFrom)){for(let e of n)if(un(o,e.LessonDateTimeFrom)||fn(o,{start:e.LessonDateTimeFrom,end:e.LessonDateTimeTo}))return e;return n[n.length-1]}return n[0]}function Un(n){return n.reduce((o,e)=>o.some(t=>Ae(t,e))?o:[...o,e],[])}function Mn(n,o,e,t){return n.map(i=>{let r=o.find(g=>jn(g.presence,i));if(r){let g;return!r.newPresenceTypeId&&i.Comment?g=e.find(b=>b.IsComment)||null:g=e.find(b=>b.Id===r.newPresenceTypeId)||null,ae(se({},i),{TypeRef:Hn(g),Date:null,Type:g?g.Designation:null,ConfirmationStateId:Fe(g,t)})}return i})}function jn(n,o){return n.LessonRef.Id===o.LessonRef.Id&&n.StudentRef.Id===o.StudentRef.Id}function Hn(n){return{Id:n?n.Id:null,HRef:null}}function Ne(n){return o=>o.reduce((e,t)=>e+(t.presenceCategory===n?1:0),0)}function In(){return n=>n.reduce((o,e)=>o+(e.precedingAbsences&&e.precedingAbsences.length>0?1:0),0)}var Tn=Object.values(re),G=(()=>{class n{constructor(){this.userSettings=p(ve),this.lessonPresencesService=p(Re),this.lessonTeacherService=p(yn),this.presenceTypesService=p(he),this.groupService=p(oe),this.dropDownItemsService=p(Ft),this.loadingService=p(ne),this.storageService=p(Bt),this.settings=p(R),this.location=p(yt),this.selectedDateSubject$=new ce(new Date),this.selectedDate$=this.selectedDateSubject$.asObservable().pipe(u(e=>Gt(e)),Te(Ee)),this.viewModeSubject$=new T,this.viewMode$=J(this.viewModeSubject$,this.userSettings.getPresenceControlViewMode().pipe(L(1))),this.lessons$=this.selectedDate$.pipe(w(e=>this.loadLessonsByDate(e)),$(1)),this.selectLessonId$=new T,this.selectLesson$=this.selectLessonId$.pipe(w(e=>this.getLessonById(e))),this.selectedLesson$=x([Xt(this.selectLesson$.pipe(Te((e,t)=>Ee(e,t))),Yt(this.settings.lessonPresencesRefreshTime)),this.lessons$]).pipe(u(([e,t])=>t.find(i=>i.id===e.id)?e:null),$(1)),this.studyClassCount$=this.selectedLesson$.pipe(u(e=>e?.lessons.length||0)),this.updateLessonPresences$=new T,this.reloadLessonPresences$=new T,this.lessonPresences$=J(Zt(this.selectedLesson$,this.reloadLessonPresences$).pipe(w(e=>e?this.loadLessonPresencesByLesson(e):z([]))),this.updateLessonPresences$).pipe($(1)),this.presenceTypes$=this.loadPresenceTypes().pipe($(1)),this.reloadStudentIdsWithUnconfirmedAbsences$=new T,this.studentIdsWithUnconfirmedAbsences$=J(this.selectedDate$,this.selectedLesson$.pipe(qe(1)),this.reloadStudentIdsWithUnconfirmedAbsences$).pipe(w(()=>this.loadStudentIdsWithUnconfirmedAbsences()),$(1)),this.loading$=this.loadingService.loading$,this.absenceConfirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe($(1)),this.studentIds$=this.lessonPresences$.pipe(u(e=>xe(e.map(t=>t.StudentRef.Id))),$(1)),this.otherTeachersAbsences$=this.studentIds$.pipe(Te(Ee),w(e=>e.length>0?this.lessonTeacherService.loadOtherTeachersLessonAbsences(this.getMyself(),e):z([])),$(1)),this.groupsAvailability$=this.groupService.groupsAvailability$,this.presenceControlEntries$=x([this.selectedLesson$,this.lessonPresences$,this.presenceTypes$,this.absenceConfirmationStates$,this.otherTeachersAbsences$]).pipe(u(ie(Ht))),this.presenceControlEntriesByGroup$=x([this.groupService.group$,this.presenceControlEntries$,this.groupService.subscriptionDetailPersonIds$]).pipe(u(ie(dn)),$(1)),this.presentCount$=this.presenceControlEntriesByGroup$.pipe(u(Ne("present"))),this.absentCount$=this.presenceControlEntriesByGroup$.pipe(u(Ne("absent"))),this.unapprovedCount$=this.presenceControlEntriesByGroup$.pipe(u(Ne("unapproved"))),this.absentPrecedingCount$=this.presenceControlEntriesByGroup$.pipe(u(In())),this.queryParamsString$=x([this.selectedDate$,this.selectedLesson$,this.viewMode$]).pipe(u(ie(this.buildQueryParams.bind(this))),u(Jt)),this.destroy$=new T,this.queryParamsString$.pipe(N(this.destroy$)).subscribe(e=>{this.location.replaceState("/presence-control",e),this.confirmBackLinkParams={returnparams:e}}),this.viewMode$.pipe(qe(1),w(e=>this.userSettings.savePresenceControlViewMode(e)),N(this.destroy$)).subscribe(),this.selectedLesson$.pipe(N(this.destroy$)).subscribe(e=>{this.groupService.setSelectedLesson(e)}),this.lessonPresences$.pipe(N(this.destroy$)).subscribe(e=>this.groupService.setLessonPresences(e))}ngOnDestroy(){this.destroy$.next()}setDate(e){this.selectedDateSubject$.next(e)}setLessonId(e){this.selectLessonId$.next(e)}setViewMode(e){this.viewModeSubject$.next(e)}updateLessonPresencesTypes(e){x([this.lessonPresences$.pipe(L(1)),this.presenceTypes$.pipe(L(1))]).pipe(u(([t,i])=>Mn(t,e,i,this.settings))).subscribe(t=>this.updateLessonPresences$.next(t))}getNextPresenceType(e){return this.presenceTypes$.pipe(L(1),u(t=>e.getNextPresenceType(t)))}hasUnconfirmedAbsences(e){return this.studentIdsWithUnconfirmedAbsences$.pipe(u(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(u(xn))}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.presenceTypes$)}loadStudentIdsWithUnconfirmedAbsences(){return ot(0,this.settings.unconfirmedAbsencesRefreshTime||-1).pipe(w(()=>this.lessonPresencesService.getListOfUnconfirmed()),u(e=>xe(e.map(t=>t.StudentRef.Id))))}buildQueryParams(e,t,i){let r={date:Ut(e,"yyyy-MM-dd"),viewMode:i};return t&&(r.lesson=String(t.id)),r}getLessonById(e){let t=String(e);return this.lessons$.pipe(u(i=>t&&i.find(r=>r.id===t)||wn(i)),Pe(Boolean))}getMyself(){let e=this.storageService.getPayload();return Number(e?.holder_id||e?.id_person)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=V({token:n,factory:n.\u0275fac})}}return n})();var qn=(n,o)=>o.id;function Wn(n,o){if(n&1){let e=y();a(0,"div",1)(1,"input",5),h("change",function(){let i=C(e).$implicit,r=f();return _(r.onSelectionChange(i))}),c(),a(2,"label",6),d(3),c()()}if(n&2){let e=o.$implicit,t=o.$index,i=f();s(),Q("id","group-",t,""),P("checked",e.id===i.selected.id)("value",e.id),s(),Q("for","group-",t,""),s(),v(" ",e.label," ")}}var we=function(n){return n.Select="select",n.Assign="assign",n}(we||{}),kn=(()=>{class n{constructor(){this.activeModal=p(te),this.translate=p(H),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===we.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}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-group-dialog"]],inputs:{dialogMode:"dialogMode",subscriptionDetailsDefinitions:"subscriptionDetailsDefinitions",group:"group"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","groups",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"p"),d(2),l(3,"translate"),c(),a(4,"form"),O(5,Wn,4,7,"div",1,qn),c()(),a(7,"div",2)(8,"button",3),h("click",function(){return i.activeModal.dismiss()}),d(9),l(10,"translate"),c(),a(11,"button",4),h("click",function(){return i.activeModal.close(i.getSelectedGroup())}),d(12),l(13,"translate"),c()()),t&2&&(s(2),v(" ",m(3,3,i.title)," "),s(3),D(i.groupOptions),s(4),v(" ",m(10,5,"presence-control.groups.cancel")," "),s(3),v(" ",m(13,7,"presence-control.groups.save")," "))},dependencies:[ee,ue,de,me,E],encapsulation:2})}}return n})();var Qn=(n,o)=>o.id,Kn=()=>[],zn=()=>["/presence-control"];function Jn(n,o){if(n&1&&(a(0,"span",12),d(1),c()),n&2){let e=f().$implicit,t=f(),i=j(0);s(),S(t.getSortDirectionCharacter(i,e))}}function Xn(n,o){if(n&1){let e=y();a(0,"div",11),h("click",function(){let i=C(e).$implicit,r=f();return _(r.toggleSort(i))}),d(1),l(2,"translate"),I(3,Jn,2,1,"span",12),c()}if(n&2){let e=o.$implicit;f();let t=j(0);P("className",e),s(),v(" ",m(2,3,"presence-control.groups.list.header."+e)," "),s(2),M(t?3:-1)}}function Yn(n,o){n&1&&U(0,"bkd-spinner")}function Zn(n,o){n&1&&U(0,"bkd-spinner",18)}function ei(n,o){if(n&1){let e=y();a(0,"div",13)(1,"div",14)(2,"input",15,0),l(4,"async"),h("change",function(){let i=C(e).$implicit,r=f(2);return _(r.selectionService.toggle(i))}),c()(),a(5,"div",16),d(6),c(),a(7,"div",17)(8,"span"),d(9),c(),I(10,Zn,1,0,"bkd-spinner",18),l(11,"async"),c()()}if(n&2){let e=o.$implicit,t=f(2);s(2),P("checked",m(4,4,t.selectionService.isSelected$(e))),s(4),v(" ",e.name," "),s(3),S(e.group?e.group:""),s(),M(m(11,6,t.groupService.loading$)?10:-1)}}function ti(n,o){if(n&1&&O(0,ei,12,8,"div",13,Qn),n&2){f();let e=j(2);D(e)}}var Ln=(()=>{class n{constructor(){this.route=p(Oe),this.state=p(G),this.selectionService=p(Ze),this.groupService=p(oe),this.userSettings=p(ve),this.subscriptionDetailService=p(Ge),this.toastService=p(fe),this.translate=p(H),this.modalService=p(_e),this.primarySortKeys=["name","group"],this.backlinkQueryParams$=this.route.queryParams.pipe(u(({returnparams:e})=>e),u(zt)),this.eventIds$=this.state.selectedLesson$.pipe(u(e=>e?.getEventIds()||[])),this.sortCriteriaSubject$=new ce({primarySortKey:"name",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=x([this.groupService.getSubscriptionDetailsForStudents(),this.sortCriteria$]).pipe(u(ie(Cn))),this.selected=[]}ngOnInit(){this.selectionService.selection$.subscribe(e=>this.selected=e)}selectGroup(){this.openGroupModal(we.Select,this.selectCallback.bind(this))}assignGroup(){this.openGroupModal(we.Assign,this.assignCallback.bind(this))}openGroupModal(e,t){x([this.groupService.getSubscriptionDetailsDefinitions(),this.groupService.group$]).pipe(L(1)).subscribe(([i,r])=>{let g=this.modalService.open(kn);g.componentInstance.dialogMode=e,g.componentInstance.subscriptionDetailsDefinitions=i,g.componentInstance.group=r,g.result.then(b=>{t(b)},()=>{})})}selectCallback(e){x([this.eventIds$,this.userSettings.getPresenceControlGroupView()]).pipe(L(1),w(([t,i])=>this.userSettings.savePresenceControlGroupView(hn(e.id,t,i))),u(()=>e.id)).subscribe(t=>this.groupService.selectGroup(t))}assignCallback(e){ye(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(L(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-group"]],features:[pe([Ze])],decls:33,vars:32,consts:[["checkbox",""],[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"],[3,"click","className"],[1,"sort-direction"],[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"],[1,"inline","small"]],template:function(t,i){if(t&1){let r=y();F(0),l(1,"async"),F(2),l(3,"async"),F(4),l(5,"async"),F(6),l(7,"async"),a(8,"div"),U(9,"bkd-backlink",1),l(10,"async"),a(11,"h1"),d(12),l(13,"translate"),c(),a(14,"div",2)(15,"div",3)(16,"span",4),d(17),l(18,"translate"),c(),a(19,"button",5),h("click",function(){return C(r),_(i.selectGroup())}),d(20),l(21,"translate"),l(22,"translate"),c()(),a(23,"a",6),h("click",function(){return C(r),_(i.assignGroup())}),a(24,"i",7),d(25,"edit"),c()()(),a(26,"div",8)(27,"div",9),O(28,Xn,4,5,"div",10,ut),c(),I(30,Yn,1,0,"bkd-spinner"),l(31,"async"),I(32,ti,2,0),c()()}if(t&2){let r;K(m(1,8,i.sortCriteria$)),s(2),K(m(3,11,i.sortedEntries$));let g=(r=m(5,14,i.selectionService.selection$))!==null&&r!==void 0?r:Se(30,Kn),b=m(7,16,i.groupService.group$);s(7),P("link",Se(31,zn))("params",m(10,18,i.backlinkQueryParams$)),s(3),S(m(13,20,"presence-control.groups.title")),s(5),S(m(18,22,"presence-control.groups.show")),s(3),v(" ",b?m(21,24,"presence-control.groups.group")+" "+b:m(22,26,"presence-control.groups.all")," "),s(3),W("disabled",g.length===0),s(5),D(i.primarySortKeys),s(2),M(m(31,28,i.state.loading$)?30:32)}},dependencies:[rn,Ce,Z,E],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})}}return n})();var ni=20,ii=100,Me=function(n){return n.AddUpdateAction="ADD",n.RemoveUpdateAction="REMOVE",n}(Me||{}),Ue=(()=>{class n{constructor(){this.toastService=p(fe),this.translate=p(H),this.restService=p(At),this.presenceTypesService=p(he),this.settings=p(R),this.destroy$=new T,this.action$=new T,this.pendingUpdates$=this.action$.pipe(at(this.reduceUpdates.bind(this),[]),ct()),this.revertUpdates$=new T,this.performUpdates$=this.pendingUpdates$.pipe(He(ii),Pe(Ve(Ye)),st(this.performUpdates.bind(this))),this.stateUpdates$=J(this.pendingUpdates$,this.revertUpdates$).pipe(He(ni),Pe(Ve(Ye))),this.performUpdates$.pipe(N(this.destroy$)).subscribe()}ngOnDestroy(){this.destroy$.next()}updatePresenceType(e,t=null){this.dispatchAddUpdate(e.lessonPresence,t)}performUpdates(e){let t=this.groupUpdates(e);return x(Object.keys(t).reduce((i,r)=>{let g=t[r];return Object.keys(g).forEach(b=>{let Ie=g[b];i.push(this.performUpdateForGroup(Ie))}),i},[])).pipe(u(()=>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(rt(t=>this.revertUpdatesAfterError(e,t)))}performLessonPresencesUpdatesByIds(e,t,i=null){return i?(i?this.presenceTypesService.getPresenceType(i):z(null)).pipe(w(g=>this.restService.editLessonPresences([e],t,g?.Id,Fe(g,this.settings)||void 0,{context:new We().set(Xe,{disableErrorHandling:!0})}))):this.restService.removeLessonPresences([e],t,{context:new We().set(Xe,{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(i=>ae(se({},i),{newPresenceTypeId:i.presence.TypeRef.Id}))),z(void 0)}groupUpdates(e){return e.reduce((t,i)=>{let r=String(i.newPresenceTypeId&&i.newPresenceTypeId);return t[r]||(t[r]={}),Array.isArray(t[r][i.presence.LessonRef.Id])||(t[r][i.presence.LessonRef.Id]=[]),t[r][i.presence.LessonRef.Id].push(i),t},{})}reduceUpdates(e,t){switch(t.type){case Me.AddUpdateAction:{let{presence:i,newPresenceTypeId:r}=t.payload,g=e.findIndex($n(i));return g===-1?[...e,{presence:i,newPresenceTypeId:r}]:[...e.slice(0,g),{presence:e[g].presence,newPresenceTypeId:r},...e.slice(g+1)]}case Me.RemoveUpdateAction:return e.filter(Ve($n(t.payload)));default:return e}}dispatchAddUpdate(e,t){this.action$.next({type:Me.AddUpdateAction,payload:{presence:e,newPresenceTypeId:t}})}dispatchRemoveUpdate(e){this.action$.next({type:Me.RemoveUpdateAction,payload:e})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=V({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function $n(n){return o=>o.presence.LessonRef.Id===n.LessonRef.Id&&o.presence.StudentRef.Id===n.StudentRef.Id}var oi=30;function it(n){return`blockLesson${n.lessonPresence.Id}`}var je=(()=>{class n{constructor(){this.state=p(G),this.lessonPresencesService=p(Re),this.loadingService=p(ne),this.settings=p(R)}getBlockLessonPresenceControlEntries(e){return x([this.state.lessons$.pipe(L(1)),this.loadChangeableLessonPresences(e),this.state.presenceTypes$.pipe(L(1)),this.state.absenceConfirmationStates$.pipe(L(1)),this.state.otherTeachersAbsences$.pipe(L(1))]).pipe(u(([t,i,r,g,b])=>this.filterBlockLessonPresences(e,i).map(Ie=>qt(t.find(Rn=>Rn.id===Ie.LessonRef.Id.toString()),Ie,r,g,b))))}filterBlockLessonPresences(e,t){return[...t].sort((i,r)=>i.LessonDateTimeFrom>r.LessonDateTimeFrom?1:-1).reduce((i,r)=>{let g=i[i.length-1];return this.isWithinBlockTime(r,g)?(i.push(r),i):i.find(b=>b.Id===e.lessonPresence.Id)?i:[r]},[])}isWithinBlockTime(e,t){return t?e.LessonDateTimeFrom.getTime()-t.LessonDateTimeTo.getTime()<=oi*60*1e3:!0}loadChangeableLessonPresences(e){return x([this.loadLessonPresences(e),this.state.presenceTypes$.pipe(L(1))]).pipe(u(([t,i])=>t.filter(r=>jt(r,i.find(g=>g.Id===r.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(u(t=>t.filter(i=>i.TeacherInformation===e.lessonPresence.TeacherInformation))),it(e))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=V({token:n,factory:n.\u0275fac})}}return n})();var ri=(n,o)=>o.entry.id;function si(n,o){if(n&1){let e=y();a(0,"div",1)(1,"input",5),h("change",function(){let i=C(e).$implicit;return _(i.selected=!i.selected)}),c(),a(2,"label",6)(3,"i"),d(4),c(),a(5,"div",7),d(6),l(7,"date"),l(8,"date"),c()()()}if(n&2){let e=o.$implicit,t=o.$index,i=f();s(),Q("id","lesson-presence-",t,""),P("checked",e.selected),s(),W("fw-bold",i.isCurrentLesson(e)),Q("for","lesson-presence-",t,""),s(),Le("",e.entry.presenceCategory," material-icons pe-2"),s(),S(e.entry.presenceCategoryIcon),s(2),_t(" ",A(7,14,e.entry.lessonPresence.LessonDateTimeFrom,"HH:mm"),"\u2013",A(8,17,e.entry.lessonPresence.LessonDateTimeTo,"HH:mm")," ",e.entry.lessonPresence.EventDesignation," ")}}var On=(()=>{class n{constructor(){this.activeModal=p(te),this.blockLessonOptions=[]}ngOnInit(){this.blockLessonOptions=this.buildLessonPresenceOptions()}getSelectedEntries(){return this.blockLessonOptions.filter(({selected:e})=>e).map(({entry:e})=>e)}isCurrentLesson(e){return gn(e.entry.lessonPresence.LessonDateTimeFrom,this.entry.lessonPresence.LessonDateTimeFrom)}buildLessonPresenceOptions(){return this.blockPresenceControlEntries.map(e=>({entry:e,selected:this.entry.confirmationState===e.confirmationState}))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-block-lesson-component"]],inputs:{entry:"entry",blockPresenceControlEntries:"blockPresenceControlEntries"},decls:15,vars:11,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label","d-flex",3,"for"],[1,"d-block","text-truncate"]],template:function(t,i){if(t&1){let r=y();a(0,"div",0)(1,"p"),d(2),l(3,"translate"),c(),a(4,"form"),O(5,si,9,20,"div",1,ri),c()(),F(7),a(8,"div",2)(9,"button",3),h("click",function(){return C(r),_(i.activeModal.close())}),d(10),l(11,"translate"),c(),a(12,"button",4),h("click",function(){C(r);let b=j(7);return _(i.activeModal.close(b))}),d(13),l(14,"translate"),c()()}if(t&2){s(2),v(" ",m(3,4,"presence-control.block-lesson.text")," "),s(3),D(i.blockLessonOptions),s(2);let r=K(i.getSelectedEntries());s(3),v(" ",m(11,7,"presence-control.block-lesson.cancel")," "),s(2),P("disabled",r.length===0),s(),v(" ",m(14,9,"presence-control.block-lesson.save")," ")}},dependencies:[ee,ue,de,me,le,E],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}"]})}}return n})();var ai=(n,o)=>o.Id;function ci(n,o){if(n&1&&(a(0,"div"),d(1),l(2,"date"),l(3,"date"),l(4,"addSpace"),c()),n&2){let e=o.$implicit;s(),vt(" ",A(2,5,e.LessonRef.From,"HH:mm"),"\u2013",A(3,8,e.LessonRef.To,"HH:mm")," ",e.LessonRef.EventDesignation,"",A(4,11,":",":")," ",e.Type," ")}}var Dn=(()=>{class n{constructor(){this.activeModal=p(te)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-preceding-absence"]],inputs:{precedingAbsences:"precedingAbsences"},decls:10,vars:6,consts:[[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"p"),d(2),l(3,"translate"),c(),O(4,ci,5,14,"div",null,ai),c(),a(6,"div",1)(7,"button",2),h("click",function(){return i.activeModal.dismiss()}),d(8),l(9,"translate"),c()()),t&2&&(s(2),v(" ",m(3,2,"presence-control.preceding-absence.text")," "),s(2),D(i.precedingAbsences),s(4),v(" ",m(9,4,"presence-control.preceding-absence.cancel")," "))},dependencies:[le,E,tn],encapsulation:2})}}return n})();var pi=n=>["student",n,"absences"],li=n=>["/presence-control/student",n,"absences"];function di(n,o){if(n&1&&(U(0,"bkd-avatar",0),l(1,"async")),n&2){let e=f();P("studentId",m(1,3,e.studentId$))("link",Y(5,li,e.entry.lessonPresence.StudentRef.Id.toString()))("linkParams",e.profileReturnParams)}}function mi(n,o){if(n&1&&(a(0,"span"),d(1),c()),n&2){let e=f(2);s(),S(e.entry.presenceType==null?null:e.entry.presenceType.Designation)}}function ui(n,o){if(n&1){let e=y();a(0,"button",12),h("click",function(){C(e);let i=f();return _(i.updatePresenceType(i.entry))}),I(1,mi,2,1,"span"),c()}if(n&2){let e=f();s(),M(e.entry.presenceType!=null&&e.entry.presenceType.IsIncident?-1:1)}}function gi(n,o){n&1&&U(0,"bkd-spinner",5)}function fi(n,o){if(n&1){let e=y();a(0,"button",13),h("click",function(){C(e);let i=f();return _(i.showPrecedingAbsences(i.entry))}),a(1,"i",14),d(2,"info"),c()()}}function hi(n,o){if(n&1&&(a(0,"span",9),d(1),c()),n&2){let e=f();s(),v(" ",e.entry.lessonPresence.StudyClassNumber," ")}}function Ci(n,o){if(n&1){let e=y();a(0,"a",15),h("click",function(){C(e);let i=f();return _(i.updateIncident(i.entry))}),a(1,"i",4),d(2,"edit"),c(),a(3,"span"),d(4),l(5,"translate"),c()()}if(n&2){let e=f();s(4),S(m(5,1,(e.entry.presenceType==null?null:e.entry.presenceType.IsIncident)&&(e.entry.presenceType==null?null:e.entry.presenceType.Designation)||"presence-control.entry.incident"))}}var En=(()=>{class n{constructor(){this.toastService=p(fe),this.translate=p(H),this.modalService=p(_e),this.loadingService=p(ne),this.hasUnconfirmedAbsences=!1,this.showClassName=!1,this.togglePresenceType=new X,this.changeIncident=new X,this.entry$=new be(1),this.studentId$=this.entry$.pipe(u(({lessonPresence:e})=>e.StudentRef.Id)),this.loading$=this.entry$.pipe(w(e=>this.loadingService.loading(it(e))))}get classNames(){return[this.entry.presenceCategory,this.viewMode].join(" ")}ngOnChanges(e){e.entry&&this.entry$.next(e.entry.currentValue)}get isListViewMode(){return this.viewMode===re.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(Dn);t.componentInstance.precedingAbsences=e.precedingAbsences}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-entry"]],hostVars:2,hostBindings:function(t,i){t&2&&mt(i.classNames)},inputs:{entry:"entry",hasUnconfirmedAbsences:"hasUnconfirmedAbsences",viewMode:"viewMode",showClassName:"showClassName",profileReturnParams:"profileReturnParams"},outputs:{togglePresenceType:"togglePresenceType",changeIncident:"changeIncident"},features:[pt],decls:18,vars:20,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],["type","button",1,"presence-category","designation","btn","btn-link"],["type","button",1,"presence-category","status","btn","btn-link",3,"click","disabled"],[1,"position-relative"],[1,"material-icons"],[1,"inline","small"],["type","button",1,"previously-absent","d-flex","btn","btn-link"],[1,"student-info",3,"routerLink","queryParams"],[1,"student-name","text-truncate"],[1,"study-class","text-truncate"],[1,"unconfirmed-absences"],[1,"incident","btn","btn-link"],["type","button",1,"presence-category","designation","btn","btn-link",3,"click"],["type","button",1,"previously-absent","d-flex","btn","btn-link",3,"click"],[1,"material-icons-outlined"],[1,"incident","btn","btn-link",3,"click"]],template:function(t,i){if(t&1){let r=y();I(0,di,2,7,"bkd-avatar",0)(1,ui,2,1,"button",1),F(2),l(3,"async"),a(4,"button",2),h("click",function(){return C(r),_(i.updatePresenceType(i.entry))}),a(5,"div",3)(6,"i",4),d(7),c(),I(8,gi,1,0,"bkd-spinner",5),c()(),I(9,fi,3,0,"button",6),a(10,"a",7)(11,"span",8),d(12),c(),I(13,hi,2,1,"span",9),a(14,"span",10),d(15),l(16,"translate"),c()(),I(17,Ci,6,3,"a",11)}if(t&2){M(i.isListViewMode?-1:0),s(),M(i.entry.showDesignation?1:-1);let r=m(3,14,i.loading$);s(3),P("disabled",r),s(2),W("invisible",r),s(),S(i.entry.presenceCategoryIcon),s(),M(r?8:-1),s(),M(i.entry.precedingAbsences!=null&&i.entry.precedingAbsences.length?9:-1),s(),P("routerLink",Y(18,pi,i.entry.lessonPresence.StudentRef.Id))("queryParams",i.profileReturnParams),s(2),S(i.entry.lessonPresence.StudentFullName),s(),M(i.isListViewMode&&i.showClassName?13:-1),s(2),v(" ",i.hasUnconfirmedAbsences?m(16,16,"presence-control.entry.unconfirmed-absences"):""," "),s(2),M(i.entry.canChangeIncident?17:-1)}},dependencies:[on,Ce,De,Z,E],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}}']})}}return n})();var _i=(n,o)=>o.viewMode,vi=(n,o)=>o.id,bi=(n,o)=>({"btn-link":n,"btn-danger":o}),yi=n=>["groups",n],Pi=n=>({returnparams:n});function Si(n,o){if(n&1){let e=y();a(0,"div",22),h("click",function(){let i;C(e);let r=f();return _((i=r.lessonDropdown())==null?null:i.toggle())}),d(1),l(2,"date"),a(3,"span",23),d(4),l(5,"date"),c()()}if(n&2){let e=f();s(),v(" ",A(2,2,e.selectedLesson.LessonDateTimeFrom,"HH:mm"),"\u2013"),s(3),S(A(5,5,e.selectedLesson.LessonDateTimeTo,"HH:mm"))}}function xi(n,o){if(n&1){let e=y();a(0,"div",28),h("click",function(){let i=C(e).$implicit,r=f(2);return _(r.selectLessonChange.emit(i))}),a(1,"div",29)(2,"div"),d(3),l(4,"date"),l(5,"date"),c(),a(6,"div",25),d(7),c(),a(8,"div",25),d(9),c()()()}if(n&2){let e=o.$implicit,t=f(2);W("active",e.id===t.selectedLesson.id),s(3),Ct(" ",A(4,6,e.LessonDateTimeFrom,"HH:mm"),"\u2013",A(5,9,e.LessonDateTimeTo,"HH:mm")," "),s(4),v(" ",e.eventDesignations," "),s(2),v(" ",e.studyClassNumbers," ")}}function wi(n,o){if(n&1&&(a(0,"div",7)(1,"div",24)(2,"div",25),d(3),c(),a(4,"div",25),d(5),c()(),a(6,"div",26),O(7,xi,10,12,"div",27,vi),c()()),n&2){let e=f();s(3),S(e.selectedLesson.eventDesignations),s(2),S(e.selectedLesson.studyClassNumbers),s(2),D(e.lessons)}}function Mi(n,o){if(n&1){let e=y();a(0,"bkd-caret",30),h("click",function(){let i;C(e);let r=f();return _((i=r.lessonDropdown())==null?null:i.toggle())}),c()}if(n&2){let e,t=f();P("expanded",((e=t.lessonDropdown())==null?null:e.isOpen())||!1)}}function Ii(n,o){if(n&1&&(a(0,"a",19),l(1,"async"),l(2,"async"),l(3,"async"),a(4,"i",31),d(5,"groups"),c()()),n&2){let e=f();P("ngClass",bt(9,bi,m(1,3,e.isGroupSelected$)===!1,m(2,5,e.isGroupSelected$)))("routerLink",Y(12,yi,e.selectedLesson.id))("queryParams",Y(14,Pi,m(3,7,e.state.queryParamsString$)))}}function Ti(n,o){if(n&1){let e=y();a(0,"button",32),h("click",function(){let i=C(e).$implicit,r=f();return _(r.viewModeChange.emit(i.viewMode))}),a(1,"i",31),d(2),c()()}if(n&2){let e=o.$implicit,t=f();W("btn-outline-secondary",e.viewMode===t.viewMode)("btn-link",e.viewMode!==t.viewMode)("active",e.viewMode===t.viewMode),P("disabled",!t.selectedLesson),s(2),S(e.icon)}}var ki=ge.prototype._positionMenu;ge.prototype._positionMenu=function(...o){let e=ki.apply(this,o);if(this._anchor.nativeElement.id==="lesson-dropdown"){let t=this._bodyContainer||this._menu.nativeElement,i=t.style.transform?.match(/translate\(([0-9-.]+)px, ([0-9-.]+)px\)/);i&&parseFloat(i[1])<0&&(t.style.transform=`translate(0px, ${i[2]}px)`)}return e};var Bn=(()=>{class n{constructor(){this.state=p(G),this.groupService=p(oe),this.presentCount=null,this.absentCount=null,this.unapprovedCount=null,this.absentPrecedingCount=null,this.search="",this.selectLessonChange=new X,this.selectDateChange=new X,this.searchChange=new X,this.viewModeChange=new X,this.lessonDropdown=dt(ge),this.viewModeOptions=[{viewMode:re.List,icon:"list"},{viewMode:re.Grid,icon:"view_module"}],this.isGroupSelected$=this.groupService.group$.pipe(u(Rt));let e=p(Qe);e.popperOptions=t=>ae(se({},t),{modifiers:t.modifiers?.map(i=>(i.name==="offset"&&(i.options={offset:({placement:r,reference:g,popper:b})=>r==="bottom-start"?[(window.innerWidth-b.width)/2-g.x,0]:[]}),i))})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-header"]],viewQuery:function(t,i){t&1&>(i.lessonDropdown,ge,5),t&2&&ft()},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"},features:[pe([Qe,{provide:Tt,useClass:$t},{provide:kt,useClass:ln}])],decls:41,vars:19,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"],[1,"lesson-time"],["ngbDropdown","","container","body","display","dynamic","placement","bottom",1,"lesson-description"],[1,"dropdown-caret",3,"expanded"],[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",1,"group","btn","me-2","me-sm-4",3,"ngClass","routerLink","queryParams"],[1,"views"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"disabled","btn-outline-secondary","btn-link","active"],[1,"lesson-time",3,"click"],[1,"lesson-time-to"],["id","lesson-dropdown","ngbDropdownToggle",""],[1,"text-truncate"],["ngbDropdownMenu","","aria-labelledby","lesson-dropdown"],["ngbDropdownItem","",3,"active"],["ngbDropdownItem","",3,"click"],[1,"lesson-entry"],[1,"dropdown-caret",3,"click","expanded"],[1,"material-icons","align-middle"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"click","disabled"]],template:function(t,i){if(t&1){let r=y();a(0,"div",1)(1,"div",2)(2,"button",3),h("click",function(){C(r);let b=ht(6);return _(b.toggle())}),a(3,"i",4),d(4,"calendar_today"),c()(),a(5,"input",5,0),h("ngModelChange",function(b){return C(r),_(i.selectDateChange.emit(b))}),c()(),I(7,Si,6,8,"div",6)(8,wi,9,2,"div",7)(9,Mi,1,1,"bkd-caret",8),c(),a(10,"div",9)(11,"div",10)(12,"i",4),d(13,"check_circle"),c(),a(14,"span",11),d(15),c()(),a(16,"div",12)(17,"i",4),d(18,"cancel"),c(),a(19,"span",11),d(20),c()(),a(21,"div",13)(22,"i",4),d(23,"help"),c(),a(24,"span",11),d(25),c()(),a(26,"div",14)(27,"i",15),d(28,"info"),c(),a(29,"span",11),d(30),c()()(),a(31,"div",16)(32,"bkd-resettable-input",17),l(33,"translate"),l(34,"translate"),h("valueChange",function(b){return C(r),_(i.searchChange.emit(b))}),c(),a(35,"div",18),I(36,Ii,6,16,"a",19),l(37,"async"),a(38,"div",20),O(39,Ti,3,8,"button",21,_i),c()()()}t&2&&(s(5),P("ngModel",i.selectDate),s(2),M(i.selectedLesson?7:-1),s(),M(i.selectedLesson?8:-1),s(),M(i.lessons.length>0?9:-1),s(6),S(i.presentCount!==null?i.presentCount:"?"),s(5),S(i.absentCount!==null?i.absentCount:"?"),s(5),S(i.unapprovedCount!==null?i.unapprovedCount:"?"),s(5),S(i.absentPrecedingCount!==null?i.absentPrecedingCount:"?"),s(2),P("value",i.search)("disabled",!i.selectedLesson)("placeholder",m(33,13,"presence-control.header.search-by-name"))("label",m(34,15,"presence-control.header.search")),s(4),M(m(37,17,i.selectedLesson&&i.state.groupsAvailability$)?36:-1),s(3),D(i.viewModeOptions))},dependencies:[Lt,ee,wt,Mt,It,ge,Et,Dt,Ot,en,an,Pt,De,Z,le,E],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}}']})}}return n})();var Li=(n,o)=>o.id;function $i(n,o){if(n&1){let e=y();a(0,"div",1)(1,"input",5),h("change",function(){let i=C(e).$implicit,r=f();return _(r.onSelectionChange(i))}),c(),a(2,"label",6),d(3),c()()}if(n&2){let e=o.$implicit,t=o.$index,i=f();s(),Q("id","incident-",t,""),P("checked",e.id===i.selected.id)("value",e.id),s(),Q("for","incident-",t,""),s(),v(" ",e.label," ")}}var Vn=(()=>{class n{constructor(){this.activeModal=p(te),this.translate=p(H),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}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-incident"]],inputs:{incident:"incident",incidentTypes:"incidentTypes"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","incident",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"p"),d(2),l(3,"translate"),c(),a(4,"form"),O(5,$i,4,7,"div",1,Li),c()(),a(7,"div",2)(8,"button",3),h("click",function(){return i.activeModal.dismiss()}),d(9),l(10,"translate"),c(),a(11,"button",4),h("click",function(){return i.activeModal.close(i.getSelectedIncident())}),d(12),l(13,"translate"),c()()),t&2&&(s(2),v(" ",m(3,3,"presence-control.incident.text")," "),s(3),D(i.incidentOptions),s(4),v(" ",m(10,5,"presence-control.incident.cancel")," "),s(3),v(" ",m(13,7,"presence-control.incident.save")," "))},dependencies:[ee,ue,de,me,E],styles:["form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #dee2e6;padding-bottom:1rem;margin-bottom:1rem}"]})}}return n})();var Oi=(n,o)=>o.id,Di=()=>[],Ei=n=>({returnparams:n});function Bi(n,o){n&1&&U(0,"bkd-spinner")}function Vi(n,o){n&1&&(a(0,"p",1),d(1),l(2,"translate"),c()),n&2&&(s(),S(m(2,1,"presence-control.no-lessons")))}function Fi(n,o){n&1&&(a(0,"p",1),d(1),l(2,"translate"),c()),n&2&&(s(),v(" ",m(2,1,"presence-control.no-lesson-presences")," "))}function Ai(n,o){if(n&1){let e=y();a(0,"bkd-presence-control-entry",4),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),h("togglePresenceType",function(i){C(e);let r=f(3);return _(r.togglePresenceType(i))})("changeIncident",function(i){C(e);let r=f(3);return _(r.changeIncident(i))}),c()}if(n&2){let e,t=o.$implicit,i=f(3);P("entry",t)("hasUnconfirmedAbsences",m(1,5,i.state.hasUnconfirmedAbsences(t)))("viewMode",m(2,7,i.state.viewMode$))("showClassName",((e=m(3,9,i.state.studyClassCount$))!==null&&e!==void 0?e:0)>1)("profileReturnParams",Y(13,Ei,m(4,11,i.state.queryParamsString$)))}}function Ri(n,o){if(n&1&&(a(0,"div"),l(1,"async"),O(2,Ai,5,15,"bkd-presence-control-entry",3,Oi),c()),n&2){let e=f(2),t=j(4);Le("default-entries entries view-mode-",m(1,3,e.state.viewMode$),""),s(2),D(t)}}function Gi(n,o){if(n&1){let e=y();a(0,"bkd-presence-control-header",0),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),h("searchChange",function(i){C(e);let r=f();return _(r.search$.next(i))})("viewModeChange",function(i){C(e);let r=f();return _(r.state.setViewMode(i))})("selectDateChange",function(i){C(e);let r=f();return _(r.state.setDate(i))})("selectLessonChange",function(i){C(e);let r=f();return _(r.state.setLessonId(i.id))}),c(),I(8,Vi,3,3,"p",1)(9,Fi,3,3,"p",1)(10,Ri,4,5,"div",2)}if(n&2){let e=f(),t=j(0),i=j(2),r=j(4);P("selectedLesson",t)("lessons",i)("presentCount",m(1,10,e.state.presentCount$))("absentCount",m(2,12,e.state.absentCount$))("unapprovedCount",m(3,14,e.state.unapprovedCount$))("absentPrecedingCount",m(4,16,e.state.absentPrecedingCount$))("viewMode",m(5,18,e.state.viewMode$))("selectDate",m(6,20,e.state.selectedDate$))("search",m(7,22,e.search$)),s(8),M(t?r.length===0?9:10:8)}}var Ni=["studentFullName"],Fn=(()=>{class n{constructor(){this.state=p(G),this.blockLessons=p(je),this.lessonPresencesUpdateService=p(Ue),this.presenceTypesService=p(he),this.modalService=p(_e),this.scrollPosition=p(mn),this.route=p(Oe),this.search$=new ce(""),this.entries$=x([this.state.presenceControlEntriesByGroup$,this.search$]).pipe(u(([e,t])=>pn(e,Ni,t)),$(1)),this.destroy$=new T}ngOnInit(){this.route.queryParams.pipe(N(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(i=>this.lessonPresencesUpdateService.updatePresenceType(t,i?i.Id:null)))}togglePresenceType(e){this.blockLessons.getBlockLessonPresenceControlEntries(e).pipe(L(1)).subscribe(t=>{if(t.length===1){let i=t[0];this.doTogglePresenceType([i])}else{let i=this.modalService.open(On);i.componentInstance.entry=e,i.componentInstance.blockPresenceControlEntries=t,i.result.then(r=>{r&&this.doTogglePresenceType(r)},()=>{})}})}updateIncident(e,t){this.lessonPresencesUpdateService.updatePresenceType(e,t)}changeIncident(e){this.presenceTypesService.incidentTypes$.subscribe(t=>{let i=this.modalService.open(Vn);i.componentInstance.incident=t.find(r=>r.Id===e.presenceType?.Id)||null,i.componentInstance.incidentTypes=t,i.result.then(r=>{this.updateIncident(e,r?.Id||null)},()=>{})})}restoreStateFromParams(e){e.date&&this.state.setDate(xt(e.date));let t=String(e.lesson);t&&this.state.setLessonId(t),e.viewMode&&Tn.includes(e.viewMode)&&this.state.setViewMode(e.viewMode)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control-list"]],decls:12,vars:16,consts:[[3,"searchChange","viewModeChange","selectDateChange","selectLessonChange","selectedLesson","lessons","presentCount","absentCount","unapprovedCount","absentPrecedingCount","viewMode","selectDate","search"],[1,"mt-3"],[3,"class"],[3,"entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"],[3,"togglePresenceType","changeIncident","entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"]],template:function(t,i){if(t&1&&(F(0),l(1,"async"),F(2),l(3,"async"),F(4),l(5,"async"),a(6,"h1"),d(7),l(8,"translate"),c(),I(9,Bi,1,0,"bkd-spinner"),l(10,"async"),I(11,Gi,11,24)),t&2){let r;K(m(1,2,i.state.selectedLesson$)),s(2),K(m(3,5,i.state.lessons$)),s(2),K((r=m(5,8,i.entries$))!==null&&r!==void 0?r:Se(15,Di)),s(3),S(m(8,11,"presence-control.title")),s(2),M(m(10,13,i.state.loading$)?9:11)}},dependencies:[Bn,En,Ce,Z,E],styles:["bkd-presence-control-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.entries.view-mode-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{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})}}return n})();var An=(()=>{class n{constructor(){this.state=p(G),this.lessonPresencesUpdateService=p(Ue),this.destroy$=new T}ngOnInit(){this.lessonPresencesUpdateService.stateUpdates$.pipe(N(this.destroy$)).subscribe(e=>this.state.updateLessonPresencesTypes(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=k({type:n,selectors:[["bkd-presence-control"]],features:[pe([G,je,oe,Qt,{provide:Kt,useExisting:G}])],decls:1,vars:0,template:function(t,i){t&1&&U(0,"router-outlet")},dependencies:[St],encapsulation:2,changeDetection:0})}}return n})();var ac=[{path:"",component:An,children:[{path:"",component:Fn,data:{restoreScrollPositionFrom:["/presence-control/student/:id/addresses","/presence-control/student/:id/absences","/presence-control/student/:id/grades"]}},sn,{path:"groups/:id",component:Ln}]}];export{ac as PRESENCE_CONTROL_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HLAFRD2O.js b/public/apps/webapp-schulverwaltung/chunk-HQSONWXM.js similarity index 82% rename from public/apps/webapp-schulverwaltung/chunk-HLAFRD2O.js rename to public/apps/webapp-schulverwaltung/chunk-HQSONWXM.js index 570bc63c..3f9c3263 100644 --- a/public/apps/webapp-schulverwaltung/chunk-HLAFRD2O.js +++ b/public/apps/webapp-schulverwaltung/chunk-HQSONWXM.js @@ -1 +1 @@ -import{$a as C,B as u,E as f,Ga as x,Md as O,Nd as P,O as s,P as i,U as g,_a as w,l as a,lc as b,m as l,n as o,q as h,rb as M,t as m,v as d,w as p}from"./chunk-S3H6YSFW.js";var _=(()=>{class t{constructor(){}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=x({type:t,selectors:[["bkd-spinner"]],decls:4,vars:0,consts:[[1,"spinner-container"],["role","status",1,"spinner-border"],[1,"visually-hidden"]],template:function(r,c){r&1&&(w(0,"div",0)(1,"div",1)(2,"span",2),M(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}"]})}}return t})();var v=class{constructor(e,n,r,c){this.http=e,this.settings=n,this.codec=r,this.resourcePath=c}get(e,n){return this.http.get(`${this.baseUrl}/${e}`,n).pipe(i(O(this.codec)))}getList(e){return this.http.get(`${this.baseUrl}/`,e).pipe(i(P(this.codec)))}get baseUrl(){return`${this.settings.apiUrl}/${this.resourcePath}`}};function S(t){return u(e=>e instanceof b&&e.status===404?a(t||null):l(()=>e))}function T(t){return e=>h(()=>(t(),e))}function A(t){return e=>e.pipe(o(n=>n??t),f(t))}function H(t,e){return t.pipe(i(n=>e.pipe(s(n),o(()=>n))))}function R(t,e=window.document){return p(...["click","keydown"].map(n=>m(e,n))).pipe(s(null),i(()=>d(t)),o(()=>{}))}function W(t,e){return p(t,e.pipe(g(t),o(([n,r])=>r)))}export{v as a,_ as b,S as c,T as d,A as e,H as f,R as g,W as h}; +import{B as u,E as f,Ia as x,O as s,P as i,U as g,Vd as O,Wd as P,ab as w,bb as C,l as a,m as l,n as o,pc as b,q as h,t as m,v as d,vb as M,w as p}from"./chunk-NEW5VGRB.js";var _=(()=>{class t{constructor(){}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=x({type:t,selectors:[["bkd-spinner"]],decls:4,vars:0,consts:[[1,"spinner-container"],["role","status",1,"spinner-border"],[1,"visually-hidden"]],template:function(r,c){r&1&&(w(0,"div",0)(1,"div",1)(2,"span",2),M(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}"]})}}return t})();var v=class{constructor(e,n,r,c){this.http=e,this.settings=n,this.codec=r,this.resourcePath=c}get(e,n){return this.http.get(`${this.baseUrl}/${e}`,n).pipe(i(O(this.codec)))}getList(e){return this.http.get(`${this.baseUrl}/`,e).pipe(i(P(this.codec)))}get baseUrl(){return`${this.settings.apiUrl}/${this.resourcePath}`}};function S(t){return u(e=>e instanceof b&&e.status===404?a(t||null):l(()=>e))}function T(t){return e=>h(()=>(t(),e))}function A(t){return e=>e.pipe(o(n=>n??t),f(t))}function H(t,e){return t.pipe(i(n=>e.pipe(s(n),o(()=>n))))}function R(t,e=window.document){return p(...["click","keydown"].map(n=>m(e,n))).pipe(s(null),i(()=>d(t)),o(()=>{}))}function W(t,e){return p(t,e.pipe(g(t),o(([n,r])=>r)))}export{v as a,S as b,T as c,A as d,H as e,R as f,W as g,_ as h}; diff --git a/public/apps/webapp-schulverwaltung/chunk-IYHUHAMR.js b/public/apps/webapp-schulverwaltung/chunk-IYHUHAMR.js deleted file mode 100644 index 3af203a9..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-IYHUHAMR.js +++ /dev/null @@ -1,3 +0,0 @@ -import{a as mt}from"./chunk-QE74EW6O.js";import{a as pt,b as ct}from"./chunk-NK7SMC5C.js";import{a as Ui}from"./chunk-TO3HOIOR.js";import{a as It}from"./chunk-DQSLVCJO.js";import{e as Ni}from"./chunk-AXC265QM.js";import{a as wt,b as Oi,c as $i,d as Di,e as Li,f as at,g as ot,h as Gi,i as Fi,j as Ri,k as Bi,l as ji,m as Be,o as Vi,p as ge,r as je,s as Ai,u as Hi,v as lt}from"./chunk-LY5STZD6.js";import{e as Ei}from"./chunk-TMXWSOGF.js";import{b as st}from"./chunk-UPTESATB.js";import{a as Ti}from"./chunk-Y4QYVF5K.js";import{a as Wi}from"./chunk-KV3V2W4Q.js";import{a as ut,c as zi}from"./chunk-3PSL2UAK.js";import{a as Pi,b as Mi}from"./chunk-LZEJSWWW.js";import{a as wi,d as dt}from"./chunk-UN6AN2DI.js";import{a as Ii,d as ki}from"./chunk-CXJU4L5R.js";import{H as Ve,p as xi,y as bi}from"./chunk-W6XALPR5.js";import{a as Fe,c as Si,d as Re}from"./chunk-XBIMNMBY.js";import{o as yi}from"./chunk-A7CCEKNQ.js";import{i as rt,j as be}from"./chunk-2AZMKO7X.js";import{a as nt,b as he}from"./chunk-HLAFRD2O.js";import{a as ti,b as se,h as ci,i as mi,k as ui,l as hi,r as tt,w as _i,x as ue}from"./chunk-QTBTUQ3W.js";import{a as it}from"./chunk-HVJBOTRL.js";import{$ as At,$a as a,$b as ce,Ab as F,Ac as X,Ad as li,B as Ft,Bb as A,Bd as Le,C as Rt,Cb as P,Cd as pi,D as Bt,Db as ne,Eb as Oe,F as oe,Fa as Pe,Fb as G,Ga as _,Gb as Et,H as Z,Ia as Kt,Id as gi,J as Ke,Ja as Yt,Jb as p,Jd as fi,K as jt,Kb as c,Lb as D,Ld as vi,M as Q,Na as T,Nd as Ci,O as Vt,Ob as Xt,P as O,Pd as ae,Qa as h,Qd as I,R as _e,Ra as le,Sb as U,Sd as Ge,Tb as Jt,Va as S,X as de,Xa as Me,Ya as H,Za as N,_ as $,_a as s,a as R,ab as C,b as B,ba as Ht,ca as Nt,cc as K,da as ke,dc as ye,dd as me,ea as E,eb as L,f as te,fa as w,fc as ei,g as z,gb as b,gd as Ze,h as bt,ha as Ut,hb as m,ib as Zt,id as De,jb as Qt,jd as Qe,ka as Wt,kb as pe,kd as ii,l as V,lb as Ne,m as Gt,ma as J,mc as Ye,n as y,nd as ni,o as q,od as ri,pa as zt,pd as Xe,qa as j,qb as Se,qd as si,ra as qt,rb as l,sb as v,sd as ai,ta as Tt,tb as f,td as oi,ub as Ue,w as qe,x as ve,xa as ie,xb as Ee,xc as re,xd as Je,ya as r,yb as we,yc as xe,yd as et,za as x,zb as Ie,zc as $e,zd as di}from"./chunk-S3H6YSFW.js";var Yn=t=>[t,"tests"];function Zn(t,o){if(t&1&&(s(0,"span"),l(1),p(2,"date"),C(3,"wbr"),l(4),p(5,"date"),a()),t&2){let e=m();r(),f("",D(2,2,e.event().dateFrom,"dd.MM.yyyy"),"\u2013"),r(3),v(D(5,5,e.event().dateTo,"dd.MM.yyyy"))}}function Qn(t,o){if(t&1&&(s(0,"a",6)(1,"i",8),l(2,"arrow_right_alt"),a(),s(3,"span",9),l(4),a()()),t&2){let e=m(2);h("routerLink",G(2,Yn,e.event().id)),r(4),v(e.event().evaluationText)}}function Xn(t,o){if(t&1&&(s(0,"a",7)(1,"i",8),l(2,"arrow_right_alt"),a(),s(3,"span",9),l(4),a()()),t&2){let e=m(2);h("href",e.event().evaluationLink,ie),r(4),f("",e.event().evaluationText," ")}}function Jn(t,o){if(t&1&&(s(0,"div",5),T(1,Qn,5,4,"a",6)(2,Xn,5,2,"a",7),a()),t&2){let e=m();r(),S(e.event().evaluationLink?-1:1),r(),S(e.event().evaluationLink?2:-1)}}var qi=(()=>{class t{constructor(){this.event=j.required(),this.withRatings=j(!0),this.link=U(()=>ki(this.event().detailLink))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-list-entry"]],inputs:{event:[1,"event"],withRatings:[1,"withRatings"]},decls:11,vars:9,consts:[[1,"designation"],[3,"routerLink","queryParams"],[1,"date"],[1,"registrations"],[1,"registrations-label"],[1,"rating"],[1,"d-flex",3,"routerLink"],[1,"d-flex",3,"href"],[1,"material-icons"],[1,"ps-1"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"a",1),l(2),a()(),s(3,"div",2),T(4,Zn,6,8,"span"),a(),s(5,"div",3),l(6),s(7,"span",4),l(8),p(9,"translate"),a()(),T(10,Jn,3,2,"div",5)),i&2&&(r(),h("routerLink",n.link().link)("queryParams",n.link().params),r(),v(n.event().designation),r(2),S(n.event().dateFrom&&n.event().dateTo?4:-1),r(2),f(" ",n.event().studentCount," "),r(2),v(c(9,7,n.event().studentCount===1?"events.registration":"events.registrations")),r(2),S(n.withRatings()&&n.event().evaluationText?10:-1))},dependencies:[X,ye,I],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}}']})}}return t})();var er=10300,tr=10260,ir=10250,nr=14030,rr=10350;function ht(t){let{HasEvaluationStarted:o,EvaluationUntil:e,HasTestGrading:i}=t.EvaluationStatusRef;if(o===!0&&(t.StatusId===nr||t.StatusId===rr))return{value:ee.Rating};if(o===!0&&i===!1){if(e)return{value:ee.RatingUntil};if(t.StatusId===er)return{value:ee.IntermediateRating}}return o===!1&&i===!0&&t.StatusId!==tr&&t.StatusId!==ir?{value:ee.Tests}:o===!0&&i===!0?e?{value:ee.Tests,label:ee.RatingUntil}:{value:ee.Tests,label:ee.IntermediateRating}:null}function Ki(t){return t.EvaluationStatusRef.HasEvaluationStarted===!0}function Yi(t){return t.EvaluationStatusRef.HasReviewOfEvaluationStarted===!0&&!!t.FinalGrades?.length}function gt(t){let o=t.Classes?t.Classes.map(e=>e.Number).join(", "):null;return o?t.Designation+", "+o:t.Designation}function Zi(t,o){return t?(o.Leadership??"").split(",").some(e=>e.trim()===t.fullname):!1}function Qi(t,o){let e=new URLSearchParams({returnlink:o});return o.startsWith("/dashboard")?`/dashboard/students/${t}?${e}`:o.startsWith("/events/current")?`/events/current/${t}?${e}`:`/events/${t}/students?${e}`}function Xi(t){let o=t.ParticipatingStudents?.map(e=>({id:e.Id,name:e.FullName,email:e.DisplayEmail??void 0}))??[];return{eventId:t.Id,eventDesignation:t.Designation,studyClasses:(t.Classes??[]).map(e=>e.Designation).sort(),entries:o}}function kt(t,o){return B(R({},t),{entries:t.entries.map(e=>{let i=o.find(d=>d.StudentId===e.id),n=i?[i.CompanyName,i.CompanyNameAddition].filter(Boolean).join(" \u2013 "):void 0;return B(R({},e),{company:n})})})}function Pt(t,o,e,{eventDesignation:i,emailFallback:n}={}){return{eventId:t,eventDesignation:i??e[0]?.EventDesignation??"",studyClasses:[],entries:o.map(d=>{let u=e.find(g=>g.PersonId===d.Id);return{id:d.Id,subscriptionId:u?.Id,name:d.FullName,email:(n?d.DisplayEmail??d.Email:d.DisplayEmail)??void 0,status:u?.Status,registrationDate:u?.RegistrationDate??void 0}})}}function Ji(t,o){return B(R({},t),{entries:t.entries.map(e=>B(R({},e),{studyClass:o.find(i=>i.StudentRef.Id===e.id)?.StudyClassNumber}))})}var ee=function(t){return t.Rating="rating",t.RatingUntil="rating-until",t.IntermediateRating="intermediate-rating",t.Tests="add-tests",t}(ee||{}),He=(()=>{class t{constructor(e,i,n,d,u,g,k,W,fe){this.coursesRestService=e,this.eventsRestService=i,this.studyClassRestService=n,this.subscriptionsRestService=d,this.loadingService=u,this.storageService=g,this.translate=k,this.router=W,this.settings=fe,this.loading$=this.loadingService.loading$,this.searchFields$=new z(["designation"]),this.searchSubject$=new z(""),this.search$=this.searchSubject$.asObservable(),this.roles$=new z(null),this.isClassTeacher$=this.roles$.pipe(y(Ce=>Ti(Ce,"ClassTeacherRole")),Q(1)),this.withStudyCourses$=new z(!1),this.unratedCourses$=this.roles$.pipe(O(this.loadUnratedCourses.bind(this)),Q(1)),this.studyCourses$=this.withStudyCourses$.pipe(O(this.loadStudyCourses.bind(this)),Q(1)),this.formativeAssessments$=this.isClassTeacher$.pipe(O(this.loadFormativeAssessments.bind(this)),Q(1)),this.studyClasses$=this.isClassTeacher$.pipe(O(this.loadStudyClasses.bind(this)),Q(1)),this.events$=this.getEvents().pipe(Q(1)),this.filteredEvents$=q([this.events$,this.searchFields$,this.search$]).pipe(y(Re(ct)))}setSearch(e){this.searchSubject$.next(e)}setRoles(e){this.roles$.next(e)}setWithStudyCourses(e){this.withStudyCourses$.next(e)}setSearchFields(e){this.searchFields$.next(e)}getEntries(e=!1){return this.filteredEvents$.pipe(y(i=>e?i.filter(n=>n.evaluationText):i))}getEvents(){return this.loadingService.load(q([this.unratedCourses$,this.studyCourses$,this.formativeAssessments$,this.studyClasses$]),{stopOnFirstValue:!0}).pipe(y(Re(this.createAndSortEvents.bind(this))))}loadUnratedCourses(e){return this.coursesRestService.getExpandedCourses(e).pipe(y(i=>i.filter(n=>!Yi(n))))}loadStudyCourses(e){if(!e)return V([]);let i=this.storageService.getPayload();return this.eventsRestService.getStudyCourseEvents().pipe(y(n=>n.filter(d=>Zi(i,d))),O(n=>this.subscriptionsRestService.getSubscriptionCountsByEvents(n.map(d=>d.Id)).pipe(y(d=>n.map(u=>B(R({},u),{StudentCount:d[u.Id]??0}))))))}loadFormativeAssessments(e){return e?this.studyClassRestService.getActiveFormativeAssessments():V([])}loadStudyClasses(e){return e?this.studyClassRestService.getActive():V([])}createAndSortEvents(e,i,n,d){let u=d.filter(g=>!n.map(k=>k.Id).includes(g.Id));return[...this.createFromCourses(e),...this.createFromStudyCourses(i),...this.createFromAssessments(n),...this.createFromStudyClasses(u)].sort((g,k)=>g.designation.localeCompare(k.designation))}createFromCourses(e){return e.map(i=>{let n=ht(i);return{id:i.Id,designation:gt(i),detailLink:this.buildStudentsLink(i.Id),studentCount:i.AttendanceRef.StudentCount||0,dateFrom:i.DateFrom,dateTo:i.DateTo,state:n?.value||null,evaluationText:this.getEvaluationText(n,i.EvaluationStatusRef.EvaluationUntil),evaluationLink:n?.value&&n?.value!==ee.Tests?this.buildEvaluationLink(i.Id):null}})}createFromStudyCourses(e){return e.map(i=>({id:i.Id,designation:i.Designation,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}createFromAssessments(e){return this.createFromStudyClasses(e).map(n=>B(R({},n),{state:ee.Rating,evaluationText:this.translate.instant("events.state.rating"),evaluationLink:this.buildEvaluationLink(n.id)}))}createFromStudyClasses(e){return e.map(i=>({id:i.Id,designation:i.Number,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}getEvaluationText(e,i){let n=e?.label||e?.value;return n?this.translate.instant(`events.state.${n}`)+(n===ee.RatingUntil?` ${i?yi(i,"dd.MM.yyyy"):""}`:""):""}buildStudentsLink(e){return Qi(e,this.router.url)}buildEvaluationLink(e){return(this.settings.eventlist.evaluation??"").replace(":id",String(e))}static{this.\u0275fac=function(i){return new(i||t)($(ge),$(mt),$(Ui),$(je),$(be),$(Ge),$(ae),$($e),$(me))}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var or=(t,o)=>o.id,dr=()=>[];function lr(t,o){t&1&&C(0,"bkd-spinner")}function pr(t,o){t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2&&(r(),f(" ",c(2,1,"events.rating")," "))}function cr(t,o){if(t&1&&C(0,"bkd-events-list-entry",8),t&2){let e=o.$implicit,i=m(3);h("event",e)("withRatings",i.withRatings)}}function mr(t,o){if(t&1&&(s(0,"div",3)(1,"div",4),l(2),p(3,"translate"),a(),s(4,"div",5),l(5),p(6,"translate"),a(),s(7,"div",6),l(8),p(9,"translate"),a(),T(10,pr,3,3,"div",7),a(),H(11,cr,1,2,"bkd-events-list-entry",8,or)),t&2){let e=m(2),i=P(0);r(2),v(c(3,4,"events.designation")),r(3),v(c(6,6,"events.date")),r(3),f(" ",c(9,8,"events.registrations")," "),r(2),S(e.withRatings?10:-1),r(),N(i)}}function ur(t,o){t&1&&(s(0,"p",2),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events.no-events")))}function hr(t,o){if(t&1&&T(0,mr,13,10)(1,ur,3,3,"p",2),t&2){m();let e=P(0);S(e.length>0?0:1)}}var nn=["designation"],gr=[...nn,"evaluationText"],vt=(()=>{class t{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),e.withRatings&&this.state.setSearchFields(e.withRatings.currentValue?gr:nn)}static{this.\u0275fac=function(i){return new(i||t)(x(He),x(Ge))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-list"]],inputs:{withStudyCourses:"withStudyCourses",withRatings:"withRatings"},features:[ke],decls:10,vars:17,consts:[[1,"bkd-container"],[1,"d-flex","search",3,"valueChange","value","placeholder","label","disabled"],[1,"mt-3"],[1,"event-header"],[1,"designation"],[1,"date"],[1,"registrations"],[1,"rating"],[3,"event","withRatings"]],template:function(i,n){if(i&1){let d=L();F(0),p(1,"async"),s(2,"div",0)(3,"bkd-resettable-input",1),p(4,"async"),p(5,"translate"),p(6,"translate"),b("valueChange",function(g){return E(d),w(n.state.setSearch(g))}),a(),T(7,lr,1,0,"bkd-spinner"),p(8,"async"),T(9,hr,2,1),a()}if(i&2){let d,u=A((d=c(1,5,n.state.getEntries(n.withRatings)))!==null&&d!==void 0?d:Oe(16,dr));r(3),h("value",c(4,8,n.state.search$))("placeholder",c(5,10,"events.search-by"))("label",c(6,12,"events.search"))("disabled",!u),r(4),S(c(8,14,n.state.loading$)?7:9)}},dependencies:[pt,he,K,I,qi],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}}']})}}return t})();var rn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-current-list"]],decls:4,vars:5,consts:[[3,"withStudyCourses","withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),l(1),p(2,"translate"),a(),C(3,"bkd-events-list",0)),i&2&&(r(),v(c(2,3,"events.current.title")),r(2),h("withStudyCourses",!0)("withRatings",!1))},dependencies:[vt,I],encapsulation:2,changeDetection:0})}}return t})();var sn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-current"]],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[xe],encapsulation:2})}}return t})();var an=(()=>{class t{constructor(){this.entry=j.required(),this.multipleStudyClasses=j(!1),this.returnLink=j(null),this.link=U(()=>["student",this.entry().id,"addresses"]),this.linkParams=U(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-course-entry"]],inputs:{entry:[1,"entry"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"]},decls:7,vars:10,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],[1,"name",3,"title","routerLink","queryParams"],[1,"study-class"],[1,"company",3,"title"]],template:function(i,n){i&1&&(C(0,"bkd-avatar",0),s(1,"a",1),l(2),a(),s(3,"div",2),l(4),a(),s(5,"div",3),l(6),a()),i&2&&(h("studentId",n.entry().id)("link",n.link())("linkParams",n.linkParams()),r(),h("title",n.entry().name)("routerLink",n.link())("queryParams",n.linkParams()),r(),v(n.entry().name),r(2),f(" ",n.multipleStudyClasses()?n.entry().studyClass:"",` -`),r(),h("title",n.entry().company),r(),v(n.entry().company))},dependencies:[X,Ni],styles:['[_nghost-%COMP%]{display:grid;grid-template-columns:min-content 1fr;grid-template-rows:min-content min-content 1fr;grid-template-areas:"avatar name" "avatar study-class" "avatar company";padding:2rem 1rem}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.name[_ngcontent-%COMP%]{grid-area:name}.study-class[_ngcontent-%COMP%]{grid-area:study-class;font-size:.875rem}.company[_ngcontent-%COMP%]{grid-area:company;align-content:end;padding-bottom:1.5rem}.name[_ngcontent-%COMP%], .company[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}'],changeDetection:0})}}return t})();var fr=t=>({count:t});function vr(t,o){if(t&1&&(s(0,"div",0),l(1),p(2,"translate"),a()),t&2){m();let e=P(2);r(),f(" ",D(2,1,e===1?"events-students.registration":"events-students.registrations",G(4,fr,e))," ")}}var Ct=(()=>{class t{constructor(){this.title=j.required(),this.count=j(null),this.searchTerm=Pe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-header"]],inputs:{title:[1,"title"],count:[1,"count"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:7,vars:10,consts:[[1,"additional-info"],[1,"search",3,"valueChange","value","placeholder","label"]],template:function(i,n){if(i&1){let d=L();s(0,"h1"),l(1),a(),F(2),T(3,vr,3,6,"div",0),s(4,"bkd-resettable-input",1),p(5,"translate"),p(6,"translate"),b("valueChange",function(g){return E(d),w(n.searchTerm.set(g))}),a()}if(i&2){r(),v(n.title()),r();let d=A(n.count());r(),S(d!==null?3:-1),r(),h("value",n.searchTerm())("placeholder",c(5,6,"events-students.search-placeholder"))("label",c(6,8,"events-students.search"))}},dependencies:[I,pt],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.search[_ngcontent-%COMP%]{margin-top:1rem;display:flex;max-width:300px}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"],changeDetection:0})}}return t})();var Cr=(t,o)=>o.id;function _r(t,o){t&1&&(s(0,"p"),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events-students.no-entries")))}function Sr(t,o){if(t&1&&C(0,"bkd-events-students-course-entry",2),t&2){let e=o.$implicit,i=m();h("entry",e)("multipleStudyClasses",i.multipleStudyClasses())("returnLink",i.returnLink())}}var on=(()=>{class t{constructor(){this.title=j.required(),this.count=j.required(),this.entries=j.required(),this.multipleStudyClasses=j(!1),this.returnLink=j(null),this.searchTerm=Pe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:5,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[3,"entry","multipleStudyClasses","returnLink"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),Ie("searchTermChange",function(u){return we(n.searchTerm,u)||(n.searchTerm=u),u}),a(),s(1,"section",1),T(2,_r,3,3,"p"),H(3,Sr,1,3,"bkd-events-students-course-entry",2,Cr),a()),i&2&&(h("title",n.title())("count",n.count()),Ee("searchTerm",n.searchTerm),r(2),S(n.entries().length===0?2:-1),r(),N(n.entries()))},dependencies:[I,Ct,an],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}section.list[_ngcontent-%COMP%]{width:calc(100% + 1px);margin-top:1rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}bkd-events-students-course-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;border-right:1px solid #dee2e6}"],changeDetection:0})}}return t})();var dn=(()=>{class t{constructor(){this.entry=j.required(),this.returnLink=j(null),this.link=U(()=>["study-course-student",this.entry().id]),this.linkParams=U(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-study-course-entry"]],inputs:{entry:[1,"entry"],returnLink:[1,"returnLink"]},decls:7,vars:8,consts:[[1,"name",3,"routerLink","queryParams"],[1,"status"],[1,"registration-date"]],template:function(i,n){i&1&&(s(0,"a",0),l(1),a(),s(2,"div",1),l(3),a(),s(4,"div",2),l(5),p(6,"date"),a()),i&2&&(h("routerLink",n.link())("queryParams",n.linkParams()),r(),v(n.entry().name),r(2),v(n.entry().status),r(2),f(" ",D(6,5,n.entry().registrationDate,"dd.MM.yyyy"),` -`))},dependencies:[X,ei,ye],styles:['[_nghost-%COMP%]{display:grid;align-items:center;grid-template-areas:"name status registration-date";grid-template-columns:2fr 1fr 1fr;border-bottom:1px solid #dee2e6}.name[_ngcontent-%COMP%], .status[_ngcontent-%COMP%], .registration-date[_ngcontent-%COMP%]{padding:1rem}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.status[_ngcontent-%COMP%]{grid-area:status;padding-left:0}.registration-date[_ngcontent-%COMP%]{grid-area:registration-date}@media (max-width: 750px){[_nghost-%COMP%]{grid-template-areas:"name registration-date" "status registration-date";grid-template-columns:2fr 1fr}.name[_ngcontent-%COMP%]{padding-bottom:0}.status[_ngcontent-%COMP%]{padding-top:0;padding-left:1rem;font-size:.875rem}}'],changeDetection:0})}}return t})();var yr=(t,o)=>o.id;function xr(t,o){if(t&1){let e=L();s(0,"div",2)(1,"div",4),b("click",function(){E(e);let n=m();return w(n.toggleSort.emit("name"))}),l(2),p(3,"translate"),s(4,"span",5),l(5),a()(),s(6,"div",6),b("click",function(){E(e);let n=m();return w(n.toggleSort.emit("registrationDate"))}),l(7),p(8,"translate"),s(9,"span",5),l(10),a()()()}if(t&2){let e=m();r(),h("className",e.primarySortKey),r(),f(" ",c(3,5,"events-students.list.header.name")," "),r(3),v(e.getSortDirectionCharacter("name")),r(2),f(" ",c(8,7,"events-students.list.header.registration-date")," "),r(3),v(e.getSortDirectionCharacter("registrationDate"))}}function br(t,o){t&1&&(s(0,"p"),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events-students.no-entries")))}function Tr(t,o){if(t&1&&C(0,"bkd-events-students-study-course-entry",3),t&2){let e=o.$implicit,i=m();h("entry",e)("returnLink",i.returnLink())}}var ln=(()=>{class t{constructor(){this.title=j.required(),this.count=j.required(),this.entries=j.required(),this.returnLink=j(null),this.sortCriteria=j.required(),this.toggleSort=zt(),this.searchTerm=Pe()}getSortDirectionCharacter(e){return this.sortCriteria().primarySortKey!==e?"":this.sortCriteria().ascending?"\u2191":"\u2193"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-study-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],returnLink:[1,"returnLink"],sortCriteria:[1,"sortCriteria"],searchTerm:[1,"searchTerm"]},outputs:{toggleSort:"toggleSort",searchTerm:"searchTermChange"},features:[ne([])],decls:6,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[1,"list-header"],[3,"entry","returnLink"],[1,"name",3,"click","className"],[1,"sort-direction"],[1,"registration-date",3,"click"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),Ie("searchTermChange",function(u){return we(n.searchTerm,u)||(n.searchTerm=u),u}),a(),s(1,"section",1),T(2,xr,11,9,"div",2)(3,br,3,3,"p"),H(4,Tr,1,2,"bkd-events-students-study-course-entry",3,yr),a()),i&2&&(h("title",n.title())("count",n.count()),Ee("searchTerm",n.searchTerm),r(2),S(n.entries().length>0?2:3),r(2),N(n.entries()))},dependencies:[I,Ct,dn],styles:[".list-header[_ngcontent-%COMP%]{cursor:pointer;display:grid;grid-template-columns:3fr 1fr;align-items:center;border-bottom:2px solid #dee2e6}.name[_ngcontent-%COMP%], .registration-date[_ngcontent-%COMP%]{padding:1rem}.name[_ngcontent-%COMP%]{flex:3}.registration-date[_ngcontent-%COMP%]{flex:1}@media (max-width: 750px){.list-header[_ngcontent-%COMP%]{grid-template-columns:2fr 1fr}.name[_ngcontent-%COMP%]{flex:2}.registration-date[_ngcontent-%COMP%]{flex:1;white-space:nowrap}}"],changeDetection:0})}}return t})();function pn(t,o,e){o||Nt(t);let i=o??At(Wt);return e?Ht(i,e):i}function ze(t,o){let e=pn(ze,o?.injector),i;return U(()=>(i||(i=Jt(()=>se(t,B(R({},o),{injector:e})))),i()))}var cn=(()=>{class t extends nt{constructor(e,i){super(e,i,Pi,"ApprenticeshipContracts")}getCompaniesForStudents(e){if(e.length===0)return V([]);let i=new Date,n={"filter.StudentId":`;${e.join(";")}`,"filter.ApprenticeshipDateFrom":`<${i.toISOString()}`,"filter.ApprenticeshipDateTo":`>${i.toISOString()}`,fields:"Id,StudentId,CompanyName,CompanyNameAddition"};return this.http.get(`${this.baseUrl}/`,{params:n}).pipe(O(Ci(Mi)))}static{this.\u0275fac=function(i){return new(i||t)($(Ye),$(me))}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _t=1;var mn=10,St=(()=>{class t{constructor(e,i,n,d,u,g,k,W,fe){this.route=e,this.loadingService=i,this.eventsService=n,this.coursesService=d,this.subscriptionsService=u,this.personsService=g,this.apprenticeshipContractsService=k,this.lessonPresencesService=W,this.reportsService=fe,this.eventId$=q([this.route.paramMap,this.route.parent?.paramMap??V(null)]).pipe(y(([Ce,Kn])=>Number(Ce.get("id")||Kn?.get("id"))),Z()),this.eventSummary$=this.eventId$.pipe(O(this.loadEventSummary.bind(this)),Q(1)),this.eventSummary=ze(this.eventSummary$,{initialValue:null}),this.eventTypeId=U(()=>this.eventSummary()?.EventTypeId??null),this.studentEntries=ze(this.loadStudentEntries(),{initialValue:null}),this.isStudyCourse=U(()=>this.eventTypeId()===_t),this.loading=se(this.loadingService.loading(ut)),this.title=U(()=>this.getTitle(this.studentEntries())),this.multipleStudyClasses=U(()=>(this.studentEntries()?.studyClasses?.length??0)>1),this.searchTerm=Tt(""),this.sortCriteria=Tt({primarySortKey:"name",ascending:!0}),this.entries=U(()=>this.studentEntries()?.entries??[]),this.sortedEntries=U(()=>this.sortStudentEntries(this.entries(),this.sortCriteria())),this.filteredEntries=U(()=>ct(this.sortedEntries(),["name","status","company","studyClass"],this.searchTerm())),this.mailtoLink=U(()=>this.getMailtoLink(this.eventTypeId(),this.entries())),this.reports=ze(this.eventSummary$.pipe(ve(ue)).pipe(O(this.loadReports.bind(this))),{initialValue:[]})}loadEventSummary(e){return this.loadingService.load(this.eventsService.getEventSummary(e),ut)}loadStudentEntries(){return this.eventSummary$.pipe(O(e=>{let i=()=>{if(!e)return V(null);switch(e.EventTypeId){case _t:return this.loadStudyCourseStudents(e);case mn:return this.loadStudyClassStudents(e.Id);default:return this.loadCourseStudents(e.Id)}};return this.loadingService.load(i(),ut)}))}toggleSort(e){this.sortCriteria.set({primarySortKey:e,ascending:this.sortCriteria().primarySortKey===e?!this.sortCriteria().ascending:!0})}loadStudyCourseStudents({Id:e,Designation:i}){return this.subscriptionsService.getSubscriptionsByCourse(e).pipe(O(n=>this.personsService.getSummaries(n.map(({PersonId:d})=>d).filter(ue)).pipe(y(d=>Pt(e,d,n,{eventDesignation:i})))))}loadStudyClassStudents(e){return this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.IsOkay":"=1"}).pipe(O(i=>{let n=i.map(({PersonId:d})=>d).filter(ue);return q([this.personsService.getSummaries(n),this.apprenticeshipContractsService.getCompaniesForStudents(n)]).pipe(y(([d,u])=>{let g=Pt(e,d,i,{emailFallback:!0});return kt(g,u)}))}))}loadCourseStudents(e){return this.coursesService.getExpandedCourseWithParticipants(e).pipe(y(Xi),O(i=>q([this.apprenticeshipContractsService.getCompaniesForStudents(i.entries.map(({id:n})=>n)),this.lessonPresencesService.getLessonStudyClassesByEvent(e)]).pipe(y(([n,d])=>{let u=kt(i,n);return Ji(u,d)}))))}getTitle(e){if(!e||!e.eventDesignation)return null;let{eventDesignation:i,studyClasses:n}=e;return[i,...n].join(", ")}getMailtoLink(e,i){if(e===null||e===_t)return null;let n=i.map(d=>d.email).filter(Boolean);return n.length>0?`mailto:${n.join(";")}`:null}loadReports({Id:e,EventTypeId:i}){switch(i){case null:case _t:return V([]);case mn:return this.reportsService.getStudyClassStudentsReports(e);default:return this.reportsService.getCourseStudentsReports(e)}}sortStudentEntries(e,i){return[...e].sort(Pr(i))}static{this.\u0275fac=function(i){return new(i||t)($(re),$(be),$(mt),$(ge),$(je),$(st),$(cn),$(Ei),$(dt))}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Pr(t){return(o,e)=>{switch(t.primarySortKey){case"registrationDate":return Mr(o,e,t);case"name":return Or(t,o,e);default:throw new xi(t.primarySortKey,"Unhandled sort criteria")}}}function Mr(t,o,e){let i=t.registrationDate?new Date(t.registrationDate).getTime():0,n=o.registrationDate?new Date(o.registrationDate).getTime():0;return e.ascending?i-n:n-i}function Or(t,o,e){return t.ascending?o.name.localeCompare(e.name):e.name.localeCompare(o.name)}var Dr=t=>[t];function Lr(t,o){if(t&1&&(s(0,"a",4)(1,"i",6),l(2,"mail"),a()()),t&2){let e=m(2);h("href",e.state.mailtoLink(),ie)}}function Gr(t,o){if(t&1&&(s(0,"bkd-backlink",0)(1,"div",3),T(2,Lr,3,1,"a",4),C(3,"bkd-reports-link",5),a()()),t&2){let e=m(),i=P(0);h("link",G(3,Dr,i)),r(2),S(e.state.mailtoLink()?2:-1),r(),h("reports",e.state.reports())}}function Fr(t,o){t&1&&C(0,"bkd-spinner")}function Rr(t,o){t&1&&(s(0,"p"),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"events-students.no-entries")))}function Br(t,o){if(t&1){let e=L();s(0,"bkd-events-students-study-course-list",7),b("toggleSort",function(n){E(e);let d=m();return w(d.state.toggleSort(n))}),Ie("searchTermChange",function(n){E(e);let d=m();return we(d.state.searchTerm,n)||(d.state.searchTerm=n),w(n)}),a()}if(t&2){let e=m();h("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("returnLink",e.returnLink())("sortCriteria",e.state.sortCriteria()),Ee("searchTerm",e.state.searchTerm)}}function jr(t,o){if(t&1){let e=L();s(0,"bkd-events-students-course-list",8),Ie("searchTermChange",function(n){E(e);let d=m();return we(d.state.searchTerm,n)||(d.state.searchTerm=n),w(n)}),a()}if(t&2){let e=m();h("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("multipleStudyClasses",e.state.multipleStudyClasses())("returnLink",e.returnLink()),Ee("searchTerm",e.state.searchTerm)}}var un=(()=>{class t{constructor(e,i){this.state=e,this.route=i,this.returnLink=se(this.route.queryParams.pipe(y(({returnlink:n})=>n?decodeURIComponent(n):null)))}static{this.\u0275fac=function(i){return new(i||t)(x(St),x(re))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-list"]],decls:6,vars:3,consts:[[3,"link"],[3,"title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"title","count","entries","multipleStudyClasses","returnLink","searchTerm"],[1,"d-flex"],["target","_blank",1,"mail","btn","btn-primary","btn-icon","me-2",3,"href"],[1,"ms-2",3,"reports"],[1,"material-icons"],[3,"toggleSort","searchTermChange","title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"searchTermChange","title","count","entries","multipleStudyClasses","returnLink","searchTerm"]],template:function(i,n){if(i&1&&(F(0),T(1,Gr,4,5,"bkd-backlink",0)(2,Fr,1,0,"bkd-spinner")(3,Rr,3,3,"p")(4,Br,1,6,"bkd-events-students-study-course-list",1)(5,jr,1,6,"bkd-events-students-course-list",2)),i&2){let d=A(n.returnLink());r(),S(d?1:-1),r(),S(n.state.loading()?2:n.state.entries().length===0?3:n.state.isStudyCourse()?4:5)}},dependencies:[I,he,Ve,rt,on,ln],encapsulation:2,changeDetection:0})}}return t})();var Vr=(t,o)=>o.id;function Ar(t,o){if(t&1&&(l(0),p(1,"date")),t&2){m(2);let e=P(2);f(" ",D(1,1,e.Birthdate,"dd.MM.yyyy")," ")}}function Hr(t,o){if(t&1&&l(0),t&2){m(2);let e=P(2);f(" (",e.Gender,") ")}}function Nr(t,o){if(t&1&&(l(0),C(1,"br")),t&2){m(2);let e=P(2);f(" ",e.AddressLine1,"")}}function Ur(t,o){if(t&1&&(l(0),C(1,"br")),t&2){m(2);let e=P(2);f(" ",e.AddressLine2,"")}}function Wr(t,o){if(t&1&&(l(0),C(1,"br")),t&2){m(2);let e=P(2);Ue(" ",e.Zip," ",e.Location,"")}}function zr(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Ne("href","tel:",e.PhonePrivate,"",ie),r(),v(e.PhonePrivate)}}function qr(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Ne("href","tel:",e.PhoneMobile,"",ie),r(),v(e.PhoneMobile)}}function Kr(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Ne("href","mailto:",e.Email,"",ie),r(),f(" ",e.Email," ")}}function Yr(t,o){if(t&1&&(s(0,"a",4),l(1),a(),C(2,"br")),t&2){m(2);let e=P(2);Ne("href","mailto:",e.Email2,"",ie),r(),f(" ",e.Email2," ")}}function Zr(t,o){if(t&1&&(s(0,"h1"),l(1),a(),s(2,"span",3),T(3,Ar,2,4)(4,Hr,1,1),a(),s(5,"address"),T(6,Nr,2,1)(7,Ur,2,1)(8,Wr,2,2)(9,zr,3,3)(10,qr,3,3)(11,Kr,3,3)(12,Yr,3,3),a()),t&2){m();let e=P(2);r(),v(e.FullName),r(2),S(e.Birthdate?3:-1),r(),S(e.Gender?4:-1),r(2),S(e.AddressLine1?6:-1),r(),S(e.AddressLine2?7:-1),r(),S(e.Zip&&e.Location?8:-1),r(),S(e.PhonePrivate?9:-1),r(),S(e.PhoneMobile?10:-1),r(),S(e.Email?11:-1),r(),S(e.Email2?12:-1)}}function Qr(t,o){if(t&1&&(s(0,"div",2),l(1),p(2,"translate"),s(3,"span",5),l(4),a()()),t&2){m();let e=P(4);r(),f(" ",c(2,2,"events-students.study-course-detail.status"),": "),r(3),v(e)}}function Xr(t,o){if(t&1&&(s(0,"div",6)(1,"h2"),l(2),a()()),t&2){let e=m().$implicit;r(2),v(e.label)}}function Jr(t,o){if(t&1&&(s(0,"a",7),l(1),a()),t&2){let e=m(2).$implicit;pe("href",e.file,ie),r(),v(e.value)}}function es(t,o){if(t&1&&l(0),t&2){let e=m(2).$implicit;f(" ",e.value," ")}}function ts(t,o){if(t&1&&(s(0,"div",6)(1,"div"),l(2),a(),T(3,Jr,2,2,"a",7)(4,es,1,1),a()),t&2){let e=m().$implicit;r(2),v(e.label),r(),S(e.file!==null?3:4)}}function is(t,o){if(t&1&&T(0,Xr,3,1,"div",6)(1,ts,5,2,"div",6),t&2){let e=o.$implicit;S(e.heading?0:e.value?1:-1)}}function ns(t,o){t&1&&C(0,"bkd-spinner")}var hn=(()=>{class t{constructor(e,i,n,d,u,g){this.settings=e,this.route=i,this.personsService=n,this.subscriptionsService=d,this.storageService=u,this.loadingService=g,this.eventId$=this.route.parent?.paramMap.pipe(y(k=>Number(k.get("id"))))??V(0),this.personId$=this.route.paramMap.pipe(y(k=>Number(k.get("id")))),this.person=se(this.personId$.pipe(O(k=>this.personsService.get(k))),{initialValue:null}),this.subscription=se(this.loadSubscription()),this.subscriptionId=U(()=>this.subscription()?.Id??null),this.subscriptionDetails=se(this.loadSubscriptionDetails(),{initialValue:[]}),this.backLink=se(this.route.queryParams.pipe(y(({returnparams:k})=>k),y(Ii))),this.loading=se(this.loadingService.loading$,{initialValue:!0})}loadSubscription(){return this.loadingService.load(q([this.eventId$,this.personId$]).pipe(O(([e,i])=>this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.PersonId":`=${i}`})),y(e=>e[0]??null)),{stopOnFirstValue:!0})}loadSubscriptionDetails(){return this.loadingService.load(ti(this.subscriptionId).pipe(ve(ue),O(e=>this.subscriptionsService.getSubscriptionDetailsById(e)),y(e=>e.map(i=>this.toSubscriptionDetailsEntry(i)))),{stopOnFirstValue:!0})}toSubscriptionDetailsEntry(e){let i=e.Value??"";return i=this.normalizeSubscriptionDetailsDropdownValue(e,i),{id:e.Id,label:e.VssDesignation,value:i,file:this.buildFileUrl(e),heading:e.VssStyle==="HE"}}normalizeSubscriptionDetailsDropdownValue(e,i){return e.DropdownItems&&e.VssStyle!=="CB"?e.DropdownItems.find(n=>String(n.Key)===i)?.Value??i:i}buildFileUrl(e){if(e.VssStyle==="PD"||e.VssStyle==="PF"||e.VssStyle==="DA"){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/SubscriptionDetails/${e.Id}?token=${i}`}return null}static{this.\u0275fac=function(i){return new(i||t)(x(me),x(re),x(st),x(je),x(Ge),x(be))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students-study-course-detail"]],decls:9,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],["link","../..",3,"params"],[1,"status"],[1,"additional-info"],[3,"href"],[1,"ms-2"],[1,"detail"],["target","_blank",3,"href"]],template:function(i,n){if(i&1&&(s(0,"div",0),C(1,"bkd-backlink",1),F(2),T(3,Zr,13,10),F(4),T(5,Qr,5,4,"div",2),H(6,is,2,1,null,null,Vr),T(8,ns,1,0,"bkd-spinner"),a()),i&2){let d;r(),h("params",n.backLink()),r();let u=A(n.person());r(),S(u?3:-1),r();let g=A((d=n.subscription())==null?null:d.Status);r(),S(g?5:-1),r(),N(n.subscriptionDetails()),r(2),S(n.loading()?8:-1)}},dependencies:[I,ye,Ve,he],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}address[_ngcontent-%COMP%]{margin:1rem 0}.status[_ngcontent-%COMP%]{display:flex;align-items:center;padding:1rem 0;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.detail[_ngcontent-%COMP%]{max-width:70ch;padding-top:1rem}.detail[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.detail[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0})}}return t})();var gn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-students"]],features:[ne([St])],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var fn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events-tests"]],decls:4,vars:4,consts:[[3,"withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),l(1),p(2,"translate"),a(),C(3,"bkd-events-list",0)),i&2&&(r(),v(c(2,2,"events.title")),r(2),h("withRatings",!0))},dependencies:[vt,I],encapsulation:2})}}return t})();var vn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-events"]],features:[ne([He,bi])],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[xe],encapsulation:2})}}return t})();function Cn(t){return o=>{let e=Number(o.value);return e<=t?{greaterThan:{value:e,greaterThanValue:t}}:null}}function Ot(t){return t.map(({finalGrade:o})=>o).filter(rs)}function rs(t){return t!==null}function yn(t,o,e,i){return t?.map(n=>({student:n,finalGrade:as(n,e,i),grades:ss(n,o)}))}function ss(t,o){return o.map(e=>{if(e.Results===void 0||e.Results?.length===0)return{kind:"no-result",test:e};let i=e.Results?.find(n=>n.StudentId===t.Id);return i!==void 0?{kind:"grade",result:i,test:e}:{kind:"no-result",test:e}})}function as(t,o,e){let i=o.find(d=>d.StudentId===t.Id);if(i)return{gradingId:i.Id,gradeId:i.GradeId??void 0,average:i.AverageTestResult||void 0,canGrade:i.CanGrade};let n=e.find(d=>d.StudentId===t.Id);if(n)return{finalGradeValue:n.Grade,average:n.AverageTestResult||void 0,canGrade:!1};throw new Error(`Student ${t.FullName} has neither a grading and nor a final grade, this should not happen`)}var xn=({key:t,ascending:o})=>(e,i)=>{let n=o?1:-1;switch(t){case"FullName":return n*e.student.FullName.localeCompare(i.student.FullName);case"FinalGrade":return!e.finalGrade?.gradeId||!i.finalGrade?.gradeId?n*-1:n*_n(e.finalGrade.gradeId,i.finalGrade.gradeId);case"TestsMean":return!e.finalGrade?.average||!i.finalGrade?.average?n*-1:n*_n(e.finalGrade.average,i.finalGrade.average)}return n*os(t,e,i)},os=(t,o,e)=>{let i=o.grades.filter(Sn).find(d=>d.test.Id===t.Id),n=e.grades.filter(Sn).find(d=>d.test.Id===t.Id);return t.IsPointGrading&&i?.result.GradeId===n?.result.GradeId?(i?.result.Points??0)-(n?.result.Points??0):((i?.result.GradeId??Number.POSITIVE_INFINITY)-(n?.result.GradeId??Number.POSITIVE_INFINITY))*-1};function _n(t,o){return t===o?0:te.average).filter(e=>e!=null&&e!==0).map(Number);return wt(o)}function En(t,o){return wt(t.map(e=>ds(e,o)).filter(_i))}function ds({gradeId:t,finalGradeValue:o},e){let i;t?i=e.find(u=>u.Key===t)?.Value:i=o;let n=Number(i);return isNaN(n)?0:n}function $t(t,o){return[...o.filter(e=>e.Id!==t?.Id),t].filter(e=>e!=null)}function wn({id:t,selectedGradeId:o},e){return e.map(i=>i.Id!==t?i:B(R({},i),{GradeId:o}))}function In(t,o){switch(o.type){case"reset":return o.payload;case"updateResult":return t?B(R({},t),{Tests:$i(o.payload.testResult,t.Tests||[],o.payload.ignore),Gradings:o.payload.grading?$t(o.payload.grading,t.Gradings||[]):t.Gradings}):null;case"deleteResult":return t?B(R({},t),{Tests:Di(o.payload.testId,o.payload.studentId,t.Tests||[]),Gradings:o.payload.grading?$t(o.payload.grading,t.Gradings||[]):t.Gradings||[]}):null;case"toggle-test-state":return t?B(R({},t),{Tests:Li(o.payload,t.Tests||[])}):null;case"final-grade-overwritten":return t?B(R({},t),{Gradings:wn({id:o.payload.id,selectedGradeId:o.payload.selectedGradeId},t.Gradings||[])}):null;case"replace-grades":return t?B(R({},t),{Gradings:o.payload}):null;case"delete-test":return t?B(R({},t),{Tests:Gi(o.payload,t.Tests||[])}):null;default:return t}}var kn=(()=>{class t extends nt{constructor(e,i){super(e,i,Vi,"Gradings")}updateGrade(e,i){return this.http.put(`${this.baseUrl}/${e}`,{GradeId:i}).pipe(y(()=>e))}static{this.\u0275fac=function(i){return new(i||t)($(Ye),$(me))}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Dt={onlyMine:!1,hidePublished:!1},Y=(()=>{class t{constructor(e,i,n,d,u){this.coursesRestService=e,this.gradingScalesRestService=i,this.gradingsRestService=n,this.loadingService=d,this.sortService=u,this.action$=new bt(1),this.loading$=this.loadingService.loading$,this._courseId$=new bt(1),this.courseId$=this._courseId$.asObservable(),this.fetchedCourse$=this._courseId$.pipe(O(g=>this.loadingService.load(this.coursesRestService.getExpandedCourse(g))),Q(1)),this.course$=qe(this.action$,this.fetchedCourse$.pipe(ve(ue),y(g=>({type:"reset",payload:g})))).pipe(jt(In,null),ve(ue),Q(1)),this.tests$=this.course$.pipe(y(g=>g.Tests||[]),y(Fi)),this.hasTests$=this.tests$.pipe(y(g=>g.length>0)),this.filterSubject$=new z(Dt),this.filter$=this.filterSubject$.asObservable(),this.expandedHeaderSubject$=new z(!1),this.expandedHeader$=this.expandedHeaderSubject$.asObservable(),this.filteredTests$=q([this.tests$,this.filter$]).pipe(y(([g,k])=>g.filter(W=>(!k.onlyMine||W.IsOwner)&&(!k.hidePublished||!W.IsPublished)))),this.sorting$=this.sortService.sorting$,this.studentGrades$=q([this.course$,this.filteredTests$,this.sorting$]).pipe(y(Re(this.toStudentGrades.bind(this)))),this.canSetFinalGrade$=this.course$.pipe(y(Ki)),this.gradingScaleIds$=this.course$.pipe(y(g=>fi([...(g.Tests??[]).map(k=>k.GradingScaleId),g.GradingScaleId]).filter(ue)),Z(gi),Q(1)),this.gradingScales$=this.gradingScaleIds$.pipe(O(g=>this.gradingScalesRestService.getGradingScales(g)),Q(1)),this.UNDEFINED_GRADINGSCALE_ID=-1,this.gradingScalesOptions$=this.gradingScales$.pipe(y(g=>g.map(k=>{let W=k?.Id||this.UNDEFINED_GRADINGSCALE_ID,fe=k?.Grades.map(Ce=>({Key:Ce.Id,Value:Ce.Designation}))||[];return{id:W,options:fe}}).reduce((k,W)=>B(R({},k),{[W.id]:W.options}),{})),Q(1)),this.meanOfStudentGradesForCourse$=this.studentGrades$.pipe(y(g=>Tn(Ot(g)))),this.meanOfFinalGradesForCourse$=q([this.gradingScalesOptions$,this.studentGrades$]).pipe(O(Re(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(O(e=>this.gradingOptions$(e.GradingScaleId)))}toStudentGrades(e,i=[],n){return yn(e.ParticipatingStudents??[],i,e.Gradings??[],e.FinalGrades??[]).sort(xn(n))}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(oe(1),y(i=>{let{originalResult:n,updatedResult:d}=this.buildOptimisticResultUpdate(i,e);return this.updateTestResult(d,null),n}))}saveGrade(e,i){this.course$.pipe(oe(1),O(n=>this.coursesRestService.updateTestResult(n.Id,e).pipe(Ft(d=>(i&&this.updateTestResult(R({},i),null),Gt(()=>d)))))).subscribe(({testResult:n,grading:d})=>this.updateOrDeleteTestResult(e.testId,e.studentId,n,d,"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 n=Oi(e,i.testId,i.studentId),d=n?R({},n):{Id:"",TestId:i.testId,StudentId:i.studentId,CourseRegistrationId:0,GradeId:null,GradeValue:null,GradeDesignation:null,Points:null};return d.GradeId="gradeId"in i?i.gradeId:n?.GradeId??null,d.Points="points"in i?i.points:n?.Points??null,{originalResult:n,updatedResult:d}}updateOrDeleteTestResult(e,i,n,d,u){n?this.updateTestResult(n,d,u):this.deleteTestResult(e,i,d)}updateTestResult(e,i,n){this.action$.next({type:"updateResult",payload:{testResult:e,grading:i??null,ignore:n}})}deleteTestResult(e,i,n){this.action$.next({type:"deleteResult",payload:{testId:e,studentId:i,grading:n}})}toggleTestPublishedState(e){this.action$.next({type:"toggle-test-state",payload:e})}gradingOptions$(e){return e===null?V(null):this.gradingScalesOptions$.pipe(y(i=>i[e]),Q(1))}meanOfOverwrittenGradesForCourse(e,i){return this.course$.pipe(y(n=>{if(n.GradingScaleId===null||e[n.GradingScaleId]===void 0)return null;let d=e[n.GradingScaleId];return En(Ot(i),d)}))}static{this.\u0275fac=function(i){return new(i||t)($(ge),$(Ai),$(kn),$(be),$(zi))}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac})}}return t})();var cs=t=>["/events",t,"tests"];function ms(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",D(2,1,"global.validation-errors."+e.error,e.params)," ")}}function us(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",D(2,1,"global.validation-errors."+e.error,e.params)," ")}}function hs(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",D(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gs(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",D(2,1,"global.validation-errors."+e.error,e.params)," ")}}function fs(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=o.$implicit;r(),f(" ",D(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vs(t,o){if(t&1&&(s(0,"div",29)(1,"div",30)(2,"div",16)(3,"label",31),l(4),p(5,"translate"),a(),s(6,"div",32),C(7,"input",33),p(8,"async"),H(9,gs,3,4,"div",7,Me),p(11,"async"),a()()(),s(12,"div",30)(13,"div",16)(14,"label",34),l(15),p(16,"translate"),a(),s(17,"div",32),C(18,"input",35),p(19,"async"),H(20,fs,3,4,"div",7,Me),p(22,"async"),a()()()(),s(23,"div",36),Ut(),s(24,"math")(25,"mi"),l(26),p(27,"translate"),a(),s(28,"mo"),l(29,"="),a(),s(30,"mfrac")(31,"mrow")(32,"mi"),l(33),p(34,"translate"),a(),s(35,"mo"),l(36,"\xD7"),a(),s(37,"mn"),l(38,"5"),a()(),s(39,"mi"),l(40),p(41,"translate"),a()(),s(42,"mo"),l(43,"+"),a(),s(44,"mn"),l(45,"1"),a()()()),t&2){let e,i,n=m(2);r(4),v(c(5,9,"tests.form.max-points")),r(3),le("is-invalid",((e=c(8,11,n.maxPointsErrors$))==null?null:e.length)||!1),r(2),N(c(11,13,n.maxPointsErrors$)),r(6),v(c(16,15,"tests.form.max-points-adjusted")),r(3),le("is-invalid",((i=c(19,17,n.maxPointsAdjustedErrors$))==null?null:i.length)||!1),r(2),N(c(22,19,n.maxPointsAdjustedErrors$)),r(6),f(" ",c(27,21,"tests.form.math.grade")," "),r(7),f(" ",c(34,23,"tests.form.math.points")," "),r(7),v(c(41,25,"tests.form.math.max-points"))}}function Cs(t,o){t&1&&(s(0,"div",28)(1,"span",37),l(2,"Loading..."),a()())}function _s(t,o){if(t&1){let e=L();s(0,"form",2),b("ngSubmit",function(){E(e);let n=m();return w(n.onSubmit())}),s(1,"div",3)(2,"div",4)(3,"label",5),l(4),p(5,"translate"),a(),C(6,"input",6),p(7,"async"),p(8,"translate"),H(9,ms,3,4,"div",7,Me),p(11,"async"),a(),s(12,"div",8)(13,"label",9),l(14),p(15,"translate"),a(),s(16,"div",10)(17,"span",11)(18,"i",12),l(19,"calendar_today"),a()(),s(20,"input",13,0),p(22,"async"),p(23,"translate"),b("click",function(){E(e);let n=Se(21);return w(n.toggle())}),a(),H(24,us,3,4,"div",7,Me),p(26,"async"),a()()(),s(27,"div",14)(28,"label",15),l(29),p(30,"translate"),a(),s(31,"div",4)(32,"div",16)(33,"label",17),l(34),p(35,"translate"),a(),s(36,"div",18),C(37,"input",19),p(38,"async"),H(39,hs,3,4,"div",7,Me),p(41,"async"),a()()()(),s(42,"div")(43,"label",15),l(44),p(45,"translate"),a(),s(46,"div",20),C(47,"input",21),s(48,"label",22),l(49),p(50,"translate"),a()(),s(51,"div",20),C(52,"input",23),s(53,"label",24),l(54),p(55,"translate"),a()(),T(56,vs,46,27),a(),s(57,"div",25)(58,"button",26),p(59,"async"),l(60),p(61,"translate"),a(),s(62,"button",27),l(63),p(64,"translate"),T(65,Cs,3,0,"div",28),a()()()}if(t&2){let e,i,n,d,u=m();h("formGroup",u.formGroup),r(4),v(c(5,26,"tests.form.designation")),r(2),le("is-invalid",((e=c(7,28,u.designationErrors$))==null?null:e.length)||!1),h("placeholder",c(8,30,"tests.form.designation-placeholder")),r(3),N(c(11,32,u.designationErrors$)),r(5),v(c(15,34,"tests.form.date")),r(3),h("id",u.componentId),r(3),le("is-invalid",((i=c(22,36,u.dateErrors$))==null?null:i.length)||!1),h("placeholder",c(23,38,"shared.date-select.default-placeholder")),r(4),N(c(26,40,u.dateErrors$)),r(5),v(c(30,42,"tests.form.weight")),r(5),v(c(35,44,"tests.form.factor")),r(3),le("is-invalid",((n=c(38,46,u.weightErrors$))==null?null:n.length)||!1),r(2),N(c(41,48,u.weightErrors$)),r(5),v(c(45,50,"tests.form.grading-type")),r(3),h("value",!1),r(2),v(c(50,52,"tests.form.grades")),r(3),h("value",!0),r(2),v(c(55,54,"tests.form.points")),r(2),S((d=u.formGroup.get("isPointGrading"))!=null&&d.value?56:-1),r(2),h("disabled",u.saving)("routerLink",G(62,cs,c(59,56,u.courseId$))),r(2),f(" ",c(61,58,"tests.form.cancel")," "),r(2),h("disabled",u.saving),r(),f(" ",c(64,60,"tests.form.save")," "),r(2),S(u.saving?65:-1)}}var yt=(()=>{class t{constructor(e,i,n){this.fb=e,this.translate=i,this.testStateService=n,this.test=null,this.saving=!1,this.save=new J,this.componentId=vi("bkd-tests-edit-form"),this.formGroup=this.createFormGroup(),this.submitted$=new z(!1),this.destroy$=new te,this.designationErrors$=Fe(V(this.formGroup),this.submitted$,"designation"),this.dateErrors$=Fe(V(this.formGroup),this.submitted$,"date"),this.maxPointsErrors$=Fe(V(this.formGroup),this.submitted$,"maxPoints"),this.maxPointsAdjustedErrors$=Fe(V(this.formGroup),this.submitted$,"maxPointsAdjusted"),this.weightErrors$=Fe(V(this.formGroup),this.submitted$,"weight"),this.courseId$=this.testStateService.courseId$}ngOnInit(){this.test&&this.setInitialValues(this.test),Si(V(this.formGroup),"isPointGrading").pipe(_e(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:["",De.required],date:[null,De.required],weight:[1,De.compose([De.required,Cn(0)])],isPointGrading:[!1],maxPoints:[{value:null,disabled:!0},De.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}))}static{this.\u0275fac=function(i){return new(i||t)(x(li),x(ae),x(Y))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-edit-form"]],inputs:{test:"test",saving:"saving"},outputs:{save:"save"},features:[ne([{provide:ci,useClass:hi},{provide:mi,useClass:Wi}])],decls:1,vars:1,consts:[["dp","ngbDatepicker"],[3,"formGroup"],[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"],[1,"invalid-feedback"],[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"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[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"],[1,"visually-hidden"]],template:function(i,n){i&1&&T(0,_s,66,64,"form",1),i&2&&S(n.formGroup?0:-1)},dependencies:[Le,ri,Ze,Xe,si,Qe,ii,di,et,Je,pi,ai,oi,ui,X,K,I],styles:["#factor[_ngcontent-%COMP%], #max-points[_ngcontent-%COMP%], #max-points-adjusted[_ngcontent-%COMP%]{width:5em}"]})}}return t})();var Pn=(()=>{class t{constructor(e,i,n,d,u){this.route=e,this.courseService=i,this.toastService=n,this.translate=d,this.router=u,this.saving$=new z(!1),this.courseId$=this.route.paramMap.pipe(y(g=>Number(g.get("id"))),Z())}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:d,isPointGrading:u,maxPoints:g,maxPointsAdjusted:k}=e;this.courseId$.pipe(O(W=>this.courseService.add(W,n,i,d,u,g,k)),Ke(()=>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=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)(x(re),x(ge),x(it),x(ae),x($e))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-add"]],decls:6,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],[3,"save","saving"]],template:function(i,n){i&1&&(s(0,"h1"),l(1),p(2,"translate"),a(),s(3,"div",0)(4,"bkd-tests-edit-form",1),p(5,"async"),b("save",function(u){return n.save(u)}),a()()),i&2&&(r(),v(c(2,2,"tests.add-title")),r(3),h("saving",c(5,4,n.saving$)))},dependencies:[yt,K,I],encapsulation:2})}}return t})();var Mn=(()=>{class t{constructor(e){this.activeModal=e}get canDeleteTest(){return(this.test?.Results?.filter(i=>i.GradeId!==null||i.GradeValue!==null||i.Points!==null)||[]).length===0}static{this.\u0275fac=function(i){return new(i||t)(x(tt))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-delete"]],inputs:{test:"test"},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,n){i&1&&(s(0,"div",0)(1,"p",1),l(2),p(3,"translate"),a()(),s(4,"div",2)(5,"button",3),b("click",function(){return n.activeModal.dismiss()}),s(6,"span",4),l(7),p(8,"translate"),a()(),s(9,"button",5),b("click",function(){return n.activeModal.close(n.canDeleteTest?n.test:null)}),s(10,"span",6),l(11),p(12,"translate"),a()()()),i&2&&(r(2),f(" ",c(3,4,n.canDeleteTest?"tests.form.confirm":"tests.form.delete-not-allowed")," "),r(3),h("hidden",!n.canDeleteTest),r(2),f(" ",c(8,6,"tests.dialog.no")," "),r(4),f(" ",c(12,8,n.canDeleteTest?"tests.dialog.yes":"tests.dialog.ok")," "))},dependencies:[I],encapsulation:2})}}return t})();var bs=t=>({test:t});function Ts(t,o){t&1&&C(0,"bkd-spinner")}function Es(t,o){if(t&1){let e=L();s(0,"div",1)(1,"h1"),l(2),p(3,"translate"),a(),s(4,"button",2),b("click",function(){E(e);let n=m(),d=P(0);return w(n.openDeleteModal(d))}),s(5,"i",3),l(6,"delete"),a()()(),s(7,"bkd-tests-edit-form",4),b("save",function(n){E(e);let d=m();return w(d.save(n))}),a()}if(t&2){m();let e=P(0),i=P(2);r(2),f(" ",D(3,3,"tests.edit-title",G(6,bs,e.Designation))," "),r(5),h("test",e)("saving",i)}}var On=(()=>{class t{constructor(e,i,n,d,u,g,k){this.state=e,this.courseService=i,this.route=n,this.toastService=d,this.translate=u,this.router=g,this.modalService=k,this.saving$=new z(!1),this.testId$=this.route.paramMap.pipe(y(W=>Number(W.get("testId"))),Z()),this.test$=q([this.state.tests$,this.testId$]).pipe(y(([W,fe])=>W.find(Ce=>Ce.Id===fe)))}openDeleteModal(e){let i=this.modalService.open(Mn);i.componentInstance.test=e,i.result.then(n=>{n&&this.courseService.delete(e.CourseId,e.Id).subscribe(this.onDeleteSuccess.bind(this))},()=>{})}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:d,isPointGrading:u,maxPoints:g,maxPointsAdjusted:k}=e;q([this.state.courseId$,this.testId$]).pipe(oe(1),O(([W,fe])=>this.courseService.update(W,fe,i,n,d,u,g,k)),Ke(()=>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(oe(1)).subscribe(e=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)(x(Y),x(ge),x(re),x(it),x(ae),x($e),x(lt))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-edit"]],decls:8,vars:9,consts:[[1,"bkd-container","bkd-container-limited"],[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,n){if(i&1&&(F(0),p(1,"async"),F(2),p(3,"async"),s(4,"div",0),T(5,Ts,1,0,"bkd-spinner"),p(6,"async"),T(7,Es,8,8),a()),i&2){let d=A(c(1,1,n.test$));r(2),A(c(3,4,n.saving$)),r(3),S(c(6,7,n.state.loading$)?5:d?7:-1)}},dependencies:[yt,he,K,I],encapsulation:2})}}return t})();var ws=t=>({designation:t}),$n=(()=>{class t{constructor(e){this.activeModal=e}static{this.\u0275fac=function(i){return new(i||t)(x(tt))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-publish-test"]],inputs:{test:"test"},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,n){i&1&&(s(0,"div",0)(1,"p",1),l(2),p(3,"translate"),a()(),s(4,"div",2)(5,"button",3),b("click",function(){return n.activeModal.dismiss()}),l(6),p(7,"translate"),a(),s(8,"button",4),b("click",function(){return n.activeModal.close(!0)}),l(9),p(10,"translate"),a()()),i&2&&(r(2),f(" ",D(3,3,n.test.IsPublished?"tests.publishing.unpublish":"tests.publishing.publish",G(10,ws,n.test.Designation))," "),r(4),f(" ",c(7,6,"tests.publishing.cancel")," "),r(3),f(" ",c(10,8,"tests.publishing.confirm")," "))},dependencies:[I],encapsulation:2})}}return t})();var Is=t=>({maxPoints:t});function ks(t,o){if(t&1&&(s(0,"div",6),l(1),p(2,"translate"),a()),t&2){let e=m(2);r(),f(" ",D(2,1,"global.validation-errors.invalidPoints",G(4,Is,e.maxPoints))," ")}}function Ps(t,o){if(t&1){let e=L();s(0,"div",3)(1,"input",5,0),b("ngModelChange",function(){E(e);let n=Se(2),d=m();return w(d.onPointsChange(n.value))}),a(),T(3,ks,3,6,"div",6),a()}if(t&2){let e=Se(2),i=m();r(),le("is-invalid",e.errors),pe("max",i.maxPoints),pe("tabindex",i.tabIndex),h("disabled",i.grade.test.IsPublished||i.hasFinalGrade)("ngModel",i.grade.kind==="grade"?i.grade.result.Points:null),r(2),S(e.errors?3:-1)}}var Ms=1250,Dn=(()=>{class t{constructor(e){this.state=e,this.hasFinalGrade=!1,this.maxPoints=0,this.pointsSubject$=new te,this.gradeSubject$=new te,this.gradingScaleDisabledSubject$=new z(!0),this.gradingScaleDisabled$=this.gradingScaleDisabledSubject$.asObservable(),this.destroy$=new te}ngOnInit(){this.gradingScaleDisabledSubject$.next(this.isGradingScaleDisabled()),this.maxPoints=bn(this.grade),this.initSave(this.pointsSubject$.pipe(ve(this.isValid.bind(this)),y(e=>({studentId:this.student.Id,testId:this.grade.test.Id,points:e?Number(e):null})))),this.initSave(this.gradeSubject$.pipe(y(e=>({studentId:this.student.Id,testId:this.grade.test.Id,gradeId:e}))))}ngOnChanges(){this.gradingScaleDisabledSubject$.next(this.isGradingScaleDisabled())}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(Rt(i=>this.state.optimisticallyUpdateGrade(i).pipe(y(n=>({params:i,originalResult:n})))),Bt(Ms),_e(this.destroy$)).subscribe(({params:i,originalResult:n})=>this.state.saveGrade(i,n))}isGradingScaleDisabled(){return this.grade.test.IsPublished||this.hasFinalGrade||this.grade.test.IsPointGrading&&this.grade.kind==="grade"&&this.grade.result.Points!=null}static{this.\u0275fac=function(i){return new(i||t)(x(Y))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-grade"]],inputs:{grade:"grade",student:"student",tabIndex:"tabIndex",gradeOptions:"gradeOptions",hasFinalGrade:"hasFinalGrade"},features:[ke],decls:5,vars:8,consts:[["points","ngModel"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"point-input-container","me-2","me-md-3"],["data-testid","grade-select",1,"grade-select",3,"valueChange","options","allowEmpty","value","disabled","tabindex"],["type","number","step","0.01","min","0","data-testid","point-input",1,"form-control",3,"ngModelChange","max","disabled","tabindex","ngModel"],["data-testid","validation-error-message",1,"invalid-feedback"]],template:function(i,n){i&1&&(s(0,"div",1)(1,"div",2),T(2,Ps,4,7,"div",3),s(3,"bkd-select",4),p(4,"async"),b("valueChange",function(u){return n.onGradeChange(u)}),a()()()),i&2&&(r(2),S(n.grade.test.IsPointGrading?2:-1),r(),h("options",n.gradeOptions)("allowEmpty",!0)("value",n.grade.kind==="grade"?n.grade.result.GradeId:null)("disabled",c(4,6,n.gradingScaleDisabled$))("tabindex",n.tabIndex))},dependencies:[Le,Ze,Xe,Qe,et,Je,ni,Be,K,I],styles:[".point-input-container[_ngcontent-%COMP%]{width:4em}[_nghost-%COMP%] select{width:127px}@media (min-width: 576px){.point-input-container[_ngcontent-%COMP%]{width:5em}}"]})}}return t})();function Os(t,o){if(t&1&&(s(0,"span",1),l(1),a()),t&2){let e=m();r(),v(e.calculatePointsAverage(e.test))}}var Ln=(()=>{class t{constructor(e){this.locale=e}calculatePointsAverage(e){return this.safeAverage(e,2,at)}calculateGradeAverage(e){return this.safeAverage(e,3,ot)}safeAverage(e,i,n){try{return ji(n(e),this.locale,i)}catch{return Ri}}static{this.\u0275fac=function(i){return new(i||t)(x(Xt))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-average-grades"]],inputs:{test:"test"},decls:4,vars:2,consts:[[1,"d-flex","flex-row","w-100"],["data-testid","average-points",1,"mr-2","mr-md-3","average-points"],["data-testid","average-grade"]],template:function(i,n){i&1&&(s(0,"div",0),T(1,Os,2,1,"span",1),s(2,"span",2),l(3),a()()),i&2&&(r(),S(n.test.IsPointGrading?1:-1),r(2),v(n.calculateGradeAverage(n.test)))},styles:[".average-points[_ngcontent-%COMP%]{min-width:4.5em}@media (min-width: 576px){.average-points[_ngcontent-%COMP%]{min-width:6em}}"]})}}return t})();var Gn=(()=>{class t{constructor(){this.disabled=!1,this.width="127px",this.gradeIdSelected=new J}onGradeChange(e){this.gradeId?.valueOf()!==void 0&&this.gradeIdSelected.emit({id:this.gradeId?.valueOf(),selectedGradeId:e})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-grade-select"]],inputs:{options:"options",valueId:"valueId",gradeId:"gradeId",disabled:"disabled",width:"width"},outputs:{gradeIdSelected:"gradeIdSelected"},decls:1,vars:5,consts:[["data-testid","grade-select",3,"valueChange","options","allowEmpty","value","disabled","width"]],template:function(i,n){i&1&&(s(0,"bkd-select",0),b("valueChange",function(u){return n.onGradeChange(u)}),a()),i&2&&h("options",n.options)("allowEmpty",!0)("value",n.valueId)("disabled",n.disabled)("width",n.width)},dependencies:[Be],encapsulation:2})}}return t})();var $s=576,Fn=(()=>{class t{constructor(e,i){this.portal=e,this.state=i,this.destroy$=new te,this.handleWindowScroll=()=>{this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleWindowResize=()=>{this.updateStickyWidth(),this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleTableScroll=()=>{this.updateStickyLeftOffset()}}ngOnInit(){q([this.state.filteredTests$,this.state.expandedHeader$]).pipe(_e(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<$s}static{this.\u0275fac=function(i){return new(i||t)(x(Hi),x(Y))}}static{this.\u0275dir=Kt({type:t,selectors:[["","bkdTestEditGradesHeaderSticky",""]],inputs:{inlineHeader:"inlineHeader",stickyHeader:"stickyHeader"}})}}return t})();var Rn=(t,o)=>({"btn-primary":t,"btn-outline-secondary":o}),Bn=(()=>{class t{constructor(){this.filter=Dt,this.filterChange=new J}showOnlyMine(){this.filterChange.next(B(R({},this.filter),{onlyMine:!0}))}showAll(){this.filterChange.next(B(R({},this.filter),{onlyMine:!1}))}onHidePublishedChange(e){let i=(e.target&&e.target instanceof HTMLInputElement&&e.target?.checked)??!1;this.filterChange.next(B(R({},this.filter),{hidePublished:i}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-test-table-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},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,n){i&1&&(s(0,"div",0)(1,"button",1),b("click",function(){return n.showAll()}),l(2),p(3,"translate"),a(),s(4,"button",2),b("click",function(){return n.showOnlyMine()}),l(5),p(6,"translate"),a()(),s(7,"div",3)(8,"div",4)(9,"input",5),b("change",function(u){return n.onHidePublishedChange(u)}),a(),s(10,"label",6),l(11),p(12,"translate"),a()()()),i&2&&(r(),h("ngClass",Et(12,Rn,!n.filter.onlyMine,n.filter.onlyMine)),r(),f(" ",c(3,6,"tests.all-tests")," "),r(2),h("ngClass",Et(15,Rn,n.filter.onlyMine,!n.filter.onlyMine)),r(),f(" ",c(6,8,"tests.owned-tests")," "),r(4),h("checked",n.filter.hidePublished),r(2),f(" ",c(12,10,"tests.hide-published")," "))},dependencies:[ce,Le,I],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}"]})}}return t})();var Ds=["*"],jn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-preserve-line-height"]],ngContentSelectors:Ds,decls:3,vars:0,template:function(i,n){i&1&&(Zt(),s(0,"div"),Qt(1),l(2,"\xA0"),a())},encapsulation:2})}}return t})();var Vn=(()=>{class t{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")}`:""}static{this.\u0275fac=function(i){return new(i||t)(x(ae,16))}}static{this.\u0275pipe=Yt({name:"testSummaryShort",type:t,pure:!0})}}return t})();var Ls=t=>[t,"edit"];function Gs(t,o){t&1&&(s(0,"i",9),l(1,"edit"),a())}function Fs(t,o){if(t&1&&(s(0,"div",5)(1,"div",7)(2,"bkd-preserve-line-height"),l(3),p(4,"date"),a(),s(5,"a",8),T(6,Gs,2,0,"i",9),a()(),s(7,"bkd-preserve-line-height"),l(8),p(9,"testSummaryShort"),a(),s(10,"bkd-preserve-line-height"),l(11),a()()),t&2){let e=m();r(3),v(D(4,5,e.test.Date,"dd.MM.yyyy")),r(2),h("routerLink",G(10,Ls,e.test.Id)),r(),S(e.test.IsOwner&&e.test.IsPublished===!1?6:-1),r(2),f(" ",c(9,8,e.test)," "),r(3),v(e.test.Owner)}}function Rs(t,o){if(t&1){let e=L();s(0,"div",6)(1,"a",10),p(2,"translate"),b("click",function(){E(e);let n=m();return w(n.unpublishTest())}),s(3,"i",11),l(4,"lock"),a(),s(5,"span"),l(6),p(7,"translate"),a()(),s(8,"bkd-caret",12),b("click",function(){E(e);let n=m();return w(n.emitToggleHeader())}),a()()}if(t&2){let e=m();r(),pe("title",c(2,3,"tests.edit")),r(5),v(c(7,5,"tests.published")),r(2),h("expanded",e.expanded)}}function Bs(t,o){if(t&1){let e=L();s(0,"div",6)(1,"a",13),p(2,"translate"),b("click",function(){E(e);let n=m();return w(n.publishTest())}),s(3,"i",11),l(4,"lock_open"),a(),s(5,"span"),l(6),p(7,"translate"),a()(),s(8,"bkd-caret",12),b("click",function(){E(e);let n=m();return w(n.emitToggleHeader())}),a()()}if(t&2){let e=m();r(),pe("title",c(2,3,"tests.publish")),r(5),v(c(7,5,"tests.not-published")),r(2),h("expanded",e.expanded)}}var An=(()=>{class t{constructor(){this.toggleHeader=new J,this.publish=new J,this.unpublish=new J}emitToggleHeader(){this.toggleHeader.emit(!this.expanded)}publishTest(){this.publish.emit(this.test)}unpublishTest(){this.unpublish.emit(this.test)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-test-table-header"]],inputs:{test:"test",expanded:"expanded"},outputs:{toggleHeader:"toggleHeader",publish:"publish",unpublish:"unpublish"},decls:9,vars:5,consts:[[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"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","align-items-center","justify-content-between","test-status"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-link","p-0","edit",3,"routerLink"],[1,"material-icons"],[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,n){i&1&&(s(0,"div",0)(1,"div",1),b("click",function(){return n.emitToggleHeader()}),s(2,"div",2),l(3),a(),C(4,"bkd-caret",3),a(),s(5,"div",4),T(6,Fs,12,12,"div",5)(7,Rs,9,7,"div",6)(8,Bs,9,7,"div",6),a()()),i&2&&(r(2),h("ngClass",n.expanded?"expanded":"collapsed"),r(),f(" ",n.test.Designation," "),r(),h("expanded",n.expanded),r(2),S(n.expanded?6:-1),r(),S(n.test.IsPublished?7:8))},dependencies:[ce,wi,jn,X,ye,I,Vn],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: 811px){.test-designation[_ngcontent-%COMP%]{display:inherit!important}.test-status[_ngcontent-%COMP%]{order:initial}.expand-mobile[_ngcontent-%COMP%]{display:none!important}}"]})}}return t})();var js=["bkdTestEditGradesHeader",""],Lt=(t,o)=>o.Id,Vs=t=>({"test-point-grading":t}),As=t=>({selected:t});function Hs(t,o){if(t&1){let e=L();s(0,"th",3)(1,"bkd-test-table-header",14),b("toggleHeader",function(n){E(e);let d=m();return w(d.state.toggleHeader(n))})("publish",function(n){E(e);let d=m();return w(d.publish.emit(n))})("unpublish",function(n){E(e);let d=m();return w(d.unpublish.emit(n))}),a()()}if(t&2){let e=o.$implicit,i=m(),n=P(4);h("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),h("test",e)("expanded",n)}}function Ns(t,o){if(t&1){let e=L();s(0,"th",4)(1,"bkd-test-table-header",14),b("toggleHeader",function(n){E(e);let d=m();return w(d.state.toggleHeader(n))})("publish",function(n){E(e);let d=m();return w(d.publish.emit(n))})("unpublish",function(n){E(e);let d=m();return w(d.unpublish.emit(n))}),a()()}if(t&2){let e=o.$implicit,i=m(),n=P(4);h("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),h("test",e)("expanded",n)}}function Us(t,o){if(t&1){let e=L();s(0,"div",15)(1,"span",16),b("click",function(){E(e);let n=m().$implicit,d=m();return w(d.state.sortBy(n))}),l(2),p(3,"translate"),a()()}t&2&&(r(2),f("",c(3,1,"tests.points")," "))}function Ws(t,o){if(t&1){let e=L();s(0,"th",13)(1,"div",8),T(2,Us,4,3,"div",15),s(3,"div",9)(4,"span",16),b("click",function(){let n=E(e).$implicit,d=m();return w(d.state.sortBy(n))}),l(5),p(6,"translate"),a()(),s(7,"div",10),l(8),p(9,"async"),a()()()}if(t&2){let e=o.$implicit,i=m();h("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(2),S(e.IsPointGrading?2:-1),r(3),v(c(6,4,"tests.grade")),r(3),f(" ",c(9,6,i.state.getSortingChar$(e))," ")}}var Hn=(()=>{class t{set shown(e){let i=this.element.nativeElement.classList;e?i.add("shown"):i.remove("shown")}constructor(e,i){this.state=e,this.element=i,this.sticky=!1,this.publish=new J,this.unpublish=new J}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.getRowsAndColumns().map(e=>e.map(i=>i.getBoundingClientRect().width))}setColumnWidths(e){let i=this.getRowsAndColumns();if(i.length!==e.length||!i.every((n,d)=>n.length===e[d].length))throw new Error("Given column widths do not match number of header rows/columns");i.forEach((n,d)=>n.forEach((u,g)=>{u.style.width=`${e[d][g]}px`,u.style.minWidth=`${e[d][g]}px`}))}getStickyColumnsHeights(){return this.getRowsAndColumns(".sticky").map(e=>e.map(i=>i.getBoundingClientRect().height))}setStickyColumnHeights(e){let i=this.getRowsAndColumns(".sticky");if(i.length!==e.length||!i.every((n,d)=>n.length===e[d].length))throw new Error("Given column heights do not match number of sticky header columns");i.forEach((n,d)=>n.forEach((u,g)=>{u.style.height=`${e[d][g]}px`})),this.getRows().forEach((n,d)=>{let u=e[d].reduce((g,k)=>Math.max(g,k),0);n.style.height=`${u}px`})}getRowsAndColumns(e){return this.getRows().map(i=>Array.from(i.querySelectorAll(`th:not(.header-mobile)${e??""}`)))}getRows(){return Array.from(this.element.nativeElement.querySelectorAll("tr"))}static{this.\u0275fac=function(i){return new(i||t)(x(Y),x(qt))}}static{this.\u0275cmp=_({type:t,selectors:[["thead","bkdTestEditGradesHeader",""]],hostVars:2,hostBindings:function(i,n){i&2&&le("sticky",n.sticky)},inputs:{selectedTest:"selectedTest",sticky:"sticky",shown:"shown"},outputs:{publish:"publish",unpublish:"unpublish"},attrs:js,decls:42,vars:32,consts:[[1,"header-collapsible"],["colspan","3",1,"desktop","sticky"],[3,"filterChange","filter"],["container","body",1,"test-grade","grade","test-info-desktop",3,"ngClass"],["container","body","colspan","3",1,"test-grade","header-mobile","test-info-mobile",3,"ngClass"],[1,"filler"],[3,"ngClass"],[1,"sticky","student-name",3,"click"],[1,"d-flex"],[1,"column-title"],[1,"sort-direction","ms-1"],[1,"sticky","student-grade","desktop",3,"click","ngClass"],[1,"border-end","sticky","student-average","desktop",3,"click"],["container","body",1,"test-grade",3,"ngClass"],[3,"toggleHeader","publish","unpublish","test","expanded"],[1,"column-title","point-input-container","me-2","me-md-3"],[3,"click"]],template:function(i,n){if(i&1){let d=L();F(0),p(1,"async"),F(2),p(3,"async"),F(4),p(5,"async"),s(6,"tr",0)(7,"th",1)(8,"bkd-test-table-filter",2),b("filterChange",function(g){return E(d),w(n.state.setFilter(g))}),a()(),H(9,Hs,2,3,"th",3,Lt),H(11,Ns,2,3,"th",4,Lt),C(13,"th",5),a(),s(14,"tr",6)(15,"th",7),b("click",function(){return E(d),w(n.state.sortBy("FullName"))}),s(16,"div",8)(17,"div",9),l(18),p(19,"translate"),a(),s(20,"div",10),l(21),p(22,"async"),a()()(),s(23,"th",11),b("click",function(){return E(d),w(n.state.sortBy("FinalGrade"))}),s(24,"div",8)(25,"div",9),l(26),p(27,"translate"),a(),s(28,"div",10),l(29),p(30,"async"),a()()(),s(31,"th",12),b("click",function(){return E(d),w(n.state.sortBy("TestsMean"))}),s(32,"div",8)(33,"div",9),l(34),p(35,"translate"),a(),s(36,"div",10),l(37),p(38,"async"),a()()(),H(39,Ws,10,8,"th",13,Lt),C(41,"th",5),a()}if(i&2){let d=c(1,9,n.state.filteredTests$),u=c(3,11,n.state.filter$);r(4),A(c(5,13,n.state.expandedHeader$)),r(4),h("filter",u),r(),N(d),r(2),N(d),r(3),h("ngClass",G(28,Vs,n.selectedTest==null?null:n.selectedTest.IsPointGrading)),r(4),f(" ",c(19,16,"tests.student.name")," "),r(3),f(" ",c(22,18,n.state.getSortingChar$("FullName"))," "),r(2),h("ngClass",G(30,As,n.selectedTest===void 0)),r(3),f(" ",c(27,20,"tests.grade")," "),r(3),f(" ",c(30,22,n.state.getSortingChar$("FinalGrade"))," "),r(5),f(" ",c(35,24,"tests.mean")," "),r(3),f(" ",c(38,26,n.state.getSortingChar$("TestsMean"))," "),r(2),N(d)}},dependencies:[K,ce,I,Bn,An],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}.sticky[_nghost-%COMP%]{position:fixed;top:0;left:0;z-index:1000;display:none}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}@media (min-width: 811px){.sticky.shown[_nghost-%COMP%]{display:table-header-group}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}.sticky[_nghost-%COMP%]{margin-left:var(--test-columns-offset)}.sticky[_nghost-%COMP%] th.sticky[_ngcontent-%COMP%]{position:fixed}}"],changeDetection:0})}}return t})();var zs=(t,o)=>o.student.Id,qs=(t,o)=>o.Id,Ks=(t,o)=>o.id,Ys=t=>({"test-point-grading":t}),Nn=t=>({selected:t}),Zs=t=>["student",t,"grades"],Qs=t=>({"visible-on-mobile":t});function Xs(t,o){if(t&1&&(s(0,"div"),l(1),a()),t&2){let e=m().$implicit;r(),f(" ",e.finalGrade.finalGradeValue," ")}}function Js(t,o){if(t&1){let e=L();s(0,"bkd-grade-select",19),p(1,"async"),p(2,"async"),b("gradeIdSelected",function(n){E(e);let d=m(2);return w(d.state.overwriteFinalGrade(n))}),a()}if(t&2){let e,i,n=m().$implicit,d=m();h("options",c(1,4,d.state.gradingOptionsForCourse$()))("valueId",(e=n.finalGrade.gradeId)!==null&&e!==void 0?e:null)("gradeId",(i=n.finalGrade.gradingId)!==null&&i!==void 0?i:null)("disabled",c(2,6,d.isEditFinalGradesAllowed(n))===!1)}}function ea(t,o){if(t&1&&(F(0),s(1,"td",11),C(2,"bkd-grade",20),p(3,"async"),a()),t&2){let e=o.$implicit,i=o.$index,n=m(),d=n.$implicit,u=n.$index,g=m(),k=e.grade;r(),h("ngClass",g.selectedTest!==void 0&&k.test.Id===g.selectedTest.Id?"selected":""),r(),h("grade",k)("gradeOptions",c(3,6,g.state.gradingOptionsForTest$(k.test)))("student",d.student)("hasFinalGrade",!!d.finalGrade.finalGradeValue)("tabIndex",(1+i)*1e3+u)}}function ta(t,o){if(t&1&&(s(0,"tr")(1,"td",6)(2,"a",15)(3,"div"),l(4),a(),s(5,"div",8),l(6),p(7,"translate"),p(8,"decimalOrDash"),a()()(),s(9,"td",16),T(10,Xs,2,1,"div")(11,Js,3,8,"bkd-grade-select",17),a(),s(12,"td",18),l(13),p(14,"decimalOrDash"),a(),H(15,ea,4,8,"td",11,Ks),C(17,"td",12),a()),t&2){let e=o.$implicit,i=m();r(2),h("routerLink",G(15,Zs,e.student.Id)),r(2),v(e.student.FullName),r(2),Ue(" ",c(7,7,"tests.mean"),": ",D(8,9,e.finalGrade.average,"1-3")," "),r(3),h("ngClass",G(17,Nn,i.selectedTest===void 0)),r(),S(e.finalGrade.finalGradeValue?10:11),r(3),f(" ",D(14,12,e.finalGrade.average,"1-3")," "),r(2),N(i.getGrades(e))}}function ia(t,o){if(t&1&&(s(0,"td",11),C(1,"bkd-average-grades",21),a()),t&2){let e=o.$implicit,i=m();h("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)||e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),h("test",e)}}function na(t,o){if(t&1){let e=L();s(0,"button",22),b("click",function(){E(e);let n=m();return w(n.setAverageAsFinalGrade())}),l(1),p(2,"translate"),a()}if(t&2){let e=m(),i=P(2);h("ngClass",G(4,Qs,!i||!e.selectedTest)),r(),f(" ",c(2,2,"tests.set-final-grade")," ")}}var Un=(()=>{class t{constructor(e,i){this.state=e,this.modalService=i}ngOnInit(){this.state.setSorting({key:"FullName",ascending:!0})}setAverageAsFinalGrade(){this.state.course$.pipe(oe(1)).subscribe(e=>this.state.setAveragesAsFinalGrades({CourseIds:[e.Id]}))}isEditFinalGradesAllowed(e){return this.state.course$.pipe(y(i=>!!(ht(i)?.value&&e.finalGrade?.canGrade)))}getGrades(e){return e.grades.flatMap(i=>({id:`${e.student.Id}-${i.test.Id}`,grade:i}))}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))}calculatePointsAverage(e){return this.safeAverage(e,at)}calculateGradeAverage(e){return this.safeAverage(e,ot)}safeAverage(e,i){try{return i(e).toString()}catch{return"\u2013"}}openModal(e){let i=this.modalService.open($n);return i.componentInstance.test=e,i}onCloseModal(e,i){e.result.then(n=>{n&&i()},()=>{})}static{this.\u0275fac=function(i){return new(i||t)(x(Y),x(lt))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-test-edit-grades"]],inputs:{selectedTest:"selectedTest"},features:[ne([He])],decls:40,vars:45,consts:[["inlineHeader",""],["stickyHeader",""],[1,"table-responsive-wrapper"],["bkdTestEditGradesHeaderSticky","",1,"table","table-hover","h-100",3,"ngClass","inlineHeader","stickyHeader"],["bkdTestEditGradesHeader","",3,"publish","unpublish","selectedTest"],["bkdTestEditGradesHeader","",3,"publish","unpublish","sticky","selectedTest"],[1,"sticky","student-name"],[1,"d-flex","flex-column"],[1,"student-average-inline"],[1,"desktop","sticky","student-grade",3,"ngClass"],[1,"desktop","border-end","sticky","student-average"],[1,"test-grade",3,"ngClass"],[1,"filler"],[1,"action-buttons"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"ngClass"],[3,"routerLink"],[1,"sticky","student-grade",3,"ngClass"],[3,"options","valueId","gradeId","disabled"],[1,"border-end","sticky","student-average"],[3,"gradeIdSelected","options","valueId","gradeId","disabled"],[3,"grade","gradeOptions","student","hasFinalGrade","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,n){if(i&1){let d=L();F(0),p(1,"async"),F(2),p(3,"async"),F(4),p(5,"async"),s(6,"div",2)(7,"table",3)(8,"thead",4,0),b("publish",function(g){return E(d),w(n.publish(g))})("unpublish",function(g){return E(d),w(n.unpublish(g))}),a(),s(10,"thead",5,1),b("publish",function(g){return E(d),w(n.publish(g))})("unpublish",function(g){return E(d),w(n.unpublish(g))}),a(),s(12,"tbody"),H(13,ta,18,19,"tr",null,zs),s(15,"tr")(16,"td",6)(17,"div",7)(18,"div"),l(19),p(20,"translate"),a(),s(21,"div",8),l(22),p(23,"translate"),p(24,"async"),p(25,"decimalOrDash"),a()()(),s(26,"td",9),l(27),p(28,"async"),p(29,"decimalOrDash"),a(),s(30,"td",10),l(31),p(32,"async"),p(33,"decimalOrDash"),a(),H(34,ia,2,2,"td",11,qs),C(36,"td",12),a()()(),s(37,"div",13),T(38,na,3,6,"button",14),p(39,"async"),a()()}if(i&2){let d=Se(9),u=Se(11),g=c(1,13,n.state.filteredTests$);r(2),A(c(3,15,n.state.hasTests$));let k=c(5,18,n.state.studentGrades$);r(5),h("ngClass",G(41,Ys,n.selectedTest==null?null:n.selectedTest.IsPointGrading))("inlineHeader",d)("stickyHeader",u),r(),h("selectedTest",n.selectedTest),r(2),h("sticky",!0)("selectedTest",n.selectedTest),r(3),N(k),r(6),v(c(20,20,"tests.average")),r(3),Ue(" ",c(23,22,"tests.mean"),": ",D(25,26,c(24,24,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(4),h("ngClass",G(43,Nn,n.selectedTest===void 0)),r(),f(" ",D(29,31,c(28,29,n.state.meanOfFinalGradesForCourse$),"1-3")," "),r(4),f(" ",D(33,36,c(32,34,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(3),N(g),r(4),S(c(39,39,n.state.canSetFinalGrade$)?38:-1)}},dependencies:[ce,X,Gn,Dn,Ln,K,I,Bi,Fn,Hn],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-decoration:underline}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.student-average-inline[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem;line-height:1}@media (min-width: 811px){.table-responsive-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0}.action-buttons[_ngcontent-%COMP%]{position:sticky;left:0}}@media (max-width: 810px){.apply-average-button[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var ra=()=>["/events"],sa=t=>({count:t});function aa(t,o){if(t&1&&(s(0,"div",7),l(1),p(2,"translate"),a()),t&2){let e=m();r(),f(" ",D(2,1,e.course.ParticipatingStudents.length===1?"courses.registration":"courses.registrations",G(4,sa,e.course.ParticipatingStudents.length))," ")}}var Wn=(()=>{class t{constructor(e){this.reportsService=e,this.course$=new z(null),this.reports$=this.course$.pipe(y(i=>i?.Id),Z(),O(i=>i?this.reportsService.getCourseTestsReports(i):V([])),Vt([]))}ngOnChanges(e){e.course&&this.course$.next(e.course.currentValue)}getDesignation(){return gt(this.course)}static{this.\u0275fac=function(i){return new(i||t)(x(dt))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-header"]],inputs:{course:"course"},features:[ke],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"],[1,"additional-info"]],template:function(i,n){i&1&&(s(0,"bkd-backlink",0)(1,"div",1)(2,"a",2)(3,"i",3),l(4,"add"),a()(),C(5,"bkd-reports-link",4),p(6,"async"),C(7,"div",5),a()(),s(8,"div",6)(9,"h1"),l(10),a(),T(11,aa,3,6,"div",7),a()),i&2&&(h("link",Oe(6,ra)),r(5),h("reports",c(6,4,n.reports$)),r(5),v(n.getDesignation()),r(),S(n.course.ParticipatingStudents?11:-1))},dependencies:[Ve,X,rt,K,I],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem;border-bottom:1px solid #dee2e6}h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"]})}}return t})();var oa=()=>[],da=t=>({"visible-on-mobile":t});function la(t,o){t&1&&C(0,"bkd-spinner")}function pa(t,o){if(t&1){let e=L();s(0,"bkd-select",4),b("valueChange",function(n){E(e);let d=m(2);return w(n&&d.testSelected(n))}),a(),C(1,"bkd-test-edit-grades",5)}if(t&2){m(2);let e=P(6),i=P(8),n=P(10);h("options",e)("value",i)("allowEmpty",!1),r(),h("selectedTest",n)}}function ca(t,o){t&1&&(s(0,"p",2),l(1),p(2,"translate"),a()),t&2&&(r(),v(c(2,1,"tests.no-tests")))}function ma(t,o){if(t&1&&(s(0,"a",3),p(1,"async"),s(2,"i",6),l(3,"arrow_right_alt"),a(),s(4,"span",7),l(5),p(6,"translate"),a()()),t&2){let e=m(2),i=P(4),n=P(10);pe("href",c(1,3,e.buildLinkToRatingOverview()),ie),h("ngClass",G(7,da,!i||!n)),r(5),v(c(6,5,"tests.link-to-rating-overview"))}}function ua(t,o){if(t&1&&(C(0,"bkd-tests-header",1),T(1,pa,2,4)(2,ca,3,3,"p",2)(3,ma,7,9,"a",3),p(4,"async")),t&2){let e=m(),i=P(0),n=P(2);h("course",i),r(),S(n.length>0?1:2),r(2),S(c(4,3,e.state.canSetFinalGrade$)?3:-1)}}var zn=(()=>{class t{constructor(e,i,n){this.settings=e,this.state=i,this.translate=n,this.selectTest$=new te,this.testOptions$=this.state.tests$.pipe(y(d=>[{Key:-1,Value:this.translate.instant("tests.grade")},...d.map(u=>({Key:u.Id,Value:u.Designation}))]),Z()),this.selectedTestId$=qe(this.selectTest$,this.state.tests$.pipe(oe(1),y(d=>d[0]?.Id))).pipe(Z()),this.selectedTest$=this.selectedTestId$.pipe(O(d=>this.state.tests$.pipe(y(u=>u.find(g=>g.Id===d)))),Z())}testSelected(e){this.selectTest$.next(e)}buildLinkToRatingOverview(){return this.state.course$.pipe(oe(1),y(e=>this.settings.eventlist.evaluation.replace(":id",String(e.Id))))}static{this.\u0275fac=function(i){return new(i||t)(x(me),x(Y),x(ae))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests-list"]],decls:16,vars:22,consts:[[1,"bkd-container"],[3,"course"],[1,"mt-3","px-3"],[1,"rating-overview","d-flex","justify-content-end","pe-3","border-top","pt-3",3,"ngClass","href"],["width","100%",1,"tests-dropdown",3,"valueChange","options","value","allowEmpty"],[3,"selectedTest"],[1,"material-icons","fw-bold"],[1,"ps-1"]],template:function(i,n){if(i&1&&(F(0),p(1,"async"),F(2),p(3,"async"),F(4),p(5,"async"),F(6),p(7,"async"),F(8),p(9,"async"),F(10),p(11,"async"),s(12,"div",0),T(13,la,1,0,"bkd-spinner"),p(14,"async"),T(15,ua,5,5),a()),i&2){let d;A(c(1,1,n.state.course$)),r(2),A((d=c(3,4,n.state.tests$))!==null&&d!==void 0?d:Oe(21,oa)),r(2),A(c(5,7,n.state.hasTests$)),r(2),A(c(7,10,n.testOptions$)),r(2),A(c(9,13,n.selectedTestId$)),r(2),A(c(11,16,n.selectedTest$)),r(3),S(c(14,19,n.state.loading$)?13:15)}},dependencies:[Wn,Be,Un,ce,he,K,I],styles:[".tests-dropdown[_ngcontent-%COMP%]{display:block;padding:1rem 0}@media (min-width: 811px){.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: 810px){a.rating-overview[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var xt=(()=>{class t{constructor(e,i){this.state=e,this.route=i,this.courseId$=this.route.paramMap.pipe(y(n=>Number(n.get("id"))),Z()),this.destroy$=new te}ngOnInit(){this.courseId$.pipe(_e(this.destroy$)).subscribe(e=>this.state.setCourseId(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||t)(x(Y),x(re))}}static{this.\u0275cmp=_({type:t,selectors:[["bkd-tests"]],features:[ne([Y])],decls:1,vars:0,template:function(i,n){i&1&&C(0,"router-outlet")},dependencies:[xe],encapsulation:2})}}return t})();function qn(t){return{path:t,component:gn,children:[{path:"",component:un},{path:"study-course-student/:id",component:hn},It]}}var Dc=[{path:"",component:vn,children:[{path:"",component:fn},{path:"current",component:sn,children:[{path:"",component:rn},qn(":id")]},{path:":id",component:xt,children:[{path:"tests",component:zn},qn("students")]},{path:":id/tests/:testId/edit",component:xt,children:[{path:"",component:On}]},{path:":id/tests/add",component:xt,children:[{path:"",component:Pn}]},{path:":id/tests",children:[It]}]}];export{Qi as a,qn as b,Dc as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-JGKXAFYO.js b/public/apps/webapp-schulverwaltung/chunk-JGKXAFYO.js new file mode 100644 index 00000000..5b661c54 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-JGKXAFYO.js @@ -0,0 +1 @@ +import{$ as c,Hd as O,Ia as d,Ld as B,Mc as i,Nc as h,P as C,Pc as f,Rc as F,Sa as x,Sc as R,Uc as k,Ud as _,Vd as G,X as P,Zc as a,_c as L,a as b,ab as u,b as y,bb as g,cb as M,dd as w,hd as E,kb as D,l as A,lb as T,n as v,o as S,qc as j,vb as U,wb as $,ya as m}from"./chunk-NEW5VGRB.js";var N=(()=>{class o{constructor(){this.expanded=!1}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=d({type:o,selectors:[["bkd-caret"]],inputs:{expanded:"expanded"},decls:2,vars:1,consts:[["role","button",1,"d-flex","material-icons"]],template:function(e,r){e&1&&(u(0,"i",0),U(1),g()),e&2&&(m(),$(r.expanded?"expand_less":"expand_more"))},styles:["i[_ngcontent-%COMP%]:hover{color:#ea161f}"]})}}return o})();var X=["*"],V=(()=>{class o{constructor(){this.opened=!1}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=d({type:o,selectors:[["bkd-student-dossier-entry-header"]],inputs:{opened:"opened"},ngContentSelectors:X,decls:3,vars:1,consts:[[1,"m-0"],[1,"d-flex","align-items-center",3,"expanded"]],template:function(e,r){e&1&&(D(),u(0,"h5",0),T(1),g(),M(2,"bkd-caret",1)),e&2&&(m(2),x("expanded",r.opened))},dependencies:[N],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})}}return o})();var J=R({Id:h,Title:i}),z=a(F(J));var ct=(()=>{class o{constructor(){this.settings=c(E),this.storageService=c(_),this.http=c(j)}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)}getCourseTestsReports(t){return this.getAvailableReports("Anlass",this.settings.testsByCourseReports,[t])}getStudentSubscriptionGradesReports(t){return this.settings.testsBySubscriptionStudentReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getTeacherSubscriptionGradesReports(t){return this.settings.testsBySubscriptionTeacherReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getStudyClassStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.studyClassStudentsReports,[t])}getCourseStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.courseStudentsReports,[t])}getAvailableReports(t,e,r){let n=B(e,p=>p.type),s=S(Object.keys(n).map(p=>this.getAvailableReportsForType(p,t,n[p].map(({id:l})=>l),r)));return this.mergeAvailableReports(s,e)}getAvailableReportsForType(t,e,r,n){return n.length===0?A([]):this.http.get(this.getReportAvailabilityUrl(t,e,r,n)).pipe(C(G(z)),v(s=>s?s.map(({Id:p,Title:l})=>({type:t,id:p,title:l,url:this.getReportUrl(t,e,p,n)})):[]))}mergeAvailableReports(t,e){return t.pipe(v(r=>{let n=O(r);return e.reduce((s,p)=>{let l=n.find(({id:H})=>H===p.id);return l?[...s,l]:s},[])}))}getReportUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/Files/${this.getReportTypePathPart(t)}/${e}/${r}`);return s.searchParams.set("ids",n.join(",")),s.searchParams.set("token",this.storageService.getAccessToken()??""),s.toString()}getReportAvailabilityUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/${this.getReportTypePathPart(t)}/AvailableReports/${e}`);return s.searchParams.set("ids",Array.isArray(r)?r.join(","):String(r)),s.searchParams.set("keys",n.join(",")),s.toString()}getReportTypePathPart(t){return`${t[0].toUpperCase()+t.slice(1)}Reports`}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var gt=R({Id:h,AddressLine1:a(i),AddressLine2:L(i),Birthdate:a(w),DisplayEmail:a(i),FirstName:i,FullName:i,Gender:k([f("M"),f("F"),f("X")]),LastName:i,Location:a(i),PhoneMobile:a(i),PhonePrivate:a(i),PostalCode:a(i)});export{gt as a,N as b,V as c,ct as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-XBIMNMBY.js b/public/apps/webapp-schulverwaltung/chunk-K42F6AEW.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-XBIMNMBY.js rename to public/apps/webapp-schulverwaltung/chunk-K42F6AEW.js index 2f19fdaf..07831adf 100644 --- a/public/apps/webapp-schulverwaltung/chunk-XBIMNMBY.js +++ b/public/apps/webapp-schulverwaltung/chunk-K42F6AEW.js @@ -1 +1 @@ -import{M as g,O as s,P as i,k as p,l as f,n as a,o as l,x as c}from"./chunk-S3H6YSFW.js";function b(r,t,e){return l([r,t]).pipe(c(([n,u])=>u),i(([n,u])=>{let o=e?n?.get(e)||null:n;return o?o.statusChanges.pipe(s(o.status),a(()=>h(o))):f([])}),s([]),g(1))}function m(r,t){return r.pipe(a(e=>e.get(t)||null))}function d(r,t){return m(r,t).pipe(i(e=>e?e.valueChanges:p))}function h(r){return r?Object.keys(r.errors||{}).map(t=>({error:t,params:r.errors&&r.errors[t]instanceof Object?r.errors[t]:null})):[]}function E(r){return t=>r(...t)}export{b as a,m as b,d as c,E as d}; +import{M as g,O as s,P as i,k as p,l as f,n as a,o as l,x as c}from"./chunk-NEW5VGRB.js";function b(r,t,e){return l([r,t]).pipe(c(([n,u])=>u),i(([n,u])=>{let o=e?n?.get(e)||null:n;return o?o.statusChanges.pipe(s(o.status),a(()=>h(o))):f([])}),s([]),g(1))}function m(r,t){return r.pipe(a(e=>e.get(t)||null))}function d(r,t){return m(r,t).pipe(i(e=>e?e.valueChanges:p))}function h(r){return r?Object.keys(r.errors||{}).map(t=>({error:t,params:r.errors&&r.errors[t]instanceof Object?r.errors[t]:null})):[]}function E(r){return t=>r(...t)}export{b as a,m as b,d as c,E as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-K7OUA36X.js b/public/apps/webapp-schulverwaltung/chunk-K7OUA36X.js deleted file mode 100644 index f77ccfb7..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-K7OUA36X.js +++ /dev/null @@ -1 +0,0 @@ -import{b as a,c as b}from"./chunk-IYHUHAMR.js";import"./chunk-QE74EW6O.js";import"./chunk-NK7SMC5C.js";import"./chunk-TO3HOIOR.js";import"./chunk-DQSLVCJO.js";import"./chunk-AXC265QM.js";import"./chunk-LY5STZD6.js";import"./chunk-RC3KCROY.js";import"./chunk-TMXWSOGF.js";import"./chunk-UPTESATB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import"./chunk-KV3V2W4Q.js";import"./chunk-3PSL2UAK.js";import"./chunk-LZEJSWWW.js";import"./chunk-UN6AN2DI.js";import"./chunk-CXJU4L5R.js";import"./chunk-M5HHSMYB.js";import"./chunk-W6XALPR5.js";import"./chunk-XBIMNMBY.js";import"./chunk-A7CCEKNQ.js";import"./chunk-2AZMKO7X.js";import"./chunk-HLAFRD2O.js";import"./chunk-QTBTUQ3W.js";import"./chunk-HVJBOTRL.js";import"./chunk-S3H6YSFW.js";export{b as EVENTS_ROUTES,a as getStudentsRoute}; diff --git a/public/apps/webapp-schulverwaltung/chunk-KQORGECX.js b/public/apps/webapp-schulverwaltung/chunk-KQORGECX.js new file mode 100644 index 00000000..095b700e --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-KQORGECX.js @@ -0,0 +1,2 @@ +import{e as Ue,f as Ve,o as S}from"./chunk-NC6UEGAF.js";import{f as Ne,g as je,j as He}from"./chunk-SL67CYEF.js";import{a as Me,h as Ge}from"./chunk-HQSONWXM.js";import{C as te,x as Oe,z as Be}from"./chunk-RXRYDGZR.js";import{$ as f,$a as _e,Eb as Pe,Ec as H,F as $,Fb as ke,Ga as ye,Gb as Le,H as N,Ia as j,K as pe,La as he,M as h,Mc as Re,Nb as l,Nc as ee,O as I,Ob as d,Oc as T,Od as G,P as X,Pa as g,Pb as M,Q as de,Rd as Ee,Sa as L,Sc as Fe,Sd as q,Ta as ge,X as _,Xa as b,Zc as we,_a as be,ab as c,bb as p,cb as Y,da as ue,ea as R,f as oe,fa as F,g as re,gb as U,gc as Ae,h as A,hc as $e,hd as v,ia as me,ib as w,jb as m,kb as xe,l as se,lb as Ce,mb as Te,n as r,nb as ve,o as ae,qc as V,r as ce,sb as Se,tb as Ie,ub as De,vb as u,wb as E,x as le,xa as fe,xb as C,ya as s,yb as Z}from"./chunk-NEW5VGRB.js";var qe=function(e){return function(i){return!e(i)}};var Mt=(()=>{class e{constructor(){this.http=f(V),this.settings=f(v)}editLessonPresences(t,n,o,a,x){let k={LessonIds:t,PersonIds:n};return o!==void 0&&(k.PresenceTypeId=o),a!==void 0&&(k.ConfirmationValue=a),this.http.put(`${this.settings.apiUrl}/LessonPresences/Edit`,k,x).pipe(r(()=>{}))}removeLessonPresences(t,n,o){return this.http.put(`${this.settings.apiUrl}/LessonPresences/Reset`,{LessonIds:t,PersonIds:n,WithComment:!0},o).pipe(r(()=>{}))}confirmLessonPresences(t,n,o,a){let x={LessonIds:t,PersonIds:n,AbsenceTypeId:o,ConfirmationValue:a};return this.http.put(`${this.settings.apiUrl}/LessonAbsences/Confirm`,x).pipe(r(()=>{}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ke(e){return e.slice().sort((i,t)=>i.Sort-t.Sort)}function Bt(e){return e.map(i=>({Key:i.Id,Value:i.Designation||""}))}function Nt(e,i){return e.map(t=>Object.assign(t,{Group:i}))}var We=Fe({Id:ee,Active:T,Designation:we(Re),IsAbsence:T,IsComment:T,IsDispensation:T,IsIncident:T,IsHalfDay:T,NeedsConfirmation:T,Sort:ee});var Qe=(()=>{class e extends Me{constructor(){let t=f(V),n=f(v);super(t,n,We,"PresenceTypes")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ze=(()=>{class e{constructor(){this.restService=f(Qe),this.settings=f(v),this.presenceTypes$=this.loadPresenceTypes().pipe(h(1)),this.activePresenceTypes$=this.presenceTypes$.pipe(r(this.filterActiveTypes.bind(this)),h(1)),this.confirmationTypes$=this.presenceTypes$.pipe(r(this.filterConfirmationTypes.bind(this)),h(1)),this.incidentTypes$=this.presenceTypes$.pipe(r(this.filterIncidentTypes.bind(this)),h(1)),this.displayedTypes$=this.presenceTypes$.pipe(r(this.filterDisplayedTypes.bind(this)),h(1)),this.halfDayActive$=this.presenceTypes$.pipe(r(this.isHalfDayActive.bind(this)),I(!1),N(),h(1))}getPresenceType(t){return this.presenceTypes$.pipe(r(n=>{let o=n.find(a=>a.Id===t);if(!o)throw new Error("presence type not found");return o}))}loadPresenceTypes(){return this.restService.getList().pipe(r(Ke))}filterActiveTypes(t){return t.filter(n=>n.Active)}filterConfirmationTypes(t){return t.filter(n=>n.NeedsConfirmation&&n.Active&&n.Id!==this.settings.absencePresenceTypeId)}filterIncidentTypes(t){return t.filter(n=>n.IsIncident&&n.Active)}filterDisplayedTypes(t){return t.filter(n=>n.Id!==this.settings.absencePresenceTypeId)}isHalfDayActive(t){return!!t.find(n=>n.Id===this.settings.halfDayPresenceTypeId)?.Active}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function it(e){return!e}function ot(e){return!!(e&&e.IsComment)}function rt(e){return!!(e&&e.IsIncident)}function K(e){return!!(e&&(e.IsAbsence||e.IsDispensation||e.IsHalfDay))}function ne(e,i){return!!(e&&i&&e.Id===i.absencePresenceTypeId)}function ie(e,i){return!!(e&&i&&i===e.checkableAbsenceStateId)}function Je(e,i,t){return!!(it(i)&&e.ConfirmationStateId===null||ot(i)||rt(i)||K(i)&&e.ConfirmationStateId===t.unconfirmedAbsenceStateId||ie(t,e.ConfirmationStateId))}function rn(e,i){return e?.IsAbsence?i.unconfirmedAbsenceStateId:null}var y=function(e){return e.Present="present",e.Unapproved="unapproved",e.Absent="absent",e}(y||{});function st(e){switch(e){case y.Absent:return"cancel";case y.Unapproved:return"help";default:return"check_circle"}}var W=class{constructor(i,t,n,o){this.lessonPresence=i,this.presenceType=t,this.precedingAbsences=n,this.confirmationState=o,this.studentFullName=i.StudentFullName}get id(){return`${this.lessonPresence.LessonRef.Id}-${this.lessonPresence.StudentRef.Id}`}get presenceCategory(){return ie(this.settings,this.confirmationState&&Number(this.confirmationState.Key))?y.Unapproved:K(this.presenceType)?y.Absent:y.Present}get nextPresenceCategory(){return this.presenceCategory===y.Absent?y.Present:y.Absent}getNextPresenceType(i){switch(this.nextPresenceCategory){case y.Absent:return this.presenceCategory===y.Unapproved?this.presenceType:i.find(t=>ne(t,this.settings))||null;default:return null}}get canChangePresenceType(){return Je(this.lessonPresence,this.presenceType,this.settings)}get canChangeIncident(){return!K(this.presenceType)}get showDesignation(){return!this.canChangePresenceType||this.presenceCategory===y.Absent&&!ne(this.presenceType,this.settings)||this.presenceCategory===y.Unapproved}get presenceCategoryIcon(){return st(this.presenceCategory)}get settings(){return window.schulverwaltung.settings}};function Xe(e,i,t){let n=je(e,t?.in);return isNaN(i)?Ne(t?.in||e,NaN):(i&&n.setDate(n.getDate()+i),n)}function mn(e,i,t){return Xe(e,-i,t)}var P=class{constructor(i){if(this.absences=i,i.length===0)throw new Error("Absences array is empty");this.date=Ue(this.absences[0].LessonDateTimeFrom),this.dateString=S(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}get id(){return`${this.dateString}-${this.studentId}`}};function _n(e,i){return e===null&&i===null||e!==null&&i!==null&&e.LessonRef.Id===i.LessonRef.Id&&e.EventDesignation===i.EventDesignation&&e.StudyClassNumber===i.StudyClassNumber&&e.TeacherInformation===i.TeacherInformation&&e.LessonDateTimeFrom.getTime()===i.LessonDateTimeFrom.getTime()&&e.LessonDateTimeTo.getTime()===i.LessonDateTimeTo.getTime()}function at(e,i){return e?i.filter(t=>e.lessons.map(n=>n.LessonRef.Id).indexOf(t.LessonRef.Id)>=0).sort(pt):[]}function ct(e,i,t){return G(e.filter(n=>n.StudentRef.Id===i.StudentRef.Id&&n.LessonRef.From&&n.LessonRef.From.toDateString()===t?.LessonDateTimeFrom.toDateString()&&n.LessonRef.Fromlt(e,a,t,n,o))}function lt(e,i,t,n,o){let a=null;i.TypeRef.Id&&(a=t.find(J=>J.Id===i.TypeRef.Id)||null);let x=ct(o,i,e),k;return i.ConfirmationStateId&&(k=n.find(J=>J.Key===i.ConfirmationStateId)),new W(i,a,x,k)}function Ye(e,i){let t=e.LessonDateTimeFrom.getTime(),n=i.LessonDateTimeFrom.getTime();return t-n===0?e.LessonDateTimeTo.getTime()-i.LessonDateTimeTo.getTime():t-n}function pt(e,i){return e.StudentFullName.localeCompare(i.StudentFullName)}function dt(e,i){return e.LessonRef.From&&e.LessonRef.To&&i.LessonRef.From&&i.LessonRef.To?e.LessonRef.From.getTime()-i.LessonRef.From.getTime()===0?e.LessonRef.To.getTime()-i.LessonRef.To.getTime():e.LessonRef.From.getTime()-i.LessonRef.From.getTime():0}var Q=class extends Error{constructor(i,t){super(`TypeScript thought we could never end up here +${t}`)}};function kn(e){let i=mt(e);return Object.keys(i).reduce((t,n)=>(Object.keys(i[n]).forEach(o=>{t=[...t,new P(i[n][o].sort(Ye))]}),t),[])}function Ln(e,i){return[...e].sort(ut(i))}function z(e){return e.reduce((i,t)=>i.concat(t.absences),[])}function An(e,i){return e.filter(t=>!i.some(({lessonIds:n,personId:o})=>n.includes(t.LessonRef.Id)&&o===t.StudentRef.Id))}function $n(e,i){return G([...e,...i],"Id")}function ut(e){return(i,t)=>{switch(e.primarySortKey){case"date":{let n=i.date.getTime(),o=t.date.getTime();return n===o?i.studentFullName.localeCompare(t.studentFullName):e.ascending?n-o:o-n}case"name":{let n=e.ascending?i.studentFullName.localeCompare(t.studentFullName):t.studentFullName.localeCompare(i.studentFullName);return n===0?t.date.getTime()-i.date.getTime():n}default:throw new Q(e.primarySortKey,"Unhandled sort criteria")}}}function mt(e){return e.reduce((i,t)=>{let n=S(t.LessonDateTimeFrom,"yyyy-MM-dd"),o=t.StudentRef.Id;return i[n]||(i[n]={}),i[n][o]||(i[n][o]=[]),i[n][o].push(t),i},{})}var O=function(e){return e.ToggleSelection="TOGGLE",e.ClearSelection="CLEAR",e}(O||{}),Ze=(()=>{class e{constructor(){this.action$=new oe,this.selection$=ce(this.action$.pipe(pe(this.reduceSelection.bind(this),[]),I([])),{connector:()=>new A(1)}),this.selectionSub=this.selection$.connect()}ngOnDestroy(){this.selectionSub.unsubscribe()}toggle(t){this.action$.next({type:O.ToggleSelection,payload:t})}clear(t=null){this.action$.next({type:O.ClearSelection,payload:t})}isSelected$(t){return this.selection$.pipe(r(n=>n.includes(t)),N())}reduceSelection(t,n){switch(n.type){case O.ToggleSelection:return t.includes(n.payload)?t.filter(o=>o!==n.payload):[...t,n.payload];case O.ClearSelection:return n.payload||[];default:return t}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac})}}return e})();function On(e){let i=e.reduce((t,n)=>(t[n.StudentRef.Id]||(t[n.StudentRef.Id]=[]),t[n.StudentRef.Id].push(n.LessonRef.Id),t),{});return Object.keys(i).map(t=>({personIds:[Number(t)],lessonIds:i[t]}))}function et(e){let i={};return e.forEach(t=>{i[t.StudentRef.Id]||(i[t.StudentRef.Id]={}),i[t.StudentRef.Id][String(t.TypeRef.Id)]||(i[t.StudentRef.Id][String(t.TypeRef.Id)]=[]),i[t.StudentRef.Id][String(t.TypeRef.Id)].push(t.LessonRef.Id)}),Object.keys(i).reduce((t,n)=>[...t,...Object.keys(i[n]).map(o=>({personId:Number(n),presenceTypeId:o==="null"?null:Number(o),lessonIds:i[n][String(o)]}))],[])}function Bn(e){return e.slice().sort((i,t)=>i.LessonDateTimeFrom.getTime()-t.LessonDateTimeFrom.getTime())}function Nn(e){return`${e.EventDesignation}, ${S(e.LessonDateTimeFrom,"dd.MM.yyyy")}, ${S(e.LessonDateTimeFrom,"HH:mm")}-${S(e.LessonDateTimeTo,"HH:mm")}`}var Xn=(()=>{class e extends Ze{constructor(){super(...arguments),this.settings=f(v),this.selectedIds$=this.selection$.pipe(r(B),r(({openAbsencesEntries:t,lessonPresences:n})=>et([...z(t),...n])),h(1)),this.selectedLessons$=this.selection$.pipe(r(B),r(({openAbsencesEntries:t,lessonPresences:n})=>[...z(t),...n]),h(1)),this.selectedWithoutPresenceType$=this.selection$.pipe(r(B),r(({openAbsencesEntries:t,lessonPresences:n})=>[...z(t),...n].filter(o=>o.TypeRef.Id===this.settings.absencePresenceTypeId)))}clearNonOpenAbsencesEntries(){this.selection$.pipe($(1),r(B)).subscribe(({openAbsencesEntries:t})=>this.clear(t))}clearNonLessonPresences(){this.selection$.pipe($(1),r(B)).subscribe(({lessonPresences:t})=>this.clear(t))}static{this.\u0275fac=(()=>{let t;return function(o){return(t||(t=me(e)))(o||e)}})()}static{this.\u0275prov=_({token:e,factory:e.\u0275fac})}}return e})();function B(e){return{openAbsencesEntries:e.filter(te(P)),lessonPresences:e.filter(qe(te(P)))}}var tt=(()=>{class e{constructor(){this.translate=f(Ee)}transform(t){if(!t)return"";let n=Ve(t,new Date);return this.translate.instant(`shared.daysDifference.${this.getKey(n)}`,{count:Math.abs(n)})}getKey(t){return t===0?"today":t===1?"tomorrow":t===-1?"yesterday":t>0?"in":"ago"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=he({name:"bkdDaysDifference",type:e,pure:!0})}}return e})();function oi(e){return e.length===0}function nt(e){return Array.isArray(e)}var ft=["checkbox"],yt=(e,i)=>i.Id;function ht(e,i){e&1&&Y(0,"bkd-spinner",2)}function gt(e,i){if(e&1&&Y(0,"bkd-reports-link",13),e&2){let t=m(4);L("reports",t.reports)("disableIfUnavailable",!0)}}function bt(e,i){if(e&1&&(c(0,"a",14),l(1,"async"),c(2,"i",12),u(3,"mail"),p()()),e&2){let t=m(4);ve("href","mailto:",d(1,2,t.mailTo$),"",fe)}}function _t(e,i){if(e&1&&(c(0,"div",15),u(1),p()),e&2){let t=m(4);s(),C(" ",t.defaultAbsenceSelectionMessage," ")}}function xt(e,i){if(e&1){let t=U();c(0,"div",6),w("click",function(o){R(t);let a=De(3),x=m(3);return F(x.onRowClick(o,a))}),c(1,"div",7)(2,"input",8,0),l(4,"async"),w("change",function(o){R(t);let a=m(3);return F(a.toggleAll(o.target==null?null:o.target.checked))}),p()(),c(5,"div",9),u(6),l(7,"translate"),p(),c(8,"div",10)(9,"a",11),l(10,"async"),c(11,"i",12),u(12,"edit"),p()(),g(13,gt,1,2,"bkd-reports-link",13)(14,bt,4,4,"a",14),p(),g(15,_t,2,1,"div",15),l(16,"async"),p()}if(e&2){let t,n,o=m(3);s(2),L("checked",d(4,8,o.allSelected$)),s(4),E(d(7,10,"open-absences.detail.all")),s(3),ge("disabled",((t=d(10,12,o.selectionService==null?null:o.selectionService.selection$))==null?null:t.length)===0),Te("routerLink",o.confirmLink),s(4),b(o.reports?13:-1),s(),b(o.displayEmail?14:-1),s(),b(o.defaultAbsenceSelectionMessage&&((n=d(16,14,o.selectionService==null?null:o.selectionService.selectedWithoutPresenceType$))!=null&&n.length)?15:-1)}}function Ct(e,i){if(e&1){let t=U();c(0,"div",7)(1,"input",8,1),l(3,"async"),w("change",function(){R(t);let o=m().$implicit,a=m(3);return F(a.selectionService==null?null:a.selectionService.toggle(o))}),p()()}if(e&2){let t=m().$implicit,n=m(3);s(),L("checked",d(3,1,n.selectionService==null?null:n.selectionService.isSelected$(t)))}}function Tt(e,i){if(e&1&&u(0),e&2){let t=m().$implicit;C(" , ",t.StudyClassNumber," ")}}function vt(e,i){if(e&1&&(c(0,"div",20),u(1),p()),e&2){m();let t=Le(12);s(),C(" ",t," ")}}function St(e,i){e&1&&(c(0,"div",21),u(1),l(2,"translate"),p()),e&2&&(s(),C(" ",d(2,1,"my-absences.show.confirm-presence-type")," "))}function It(e,i){if(e&1){let t=U();c(0,"div",16),w("click",function(o){let a=R(t).$index,x=m(3);return F(x.onRowClick(o,a))}),g(1,Ct,4,3,"div",7),l(2,"async"),c(3,"div",17),u(4),g(5,Tt,1,1),p(),c(6,"div",18),u(7),l(8,"date"),l(9,"date"),p(),c(10,"div",19),u(11),p(),Pe(12),l(13,"async"),g(14,vt,2,1,"div",20)(15,St,3,3,"div",21),c(16,"div",22),u(17),l(18,"date"),p(),c(19,"div",23),u(20),l(21,"bkdDaysDifference"),p(),c(22,"div",24),u(23),l(24,"date"),l(25,"bkdDaysDifference"),p()()}if(e&2){let t=i.$implicit,n=m(3);s(),b(d(2,12,n.editable$)?1:-1),s(3),C(" ",t.EventDesignation," "),s(),b(t.StudyClassNumber?5:-1),s(2),Z(" ",M(8,14,t.LessonDateTimeFrom,"HH:mm"),"\u2013",M(9,17,t.LessonDateTimeTo,"HH:mm")," "),s(4),C(" ",t.TeacherInformation," "),s();let o=ke(d(13,20,n.getPresenceTypeDesignation(t)));s(2),b(o?14:-1),s(),b(n.displayPresenceType&&!o&&n.defaultAbsenceSelectionMessage?15:-1),s(2),C(" ",M(18,23,t.LessonDateTimeFrom,"dd.MM.yyyy")," "),s(3),C(" ",d(21,26,t.LessonDateTimeFrom)," "),s(3),Z(" ",M(24,28,t.LessonDateTimeFrom,"dd.MM.yyyy"),", ",d(25,31,t.LessonDateTimeFrom)," ")}}function Dt(e,i){if(e&1&&(g(0,xt,17,16,"div",4),l(1,"async"),be(2,It,26,33,"div",5,yt),l(4,"async")),e&2){let t=m(2);b(d(1,1,t.editable$)?0:-1),s(2),_e(d(4,3,t.lessonPresences$))}}function Pt(e,i){e&1&&(c(0,"p",3),u(1),l(2,"translate"),p()),e&2&&(s(),E(d(2,1,"shared.profile.no-absences")))}function kt(e,i){if(e&1&&(g(0,Dt,5,5),l(1,"async"),g(2,Pt,3,3,"p",3)),e&2){let t,n=m();b(((t=(t=d(1,1,n.lessonPresences$))==null?null:t.length)!==null&&t!==void 0?t:0)>0?0:2)}}var Ci=(()=>{class e{constructor(){this.presenceTypesService=f(ze),this.selectionService=null,this.displayPresenceType=!0,this.defaultAbsenceSelectionMessage=null,this.reports=null,this.confirmLink="confirm",this.displayEmail=!1,this.checkboxes=ye("checkbox"),this.lessonPresences$$=new A(1),this.lessonPresences$=this.lessonPresences$$.pipe(de(),I(null),h(1)),this.loading$=this.lessonPresences$.pipe(r(Be(nt))),this.selectionService$=new A(1),this.editable$=this.selectionService$.pipe(r(()=>!0),I(!1)),this.displayPresenceType$=new re(!0),this.allSelected$=ae([this.lessonPresences$.pipe(le(Oe)),this.selectionService$.pipe(X(t=>t.selection$))]).pipe(r(([t,n])=>t.length===n.length))}ngOnChanges(t){t.absences$&&this.lessonPresences$$.next(t.absences$.currentValue),t.selectionService&&t.selectionService.currentValue&&(t.selectionService.currentValue.clear(),this.selectionService$.next(t.selectionService.currentValue)),t.displayPresenceType&&this.displayPresenceType$.next(t.displayPresenceType.currentValue)}toggleAll(t){t?this.lessonPresences$.pipe($(1)).subscribe(n=>this.selectionService?.clear(n)):this.selectionService?.clear()}onRowClick(t,n){let o=this.checkboxes();if(o.length===0)return;let a;typeof n=="number"?a=o[n].nativeElement:a=n,t.target!==a&&!t.target.closest(".buttons")&&a.click()}getPresenceTypeDesignation(t){return this.displayPresenceType$.pipe(X(n=>n?this.presenceTypesService.displayedTypes$:se([])),r(n=>t.TypeRef.Id&&n.find(o=>o.Id===t.TypeRef.Id)?.Designation||null))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=j({type:e,selectors:[["bkd-student-dossier-absences"]],viewQuery:function(n,o){n&1&&Se(o.checkboxes,ft,5),n&2&&Ie()},inputs:{absences$:"absences$",selectionService:"selectionService",displayPresenceType:"displayPresenceType",defaultAbsenceSelectionMessage:"defaultAbsenceSelectionMessage",reports:"reports",confirmLink:"confirmLink",displayEmail:"displayEmail",mailTo$:"mailTo$"},features:[ue],decls:3,vars:3,consts:[["allCheckbox",""],["checkbox",""],[1,"inline","d-block","mb-3"],[1,"mx-3"],[1,"absence-all"],[1,"absence-entry"],[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"],[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"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"presence-type","confirm"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(n,o){n&1&&(g(0,ht,1,0,"bkd-spinner",2),l(1,"async"),g(2,kt,3,3)),n&2&&b(d(1,1,o.loading$)?0:2)},dependencies:[H,He,Ge,Ae,$e,q,tt],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})}}return e})();var Lt=["*"],Ii=(()=>{class e{constructor(){this.link=[]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=j({type:e,selectors:[["bkd-backlink"]],inputs:{link:"link",params:"params"},ngContentSelectors:Lt,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(n,o){n&1&&(xe(),c(0,"div",0)(1,"a",1)(2,"span",2),u(3,"arrow_back"),p(),c(4,"span",3),u(5),l(6,"translate"),p()(),Ce(7),p()),n&2&&(s(),L("routerLink",o.link)("queryParams",o.params),s(4),E(d(6,3,"global.back")))},dependencies:[H,q],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}"]})}}return e})();export{qe as a,Mt as b,Ke as c,Bt as d,Nt as e,ze as f,Xe as g,mn as h,ot as i,rt as j,K as k,Je as l,rn as m,y as n,st as o,W as p,_n as q,xn as r,lt as s,Ye as t,Q as u,kn as v,Ln as w,An as x,$n as y,Ze as z,On as A,Bn as B,Nn as C,Xn as D,tt as E,oi as F,Ci as G,Ii as H}; diff --git a/public/apps/webapp-schulverwaltung/chunk-NK7SMC5C.js b/public/apps/webapp-schulverwaltung/chunk-LQUABKN6.js similarity index 89% rename from public/apps/webapp-schulverwaltung/chunk-NK7SMC5C.js rename to public/apps/webapp-schulverwaltung/chunk-LQUABKN6.js index 10466803..2428ac33 100644 --- a/public/apps/webapp-schulverwaltung/chunk-NK7SMC5C.js +++ b/public/apps/webapp-schulverwaltung/chunk-LQUABKN6.js @@ -1 +1 @@ -import{$a as r,Ed as k,Fa as b,Ga as f,Na as h,Pa as v,Qa as _,Ra as g,Va as C,_a as a,ea as d,eb as x,fa as m,gb as s,hb as y,qa as o,rb as p,ya as u}from"./chunk-S3H6YSFW.js";function S(e,l){if(e&1){let n=x();a(0,"button",5),s("click",function(){d(n);let t=y();return m(t.value.set(""))}),a(1,"i",2),p(2,"clear"),r()()}}var z=(()=>{class e{constructor(){this.value=b(""),this.disabled=o(!1),this.placeholder=o(""),this.label=o("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=f({type:e,selectors:[["bkd-resettable-input"]],inputs:{value:[1,"value"],disabled:[1,"disabled"],placeholder:[1,"placeholder"],label:[1,"label"]},outputs:{value:"valueChange"},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,"input","value","disabled"],["type","button",1,"clear","btn","btn-link","text-decoration-none"],["type","button",1,"clear","btn","btn-link","text-decoration-none",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),p(3,"search"),r()(),a(4,"input",3),s("input",function(c){return t.value.set(c.target==null?null:c.target.value)}),r(),h(5,S,3,0,"button",4),r()),i&2&&(u(4),g("has-value",t.value()),_("value",t.value())("disabled",t.disabled()),v("placeholder",t.placeholder())("aria-label",t.label()),u(),C(t.value()?5:-1))},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}"]})}}return e})();function O(e,l,n){return n?e.filter(w(l,n)):e}function w(e,l){let n=E(l);return i=>e.some(t=>I(i[t],n))}function I(e,l){return e?E(String(e)).includes(l):!1}function E(e){return k(e.toLowerCase())}export{z as a,O as b}; +import{Ha as b,Ia as f,Id as k,Pa as h,Ra as v,Sa as _,Ta as g,Xa as C,ab as a,bb as r,ea as d,fa as m,gb as x,ib as s,jb as y,qa as o,vb as p,ya as u}from"./chunk-NEW5VGRB.js";function S(e,l){if(e&1){let n=x();a(0,"button",5),s("click",function(){d(n);let t=y();return m(t.value.set(""))}),a(1,"i",2),p(2,"clear"),r()()}}var z=(()=>{class e{constructor(){this.value=b(""),this.disabled=o(!1),this.placeholder=o(""),this.label=o("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=f({type:e,selectors:[["bkd-resettable-input"]],inputs:{value:[1,"value"],disabled:[1,"disabled"],placeholder:[1,"placeholder"],label:[1,"label"]},outputs:{value:"valueChange"},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,"input","value","disabled"],["type","button",1,"clear","btn","btn-link","text-decoration-none"],["type","button",1,"clear","btn","btn-link","text-decoration-none",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),p(3,"search"),r()(),a(4,"input",3),s("input",function(c){return t.value.set(c.target==null?null:c.target.value)}),r(),h(5,S,3,0,"button",4),r()),i&2&&(u(4),g("has-value",t.value()),_("value",t.value())("disabled",t.disabled()),v("placeholder",t.placeholder())("aria-label",t.label()),u(),C(t.value()?5:-1))},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}"]})}}return e})();function O(e,l,n){return n?e.filter(w(l,n)):e}function w(e,l){let n=E(l);return i=>e.some(t=>I(i[t],n))}function I(e,l){return e?E(String(e)).includes(l):!1}function E(e){return k(e.toLowerCase())}export{z as a,O as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-LY5STZD6.js b/public/apps/webapp-schulverwaltung/chunk-LY5STZD6.js deleted file mode 100644 index 960564de..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-LY5STZD6.js +++ /dev/null @@ -1,3 +0,0 @@ -import{a as _e}from"./chunk-Y4QYVF5K.js";import{a as Te}from"./chunk-XKNLLORS.js";import{b as Ge,c as we,d as Ee}from"./chunk-UN6AN2DI.js";import{e as Mt,o as Ot}from"./chunk-A7CCEKNQ.js";import{j as De}from"./chunk-2AZMKO7X.js";import{a as st}from"./chunk-HLAFRD2O.js";import{D as Ct,c as Ie,d as Se,e as be,f as ve,g as Ce,r as xe,s as ye,x as vt}from"./chunk-QTBTUQ3W.js";import{$a as d,$c as W,Ab as pt,Bb as ct,Bd as St,Cb as U,Cd as he,D as wt,Eb as Yt,Fb as ft,Ga as P,H as zt,Ic as h,Ja as Z,Jb as c,Jc as o,K as Xt,Kb as f,Kc as j,Lb as L,M as Dt,Mb as Qt,Md as K,Na as T,Nc as w,Nd as N,Ob as Zt,Oc as b,P as v,Pc as ht,Pd as bt,Qa as G,Qd as M,R as Et,Ra as Pt,Rc as $t,Va as _,Vc as u,X as R,Xc as re,Ya as tt,Za as et,Zb as te,_ as x,_a as l,a as O,ab as it,ac as ee,b as F,bd as se,c as Lt,cc as k,da as H,dc as ie,dd as q,ea as Y,eb as nt,ec as ne,f as ut,fa as Q,g as A,gb as V,gd as ae,h as ot,hb as S,id as Rt,jd as It,kb as gt,l as Gt,m as Wt,ma as Jt,mc as rt,md as oe,n as m,nd as de,o as dt,pd as le,qb as lt,rb as p,rd as pe,s as mt,sb as $,tb as C,ud as ce,vd as ue,w as qt,wd as me,x as Kt,xd as ge,ya as a,yd as fe,za as E}from"./chunk-S3H6YSFW.js";var ai=(e,r)=>r.Key,oi=e=>({width:e});function di(e,r){if(e&1&&(l(0,"option",1),p(1),c(2,"translate"),d()),e&2){let t=S();G("ngValue",null),a(),C(" ",f(2,2,t.emptyLabel)," ")}}function li(e,r){if(e&1&&(l(0,"option",1),p(1),d()),e&2){let t=r.$implicit;G("ngValue",t),a(),C(" ",t.Value," ")}}var Pe=(()=>{class e{constructor(){this.options=[],this.allowEmpty=!0,this.emptyLabel="",this.value=null,this.disabled=!1,this.tabindex=0,this.width="auto",this.valueChange=new Jt,this.options$=new A([]),this.rawValue$=new A(null),this.value$=dt([this.rawValue$,this.options$]).pipe(m(([t,i])=>i&&i.find(n=>n.Key===t)||null))}ngOnChanges(t){t.value&&this.rawValue$.next(t.value.currentValue),t.options&&this.options$.next(t.options.currentValue)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-select"]],inputs:{options:"options",allowEmpty:"allowEmpty",emptyLabel:"emptyLabel",value:"value",disabled:"disabled",tabindex:"tabindex",width:"width"},outputs:{valueChange:"valueChange"},features:[H],decls:6,vars:9,consts:[[1,"form-select",3,"ngModelChange","tabindex","ngStyle","disabled","ngModel"],[3,"ngValue"]],template:function(i,n){i&1&&(l(0,"select",0),c(1,"async"),V("ngModelChange",function(y){return n.valueChange.emit(y&&y.Key)}),T(2,di,3,4,"option",1),tt(3,li,2,2,"option",1,ai),p(5,` > -`),d()),i&2&&(gt("tabindex",n.tabindex),G("ngStyle",ft(7,oi,n.width))("disabled",n.disabled)("ngModel",f(1,5,n.value$)),a(2),_(n.allowEmpty?2:-1),a(),et(n.options))},dependencies:[St,ue,me,ce,It,de,k,ee,M],encapsulation:2,changeDetection:0})}}return e})();var $e=b({Id:o,Designation:h,StudentCount:o,Number:h});var Ft=b({Id:h,TestId:o,CourseRegistrationId:o,GradeId:u(o),GradeValue:u(o),GradeDesignation:u(h),Points:u(o),StudentId:o});var Re=b({Id:o,CourseId:o,Date:W,Designation:h,Weight:o,WeightPercent:o,IsPointGrading:j,MaxPoints:u(o),MaxPointsAdjusted:u(o),IsPublished:j,IsOwner:j,Owner:u(h),GradingScaleId:u(o),Results:u(w(Ft))});var Me=b({Id:o}),Oe=ht({HRef:u(h)}),pi=ht({HasEvaluationStarted:j,EvaluationUntil:u(W),HasReviewOfEvaluationStarted:j,HasTestGrading:j,Id:o}),ci=$t([Me,Oe,pi]),ui=ht({Id:o,StudentCount:o}),mi=$t([Me,Oe,ui]),gi=b({Grade:h,AverageTestResult:o,Id:o,StudentId:o}),jt=b({AverageTestResult:o,CanGrade:j,EventId:o,GradeId:u(o),GradeValue:u(o),Id:o,StudentId:o}),z=b({HRef:h,Id:o,Number:h,Designation:h,DateFrom:u(W),DateTo:u(W),StatusId:o,GradingScaleId:u(o),FinalGrades:u(w(gi)),Gradings:u(w(jt)),Tests:u(w(Re)),EvaluationStatusRef:ci,AttendanceRef:mi,ParticipatingStudents:u(w(we)),Classes:u(w($e))}),Fe=b({TestResults:w(Ft),Gradings:w(jt)}),je=b({Gradings:w(jt)});var xt=(()=>{class e extends st{constructor(t,i){super(t,i,z,"Courses"),this.statusCodec=b(se(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(v(N(this.statusCodec)),m(t=>t.filter(i=>i.EvaluationStatusRef.HasEvaluationStarted===!0)),m(t=>t.length))}getExpandedCourses(t){return _e(t,"TeacherRole")?this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef,AttendanceRef,Classes,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(v(N(z))):Gt([])}getExpandedCourse(t){return this.http.get(`${this.baseUrl}/${t}?expand=ParticipatingStudents,EvaluationStatusRef,Tests,Gradings,FinalGrades,Classes`).pipe(v(K(z)))}getExpandedCourseWithParticipants(t){return this.http.get(`${this.baseUrl}/${t}?expand=ParticipatingStudents,Classes,AttendanceRef`).pipe(v(K(z)))}getExpandedCoursesForDossier(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades,EvaluationStatusRef,ParticipatingStudents,Classes&filter.StatusId=;${this.settings.eventlist.statusfilter}`).pipe(v(N(z)))}getExpandedCoursesForStudent(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"StudentRole"}}).pipe(v(N(z)))}add(t,i,n,s,y,B,g){let I={Tests:[{Date:Ot(Mt(i),"yyyy-MM-dd'T'HH:mm:ss"),Designation:n,Weight:s,IsPointGrading:y,MaxPoints:B,MaxPointsAdjusted:g}]};return this.http.put(`${this.baseUrl}/${t}/Tests/New`,I).pipe(m(()=>{}))}update(t,i,n,s,y,B,g,I){let J={Tests:[{Id:i,Designation:n,Date:Ot(Mt(s),"yyyy-MM-dd'T'HH:mm:ss"),Weight:y,IsPointGrading:B,MaxPoints:g,MaxPointsAdjusted:I}]};return this.http.put(`${this.baseUrl}/${t}/Tests/Update`,J).pipe(m(()=>{}))}delete(t,i){let n={TestIds:[i]};return this.http.put(`${this.baseUrl}/${t}/Tests/Delete`,n).pipe(m(()=>i))}updateTestResult(t,i){let I=i,{studentId:n,testId:s}=I,y=Lt(I,["studentId","testId"]),B={StudentIds:[n],TestId:s},g="gradeId"in y?F(O({},B),{GradeId:y.gradeId}):F(O({},B),{Points:y.points});return this.http.put(`${this.baseUrl}/${t}/SetTestResult`,g).pipe(v(K(Fe)),v(({TestResults:J,Gradings:Ut})=>J.length<=1&&Ut.length===1?Gt({courseId:t,testResult:J[0]??null,grading:Ut[0]}):Wt(()=>new Error("`TestResults` or `Gradings` does not contain a single value"))))}setAverageAsFinalGrade(t){return this.http.put(`${this.baseUrl}/SetAverageTestResult`,t).pipe(v(K(je)))}publishTest(t){let i={TestIds:[t]};return this.http.put(`${this.baseUrl}/PublishTest`,i).pipe(m(()=>t))}unpublishTest(t){let i={TestIds:[t]};return this.http.put(`${this.baseUrl}/UnpublishTest`,i).pipe(m(()=>t))}static{this.\u0275fac=function(i){return new(i||e)(x(rt),x(q))}}static{this.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ve=b({Id:h,SubscriptionId:o,VssId:o,EventId:o,DropdownItems:u(w(Te)),IdPerson:o,ShowAsRadioButtons:j,Value:u(h),VssDesignation:h,VssStyle:h,VssType:h}),Bt=b({Id:o,EventId:u(o),PersonId:u(o),Status:h,EventDesignation:u(h),RegistrationDate:u(W)});var ke=(()=>{class e extends st{constructor(t,i){super(t,i,Bt,"Subscriptions")}getSubscriptionIdsByStudentAndCourse(t,i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.PersonId":`=${t}`,"filter.EventId":`;${i}`}}).pipe(v(N(re)),m(n=>n.map(s=>s.Id)))}getSubscriptionCountsByEvents(t){return this.http.get(`${this.baseUrl}/`,{params:{"filter.EventId":`;${t.join(";")}`,fields:["Id","EventId"].join(",")}}).pipe(v(N(b({Id:o,EventId:o}))),m(i=>i.reduce((n,s)=>(n[s.EventId]=n[s.EventId]?n[s.EventId]+1:1,n),{})))}getSubscriptionsByCourse(t,i){return this.http.get(`${this.baseUrl}/`,{params:F(O({"filter.EventId":`=${t}`},i),{fields:["Id","EventId","EventDesignation","PersonId","Status","RegistrationDate"].join(",")})}).pipe(v(N(Bt)))}getSubscriptionDetailsById(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(v(N(Ve)))}static{this.\u0275fac=function(i){return new(i||e)(x(rt),x(q))}}static{this.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ne(e){return e.length===0?0:At(e.map(({value:r,weight:t})=>r*t))/At(e.map(({weight:r})=>r))}function Vt(e){return e.length===0?0:Number(At(e)/e.length)}function At(e){return e.reduce(hi,0)}function hi(e,r){return e+r}function jn(e,r,t){return e?e.Tests?.reduce((i,n)=>i||n.Id===r&&n.Results?.find(s=>s.TestId===r&&s.StudentId===t)||null,null)??null:null}function Bn(e,r,t){return r.map(i=>i.Id===e.TestId?Nt(e,i,t):i)}function An(e,r,t){return t.map(i=>i.Id===e?Ii(r,i):i)}function Vn(e,r){return r.map(t=>t.Id===e?F(O({},t),{IsPublished:!t.IsPublished}):t)}function kn(e){let r=bi(e);if(r.length===0)throw new Error("unable to calculate averages without results");return Vt(r)}function kt(e){return e.MaxPointsAdjusted||e.MaxPoints}function Nn(e){let r=Si(e);if(r.length===0)throw new Error("unable to calculate averages without results");return Vt(r)}function X(e,r){return r.Results?.find(t=>t.StudentId===e)}function Hn(e,r){return r===null?null:r.filter(t=>t.Id!==e)}function Nt(e,r,t){let i=t&&r.Results?.find(s=>s.TestId===e.TestId&&s.StudentId===e.StudentId),n=r.Results?.filter(s=>!(s.TestId===e.TestId&&s.StudentId===e.StudentId))||[];return i&&t==="grade"?e.GradeId=i.GradeId:i&&t==="points"&&(e.Points=i.Points),F(O({},r),{Results:[...n,e]})}function Ue(e){return e.slice().sort((r,t)=>t.Date.getTime()-r.Date.getTime())}function yt(e,r){return r?.find(t=>t.Id===e.GradingScaleId)||null}function Ii(e,r){return F(O({},r),{Results:r.Results?.filter(t=>t.StudentId!==e)||[]})}function Si(e){return e.Results?.filter(r=>r.GradeDesignation!==null).map(r=>Number(r.GradeDesignation)).filter(r=>!isNaN(r))||[]}function bi(e){return e.Results?.map(r=>r.Points!==null?r.Points:He).filter(r=>r>He)||[]}var He=-1;var vi=b({Id:o,Designation:h}),Ht=b({Id:o,Grades:w(vi)});var Le=(()=>{class e extends st{constructor(t,i){super(t,i,Ht,"GradingScales")}getGradingScale(t){return this.http.get(`${this.baseUrl}/${t}`).pipe(v(K(Ht)))}getGradingScales(t){return mt(t.map(this.getGradingScale.bind(this)))}static{this.\u0275fac=function(i){return new(i||e)(x(rt),x(q))}}static{this.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Tt=(()=>{class e{constructor(t,i,n,s,y,B){this.coursesRestService=t,this.subscriptionRestService=i,this.reportsService=n,this.loadingService=s,this.gradingScalesRestService=y,this.settings=B,this.studentId$=new ot(1),this.initialStudentCourses$=this.studentId$.pipe(zt(),v(this.loadCourses.bind(this)),m(g=>g.sort((I,J)=>I.Designation.localeCompare(J.Designation))),Dt(1)),this.action$=new ot(1),this.studentCourses$=qt(this.action$,this.initialStudentCourses$.pipe(m(g=>({type:"initializeCourses",payload:g})))).pipe(Xt(this.coursesReducer.bind(this),[]),Dt(1)),this.loading$=this.loadingService.loading$,this.studentCourseIds$=this.studentCourses$.pipe(m(g=>g.flatMap(I=>I.Id))),this.subscriptionIds$=dt([this.studentId$,this.studentCourseIds$]).pipe(v(([g,I])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(g,I))),this.testReports$=this.subscriptionIds$.pipe(m(g=>this.reportsService.getTeacherSubscriptionGradesReports(g))),this.tests$=this.studentCourses$.pipe(m(g=>g.flatMap(I=>I.Tests).filter(vt))),this.gradingScaleIdsFromTests$=this.tests$.pipe(m(g=>[...g.map(I=>I.GradingScaleId)].filter(vt).filter(Ct))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(m(g=>g.flatMap(I=>I.GradingScaleId).filter(vt).filter(Ct))),this.gradingScaleIds$=dt([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(m(([g,I])=>g.concat(I).filter(Ct))),this.gradingScales$=this.gradingScaleIds$.pipe(v(g=>mt(g.map(I=>this.gradingScalesRestService.getGradingScale(I)))))}setStudentId(t){this.studentId$.next(t)}getFinalGradeForStudent(t,i){return t?.FinalGrades?.find(n=>n.StudentId===i)}getGradingForStudent(t,i){return t?.Gradings?.find(n=>n.StudentId===i)}getGradingScaleOfCourse(t,i){return i?.find(n=>n.Id===t.GradingScaleId)}getGradesForStudent(t,i,n){return t.Tests?.flatMap(s=>({value:Number(yt(s,n)?.Grades.find(B=>B.Id===X(i,s)?.GradeId)?.Designation),weight:s.Weight})).filter(({value:s})=>!!s)||[]}updateStudentCourses(t){this.action$.next({type:"updateCourses",payload:t})}loadCourses(t){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForDossier().pipe(m(i=>i.filter(n=>n.ParticipatingStudents?.find(s=>s.Id===t)))))}coursesReducer(t,i){switch(i.type){case"initializeCourses":return i.payload;case"updateCourses":return this.updateCourses([...t],i.payload);default:return t}}updateCourses(t,i){return t.map(n=>F(O({},n),{Tests:n.Tests!==null?n.Tests.map(s=>s.Id===i.Id?i:s):null}))}static{this.\u0275fac=function(i){return new(i||e)(x(xt),x(ke),x(Ee),x(De),x(Le),x(q))}}static{this.\u0275prov=R({token:e,factory:e.\u0275fac})}}return e})();var qe=(()=>{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}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ke=(()=>{class e{constructor(t,i){this.modal=t,this.portal=i}open(...t){let i=this.modal.open(...t);return this.applyPortalOffsetAndMaxHeight(i),this.disablePortalScrolling(i),i}get activeInstances(){return this.modal.activeInstances}dismissAll(...t){return this.modal.dismissAll(...t)}hasOpenModals(...t){return this.modal.hasOpenModals(...t)}applyPortalOffsetAndMaxHeight(t){let i=this.getModalWindowElement(t);if(!i){console.warn("Trying to apply portal offset to , but element is not present!");return}this.portal.window&&(i.style.top=`${this.getModalIframeOffset()}px`,i.style.maxHeight=`${this.getModalHeight()}px`)}disablePortalScrolling(t){if(this.portal.window&&this.portal.document){let i=this.portal.window.innerWidth-this.portal.document.clientWidth;this.portal.document.style.paddingRight=`${i}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}static{this.\u0275fac=function(i){return new(i||e)(x(ye),x(qe))}}static{this.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function _t(e,r,t){return r?r.Grade:_i(e,t)||e?.GradeValue}function _i(e,r){return r?.Grades.find(t=>t.Id===e?.GradeId)?.Designation}var Gi="1-3",Xe="\u2013",Je=(()=>{class e{constructor(t){this.locale=t}transform(t,i,n){let s=Number(t??null);return isNaN(s)?Xe:wi(Number(t??null),n??this.locale,i)}static{this.\u0275fac=function(i){return new(i||e)(E(Zt,16))}}static{this.\u0275pipe=Z({name:"decimalOrDash",type:e,pure:!0})}}return e})();function wi(e,r,t){return e===0?Xe:te(e,r,`1.${Di(t)}`)}function Di(e){return e?String(e).includes("-")?String(e):`${e}-${e}`:Gi}var Ye=(()=>{class e{constructor(){}getGradeForStudent(){return _t(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-dossier-grades-final-grade"]],inputs:{finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:14,vars:11,consts:[[1,"final-entry"],["data-testid","final-grade"],["data-testid","average-test-results"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div"),p(2),c(3,"translate"),d(),l(4,"div",1)(5,"span"),p(6),d()(),l(7,"div"),p(8),c(9,"translate"),d(),l(10,"div",2)(11,"span"),p(12),c(13,"decimalOrDash"),d()()()),i&2&&(a(2),$(f(3,4,"dossier.grade")),a(4),$(n.getGradeForStudent()||"\u2013"),a(2),$(f(9,6,"dossier.average")),a(4),$(L(13,8,n.average,"1-3")))},dependencies:[M,Je],styles:[".final-entry[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:repeat(2,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}"]})}}return e})();var Qe=(()=>{class e{constructor(t){this.translate=t}transform(t,i,n,s="tests.points"){return t.IsPointGrading&&(t.IsPublished||n)?`${X(i,t)?.Points||"\u2013"} / ${t.MaxPointsAdjusted||t.MaxPoints} ${this.translate.instant(s)}`:""}static{this.\u0275fac=function(i){return new(i||e)(E(bt,16))}}static{this.\u0275pipe=Z({name:"bkdTestPoints",type:e,pure:!0})}}return e})();var Ze=(()=>{class e{constructor(t){this.translate=t}transform(t){return`${this.translate.instant("tests.factor")} ${t.Weight} (${t.WeightPercent}%)`}static{this.\u0275fac=function(i){return new(i||e)(E(bt,16))}}static{this.\u0275pipe=Z({name:"bkdTestWeight",type:e,pure:!0})}}return e})();var Pi=e=>({maxPoints:e});function $i(e,r){if(e&1&&(l(0,"div",13),p(1),c(2,"translate"),d()),e&2){let t=S(2);a(),C(" ",L(2,1,"global.validation-errors.invalidPoints",ft(4,Pi,t.maxPoints))," ")}}function Ri(e,r){if(e&1){let t=nt();l(0,"div",3)(1,"label",11),p(2),c(3,"translate"),d(),l(4,"div",6)(5,"input",12,0),V("input",function(){Y(t);let n=lt(6),s=S();return Q(s.onPointsChange(n.value))}),d()(),T(7,$i,3,6,"div",13),d()}if(e&2){let t=S();a(2),$(f(3,8,"dossier.dialog.points")),a(2),Pt("is-invalid",t.pointsInput.errors),a(),Pt("is-invalid",t.pointsInput.errors),gt("max",t.maxPoints),G("formControl",t.pointsInput),a(2),_(t.pointsInput.errors?7:-1)}}var ti=500,ei=(()=>{class e{constructor(t,i){this.activeModal=t,this.courseService=i,this.maxPoints=0,this.gradeSubject$=new ut,this.pointsSubject$=new ut,this.closeButtonDisabled$=new A(!1),this.gradingScaleDisabled$=new A(!0),this.grade$=this.gradeSubject$.pipe(wt(ti)),this.points$=this.pointsSubject$.pipe(wt(ti),Kt(this.isValid.bind(this)),m(Number)),this.destroy$=new ut}ngOnInit(){this.maxPoints=kt(this.test),this.pointsInput=new oe({value:this.points,disabled:!1},[Rt.min(0),Rt.pattern("[0-9]+([\\.][0-9]+)?"),this.maxPointValidator()]),this.gradingScaleDisabled$.next(this.test.IsPointGrading&&this.points>0),this.points$.pipe(Et(this.destroy$)).subscribe(t=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,points:t})),this.grade$.pipe(Et(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:i})=>{this.gradeId=i?.GradeId??null,this.updatedTestResult=i,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)>kt(this.test)?{customMax:!0}:null}static{this.\u0275fac=function(i){return new(i||e)(E(xe),E(xt))}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-dossier-grades-edit"]],inputs:{test:"test",gradeId:"gradeId",gradeOptions:"gradeOptions",points:"points",studentId:"studentId"},decls:19,vars:20,consts:[["pointInput",""],[1,"modal-body"],[1,"mb-4"],[1,"form-group","row"],[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"],["for","points",1,"col-6","col-form-label"],["id","points","type","number","step","0.01","min","0",1,"form-control",3,"input","max","formControl"],["data-testid","validation-error-message",1,"invalid-feedback","col-6","offset-6"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"p",2),p(2),d(),T(3,Ri,8,10,"div",3),l(4,"div",4)(5,"label",5),p(6),c(7,"translate"),d(),l(8,"div",6)(9,"bkd-select",7),c(10,"async"),V("valueChange",function(y){return y&&n.onGradeChange(y)}),d()()(),l(11,"p",8),p(12),c(13,"translate"),d()(),l(14,"div",9)(15,"button",10),c(16,"async"),V("click",function(){return n.activeModal.close(n.updatedTestResult)}),p(17),c(18,"translate"),d()()),i&2&&(a(2),$(n.test.Designation),a(),_(n.test.IsPointGrading?3:-1),a(3),$(f(7,10,"dossier.dialog.grade")),a(3),G("options",n.gradeOptions)("value",n.gradeId)("allowEmpty",!1)("disabled",f(10,12,n.gradingScaleDisabled$)),a(3),C(" ",f(13,14,n.test.IsPointGrading?"dossier.dialog.hint.points":"dossier.dialog.hint.grade")," "),a(3),G("disabled",f(16,16,n.closeButtonDisabled$)),a(2),C(" ",f(18,18,"dossier.dialog.close")," "))},dependencies:[St,ae,le,It,fe,ge,he,pe,Pe,k,M],encapsulation:2})}}return e})();function Mi(e,r){if(e&1){let t=nt();l(0,"a",10),V("click",function(){Y(t);let n=S(2),s=U(0);return Q(n.editGrading(s))}),l(1,"i",11),p(2,"edit"),d(),l(3,"span",5),p(4),d()()}if(e&2){S(2);let t=U(2);a(4),$(t)}}function Oi(e,r){if(e&1&&(l(0,"span",5),p(1),d()),e&2){S(2);let t=U(2);a(),$(t)}}function Fi(e,r){if(e&1&&(l(0,"div",9),p(1),c(2,"translate"),d()),e&2){S(2);let t=U(0);a(),C(" ",f(2,1,t.IsPublished?"tests.published":"tests.not-published")," ")}}function ji(e,r){if(e&1&&(l(0,"div",0)(1,"div",1),p(2),d(),l(3,"div",2),p(4),c(5,"date"),d(),l(6,"div",3),T(7,Mi,5,1,"a",4)(8,Oi,2,1,"span",5),d(),l(9,"div",6),p(10),c(11,"bkdTestWeight"),d(),l(12,"div",7)(13,"span"),p(14),c(15,"bkdTestPoints"),d()(),l(16,"div",8),p(17),d(),T(18,Fi,3,3,"div",9),d()),e&2){let t=S(),i=U(0);a(2),C(" ",i.Designation," "),a(2),C(" ",L(5,7,i.Date,"dd.MM.yyyy")," "),a(3),_(t.isEditable&&i.IsOwner?7:8),a(3),C(" ",f(11,10,i)," "),a(4),$(Qt(15,12,i,t.studentId,t.isEditable,"dossier.points")),a(3),C(" ",i.Owner," "),a(),_(t.isEditable?18:-1)}}var ii=(()=>{class e{constructor(t,i){this.gradeService=t,this.modalService=i,this.test$=new ot(1),this.grading$=this.test$.pipe(m(this.getGrading.bind(this)))}ngOnChanges(t){t.test&&this.test$.next(this.test)}editGrading(t){let i=this.modalService.open(ei,{backdrop:"static"});i.componentInstance.test=t,i.componentInstance.gradeId=this.getGradeId(t),i.componentInstance.gradeOptions=e.mapToOptions(this.gradingScale),i.componentInstance.studentId=this.studentId,i.componentInstance.points=this.getPoints(t),i.result.then(n=>{n&&this.updateStudentGrade(n,t)},()=>{})}updateStudentGrade(t,i){let n=Nt(t,i);this.gradeService.updateStudentCourses(n)}getGrading(t){return this.gradingScale?.Grades.find(i=>i.Id===this.getGradeId(t))?.Designation||"\u2013"}getGradeId(t){return X(this.studentId,t)?.GradeId||null}getPoints(t){return X(this.studentId,t)?.Points||null}static mapToOptions(t){return t?.Grades.map(i=>({Key:i.Id,Value:i.Designation}))||null}static{this.\u0275fac=function(i){return new(i||e)(E(Tt),E(Ke))}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-dossier-single-test"]],inputs:{test:"test",studentId:"studentId",gradingScale:"gradingScale",isEditable:"isEditable"},features:[H],decls:5,vars:7,consts:[[1,"test-entry"],["data-testid","test-designation",1,"designation"],["data-testid","test-date",1,"date"],[1,"grade"],["aria-label","edit grade",1,"btn","btn-link"],["data-testid","test-grade"],["data-testid","test-factor",1,"factor"],["data-testid","test-points",1,"points"],["data-testid","test-teacher",1,"teacher"],["data-testid","test-status",1,"state"],["aria-label","edit grade",1,"btn","btn-link",3,"click"],["data-testid","test-grade-edit-icon",1,"material-icons"]],template:function(i,n){if(i&1&&(pt(0),c(1,"async"),pt(2),c(3,"async"),T(4,ji,19,17,"div",0)),i&2){let s=ct(f(1,1,n.test$));a(2),ct(f(3,4,n.grading$)),a(2),_(s?4:-1)}},dependencies:[k,ie,M,Qe,Ze],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)}}']})}}return e})();var Bi=(e,r)=>r.Id,Ai=()=>[];function Vi(e,r){if(e&1&&it(0,"bkd-dossier-single-test",2),e&2){let t=r.$implicit,i=S(2);G("test",t)("studentId",i.studentId)("gradingScale",i.getGradingScaleOfTest(t))("isEditable",i.isEditable)}}function ki(e,r){if(e&1&&(l(0,"div"),it(1,"bkd-dossier-grades-final-grade",1),tt(2,Vi,1,4,"bkd-dossier-single-test",2,Bi),d()),e&2){let t=S(),i=U(0);a(),G("finalGrade",t.decoratedCourse.finalGrade)("grading",t.decoratedCourse.grading)("gradingScale",t.decoratedCourse.gradingScale)("average",t.decoratedCourse.average),a(),et(i)}}function Ni(e,r){e&1&&(l(0,"p",0),p(1),c(2,"translate"),d()),e&2&&(a(),C(" ",f(2,1,"dossier.no-tests")," "))}var ni=(()=>{class e{ngOnChanges(t){t.decoratedCourse&&this.sortedTests$.next(this.sortedTests())}constructor(){this.sortedTests$=new A([])}sortedTests(){return this.decoratedCourse.course.Tests?Ue(this.decoratedCourse.course.Tests):[]}getGradingScaleOfTest(t){return yt(t,this.gradingScales)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-dossier-course-tests"]],inputs:{studentId:"studentId",decoratedCourse:"decoratedCourse",gradingScales:"gradingScales",isEditable:"isEditable"},features:[H],decls:4,vars:5,consts:[["data-testid","message-no-tests",1,"p-3"],[3,"finalGrade","grading","gradingScale","average"],[3,"test","studentId","gradingScale","isEditable"]],template:function(i,n){if(i&1&&(pt(0),c(1,"async"),T(2,ki,4,4,"div")(3,Ni,3,3,"p",0)),i&2){let s,y=ct((s=f(1,1,n.sortedTests$))!==null&&s!==void 0?s:Yt(4,Ai));a(2),_(y.length>0?2:3)}},dependencies:[Ye,ii,k,M],encapsulation:2})}}return e})();function Hi(e,r){if(e&1&&(l(0,"span",0),p(1),d()),e&2){let t=S();a(),C(" (",t.grade,")")}}function Ui(e,r){if(e&1&&(l(0,"span",1),p(1),c(2,"number"),d()),e&2){let t=S();a(),C(" (",L(2,1,t.average,"1.1-3"),")")}}var ri=(()=>{class e{constructor(){}get grade(){return this.getGradeForStudent()}getGradeForStudent(){return _t(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-dossier-grades-course-header"]],inputs:{designation:"designation",finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:3,vars:3,consts:[["data-testId","grade",1,"grade"],["data-testId","average",1,"average"]],template:function(i,n){i&1&&(p(0),T(1,Hi,2,1,"span",0)(2,Ui,3,4,"span",1)),i&2&&(C("",n.designation,` -`),a(),_(n.grade?1:-1),a(),_(!n.grade&&n.average?2:-1))},dependencies:[ne],styles:[".average[_ngcontent-%COMP%]{color:#00000080}"]})}}return e})();var Li=(e,r)=>r.course.Id;function Wi(e,r){if(e&1&&it(0,"bkd-dossier-course-tests",9),e&2){let t=S().$implicit,i=S(2);G("decoratedCourse",t)("studentId",i.studentId)("gradingScales",i.gradingScales)("isEditable",i.isEditable)}}function qi(e,r){if(e&1){let t=nt();l(0,"div")(1,"div",2)(2,"div",3,0)(4,"div",4)(5,"bkd-student-dossier-entry-header",5),V("click",function(){Y(t);let n=lt(3);return Q(n.toggle())}),it(6,"bkd-dossier-grades-course-header",6),d()(),l(7,"div",7)(8,"div",8),T(9,Wi,1,4,"ng-template"),d()()()()()}if(e&2){let t=r.$implicit,i=lt(3);a(5),G("opened",!i.collapsed),a(),G("designation",t.course.Designation)("finalGrade",t.finalGrade)("grading",t.grading)("gradingScale",t.gradingScale)("average",t.average)}}function Ki(e,r){if(e&1&&(tt(0,qi,10,6,"div",null,Li),c(2,"async")),e&2){let t=S();et(f(2,0,t.decoratedCoursesSubject$))}}function zi(e,r){e&1&&(l(0,"p",1),p(1),c(2,"translate"),d()),e&2&&(a(),C(" ",f(2,1,"dossier.no-courses")," "))}var Xr=(()=>{class e{constructor(t){this.dossierGradesService=t,this.isEditable=!0,this.decoratedCoursesSubject$=new A([])}ngOnChanges(){this.decoratedCoursesSubject$.next(this.decorateCourses())}decorateCourses(){return this.courses.map(t=>{let i=this.dossierGradesService.getFinalGradeForStudent(t,this.studentId),n=this.dossierGradesService.getGradesForStudent(t,this.studentId,this.gradingScales);return{course:t,finalGrade:i,grading:this.dossierGradesService.getGradingForStudent(t,this.studentId),gradingScale:this.dossierGradesService.getGradingScaleOfCourse(t,this.gradingScales),average:i?.AverageTestResult||Ne(n)}})}static{this.\u0275fac=function(i){return new(i||e)(E(Tt))}}static{this.\u0275cmp=P({type:e,selectors:[["bkd-dossier-grades-view"]],inputs:{courses:"courses",studentId:"studentId",gradingScales:"gradingScales",isEditable:"isEditable"},features:[H],decls:2,vars:1,consts:[["courses","ngbAccordionItem"],["data-testid","message-no-courses",1,"py-3"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[3,"designation","finalGrade","grading","gradingScale","average"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"decoratedCourse","studentId","gradingScales","isEditable"]],template:function(i,n){i&1&&T(0,Ki,3,2)(1,zi,3,3,"p",1),i&2&&_(n.courses.length>0?0:1)},dependencies:[Ce,ve,be,Ge,ri,Se,Ie,ni,k,M],encapsulation:2})}}return e})();export{Vt as a,jn as b,Bn as c,An as d,Vn as e,kn as f,Nn as g,Hn as h,Ue as i,Xe as j,Je as k,wi as l,Pe as m,$e as n,jt as o,xt as p,Ve as q,ke as r,Le as s,Tt as t,qe as u,Ke as v,Xr as w}; diff --git a/public/apps/webapp-schulverwaltung/chunk-LZEJSWWW.js b/public/apps/webapp-schulverwaltung/chunk-LZEJSWWW.js deleted file mode 100644 index c4fc2476..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-LZEJSWWW.js +++ /dev/null @@ -1 +0,0 @@ -import{c as N}from"./chunk-UN6AN2DI.js";import{b as F}from"./chunk-M5HHSMYB.js";import{a as j}from"./chunk-HLAFRD2O.js";import{$c as m,Ic as r,Ja as S,Jc as n,Kc as v,Md as D,Nd as c,Oc as s,P as a,Pc as L,Rc as E,Vc as i,Wc as l,X as R,Yc as p,_ as I,a as b,bd as $,dd as x,ic as A,mc as T,n as y,za as C}from"./chunk-S3H6YSFW.js";var z=(()=>{class o{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}}static{this.\u0275fac=function(e){return new(e||o)(C(F,16))}}static{this.\u0275pipe=S({name:"addSpace",type:o,pure:!0})}}return o})();var H=s({Id:n,JobTrainer:i(n),ApprenticeshipManagerId:n,ContractDateFrom:i(m),ContractDateTo:i(m)}),X=s({Id:n,StudentId:n,CompanyName:l(r),CompanyNameAddition:l(r)});var k=s({Id:n,RepresentativeId:n,RepresentativeAfterMajority:v});var B=s({Id:n}),G=L({HRef:i(r)}),J=L({From:m,To:m,EventNumber:r,EventDesignation:r,Designation:i(r)}),P=E([B,G,J]),M=s({Id:r,LessonRef:P,StudentRef:p,TypeRef:p,Type:i(r),ConfirmationState:i(r),ConfirmationStateId:n,Comment:i(r),StudentFullName:r,RegistrationId:n,HRef:r});var U=s({Id:r,LessonRef:p,StudentRef:p,TypeRef:p,Type:i(r),Comment:i(r),StudentFullName:r,HRef:r});var w=s({LessonRef:p,StudentRef:p,TypeRef:p,Comment:i(r),StudentFullName:r,Type:i(r),RegistrationId:n,HRef:r});var O=s({Id:n,From:m,To:m,EventId:n,EventNumber:r,EventDesignation:r,EventLocation:i(r),EventManagerInformation:l(r)});var u=class extends j{constructor(f,t,e,h,d,K="Id"){super(f,t,e,h),this.labelAttr=d,this.keyAttr=K,this.typeaheadCodec=s($(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(f,t){let e={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${f}*`}};return this.http.get(`${this.baseUrl}/`,t?this.mergeHttpParams(e,t):e).pipe(a(c(this.typeaheadCodec)),y(h=>h.map(d=>({Key:d[this.keyAttr],Value:d[this.labelAttr]}))))}getTypeaheadItemByKey(f){return this.http.get(`${this.baseUrl}/${f}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(a(D(this.typeaheadCodec)),y(t=>({Key:t[this.keyAttr],Value:t[this.labelAttr]})))}mergeHttpParams(f,t){let e={params:b(b({},f.params),t.params)};return t.params.fields&&(e.params.fields=f.params.fields.concat(",",t.params.fields)),e}};var vt=(()=>{class o extends u{constructor(t,e){super(t,e,N,"Students","FullName")}getLegalRepresentatives(t,e){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:e}).pipe(a(c(k)))}getCurrentApprenticeshipContracts(t,e){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,e).pipe(a(c(H)))}getLessonAbsences(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:e}).pipe(a(c(M)))}getLessonIncidents(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:e}).pipe(a(c(w)))}getLessonDispensations(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:e}).pipe(a(c(U)))}getTimetableEntries(t,e={}){return e instanceof A||(e=new A({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(a(c(O)))}static{this.\u0275fac=function(e){return new(e||o)(I(T),I(x))}}static{this.\u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{H as a,X as b,M as c,O as d,u as e,vt as f,z as g}; diff --git a/public/apps/webapp-schulverwaltung/chunk-M5HHSMYB.js b/public/apps/webapp-schulverwaltung/chunk-M5HHSMYB.js deleted file mode 100644 index a0122683..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-M5HHSMYB.js +++ /dev/null @@ -1 +0,0 @@ -import{Ob as s,Pd as g,Sd as u,X as o,_ as r}from"./chunk-S3H6YSFW.js";var i=["de-CH","fr-CH"],n=i[0];function f(){return[{provide:s,useFactory:t=>t.detectLanguage(),deps:[c]}]}var c=(()=>{class t{constructor(e,a){this.translate=e,this.storage=a}initialize(){this.translate.setDefaultLang(n),this.translate.use(this.detectLanguage())}detectLanguage(){return this.detectedLanguage||(this.detectedLanguage=this.getDocumentLanguage()||this.getStoredLanguage()||this.getBrowserLanguage()||n),this.detectedLanguage}getLocalizedLanguage(e){return e=i.find(a=>a===`${(e||"").toLowerCase()}-CH`),e||n}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&&i.find(a=>e===a.split("-")[0])||null}static{this.\u0275fac=function(a){return new(a||t)(r(g),r(u))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{f as a,c as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-MJ4YAPVT.js b/public/apps/webapp-schulverwaltung/chunk-MJ4YAPVT.js deleted file mode 100644 index d9f65a03..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-MJ4YAPVT.js +++ /dev/null @@ -1,2 +0,0 @@ -import{a as Li}from"./chunk-SWPDWQYJ.js";import{a as Pi,b as Ni,c as Mi}from"./chunk-T2GDLGV4.js";import{a as Bi}from"./chunk-PU3XKQPJ.js";import{a as wi}from"./chunk-TO3HOIOR.js";import{a as xi}from"./chunk-DQSLVCJO.js";import"./chunk-AXC265QM.js";import"./chunk-LY5STZD6.js";import"./chunk-RC3KCROY.js";import{a as ui,b as mi,e as vi}from"./chunk-TMXWSOGF.js";import{a as He}from"./chunk-UPTESATB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import{a as Vi}from"./chunk-QPVGZCED.js";import{a as ki}from"./chunk-KV3V2W4Q.js";import{a as Ai,b as Fi,c as Di}from"./chunk-3PSL2UAK.js";import{e as Ti,f as Si}from"./chunk-LZEJSWWW.js";import"./chunk-UN6AN2DI.js";import{a as yi}from"./chunk-CXJU4L5R.js";import"./chunk-M5HHSMYB.js";import{a as Oi}from"./chunk-EJNJ2ZNZ.js";import{A as lt,B as Ae,C as We,D as bi,d as fi,e as rt,u as _i,v as at,y as gi,z as ot}from"./chunk-W6XALPR5.js";import{a as je,c as st,d as Ci}from"./chunk-XBIMNMBY.js";import{e as hi}from"./chunk-A7CCEKNQ.js";import{j as Ii}from"./chunk-2AZMKO7X.js";import{b as Ei}from"./chunk-HLAFRD2O.js";import{B as pi,h as ri,i as ai,l as oi,z as we}from"./chunk-QTBTUQ3W.js";import{a as ci}from"./chunk-HVJBOTRL.js";import{$a as c,$b as Mt,A as gt,Ab as oe,Ac as Wt,Ad as ni,Ba as y,Bb as le,Bd as Re,Cb as Y,Cd as si,D as bt,Da as wt,Db as pe,Eb as Dt,F as ie,Fb as X,Ga as G,Gb as Bt,Ha as At,Hb as Lt,Ia as V,Ib as Ot,Ic as tt,J as Ct,Jb as d,Jc as it,Jd as li,Kb as u,Lb as ne,M as ue,Ma as Pe,Na as b,Nb as ce,Nd as di,O as vt,Oc as Gt,P as ye,Pa as J,Pb as Pt,Pd as $e,Qa as _,Qb as L,Qd as he,R as N,Ra as q,Rb as Ie,S as Et,Ua as Ye,Uc as nt,Va as T,W as yt,Wb as Nt,X as Z,Xa as Se,Xb as Vt,Y as Tt,Ya as M,Z as St,Za as R,_ as W,_a as l,a as be,ab as B,b as De,bb as Ft,bc as et,cb as kt,cc as ve,da as Te,db as Ne,dc as Rt,dd as me,ea as v,eb as P,ed as qt,f as re,fa as E,fd as Ut,g as ze,gb as x,gd as Qt,hb as m,i as ht,ia as It,ib as Ze,id as xe,j as ft,ja as Ke,jb as Je,jd as Me,kb as fe,kd as zt,l as _t,lb as Xe,ma as D,mb as $,mc as $t,n as S,na as xt,nb as _e,nd as Kt,o as Be,ob as F,od as Yt,pb as k,qb as U,qd as Zt,ra as ae,rb as p,sb as I,sd as Jt,t as Ee,tb as C,td as Xt,ub as Ce,ud as ei,vd as ti,w as Le,wd as ii,x as Oe,xb as Q,xc as Ve,ya as o,yb as z,yc as jt,za as f,zb as K,zc as Ht}from"./chunk-S3H6YSFW.js";var O=function(t){return t.Absent="absent",t.Dispensation="dispensation",t.HalfDay="half-day",t.Incident="incident",t.Present="present",t}(O||{}),$i=(()=>{class t{constructor(e,i){this.updateService=e,this.settings=i}update(e,i,n,r,a,h){let g=[];switch(n){case O.Present:g=this.createResetBulkRequests(e);break;case O.Absent:g=this.createAbsentEditBulkRequests(e,i,r,a);break;case O.Dispensation:g=this.createEditBulkRequests(e,null,this.settings.dispensationPresenceTypeId);break;case O.HalfDay:g=this.createEditBulkRequests(e,null,this.settings.halfDayPresenceTypeId);break;case O.Incident:g=this.createEditBulkRequests(e,null,h);break}return Be(g).pipe(S(()=>{}))}createAbsentEditBulkRequests(e,i,n,r){return n===this.settings.excusedAbsenceStateId?this.createEditBulkRequests(e,n,r):n===this.settings.unexcusedAbsenceStateId?this.createEditBulkRequests(e,n,this.settings.absencePresenceTypeId):[...this.createEditBulkRequests(e.filter(Ri(i,this.settings)),n,this.settings.absencePresenceTypeId),...this.createEditBulkRequests(e.filter(we(Ri(i,this.settings))),n,null)]}createResetBulkRequests(e){return at(e).map(({lessonIds:i,personIds:n})=>this.updateService.removeLessonPresences(i,n))}createEditBulkRequests(e,i,n){return at(e).map(({lessonIds:r,personIds:a})=>this.updateService.editLessonPresences(r,a,n||void 0,i||void 0))}static{this.\u0275fac=function(i){return new(i||t)(W(bi),W(me))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ri(t,s){return e=>{let i=t.find(n=>n.Id===e.TypeRef.Id);return!i||i.Id===s.dispensationPresenceTypeId||i.Id===s.halfDayPresenceTypeId||i.IsIncident}}var te=(()=>{class t extends Fi{constructor(e,i,n,r,a,h,g){super(e,i,n,r,"/edit-absences"),this.lessonPresencesService=a,this.presenceTypesService=h,this.dropDownItemsService=g,this.weekdays$=this.loadWeekdays().pipe(ue(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(ue(1)),this.absenceConfirmationStates$=this.loadAbsenceConfirmationStates().pipe(S(ui),ue(1)),this.presenceControlEntries$=Be([this.entries$,this.presenceTypes$,this.absenceConfirmationStates$]).pipe(S(Ci(Li)),ue(1)),this.selected=[],this.queryParamsString$.pipe(N(this.destroy$)).subscribe(A=>this.confirmBackLinkParams={returnparams:A})}resetSelection(){this.selected=[]}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null}}isValidFilter(e){return!!(e.student||e.educationalEvent||e.studyClass||e.teacher||e.dateFrom||e.dateTo||e.weekdays||e.presenceTypes||e.confirmationStates||e.incidentTypes)}loadEntries(e,i,n){let r={sort:"StudentFullName.asc,LessonDateTimeFrom.asc"};return this.loadingService.load(this.lessonPresencesService.getFilteredList(e,n,r),Ai)}buildParamsFromFilter(e){return Pi(e)}loadWeekdays(){return this.loadingService.load(this.dropDownItemsService.getWeekdays())}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.activePresenceTypes$)}loadAbsenceConfirmationStates(){return this.loadingService.load(this.dropDownItemsService.getAbsenceConfirmationStates())}static{this.\u0275fac=function(i){return new(i||t)(W(Vt),W(Ii),W(Di),W(me),W(vi),W(We),W(He))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var fn=(t,s)=>s.Key,ji=(t,s)=>s.Id;function _n(t,s){if(t&1&&(l(0,"div",3),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gn(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;_("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function bn(t,s){if(t&1&&(l(0,"select",17),d(1,"async"),l(2,"option",18),p(3),d(4,"translate"),c(),M(5,gn,2,2,"option",18,ji),d(7,"async"),c()),t&2){let e,i=m(5);q("is-invalid",((e=u(1,4,i.absenceTypeIdErrors$))==null?null:e.length)||!1),o(2),_("ngValue",null),o(),C(" ",u(4,6,"edit-absences.edit.absence-type-placeholder")," "),o(2),R(u(7,8,i.absenceTypes$))}}function Cn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vn(t,s){if(t&1&&(l(0,"div",13),B(1,"input",14),l(2,"label",11),p(3),c(),b(4,bn,8,10,"select",15),M(5,Cn,3,4,"div",16,Se),d(7,"async"),c()),t&2){let e=s.$implicit,i=m(4);o(),_("id","state-"+e.Key)("value",e.Key),o(),fe("for","state-"+e.Key),o(),C(" ",e.Value," "),o(),T(i.isExcused(e)?4:-1),o(),R(u(7,5,i.absenceTypeIdErrors$))}}function En(t,s){if(t&1&&(l(0,"div",12),M(1,vn,8,7,"div",13,fn),c()),t&2){m(3);let e=Y(0);o(),R(e)}}function yn(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;_("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function Tn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Sn(t,s){if(t&1&&(l(0,"div",12)(1,"select",19),d(2,"async"),l(3,"option",18),p(4),d(5,"translate"),c(),M(6,yn,2,2,"option",18,ji),d(8,"async"),c(),M(9,Tn,3,4,"div",16,Se),d(11,"async"),c()),t&2){let e,i=m(3);o(),q("is-invalid",((e=u(2,4,i.incidentIdErrors$))==null?null:e.length)||!1),o(2),_("ngValue",null),o(),C(" ",u(5,6,"edit-absences.edit.incident-placeholder")," "),o(2),R(u(8,8,i.incidents$)),o(3),R(u(11,10,i.incidentIdErrors$))}}function In(t,s){if(t&1&&(l(0,"div",5),B(1,"input",10),l(2,"label",11),p(3),d(4,"translate"),c(),b(5,En,3,0,"div",12)(6,Sn,12,12,"div",12),c()),t&2){let e=s.$implicit,i=m(2);o(),_("id","category-"+e)("value",e),o(),fe("for","category-"+e),o(),C(" ",u(4,6,"edit-absences.edit.categories."+e)," "),o(2),T(i.isAbsent(e)?5:-1),o(),T(i.isIncident(e)?6:-1)}}function xn(t,s){t&1&&(l(0,"div",9)(1,"span",20),p(2,"Loading..."),c()())}function wn(t,s){if(t&1){let e=P();l(0,"form",2),x("ngSubmit",function(){v(e);let n=m();return E(n.onSubmit())}),M(1,_n,3,4,"div",3,Se),d(3,"async"),l(4,"div",4),M(5,In,7,8,"div",5,Se),c(),l(7,"div",6)(8,"button",7),d(9,"async"),x("click",function(){v(e);let n=m();return E(n.cancel())}),p(10),d(11,"translate"),c(),l(12,"button",8),d(13,"async"),p(14),d(15,"translate"),b(16,xn,3,0,"div",9),d(17,"async"),c()()()}if(t&2){let e=m(),i=Y(2),n=Y(4);_("formGroup",n),o(),R(u(3,6,e.formErrors$)),o(4),R(i),o(3),_("disabled",u(9,8,e.saving$)),o(2),C(" ",u(11,10,"edit-absences.edit.cancel")," "),o(2),_("disabled",u(13,12,e.saving$)),o(2),C(" ",u(15,14,"edit-absences.edit.save")," "),o(2),T(u(17,16,e.saving$)?16:-1)}}var Hi=(()=>{class t{constructor(e,i,n,r,a,h,g,A,ee,j){this.fb=e,this.router=i,this.route=n,this.toastService=r,this.translate=a,this.state=h,this.dropDownItemsService=g,this.presenceTypesService=A,this.updateService=ee,this.settings=j,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$=je(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=je(this.formGroup$,this.submitted$,"absenceTypeId"),this.incidentIdErrors$=je(this.formGroup$,this.submitted$,"incidentId"),this.availableCategories=[O.Absent,O.Dispensation,O.HalfDay,O.Incident,O.Present],this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(S(this.sortAbsenceConfirmationStates.bind(this)),ue(1)),this.activeCategories$=this.presenceTypesService.halfDayActive$.pipe(S(H=>H?this.availableCategories:this.availableCategories.filter(ge=>ge!==O.HalfDay))),this.destroy$=new re}ngOnInit(){this.state.selected.length===0&&this.navigateBack(),st(this.formGroup$,"category").pipe(N(this.destroy$)).subscribe(this.updateConfirmationValueDisabled.bind(this)),st(this.formGroup$,"confirmationValue").pipe(N(this.destroy$)).subscribe(this.updateAbsenceTypeIdDisabled.bind(this))}ngOnDestroy(){this.destroy$.next()}isAbsent(e){return e===O.Absent}isExcused(e){return e.Key===this.settings.excusedAbsenceStateId}isIncident(e){return e===O.Incident}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(ie(1)).subscribe(e=>{e.valid&&this.save(e)})}cancel(){this.navigateBack()}createFormGroup(){return this.getInitialAbsenceTypeId().pipe(S(e=>this.fb.group({category:[O.Absent,xe.required],confirmationValue:[this.settings.excusedAbsenceStateId,xe.required],absenceTypeId:[e,xe.required],incidentId:[{value:null,disabled:!0},xe.required]})),ue(1))}getInitialAbsenceTypeId(){return this.absenceTypes$.pipe(ie(1),S(e=>{let i=e.map(r=>r.Id),n=li(this.state.selected.map(r=>r.TypeRef.Id));return n.length===1&&n[0]!=null&&i.includes(n[0])?n[0]:null}))}updateConfirmationValueDisabled(){this.formGroup$.pipe(ie(1)).subscribe(e=>{let i=e.get("category"),n=e.get("confirmationValue"),r=e.get("absenceTypeId"),a=e.get("incidentId");i&&n&&r&&a&&(i.value===O.Absent?(n.enable(),this.updateAbsenceTypeIdDisabled()):(n.disable(),r.disable()),i.value===O.Incident?a.enable():a.disable())})}updateAbsenceTypeIdDisabled(){this.formGroup$.pipe(ie(1)).subscribe(e=>{let i=e.get("confirmationValue"),n=e.get("absenceTypeId");i&&n&&(i.value===this.settings.excusedAbsenceStateId?n.enable():n.disable())})}save(e){this.saving$.next(!0);let{category:i,confirmationValue:n,absenceTypeId:r,incidentId:a}=e.value;this.presenceTypesService.presenceTypes$.pipe(ye(h=>this.updateService.update(this.state.selected,h,i,n,r,a)),Ct(()=>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(ie(1)).subscribe(i=>{this.router.navigate(["/edit-absences"],{queryParams:De(be({},yi(i.returnparams)),{reload:e})})})}sortAbsenceConfirmationStates(e){return e.slice().sort((i,n)=>i.Key===this.settings.excusedAbsenceStateId?-1:n.Key===this.settings.excusedAbsenceStateId?1:i.Value.localeCompare(n.Value))}static{this.\u0275fac=function(i){return new(i||t)(f(ni),f(Ht),f(Ve),f(ci),f($e),f(te),f(He),f(We),f($i),f(me))}}static{this.\u0275cmp=G({type:t,selectors:[["bkd-edit-absences-edit"]],decls:11,vars:13,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","category",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"ms-5"],[1,"form-check","mt-2","mb-2"],["type","radio","formControlName","confirmationValue",1,"form-check-input",3,"id","value"],["formControlName","absenceTypeId",1,"form-select","mt-1",3,"is-invalid"],[1,"invalid-feedback"],["formControlName","absenceTypeId",1,"form-select","mt-1"],[3,"ngValue"],["formControlName","incidentId",1,"form-select","mt-1"],[1,"visually-hidden"]],template:function(i,n){if(i&1&&(oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),l(6,"h1"),p(7),d(8,"translate"),c(),l(9,"div",0),b(10,wn,18,18,"form",1),c()),i&2){let r=le(u(1,2,n.confirmationStates$));o(2),le(u(3,5,n.activeCategories$)),o(2);let a=le(u(5,8,n.formGroup$));o(3),I(u(8,11,"edit-absences.title")),o(3),T(a&&r?10:-1)}},dependencies:[Re,Yt,ti,ii,Qt,ei,Zt,Me,zt,si,Jt,Xt,ve,he],encapsulation:2,changeDetection:0})}}return t})();var qe=(()=>{class t extends _i{static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=It(t)))(n||t)}})()}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var Fn=["content"],kn=["scroll"],Dn=["padding"],qi=["*"],ke=t=>({searchTerm:t});function Bn(t,s){if(t&1&&(l(0,"div",3),Ne(1,6),c()),t&2){let e=m();o(),_("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",X(2,ke,e.filterValue))}}function Ln(t,s){if(t&1&&(l(0,"div",5),Ne(1,6),c()),t&2){let e=m();o(),_("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",X(2,ke,e.filterValue))}}var On=["searchInput"],Pn=["clearButton"],Nn=(t,s,e)=>({item:t,clear:s,label:e}),Vn=(t,s)=>({items:t,clear:s}),Mn=(t,s,e,i)=>({item:t,item$:s,index:e,searchTerm:i});function Rn(t,s){if(t&1&&(l(0,"div",19),p(1),c()),t&2){let e=m(2);o(),I(e.placeholder)}}function $n(t,s){}function jn(t,s){if(t&1&&b(0,Rn,2,1,"ng-template",null,1,ce)(2,$n,0,0,"ng-template",18),t&2){let e=U(1),i=m();o(2),_("ngTemplateOutlet",i.placeholderTemplate||e)}}function Hn(t,s){if(t&1){let e=P();l(0,"span",22),x("click",function(){v(e);let n=m().$implicit,r=m(2);return E(r.unselect(n))}),p(1,"\xD7"),c(),B(2,"span",23)}if(t&2){let e=m().$implicit,i=m(2);o(2),_("ngItemLabel",e.label)("escape",i.escapeHTML)}}function Wn(t,s){}function Gn(t,s){if(t&1&&(l(0,"div",21),b(1,Hn,3,2,"ng-template",null,2,ce)(3,Wn,0,0,"ng-template",12),c()),t&2){let e=s.$implicit,i=U(2),n=m(2);q("ng-value-disabled",e.disabled),o(3),_("ngTemplateOutlet",n.labelTemplate||i)("ngTemplateOutletContext",Lt(4,Nn,e.value,n.clearItem,e.label))}}function qn(t,s){if(t&1&&M(0,Gn,4,8,"div",20,Ye().trackByOption,!0),t&2){let e=m();R(e.selectedItems)}}function Un(t,s){}function Qn(t,s){if(t&1&&b(0,Un,0,0,"ng-template",12),t&2){let e=m();_("ngTemplateOutlet",e.multiLabelTemplate)("ngTemplateOutletContext",Bt(2,Vn,e.selectedValues,e.clearItem))}}function zn(t,s){t&1&&B(0,"div",24)}function Kn(t,s){}function Yn(t,s){if(t&1&&b(0,zn,1,0,"ng-template",null,3,ce)(2,Kn,0,0,"ng-template",18),t&2){let e=U(1),i=m();o(2),_("ngTemplateOutlet",i.loadingSpinnerTemplate||e)}}function Zn(t,s){if(t&1&&Ne(0,18),t&2){let e=m(2);_("ngTemplateOutlet",e.clearButtonTemplate)}}function Jn(t,s){if(t&1&&(l(0,"span",25,4)(2,"span",26),p(3,"\xD7"),c()()),t&2){let e=m(2);fe("title",e.clearAllText)}}function Xn(t,s){if(t&1&&b(0,Zn,1,1,"ng-container",18)(1,Jn,4,1,"span",25),t&2){let e=m();T(e.clearButtonTemplate?0:1)}}function es(t,s){if(t&1&&B(0,"span",31),t&2){let e=m().$implicit,i=m(2);_("ngItemLabel",e.label)("escape",i.escapeHTML)}}function ts(t,s){}function is(t,s){if(t&1){let e=P();l(0,"div",30),x("click",function(){let n=v(e).$implicit,r=m(2);return E(r.toggleItem(n))})("mouseover",function(){let n=v(e).$implicit,r=m(2);return E(r.onItemHover(n))}),b(1,es,1,2,"ng-template",null,5,ce)(3,ts,0,0,"ng-template",12),c()}if(t&2){let e=s.$implicit,i=U(2),n=m(2);q("ng-option-disabled",e.disabled)("ng-option-selected",e.selected)("ng-optgroup",e.children)("ng-option",!e.children)("ng-option-child",!!e.parent)("ng-option-marked",e===n.itemsList.markedItem),J("role",e.children?"group":"option")("aria-selected",e.selected)("id",e==null?null:e.htmlId),o(3),_("ngTemplateOutlet",e.children?n.optgroupTemplate||i:n.optionTemplate||i)("ngTemplateOutletContext",Ot(17,Mn,e.value,e,e.index,n.searchTerm))}}function ns(t,s){if(t&1&&(l(0,"span")(1,"span",33),p(2),c(),p(3),c()),t&2){let e=m(3);o(2),I(e.addTagText),o(),C('"',e.searchTerm,'"')}}function ss(t,s){}function rs(t,s){if(t&1){let e=P();l(0,"div",32),x("mouseover",function(){v(e);let n=m(2);return E(n.itemsList.unmarkItem())})("click",function(){v(e);let n=m(2);return E(n.selectTag())}),b(1,ns,4,2,"ng-template",null,6,ce)(3,ss,0,0,"ng-template",12),c()}if(t&2){let e=U(2),i=m(2);q("ng-option-marked",!i.itemsList.markedItem),o(3),_("ngTemplateOutlet",i.tagTemplate||e)("ngTemplateOutletContext",X(4,ke,i.searchTerm))}}function as(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=m(3);o(),I(e.notFoundText)}}function os(t,s){}function ls(t,s){if(t&1&&b(0,as,2,1,"ng-template",null,7,ce)(2,os,0,0,"ng-template",12),t&2){let e=U(1),i=m(2);o(2),_("ngTemplateOutlet",i.notFoundTemplate||e)("ngTemplateOutletContext",X(2,ke,i.searchTerm))}}function cs(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=m(3);o(),I(e.typeToSearchText)}}function ds(t,s){}function us(t,s){if(t&1&&b(0,cs,2,1,"ng-template",null,8,ce)(2,ds,0,0,"ng-template",18),t&2){let e=U(1),i=m(2);o(2),_("ngTemplateOutlet",i.typeToSearchTemplate||e)}}function ps(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=m(3);o(),I(e.loadingText)}}function ms(t,s){}function hs(t,s){if(t&1&&b(0,ps,2,1,"ng-template",null,9,ce)(2,ms,0,0,"ng-template",12),t&2){let e=U(1),i=m(2);o(2),_("ngTemplateOutlet",i.loadingTextTemplate||e)("ngTemplateOutletContext",X(2,ke,i.searchTerm))}}function fs(t,s){if(t&1){let e=P();l(0,"ng-dropdown-panel",27),x("update",function(n){v(e);let r=m();return E(r.viewPortItems=n)})("scroll",function(n){v(e);let r=m();return E(r.scroll.emit(n))})("scrollToEnd",function(n){v(e);let r=m();return E(r.scrollToEnd.emit(n))})("outsideClick",function(){v(e);let n=m();return E(n.close())}),Ft(1),M(2,is,4,22,"div",28,Ye().trackByOption,!0),b(4,rs,4,6,"div",29),kt(),b(5,ls,3,4)(6,us,3,1)(7,hs,3,4),c()}if(t&2){let e=m();q("ng-select-multiple",e.multiple),_("virtualScroll",e.virtualScroll)("bufferAmount",e.bufferAmount)("appendTo",e.appendTo)("position",e.dropdownPosition)("headerTemplate",e.headerTemplate)("footerTemplate",e.footerTemplate)("filterValue",e.searchTerm)("items",e.itemsList.filteredItems)("markedItem",e.itemsList.markedItem)("ngClass",e.appendTo?e.ngClass?e.ngClass:e.classes:null)("id",e.dropdownId),J("aria-label",e.ariaLabelDropdown),o(2),R(e.viewPortItems),o(2),T(e.showAddTag?4:-1),o(),T(e.showNoItemsFound()?5:-1),o(),T(e.showTypeToSearch()?6:-1),o(),T(e.loading&&e.itemsList.filteredItems.length===0?7:-1)}}var Ui=/[&<>"']/g,_s=RegExp(Ui.source),gs={"&":"&","<":"<",">":">",'"':""","'":"'"};function bs(t){return t&&_s.test(t)?t.replace(Ui,s=>gs[s]):t}function w(t){return t!=null}function Fe(t){return typeof t=="object"&&w(t)}function Cs(t){return t instanceof Promise}function Qe(t){return t instanceof Function}var vs=(()=>{class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?bs(this.ngItemLabel):this.ngItemLabel}static{this.\u0275fac=function(i){return new(i||t)(f(ae))}}static{this.\u0275dir=V({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[Te]})}}return t})(),ut=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-option-tmp",""]]})}}return t})(),pt=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-optgroup-tmp",""]]})}}return t})(),Es=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-label-tmp",""]]})}}return t})(),mt=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-multi-label-tmp",""]]})}}return t})(),ys=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-header-tmp",""]]})}}return t})(),Ts=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-footer-tmp",""]]})}}return t})(),Ss=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-notfound-tmp",""]]})}}return t})(),Is=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-placeholder-tmp",""]]})}}return t})(),xs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-typetosearch-tmp",""]]})}}return t})(),ws=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-loadingtext-tmp",""]]})}}return t})(),As=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-tag-tmp",""]]})}}return t})(),Fs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-loadingspinner-tmp",""]]})}}return t})(),ks=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(y))}}static{this.\u0275dir=V({type:t,selectors:[["","ng-clearbutton-tmp",""]]})}}return t})();function Qi(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var Ds={"\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 Ue(t){let s=e=>Ds[e]||e;return t.replace(/[^\u0000-\u007E]/g,s)}var ct=class{constructor(s,e){this._ngSelect=s,this._selectionModel=e,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 s=this.selectedItems.length-1;for(;s>=0;s--){let e=this.selectedItems[s];if(!e.disabled)return e}return null}setItems(s){this._items=s.map((e,i)=>this.mapItem(e,i)),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(s){if(s.selected||this.maxItemsSelected)return;let e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(s,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(s)}unselect(s){s.selected&&(this._selectionModel.unselect(s,this._ngSelect.multiple),this._ngSelect.hideSelected&&w(s.index)&&this._ngSelect.multiple&&this._showSelected(s))}findItem(s){let e;return this._ngSelect.compareWith?e=i=>this._ngSelect.compareWith(i.value,s):this._ngSelect.bindValue?e=i=>!i.children&&this.resolveNested(i.value,this._ngSelect.bindValue)===s:e=i=>i.value===s||!i.children&&i.label&&i.label===this.resolveNested(s,this._ngSelect.bindLabel),this._items.find(i=>e(i))}addItem(s){let e=this.mapItem(s,this._items.length);return this._items.push(e),this._filteredItems.push(e),e}clearSelected(s=!1){this._selectionModel.clear(s),this._items.forEach(e=>{e.selected=s&&e.selected&&e.disabled,e.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(s){return s=Ue(s).toLocaleLowerCase(),this.filteredItems.find(e=>Ue(e.label).toLocaleLowerCase().substr(0,s.length)===s)}filter(s){if(!s){this.resetFilteredItems();return}this._filteredItems=[],s=this._ngSelect.searchFn?s:Ue(s).toLocaleLowerCase();let e=this._ngSelect.searchFn||this._defaultSearchFn,i=this._ngSelect.hideSelected;for(let n of Array.from(this._groups.keys())){let r=[];for(let a of this._groups.get(n)){if(i&&(a.parent&&a.parent.selected||a.selected))continue;let h=this._ngSelect.searchFn?a.value:a;e(s,h)&&r.push(a)}if(r.length>0){let[a]=r.slice(-1);if(a.parent){let h=this._items.find(g=>g===a.parent);this._filteredItems.push(h)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(s=>!s.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(s){this._markedIndex=this._filteredItems.indexOf(s)}markSelectedOrDefault(s){if(this._filteredItems.length===0)return;let e=this._getLastMarkedIndex();e>-1?this._markedIndex=e:this._markedIndex=s?this.filteredItems.findIndex(i=>!i.disabled):-1}resolveNested(s,e){if(!Fe(s))return s;if(e.indexOf(".")===-1)return s[e];{let i=e.split("."),n=s;for(let r=0,a=i.length;rthis.selectedItems.indexOf(e)===-1))}_showSelected(s){if(this._filteredItems.push(s),s.parent){let e=s.parent;this._filteredItems.find(n=>n===e)||this._filteredItems.push(e)}else if(s.children)for(let e of s.children)e.selected=!1,this._filteredItems.push(e);this._filteredItems=[...this._filteredItems.sort((e,i)=>e.index-i.index)]}_hideSelected(s){this._filteredItems=this._filteredItems.filter(e=>e!==s),s.parent?s.parent.children.every(i=>i.selected)&&(this._filteredItems=this._filteredItems.filter(i=>i!==s.parent)):s.children&&(this._filteredItems=this.filteredItems.filter(e=>e.parent!==s))}_defaultSearchFn(s,e){return Ue(e.label).toLocaleLowerCase().indexOf(s)>-1}_getNextItemIndex(s){return s>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(s){this._filteredItems.length===0||this._filteredItems.every(e=>e.disabled)||(this._markedIndex=this._getNextItemIndex(s),this.markedItem.disabled&&this._stepToItem(s))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let s=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&s<0?-1:Math.max(this.markedIndex,s)}_groupBy(s,e){let i=new Map;if(s.length===0)return i;if(Array.isArray(s[0].value[e])){for(let a of s){let h=(a.value[e]||[]).map((g,A)=>this.mapItem(g,A));i.set(a,h)}return i}let n=Qe(this._ngSelect.groupBy),r=a=>{let h=n?e(a.value):a.value[e];return w(h)?h:void 0};for(let a of s){let h=r(a),g=i.get(h);g?g.push(a):i.set(h,[a])}return i}_flatten(s){let e=Qe(this._ngSelect.groupBy),i=[];for(let n of Array.from(s.keys())){let r=i.length;if(n===void 0){let j=s.get(void 0)||[];i.push(...j.map(H=>(H.index=r++,H)));continue}let a=Fe(n),h={label:a?"":String(n),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:Qi()},g=e?this._ngSelect.bindLabel:this._ngSelect.groupBy,A=this._ngSelect.groupValue||(()=>a?n.value:{[g]:n}),ee=s.get(n).map(j=>(j.parent=h,j.children=void 0,j.index=r++,j));h.children=ee,h.value=A(n,ee.map(j=>j.value)),i.push(h),i.push(...ee)}return i}},zi=(()=>{class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,i,n){let r=this._dimensions,a=r.itemHeight*i,g=Math.max(0,e)/a*i,A=Math.min(i,Math.ceil(g)+(r.itemsPerViewport+1)),j=Math.max(0,A-r.itemsPerViewport),H=Math.min(j,Math.floor(g)),ge=r.itemHeight*Math.ceil(H)-r.itemHeight*Math.min(H,n);return ge=isNaN(ge)?0:ge,H=isNaN(H)?-1:H,A=isNaN(A)?-1:A,H-=n,H=Math.max(0,H),A+=n,A=Math.min(i,A),{topPadding:ge,scrollHeight:a,start:H,end:A}}setDimensions(e,i){let n=Math.max(1,Math.floor(i/e));this._dimensions={itemHeight:e,panelHeight:i,itemsPerViewport:n}}getScrollTo(e,i,n){let{panelHeight:r}=this.dimensions,a=e+i,h=n,g=h+r;return r>=a&&n===e?null:a>g?h+a-g:e<=h?e:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})(),Wi=["top","right","bottom","left"],Bs=typeof requestAnimationFrame<"u"?ft:ht,Gi=(()=>{class t{constructor(e,i,n,r,a){this._renderer=e,this._zone=i,this._panelService=n,this._document=a,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new D,this.scroll=new D,this.scrollToEnd=new D,this.outsideClick=new D,this._destroy$=new re,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=r.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:i}=this._panelService.dimensions,n=this.markedItem.index*e;return i>n?0:n}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 i=e.items;this._onItemsChange(i.currentValue,i.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,i=!1){if(!e)return;let n=this.items.indexOf(e);if(n<0||n>=this.itemsLength)return;let r;if(this.virtualScroll){let a=this._panelService.dimensions.itemHeight;r=this._panelService.getScrollTo(n*a,a,this._lastScrollPosition)}else{let a=this._dropdown.querySelector(`#${e.htmlId}`),h=i?a.offsetTop:this._lastScrollPosition;r=this._panelService.getScrollTo(a.offsetTop,a.clientHeight,h)}w(r)&&(this._scrollablePanel.scrollTop=r)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),Wi.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){Wi.forEach(n=>{let r=`ng-select-${n}`;this._renderer.removeClass(this._dropdown,r),this._renderer.removeClass(this._select,r)});let i=`ng-select-${e}`;this._renderer.addClass(this._dropdown,i),this._renderer.addClass(this._select,i)}_handleScroll(){this._zone.runOutsideAngular(()=>{Ee(this.scrollElementRef.nativeElement,"scroll").pipe(N(this._destroy$),gt(0,Bs)).subscribe(e=>{let i=e.path||e.composedPath&&e.composedPath();if(!i||i.length===0&&!e.target)return;let n=!i||i.length===0?e.target.scrollTop:i[0].scrollTop;this._onContentScrolled(n)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Le(Ee(this._document,"touchstart",{capture:!0}),Ee(this._document,"click",{capture:!0})).pipe(N(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let i=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&i&&i[0]&&this._select.contains(i[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,i){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let i=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,i),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 i=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(i.scrollHeight),this._contentPanel.style.transform=`translateY(${i.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(i.start,i.end)),this.scroll.emit({start:i.start,end:i.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 n=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${n*this.itemsLength}px`;let r=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(n,r),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let i=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=i.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let i=this._select.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop,r=i.top+window.pageYOffset,a=i.height,h=e.getBoundingClientRect().height;return r+a+h>n+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(),i=this._parent.getBoundingClientRect(),n=e.left-i.left;this._dropdown.style.left=n+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),n=e.height;if(this._currentPosition==="top"){let r=i.bottom-e.bottom;this._dropdown.style.bottom=r+n+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let r=e.top-i.top;this._dropdown.style.top=r+n+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{Ee(this._dropdown,"mousedown").pipe(N(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}static{this.\u0275fac=function(i){return new(i||t)(f(wt),f(xt),f(zi),f(ae),f(Nt,8))}}static{this.\u0275cmp=G({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,n){if(i&1&&(_e(Fn,7,ae),_e(kn,7,ae),_e(Dn,7,ae)),i&2){let r;F(r=k())&&(n.contentElementRef=r.first),F(r=k())&&(n.scrollElementRef=r.first),F(r=k())&&(n.paddingElementRef=r.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",L],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Pe,Te],ngContentSelectors:qi,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(i,n){i&1&&(Ze(),b(0,Bn,2,4,"div",3),l(1,"div",4,0),B(3,"div",null,1),l(5,"div",null,2),Je(7),c()(),b(8,Ln,2,4,"div",5)),i&2&&(T(n.headerTemplate?0:-1),o(3),q("total-padding",n.virtualScroll),o(2),q("scrollable-content",n.virtualScroll&&n.items.length),o(3),T(n.footerTemplate?8:-1))},dependencies:[et],encapsulation:2,changeDetection:0})}}return t})(),Ls=(()=>{class t{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new re}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()}static{this.\u0275fac=function(i){return new(i||t)(f(ae))}}static{this.\u0275cmp=G({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",L]},features:[Pe,Te],ngContentSelectors:qi,decls:1,vars:0,template:function(i,n){i&1&&(Ze(),Je(0))},encapsulation:2,changeDetection:0})}}return t})(),se=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Esc=27]="Esc",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.Backspace=8]="Backspace",t}(se||{});function Ki(){return new dt}var dt=class{constructor(){this._selected=[]}get value(){return this._selected}select(s,e,i){if(s.selected=!0,(!s.children||!e&&i)&&this._selected.push(s),e)if(s.parent){let n=s.parent.children.length,r=s.parent.children.filter(a=>a.selected).length;s.parent.selected=n===r}else s.children&&(this._setChildrenSelectedState(s.children,!0),this._removeChildren(s),i&&this._activeChildren(s)?this._selected=[...this._selected.filter(n=>n.parent!==s),s]:this._selected=[...this._selected,...s.children.filter(n=>!n.disabled)])}unselect(s,e){if(this._selected=this._selected.filter(i=>i!==s),s.selected=!1,e)if(s.parent&&s.parent.selected){let i=s.parent.children;this._removeParent(s.parent),this._removeChildren(s.parent),this._selected.push(...i.filter(n=>n!==s&&!n.disabled)),s.parent.selected=!1}else s.children&&(this._setChildrenSelectedState(s.children,!1),this._removeChildren(s))}clear(s){this._selected=s?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(s,e){for(let i of s)i.disabled||(i.selected=e)}_removeChildren(s){this._selected=[...this._selected.filter(e=>e.parent!==s),...s.children.filter(e=>e.parent===s&&e.disabled&&e.selected)]}_removeParent(s){this._selected=this._selected.filter(e=>e!==s)}_activeChildren(s){return s.children.every(e=>!e.disabled||e.selected)}},Os=(()=>{class t{constructor(){this.fixedPlaceholder=!0,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"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Ps=(()=>{class t{warn(e){console.warn(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Yi=new St("ng-select-selection-model"),Zi=(()=>{class t{constructor(e,i,n,r,a,h,g){this.classes=e,this.autoFocus=i,this.config=n,this._cd=h,this._console=g,this.ariaLabelDropdown="Options List",this.markFirst=!0,this.fixedPlaceholder=!0,this.preventToggleOnRightClick=!1,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.ngClass=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new D,this.focusEvent=new D,this.changeEvent=new D,this.openEvent=new D,this.closeEvent=new D,this.searchEvent=new D,this.clearEvent=new D,this.addEvent=new D,this.removeEvent=new D,this.scroll=new D,this.scrollToEnd=new D,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Qi(),this.escapeHTML=!0,this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new re,this._keyPress$=new re,this._items=[],this.keyDownFn=A=>!0,this.clearItem=A=>{let ee=this.selectedItems.find(j=>j.value===A);this.unselect(ee)},this.trackByOption=(A,ee)=>this.trackByFn?this.trackByFn(ee.value):ee,this._onChange=A=>{},this._onTouched=()=>{},this._mergeGlobalConfig(n),this.itemsList=new ct(this,r?r():Ki()),this.element=a.nativeElement}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get disabled(){return this.readonly||this._disabled}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!Qe(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 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}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(i=>i.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(i=>i.label.toLowerCase()===e))&&!this.loading}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}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}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(se[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 i=e.target;this.clearButton&&this.clearButton.nativeElement===i?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case se.ArrowDown:this._handleArrowDown(e);break;case se.ArrowUp:this._handleArrowUp(e);break;case se.Space:this._handleSpace(e);break;case se.Enter:this._handleEnter(e);break;case se.Tab:this._handleTab(e);break;case se.Esc:this.close(),e.preventDefault();break;case se.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case se.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){if(this.preventToggleOnRightClick&&e.button===2)return!1;let i=e.target;if(i.tagName!=="INPUT"&&e.preventDefault(),i.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(i.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}i.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())}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(),this._onSelectionChanged()}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),this._onSelectionChanged())}selectTag(){let e;Qe(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let i=n=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(n,null):this.itemsList.addItem(n);Cs(e)?e.then(n=>this.select(i(n))).catch(()=>{}):e&&this.select(i(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}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(i=>i.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 i=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=w(i)?!Fe(i):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=n=>{this.items=n.map(r=>({$ngOptionValue:r.value,$ngOptionLabel:r.elementRef.nativeElement.innerHTML,disabled:r.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},i=()=>{let n=Le(this.ngOptions.changes,this._destroy$);Le(...this.ngOptions.map(r=>r.stateChange$)).pipe(N(n)).subscribe(r=>{let a=this.itemsList.findItem(r.value);a.disabled=r.disabled,a.label=r.label||a.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(vt(this.ngOptions),N(this._destroy$)).subscribe(n=>{this.bindLabel=this._defaultLabel,e(n),i()})}_isValidWriteValue(e){if(!w(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let i=n=>!w(this.compareWith)&&Fe(n)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(n)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(n=>i(n)):(this._console.warn("Multiple select ngModel should be array."),!1):i(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let i=n=>{let r=this.itemsList.findItem(n);if(r)this.itemsList.select(r);else{let a=Fe(n),h=!a&&!this.bindValue;a||h?this.itemsList.select(this.itemsList.mapItem(n,null)):this.bindValue&&(r={[this.bindLabel]:null,[this.bindValue]:n},this.itemsList.select(this.itemsList.mapItem(r,null)))}};this.multiple?e.forEach(n=>i(n)):i(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(N(this._destroy$),Et(e=>this._pressedKeys.push(e)),bt(200),Oe(()=>this._pressedKeys.length>0),S(()=>this._pressedKeys.join(""))).subscribe(e=>{let i=this.itemsList.findByLabel(e);i&&(this.isOpen?(this.itemsList.markItem(i),this._scrollToMarked(),this._cd.markForCheck()):this.select(i)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,i=be({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let n of Object.keys(i))e.setAttribute(n,i[n])}_updateNgModel(){let e=[];for(let n of this.selectedItems)if(this.bindValue){let r=null;if(n.children){let a=this.groupValue?this.bindValue:this.groupBy;r=n.value[a||this.groupBy]}else r=this.itemsList.resolveNested(n.value,this.bindValue);e.push(r)}else e.push(n.value);let i=this.selectedItems.map(n=>n.value);this.multiple?(this._onChange(e),this.changeEvent.emit(i)):(this._onChange(w(e[0])?e[0]:null),this.changeEvent.emit(i[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 i=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(i<0||i===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.fixedPlaceholder=this.fixedPlaceholder||e.fixedPlaceholder,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}static{this.\u0275fac=function(i){return new(i||t)(Ke("class"),Ke("autofocus"),f(Os),f(Yi,8),f(ae),f(Pt),f(Ps))}}static{this.\u0275cmp=G({type:t,selectors:[["ng-select"]],contentQueries:function(i,n,r){if(i&1&&($(r,ut,5,y),$(r,pt,5,y),$(r,Es,5,y),$(r,mt,5,y),$(r,ys,5,y),$(r,Ts,5,y),$(r,Ss,5,y),$(r,Is,5,y),$(r,xs,5,y),$(r,ws,5,y),$(r,As,5,y),$(r,Fs,5,y),$(r,ks,5,y),$(r,Ls,5)),i&2){let a;F(a=k())&&(n.optionTemplate=a.first),F(a=k())&&(n.optgroupTemplate=a.first),F(a=k())&&(n.labelTemplate=a.first),F(a=k())&&(n.multiLabelTemplate=a.first),F(a=k())&&(n.headerTemplate=a.first),F(a=k())&&(n.footerTemplate=a.first),F(a=k())&&(n.notFoundTemplate=a.first),F(a=k())&&(n.placeholderTemplate=a.first),F(a=k())&&(n.typeToSearchTemplate=a.first),F(a=k())&&(n.loadingTextTemplate=a.first),F(a=k())&&(n.tagTemplate=a.first),F(a=k())&&(n.loadingSpinnerTemplate=a.first),F(a=k())&&(n.clearButtonTemplate=a.first),F(a=k())&&(n.ngOptions=a)}},viewQuery:function(i,n){if(i&1&&(_e(Gi,5),_e(On,7),_e(Pn,5)),i&2){let r;F(r=k())&&(n.dropdownPanel=r.first),F(r=k())&&(n.searchInput=r.first),F(r=k())&&(n.clearButton=r.first)}},hostVars:20,hostBindings:function(i,n){i&1&&x("keydown",function(a){return n.handleKeyDown(a)}),i&2&&q("ng-select-typeahead",n.typeahead)("ng-select-multiple",n.multiple)("ng-select-taggable",n.addTag)("ng-select-searchable",n.searchable)("ng-select-clearable",n.clearable)("ng-select-opened",n.isOpen)("ng-select",n.useDefaultClass)("ng-select-filtered",n.filtered)("ng-select-single",n.single)("ng-select-disabled",n.disabled)},inputs:{ariaLabelDropdown:"ariaLabelDropdown",bindLabel:"bindLabel",bindValue:"bindValue",ariaLabel:"ariaLabel",markFirst:[2,"markFirst","markFirst",L],placeholder:"placeholder",fixedPlaceholder:"fixedPlaceholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",preventToggleOnRightClick:"preventToggleOnRightClick",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",L],closeOnSelect:[2,"closeOnSelect","closeOnSelect",L],hideSelected:[2,"hideSelected","hideSelected",L],selectOnTab:[2,"selectOnTab","selectOnTab",L],openOnEnter:[2,"openOnEnter","openOnEnter",L],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",Ie],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",Ie],virtualScroll:[2,"virtualScroll","virtualScroll",L],selectableGroup:[2,"selectableGroup","selectableGroup",L],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",L],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",L],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",Ie],readonly:[2,"readonly","readonly",L],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",L],minTermLength:[2,"minTermLength","minTermLength",Ie],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",L],ngClass:"ngClass",typeahead:"typeahead",multiple:[2,"multiple","multiple",L],addTag:"addTag",searchable:[2,"searchable","searchable",L],clearable:[2,"clearable","clearable",L],isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick",keyDownFn:"keyDownFn"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[pe([{provide:qt,useExisting:yt(()=>t),multi:!0},zi]),Pe,Te],decls:13,vars:19,consts:[["searchInput",""],["defaultPlaceholderTemplate",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-input"],["aria-autocomplete","list","role","combobox",3,"blur","change","compositionend","compositionstart","focus","input","disabled","readOnly","value"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[3,"ngTemplateOutlet"],[1,"ng-placeholder"],[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"],[1,"ng-spinner-loader"],["role","button","tabindex","0",1,"ng-clear-wrapper",3,"title"],["aria-hidden","true",1,"ng-clear"],["role","listbox",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(i,n){if(i&1){let r=P();l(0,"div",10),x("mousedown",function(h){return v(r),E(n.handleMousedown(h))}),l(1,"div",11),b(2,jn,3,1)(3,qn,2,0)(4,Qn,1,5,null,12),l(5,"div",13)(6,"input",14,0),x("blur",function(h){return v(r),E(n.onInputBlur(h))})("change",function(h){return v(r),E(h.stopPropagation())})("compositionend",function(){v(r);let h=U(7);return E(n.onCompositionEnd(h.value))})("compositionstart",function(){return v(r),E(n.onCompositionStart())})("focus",function(h){return v(r),E(n.onInputFocus(h))})("input",function(){v(r);let h=U(7);return E(n.filter(h.value))}),c()()(),b(8,Yn,3,1)(9,Xn,2,1),l(10,"span",15),B(11,"span",16),c()(),b(12,fs,8,18,"ng-dropdown-panel",17)}i&2&&(q("ng-appearance-outline",n.appearance==="outline")("ng-has-value",n.hasValue),o(2),T(n.selectedItems.length===0&&!n.searchTerm||n.fixedPlaceholder===!0?2:-1),o(),T((!n.multiLabelTemplate||!n.multiple)&&n.selectedItems.length>0?3:-1),o(),T(n.multiple&&n.multiLabelTemplate&&n.selectedValues.length>0?4:-1),o(2),_("disabled",n.disabled)("readOnly",!n.searchable||n.itemsList.maxItemsSelected)("value",n.searchTerm?n.searchTerm:""),J("aria-activedescendant",n.isOpen?n.itemsList==null||n.itemsList.markedItem==null?null:n.itemsList.markedItem.htmlId:null)("aria-controls",n.isOpen?n.dropdownId:null)("aria-expanded",n.isOpen)("aria-label",n.ariaLabel)("id",n.labelForId)("tabindex",n.tabIndex),o(2),T(n.loading?8:-1),o(),T(n.showClear()?9:-1),o(3),T(n.isOpen?12:-1))},dependencies:[et,vs,Gi,Mt],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:unset;user-select:unset;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})}}return t})(),Ji=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=At({type:t})}static{this.\u0275inj=Tt({providers:[{provide:Yi,useValue:Ki}]})}}return t})();var Vs=(t,s)=>s.Key;function Ms(t,s){if(t&1){let e=P();l(0,"div",4),p(1),l(2,"span",5),x("click",function(){let n=v(e).$implicit,r=m().clear;return E(r(n))}),p(3,"\xD7"),c()()}if(t&2){let e=s.$implicit;o(),C(" ",e.Value," ")}}function Rs(t,s){if(t&1&&M(0,Ms,4,1,"div",4,Vs),t&2){let e=s.items;R(e)}}function $s(t,s){if(t&1&&(B(0,"input",6),p(1)),t&2){let e=s.item,i=s.item$,n=s.index;Xe("id","item-",n,""),_("ngModel",i.selected),o(),C(" ",e.Group," ")}}function js(t,s){if(t&1&&(B(0,"input",6),p(1)),t&2){let e=s.item,i=s.item$,n=s.index;Xe("id","item-",n,""),_("ngModel",i.selected),o(),C(" ",e.Value," ")}}var Xi=(()=>{class t{constructor(){this.options=[],this.values=[],this.valuesChange=new D}itemsChanged(){this.valuesChange.emit(this.values)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=G({type:t,selectors:[["bkd-multiselect"]],inputs:{options:"options",values:"values"},outputs:{valuesChange:"valuesChange"},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",""],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"],["type","checkbox",3,"id","ngModel"]],template:function(i,n){i&1&&(l(0,"ng-select",0),d(1,"translate"),K("ngModelChange",function(a){return z(n.values,a)||(n.values=a),a}),x("click",function(){return n.itemsChanged()})("clear",function(){return n.itemsChanged()}),b(2,Rs,2,0,"ng-template",1)(3,$s,2,4,"ng-template",2)(4,js,2,4,"ng-template",3),c()),i&2&&(fe("placeholder",u(1,8,"shared.select.empty-option")),_("items",n.options)("multiple",!0)("selectableGroup",!0)("selectableGroupAsModel",!1)("closeOnSelect",!1),Q("ngModel",n.values),_("clearable",!0))},dependencies:[Ji,Zi,pt,ut,mt,Re,Ut,Me,Kt,he],encapsulation:2})}}return t})();var en=Gt({HRef:tt,Id:it,TeacherId:it,FullName:tt});var tn=(()=>{class t extends Ti{constructor(e,i){super(e,i,en,"TeacherResources","FullName","FullName")}getTypeaheadItemByKey(e){return this.http.get(`${this.baseUrl}/`,{params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${e}*`}}).pipe(ye(di(this.typeaheadCodec)),ye(i=>_t({Key:i[0].FullName,Value:`${i[0].FullName}`})))}static{this.\u0275fac=function(i){return new(i||t)(W($t),W(me))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var sn=(()=>{class t{constructor(e,i,n,r,a,h){this.studentsService=e,this.educationalEventsService=i,this.studyClassService=n,this.teacherResourcesService=r,this.state=a,this.translate=h,this.filter={student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null},this.filterChange=new D,this.weekdaysGrouped$=this.state.weekdays$.pipe(S(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.absenceConfirmationStatesGrouped$=this.state.absenceConfirmationStates$.pipe(S(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.presenceTypesGrouped$=this.state.presenceTypes$.pipe(S(g=>g.filter(we(fi)).filter(we(rt))),S(ot),S(lt),S(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.incidentTypesGrouped$=this.state.presenceTypes$.pipe(S(g=>g.filter(rt)),S(ot),S(lt),S(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(De(be({},this.filter),{dateFrom:nn(this.filter.dateFrom),dateTo:nn(this.filter.dateTo)}))}static{this.\u0275fac=function(i){return new(i||t)(f(Si),f(Mi),f(wi),f(tn),f(te),f($e))}}static{this.\u0275cmp=G({type:t,selectors:[["bkd-edit-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[pe([{provide:ri,useClass:oi},{provide:ai,useClass:ki}])],decls:60,vars:60,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"],[3,"valuesChange","options","values"],[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div",1)(2,"label",2),p(3),d(4,"translate"),c(),l(5,"bkd-typeahead",3),K("valueChange",function(a){return z(n.filter.student,a)||(n.filter.student=a),a}),c()(),l(6,"div",1)(7,"label",2),p(8),d(9,"translate"),c(),l(10,"bkd-typeahead",3),K("valueChange",function(a){return z(n.filter.educationalEvent,a)||(n.filter.educationalEvent=a),a}),c()(),l(11,"div",1)(12,"label",2),p(13),d(14,"translate"),c(),l(15,"bkd-typeahead",4),K("valueChange",function(a){return z(n.filter.studyClass,a)||(n.filter.studyClass=a),a}),c()(),l(16,"div",1)(17,"label",2),p(18),d(19,"translate"),c(),l(20,"bkd-typeahead",3),K("valueChange",function(a){return z(n.filter.teacher,a)||(n.filter.teacher=a),a}),c()(),l(21,"div",1)(22,"label",2),p(23),d(24,"translate"),c(),l(25,"bkd-date-select",5),K("valueChange",function(a){return z(n.filter.dateFrom,a)||(n.filter.dateFrom=a),a}),c()(),l(26,"div",1)(27,"label",2),p(28),d(29,"translate"),c(),l(30,"bkd-date-select",5),K("valueChange",function(a){return z(n.filter.dateTo,a)||(n.filter.dateTo=a),a}),c()(),l(31,"div",1)(32,"label",2),p(33),d(34,"translate"),c(),l(35,"bkd-multiselect",6),d(36,"async"),K("valuesChange",function(a){return z(n.filter.weekdays,a)||(n.filter.weekdays=a),a}),c()()(),l(37,"div",7)(38,"div",8)(39,"label",2),p(40),d(41,"translate"),c(),l(42,"bkd-multiselect",6),d(43,"async"),K("valuesChange",function(a){return z(n.filter.confirmationStates,a)||(n.filter.confirmationStates=a),a}),c()(),l(44,"div",8)(45,"label",2),p(46),d(47,"translate"),c(),l(48,"bkd-multiselect",6),d(49,"async"),K("valuesChange",function(a){return z(n.filter.presenceTypes,a)||(n.filter.presenceTypes=a),a}),c()(),l(50,"div",8)(51,"label",2),p(52),d(53,"translate"),c(),l(54,"bkd-multiselect",6),d(55,"async"),K("valuesChange",function(a){return z(n.filter.incidentTypes,a)||(n.filter.incidentTypes=a),a}),c()(),l(56,"div",9)(57,"button",10),x("click",function(){return n.show()}),p(58),d(59,"translate"),c()()()),i&2&&(o(3),I(u(4,30,"edit-absences.header.student")),o(2),_("typeaheadService",n.studentsService),Q("value",n.filter.student),o(3),I(u(9,32,"edit-absences.header.module-instance")),o(2),_("typeaheadService",n.educationalEventsService),Q("value",n.filter.educationalEvent),o(3),I(u(14,34,"edit-absences.header.study-class")),o(2),_("typeaheadService",n.studyClassService),Q("value",n.filter.studyClass),_("additionalHttpParams",n.classesHttpFilter),o(3),I(u(19,36,"edit-absences.header.teacher")),o(2),_("typeaheadService",n.teacherResourcesService),Q("value",n.filter.teacher),o(3),I(u(24,38,"edit-absences.header.date-from")),o(2),Q("value",n.filter.dateFrom),o(3),I(u(29,40,"edit-absences.header.date-to")),o(2),Q("value",n.filter.dateTo),o(3),I(u(34,42,"edit-absences.header.weekdays")),o(2),_("options",u(36,44,n.weekdaysGrouped$)),Q("values",n.filter.weekdays),o(5),I(u(41,46,"edit-absences.header.confirmation-state")),o(2),_("options",u(43,48,n.absenceConfirmationStatesGrouped$)),Q("values",n.filter.confirmationStates),o(4),I(u(47,50,"edit-absences.header.presence-type")),o(2),_("options",u(49,52,n.presenceTypesGrouped$)),Q("values",n.filter.presenceTypes),o(4),I(u(53,54,"edit-absences.header.incident")),o(2),_("options",u(55,56,n.incidentTypesGrouped$)),Q("values",n.filter.incidentTypes),o(4),C(" ",u(59,58,"edit-absences.header.show")," "))},dependencies:[Bi,Vi,Xi,ve,he],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return t})();function nn(t){return t?hi(t):null}var Ws=(t,s)=>s.id,Gs=()=>[],rn=t=>({count:t}),an=t=>({returnparams:t}),qs=t=>["student",t,"absences"];function Us(t,s){t&1&&B(0,"bkd-spinner")}function Qs(t,s){if(t&1&&(l(0,"div",5)(1,"div",9),p(2),d(3,"async"),d(4,"translate"),d(5,"translate"),c(),l(6,"a",10),d(7,"async"),l(8,"i",11),p(9,"edit"),c()()()),t&2){let e=m(4),i=Y(0);o(2),Ce(" ",ne(4,7,"edit-absences.list.total",X(15,rn,u(3,5,e.state.total$)||0)),", ",ne(5,10,"edit-absences.list.selected",X(17,rn,i.length))," "),o(4),q("disabled",i.length===0),_("queryParams",X(19,an,u(7,13,e.state.queryParamsString$)))}}function zs(t,s){if(t&1){let e=P();l(0,"tr")(1,"td",14),x("click",function(n){v(e);let r=U(3),a=m(5);return E(a.onCheckboxCellClick(n,r))}),l(2,"input",12,0),d(4,"async"),x("change",function(){let n=v(e).$implicit,r=m(5);return E(r.selectionService.toggle(n.lessonPresence))}),c()(),l(5,"td",13),d(6,"translate"),l(7,"span",15)(8,"i",11),p(9),c()()(),l(10,"td"),d(11,"translate"),l(12,"a",16),d(13,"async"),p(14),c(),B(15,"br"),p(16),c(),l(17,"td"),d(18,"translate"),p(19),d(20,"date"),c(),l(21,"td"),d(22,"translate"),p(23),d(24,"date"),d(25,"date"),c(),l(26,"td"),d(27,"translate"),p(28),c(),l(29,"td",17),d(30,"translate"),p(31),c(),l(32,"td"),d(33,"translate"),p(34),c()()}if(t&2){let e=s.$implicit,i=m(5);o(2),_("checked",u(4,21,i.selectionService.isSelected$(e.lessonPresence))),o(3),J("data-label",u(6,23,"edit-absences.list.header.presence")),o(2),_("className",e.presenceCategory),o(2),I(e.presenceCategoryIcon),o(),J("data-label",u(11,25,"edit-absences.list.header.mobil-student-module-instance-study-class")),o(2),_("routerLink",X(48,qs,e.lessonPresence.StudentRef.Id))("queryParams",X(50,an,u(13,27,i.profileReturnParams$))),o(2),C(" ",e.lessonPresence.StudentFullName," "),o(2),Ce(" ",e.lessonPresence.EventDesignation,", ",e.lessonPresence.StudyClassNumber," "),o(),J("data-label",u(18,29,"edit-absences.list.header.date")),o(2),C(" ",ne(20,31,e.lessonPresence.LessonDateTimeFrom,"mediumDate")," "),o(2),J("data-label",u(22,34,"edit-absences.list.header.time")),o(2),Ce(" ",ne(24,36,e.lessonPresence.LessonDateTimeFrom,"shortTime"),"\u2013",ne(25,39,e.lessonPresence.LessonDateTimeTo,"shortTime")," "),o(3),J("data-label",u(27,42,"edit-absences.list.header.confirmation-state")),o(2),C(" ",e.confirmationState==null?null:e.confirmationState.Value," "),o(),J("data-label",u(30,44,"edit-absences.list.header.mobil-presence-type-incident")),o(2),C(" ",e.presenceType==null?null:e.presenceType.Designation," "),o(),J("data-label",u(33,46,"edit-absences.list.header.teacher")),o(2),C(" ",e.lessonPresence.TeacherInformation," ")}}function Ks(t,s){if(t&1){let e=P();l(0,"table",6)(1,"thead")(2,"tr")(3,"th")(4,"input",12),x("change",function(n){v(e);let r=m(4);return E(r.toggleAll(n.currentTarget==null?null:n.currentTarget.checked))}),c()(),l(5,"th",13),p(6),d(7,"translate"),c(),l(8,"th"),p(9),d(10,"translate"),B(11,"br"),p(12),d(13,"translate"),d(14,"translate"),c(),l(15,"th"),p(16),d(17,"translate"),c(),l(18,"th"),p(19),d(20,"translate"),c(),l(21,"th"),p(22),d(23,"translate"),c(),l(24,"th"),p(25),d(26,"translate"),d(27,"translate"),c(),l(28,"th"),p(29),d(30,"translate"),c()()(),l(31,"tbody"),M(32,zs,35,52,"tr",null,Ws),c()()}if(t&2){m(4);let e=Y(0),i=Y(2);o(4),_("checked",e.length===i.length),o(2),C(" ",u(7,11,"edit-absences.list.header.presence")," "),o(3),C(" ",u(10,13,"edit-absences.list.header.student")," "),o(3),Ce(" ",u(13,15,"edit-absences.list.header.module-instance"),", ",u(14,17,"edit-absences.list.header.study-class")," "),o(4),C(" ",u(17,19,"edit-absences.list.header.date")," "),o(3),I(u(20,21,"edit-absences.list.header.time")),o(3),C(" ",u(23,23,"edit-absences.list.header.confirmation-state")," "),o(3),Ce(" ",u(26,25,"edit-absences.list.header.presence-type")," / ",u(27,27,"edit-absences.list.header.incident")," "),o(4),I(u(30,29,"edit-absences.list.header.teacher")),o(3),R(i)}}function Ys(t,s){t&1&&B(0,"bkd-spinner",7)}function Zs(t,s){if(t&1){let e=P();l(0,"button",18),x("click",function(){v(e);let n=m(4);return E(n.state.nextPage())}),p(1),d(2,"translate"),c()}t&2&&(o(),C(" ",u(2,1,"global.pagination.load-more")," "))}function Js(t,s){if(t&1){let e=P();l(0,"div",4),x("scrolled",function(){v(e);let n=m(3);return E(n.onScroll())}),b(1,Qs,10,21,"div",5)(2,Ks,34,31,"table",6)(3,Ys,1,0,"bkd-spinner",7)(4,Zs,3,3,"button",8),c()}if(t&2){m(3);let e=Y(2),i=Y(4),n=Y(6);o(),T(e&&e.length>0?1:-1),o(),T(e&&e.length>0?2:-1),o(),T(n?3:-1),o(),T(i&&!n?4:-1)}}function Xs(t,s){t&1&&(l(0,"p",2),p(1),d(2,"translate"),c()),t&2&&(o(),I(u(2,1,"edit-absences.no-entries")))}function er(t,s){if(t&1&&b(0,Js,5,4,"div",3)(1,Xs,3,3,"p",2),t&2){m(2);let e=Y(2),i=Y(6);T(e&&e.length>0||i?0:1)}}function tr(t,s){if(t&1&&(b(0,Us,1,0,"bkd-spinner"),d(1,"async"),b(2,er,2,1)),t&2){let e=m();T(u(1,1,e.state.loading$)?0:2)}}function ir(t,s){t&1&&(l(0,"p",2),p(1),d(2,"translate"),c()),t&2&&(o(),I(u(2,1,"edit-absences.no-filter")))}var on=(()=>{class t{constructor(e,i,n,r){this.state=e,this.selectionService=i,this.scrollPosition=n,this.route=r,this.filterFromParams$=this.route.queryParams.pipe(S(nr)),this.profileReturnParams$=this.state.queryParamsString$,this.destroy$=new re}ngOnInit(){this.filterFromParams$.pipe(ie(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(N(this.destroy$)).subscribe(()=>this.selectionService.clear()),this.selectionService.selection$.pipe(N(this.destroy$)).subscribe(e=>this.state.selected=e),this.route.queryParams.pipe(ie(1),S(({reload:e})=>e),Oe(pi)).subscribe(()=>this.state.resetEntries())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){this.state.entries$.pipe(ie(1)).subscribe(i=>this.selectionService.clear(e?i:null))}onCheckboxCellClick(e,i){e.target!==i&&i.click()}onScroll(){this.state.nextPage()}static{this.\u0275fac=function(i){return new(i||t)(f(te),f(qe),f(Oi),f(Ve))}}static{this.\u0275cmp=G({type:t,selectors:[["bkd-edit-absences-list"]],features:[pe([qe])],decls:16,vars:22,consts:[["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],["infiniteScroll","",1,"py-3"],["infiniteScroll","",1,"py-3",3,"scrolled"],[1,"d-flex","align-items-center","justify-content-between"],[1,"table","table-striped"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],[1,"total"],["routerLink","/edit-absences/edit",1,"edit","btn","btn-primary","btn-icon","mt-1","mb-2",3,"queryParams"],[1,"material-icons"],["type","checkbox",3,"change","checked"],[1,"presence-category"],[1,"edit-absences-checkbox",3,"click"],[3,"className"],[1,"student",3,"routerLink","queryParams"],[1,"designation-incident"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let r=P();oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),oe(6),d(7,"async"),l(8,"h1"),p(9),d(10,"translate"),c(),l(11,"bkd-edit-absences-header",1),d(12,"async"),x("filterChange",function(h){return v(r),E(n.state.setFilter(h))}),c(),b(13,tr,3,3),d(14,"async"),b(15,ir,3,3,"p",2)}if(i&2){let r;le((r=u(1,3,n.selectionService.selection$))!==null&&r!==void 0?r:Dt(21,Gs)),o(2),le(u(3,6,n.state.presenceControlEntries$)),o(2),le(u(5,9,n.state.hasMore$)),o(2),le(u(7,12,n.state.loadingPage$)),o(3),I(u(10,15,"edit-absences.title")),o(2),_("filter",u(12,17,n.filterFromParams$)),o(2),T(u(14,19,n.state.isFilterValid$)?13:15)}},dependencies:[sn,Ni,Wt,Ei,ve,Rt,he],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})}}return t})();function nr(t){return{student:t.student?Number(t.student):null,educationalEvent:t.educationalEvent?Number(t.educationalEvent):null,studyClass:t.studyClass?Number(t.studyClass):null,teacher:t.teacher??null,dateFrom:t.dateFrom?nt(t.dateFrom):null,dateTo:t.dateTo?nt(t.dateTo):null,weekdays:t.weekdays?t.weekdays.split(","):null,presenceTypes:t.presenceTypes?t.presenceTypes.split(",").map(Number):null,confirmationStates:t.confirmationStates?t.confirmationStates.split(",").map(Number):null,incidentTypes:t.incidentTypes?t.incidentTypes.split(",").map(Number):null}}var ln=(()=>{class t{constructor(e){this.state=e}static{this.\u0275fac=function(i){return new(i||t)(f(te))}}static{this.\u0275cmp=G({type:t,selectors:[["bkd-edit-absences"]],features:[pe([te,{provide:mi,useExisting:te},gi])],decls:1,vars:0,template:function(i,n){i&1&&B(0,"router-outlet")},dependencies:[jt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var po=[{path:"",component:ln,children:[{path:"",component:on,data:{restoreScrollPositionFrom:["/edit-absences/edit","/edit-absences/student/:id/addresses","/edit-absences/student/:id/absences","/edit-absences/student/:id/grades"]}},{path:"edit",component:Hi},xi]}];export{po as EDIT_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-RC3KCROY.js b/public/apps/webapp-schulverwaltung/chunk-N2RKIMWO.js similarity index 83% rename from public/apps/webapp-schulverwaltung/chunk-RC3KCROY.js rename to public/apps/webapp-schulverwaltung/chunk-N2RKIMWO.js index a7bca409..8b6273c1 100644 --- a/public/apps/webapp-schulverwaltung/chunk-RC3KCROY.js +++ b/public/apps/webapp-schulverwaltung/chunk-N2RKIMWO.js @@ -1,2 +1,2 @@ -import{y as b}from"./chunk-QTBTUQ3W.js";import{a as g}from"./chunk-HVJBOTRL.js";import{$ as i,B as f,Pd as E,jc as p,k as t,lc as d,m as u,zc as m}from"./chunk-S3H6YSFW.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(m),s=i(g),a=i(E);return r=>{if(r instanceof d&&!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 v(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 v(r){let c=a.instant("global.rest-errors.conflict-message"),l=H(r);s.error(l.length>0?l.join(` +import{y as b}from"./chunk-RXRYDGZR.js";import{a as g}from"./chunk-F4XODHS2.js";import{$ as i,B as f,Dc as m,Rd as E,k as t,m as u,nc as p,pc as d}from"./chunk-NEW5VGRB.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(m),s=i(g),a=i(E);return r=>{if(r instanceof d&&!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 v(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 v(r){let c=a.instant("global.rest-errors.conflict-message"),l=H(r);s.error(l.length>0?l.join(` `):c,a.instant("global.rest-errors.conflict-title"))}function H(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-NBXL4QFT.js b/public/apps/webapp-schulverwaltung/chunk-NBXL4QFT.js new file mode 100644 index 00000000..4068c208 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-NBXL4QFT.js @@ -0,0 +1 @@ +import{a as be,b as he,c as ye}from"./chunk-VANM6WSB.js";import{a as Ce}from"./chunk-Y3BQLEPF.js";import{a as me}from"./chunk-FN7XEGJE.js";import{a as pe}from"./chunk-SME4UDGV.js";import"./chunk-GCWE54XA.js";import"./chunk-DJNW6R6G.js";import"./chunk-N2RKIMWO.js";import{c as ae,e as D}from"./chunk-FMUJPUYQ.js";import"./chunk-SKUS47ZU.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import{a as ue,b as _e,c as ve}from"./chunk-2ZRHGKSY.js";import{f as se}from"./chunk-26VH6QDS.js";import{d as de}from"./chunk-JGKXAFYO.js";import"./chunk-A7EOJZ46.js";import"./chunk-ZELJ2QPT.js";import{a as fe}from"./chunk-UZJ4FIXB.js";import{D as oe,f as ne}from"./chunk-KQORGECX.js";import"./chunk-K42F6AEW.js";import"./chunk-NC6UEGAF.js";import{i as re,j as le}from"./chunk-SL67CYEF.js";import{h as ce}from"./chunk-HQSONWXM.js";import{u as ie}from"./chunk-RXRYDGZR.js";import"./chunk-F4XODHS2.js";import{$ as d,$a as P,$b as J,Bb as F,Bc as Y,Cb as w,Cc as Z,Db as I,Eb as R,Ec as ee,F as H,Fb as B,Gb as S,Hb as X,Ia as g,Ib as z,Jb as V,M as W,Nb as s,Ob as l,P as M,Pa as C,R as j,Ra as G,Sa as v,Sd as $,X as q,Xa as b,_a as T,ab as a,bb as r,cb as E,dc as K,ea as k,fa as A,gb as L,gc as Q,hd as te,ib as h,jb as m,ma as U,n as O,vb as u,wb as y,xb as f,ya as o}from"./chunk-NEW5VGRB.js";var x=(()=>{class e extends _e{constructor(){let t=d(J),i=d(re),n=d(te),_=d(ve);super(t,i,_,n,"/evaluate-absences"),this.lessonPresenceService=d(D),this.queryParamsString$.pipe(j(this.destroy$)).subscribe(p=>this.confirmBackLinkParams={returnparams:p})}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,n){return this.loadingService.load(this.lessonPresenceService.getStatistics(t,i,n),ue)}buildParamsFromFilter(t){return be(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=q({token:e,factory:e.\u0275fac})}}return e})();var Se=(()=>{class e{constructor(){this.studentsService=d(se),this.educationalEventsService=d(ye),this.studyClassesService=d(me),this.filter={student:null,educationalEvent:null,studyClass:null},this.filterChange=new U,this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(this.filter)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-evaluate-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},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,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"label",2),u(3),s(4,"translate"),r(),a(5,"bkd-typeahead",3),I("valueChange",function(p){return w(n.filter.student,p)||(n.filter.student=p),p}),r()(),a(6,"div",1)(7,"label",2),u(8),s(9,"translate"),r(),a(10,"bkd-typeahead",3),I("valueChange",function(p){return w(n.filter.educationalEvent,p)||(n.filter.educationalEvent=p),p}),r()(),a(11,"div",1)(12,"label",2),u(13),s(14,"translate"),r(),a(15,"bkd-typeahead",4),I("valueChange",function(p){return w(n.filter.studyClass,p)||(n.filter.studyClass=p),p}),r()(),a(16,"div",5)(17,"button",6),h("click",function(){return n.show()}),u(18),s(19,"translate"),r()()()),i&2&&(o(3),y(l(4,11,"evaluate-absences.header.student")),o(2),v("typeaheadService",n.studentsService),F("value",n.filter.student),o(3),y(l(9,13,"evaluate-absences.header.module-instance")),o(2),v("typeaheadService",n.educationalEventsService),F("value",n.filter.educationalEvent),o(3),y(l(14,15,"evaluate-absences.header.study-class")),o(2),v("typeaheadService",n.studyClassesService),F("value",n.filter.studyClass),v("additionalHttpParams",n.classesHttpFilter),o(3),f(" ",l(19,17,"evaluate-absences.header.show")," "))},dependencies:[Ce,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:1rem 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return e})();var ge=(e,c)=>c.key,Ae=(e,c)=>c.StudentRef.Id,Le=()=>[],Te=e=>["student",e,"absences"],Pe=e=>({returnparams:e});function Fe(e,c){e&1&&E(0,"bkd-spinner")}function we(e,c){if(e&1){let t=L();a(0,"th",9),h("click",function(){let n=k(t).$implicit,_=m(4);return A(_.state.sortService.toggleSorting(n.key))}),a(1,"div",10)(2,"div",11),s(3,"translate"),u(4),s(5,"translate"),r(),a(6,"div",12),u(7),s(8,"async"),r()()()}if(e&2){let t=c.$implicit,i=m(4);v("ngClass",t.label),o(2),v("ngbTooltip",l(3,4,"evaluate-absences.list.header."+t.label)),o(2),f(" ",l(5,6,"evaluate-absences.list.header."+t.label)," "),o(3),f(" ",l(8,8,i.state.sortService.getSortingChar$(t.key))," ")}}function Ie(e,c){if(e&1&&(a(0,"a",13),s(1,"async"),u(2),r()),e&2){let t=m().$implicit,i=m().$implicit,n=m(5);v("routerLink",V(5,Te,i.StudentRef.Id))("queryParams",V(7,Pe,l(1,3,n.profileReturnParams$))),o(2),f(" ",i[t.key]," ")}}function Re(e,c){if(e&1&&u(0),e&2){let t=m().$implicit,i=m().$implicit;f(" ",i[t.key]," ")}}function Be(e,c){if(e&1&&(a(0,"td"),s(1,"translate"),C(2,Ie,3,9,"a",13)(3,Re,1,1),r()),e&2){let t=c.$implicit;G("data-label",l(1,2,"evaluate-absences.list.header."+t.label)),o(2),b(t.key==="StudentFullName"?2:3)}}function $e(e,c){if(e&1&&(a(0,"tr"),T(1,Be,4,4,"td",null,ge),r()),e&2){let t=m(5);o(),P(t.columns)}}function De(e,c){if(e&1&&(a(0,"tbody"),T(1,$e,3,0,"tr",null,Ae),r()),e&2){m(4);let t=S(0);o(),P(t)}}function Me(e,c){e&1&&E(0,"bkd-spinner",7)}function Ve(e,c){if(e&1){let t=L();a(0,"button",14),h("click",function(){k(t);let n=m(4);return A(n.state.nextPage())}),u(1),s(2,"translate"),r()}e&2&&(o(),f(" ",l(2,1,"global.pagination.load-more")," "))}function Ne(e,c){if(e&1){let t=L();a(0,"div",2)(1,"div",3),E(2,"bkd-reports-link",4),s(3,"async"),r(),a(4,"table",5),h("scrolled",function(){k(t);let n=m(3);return A(n.onScroll())}),a(5,"thead")(6,"tr"),T(7,we,9,10,"th",6,ge),r()(),C(9,De,3,0,"tbody"),r(),C(10,Me,1,0,"bkd-spinner",7)(11,Ve,3,3,"button",8),r()}if(e&2){let t,i=m(3),n=S(0),_=S(2),p=S(4);o(2),v("reports",(t=l(3,4,i.reports$))!==null&&t!==void 0?t:z(6,Le)),o(5),P(i.columns),o(2),b(n&&n.length>0?9:-1),o(),b(p?10:-1),o(),b(_&&!p?11:-1)}}function Oe(e,c){e&1&&(a(0,"p",1),u(1),s(2,"translate"),r()),e&2&&(o(),f(" ",l(2,1,"evaluate-absences.no-entries")," "))}function He(e,c){if(e&1&&C(0,Ne,12,7,"div",2)(1,Oe,3,3,"p",1),e&2){m(2);let t=S(0),i=S(4);b(t&&t.length>0||i?0:1)}}function We(e,c){if(e&1&&(C(0,Fe,1,0,"bkd-spinner"),s(1,"async"),C(2,He,2,1)),e&2){let t=m();b(l(1,1,t.state.loading$)?0:2)}}function je(e,c){e&1&&(a(0,"p",1),u(1),s(2,"translate"),r()),e&2&&(o(),y(l(2,1,"evaluate-absences.no-filter")))}var Ee=(()=>{class e{constructor(){this.state=d(x),this.scrollPosition=d(fe),this.route=d(Y),this.presenceTypesService=d(ne),this.reportsService=d(de),this.lessonPresencesService=d(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(O(qe)),this.profileReturnParams$=this.state.queryParamsString$}ngOnInit(){this.filterFromParams$.pipe(H(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(M(t=>this.lessonPresencesService.getLessonRefs(t)),M(t=>t.length>0?this.reportsService.getEvaluateAbsencesReports(this.getReportRecordIds(t)):[]),W(1))}getReportRecordIds(t){return t.map(i=>`${i.LessonRef.Id}_${i.RegistrationRef.Id}`)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-evaluate-absences-list"]],decls:14,vars:18,consts:[[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"buttons"],[1,"mb-2",3,"reports"],["infiniteScroll","",1,"table","table-striped","table-fixed",3,"scrolled"],["scope","col",3,"ngClass"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],["scope","col",3,"click","ngClass"],[1,"d-flex"],[1,"column-title",3,"ngbTooltip"],[1,"sort-direction"],[1,"student",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let _=L();R(0),s(1,"async"),R(2),s(3,"async"),R(4),s(5,"async"),a(6,"h1"),u(7),s(8,"translate"),r(),a(9,"bkd-evaluate-absences-header",0),s(10,"async"),h("filterChange",function(ke){return k(_),A(n.state.setFilter(ke))}),r(),C(11,We,3,3),s(12,"async"),C(13,je,3,3,"p",1)}i&2&&(B(l(1,3,n.state.entries$)),o(2),B(l(3,6,n.state.hasMore$)),o(2),B(l(5,9,n.state.loadingPage$)),o(3),y(l(8,12,"evaluate-absences.title")),o(2),v("filter",l(10,14,n.filterFromParams$)),o(2),b(l(12,16,n.state.isFilterValid$)?11:13))},dependencies:[Se,le,he,K,ie,ee,ce,Q,$],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})}}return e})();function qe(e){return{student:e.student?Number(e.student):null,educationalEvent:e.educationalEvent?Number(e.educationalEvent):null,studyClass:e.studyClass?Number(e.studyClass):null}}var xe=(()=>{class e{constructor(){this.state=d(x)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-evaluate-absences"]],features:[X([x,{provide:ae,useExisting:x},oe])],decls:1,vars:0,template:function(i,n){i&1&&E(0,"router-outlet")},dependencies:[Z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Wt=[{path:"",component:xe,children:[{path:"",component:Ee,data:{restoreScrollPositionFrom:["/evaluate-absences/student/:id"]}},pe]}];export{Wt as EVALUATE_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-A7CCEKNQ.js b/public/apps/webapp-schulverwaltung/chunk-NC6UEGAF.js similarity index 99% rename from public/apps/webapp-schulverwaltung/chunk-A7CCEKNQ.js rename to public/apps/webapp-schulverwaltung/chunk-NC6UEGAF.js index 9b0ad73f..0bd8ba5a 100644 --- a/public/apps/webapp-schulverwaltung/chunk-A7CCEKNQ.js +++ b/public/apps/webapp-schulverwaltung/chunk-NC6UEGAF.js @@ -1 +1 @@ -import{a as P,b as q,f as h,g as u,h as N}from"./chunk-2AZMKO7X.js";import{a as E,b as C}from"./chunk-S3H6YSFW.js";function Y(t,r){let e=u(t,r?.in);return e.setHours(0,0,0,0),e}function S(t){let r=u(t),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+t-+e}function L(t,r,e){let[n,a]=N(e?.in,t,r),o=Y(n),i=Y(a),c=+o-S(o),f=+i-S(i);return Math.round((c-f)/q)}var ot={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"}},H=(t,r,e)=>{let n,a=ot[t];return typeof a=="string"?n=a:r===1?n=a.one:n=a.other.replace("{{count}}",r.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function M(t){return(r={})=>{let e=r.width?String(r.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var it={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:M({formats:it,defaultWidth:"full"}),time:M({formats:st,defaultWidth:"full"}),dateTime:M({formats:ut,defaultWidth:"full"})};var ct={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},I=(t,r,e,n)=>ct[t];function x(t){return(r,e)=>{let n=e?.context?String(e.context):"standalone",a;if(n==="formatting"&&t.formattingValues){let i=t.defaultFormattingWidth||t.defaultWidth,c=e?.width?String(e.width):i;a=t.formattingValues[c]||t.formattingValues[i]}else{let i=t.defaultWidth,c=e?.width?String(e.width):t.defaultWidth;a=t.values[c]||t.values[i]}let o=t.argumentCallback?t.argumentCallback(r):r;return a[o]}}var dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={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"]},ht={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"]},lt={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"}},gt={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"}},pt=(t,r)=>{let e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},X={ordinalNumber:pt,era:x({values:dt,defaultWidth:"wide"}),quarter:x({values:mt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:x({values:ft,defaultWidth:"wide"}),day:x({values:ht,defaultWidth:"wide"}),dayPeriod:x({values:lt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function O(t){return(r,e={})=>{let n=e.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=r.match(a);if(!o)return null;let i=o[0],c=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(c)?yt(c,d=>d.test(i)):wt(c,d=>d.test(i)),l;l=t.valueCallback?t.valueCallback(f):f,l=e.valueCallback?e.valueCallback(l):l;let m=r.slice(i.length);return{value:l,rest:m}}}function wt(t,r){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&r(t[e]))return e}function yt(t,r){for(let e=0;e{let n=r.match(t.matchPattern);if(!n)return null;let a=n[0],o=r.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=e.valueCallback?e.valueCallback(i):i;let c=r.slice(a.length);return{value:i,rest:c}}}var bt=/^(\d+)(th|st|nd|rd)?/i,xt=/\d+/i,Ot={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},kt={any:[/^b/i,/^(a|c)/i]},Pt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Mt={any:[/1/i,/2/i,/3/i,/4/i]},Dt={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},Wt={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]},vt={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},Yt={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]},St={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},Tt={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}},G={ordinalNumber:_({matchPattern:bt,parsePattern:xt,valueCallback:t=>parseInt(t,10)}),era:O({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:kt,defaultParseWidth:"any"}),quarter:O({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:Mt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:O({matchPatterns:Dt,defaultMatchWidth:"wide",parsePatterns:Wt,defaultParseWidth:"any"}),day:O({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:O({matchPatterns:St,defaultMatchWidth:"any",parsePatterns:Tt,defaultParseWidth:"any"})};var T={code:"en-US",formatDistance:H,formatLong:Q,formatRelative:I,localize:X,match:G,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Ft={};function w(){return Ft}function B(t,r){let e=u(t,r?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function R(t,r){let e=u(t,r?.in);return L(e,B(e))+1}function g(t,r){let e=w(),n=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,a=u(t,r?.in),o=a.getDay(),i=(o=o.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}function j(t,r){let e=D(t,r),n=h(r?.in||t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),y(n)}function A(t,r){let e=u(t,r?.in),n=+y(e)-+j(e);return Math.round(n/P)+1}function W(t,r){let e=u(t,r?.in),n=e.getFullYear(),a=w(),o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=h(r?.in||t,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);let c=g(i,r),f=h(r?.in||t,0);f.setFullYear(n,0,o),f.setHours(0,0,0,0);let l=g(f,r);return+e>=+c?n+1:+e>=+l?n:n-1}function V(t,r){let e=w(),n=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,a=W(t,r),o=h(r?.in||t,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),g(o,r)}function J(t,r){let e=u(t,r?.in),n=+g(e,r)-+V(e,r);return Math.round(n/P)+1}function s(t,r){let e=t<0?"-":"",n=Math.abs(t).toString().padStart(r,"0");return e+n}var p={y(t,r){let e=t.getFullYear(),n=e>0?e:1-e;return s(r==="yy"?n%100:n,r.length)},M(t,r){let e=t.getMonth();return r==="M"?String(e+1):s(e+1,2)},d(t,r){return s(t.getDate(),r.length)},a(t,r){let e=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(t,r){return s(t.getHours()%12||12,r.length)},H(t,r){return s(t.getHours(),r.length)},m(t,r){return s(t.getMinutes(),r.length)},s(t,r){return s(t.getSeconds(),r.length)},S(t,r){let e=r.length,n=t.getMilliseconds(),a=Math.trunc(n*Math.pow(10,e-3));return s(a,r.length)}};var k={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},F={G:function(t,r,e){let n=t.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(t,r,e){if(r==="yo"){let n=t.getFullYear(),a=n>0?n:1-n;return e.ordinalNumber(a,{unit:"year"})}return p.y(t,r)},Y:function(t,r,e,n){let a=W(t,n),o=a>0?a:1-a;if(r==="YY"){let i=o%100;return s(i,2)}return r==="Yo"?e.ordinalNumber(o,{unit:"year"}):s(o,r.length)},R:function(t,r){let e=D(t);return s(e,r.length)},u:function(t,r){let e=t.getFullYear();return s(e,r.length)},Q:function(t,r,e){let n=Math.ceil((t.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return s(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,r,e){let n=Math.ceil((t.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return s(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,r,e){let n=t.getMonth();switch(r){case"M":case"MM":return p.M(t,r);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(t,r,e){let n=t.getMonth();switch(r){case"L":return String(n+1);case"LL":return s(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(t,r,e,n){let a=J(t,n);return r==="wo"?e.ordinalNumber(a,{unit:"week"}):s(a,r.length)},I:function(t,r,e){let n=A(t);return r==="Io"?e.ordinalNumber(n,{unit:"week"}):s(n,r.length)},d:function(t,r,e){return r==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):p.d(t,r)},D:function(t,r,e){let n=R(t);return r==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):s(n,r.length)},E:function(t,r,e){let n=t.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(t,r,e,n){let a=t.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return s(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,e,n){let a=t.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return s(o,r.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,e){let n=t.getDay(),a=n===0?7:n;switch(r){case"i":return String(a);case"ii":return s(a,r.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(t,r,e){let a=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,e){let n=t.getHours(),a;switch(n===12?a=k.noon:n===0?a=k.midnight:a=n/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,e){let n=t.getHours(),a;switch(n>=17?a=k.evening:n>=12?a=k.afternoon:n>=4?a=k.morning:a=k.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,e){if(r==="ho"){let n=t.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return p.h(t,r)},H:function(t,r,e){return r==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):p.H(t,r)},K:function(t,r,e){let n=t.getHours()%12;return r==="Ko"?e.ordinalNumber(n,{unit:"hour"}):s(n,r.length)},k:function(t,r,e){let n=t.getHours();return n===0&&(n=24),r==="ko"?e.ordinalNumber(n,{unit:"hour"}):s(n,r.length)},m:function(t,r,e){return r==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):p.m(t,r)},s:function(t,r,e){return r==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):p.s(t,r)},S:function(t,r){return p.S(t,r)},X:function(t,r,e){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return z(n);case"XXXX":case"XX":return b(n);case"XXXXX":case"XXX":default:return b(n,":")}},x:function(t,r,e){let n=t.getTimezoneOffset();switch(r){case"x":return z(n);case"xxxx":case"xx":return b(n);case"xxxxx":case"xxx":default:return b(n,":")}},O:function(t,r,e){let n=t.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+$(n,":");case"OOOO":default:return"GMT"+b(n,":")}},z:function(t,r,e){let n=t.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+$(n,":");case"zzzz":default:return"GMT"+b(n,":")}},t:function(t,r,e){let n=Math.trunc(+t/1e3);return s(n,r.length)},T:function(t,r,e){return s(+t,r.length)}};function $(t,r=""){let e=t>0?"-":"+",n=Math.abs(t),a=Math.trunc(n/60),o=n%60;return o===0?e+String(a):e+String(a)+r+s(o,2)}function z(t,r){return t%60===0?(t>0?"-":"+")+s(Math.abs(t)/60,2):b(t,r)}function b(t,r=""){let e=t>0?"-":"+",n=Math.abs(t),a=s(Math.trunc(n/60),2),o=s(n%60,2);return e+a+r+o}var U=(t,r)=>{switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Z=(t,r)=>{switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Et=(t,r)=>{let e=t.match(/(P+)(p+)?/)||[],n=e[1],a=e[2];if(!a)return U(t,r);let o;switch(n){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",U(n,r)).replace("{{time}}",Z(a,r))},K={p:Z,P:Et};var Ct=/^D+$/,qt=/^Y+$/,Nt=["D","DD","YY","YYYY"];function tt(t){return Ct.test(t)}function et(t){return qt.test(t)}function rt(t,r,e){let n=Lt(t,r,e);if(console.warn(n),Nt.includes(t))throw new RangeError(n)}function Lt(t,r,e){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${r}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function nt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function at(t){return!(!nt(t)&&typeof t!="number"||isNaN(+u(t)))}var Ht=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,Xt=/''/g,_t=/[a-zA-Z]/;function Tr(t,r,e){let n=w(),a=e?.locale??n.locale??T,o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,c=u(t,e?.in);if(!at(c))throw new RangeError("Invalid time value");let f=r.match(Qt).map(m=>{let d=m[0];if(d==="p"||d==="P"){let v=K[d];return v(m,a.formatLong)}return m}).join("").match(Ht).map(m=>{if(m==="''")return{isToken:!1,value:"'"};let d=m[0];if(d==="'")return{isToken:!1,value:Gt(m)};if(F[d])return{isToken:!0,value:m};if(d.match(_t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(f=a.localize.preprocessor(c,f));let l={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return f.map(m=>{if(!m.isToken)return m.value;let d=m.value;(!e?.useAdditionalWeekYearTokens&&et(d)||!e?.useAdditionalDayOfYearTokens&&tt(d))&&rt(d,r,String(t));let v=F[d[0]];return v(c,d,a.localize,l)}).join("")}function Gt(t){let r=t.match(It);return r?r[1].replace(Xt,"'"):t}export{w as a,g as b,y as c,S as d,Y as e,L as f,T as g,A as h,W as i,J as j,K as k,tt as l,et as m,rt as n,Tr as o}; +import{a as P,b as q,f as h,g as u,h as N}from"./chunk-SL67CYEF.js";import{a as E,b as C}from"./chunk-NEW5VGRB.js";function Y(t,r){let e=u(t,r?.in);return e.setHours(0,0,0,0),e}function S(t){let r=u(t),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+t-+e}function L(t,r,e){let[n,a]=N(e?.in,t,r),o=Y(n),i=Y(a),c=+o-S(o),f=+i-S(i);return Math.round((c-f)/q)}var ot={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"}},H=(t,r,e)=>{let n,a=ot[t];return typeof a=="string"?n=a:r===1?n=a.one:n=a.other.replace("{{count}}",r.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function M(t){return(r={})=>{let e=r.width?String(r.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var it={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:M({formats:it,defaultWidth:"full"}),time:M({formats:st,defaultWidth:"full"}),dateTime:M({formats:ut,defaultWidth:"full"})};var ct={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},I=(t,r,e,n)=>ct[t];function x(t){return(r,e)=>{let n=e?.context?String(e.context):"standalone",a;if(n==="formatting"&&t.formattingValues){let i=t.defaultFormattingWidth||t.defaultWidth,c=e?.width?String(e.width):i;a=t.formattingValues[c]||t.formattingValues[i]}else{let i=t.defaultWidth,c=e?.width?String(e.width):t.defaultWidth;a=t.values[c]||t.values[i]}let o=t.argumentCallback?t.argumentCallback(r):r;return a[o]}}var dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={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"]},ht={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"]},lt={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"}},gt={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"}},pt=(t,r)=>{let e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},X={ordinalNumber:pt,era:x({values:dt,defaultWidth:"wide"}),quarter:x({values:mt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:x({values:ft,defaultWidth:"wide"}),day:x({values:ht,defaultWidth:"wide"}),dayPeriod:x({values:lt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function O(t){return(r,e={})=>{let n=e.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=r.match(a);if(!o)return null;let i=o[0],c=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(c)?yt(c,d=>d.test(i)):wt(c,d=>d.test(i)),l;l=t.valueCallback?t.valueCallback(f):f,l=e.valueCallback?e.valueCallback(l):l;let m=r.slice(i.length);return{value:l,rest:m}}}function wt(t,r){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&r(t[e]))return e}function yt(t,r){for(let e=0;e{let n=r.match(t.matchPattern);if(!n)return null;let a=n[0],o=r.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=e.valueCallback?e.valueCallback(i):i;let c=r.slice(a.length);return{value:i,rest:c}}}var bt=/^(\d+)(th|st|nd|rd)?/i,xt=/\d+/i,Ot={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},kt={any:[/^b/i,/^(a|c)/i]},Pt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Mt={any:[/1/i,/2/i,/3/i,/4/i]},Dt={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},Wt={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]},vt={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},Yt={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]},St={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},Tt={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}},G={ordinalNumber:_({matchPattern:bt,parsePattern:xt,valueCallback:t=>parseInt(t,10)}),era:O({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:kt,defaultParseWidth:"any"}),quarter:O({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:Mt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:O({matchPatterns:Dt,defaultMatchWidth:"wide",parsePatterns:Wt,defaultParseWidth:"any"}),day:O({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:O({matchPatterns:St,defaultMatchWidth:"any",parsePatterns:Tt,defaultParseWidth:"any"})};var T={code:"en-US",formatDistance:H,formatLong:Q,formatRelative:I,localize:X,match:G,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Ft={};function w(){return Ft}function B(t,r){let e=u(t,r?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function R(t,r){let e=u(t,r?.in);return L(e,B(e))+1}function g(t,r){let e=w(),n=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,a=u(t,r?.in),o=a.getDay(),i=(o=o.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}function j(t,r){let e=D(t,r),n=h(r?.in||t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),y(n)}function A(t,r){let e=u(t,r?.in),n=+y(e)-+j(e);return Math.round(n/P)+1}function W(t,r){let e=u(t,r?.in),n=e.getFullYear(),a=w(),o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=h(r?.in||t,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);let c=g(i,r),f=h(r?.in||t,0);f.setFullYear(n,0,o),f.setHours(0,0,0,0);let l=g(f,r);return+e>=+c?n+1:+e>=+l?n:n-1}function V(t,r){let e=w(),n=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,a=W(t,r),o=h(r?.in||t,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),g(o,r)}function J(t,r){let e=u(t,r?.in),n=+g(e,r)-+V(e,r);return Math.round(n/P)+1}function s(t,r){let e=t<0?"-":"",n=Math.abs(t).toString().padStart(r,"0");return e+n}var p={y(t,r){let e=t.getFullYear(),n=e>0?e:1-e;return s(r==="yy"?n%100:n,r.length)},M(t,r){let e=t.getMonth();return r==="M"?String(e+1):s(e+1,2)},d(t,r){return s(t.getDate(),r.length)},a(t,r){let e=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(t,r){return s(t.getHours()%12||12,r.length)},H(t,r){return s(t.getHours(),r.length)},m(t,r){return s(t.getMinutes(),r.length)},s(t,r){return s(t.getSeconds(),r.length)},S(t,r){let e=r.length,n=t.getMilliseconds(),a=Math.trunc(n*Math.pow(10,e-3));return s(a,r.length)}};var k={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},F={G:function(t,r,e){let n=t.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(t,r,e){if(r==="yo"){let n=t.getFullYear(),a=n>0?n:1-n;return e.ordinalNumber(a,{unit:"year"})}return p.y(t,r)},Y:function(t,r,e,n){let a=W(t,n),o=a>0?a:1-a;if(r==="YY"){let i=o%100;return s(i,2)}return r==="Yo"?e.ordinalNumber(o,{unit:"year"}):s(o,r.length)},R:function(t,r){let e=D(t);return s(e,r.length)},u:function(t,r){let e=t.getFullYear();return s(e,r.length)},Q:function(t,r,e){let n=Math.ceil((t.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return s(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,r,e){let n=Math.ceil((t.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return s(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,r,e){let n=t.getMonth();switch(r){case"M":case"MM":return p.M(t,r);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(t,r,e){let n=t.getMonth();switch(r){case"L":return String(n+1);case"LL":return s(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(t,r,e,n){let a=J(t,n);return r==="wo"?e.ordinalNumber(a,{unit:"week"}):s(a,r.length)},I:function(t,r,e){let n=A(t);return r==="Io"?e.ordinalNumber(n,{unit:"week"}):s(n,r.length)},d:function(t,r,e){return r==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):p.d(t,r)},D:function(t,r,e){let n=R(t);return r==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):s(n,r.length)},E:function(t,r,e){let n=t.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(t,r,e,n){let a=t.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return s(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,e,n){let a=t.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return s(o,r.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,e){let n=t.getDay(),a=n===0?7:n;switch(r){case"i":return String(a);case"ii":return s(a,r.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(t,r,e){let a=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,e){let n=t.getHours(),a;switch(n===12?a=k.noon:n===0?a=k.midnight:a=n/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,e){let n=t.getHours(),a;switch(n>=17?a=k.evening:n>=12?a=k.afternoon:n>=4?a=k.morning:a=k.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,e){if(r==="ho"){let n=t.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return p.h(t,r)},H:function(t,r,e){return r==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):p.H(t,r)},K:function(t,r,e){let n=t.getHours()%12;return r==="Ko"?e.ordinalNumber(n,{unit:"hour"}):s(n,r.length)},k:function(t,r,e){let n=t.getHours();return n===0&&(n=24),r==="ko"?e.ordinalNumber(n,{unit:"hour"}):s(n,r.length)},m:function(t,r,e){return r==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):p.m(t,r)},s:function(t,r,e){return r==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):p.s(t,r)},S:function(t,r){return p.S(t,r)},X:function(t,r,e){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return z(n);case"XXXX":case"XX":return b(n);case"XXXXX":case"XXX":default:return b(n,":")}},x:function(t,r,e){let n=t.getTimezoneOffset();switch(r){case"x":return z(n);case"xxxx":case"xx":return b(n);case"xxxxx":case"xxx":default:return b(n,":")}},O:function(t,r,e){let n=t.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+$(n,":");case"OOOO":default:return"GMT"+b(n,":")}},z:function(t,r,e){let n=t.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+$(n,":");case"zzzz":default:return"GMT"+b(n,":")}},t:function(t,r,e){let n=Math.trunc(+t/1e3);return s(n,r.length)},T:function(t,r,e){return s(+t,r.length)}};function $(t,r=""){let e=t>0?"-":"+",n=Math.abs(t),a=Math.trunc(n/60),o=n%60;return o===0?e+String(a):e+String(a)+r+s(o,2)}function z(t,r){return t%60===0?(t>0?"-":"+")+s(Math.abs(t)/60,2):b(t,r)}function b(t,r=""){let e=t>0?"-":"+",n=Math.abs(t),a=s(Math.trunc(n/60),2),o=s(n%60,2);return e+a+r+o}var U=(t,r)=>{switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Z=(t,r)=>{switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Et=(t,r)=>{let e=t.match(/(P+)(p+)?/)||[],n=e[1],a=e[2];if(!a)return U(t,r);let o;switch(n){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",U(n,r)).replace("{{time}}",Z(a,r))},K={p:Z,P:Et};var Ct=/^D+$/,qt=/^Y+$/,Nt=["D","DD","YY","YYYY"];function tt(t){return Ct.test(t)}function et(t){return qt.test(t)}function rt(t,r,e){let n=Lt(t,r,e);if(console.warn(n),Nt.includes(t))throw new RangeError(n)}function Lt(t,r,e){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${r}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function nt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function at(t){return!(!nt(t)&&typeof t!="number"||isNaN(+u(t)))}var Ht=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,Xt=/''/g,_t=/[a-zA-Z]/;function Tr(t,r,e){let n=w(),a=e?.locale??n.locale??T,o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,c=u(t,e?.in);if(!at(c))throw new RangeError("Invalid time value");let f=r.match(Qt).map(m=>{let d=m[0];if(d==="p"||d==="P"){let v=K[d];return v(m,a.formatLong)}return m}).join("").match(Ht).map(m=>{if(m==="''")return{isToken:!1,value:"'"};let d=m[0];if(d==="'")return{isToken:!1,value:Gt(m)};if(F[d])return{isToken:!0,value:m};if(d.match(_t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(f=a.localize.preprocessor(c,f));let l={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return f.map(m=>{if(!m.isToken)return m.value;let d=m.value;(!e?.useAdditionalWeekYearTokens&&et(d)||!e?.useAdditionalDayOfYearTokens&&tt(d))&&rt(d,r,String(t));let v=F[d[0]];return v(c,d,a.localize,l)}).join("")}function Gt(t){let r=t.match(It);return r?r[1].replace(Xt,"'"):t}export{w as a,g as b,y as c,S as d,Y as e,L as f,T as g,A as h,W as i,J as j,K as k,tt as l,et as m,rt as n,Tr as o}; diff --git a/public/apps/webapp-schulverwaltung/chunk-NEW5VGRB.js b/public/apps/webapp-schulverwaltung/chunk-NEW5VGRB.js new file mode 100644 index 00000000..fad76e1d --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-NEW5VGRB.js @@ -0,0 +1,9 @@ +var ix=Object.defineProperty,sx=Object.defineProperties;var ax=Object.getOwnPropertyDescriptors;var na=Object.getOwnPropertySymbols;var sg=Object.prototype.hasOwnProperty,ag=Object.prototype.propertyIsEnumerable;var ig=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||={})sg.call(t,n)&&ig(e,n,t[n]);if(na)for(var n of na(t))ag.call(t,n)&&ig(e,n,t[n]);return e},F=(e,t)=>sx(e,ax(t));var ux=(e,t)=>{var n={};for(var r in e)sg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&na)for(var r of na(e))t.indexOf(r)<0&&ag.call(e,r)&&(n[r]=e[r]);return n};var Ec=(e,t,n)=>new Promise((r,o)=>{var i=u=>{try{a(n.next(u))}catch(l){o(l)}},s=u=>{try{a(n.throw(u))}catch(l){o(l)}},a=u=>u.done?r(u.value):Promise.resolve(u.value).then(i,s);a((n=n.apply(e,t)).next())});function lg(e,t){return Object.is(e,t)}var ve=null,bi=!1,Tc=1,Me=Symbol("SIGNAL");function V(e){let t=ve;return ve=e,t}function cg(){return ve}function lx(){return bi}var pr={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,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ei(e){if(bi)throw new Error("");if(ve===null)return;ve.consumerOnSignalRead(e);let t=ve.nextProducerIndex++;if(ia(ve),te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function _i(e){ia(e);for(let t=0;t0}function ia(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function mg(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function vg(e){return e.producerNode!==void 0}function Sc(e){let t=Object.create(dx);t.computation=e;let n=()=>{if(dg(t),Ei(t),t.value===ra)throw t.error;return t.value};return n[Me]=t,n}var Ic=Symbol("UNSET"),_c=Symbol("COMPUTING"),ra=Symbol("ERRORED"),dx=F(y({},pr),{value:Ic,dirty:!0,error:null,equal:lg,kind:"computed",producerMustRecompute(e){return e.value===Ic||e.value===_c},producerRecomputeValue(e){if(e.value===_c)throw new Error("Detected cycle in computations.");let t=e.value;e.value=_c;let n=Jr(e),r,o=!1;try{r=e.computation(),V(null),o=t!==Ic&&t!==ra&&r!==ra&&e.equal(t,r)}catch(i){r=ra,e.error=i}finally{Ii(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function fx(){throw new Error}var yg=fx;function Dg(){yg()}function wg(e){yg=e}var px=null;function bg(e){let t=Object.create(Mc);t.value=e;let n=()=>(Ei(t),t.value);return n[Me]=t,n}function xi(e,t){pg()||Dg(),e.equal(e.value,t)||(e.value=t,hx(e))}function Cg(e,t){pg()||Dg(),xi(e,t(e.value))}var Mc=F(y({},pr),{equal:lg,value:void 0,kind:"signal"});function hx(e){e.version++,cx(),fg(e),px?.()}function Eg(e,t,n){let r=Object.create(gx);n&&(r.consumerAllowSignalWrites=!0),r.fn=e,r.schedule=t;let o=u=>{r.cleanupFn=u};function i(u){return u.fn===null&&u.schedule===null}function s(u){i(u)||(Xr(u),u.cleanupFn(),u.fn=null,u.schedule=null,u.cleanupFn=xc)}let a=()=>{if(r.fn===null)return;if(lx())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(r.dirty=!1,r.hasRun&&!_i(r))return;r.hasRun=!0;let u=Jr(r);try{r.cleanupFn(),r.cleanupFn=xc,r.fn(o)}finally{Ii(r,u)}};return r.ref={notify:()=>hg(r),run:a,cleanup:()=>r.cleanupFn(),destroy:()=>s(r),[Me]:r},r.ref}var xc=()=>{},gx=F(y({},pr),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{e.schedule!==null&&e.schedule(e.ref)},hasRun:!1,cleanupFn:xc});function S(e){return typeof e=="function"}function eo(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var sa=eo(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription: +${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(` + `)}`:"",this.name="UnsubscriptionError",this.errors=n});function hr(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var se=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(S(r))try{r()}catch(i){t=i instanceof sa?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{Ig(i)}catch(s){t=t??[],s instanceof sa?t=[...t,...s.errors]:t.push(s)}}if(t)throw new sa(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Ig(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&hr(n,t)}remove(t){let{_finalizers:n}=this;n&&hr(n,t),t instanceof e&&t._removeParent(this)}};se.EMPTY=(()=>{let e=new se;return e.closed=!0,e})();var Ac=se.EMPTY;function aa(e){return e instanceof se||e&&"closed"in e&&S(e.remove)&&S(e.add)&&S(e.unsubscribe)}function Ig(e){S(e)?e():e.unsubscribe()}var Et={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var to={setTimeout(e,t,...n){let{delegate:r}=to;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=to;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ua(e){to.setTimeout(()=>{let{onUnhandledError:t}=Et;if(t)t(e);else throw e})}function Zt(){}var _g=Nc("C",void 0,void 0);function xg(e){return Nc("E",void 0,e)}function Tg(e){return Nc("N",e,void 0)}function Nc(e,t,n){return{kind:e,value:t,error:n}}var gr=null;function no(e){if(Et.useDeprecatedSynchronousErrorHandling){let t=!gr;if(t&&(gr={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=gr;if(gr=null,n)throw r}}else e()}function Sg(e){Et.useDeprecatedSynchronousErrorHandling&&gr&&(gr.errorThrown=!0,gr.error=e)}var mr=class extends se{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,aa(t)&&t.add(this)):this.destination=yx}static create(t,n,r){return new Kt(t,n,r)}next(t){this.isStopped?Oc(Tg(t),this):this._next(t)}error(t){this.isStopped?Oc(xg(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Oc(_g,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},mx=Function.prototype.bind;function Rc(e,t){return mx.call(e,t)}var Fc=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){la(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){la(r)}else la(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){la(n)}}},Kt=class extends mr{constructor(t,n,r){super();let o;if(S(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&Et.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&Rc(t.next,i),error:t.error&&Rc(t.error,i),complete:t.complete&&Rc(t.complete,i)}):o=t}this.destination=new Fc(o)}};function la(e){Et.useDeprecatedSynchronousErrorHandling?Sg(e):ua(e)}function vx(e){throw e}function Oc(e,t){let{onStoppedNotification:n}=Et;n&&to.setTimeout(()=>n(e,t))}var yx={closed:!0,next:Zt,error:vx,complete:Zt};var ro=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ye(e){return e}function Pc(...e){return kc(e)}function kc(e){return e.length===0?ye:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var O=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,o){let i=wx(n)?n:new Kt(n,r,o);return no(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Mg(r),new r((o,i)=>{let s=new Kt({next:a=>{try{n(a)}catch(u){i(u),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[ro](){return this}pipe(...n){return kc(n)(this)}toPromise(n){return n=Mg(n),new n((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=t=>new e(t),e})();function Mg(e){var t;return(t=e??Et.Promise)!==null&&t!==void 0?t:Promise}function Dx(e){return e&&S(e.next)&&S(e.error)&&S(e.complete)}function wx(e){return e&&e instanceof mr||Dx(e)&&aa(e)}function Lc(e){return S(e?.lift)}function M(e){return t=>{if(Lc(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function T(e,t,n,r,o){return new Vc(e,t,n,r,o)}var Vc=class extends mr{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(u){t.error(u)}}:super._next,this._error=o?function(a){try{o(a)}catch(u){t.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function oo(){return M((e,t)=>{let n=null;e._refCount++;let r=T(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){n=null;return}let o=e._connection,i=n;n=null,o&&(!i||o===i)&&o.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}var io=class extends O{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,Lc(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new se;let n=this.getSubject();t.add(this.source.subscribe(T(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=se.EMPTY)}return t}refCount(){return oo()(this)}};var so={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=so;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let o=t(i=>{n=void 0,e(i)});return new se(()=>n?.(o))},requestAnimationFrame(...e){let{delegate:t}=so;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=so;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0};var Ag=eo(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var J=(()=>{class e extends O{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new ca(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Ag}next(n){no(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){no(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){no(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:o,observers:i}=this;return r||o?Ac:(this.currentObservers=null,i.push(n),new se(()=>{this.currentObservers=null,hr(i,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:o,isStopped:i}=this;r?n.error(o):i&&n.complete()}asObservable(){let n=new O;return n.source=this,n}}return e.create=(t,n)=>new ca(t,n),e})(),ca=class extends J{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:Ac}};var Ae=class extends J{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Ti={now(){return(Ti.delegate||Date).now()},delegate:void 0};var Si=class extends J{constructor(t=1/0,n=1/0,r=Ti){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){let{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;n||(r.push(t),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;sNg(t)&&e()),t},clearImmediate(e){Ng(e)}};var{setImmediate:Cx,clearImmediate:Ex}=Rg,Ai={setImmediate(...e){let{delegate:t}=Ai;return(t?.setImmediate||Cx)(...e)},clearImmediate(e){let{delegate:t}=Ai;return(t?.clearImmediate||Ex)(e)},delegate:void 0};var fa=class extends Tn{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return r!==null&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Ai.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,n,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(t,n,r);let{actions:i}=t;n!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==n&&(Ai.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))}};var ao=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};ao.now=Ti.now;var Sn=class extends ao{constructor(t,n=ao.now){super(t,n),this.actions=[],this._active=!1}flush(t){let{actions:n}=this;if(this._active){n.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}};var pa=class extends Sn{flush(t){this._active=!0;let n=this._scheduled;this._scheduled=void 0;let{actions:r}=this,o;t=t||r.shift();do if(o=t.execute(t.state,t.delay))break;while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}};var Ix=new pa(fa);var It=new Sn(Tn),Og=It;var ha=class extends Tn{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return r!==null&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=so.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,n,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(t,n,r);let{actions:i}=t;n!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==n&&(so.cancelAnimationFrame(n),t._scheduled=void 0)}};var ga=class extends Sn{flush(t){this._active=!0;let n=this._scheduled;this._scheduled=void 0;let{actions:r}=this,o;t=t||r.shift();do if(o=t.execute(t.state,t.delay))break;while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}};var _x=new ga(ha);var Ee=new O(e=>e.complete());function ma(e){return e&&S(e.schedule)}function Bc(e){return e[e.length-1]}function Mn(e){return S(Bc(e))?e.pop():void 0}function Pt(e){return ma(Bc(e))?e.pop():void 0}function Fg(e,t){return typeof Bc(e)=="number"?e.pop():t}function kg(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(c){try{l(r.next(c))}catch(d){s(d)}}function u(c){try{l(r.throw(c))}catch(d){s(d)}}function l(c){c.done?i(c.value):o(c.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function Pg(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vr(e){return this instanceof vr?(this.v=e,this):new vr(e)}function Lg(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(p){return function(h){return Promise.resolve(h).then(p,d)}}function a(p,h){r[p]&&(o[p]=function(g){return new Promise(function(m,D){i.push([p,g,m,D])>1||u(p,g)})},h&&(o[p]=h(o[p])))}function u(p,h){try{l(r[p](h))}catch(g){f(i[0][3],g)}}function l(p){p.value instanceof vr?Promise.resolve(p.value.v).then(c,d):f(i[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function f(p,h){p(h),i.shift(),i.length&&u(i[0][0],i[0][1])}}function Vg(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Pg=="function"?Pg(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,u){s=e[i](s),o(a,u,s.done,s.value)})}}function o(i,s,a,u){Promise.resolve(u).then(function(l){i({value:l,done:a})},s)}}var uo=e=>e&&typeof e.length=="number"&&typeof e!="function";function va(e){return S(e?.then)}function ya(e){return S(e[ro])}function Da(e){return Symbol.asyncIterator&&S(e?.[Symbol.asyncIterator])}function wa(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function xx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ba=xx();function Ca(e){return S(e?.[ba])}function Ea(e){return Lg(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield vr(n.read());if(o)return yield vr(void 0);yield yield vr(r)}}finally{n.releaseLock()}})}function Ia(e){return S(e?.getReader)}function j(e){if(e instanceof O)return e;if(e!=null){if(ya(e))return Tx(e);if(uo(e))return Sx(e);if(va(e))return Mx(e);if(Da(e))return jg(e);if(Ca(e))return Ax(e);if(Ia(e))return Nx(e)}throw wa(e)}function Tx(e){return new O(t=>{let n=e[ro]();if(S(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Sx(e){return new O(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,ua)})}function Ax(e){return new O(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function jg(e){return new O(t=>{Rx(e,t).catch(n=>t.error(n))})}function Nx(e){return jg(Ea(e))}function Rx(e,t){var n,r,o,i;return kg(this,void 0,void 0,function*(){try{for(n=Vg(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function We(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function _a(e,t=0){return M((n,r)=>{n.subscribe(T(r,o=>We(r,e,()=>r.next(o),t),()=>We(r,e,()=>r.complete(),t),o=>We(r,e,()=>r.error(o),t)))})}function xa(e,t=0){return M((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Ug(e,t){return j(e).pipe(xa(t),_a(t))}function Bg(e,t){return j(e).pipe(xa(t),_a(t))}function $g(e,t){return new O(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Hg(e,t){return new O(n=>{let r;return We(n,t,()=>{r=e[ba](),We(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>S(r?.return)&&r.return()})}function Ta(e,t){if(!e)throw new Error("Iterable cannot be null");return new O(n=>{We(n,t,()=>{let r=e[Symbol.asyncIterator]();We(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function zg(e,t){return Ta(Ea(e),t)}function Gg(e,t){if(e!=null){if(ya(e))return Ug(e,t);if(uo(e))return $g(e,t);if(va(e))return Bg(e,t);if(Da(e))return Ta(e,t);if(Ca(e))return Hg(e,t);if(Ia(e))return zg(e,t)}throw wa(e)}function X(e,t){return t?Gg(e,t):j(e)}function _(...e){let t=Pt(e);return X(e,t)}function An(e,t){let n=S(e)?e:()=>e,r=o=>o.error(n());return new O(t?o=>t.schedule(r,0,o):r)}function Yt(e){return!!e&&(e instanceof O||S(e.lift)&&S(e.subscribe))}var Qt=eo(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Wg(e){return e instanceof Date&&!isNaN(e)}function A(e,t){return M((n,r)=>{let o=0;n.subscribe(T(r,i=>{r.next(e.call(t,i,o++))}))})}var{isArray:Ox}=Array;function Fx(e,t){return Ox(t)?e(...t):e(t)}function lo(e){return A(t=>Fx(e,t))}var{isArray:Px}=Array,{getPrototypeOf:kx,prototype:Lx,keys:Vx}=Object;function Sa(e){if(e.length===1){let t=e[0];if(Px(t))return{args:t,keys:null};if(jx(t)){let n=Vx(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function jx(e){return e&&typeof e=="object"&&kx(e)===Lx}function Ma(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function Aa(...e){let t=Pt(e),n=Mn(e),{args:r,keys:o}=Sa(e);if(r.length===0)return X([],t);let i=new O(Ux(r,t,o?s=>Ma(o,s):ye));return n?i.pipe(lo(n)):i}function Ux(e,t,n=ye){return r=>{qg(t,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let u=0;u{let l=X(e[u],t),c=!1;l.subscribe(T(r,d=>{i[u]=d,c||(c=!0,a--),a||r.next(n(i.slice()))},()=>{--s||r.complete()}))},r)},r)}}function qg(e,t,n){e?We(n,e,t):t()}function Zg(e,t,n,r,o,i,s,a){let u=[],l=0,c=0,d=!1,f=()=>{d&&!u.length&&!l&&t.complete()},p=g=>l{i&&t.next(g),l++;let m=!1;j(n(g,c++)).subscribe(T(t,D=>{o?.(D),i?p(D):t.next(D)},()=>{m=!0},void 0,()=>{if(m)try{for(l--;u.length&&lh(D)):h(D)}f()}catch(D){t.error(D)}}))};return e.subscribe(T(t,p,()=>{d=!0,f()})),()=>{a?.()}}function le(e,t,n=1/0){return S(t)?le((r,o)=>A((i,s)=>t(r,i,o,s))(j(e(r,o))),n):(typeof t=="number"&&(n=t),M((r,o)=>Zg(r,o,e,n)))}function Nn(e=1/0){return le(ye,e)}function Kg(){return Nn(1)}function tt(...e){return Kg()(X(e,Pt(e)))}function Jt(e){return new O(t=>{j(e()).subscribe(t)})}var Bx={connector:()=>new J,resetOnDisconnect:!0};function $x(e,t=Bx){let n=null,{connector:r,resetOnDisconnect:o=!0}=t,i=r(),s=new O(a=>i.subscribe(a));return s.connect=()=>((!n||n.closed)&&(n=Jt(()=>e).subscribe(i),o&&n.add(()=>i=r())),n),s}function Ni(...e){let t=Mn(e),{args:n,keys:r}=Sa(e),o=new O(i=>{let{length:s}=n;if(!s){i.complete();return}let a=new Array(s),u=s,l=s;for(let c=0;c{d||(d=!0,l--),a[c]=f},()=>u--,void 0,()=>{(!u||!d)&&(l||i.next(r?Ma(r,a):a),i.complete())}))}});return t?o.pipe(lo(t)):o}var Hx=["addListener","removeListener"],zx=["addEventListener","removeEventListener"],Gx=["on","off"];function $c(e,t,n,r){if(S(n)&&(r=n,n=void 0),r)return $c(e,t,n).pipe(lo(r));let[o,i]=Zx(e)?zx.map(s=>a=>e[s](t,a,n)):Wx(e)?Hx.map(Yg(e,t)):qx(e)?Gx.map(Yg(e,t)):[];if(!o&&uo(e))return le(s=>$c(s,t,n))(j(e));if(!o)throw new TypeError("Invalid event target");return new O(s=>{let a=(...u)=>s.next(1i(a)})}function Yg(e,t){return n=>r=>e[n](t,r)}function Wx(e){return S(e.addListener)&&S(e.removeListener)}function qx(e){return S(e.on)&&S(e.off)}function Zx(e){return S(e.addEventListener)&&S(e.removeEventListener)}function Xt(e=0,t,n=Og){let r=-1;return t!=null&&(ma(t)?n=t:r=t),new O(o=>{let i=Wg(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function Kx(e=0,t=It){return e<0&&(e=0),Xt(e,e,t)}function Yx(...e){let t=Pt(e),n=Fg(e,1/0),r=e;return r.length?r.length===1?j(r[0]):Nn(n)(X(r,t)):Ee}var{isArray:Qx}=Array;function Na(e){return e.length===1&&Qx(e[0])?e[0]:e}function ke(e,t){return M((n,r)=>{let o=0;n.subscribe(T(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Jx(...e){return e=Na(e),e.length===1?j(e[0]):new O(Xx(e))}function Xx(e){return t=>{let n=[];for(let r=0;n&&!t.closed&&r{if(n){for(let i=0;i{let o=n.map(()=>[]),i=n.map(()=>!1);r.add(()=>{o=i=null});for(let s=0;!r.closed&&s{if(o[s].push(a),o.every(u=>u.length)){let u=o.map(l=>l.shift());r.next(t?t(...u):u),o.some((l,c)=>!l.length&&i[c])&&r.complete()}},()=>{i[s]=!0,!o[s].length&&r.complete()}));return()=>{o=i=null}}):Ee}function Qg(e){return M((t,n)=>{let r=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,r){r=!1;let l=o;o=null,n.next(l)}s&&n.complete()},u=()=>{i=null,s&&n.complete()};t.subscribe(T(n,l=>{r=!0,o=l,i||j(e(l)).subscribe(i=T(n,a,u))},()=>{s=!0,(!r||!i||i.closed)&&n.complete()}))})}function t0(e,t=It){return Qg(()=>Xt(e,t))}function Rn(e){return M((t,n)=>{let r=null,o=!1,i;r=t.subscribe(T(n,void 0,void 0,s=>{i=j(e(s,Rn(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}function Jg(e,t,n,r,o){return(i,s)=>{let a=n,u=t,l=0;i.subscribe(T(s,c=>{let d=l++;u=a?e(u,c,d):(a=!0,c),r&&s.next(u)},o&&(()=>{a&&s.next(u),s.complete()})))}}function kt(e,t){return S(t)?le(e,t,1):le(e,1)}function Xg(e,t=It){return M((n,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let l=i;i=null,r.next(l)}};function u(){let l=s+e,c=t.now();if(c{i=l,s=t.now(),o||(o=t.schedule(u,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function On(e){return M((t,n)=>{let r=!1;t.subscribe(T(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function Ie(e){return e<=0?()=>Ee:M((t,n)=>{let r=0;t.subscribe(T(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function em(){return M((e,t)=>{e.subscribe(T(t,Zt))})}function tm(e){return A(()=>e)}function Hc(e,t){return t?n=>tt(t.pipe(Ie(1),em()),n.pipe(Hc(e))):le((n,r)=>j(e(n,r)).pipe(Ie(1),tm(n)))}function n0(e,t=It){let n=Xt(e,t);return Hc(()=>n)}function nm(e,t=ye){return e=e??r0,M((n,r)=>{let o,i=!0;n.subscribe(T(r,s=>{let a=t(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}function r0(e,t){return e===t}function Ra(e=o0){return M((t,n)=>{let r=!1;t.subscribe(T(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function o0(){return new Qt}function i0(...e){return t=>tt(t,_(...e))}function Fn(e){return M((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function en(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ke((o,i)=>e(o,i,r)):ye,Ie(1),n?On(t):Ra(()=>new Qt))}function co(e){return e<=0?()=>Ee:M((t,n)=>{let r=[];t.subscribe(T(n,o=>{r.push(o),e{for(let o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function zc(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ke((o,i)=>e(o,i,r)):ye,co(1),n?On(t):Ra(()=>new Qt))}function Oa(e,t){return M(Jg(e,t,arguments.length>=2,!0))}function Wc(e={}){let{connector:t=()=>new J,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,u,l=0,c=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},p=()=>{f(),s=u=void 0,c=d=!1},h=()=>{let g=s;p(),g?.unsubscribe()};return M((g,m)=>{l++,!d&&!c&&f();let D=u=u??t();m.add(()=>{l--,l===0&&!d&&!c&&(a=Gc(h,o))}),D.subscribe(m),!s&&l>0&&(s=new Kt({next:R=>D.next(R),error:R=>{d=!0,f(),a=Gc(p,n,R),D.error(R)},complete:()=>{c=!0,f(),a=Gc(p,r),D.complete()}}),j(g).subscribe(s))})(i)}}function Gc(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new Kt({next:()=>{r.unsubscribe(),e()}});return j(t(...n)).subscribe(r)}function Ri(e,t,n){let r,o=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:t=1/0,refCount:o=!1,scheduler:n}=e:r=e??1/0,Wc({connector:()=>new Si(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function s0(e){return ke((t,n)=>e<=n)}function Fa(...e){let t=Pt(e);return M((n,r)=>{(t?tt(e,n,t):tt(e,n)).subscribe(r)})}function De(e,t){return M((n,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();n.subscribe(T(r,u=>{o?.unsubscribe();let l=0,c=i++;j(e(u,c)).subscribe(o=T(r,d=>r.next(t?t(u,d,c,l++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function a0(){return De(ye)}function Pa(e){return M((t,n)=>{j(e).subscribe(T(n,()=>n.complete(),Zt)),!n.closed&&t.subscribe(n)})}function we(e,t,n){let r=S(e)||t||n?{next:e,error:t,complete:n}:e;return r?M((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(T(i,u=>{var l;(l=r.next)===null||l===void 0||l.call(r,u),i.next(u)},()=>{var u;a=!1,(u=r.complete)===null||u===void 0||u.call(r),i.complete()},u=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,u),i.error(u)},()=>{var u,l;a&&((u=r.unsubscribe)===null||u===void 0||u.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):ye}function rm(e,t){return M((n,r)=>{let{leading:o=!0,trailing:i=!1}=t??{},s=!1,a=null,u=null,l=!1,c=()=>{u?.unsubscribe(),u=null,i&&(p(),l&&r.complete())},d=()=>{u=null,l&&r.complete()},f=h=>u=j(e(h)).subscribe(T(r,c,d)),p=()=>{if(s){s=!1;let h=a;a=null,r.next(h),!l&&f(h)}};n.subscribe(T(r,h=>{s=!0,a=h,!(u&&!u.closed)&&(o?p():f(h))},()=>{l=!0,!(i&&s&&u&&!u.closed)&&r.complete()}))})}function u0(e,t=It,n){let r=Xt(e,t);return rm(()=>r,n)}function l0(...e){let t=Mn(e);return M((n,r)=>{let o=e.length,i=new Array(o),s=e.map(()=>!1),a=!1;for(let u=0;u{i[u]=l,!a&&!s[u]&&(s[u]=!0,(a=s.every(ye))&&(s=null))},Zt));n.subscribe(T(r,u=>{if(a){let l=[u,...i];r.next(t?t(...l):l)}}))})}var Km="https://g.co/ng/security#xss",w=class extends Error{code;constructor(t,n){super(Eu(t,n)),this.code=t}};function Eu(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}var Iu=Symbol("InputSignalNode#UNSET"),Ym=F(y({},Mc),{transformFn:void 0,applyValueToInputSignal(e,t){xi(e,t)}});function Qm(e,t){let n=Object.create(Ym);n.value=e,n.transformFn=t?.transform;function r(){if(Ei(n),n.value===Iu)throw new w(-950,!1);return n.value}return r[Me]=n,r}function Ki(e){return{toString:e}.toString()}var ka="__parameters__";function c0(e){return function(...n){if(e){let r=e(...n);for(let o in r)this[o]=r[o]}}}function Jm(e,t,n){return Ki(()=>{let r=c0(t);function o(...i){if(this instanceof o)return r.apply(this,i),this;let s=new o(...i);return a.annotation=s,a;function a(u,l,c){let d=u.hasOwnProperty(ka)?u[ka]:Object.defineProperty(u,ka,{value:[]})[ka];for(;d.length<=c;)d.push(null);return(d[c]=d[c]||[]).push(s),u}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=e,o.annotationCls=o,o})}var tn=globalThis;function Z(e){for(let t in e)if(e[t]===Z)return t;throw Error("Could not find renamed property on target object.")}function d0(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Ke(e){if(typeof e=="string")return e;if(Array.isArray(e))return"["+e.map(Ke).join(", ")+"]";if(e==null)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;let t=e.toString();if(t==null)return""+t;let n=t.indexOf(` +`);return n===-1?t:t.substring(0,n)}function id(e,t){return e==null||e===""?t===null?"":t:t==null||t===""?e:e+" "+t}var f0=Z({__forward_ref__:Z});function Re(e){return e.__forward_ref__=Re,e.toString=function(){return Ke(this())},e}function Ne(e){return Xm(e)?e():e}function Xm(e){return typeof e=="function"&&e.hasOwnProperty(f0)&&e.__forward_ref__===Re}function C(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function $t(e){return{providers:e.providers||[],imports:e.imports||[]}}function _u(e){return om(e,tv)||om(e,nv)}function ev(e){return _u(e)!==null}function om(e,t){return e.hasOwnProperty(t)?e[t]:null}function p0(e){let t=e&&(e[tv]||e[nv]);return t||null}function im(e){return e&&(e.hasOwnProperty(sm)||e.hasOwnProperty(h0))?e[sm]:null}var tv=Z({\u0275prov:Z}),sm=Z({\u0275inj:Z}),nv=Z({ngInjectableDef:Z}),h0=Z({ngInjectorDef:Z}),E=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,n){this._desc=t,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=C({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function rv(e){return e&&!!e.\u0275providers}var g0=Z({\u0275cmp:Z}),m0=Z({\u0275dir:Z}),v0=Z({\u0275pipe:Z}),y0=Z({\u0275mod:Z}),Ka=Z({\u0275fac:Z}),ki=Z({__NG_ELEMENT_ID__:Z}),am=Z({__NG_ENV_ID__:Z});function Ze(e){return typeof e=="string"?e:e==null?"":String(e)}function D0(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Ze(e)}function w0(e,t){let n=t?`. Dependency path: ${t.join(" > ")} > ${e}`:"";throw new w(-200,e)}function hf(e,t){throw new w(-201,!1)}var U=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(U||{}),sd;function ov(){return sd}function qe(e){let t=sd;return sd=e,t}function iv(e,t,n){let r=_u(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&U.Optional)return null;if(t!==void 0)return t;hf(e,"Injector")}var b0={},Vi=b0,ad="__NG_DI_FLAG__",Ya="ngTempTokenPath",C0="ngTokenPath",E0=/\n/gm,I0="\u0275",um="__source",mo;function _0(){return mo}function Pn(e){let t=mo;return mo=e,t}function x0(e,t=U.Default){if(mo===void 0)throw new w(-203,!1);return mo===null?iv(e,void 0,t):mo.get(e,t&U.Optional?null:void 0,t)}function I(e,t=U.Default){return(ov()||x0)(Ne(e),t)}function v(e,t=U.Default){return I(e,xu(t))}function xu(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ud(e){let t=[];for(let n=0;n ");else if(typeof t=="object"){let i=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];i.push(s+":"+(typeof a=="string"?JSON.stringify(a):Ke(a)))}o=`{${i.join(", ")}}`}return`${n}${r?"("+r+")":""}[${o}]: ${e.replace(E0,` + `)}`}var av=sv(Jm("Optional"),8);var A0=sv(Jm("SkipSelf"),4);function wr(e,t){let n=e.hasOwnProperty(Ka);return n?e[Ka]:null}function N0(e,t,n){if(e.length!==t.length)return!1;for(let r=0;rArray.isArray(n)?gf(n,t):t(n))}function uv(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Qa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function O0(e,t){let n=[];for(let r=0;rt;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function Tu(e,t,n){let r=Yi(e,t);return r>=0?e[r|1]=n:(r=~r,F0(e,r,t,n)),r}function qc(e,t){let n=Yi(e,t);if(n>=0)return e[n|1]}function Yi(e,t){return P0(e,t,1)}function P0(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<t?o=i:r=i+1}return~(o<{n.push(s)};return gf(t,s=>{let a=s;ld(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&gv(o,i),n}function gv(e,t){for(let n=0;n{t(i,r)})}}function ld(e,t,n,r){if(e=Ne(e),!e)return!1;let o=null,i=im(e),s=!i&&Vn(e);if(!i&&!s){let u=e.ngModule;if(i=im(u),i)o=u;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let u=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of u)ld(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;try{gf(i.imports,c=>{ld(c,t,n,r)&&(l||=[],l.push(c))})}finally{}l!==void 0&&gv(l,t)}if(!a){let l=wr(o)||(()=>new o);t({provide:o,useFactory:l,deps:$e},o),t({provide:cv,useValue:o,multi:!0},o),t({provide:yo,useValue:()=>I(o),multi:!0},o)}let u=i.providers;if(u!=null&&!a){let l=e;vf(u,c=>{t(c,l)})}}else return!1;return o!==e&&e.providers!==void 0}function vf(e,t){for(let n of e)rv(n)&&(n=n.\u0275providers),Array.isArray(n)?vf(n,t):t(n)}var L0=Z({provide:String,useValue:Z});function mv(e){return e!==null&&typeof e=="object"&&L0 in e}function V0(e){return!!(e&&e.useExisting)}function j0(e){return!!(e&&e.useFactory)}function Do(e){return typeof e=="function"}function U0(e){return!!e.useClass}var Su=new E(""),$a={},B0={},Zc;function Mu(){return Zc===void 0&&(Zc=new Ja),Zc}var Ye=class{},ji=class extends Ye{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,dd(t,s=>this.processProvider(s)),this.records.set(lv,fo(void 0,this)),o.has("environment")&&this.records.set(Ye,fo(void 0,this));let i=this.records.get(Su);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(cv,$e,U.Self))}destroy(){Fi(this),this._destroyed=!0;let t=V(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),V(t)}}onDestroy(t){return Fi(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Fi(this);let n=Pn(this),r=qe(void 0),o;try{return t()}finally{Pn(n),qe(r)}}get(t,n=Vi,r=U.Default){if(Fi(this),t.hasOwnProperty(am))return t[am](this);r=xu(r);let o,i=Pn(this),s=qe(void 0);try{if(!(r&U.SkipSelf)){let u=this.records.get(t);if(u===void 0){let l=W0(t)&&_u(t);l&&this.injectableDefInScope(l)?u=fo(cd(t),$a):u=null,this.records.set(t,u)}if(u!=null)return this.hydrate(t,u)}let a=r&U.Self?Mu():this.parent;return n=r&U.Optional&&n===Vi?null:n,a.get(t,n)}catch(a){if(a.name==="NullInjectorError"){if((a[Ya]=a[Ya]||[]).unshift(Ke(t)),i)throw a;return S0(a,t,"R3InjectorError",this.source)}else throw a}finally{qe(s),Pn(i)}}resolveInjectorInitializers(){let t=V(null),n=Pn(this),r=qe(void 0),o;try{let i=this.get(yo,$e,U.Self);for(let s of i)s()}finally{Pn(n),qe(r),V(t)}}toString(){let t=[],n=this.records;for(let r of n.keys())t.push(Ke(r));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=Ne(t);let n=Do(t)?t:Ne(t&&t.provide),r=H0(t);if(!Do(t)&&t.multi===!0){let o=this.records.get(n);o||(o=fo(void 0,$a,!0),o.factory=()=>ud(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n){let r=V(null);try{return n.value===$a&&(n.value=B0,n.value=n.factory()),typeof n.value=="object"&&n.value&&G0(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{V(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=Ne(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function cd(e){let t=_u(e),n=t!==null?t.factory:wr(e);if(n!==null)return n;if(e instanceof E)throw new w(204,!1);if(e instanceof Function)return $0(e);throw new w(204,!1)}function $0(e){if(e.length>0)throw new w(204,!1);let n=p0(e);return n!==null?()=>n.factory(e):()=>new e}function H0(e){if(mv(e))return fo(void 0,e.useValue);{let t=vv(e);return fo(t,$a)}}function vv(e,t,n){let r;if(Do(e)){let o=Ne(e);return wr(o)||cd(o)}else if(mv(e))r=()=>Ne(e.useValue);else if(j0(e))r=()=>e.useFactory(...ud(e.deps||[]));else if(V0(e))r=()=>I(Ne(e.useExisting));else{let o=Ne(e&&(e.useClass||e.provide));if(z0(e))r=()=>new o(...ud(e.deps));else return wr(o)||cd(o)}return r}function Fi(e){if(e.destroyed)throw new w(205,!1)}function fo(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function z0(e){return!!e.deps}function G0(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function W0(e){return typeof e=="function"||typeof e=="object"&&e instanceof E}function dd(e,t){for(let n of e)Array.isArray(n)?dd(n,t):n&&rv(n)?dd(n.\u0275providers,t):t(n)}function rt(e,t){e instanceof ji&&Fi(e);let n,r=Pn(e),o=qe(void 0);try{return t()}finally{Pn(r),qe(o)}}function yv(){return ov()!==void 0||_0()!=null}function Au(e){if(!yv())throw new w(-203,!1)}function q0(e){return typeof e=="function"}var ln=0,P=1,N=2,Ve=3,Tt=4,Xe=5,wo=6,Xa=7,_e=8,Ui=9,rn=10,ae=11,Bi=12,lm=13,Mo=14,Qe=15,br=16,po=17,on=18,Nu=19,Dv=20,kn=21,Ha=22,Cr=23,nt=24,fe=25,wv=1;var Er=7,eu=8,bo=9,Le=10;function Ln(e){return Array.isArray(e)&&typeof e[wv]=="object"}function cn(e){return Array.isArray(e)&&e[wv]===!0}function yf(e){return(e.flags&4)!==0}function Nr(e){return e.componentOffset>-1}function Ru(e){return(e.flags&1)===1}function sn(e){return!!e.template}function tu(e){return(e[N]&512)!==0}function Qi(e){return(e[N]&256)===256}var fd=class{previousValue;currentValue;firstChange;constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function bv(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var pt=(()=>{let e=()=>Cv;return e.ngInherit=!0,e})();function Cv(e){return e.type.prototype.ngOnChanges&&(e.setInput=K0),Z0}function Z0(){let e=Iv(this),t=e?.current;if(t){let n=e.previous;if(n===nn)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function K0(e,t,n,r,o){let i=this.declaredInputs[r],s=Iv(e)||Y0(e,{previous:nn,current:null}),a=s.current||(s.current={}),u=s.previous,l=u[i];a[i]=new fd(l&&l.currentValue,n,u===nn),bv(e,t,o,n)}var Ev="__ngSimpleChanges__";function Iv(e){return e[Ev]||null}function Y0(e,t){return e[Ev]=t}var cm=null;var ft=function(e,t,n){cm?.(e,t,n)},_v="svg",xv="math";function Vt(e){for(;Array.isArray(e);)e=e[ln];return e}function Tv(e,t){return Vt(t[e])}function Mt(e,t){return Vt(t[e.index])}function Df(e,t){return e.data[t]}function Ji(e,t){return e[t]}function jt(e,t){let n=t[e];return Ln(n)?n:n[ln]}function Q0(e){return(e[N]&4)===4}function wf(e){return(e[N]&128)===128}function J0(e){return cn(e[Ve])}function jn(e,t){return t==null?null:e[t]}function Sv(e){e[po]=0}function bf(e){e[N]&1024||(e[N]|=1024,wf(e)&&Xi(e))}function X0(e,t){for(;e>0;)t=t[Mo],e--;return t}function Ou(e){return!!(e[N]&9216||e[nt]?.dirty)}function pd(e){e[rn].changeDetectionScheduler?.notify(9),e[N]&64&&(e[N]|=1024),Ou(e)&&Xi(e)}function Xi(e){e[rn].changeDetectionScheduler?.notify(0);let t=Ir(e);for(;t!==null&&!(t[N]&8192||(t[N]|=8192,!wf(t)));)t=Ir(t)}function Mv(e,t){if(Qi(e))throw new w(911,!1);e[kn]===null&&(e[kn]=[]),e[kn].push(t)}function eT(e,t){if(e[kn]===null)return;let n=e[kn].indexOf(t);n!==-1&&e[kn].splice(n,1)}function Ir(e){let t=e[Ve];return cn(t)?t[Ve]:t}function Av(e){return e[Xa]??=[]}function Nv(e){return e.cleanup??=[]}function tT(e,t,n,r){let o=Av(t);o.push(n),e.firstCreatePass&&Nv(e).push(r,o.length-1)}var k={lFrame:jv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var hd=!1;function nT(){return k.lFrame.elementDepthCount}function rT(){k.lFrame.elementDepthCount++}function oT(){k.lFrame.elementDepthCount--}function Rv(){return k.bindingsEnabled}function Ov(){return k.skipHydrationRootTNode!==null}function iT(e){return k.skipHydrationRootTNode===e}function sT(){k.skipHydrationRootTNode=null}function x(){return k.lFrame.lView}function te(){return k.lFrame.tView}function o9(e){return k.lFrame.contextLView=e,e[_e]}function i9(e){return k.lFrame.contextLView=null,e}function Ue(){let e=Fv();for(;e!==null&&e.type===64;)e=e.parent;return e}function Fv(){return k.lFrame.currentTNode}function aT(){let e=k.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function $n(e,t){let n=k.lFrame;n.currentTNode=e,n.isParent=t}function Cf(){return k.lFrame.isParent}function Ef(){k.lFrame.isParent=!1}function Pv(){return k.lFrame.contextLView}function kv(){return hd}function nu(e){let t=hd;return hd=e,t}function Hn(){let e=k.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function If(){return k.lFrame.bindingIndex}function uT(e){return k.lFrame.bindingIndex=e}function Rr(){return k.lFrame.bindingIndex++}function es(e){let t=k.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function lT(){return k.lFrame.inI18n}function cT(e,t){let n=k.lFrame;n.bindingIndex=n.bindingRootIndex=e,gd(t)}function dT(){return k.lFrame.currentDirectiveIndex}function gd(e){k.lFrame.currentDirectiveIndex=e}function fT(e){let t=k.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function _f(){return k.lFrame.currentQueryIndex}function Fu(e){k.lFrame.currentQueryIndex=e}function pT(e){let t=e[P];return t.type===2?t.declTNode:t.type===1?e[Xe]:null}function Lv(e,t,n){if(n&U.SkipSelf){let o=t,i=e;for(;o=o.parent,o===null&&!(n&U.Host);)if(o=pT(i),o===null||(i=i[Mo],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=k.lFrame=Vv();return r.currentTNode=t,r.lView=e,!0}function xf(e){let t=Vv(),n=e[P];k.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Vv(){let e=k.lFrame,t=e===null?null:e.child;return t===null?jv(e):t}function jv(e){let t={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:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Uv(){let e=k.lFrame;return k.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Bv=Uv;function Tf(){let e=Uv();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function hT(e){return(k.lFrame.contextLView=X0(e,k.lFrame.contextLView))[_e]}function ht(){return k.lFrame.selectedIndex}function _r(e){k.lFrame.selectedIndex=e}function ts(){let e=k.lFrame;return Df(e.tView,e.selectedIndex)}function s9(){k.lFrame.currentNamespace=_v}function a9(){k.lFrame.currentNamespace=xv}function gT(){return k.lFrame.currentNamespace}var $v=!0;function Pu(){return $v}function ku(e){$v=e}function mT(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=Cv(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function Lu(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[u]<0&&(e[po]+=65536),(a>14>16&&(e[N]&3)===t&&(e[N]+=16384,dm(a,i)):dm(a,i)}var vo=-1,xr=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r){this.factory=t,this.canSeeViewProviders=n,this.injectImpl=r}};function yT(e){return e instanceof xr}function DT(e){return(e.flags&8)!==0}function wT(e){return(e.flags&16)!==0}function bT(e,t,n){let r=0;for(;rt){s=i-1;break}}}for(;i>16}function ou(e,t){let n=ET(e),r=t;for(;n>0;)r=r[Mo],n--;return r}var vd=!0;function iu(e){let t=vd;return vd=e,t}var IT=256,Wv=IT-1,qv=5,_T=0,Lt={};function xT(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(ki)&&(r=n[ki]),r==null&&(r=n[ki]=_T++);let o=r&Wv,i=1<>qv)]|=i}function su(e,t){let n=Zv(e,t);if(n!==-1)return n;let r=t[P];r.firstCreatePass&&(e.injectorIndex=t.length,Qc(r.data,e),Qc(t,null),Qc(r.blueprint,null));let o=Sf(e,t),i=e.injectorIndex;if(Gv(o)){let s=ru(o),a=ou(o,t),u=a[P].data;for(let l=0;l<8;l++)t[i+l]=a[s+l]|u[s+l]}return t[i+8]=o,i}function Qc(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Zv(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Sf(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=Xv(o),r===null)return vo;if(n++,o=o[Mo],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return vo}function yd(e,t,n){xT(e,t,n)}function TT(e,t){if(t==="class")return e.classes;if(t==="style")return e.styles;let n=e.attrs;if(n){let r=n.length,o=0;for(;o>20,d=r?a:a+c,f=o?a+c:l;for(let p=d;p=u&&h.type===n)return p}if(o){let p=s[u];if(p&&sn(p)&&p.type===n)return u}return null}function $i(e,t,n,r){let o=e[n],i=t.data;if(yT(o)){let s=o;s.resolving&&w0(D0(i[n]));let a=iu(s.canSeeViewProviders);s.resolving=!0;let u,l=s.injectImpl?qe(s.injectImpl):null,c=Lv(e,r,U.Default);try{o=e[n]=s.factory(void 0,i,e,r),t.firstCreatePass&&n>=r.directiveStart&&mT(n,i[n],t)}finally{l!==null&&qe(l),iu(a),s.resolving=!1,Bv()}}return o}function MT(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(ki)?e[ki]:void 0;return typeof t=="number"?t>=0?t&Wv:AT:t}function pm(e,t,n){let r=1<>qv)]&r)}function hm(e,t){return!(e&U.Self)&&!(e&U.Host&&t)}var Dr=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Qv(this._tNode,this._lView,t,xu(r),n)}};function AT(){return new Dr(Ue(),x())}function Oe(e){return Ki(()=>{let t=e.prototype.constructor,n=t[Ka]||Dd(t),r=Object.prototype,o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){let i=o[Ka]||Dd(o);if(i&&i!==n)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function Dd(e){return Xm(e)?()=>{let t=Dd(Ne(e));return t&&t()}:wr(e)}function NT(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[N]&2048&&!tu(s);){let a=Jv(i,s,n,r|U.Self,Lt);if(a!==Lt)return a;let u=i.parent;if(!u){let l=s[Dv];if(l){let c=l.get(n,Lt,r);if(c!==Lt)return c}u=Xv(s),s=s[Mo]}i=u}return o}function Xv(e){let t=e[P],n=t.type;return n===2?t.declTNode:n===1?e[Xe]:null}function Mf(e){return TT(Ue(),e)}function gm(e,t=null,n=null,r){let o=ey(e,t,n,r);return o.resolveInjectorInitializers(),o}function ey(e,t=null,n=null,r,o=new Set){let i=[n||$e,k0(e)];return r=r||(typeof e=="object"?void 0:Ke(e)),new ji(i,t||Mu(),r||null,o)}var je=class e{static THROW_IF_NOT_FOUND=Vi;static NULL=new Ja;static create(t,n){if(Array.isArray(t))return gm({name:""},n,t,"");{let r=t.name??"";return gm({name:r},t.parent,t.providers,r)}}static \u0275prov=C({token:e,providedIn:"any",factory:()=>I(lv)});static __NG_ELEMENT_ID__=-1};var RT=new E("");RT.__NG_ELEMENT_ID__=e=>{let t=Ue();if(t===null)throw new w(204,!1);if(t.type&2)return t.value;if(e&U.Optional)return null;throw new w(204,!1)};var ty=!1,zn=(()=>{class e{static __NG_ELEMENT_ID__=OT;static __NG_ENV_ID__=n=>n}return e})(),au=class extends zn{_lView;constructor(t){super(),this._lView=t}onDestroy(t){return Mv(this._lView,t),()=>eT(this._lView,t)}};function OT(){return new au(x())}var Tr=class{},Af=new E("",{providedIn:"root",factory:()=>!1});var ny=new E(""),ry=new E(""),dn=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Ae(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(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)}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})();var wd=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,yv()&&(this.destroyRef=v(zn,{optional:!0})??void 0,this.pendingTasks=v(dn,{optional:!0})??void 0)}emit(t){let n=V(null);try{super.next(t)}finally{V(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t=="object"){let u=t;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 t instanceof se&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{t(n),r!==void 0&&this.pendingTasks?.remove(r)})}}},ee=wd;function Hi(...e){}function oy(e){let t,n;function r(){e=Hi;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function mm(e){return queueMicrotask(()=>e()),()=>{e=Hi}}var Nf="isAngularZone",uu=Nf+"_ID",FT=0,be=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ee(!1);onMicrotaskEmpty=new ee(!1);onStable=new ee(!1);onError=new ee(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=ty}=t;if(typeof Zone>"u")throw new w(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,LT(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Nf)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new w(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new w(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,t,PT,Hi,Hi);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},PT={};function Rf(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function kT(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){oy(()=>{e.callbackScheduled=!1,bd(e),e.isCheckStableRunning=!0,Rf(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),bd(e)}function LT(e){let t=()=>{kT(e)},n=FT++;e._inner=e._inner.fork({name:"angular",properties:{[Nf]:!0,[uu]:n,[uu+n]:!0},onInvokeTask:(r,o,i,s,a,u)=>{if(VT(u))return r.invokeTask(i,s,a,u);try{return vm(e),r.invokeTask(i,s,a,u)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),ym(e)}},onInvoke:(r,o,i,s,a,u,l)=>{try{return vm(e),r.invoke(i,s,a,u,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!jT(u)&&t(),ym(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,bd(e),Rf(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function bd(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function vm(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function ym(e){e._nesting--,Rf(e)}var Cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ee;onMicrotaskEmpty=new ee;onStable=new ee;onError=new ee;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function VT(e){return iy(e,"__ignore_ng_zone__")}function jT(e){return iy(e,"__scheduler_tick__")}function iy(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var St=class{_console=console;handleError(t){this._console.error("ERROR",t)}},UT=new E("",{providedIn:"root",factory:()=>{let e=v(be),t=v(St);return n=>e.runOutsideAngular(()=>t.handleError(n))}}),lu=class{destroyed=!1;listeners=null;errorHandler=v(St,{optional:!0});destroyRef=v(zn);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new w(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let n=this.listeners?.indexOf(t);n!==void 0&&n!==-1&&this.listeners?.splice(n,1)}}}emit(t){if(this.destroyed)throw new w(953,!1);if(this.listeners===null)return;let n=V(null);try{for(let r of this.listeners)try{r(t)}catch(o){this.errorHandler?.handleError(o)}}finally{V(n)}}};function u9(e){return new lu}function Dm(e,t){return Qm(e,t)}function BT(e){return Qm(Iu,e)}var sy=(Dm.required=BT,Dm);function $T(){return Ao(Ue(),x())}function Ao(e,t){return new xe(Mt(e,t))}var xe=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=$T}return e})();function ay(e){return e instanceof xe?e.nativeElement:e}var wm=new Set;function gt(e){wm.has(e)||(wm.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function HT(e){return typeof e=="function"&&e[Me]!==void 0}function Or(e,t){gt("NgSignals");let n=bg(e),r=n[Me];return t?.equal&&(r.equal=t.equal),n.set=o=>xi(r,o),n.update=o=>Cg(r,o),n.asReadonly=uy.bind(n),n}function uy(){let e=this[Me];if(e.readonlyFn===void 0){let t=()=>this();t[Me]=e,e.readonlyFn=t}return e.readonlyFn}function ly(e){return HT(e)&&typeof e.set=="function"}function zT(){return this._results[Symbol.iterator]()}var Ed=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new J}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=R0(t);(this._changesDetected=!N0(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=zT};function cy(e){return(e.flags&128)===128}var dy=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(dy||{}),fy=new Map,GT=0;function WT(){return GT++}function qT(e){fy.set(e[Nu],e)}function Id(e){fy.delete(e[Nu])}var bm="__ngContext__";function Fr(e,t){Ln(t)?(e[bm]=t[Nu],qT(t)):e[bm]=t}function py(e){return gy(e[Bi])}function hy(e){return gy(e[Tt])}function gy(e){for(;e!==null&&!cn(e);)e=e[Tt];return e}var _d;function my(e){_d=e}function ZT(){if(_d!==void 0)return _d;if(typeof document<"u")return document;throw new w(210,!1)}var Of=new E("",{providedIn:"root",factory:()=>KT}),KT="ng",Ff=new E(""),Gn=new E("",{providedIn:"platform",factory:()=>"unknown"});var l9=new E(""),Pf=new E("",{providedIn:"root",factory:()=>ZT().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var YT="h",QT="b";var vy=!1,JT=new E("",{providedIn:"root",factory:()=>vy});var kf=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(kf||{}),No=new E("");var ho=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ho||{}),yy=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),XT=[ho.EarlyRead,ho.Write,ho.MixedReadWrite,ho.Read],eS=(()=>{class e{ngZone=v(be);scheduler=v(Tr);errorHandler=v(St,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){v(No,{optional:!0})}execute(){this.executing=!0;for(let n of XT)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>r.hooks[n](r.pipelinedValue),r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(8),this.deferredRegistrations.clear()}register(n){this.executing?this.deferredRegistrations.add(n):(this.sequences.add(n),this.scheduler.notify(7))}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(kf.AFTER_NEXT_RENDER,n):n()}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),xd=class{impl;hooks;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i=null){this.impl=t,this.hooks=n,this.once=r,this.snapshot=i,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}};function tS(e,t){!t?.injector&&Au(tS);let n=t?.injector??v(je);return gt("NgAfterRender"),wy(e,n,t,!1)}function Dy(e,t){!t?.injector&&Au(Dy);let n=t?.injector??v(je);return gt("NgAfterNextRender"),wy(e,n,t,!0)}function nS(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function wy(e,t,n,r){let o=t.get(yy);o.impl??=t.get(eS);let i=t.get(No,null,{optional:!0}),s=n?.phase??ho.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(zn):null,u=new xd(o.impl,nS(e,s),r,a,i?.snapshot(null));return o.impl.register(u),u}var rS=()=>null;function by(e,t,n=!1){return rS(e,t,n)}function Cy(e,t){let n=e.contentQueries;if(n!==null){let r=V(null);try{for(let o=0;oe,createScript:e=>e,createScriptURL:e=>e})}catch{}return La}function Vu(e){return oS()?.createHTML(e)||e}var Va;function iS(){if(Va===void 0&&(Va=null,tn.trustedTypes))try{Va=tn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Va}function Cm(e){return iS()?.createScriptURL(e)||e}var an=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Km})`}},Sd=class extends an{getTypeName(){return"HTML"}},Md=class extends an{getTypeName(){return"Style"}},Ad=class extends an{getTypeName(){return"Script"}},Nd=class extends an{getTypeName(){return"URL"}},Rd=class extends an{getTypeName(){return"ResourceURL"}};function At(e){return e instanceof an?e.changingThisBreaksApplicationSecurity:e}function Wn(e,t){let n=sS(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Km})`)}return n===t}function sS(e){return e instanceof an&&e.getTypeName()||null}function Ey(e){return new Sd(e)}function Iy(e){return new Md(e)}function _y(e){return new Ad(e)}function xy(e){return new Nd(e)}function Ty(e){return new Rd(e)}function aS(e){let t=new Fd(e);return uS()?new Od(t):t}var Od=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{let n=new window.DOMParser().parseFromString(Vu(t),"text/html").body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.firstChild?.remove(),n)}catch{return null}}},Fd=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let n=this.inertDocument.createElement("template");return n.innerHTML=Vu(t),n}};function uS(){try{return!!new window.DOMParser().parseFromString(Vu(""),"text/html")}catch{return!1}}var lS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ju(e){return e=String(e),e.match(lS)?e:"unsafe:"+e}function fn(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function ns(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var Sy=fn("area,br,col,hr,img,wbr"),My=fn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ay=fn("rp,rt"),cS=ns(Ay,My),dS=ns(My,fn("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")),fS=ns(Ay,fn("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")),Em=ns(Sy,dS,fS,cS),Ny=fn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),pS=fn("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"),hS=fn("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"),gS=ns(Ny,pS,hS),mS=fn("script,style,template"),Pd=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let n=t.firstChild,r=!0,o=[];for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){o.push(n),n=DS(n);continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=yS(n);if(i){n=i;break}n=o.pop()}}return this.buf.join("")}startElement(t){let n=Im(t).toLowerCase();if(!Em.hasOwnProperty(n))return this.sanitizedSomething=!0,!mS.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);let r=t.attributes;for(let o=0;o"),!0}endElement(t){let n=Im(t).toLowerCase();Em.hasOwnProperty(n)&&!Sy.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(_m(t))}};function vS(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function yS(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw Ry(t);return t}function DS(e){let t=e.firstChild;if(t&&vS(e,t))throw Ry(t);return t}function Im(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function Ry(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var wS=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,bS=/([^\#-~ |!])/g;function _m(e){return e.replace(/&/g,"&").replace(wS,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(bS,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}var ja;function Oy(e,t){let n=null;try{ja=ja||aS(e);let r=t?String(t):"";n=ja.getInertBodyElement(r);let o=5,i=r;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,r=i,i=n.innerHTML,n=ja.getInertBodyElement(r)}while(r!==i);let a=new Pd().sanitizeChildren(xm(n)||n);return Vu(a)}finally{if(n){let r=xm(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function xm(e){return"content"in e&&CS(e)?e.content:null}function CS(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var Ht=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Ht||{});function ES(e){let t=Py();return t?t.sanitize(Ht.URL,e)||"":Wn(e,"URL")?At(e):ju(Ze(e))}function IS(e){let t=Py();if(t)return Cm(t.sanitize(Ht.RESOURCE_URL,e)||"");if(Wn(e,"ResourceURL"))return Cm(At(e));throw new w(904,!1)}function _S(e,t){return t==="src"&&(e==="embed"||e==="frame"||e==="iframe"||e==="media"||e==="script")||t==="href"&&(e==="base"||e==="link")?IS:ES}function Fy(e,t,n){return _S(t,n)(e)}function Py(){let e=x();return e&&e[rn].sanitizer}var xS=/^>|^->||--!>|)/g,SS="\u200B$1\u200B";function MS(e){return e.replace(xS,t=>t.replace(TS,SS))}function ky(e){return e instanceof Function?e():e}var Un=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Un||{});function AS(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var Ly="ng-template";function NS(e,t,n,r){let o=0;if(r){for(;o-1){let i;for(;++oi?d="":d=o[c+1].toLowerCase(),r&2&&l!==d){if(_t(r))return!1;s=!0}}}}return _t(r)||s}function _t(e){return(e&1)===0}function FS(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o-1)for(n++;n0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!_t(s)&&(t+=Tm(i,o),o=""),r=s,i=i||!_t(r);n++}return o!==""&&(t+=Tm(i,o)),t}function US(e){return e.map(jS).join(",")}function BS(e){let t=[],n=[],r=1,o=2;for(;rfe&&$y(e,t,fe,!1),ft(s?2:0,o),n(r,o)}finally{_r(i),ft(s?3:1,o)}}function Uf(e,t,n){Rv()&&(Fr(Mt(n,t),t),Wy(e,t,n))}function Wy(e,t,n){iM(e,t,n),(n.flags&64)===64&&sM(e,t,n)}function Bf(e,t,n=Mt){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;inull;function Mm(e,t,n,r,o){for(let i in t){if(!t.hasOwnProperty(i))continue;let s=t[i];if(s===void 0)continue;r??={};let a,u=Un.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let l=i;if(o!==null){if(!o.hasOwnProperty(i))continue;l=o[i]}e===0?Am(r,n,l,a,u):Am(r,n,l,a)}return r}function Am(e,t,n,r,o){let i;e.hasOwnProperty(n)?(i=e[n]).push(t,r):i=e[n]=[t,r],o!==void 0&&i.push(o)}function eM(e,t,n){let r=t.directiveStart,o=t.directiveEnd,i=e.data,s=t.attrs,a=[],u=null,l=null;for(let c=r;c0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function iM(e,t,n){let r=n.directiveStart,o=n.directiveEnd;Nr(n)&&gM(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||su(n,t);let i=n.initialInputs;for(let s=r;s0&&(n[o-1][Tt]=t),r0&&(e[n-1][Tt]=r[Tt]);let i=Qa(e,Le+t);IM(r[P],r);let s=i[on];s!==null&&s.detachView(i[P]),r[Ve]=null,r[Tt]=null,r[N]&=-129}return r}function Bu(e,t){if(Qi(t))return;let n=t[ae];n.destroyNode&&Hu(e,t,n,3,null,null),xM(t)}function Jc(e,t){if(Qi(t))return;let n=V(null);try{t[N]&=-129,t[N]|=256,t[nt]&&Xr(t[nt]),MM(e,t),SM(e,t),t[P].type===1&&t[ae].destroy();let r=t[br];if(r!==null&&cn(t[Ve])){r!==t[Ve]&&Kf(r,t);let o=t[on];o!==null&&o.detachView(e)}Id(t)}finally{V(n)}}function SM(e,t){let n=e.cleanup,r=t[Xa];if(n!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Xa]=null);let o=t[kn];if(o!==null){t[kn]=null;for(let s=0;s{Xi(e.lView)},consumerOnSignalRead(){this.lView[nt]=this}});function BM(e){let t=e[nt]??Object.create($M);return t.lView=e,t}var $M=F(y({},pr),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Ir(e.lView);for(;t&&!sD(t[P]);)t=Ir(t);t&&bf(t)},consumerOnSignalRead(){this.lView[nt]=this}});function sD(e){return e.type!==2}function aD(e){if(e[Cr]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Cr])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[N]&8192)}}var HM=100;function uD(e,t=!0,n=0){let o=e[rn].rendererFactory,i=!1;i||o.begin?.();try{zM(e,n)}catch(s){throw t&&Yy(e,s),s}finally{i||o.end?.()}}function zM(e,t){let n=kv();try{nu(!0),Ld(e,t);let r=0;for(;Ou(e);){if(r===HM)throw new w(103,!1);r++,Ld(e,1)}}finally{nu(n)}}function GM(e,t,n,r){if(Qi(t))return;let o=t[N],i=!1,s=!1;xf(t);let a=!0,u=null,l=null;i||(sD(e)?(l=LM(t),u=Jr(l)):cg()===null?(a=!1,l=BM(t),u=Jr(l)):t[nt]&&(Xr(t[nt]),t[nt]=null));try{Sv(t),uT(e.bindingStartIndex),n!==null&&Gy(e,t,n,2,r);let c=(o&3)===3;if(!i)if(c){let p=e.preOrderCheckHooks;p!==null&&za(t,p,null)}else{let p=e.preOrderHooks;p!==null&&Ga(t,p,0,null),Kc(t,0)}if(s||WM(t),aD(t),lD(t,0),e.contentQueries!==null&&Cy(e,t),!i)if(c){let p=e.contentCheckHooks;p!==null&&za(t,p)}else{let p=e.contentHooks;p!==null&&Ga(t,p,1),Kc(t,1)}ZM(e,t);let d=e.components;d!==null&&dD(t,d,0);let f=e.viewQuery;if(f!==null&&Td(2,f,r),!i)if(c){let p=e.viewCheckHooks;p!==null&&za(t,p)}else{let p=e.viewHooks;p!==null&&Ga(t,p,2),Kc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Ha]){for(let p of t[Ha])p();t[Ha]=null}i||(t[N]&=-73)}catch(c){throw i||Xi(t),c}finally{l!==null&&(Ii(l,u),a&&jM(l)),Tf()}}function lD(e,t){for(let n=py(e);n!==null;n=hy(n))for(let r=Le;r-1&&(zi(t,r),Qa(n,r))}this._attachedToViewContainer=!1}Bu(this._lView[P],this._lView)}onDestroy(t){Mv(this._lView,t)}markForCheck(){Qf(this._cdRefInjectingView||this._lView,4)}markForRefresh(){bf(this._cdRefInjectingView||this._lView)}detach(){this._lView[N]&=-129}reattach(){pd(this._lView),this._lView[N]|=128}detectChanges(){this._lView[N]|=1024,uD(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new w(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=tu(this._lView),n=this._lView[br];n!==null&&!t&&Kf(n,this._lView),Qy(this._lView[P],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new w(902,!1);this._appRef=t;let n=tu(this._lView),r=this._lView[br];r!==null&&!n&&Jy(r,this._lView),pd(this._lView)}},Gi=(()=>{class e{static __NG_ELEMENT_ID__=QM}return e})(),KM=Gi,YM=class extends KM{_declarationLView;_declarationTContainer;elementRef;constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=rs(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Sr(o)}};function QM(){return zu(Ue(),x())}function zu(e,t){return e.type&4?new YM(t,e,Ao(e,t)):null}function Pr(e,t,n,r,o){let i=e.data[t];if(i===null)i=JM(e,t,n,r,o),lT()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=aT();i.injectorIndex=s===null?-1:s.injectorIndex}return $n(i,!0),i}function JM(e,t,n,r,o){let i=Fv(),s=Cf(),a=s?i:i&&i.parent,u=e.data[t]=eA(e,a,n,t,r,o);return XM(e,u,i,s),u}function XM(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function eA(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return Ov()&&(a|=128),{type:n,index:r,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:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var f9=new RegExp(`^(\\d+)*(${QT}|${YT})*(.*)`);var tA=()=>null;function Io(e,t){return tA(e,t)}var Vd=class{},fu=class{},jd=class{resolveComponentFactory(t){throw Error(`No component factory found for ${Ke(t)}.`)}},_o=class{static NULL=new jd},xo=class{},ot=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>nA()}return e})();function nA(){let e=x(),t=Ue(),n=jt(t.index,e);return(Ln(n)?n:e)[ae]}var rA=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>null})}return e})();function pu(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s{class e{static __NG_ELEMENT_ID__=sA}return e})();function sA(){let e=Ue();return pD(e,x())}var aA=kr,fD=class extends aA{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Ao(this._hostTNode,this._hostLView)}get injector(){return new Dr(this._hostTNode,this._hostLView)}get parentInjector(){let t=Sf(this._hostTNode,this._hostLView);if(Gv(t)){let n=ou(t,this._hostLView),r=ru(t),o=n[P].data[r+8];return new Dr(o,n)}else return new Dr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=Om(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-Le}createEmbeddedView(t,n,r){let o,i;typeof r=="number"?o=r:r!=null&&(o=r.index,i=r.injector);let s=Io(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},i,s);return this.insertImpl(a,o,Eo(this._hostTNode,s)),a}createComponent(t,n,r,o,i){let s=t&&!q0(t),a;if(s)a=n;else{let h=n||{};a=h.index,r=h.injector,o=h.projectableNodes,i=h.environmentInjector||h.ngModuleRef}let u=s?t:new To(Vn(t)),l=r||this.parentInjector;if(!i&&u.ngModule==null){let g=(s?l:this.parentInjector).get(Ye,null);g&&(i=g)}let c=Vn(u.componentType??{}),d=Io(this._lContainer,c?.id??null),f=d?.firstChild??null,p=u.create(l,o,f,i);return this.insertImpl(p.hostView,a,Eo(this._hostTNode,d)),p}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let o=t._lView;if(J0(o)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let u=o[Ve],l=new fD(u,u[Xe],u[Ve]);l.detach(l.indexOf(t))}}let i=this._adjustIndex(n),s=this._lContainer;return os(s,o,i,r),t.attachToViewContainerRef(),uv(Xc(s),i,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=Om(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=zi(this._lContainer,n);r&&(Qa(Xc(this._lContainer),n),Bu(r[P],r))}detach(t){let n=this._adjustIndex(t,-1),r=zi(this._lContainer,n);return r&&Qa(Xc(this._lContainer),n)!=null?new Sr(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function Om(e){return e[eu]}function Xc(e){return e[eu]||(e[eu]=[])}function pD(e,t){let n,r=t[e.index];return cn(r)?n=r:(n=Ky(r,t,null,e),t[e.index]=n,zf(t,n)),lA(n,t,e,r),new fD(n,e,t)}function uA(e,t){let n=e[ae],r=n.createComment(""),o=Mt(t,e),i=n.parentNode(o);return cu(n,i,r,n.nextSibling(o),!1),r}var lA=fA,cA=()=>!1;function dA(e,t,n){return cA(e,t,n)}function fA(e,t,n,r){if(e[Er])return;let o;n.type&8?o=Vt(r):o=uA(t,n),e[Er]=o}var Bd=class e{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},$d=class e{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,o=[];for(let i=0;i0)r.push(s[a/2]);else{let l=i[a+1],c=t[-u];for(let d=Le;dt.trim())}function vD(e,t,n){e.queries===null&&(e.queries=new Hd),e.queries.track(new zd(t,n))}function DA(e,t){let n=e.contentQueries||(e.contentQueries=[]),r=n.length?n[n.length-1]:-1;t!==r&&n.push(e.queries.length-1,t)}function Xf(e,t){return e.queries.getByIndex(t)}function yD(e,t){let n=e[P],r=Xf(n,t);return r.crossesNgTemplate?Gd(n,e,t,[]):hD(n,e,r,t)}function ep(e,t,n){let r,o=Sc(()=>{r._dirtyCounter();let i=IA(r,e);if(t&&i===void 0)throw new w(-951,!1);return i});return r=o[Me],r._dirtyCounter=Or(0),r._flatValue=void 0,o}function wA(e){return ep(!0,!1,e)}function bA(e){return ep(!0,!0,e)}function CA(e){return ep(!1,!1,e)}function EA(e,t){let n=e[Me];n._lView=x(),n._queryIndex=t,n._queryList=Jf(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(r=>r+1))}function IA(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[N]&4)return t?void 0:$e;let o=Jf(n,r),i=yD(n,r);return o.reset(i,ay),t?o.first:o._changesDetected||e._flatValue===void 0?e._flatValue=o.toArray():e._flatValue}function Fm(e,t){return wA(t)}function _A(e,t){return bA(t)}var h9=(Fm.required=_A,Fm);function g9(e,t){return CA(t)}function DD(e,t){let n=Object.create(Ym),r=new lu;n.value=e;function o(){return Ei(n),Pm(n.value),n.value}return o[Me]=n,o.asReadonly=uy.bind(o),o.set=i=>{n.equal(n.value,i)||(xi(n,i),r.emit(i))},o.update=i=>{Pm(n.value),o.set(i(n.value))},o.subscribe=r.subscribe.bind(r),o.destroyRef=r.destroyRef,o}function Pm(e){if(e===Iu)throw new w(952,!1)}function km(e,t){return DD(e,t)}function xA(e){return DD(Iu,e)}var m9=(km.required=xA,km);var Bn=class{},Wi=class{};var Wd=class extends Bn{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new hu(this);constructor(t,n,r,o=!0){super(),this.ngModuleType=t,this._parent=n;let i=dv(t);this._bootstrapComponents=ky(i.bootstrap),this._r3Injector=ey(t,n,[{provide:Bn,useValue:this},{provide:_o,useValue:this.componentFactoryResolver},...r],Ke(t),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},qd=class extends Wi{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new Wd(this.moduleType,t,[])}};var mu=class extends Bn{injector;componentFactoryResolver=new hu(this);instance=null;constructor(t){super();let n=new ji([...t.providers,{provide:Bn,useValue:this},{provide:_o,useValue:this.componentFactoryResolver}],t.parent||Mu(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function tp(e,t,n=null){return new mu({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var TA=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=hv(!1,n.type),o=r.length>0?tp([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=C({token:e,providedIn:"environment",factory:()=>new e(I(Ye))})}return e})();function wD(e){return Ki(()=>{let t=bD(e),n=F(y({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===dy.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(TA).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Ut.Emulated,styles:e.styles||$e,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&>("NgStandalone"),CD(n);let r=e.dependencies;return n.directiveDefs=Vm(r,!1),n.pipeDefs=Vm(r,!0),n.id=AA(n),n})}function SA(e){return Vn(e)||mf(e)}function MA(e){return e!==null}function zt(e){return Ki(()=>({type:e.type,bootstrap:e.bootstrap||$e,declarations:e.declarations||$e,imports:e.imports||$e,exports:e.exports||$e,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Lm(e,t){if(e==null)return nn;let n={};for(let r in e)if(e.hasOwnProperty(r)){let o=e[r],i,s,a=Un.None;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i):(i=o,s=o),t?(n[i]=a!==Un.None?[r,a]:r,t[i]=s):n[i]=r}return n}function H(e){return Ki(()=>{let t=bD(e);return CD(t),t})}function Ro(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function bD(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||nn,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||$e,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Lm(e.inputs,t),outputs:Lm(e.outputs),debugInfo:null}}function CD(e){e.features?.forEach(t=>t(e))}function Vm(e,t){if(!e)return null;let n=t?fv:SA;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(MA)}function AA(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function NA(e){return Object.getPrototypeOf(e.prototype).constructor}function Ce(e){let t=NA(e.type),n=!0,r=[e];for(;t;){let o;if(sn(e))o=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new w(903,!1);o=t.\u0275dir}if(o){if(n){r.push(o);let s=e;s.inputs=Ua(e.inputs),s.inputTransforms=Ua(e.inputTransforms),s.declaredInputs=Ua(e.declaredInputs),s.outputs=Ua(e.outputs);let a=o.hostBindings;a&&kA(e,a);let u=o.viewQuery,l=o.contentQueries;if(u&&FA(e,u),l&&PA(e,l),RA(e,o),d0(e.outputs,o.outputs),sn(o)&&o.data.animation){let c=e.data;c.animation=(c.animation||[]).concat(o.data.animation)}}let i=o.features;if(i)for(let s=0;s=0;r--){let o=e[r];o.hostVars=t+=o.hostVars,o.hostAttrs=Co(o.hostAttrs,n=Co(n,o.hostAttrs))}}function Ua(e){return e===nn?{}:e===$e?[]:e}function FA(e,t){let n=e.viewQuery;n?e.viewQuery=(r,o)=>{t(r,o),n(r,o)}:e.viewQuery=t}function PA(e,t){let n=e.contentQueries;n?e.contentQueries=(r,o,i)=>{t(r,o,i),n(r,o,i)}:e.contentQueries=t}function kA(e,t){let n=e.hostBindings;n?e.hostBindings=(r,o)=>{t(r,o),n(r,o)}:e.hostBindings=t}function v9(e){let t=n=>{let r=Array.isArray(e);n.hostDirectives===null?(n.findHostDirectiveDefs=ED,n.hostDirectives=r?e.map(Zd):[e]):r?n.hostDirectives.unshift(...e.map(Zd)):n.hostDirectives.unshift(e)};return t.ngInherit=!0,t}function ED(e,t,n){if(e.hostDirectives!==null)for(let r of e.hostDirectives)if(typeof r=="function"){let o=r();for(let i of o)jm(Zd(i),t,n)}else jm(r,t,n)}function jm(e,t,n){let r=mf(e.directive);LA(r.declaredInputs,e.inputs),ED(r,t,n),n.set(r,e),t.push(r)}function Zd(e){return typeof e=="function"?{directive:Ne(e),inputs:nn,outputs:nn}:{directive:Ne(e.directive),inputs:Um(e.inputs),outputs:Um(e.outputs)}}function Um(e){if(e===void 0||e.length===0)return nn;let t={};for(let n=0;n{class e{log(n){console.log(n)}warn(n){console.warn(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();var TD=new E("");function qn(e){return!!e&&typeof e.then=="function"}function op(e){return!!e&&typeof e.subscribe=="function"}var SD=new E("");var MD=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=v(SD,{optional:!0})??[];injector=v(je);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=rt(this.injector,o);if(qn(i))n.push(i);else if(op(i)){let s=new Promise((a,u)=>{i.subscribe({complete:a,error:u})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),AD=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>new yu})}return e})(),yu=class{queuedEffectCount=0;queues=new Map;schedule(t){this.enqueue(t)}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),this.queuedEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||(this.queuedEffectCount++,r.add(t))}flush(){for(;this.queuedEffectCount>0;)for(let[t,n]of this.queues)t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n))}flushQueue(t){for(let n of t)t.delete(n),this.queuedEffectCount--,n.run()}},Gu=new E("");function HA(){wg(()=>{throw new w(600,!1)})}function zA(e){return e.isBoundToModule}var GA=10;function WA(e,t,n){try{let r=n();return qn(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e.handleError(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var un=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=v(UT);afterRenderManager=v(yy);zonelessEnabled=v(Af);rootEffectScheduler=v(AD);dirtyFlags=0;deferredDirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=v(dn).hasPendingTasks.pipe(A(n=>!n));constructor(){v(No,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=v(Ye);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){let o=n instanceof fu;if(!this._injector.get(MD).done){let f=!o&&pv(n),p=!1;throw new w(405,p)}let s;o?s=n:s=this._injector.get(_o).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let a=zA(s)?void 0:this._injector.get(Bn),u=r||s.selector,l=s.create(je.NULL,[],u,a),c=l.location.nativeElement,d=l.injector.get(TD,null);return d?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),qa(this.components,l),d?.unregisterApplication(c)}),this._loadComponent(l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick=()=>{if(this.tracingSnapshot!==null){let r=this.tracingSnapshot;this.tracingSnapshot=null,r.run(kf.CHANGE_DETECTION,this._tick),r.dispose();return}if(this._runningTick)throw new w(101,!1);let n=V(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,V(n),this.afterTick.next()}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(xo,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let n=0;for(;this.dirtyFlags!==0&&n++Ou(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;qa(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(Gu,[]).forEach(o=>o(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._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>qa(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new w(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qa(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function qA(e,t,n,r){if(!n&&!Ou(e))return;uD(e,t,n&&!r?0:1)}function Lr(e,t,n,r){let o=x(),i=Rr();if(Je(o,i,t)){let s=te(),a=ts();mM(a,o,e,t,n,r)}return Lr}function ip(e,t,n,r){return Je(e,Rr(),n)?t+Ze(n)+r:Te}function ZA(e,t,n,r,o,i){let s=If(),a=qi(e,s,n,o);return es(2),a?t+Ze(n)+r+Ze(o)+i:Te}function KA(e,t,n,r,o,i,s,a){let u=If(),l=_D(e,u,n,o,s);return es(3),l?t+Ze(n)+r+Ze(o)+i+Ze(s)+a:Te}function YA(e,t,n,r,o,i,s,a,u,l,c,d){let f=If(),p=xD(e,f,n,o,s,u);return p=Je(e,f+4,c)||p,es(5),p?t+Ze(n)+r+Ze(o)+i+Ze(s)+a+Ze(u)+l+Ze(c)+d:Te}function Ba(e,t){return e<<17|t<<2}function Mr(e){return e>>17&32767}function QA(e){return(e&2)==2}function JA(e,t){return e&131071|t<<17}function Kd(e){return e|2}function So(e){return(e&131068)>>2}function ed(e,t){return e&-131069|t<<2}function XA(e){return(e&1)===1}function Yd(e){return e|1}function eN(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=Mr(s),u=So(s);e[r]=n;let l=!1,c;if(Array.isArray(n)){let d=n;c=d[1],(c===null||Yi(d,c)>0)&&(l=!0)}else c=n;if(o)if(u!==0){let f=Mr(e[a+1]);e[r+1]=Ba(f,a),f!==0&&(e[f+1]=ed(e[f+1],r)),e[a+1]=JA(e[a+1],r)}else e[r+1]=Ba(a,0),a!==0&&(e[a+1]=ed(e[a+1],r)),a=r;else e[r+1]=Ba(u,0),a===0?a=r:e[u+1]=ed(e[u+1],r),u=r;l&&(e[r+1]=Kd(e[r+1])),Bm(e,c,r,!0),Bm(e,c,r,!1),tN(t,c,e,r,i),s=Ba(a,u),i?t.classBindings=s:t.styleBindings=s}function tN(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&Yi(i,t)>=0&&(n[r+1]=Yd(n[r+1]))}function Bm(e,t,n,r){let o=e[n+1],i=t===null,s=r?Mr(o):So(o),a=!1;for(;s!==0&&(a===!1||i);){let u=e[s],l=e[s+1];nN(u,t)&&(a=!0,e[s+1]=r?Yd(l):Kd(l)),s=r?Mr(l):So(l)}a&&(e[n+1]=r?Kd(o):Yd(o))}function nN(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Yi(e,t)>=0:!1}var xt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function rN(e){return e.substring(xt.key,xt.keyEnd)}function oN(e){return iN(e),ND(e,RD(e,0,xt.textEnd))}function ND(e,t){let n=xt.textEnd;return n===t?-1:(t=xt.keyEnd=sN(e,xt.key=t,n),RD(e,t,n))}function iN(e){xt.key=0,xt.keyEnd=0,xt.value=0,xt.valueEnd=0,xt.textEnd=e.length}function RD(e,t,n){for(;t32;)t++;return t}function aN(e,t,n){let r=x(),o=Rr();if(Je(r,o,t)){let i=te(),s=ts();Uu(i,s,r,e,t,r[ae],n,!1)}return aN}function Qd(e,t,n,r,o){let i=t.inputs,s=o?"class":"style";Gf(e,n,i[s],s,r)}function Wu(e,t){return uN(e,t,null,!0),Wu}function y9(e){FD(hN,OD,e,!0)}function OD(e,t){for(let n=oN(t);n>=0;n=ND(t,n))Tu(e,rN(t),!0)}function uN(e,t,n,r){let o=x(),i=te(),s=es(2);if(i.firstUpdatePass&&kD(i,e,s,r),t!==Te&&Je(o,s,t)){let a=i.data[ht()];LD(i,a,o,o[ae],e,o[s+1]=mN(t,n),r,s)}}function FD(e,t,n,r){let o=te(),i=es(2);o.firstUpdatePass&&kD(o,null,i,r);let s=x();if(n!==Te&&Je(s,i,n)){let a=o.data[ht()];if(VD(a,r)&&!PD(o,i)){let u=r?a.classesWithoutHost:a.stylesWithoutHost;u!==null&&(n=id(u,n||"")),Qd(o,a,s,n,r)}else gN(o,a,s,s[ae],s[i+1],s[i+1]=pN(e,t,n),r,i)}}function PD(e,t){return t>=e.expandoStartIndex}function kD(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[ht()],s=PD(e,n);VD(i,r)&&t===null&&!s&&(t=!1),t=lN(o,i,t,r),eN(o,i,t,n,s,r)}}function lN(e,t,n,r){let o=fT(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=td(null,e,t,n,r),n=Zi(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=td(o,e,t,n,r),i===null){let u=cN(e,t,r);u!==void 0&&Array.isArray(u)&&(u=td(null,e,t,u[1],r),u=Zi(u,t.attrs,r),dN(e,t,r,u))}else i=fN(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function cN(e,t,n){let r=n?t.classBindings:t.styleBindings;if(So(r)!==0)return e[Mr(r)]}function dN(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[Mr(o)]=r}function fN(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i0;){let u=e[o],l=Array.isArray(u),c=l?u[1]:u,d=c===null,f=n[o+1];f===Te&&(f=d?$e:void 0);let p=d?qc(f,r):c===r?f:void 0;if(l&&!Du(p)&&(p=qc(u,r)),Du(p)&&(a=p,s))return a;let h=e[o+1];o=s?Mr(h):So(h)}if(t!==null){let u=i?t.residualClasses:t.residualStyles;u!=null&&(a=qc(u,r))}return a}function Du(e){return e!==void 0}function mN(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=Ke(At(e)))),e}function VD(e,t){return(e.flags&(t?8:16))!==0}function D9(e,t,n){let r=x(),o=ip(r,e,t,n);FD(Tu,OD,o,!0)}function w9(){return x()[Qe][_e]}var Jd=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function nd(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function vN(e,t,n){let r,o,i=0,s=e.length-1,a=void 0;if(Array.isArray(t)){let u=t.length-1;for(;i<=s&&i<=u;){let l=e.at(i),c=t[i],d=nd(i,l,i,c,n);if(d!==0){d<0&&e.updateValue(i,c),i++;continue}let f=e.at(s),p=t[u],h=nd(s,f,u,p,n);if(h!==0){h<0&&e.updateValue(s,p),s--,u--;continue}let g=n(i,l),m=n(s,f),D=n(i,c);if(Object.is(D,m)){let R=n(u,p);Object.is(R,g)?(e.swap(i,s),e.updateValue(s,p),u--,s--):e.move(s,i),e.updateValue(i,c),i++;continue}if(r??=new wu,o??=zm(e,i,s,n),Xd(e,r,i,D))e.updateValue(i,c),i++,s++;else if(o.has(D))r.set(g,e.detach(i)),s--;else{let R=e.create(i,t[i]);e.attach(i,R),i++,s++}}for(;i<=u;)Hm(e,r,n,i,t[i]),i++}else if(t!=null){let u=t[Symbol.iterator](),l=u.next();for(;!l.done&&i<=s;){let c=e.at(i),d=l.value,f=nd(i,c,i,d,n);if(f!==0)f<0&&e.updateValue(i,d),i++,l=u.next();else{r??=new wu,o??=zm(e,i,s,n);let p=n(i,d);if(Xd(e,r,i,p))e.updateValue(i,d),i++,s++,l=u.next();else if(!o.has(p))e.attach(i,e.create(i,d)),i++,s++,l=u.next();else{let h=n(i,c);r.set(h,e.detach(i)),s--}}}for(;!l.done;)Hm(e,r,n,e.length,l.value),l=u.next()}for(;i<=s;)e.destroy(e.detach(s--));r?.forEach(u=>{e.destroy(u)})}function Xd(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Hm(e,t,n,r,o){if(Xd(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function zm(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var wu=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function b9(e,t){gt("NgControlFlow");let n=x(),r=Rr(),o=n[r]!==Te?n[r]:-1,i=o!==-1?bu(n,fe+o):void 0,s=0;if(Je(n,r,e)){let a=V(null);try{if(i!==void 0&&oD(i,s),e!==-1){let u=fe+e,l=bu(n,u),c=rf(n[P],u),d=Io(l,c.tView.ssrId),f=rs(n,c,t,{dehydratedView:d});os(l,f,s,Eo(c,d))}}finally{V(a)}}else if(i!==void 0){let a=rD(i,s);a!==void 0&&(a[_e]=t)}}var ef=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-Le}};function C9(e){return e}function E9(e,t){return t}var tf=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function I9(e,t,n,r,o,i,s,a,u,l,c,d,f){gt("NgControlFlow");let p=x(),h=te(),g=u!==void 0,m=x(),D=a?s.bind(m[Qe][_e]):s,R=new tf(g,D);m[fe+e]=R,vu(p,h,e+1,t,n,r,o,jn(h.consts,i)),g&&vu(p,h,e+2,u,l,c,d,jn(h.consts,f))}var nf=class extends Jd{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-Le}at(t){return this.getLView(t)[_e].$implicit}attach(t,n){let r=n[wo];this.needsIndexUpdate||=t!==this.length,os(this.lContainer,n,t,Eo(this.templateTNode,r))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,yN(this.lContainer,t)}create(t,n){let r=Io(this.lContainer,this.templateTNode.tView.ssrId),o=rs(this.hostLView,this.templateTNode,new ef(this.lContainer,n,t),{dehydratedView:r});return this.operationsCounter?.recordCreate(),o}destroy(t){Bu(t[P],t),this.operationsCounter?.recordDestroy()}updateValue(t,n){this.getLView(t)[_e].$implicit=n}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t(ku(!0),jy(r,o,gT()));function CN(e,t,n,r,o){let i=t.consts,s=jn(i,r),a=Pr(t,e,8,"ng-container",s);s!==null&&pu(a,s,!0);let u=jn(i,o);return Hf(t,n,a,u),t.queries!==null&&t.queries.elementStart(t,a),a}function BD(e,t,n){let r=x(),o=te(),i=e+fe,s=o.firstCreatePass?CN(i,o,r,t,n):o.data[i];$n(s,!0);let a=IN(o,r,s,e);return r[i]=a,Pu()&&$u(o,r,a,s),Fr(a,r),Ru(s)&&(Uf(o,r,s),Lf(o,s,r)),n!=null&&Bf(r,s),BD}function $D(){let e=Ue(),t=te();return Cf()?Ef():(e=e.parent,$n(e,!1)),t.firstCreatePass&&(Lu(t,e),yf(e)&&t.queries.elementEnd(e)),$D}function EN(e,t,n){return BD(e,t,n),$D(),EN}var IN=(e,t,n,r)=>(ku(!0),zS(t[ae],""));function x9(){return x()}function _N(e,t,n){let r=x(),o=Rr();if(Je(r,o,t)){let i=te(),s=ts();Uu(i,s,r,e,t,r[ae],n,!0)}return _N}var yr=void 0;function xN(e){let t=e,n=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return n===1&&r===0?1:5}var TN=["en",[["a","p"],["AM","PM"],yr],[["AM","PM"],yr,yr],[["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"]],yr,[["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"]],yr,[["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}",yr,"{1} 'at' {0}",yr],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",xN],Li={};function HD(e,t,n){typeof t!="string"&&(n=t,t=e[ue.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),Li[t]=e,n&&(Li[t][ue.ExtraData]=n)}function it(e){let t=SN(e),n=Gm(t);if(n)return n;let r=t.split("-")[0];if(n=Gm(r),n)return n;if(r==="en")return TN;throw new w(701,!1)}function Gm(e){return e in Li||(Li[e]=tn.ng&&tn.ng.common&&tn.ng.common.locales&&tn.ng.common.locales[e]),Li[e]}var ue=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(ue||{});function SN(e){return e.toLowerCase().replace(/_/g,"-")}var Cu="en-US";var MN=Cu;function AN(e){typeof e=="string"&&(MN=e.toLowerCase().replace(/_/g,"-"))}var NN=(e,t,n)=>{};function mt(e,t,n,r){let o=x(),i=te(),s=Ue();return zD(i,o,o[ae],s,e,t,r),mt}function RN(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;iu?a[u]:null}typeof s=="string"&&(i+=2)}return null}function zD(e,t,n,r,o,i,s){let a=Ru(r),l=e.firstCreatePass&&Nv(e),c=t[_e],d=Av(t),f=!0;if(r.type&3||s){let g=Mt(r,t),m=s?s(g):g,D=d.length,R=s?ie=>s(Vt(ie[r.index])):r.index,B=null;if(!s&&a&&(B=RN(e,t,o,r.index)),B!==null){let ie=B.__ngLastListenerFn__||B;ie.__ngNextListenerFn__=i,B.__ngLastListenerFn__=i,f=!1}else{i=qm(r,t,c,i),NN(g,o,i);let ie=n.listen(m,o,i);d.push(i,ie),l&&l.push(o,R,D,D+1)}}else i=qm(r,t,c,i);let p=r.outputs,h;if(f&&p!==null&&(h=p[o])){let g=h.length;if(g)for(let m=0;m=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function O9(e){let t=Pv();return Ji(t,fe+e)}function F9(e,t=""){let n=x(),r=te(),o=e+fe,i=r.firstCreatePass?Pr(r,o,1,t,null):r.data[o],s=kN(r,n,i,t,e);n[o]=s,Pu()&&$u(r,n,s,i),$n(i,!1)}var kN=(e,t,n,r,o)=>(ku(!0),$S(t[ae],r));function LN(e){return KD("",e,""),LN}function KD(e,t,n){let r=x(),o=ip(r,e,t,n);return o!==Te&&qu(r,ht(),o),KD}function VN(e,t,n,r,o){let i=x(),s=ZA(i,e,t,n,r,o);return s!==Te&&qu(i,ht(),s),VN}function jN(e,t,n,r,o,i,s){let a=x(),u=KA(a,e,t,n,r,o,i,s);return u!==Te&&qu(a,ht(),u),jN}function UN(e,t,n,r,o,i,s,a,u,l,c){let d=x(),f=YA(d,e,t,n,r,o,i,s,a,u,l,c);return f!==Te&&qu(d,ht(),f),UN}function qu(e,t,n){let r=Tv(t,e);HS(e[ae],r,n)}function BN(e,t,n){ly(t)&&(t=t());let r=x(),o=Rr();if(Je(r,o,t)){let i=te(),s=ts();Uu(i,s,r,e,t,r[ae],n,!1)}return BN}function P9(e,t){let n=ly(e);return n&&e.set(t),n}function $N(e,t){let n=x(),r=te(),o=Ue();return zD(r,n,n[ae],o,e,t),$N}var YD={};function HN(e){let t=te(),n=x(),r=e+fe,o=Pr(t,r,128,null,null);return $n(o,!1),ap(t,n,r,YD),HN}function k9(e){gt("NgLet");let t=te(),n=x(),r=ht();return ap(t,n,r,e),e}function L9(e){let t=Pv(),n=Ji(t,fe+e);if(n===YD)throw new w(314,!1);return n}function zN(e,t,n){let r=te();if(r.firstCreatePass){let o=sn(e);of(n,r.data,r.blueprint,o,!0),of(t,r.data,r.blueprint,o,!1)}}function of(e,t,n,r,o){if(e=Ne(e),Array.isArray(e))for(let i=0;i>20;if(Do(e)||!e.multi){let p=new xr(l,o,b),h=od(u,t,o?c:c+f,d);h===-1?(yd(su(a,s),i,u),rd(i,e,t.length),t.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(p),s.push(p)):(n[h]=p,s[h]=p)}else{let p=od(u,t,c+f,d),h=od(u,t,c,c+f),g=p>=0&&n[p],m=h>=0&&n[h];if(o&&!m||!o&&!g){yd(su(a,s),i,u);let D=qN(o?WN:GN,n.length,o,r,l);!o&&m&&(n[h].providerFactory=D),rd(i,e,t.length,0),t.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(D),s.push(D)}else{let D=QD(n[o?h:p],l,!o&&r);rd(i,e,p>-1?p:h,D)}!o&&r&&m&&n[h].componentProviders++}}}function rd(e,t,n,r){let o=Do(t),i=U0(t);if(o||i){let u=(i?Ne(t.useClass):t).prototype.ngOnDestroy;if(u){let l=e.destroyHooks||(e.destroyHooks=[]);if(!o&&t.multi){let c=l.indexOf(n);c===-1?l.push(n,[r,u]):l[c+1].push(r,u)}else l.push(n,u)}}}function QD(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function od(e,t,n,r){for(let o=n;o{n.providersResolver=(r,o)=>zN(r,o?o(e):e,t)}}function V9(e,t,n){let r=Hn()+e,o=x();return o[r]===Te?is(o,r,n?t.call(n):t()):VA(o,r)}function j9(e,t,n,r){return JD(x(),Hn(),e,t,n,r)}function U9(e,t,n,r,o){return XD(x(),Hn(),e,t,n,r,o)}function B9(e,t,n,r,o,i){return ZN(x(),Hn(),e,t,n,r,o,i)}function $9(e,t,n,r,o,i,s){return ew(x(),Hn(),e,t,n,r,o,i,s)}function Zu(e,t){let n=e[t];return n===Te?void 0:n}function JD(e,t,n,r,o,i){let s=t+n;return Je(e,s,o)?is(e,s+1,i?r.call(i,o):r(o)):Zu(e,s+1)}function XD(e,t,n,r,o,i,s){let a=t+n;return qi(e,a,o,i)?is(e,a+2,s?r.call(s,o,i):r(o,i)):Zu(e,a+2)}function ZN(e,t,n,r,o,i,s,a){let u=t+n;return _D(e,u,o,i,s)?is(e,u+3,a?r.call(a,o,i,s):r(o,i,s)):Zu(e,u+3)}function ew(e,t,n,r,o,i,s,a,u){let l=t+n;return xD(e,l,o,i,s,a)?is(e,l+4,u?r.call(u,o,i,s,a):r(o,i,s,a)):Zu(e,l+4)}function H9(e,t){let n=te(),r,o=e+fe;n.firstCreatePass?(r=KN(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=wr(r.type,!0)),s,a=qe(b);try{let u=iu(!1),l=i();return iu(u),ap(n,x(),o,l),l}finally{qe(a)}}function KN(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function z9(e,t,n){let r=e+fe,o=x(),i=Ji(o,r);return up(o,r)?JD(o,Hn(),t,i.transform,n,i):i.transform(n)}function G9(e,t,n,r){let o=e+fe,i=x(),s=Ji(i,o);return up(i,o)?XD(i,Hn(),t,s.transform,n,r,s):s.transform(n,r)}function W9(e,t,n,r,o,i){let s=e+fe,a=x(),u=Ji(a,s);return up(a,s)?ew(a,Hn(),t,u.transform,n,r,o,i,u):u.transform(n,r,o,i)}function up(e,t){return e[P].data[t].pure}function q9(e,t){return zu(e,t)}var af=class{ngModuleFactory;componentFactories;constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}},lp=(()=>{class e{compileModuleSync(n){return new qd(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),o=dv(n),i=ky(o.declarations).reduce((s,a)=>{let u=Vn(a);return u&&s.push(new To(u)),s},[]);return new af(r,i)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var YN=(()=>{class e{zone=v(be);changeDetectionScheduler=v(Tr);applicationRef=v(un);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function QN({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new be(F(y({},JN()),{scheduleInRootZone:n})),[{provide:be,useFactory:e},{provide:yo,multi:!0,useFactory:()=>{let r=v(YN,{optional:!0});return()=>r.initialize()}},{provide:yo,multi:!0,useFactory:()=>{let r=v(XN);return()=>{r.initialize()}}},t===!0?{provide:ny,useValue:!0}:[],{provide:ry,useValue:n??ty}]}function JN(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var XN=(()=>{class e{subscription=new se;initialized=!1;zone=v(be);pendingTasks=v(dn);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(()=>{be.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{be.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var eR=(()=>{class e{appRef=v(un);taskService=v(dn);ngZone=v(be);zonelessEnabled=v(Af);tracing=v(No,{optional:!0});disableScheduling=v(ny,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new se;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(uu):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(v(ry,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){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;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 8:{this.appRef.deferredDirtyFlags|=8;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 13:{this.appRef.dirtyFlags|=16,r=!0;break}case 14:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{r=!0;break}case 10:case 9:case 7:case 11:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let o=this.useMicrotaskScheduler?mm:oy;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(uu+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,mm(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tR(){return typeof $localize<"u"&&$localize.locale||Cu}var ss=new E("",{providedIn:"root",factory:()=>v(ss,U.Optional|U.SkipSelf)||tR()});var uf=new E(""),nR=new E("");function Oi(e){return!e.moduleRef}function rR(e){let t=Oi(e)?e.r3Injector:e.moduleRef.injector,n=t.get(be);return n.run(()=>{Oi(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(St,null),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:i=>{r.handleError(i)}})}),Oi(e)){let i=()=>t.destroy(),s=e.platformInjector.get(uf);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(uf);s.add(i),e.moduleRef.onDestroy(()=>{qa(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return WA(r,n,()=>{let i=t.get(MD);return i.runInitializers(),i.donePromise.then(()=>{let s=t.get(ss,Cu);if(AN(s||Cu),!t.get(nR,!0))return Oi(e)?t.get(un):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Oi(e)){let u=t.get(un);return e.rootComponent!==void 0&&u.bootstrap(e.rootComponent),u}else return oR(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function oR(e,t){let n=e.injector.get(un);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new w(-403,!1);t.push(e)}var Za=null;function iR(e=[],t){return je.create({name:t,providers:[{provide:Su,useValue:"platform"},{provide:uf,useValue:new Set([()=>Za=null])},...e]})}function sR(e=[]){if(Za)return Za;let t=iR(e);return Za=t,HA(),aR(t),t}function aR(e){let t=e.get(Ff,null);rt(e,()=>{t?.forEach(n=>n())})}var vt=(()=>{class e{static __NG_ELEMENT_ID__=uR}return e})();function uR(e){return lR(Ue(),x(),(e&16)===16)}function lR(e,t,n){if(Nr(e)&&!n){let r=jt(e.index,t);return new Sr(r,r)}else if(e.type&175){let r=t[Qe];return new Sr(r,t)}return null}var lf=class{constructor(){}supports(t){return t instanceof Map||ID(t)}create(){return new cf}},cf=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(t){let n;for(n=this._mapHead;n!==null;n=n._next)t(n)}forEachPreviousItem(t){let n;for(n=this._previousMapHead;n!==null;n=n._nextPrevious)t(n)}forEachChangedItem(t){let n;for(n=this._changesHead;n!==null;n=n._nextChanged)t(n)}forEachAddedItem(t){let n;for(n=this._additionsHead;n!==null;n=n._nextAdded)t(n)}forEachRemovedItem(t){let n;for(n=this._removalsHead;n!==null;n=n._nextRemoved)t(n)}diff(t){if(!t)t=new Map;else if(!(t instanceof Map||ID(t)))throw new w(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let n=this._mapHead;if(this._appendAfter=null,this._forEach(t,(r,o)=>{if(n&&n.key===o)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{let i=this._getOrCreateRecordForKey(o,r);n=this._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,n){if(t){let r=t._prev;return n._next=t,n._prev=r,t._prev=n,r&&(r._next=n),t===this._mapHead&&(this._mapHead=n),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(t,n){if(this._records.has(t)){let o=this._records.get(t);this._maybeAddToChanges(o,n);let i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}let r=new df(t);return this._records.set(t,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;t!==null;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;t!=null;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,n){Object.is(n,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=n,this._addToChanges(t))}_addToAdditions(t){this._additionsHead===null?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){this._changesHead===null?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,n){t instanceof Map?t.forEach(n):Object.keys(t).forEach(r=>n(t[r],r))}},df=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(t){this.key=t}};function Zm(){return new cp([new lf])}var cp=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:Zm});factories;constructor(n){this.factories=n}static create(n,r){if(r){let o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||Zm()),deps:[[e,new A0,new av]]}}find(n){let r=this.factories.find(o=>o.supports(n));if(r)return r;throw new w(901,!1)}}return e})();function tw(e){try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,o=sR(r),i=[QN({}),{provide:Tr,useExisting:eR},...n||[]],s=new mu({providers:i,parent:o,debugName:"",runEnvironmentInitializers:!1});return rR({r3Injector:s.injector,platformInjector:o,rootComponent:t})}catch(t){return Promise.reject(t)}}function Zn(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function cR(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Oo(e,t){gt("NgSignals");let n=Sc(e);return t?.equal&&(n[Me].equal=t.equal),n}function yt(e){let t=V(null);try{return e()}finally{V(t)}}var nw=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=dR}return e})();function dR(){return new nw(x(),Ue())}var fR=!1,pR=(()=>{class e extends yu{pendingTasks=v(dn);taskId=null;schedule(n){super.schedule(n),this.taskId===null&&(this.taskId=this.pendingTasks.add(),queueMicrotask(()=>this.flush()))}flush(){try{super.flush()}finally{this.taskId!==null&&(this.pendingTasks.remove(this.taskId),this.taskId=null)}}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),ff=class{scheduler;effectFn;zone;injector;unregisterOnDestroy;watcher;constructor(t,n,r,o,i,s){this.scheduler=t,this.effectFn=n,this.zone=r,this.injector=i,this.watcher=Eg(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}runEffect(t){try{this.effectFn(t)}catch(n){this.injector.get(St,null,{optional:!0})?.handleError(n)}}run(){this.watcher.run()}schedule(){this.scheduler.schedule(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function hR(){}function gR(e,t){gt("NgSignals"),!t?.injector&&Au(hR);let n=t?.injector??v(je),r=t?.manualCleanup!==!0?n.get(zn):null,o=new ff(n.get(pR),e,typeof Zone>"u"?null:Zone.current,r,n,t?.allowSignalWrites??!1),i=n.get(vt,null,{optional:!0});return!i||!(i._lView[N]&8)?o.watcher.notify():(i._lView[Ha]??=[]).push(o.watcher.notify),o}var mR=fR;var pf=class{[Me];constructor(t){this[Me]=t}destroy(){this[Me].destroy()}};function vR(e,t){if(mR)return gR(e,t);gt("NgSignals"),!t?.injector&&Au(vR);let n=t?.injector??v(je),r=t?.manualCleanup!==!0?n.get(zn):null,o,i=n.get(nw,null,{optional:!0}),s=n.get(Tr);return i!==null&&!t?.forceRoot?(o=wR(i.view,s,e),r instanceof au&&r._lView===i.view&&(r=null)):o=bR(e,n.get(AD),s),o.injector=n,r!==null&&(o.onDestroyFn=r.onDestroy(()=>o.destroy())),new pf(o)}var rw=F(y({},pr),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,cleanupFns:void 0,zone:null,kind:"effect",onDestroyFn:Hi,run(){if(this.dirty=!1,this.hasRun&&!_i(this))return;this.hasRun=!0;let e=r=>(this.cleanupFns??=[]).push(r),t=Jr(this),n=nu(!1);try{this.maybeCleanup(),this.fn(e)}finally{nu(n),Ii(this,t)}},maybeCleanup(){if(this.cleanupFns?.length)try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[]}}}),yR=F(y({},rw),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(13)},destroy(){Xr(this),this.onDestroyFn(),this.maybeCleanup(),this.scheduler.remove(this)}}),DR=F(y({},rw),{consumerMarkedDirty(){this.view[N]|=8192,Xi(this.view),this.notifier.notify(14)},destroy(){Xr(this),this.onDestroyFn(),this.maybeCleanup(),this.view[Cr]?.delete(this)}});function wR(e,t,n){let r=Object.create(DR);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=t,r.fn=n,e[Cr]??=new Set,e[Cr].add(r),r.consumerMarkedDirty(r),r}function bR(e,t,n){let r=Object.create(yR);return r.fn=e,r.scheduler=t,r.notifier=n,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.schedule(r),r.notifier.notify(13),r}function Z9(e,t){let n=Vn(e),r=t.elementInjector||Mu();return new To(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var lw=null;function mn(){return lw}function cw(e){lw??=e}var rl=class{};var Be=new E(""),bp=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(CR),providedIn:"platform"})}return e})();var CR=(()=>{class e extends bp{_location;_history;_doc=v(Be);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return mn().getBaseHref(this._doc)}onPopState(n){let r=mn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=mn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.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,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function Cp(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function ow(e){let t=e.match(/#|\?|$/),n=t&&t.index||e.length,r=n-(e[n-1]==="/"?1:0);return e.slice(0,r)+e.slice(n)}function hn(e){return e&&e[0]!=="?"?"?"+e:e}var Kn=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(fw),providedIn:"root"})}return e})(),dw=new E(""),fw=(()=>{class e extends Kn{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??v(Be).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 Cp(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+hn(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(I(bp),I(dw,8))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pw=(()=>{class e extends Kn{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,r!=null&&(this._baseHref=r)}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 r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(n){let r=Cp(this._baseHref,n);return r.length>0?"#"+r:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(I(bp),I(dw,8))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),us=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=_R(ow(iw(r))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+hn(r))}normalize(n){return e.stripTrailingSlash(IR(this._basePath,iw(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(r)),o)}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(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r??void 0,complete:o??void 0})}static normalizeQueryParams=hn;static joinWithSlash=Cp;static stripTrailingSlash=ow;static \u0275fac=function(r){return new(r||e)(I(Kn))};static \u0275prov=C({token:e,factory:()=>ER(),providedIn:"root"})}return e})();function ER(){return new us(I(Kn))}function IR(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function iw(e){return e.replace(/\/index.html$/,"")}function _R(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var hw=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(hw||{});var ze=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(ze||{}),K=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(K||{}),st=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(st||{}),at={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 xR(e){return it(e)[ue.LocaleId]}function TR(e,t,n){let r=it(e),o=[r[ue.DayPeriodsFormat],r[ue.DayPeriodsStandalone]],i=Dt(o,t);return Dt(i,n)}function SR(e,t,n){let r=it(e),o=[r[ue.DaysFormat],r[ue.DaysStandalone]],i=Dt(o,t);return Dt(i,n)}function MR(e,t,n){let r=it(e),o=[r[ue.MonthsFormat],r[ue.MonthsStandalone]],i=Dt(o,t);return Dt(i,n)}function AR(e,t){let r=it(e)[ue.Eras];return Dt(r,t)}function Ku(e,t){let n=it(e);return Dt(n[ue.DateFormat],t)}function Yu(e,t){let n=it(e);return Dt(n[ue.TimeFormat],t)}function Qu(e,t){let r=it(e)[ue.DateTimeFormat];return Dt(r,t)}function gn(e,t){let n=it(e),r=n[ue.NumberSymbols][t];if(typeof r>"u"){if(t===at.CurrencyDecimal)return n[ue.NumberSymbols][at.Decimal];if(t===at.CurrencyGroup)return n[ue.NumberSymbols][at.Group]}return r}function NR(e,t){return it(e)[ue.NumberFormats][t]}function gw(e){if(!e[ue.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[ue.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function RR(e){let t=it(e);return gw(t),(t[ue.ExtraData][2]||[]).map(r=>typeof r=="string"?dp(r):[dp(r[0]),dp(r[1])])}function OR(e,t,n){let r=it(e);gw(r);let o=[r[ue.ExtraData][0],r[ue.ExtraData][1]],i=Dt(o,t)||[];return Dt(i,n)||[]}function Dt(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<"u")return e[n];throw new Error("Locale data API: locale data undefined")}function dp(e){let[t,n]=e.split(":");return{hours:+t,minutes:+n}}var FR=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ju={},PR=/((?:[^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]*)/;function kR(e,t,n,r){let o=GR(e);t=pn(n,t)||t;let s=[],a;for(;t;)if(a=PR.exec(t),a){s=s.concat(a.slice(1));let c=s.pop();if(!c)break;t=c}else{s.push(t);break}let u=o.getTimezoneOffset();r&&(u=vw(r,u),o=zR(o,r,!0));let l="";return s.forEach(c=>{let d=$R(c);l+=d?d(o,n,u):c==="''"?"'":c.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function ol(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function pn(e,t){let n=xR(e);if(Ju[n]??={},Ju[n][t])return Ju[n][t];let r="";switch(t){case"shortDate":r=Ku(e,st.Short);break;case"mediumDate":r=Ku(e,st.Medium);break;case"longDate":r=Ku(e,st.Long);break;case"fullDate":r=Ku(e,st.Full);break;case"shortTime":r=Yu(e,st.Short);break;case"mediumTime":r=Yu(e,st.Medium);break;case"longTime":r=Yu(e,st.Long);break;case"fullTime":r=Yu(e,st.Full);break;case"short":let o=pn(e,"shortTime"),i=pn(e,"shortDate");r=Xu(Qu(e,st.Short),[o,i]);break;case"medium":let s=pn(e,"mediumTime"),a=pn(e,"mediumDate");r=Xu(Qu(e,st.Medium),[s,a]);break;case"long":let u=pn(e,"longTime"),l=pn(e,"longDate");r=Xu(Qu(e,st.Long),[u,l]);break;case"full":let c=pn(e,"fullTime"),d=pn(e,"fullDate");r=Xu(Qu(e,st.Full),[c,d]);break}return r&&(Ju[n][t]=r),r}function Xu(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,r){return t!=null&&r in t?t[r]:n})),e}function Nt(e,t,n="-",r,o){let i="";(e<0||o&&e<=0)&&(o?e=-e+1:(e=-e,i=n));let s=String(e);for(;s.length0||a>-n)&&(a+=n),e===3)a===0&&n===-12&&(a=12);else if(e===6)return LR(a,t);let u=gn(s,at.MinusSign);return Nt(a,t,u,r,o)}}function VR(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}function ne(e,t,n=ze.Format,r=!1){return function(o,i){return jR(o,i,e,t,n,r)}}function jR(e,t,n,r,o,i){switch(n){case 2:return MR(t,o,r)[e.getMonth()];case 1:return SR(t,o,r)[e.getDay()];case 0:let s=e.getHours(),a=e.getMinutes();if(i){let l=RR(t),c=OR(t,o,r),d=l.findIndex(f=>{if(Array.isArray(f)){let[p,h]=f,g=s>=p.hours&&a>=p.minutes,m=s0?Math.floor(o/60):Math.ceil(o/60);switch(e){case 0:return(o>=0?"+":"")+Nt(s,2,i)+Nt(Math.abs(o%60),2,i);case 1:return"GMT"+(o>=0?"+":"")+Nt(s,1,i);case 2:return"GMT"+(o>=0?"+":"")+Nt(s,2,i)+":"+Nt(Math.abs(o%60),2,i);case 3:return r===0?"Z":(o>=0?"+":"")+Nt(s,2,i)+":"+Nt(Math.abs(o%60),2,i);default:throw new Error(`Unknown zone width "${e}"`)}}}var UR=0,nl=4;function BR(e){let t=ol(e,UR,1).getDay();return ol(e,0,1+(t<=nl?nl:nl+7)-t)}function mw(e){let t=e.getDay(),n=t===0?-3:nl-t;return ol(e.getFullYear(),e.getMonth(),e.getDate()+n)}function fp(e,t=!1){return function(n,r){let o;if(t){let i=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,s=n.getDate();o=1+Math.floor((s+i)/7)}else{let i=mw(n),s=BR(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return Nt(o,e,gn(r,at.MinusSign))}}function tl(e,t=!1){return function(n,r){let i=mw(n).getFullYear();return Nt(i,e,gn(r,at.MinusSign),t)}}var pp={};function $R(e){if(pp[e])return pp[e];let t;switch(e){case"G":case"GG":case"GGG":t=ne(3,K.Abbreviated);break;case"GGGG":t=ne(3,K.Wide);break;case"GGGGG":t=ne(3,K.Narrow);break;case"y":t=ge(0,1,0,!1,!0);break;case"yy":t=ge(0,2,0,!0,!0);break;case"yyy":t=ge(0,3,0,!1,!0);break;case"yyyy":t=ge(0,4,0,!1,!0);break;case"Y":t=tl(1);break;case"YY":t=tl(2,!0);break;case"YYY":t=tl(3);break;case"YYYY":t=tl(4);break;case"M":case"L":t=ge(1,1,1);break;case"MM":case"LL":t=ge(1,2,1);break;case"MMM":t=ne(2,K.Abbreviated);break;case"MMMM":t=ne(2,K.Wide);break;case"MMMMM":t=ne(2,K.Narrow);break;case"LLL":t=ne(2,K.Abbreviated,ze.Standalone);break;case"LLLL":t=ne(2,K.Wide,ze.Standalone);break;case"LLLLL":t=ne(2,K.Narrow,ze.Standalone);break;case"w":t=fp(1);break;case"ww":t=fp(2);break;case"W":t=fp(1,!0);break;case"d":t=ge(2,1);break;case"dd":t=ge(2,2);break;case"c":case"cc":t=ge(7,1);break;case"ccc":t=ne(1,K.Abbreviated,ze.Standalone);break;case"cccc":t=ne(1,K.Wide,ze.Standalone);break;case"ccccc":t=ne(1,K.Narrow,ze.Standalone);break;case"cccccc":t=ne(1,K.Short,ze.Standalone);break;case"E":case"EE":case"EEE":t=ne(1,K.Abbreviated);break;case"EEEE":t=ne(1,K.Wide);break;case"EEEEE":t=ne(1,K.Narrow);break;case"EEEEEE":t=ne(1,K.Short);break;case"a":case"aa":case"aaa":t=ne(0,K.Abbreviated);break;case"aaaa":t=ne(0,K.Wide);break;case"aaaaa":t=ne(0,K.Narrow);break;case"b":case"bb":case"bbb":t=ne(0,K.Abbreviated,ze.Standalone,!0);break;case"bbbb":t=ne(0,K.Wide,ze.Standalone,!0);break;case"bbbbb":t=ne(0,K.Narrow,ze.Standalone,!0);break;case"B":case"BB":case"BBB":t=ne(0,K.Abbreviated,ze.Format,!0);break;case"BBBB":t=ne(0,K.Wide,ze.Format,!0);break;case"BBBBB":t=ne(0,K.Narrow,ze.Format,!0);break;case"h":t=ge(3,1,-12);break;case"hh":t=ge(3,2,-12);break;case"H":t=ge(3,1);break;case"HH":t=ge(3,2);break;case"m":t=ge(4,1);break;case"mm":t=ge(4,2);break;case"s":t=ge(5,1);break;case"ss":t=ge(5,2);break;case"S":t=ge(6,1);break;case"SS":t=ge(6,2);break;case"SSS":t=ge(6,3);break;case"Z":case"ZZ":case"ZZZ":t=el(0);break;case"ZZZZZ":t=el(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=el(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=el(2);break;default:return null}return pp[e]=t,t}function vw(e,t){e=e.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function HR(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function zR(e,t,n){let r=n?-1:1,o=e.getTimezoneOffset(),i=vw(t,o);return HR(e,r*(i-o))}function GR(e){if(sw(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[o,i=1,s=1]=e.split("-").map(a=>+a);return ol(o,i-1,s)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let r;if(r=e.match(FR))return WR(r)}let t=new Date(e);if(!sw(t))throw new Error(`Unable to convert "${e}" into a date`);return t}function WR(e){let t=new Date(0),n=0,r=0,o=e[8]?t.setUTCFullYear:t.setFullYear,i=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let s=Number(e[4]||0)-n,a=Number(e[5]||0)-r,u=Number(e[6]||0),l=Math.floor(parseFloat("0."+(e[7]||0))*1e3);return i.call(t,s,a,u,l),t}function sw(e){return e instanceof Date&&!isNaN(e.valueOf())}var qR=/^(\d+)?\.((\d+)(-(\d+))?)?$/,aw=22,il=".",as="0",ZR=";",KR=",",hp="#";function YR(e,t,n,r,o,i,s=!1){let a="",u=!1;if(!isFinite(e))a=gn(n,at.Infinity);else{let l=eO(e);s&&(l=XR(l));let c=t.minInt,d=t.minFrac,f=t.maxFrac;if(i){let R=i.match(qR);if(R===null)throw new Error(`${i} is not a valid digit info`);let B=R[1],ie=R[3],Q=R[5];B!=null&&(c=gp(B)),ie!=null&&(d=gp(ie)),Q!=null?f=gp(Q):ie!=null&&d>f&&(f=d)}tO(l,d,f);let p=l.digits,h=l.integerLen,g=l.exponent,m=[];for(u=p.every(R=>!R);h0?m=p.splice(h,p.length):(m=p,p=[0]);let D=[];for(p.length>=t.lgSize&&D.unshift(p.splice(-t.lgSize,p.length).join(""));p.length>t.gSize;)D.unshift(p.splice(-t.gSize,p.length).join(""));p.length&&D.unshift(p.join("")),a=D.join(gn(n,r)),m.length&&(a+=gn(n,o)+m.join("")),g&&(a+=gn(n,at.Exponential)+"+"+g)}return e<0&&!u?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function QR(e,t,n){let r=NR(t,hw.Decimal),o=JR(r,gn(t,at.MinusSign));return YR(e,o,t,at.Group,at.Decimal,n)}function JR(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(ZR),o=r[0],i=r[1],s=o.indexOf(il)!==-1?o.split(il):[o.substring(0,o.lastIndexOf(as)+1),o.substring(o.lastIndexOf(as)+1)],a=s[0],u=s[1]||"";n.posPre=a.substring(0,a.indexOf(hp));for(let c=0;c-1&&(t=t.replace(il,"")),(i=t.search(/e/i))>0?(o<0&&(o=i),o+=+t.slice(i+1),t=t.substring(0,i)):o<0&&(o=t.length),i=0;t.charAt(i)===as;i++);if(i===(a=t.length))r=[0],o=1;else{for(a--;t.charAt(a)===as;)a--;for(o-=i,r=[],s=0;i<=a;i++,s++)r[s]=Number(t.charAt(i))}return o>aw&&(r=r.splice(0,aw-1),n=o-1,o=1),{digits:r,exponent:n,integerLen:o}}function tO(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let r=e.digits,o=r.length-e.integerLen,i=Math.min(Math.max(t,o),n),s=i+e.integerLen,a=r[s];if(s>0){r.splice(Math.max(e.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[s-1]++;for(;o=l?h.pop():u=!1),f>=10?1:0},0);c&&(r.unshift(c),e.integerLen++)}function gp(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function y7(e,t,n){return HD(e,t,n)}function sl(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[o,i]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()===t)return decodeURIComponent(i)}return null}var mp=/\s+/,uw=[],D7=(()=>{class e{_ngEl;_renderer;initialClasses=uw;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(mp):uw}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(mp):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],o=n[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(mp).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(r){return new(r||e)(b(xe),b(ot))};static \u0275dir=H({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})();var w7=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,o){this._ngEl=n,this._differs=r,this._renderer=o}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,r){let[o,i]=n.split("."),s=o.indexOf("-")===-1?void 0:Bt.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,i?`${r}${i}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,o,s)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||e)(b(xe),b(cp),b(ot))};static \u0275dir=H({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),b7=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}static \u0275fac=function(r){return new(r||e)(b(kr))};static \u0275dir=H({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[pt]})}return e})();function Ep(e,t){return new w(2100,!1)}var vp=class{createSubscription(t,n){return yt(()=>t.subscribe({next:n,error:r=>{throw r}}))}dispose(t){yt(()=>t.unsubscribe())}},yp=class{createSubscription(t,n){return t.then(n,r=>{throw r})}dispose(t){}},nO=new yp,rO=new vp,C7=(()=>{class e{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;constructor(n){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,r=>this._updateLatestValue(n,r))}_selectStrategy(n){if(qn(n))return nO;if(op(n))return rO;throw Ep(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,r){n===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||e)(b(vt,16))};static \u0275pipe=Ro({name:"async",type:e,pure:!1})}return e})();var oO="mediumDate",iO=new E(""),sO=new E(""),E7=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,r,o){this.locale=n,this.defaultTimezone=r,this.defaultOptions=o}transform(n,r,o,i){if(n==null||n===""||n!==n)return null;try{let s=r??this.defaultOptions?.dateFormat??oO,a=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return kR(n,s,i||this.locale,a)}catch(s){throw Ep(e,s.message)}}static \u0275fac=function(r){return new(r||e)(b(ss,16),b(iO,24),b(sO,24))};static \u0275pipe=Ro({name:"date",type:e,pure:!0})}return e})();var I7=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,r,o){if(!aO(n))return null;o||=this._locale;try{let i=uO(n);return QR(i,o,r)}catch(i){throw Ep(e,i.message)}}static \u0275fac=function(r){return new(r||e)(b(ss,16))};static \u0275pipe=Ro({name:"number",type:e,pure:!0})}return e})();function aO(e){return!(e==null||e===""||e!==e)}function uO(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new Error(`${e} is not a number`);return e}var lO=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({})}return e})(),yw="browser",cO="server";function Ip(e){return e===cO}var dO=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>new Dp(v(Be),window)})}return e})(),Dp=class{document;window;offset=()=>[0,0];constructor(t,n){this.document=t,this.window=n}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){let n=fO(this.document,t);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){let n=t.getBoundingClientRect(),r=n.left+this.window.pageXOffset,o=n.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(r-i[0],o-i[1])}};function fO(e,t){let n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if(typeof e.createTreeWalker=="function"&&e.body&&typeof e.body.attachShadow=="function"){let r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(t)||i.querySelector(`[name="${t}"]`);if(s)return s}o=r.nextNode()}}return null}var Fo=class{};var cs=class{},ul=class{},jr=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(` +`).forEach(n=>{let r=n.indexOf(":");if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=(t.op==="a"?this.headers.get(n):void 0)||[];o.push(...r),this.headers.set(n,o);break;case"d":let i=t.value;if(!i)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=this.headers.get(n);if(!s)return;s=s.filter(a=>i.indexOf(a)===-1),s.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}break}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var xp=class{encodeKey(t){return ww(t)}encodeValue(t){return ww(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function pO(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],u=n.get(s)||[];u.push(a),n.set(s,u)}),n}var hO=/%(\d[a-f0-9])/gi,gO={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ww(e){return encodeURIComponent(e).replace(hO,(t,n)=>gO[n]??t)}function al(e){return`${e}`}var Yn=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new xp,t.fromString){if(t.fromObject)throw new w(2805,!1);this.map=pO(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(al):[al(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let n=(t.op==="a"?this.map.get(t.param):void 0)||[];n.push(al(t.value)),this.map.set(t.param,n);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],o=r.indexOf(al(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}},bw=class{defaultValue;constructor(t){this.defaultValue=t}},Tp=class{map=new Map;set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function mO(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Cw(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Ew(e){return typeof Blob<"u"&&e instanceof Blob}function Iw(e){return typeof FormData<"u"&&e instanceof FormData}function vO(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var _w="Content-Type",xw="Accept",Mw="X-Request-URL",Aw="text/plain",Nw="application/json",yO=`${Nw}, ${Aw}, */*`,ls=class e{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(mO(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,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 jr,this.context??=new Tp,!this.params)this.params=new Yn,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n.indexOf("?"),u=a===-1?"?":af.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((f,p)=>f.set(p,t.setParams[p]),c)),new e(n,r,s,{params:c,headers:l,context:d,reportProgress:u,responseType:o,withCredentials:a,transferCache:i})}},Po=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(Po||{}),ds=class{headers;status;statusText;url;ok;type;constructor(t,n=200,r="OK"){this.headers=t.headers||new jr,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},Sp=class e extends ds{constructor(t={}){super(t)}type=Po.ResponseHeader;clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ll=class e extends ds{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Po.Response;clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},cl=class extends ds{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},DO=200,wO=204;function _p(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}var bO=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof ls)i=n;else{let u;o.headers instanceof jr?u=o.headers:u=new jr(o.headers);let l;o.params&&(o.params instanceof Yn?l=o.params:l=new Yn({fromObject:o.params})),i=new ls(n,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:l,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let s=_(i).pipe(kt(u=>this.handler.handle(u)));if(n instanceof ls||o.observe==="events")return s;let a=s.pipe(ke(u=>u instanceof ll));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(A(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new w(2806,!1);return u.body}));case"blob":return a.pipe(A(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new w(2807,!1);return u.body}));case"text":return a.pipe(A(u=>{if(u.body!==null&&typeof u.body!="string")throw new w(2808,!1);return u.body}));case"json":default:return a.pipe(A(u=>u.body))}case"response":return a;default:throw new w(2809,!1)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new Yn().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,_p(o,r))}post(n,r,o={}){return this.request("POST",n,_p(o,r))}put(n,r,o={}){return this.request("PUT",n,_p(o,r))}static \u0275fac=function(r){return new(r||e)(I(cs))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var CO=new E("");function EO(e,t){return t(e)}function IO(e,t,n){return(r,o)=>rt(n,()=>t(r,i=>e(i,o)))}var Mp=new E(""),_O=new E(""),xO=new E("",{providedIn:"root",factory:()=>!0});var Tw=(()=>{class e extends cs{backend;injector;chain=null;pendingTasks=v(dn);contributeToStability=v(xO);constructor(n,r){super(),this.backend=n,this.injector=r}handle(n){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(Mp),...this.injector.get(_O,[])]));this.chain=r.reduceRight((o,i)=>IO(o,i,this.injector),EO)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(Fn(()=>this.pendingTasks.remove(r)))}else return this.chain(n,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||e)(I(ul),I(Ye))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var TO=/^\)\]\}',?\n/,SO=RegExp(`^${Mw}:`,"m");function MO(e){return"responseURL"in e&&e.responseURL?e.responseURL:SO.test(e.getAllResponseHeaders())?e.getResponseHeader(Mw):null}var Sw=(()=>{class e{xhrFactory;constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?X(r.\u0275loadImpl()):_(null)).pipe(De(()=>new O(i=>{let s=r.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),n.headers.has(xw)||s.setRequestHeader(xw,yO),!n.headers.has(_w)){let g=n.detectContentTypeHeader();g!==null&&s.setRequestHeader(_w,g)}if(n.responseType){let g=n.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=n.serializeBody(),u=null,l=()=>{if(u!==null)return u;let g=s.statusText||"OK",m=new jr(s.getAllResponseHeaders()),D=MO(s)||n.url;return u=new Sp({headers:m,status:s.status,statusText:g,url:D}),u},c=()=>{let{headers:g,status:m,statusText:D,url:R}=l(),B=null;m!==wO&&(B=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=B?DO:0);let ie=m>=200&&m<300;if(n.responseType==="json"&&typeof B=="string"){let Q=B;B=B.replace(TO,"");try{B=B!==""?JSON.parse(B):null}catch(fr){B=Q,ie&&(ie=!1,B={error:fr,text:B})}}ie?(i.next(new ll({body:B,headers:g,status:m,statusText:D,url:R||void 0})),i.complete()):i.error(new cl({error:B,headers:g,status:m,statusText:D,url:R||void 0}))},d=g=>{let{url:m}=l(),D=new cl({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});i.error(D)},f=!1,p=g=>{f||(i.next(l()),f=!0);let m={type:Po.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),n.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),i.next(m)},h=g=>{let m={type:Po.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),i.next(m)};return s.addEventListener("load",c),s.addEventListener("error",d),s.addEventListener("timeout",d),s.addEventListener("abort",d),n.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",h)),s.send(a),i.next({type:Po.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",c),s.removeEventListener("timeout",d),n.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",h)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||e)(I(Fo))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Rw=new E(""),AO="XSRF-TOKEN",NO=new E("",{providedIn:"root",factory:()=>AO}),RO="X-XSRF-TOKEN",OO=new E("",{providedIn:"root",factory:()=>RO}),dl=class{},FO=(()=>{class e{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=sl(n,this.cookieName),this.lastCookieString=n),this.lastToken}static \u0275fac=function(r){return new(r||e)(I(Be),I(Gn),I(NO))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function PO(e,t){let n=e.url.toLowerCase();if(!v(Rw)||e.method==="GET"||e.method==="HEAD"||n.startsWith("http://")||n.startsWith("https://"))return t(e);let r=v(dl).getToken(),o=v(OO);return r!=null&&!e.headers.has(o)&&(e=e.clone({headers:e.headers.set(o,r)})),t(e)}var Ow=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(Ow||{});function kO(e,t){return{\u0275kind:e,\u0275providers:t}}function V7(...e){let t=[bO,Sw,Tw,{provide:cs,useExisting:Tw},{provide:ul,useFactory:()=>v(CO,{optional:!0})??v(Sw)},{provide:Mp,useValue:PO,multi:!0},{provide:Rw,useValue:!0},{provide:dl,useClass:FO}];for(let n of e)t.push(...n.\u0275providers);return Ar(t)}function j7(e){return kO(Ow.Interceptors,e.map(t=>({provide:Mp,useValue:t,multi:!0})))}var Np=class extends rl{supportsDOMEvents=!0},Rp=class e extends Np{static makeCurrent(){cw(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=LO();return n==null?null:VO(n)}resetBaseElement(){fs=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return sl(document.cookie,t)}},fs=null;function LO(){return fs=fs||document.querySelector("base"),fs?fs.getAttribute("href"):null}function VO(e){return new URL(e,document.baseURI).pathname}var jO=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Op=new E(""),jw=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(I(Op),I(be))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),pl=class{_doc;constructor(t){this._doc=t}manager},fl="ng-app-id";function Fw(e){for(let t of e)t.remove()}function Pw(e,t){let n=t.createElement("style");return n.textContent=e,n}function UO(e,t,n,r){let o=e.head?.querySelectorAll(`style[${fl}="${t}"],link[${fl}="${t}"]`);if(o)for(let i of o)i.removeAttribute(fl),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]})}function Fp(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var Uw=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,this.isServer=Ip(i),UO(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,Pw);r?.forEach(o=>this.addUsage(o,this.external,Fp))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(Fw(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Fw(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,Pw(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Fp(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(fl,this.appId),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(I(Be),I(Of),I(Pf,8),I(Gn))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Ap={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"},kp=/%COMP%/g;var Bw="%COMP%",BO=`_nghost-${Bw}`,$O=`_ngcontent-${Bw}`,HO=!0,zO=new E("",{providedIn:"root",factory:()=>HO});function GO(e){return $O.replace(kp,e)}function WO(e){return BO.replace(kp,e)}function $w(e,t){return t.map(n=>n.replace(kp,e))}var kw=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,o,i,s,a,u,l=null,c=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.platformId=a,this.ngZone=u,this.nonce=l,this.tracingService=c,this.platformIsServer=Ip(a),this.defaultRenderer=new ps(n,s,u,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Ut.ShadowDom&&(r=F(y({},r),{encapsulation:Ut.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof hl?o.applyToHost(n):o instanceof hs&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,u=this.eventManager,l=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Ut.Emulated:i=new hl(u,l,r,this.appId,c,s,a,d,f);break;case Ut.ShadowDom:return new Pp(u,l,n,r,s,a,this.nonce,d,f);default:i=new hs(u,l,r,c,s,a,d,f);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||e)(I(jw),I(Uw),I(Of),I(zO),I(Be),I(Gn),I(be),I(Pf),I(No,8))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),ps=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=o,this.tracingService=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(Ap[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(Lw(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(Lw(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new w(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;let i=Ap[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=Ap[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){o&(Bt.DashCase|Bt.Important)?t.style.setProperty(n,r,o&Bt.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&Bt.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t=="string"&&(t=mn().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${n}`);let i=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))===!1&&n.preventDefault()}}};function Lw(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Pp=class extends ps{sharedStylesHost;hostEl;shadowRoot;constructor(t,n,r,o,i,s,a,u,l){super(t,i,s,u,l),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=o.styles;c=$w(o.id,c);for(let f of c){let p=document.createElement("style");a&&p.setAttribute("nonce",a),p.textContent=f,this.shadowRoot.appendChild(p)}let d=o.getExternalStyles?.();if(d)for(let f of d){let p=Fp(f,i);a&&p.setAttribute("nonce",a),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},hs=class extends ps{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,u,l){super(t,i,s,a,u),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let c=r.styles;this.styles=l?$w(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},hl=class extends hs{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,u,l){let c=o+"-"+r.id;super(t,n,r,i,s,a,u,l,c),this.contentAttr=GO(c),this.hostAttr=WO(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}},qO=(()=>{class e extends pl{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static \u0275fac=function(r){return new(r||e)(I(Be))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Vw=["alt","control","meta","shift"],ZO={"\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"},KO={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},YO=(()=>{class e extends pl{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>mn().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Vw.forEach(l=>{let c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=i,r.length!=0||i.length===0)return null;let u={};return u.domEventName=o,u.fullKey=s,u}static matchEventFullKeyCode(n,r){let o=ZO[n.key]||n.key,i="";return r.indexOf("code.")>-1&&(o=n.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Vw.forEach(s=>{if(s!==o){let a=KO[s];a(n)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(I(Be))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function iZ(e,t){return tw(y({rootComponent:e},QO(t)))}function QO(e){return{appProviders:[...nF,...e?.providers??[]],platformProviders:tF}}function JO(){Rp.makeCurrent()}function XO(){return new St}function eF(){return my(document),document}var tF=[{provide:Gn,useValue:yw},{provide:Ff,useValue:JO,multi:!0},{provide:Be,useFactory:eF,deps:[]}];var nF=[{provide:Su,useValue:"root"},{provide:St,useFactory:XO,deps:[]},{provide:Op,useClass:qO,multi:!0,deps:[Be,be,Gn]},{provide:Op,useClass:YO,multi:!0,deps:[Be]},kw,Uw,jw,{provide:xo,useExisting:kw},{provide:Fo,useClass:jO,deps:[]},[]];var Hw=(()=>{class e{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static \u0275fac=function(r){return new(r||e)(I(Be))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var rF=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(oF),o},providedIn:"root"})}return e})(),oF=(()=>{class e extends rF{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Ht.NONE:return r;case Ht.HTML:return Wn(r,"HTML")?At(r):Oy(this._doc,String(r)).toString();case Ht.STYLE:return Wn(r,"Style")?At(r):r;case Ht.SCRIPT:if(Wn(r,"Script"))return At(r);throw new w(5200,!1);case Ht.URL:return Wn(r,"URL")?At(r):ju(String(r));case Ht.RESOURCE_URL:if(Wn(r,"ResourceURL"))return At(r);throw new w(5201,!1);default:throw new w(5202,!1)}}bypassSecurityTrustHtml(n){return Ey(n)}bypassSecurityTrustStyle(n){return Iy(n)}bypassSecurityTrustScript(n){return _y(n)}bypassSecurityTrustUrl(n){return xy(n)}bypassSecurityTrustResourceUrl(n){return Ty(n)}static \u0275fac=function(r){return new(r||e)(I(Be))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var L="primary",Ms=Symbol("RouteTitle"),Bp=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function Bo(e){return new Bp(e)}function sF(e,t,n){let r=n.path.split("/");if(r.length>e.length||n.pathMatch==="full"&&(t.hasChildren()||r.lengthr[i]===o)}else return e===t}function Xw(e){return e.length>0?e[e.length-1]:null}function Qn(e){return Yt(e)?e:qn(e)?X(Promise.resolve(e)):_(e)}var uF={exact:tb,subset:nb},eb={exact:lF,subset:cF,ignored:()=>!0};function zw(e,t,n){return uF[n.paths](e.root,t.root,n.matrixParams)&&eb[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment==="exact"&&e.fragment!==t.fragment)}function lF(e,t){return Gt(e,t)}function tb(e,t,n){if(!Br(e.segments,t.segments)||!vl(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!tb(e.children[r],t.children[r],n))return!1;return!0}function cF(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>Jw(e[n],t[n]))}function nb(e,t,n){return rb(e,t,t.segments,n)}function rb(e,t,n,r){if(e.segments.length>n.length){let o=e.segments.slice(0,n.length);return!(!Br(o,n)||t.hasChildren()||!vl(o,n,r))}else if(e.segments.length===n.length){if(!Br(e.segments,n)||!vl(e.segments,n,r))return!1;for(let o in t.children)if(!e.children[o]||!nb(e.children[o],t.children[o],r))return!1;return!0}else{let o=n.slice(0,e.segments.length),i=n.slice(e.segments.length);return!Br(e.segments,o)||!vl(e.segments,o,r)||!e.children[L]?!1:rb(e.children[L],t,i,r)}}function vl(e,t,n){return t.every((r,o)=>eb[n](e[o].parameters,r.parameters))}var yn=class{root;queryParams;fragment;_queryParamMap;constructor(t=new G([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap??=Bo(this.queryParams),this._queryParamMap}toString(){return pF.serialize(this)}},G=class{segments;children;parent=null;constructor(t,n){this.segments=t,this.children=n,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return yl(this)}},Ur=class{path;parameters;_parameterMap;constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=Bo(this.parameters),this._parameterMap}toString(){return ib(this)}};function dF(e,t){return Br(e,t)&&e.every((n,r)=>Gt(n.parameters,t[r].parameters))}function Br(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function fF(e,t){let n=[];return Object.entries(e.children).forEach(([r,o])=>{r===L&&(n=n.concat(t(o,r)))}),Object.entries(e.children).forEach(([r,o])=>{r!==L&&(n=n.concat(t(o,r)))}),n}var hh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>new ws,providedIn:"root"})}return e})(),ws=class{parse(t){let n=new zp(t);return new yn(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){let n=`/${gs(t.root,!0)}`,r=mF(t.queryParams),o=typeof t.fragment=="string"?`#${hF(t.fragment)}`:"";return`${n}${r}${o}`}},pF=new ws;function yl(e){return e.segments.map(t=>ib(t)).join("/")}function gs(e,t){if(!e.hasChildren())return yl(e);if(t){let n=e.children[L]?gs(e.children[L],!1):"",r=[];return Object.entries(e.children).forEach(([o,i])=>{o!==L&&r.push(`${o}:${gs(i,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}else{let n=fF(e,(r,o)=>o===L?[gs(e.children[L],!1)]:[`${o}:${gs(r,!1)}`]);return Object.keys(e.children).length===1&&e.children[L]!=null?`${yl(e)}/${n[0]}`:`${yl(e)}/(${n.join("//")})`}}function ob(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function gl(e){return ob(e).replace(/%3B/gi,";")}function hF(e){return encodeURI(e)}function Hp(e){return ob(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Dl(e){return decodeURIComponent(e)}function Gw(e){return Dl(e.replace(/\+/g,"%20"))}function ib(e){return`${Hp(e.path)}${gF(e.parameters)}`}function gF(e){return Object.entries(e).map(([t,n])=>`;${Hp(t)}=${Hp(n)}`).join("")}function mF(e){let t=Object.entries(e).map(([n,r])=>Array.isArray(r)?r.map(o=>`${gl(n)}=${gl(o)}`).join("&"):`${gl(n)}=${gl(r)}`).filter(n=>n);return t.length?`?${t.join("&")}`:""}var vF=/^[^\/()?;#]+/;function Lp(e){let t=e.match(vF);return t?t[0]:""}var yF=/^[^\/()?;=#]+/;function DF(e){let t=e.match(yF);return t?t[0]:""}var wF=/^[^=?&#]+/;function bF(e){let t=e.match(wF);return t?t[0]:""}var CF=/^[^&#]+/;function EF(e){let t=e.match(CF);return t?t[0]:""}var zp=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new G([],{}):new G([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(r[L]=new G(t,n)),r}parseSegment(){let t=Lp(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(t),new Ur(Dl(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let n=DF(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let o=Lp(this.remaining);o&&(r=o,this.capture(r))}t[Dl(n)]=Dl(r)}parseQueryParam(t){let n=bF(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let s=EF(this.remaining);s&&(r=s,this.capture(r))}let o=Gw(n),i=Gw(r);if(t.hasOwnProperty(o)){let s=t[o];Array.isArray(s)||(s=[s],t[o]=s),s.push(i)}else t[o]=i}parseParens(t){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Lp(this.remaining),o=this.remaining[r.length];if(o!=="/"&&o!==")"&&o!==";")throw new w(4010,!1);let i;r.indexOf(":")>-1?(i=r.slice(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=L);let s=this.parseChildren();n[i]=Object.keys(s).length===1?s[L]:new G([],s),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new w(4011,!1)}};function sb(e){return e.segments.length>0?new G([],{[L]:e}):e}function ab(e){let t={};for(let[r,o]of Object.entries(e.children)){let i=ab(o);if(r===L&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))t[s]=a;else(i.segments.length>0||i.hasChildren())&&(t[r]=i)}let n=new G(e.segments,t);return IF(n)}function IF(e){if(e.numberOfChildren===1&&e.children[L]){let t=e.children[L];return new G(e.segments.concat(t.segments),t.children)}return e}function $r(e){return e instanceof yn}function _F(e,t,n=null,r=null){let o=ub(e);return lb(o,t,n,r)}function ub(e){let t;function n(i){let s={};for(let u of i.children){let l=n(u);s[u.outlet]=l}let a=new G(i.url,s);return i===e&&(t=a),a}let r=n(e.root),o=sb(r);return t??o}function lb(e,t,n,r){let o=e;for(;o.parent;)o=o.parent;if(t.length===0)return Vp(o,o,o,n,r);let i=xF(t);if(i.toRoot())return Vp(o,o,new G([],{}),n,r);let s=TF(i,o,e),a=s.processChildren?vs(s.segmentGroup,s.index,i.commands):db(s.segmentGroup,s.index,i.commands);return Vp(o,s.segmentGroup,a,n,r)}function wl(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function bs(e){return typeof e=="object"&&e!=null&&e.outlets}function Vp(e,t,n,r,o){let i={};r&&Object.entries(r).forEach(([u,l])=>{i[u]=Array.isArray(l)?l.map(c=>`${c}`):`${l}`});let s;e===t?s=n:s=cb(e,t,n);let a=sb(ab(s));return new yn(a,i,o)}function cb(e,t,n){let r={};return Object.entries(e.children).forEach(([o,i])=>{i===t?r[o]=n:r[o]=cb(i,t,n)}),new G(e.segments,r)}var bl=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&wl(r[0]))throw new w(4003,!1);let o=r.find(bs);if(o&&o!==Xw(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function xF(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new bl(!0,0,e);let t=0,n=!1,r=e.reduce((o,i,s)=>{if(typeof i=="object"&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([u,l])=>{a[u]=typeof l=="string"?l.split("/"):l}),[...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===""?n=!0:a===".."?t++:a!=""&&o.push(a))}),o):[...o,i]},[]);return new bl(n,t,r)}var Vo=class{segmentGroup;processChildren;index;constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function TF(e,t,n){if(e.isAbsolute)return new Vo(t,!0,0);if(!n)return new Vo(t,!1,NaN);if(n.parent===null)return new Vo(n,!0,0);let r=wl(e.commands[0])?0:1,o=n.segments.length-1+r;return SF(n,o,e.numberOfDoubleDots)}function SF(e,t,n){let r=e,o=t,i=n;for(;i>o;){if(i-=o,r=r.parent,!r)throw new w(4005,!1);o=r.segments.length}return new Vo(r,!1,o-i)}function MF(e){return bs(e[0])?e[0].outlets:{[L]:e}}function db(e,t,n){if(e??=new G([],{}),e.segments.length===0&&e.hasChildren())return vs(e,t,n);let r=AF(e,t,n),o=n.slice(r.commandIndex);if(r.match&&r.pathIndexi!==L)&&e.children[L]&&e.numberOfChildren===1&&e.children[L].segments.length===0){let i=vs(e.children[L],t,n);return new G(e.segments,i.children)}return Object.entries(r).forEach(([i,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[i]=db(e.children[i],t,s))}),Object.entries(e.children).forEach(([i,s])=>{r[i]===void 0&&(o[i]=s)}),new G(e.segments,o)}}function AF(e,t,n){let r=0,o=t,i={match:!1,pathIndex:0,commandIndex:0};for(;o=n.length)return i;let s=e.segments[o],a=n[r];if(bs(a))break;let u=`${a}`,l=r0&&u===void 0)break;if(u&&l&&typeof l=="object"&&l.outlets===void 0){if(!qw(u,l,s))return i;r+=2}else{if(!qw(u,{},s))return i;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}function Gp(e,t,n){let r=e.segments.slice(0,t),o=0;for(;o{typeof r=="string"&&(r=[r]),r!==null&&(t[n]=Gp(new G([],{}),0,r))}),t}function Ww(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}function qw(e,t,n){return e==n.path&&Gt(t,n.parameters)}var ys="imperative",Fe=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Fe||{}),wt=class{id;url;constructor(t,n){this.id=t,this.url=n}},Cs=class extends wt{type=Fe.NavigationStart;navigationTrigger;restoredState;constructor(t,n,r="imperative",o=null){super(t,n),this.navigationTrigger=r,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Dn=class extends wt{urlAfterRedirects;type=Fe.NavigationEnd;constructor(t,n,r){super(t,n),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},lt=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(lt||{}),Wp=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(Wp||{}),vn=class extends wt{reason;code;type=Fe.NavigationCancel;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Hr=class extends wt{reason;code;type=Fe.NavigationSkipped;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}},Es=class extends wt{error;target;type=Fe.NavigationError;constructor(t,n,r,o){super(t,n),this.error=r,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Cl=class extends wt{urlAfterRedirects;state;type=Fe.RoutesRecognized;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},qp=class extends wt{urlAfterRedirects;state;type=Fe.GuardsCheckStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Zp=class extends wt{urlAfterRedirects;state;shouldActivate;type=Fe.GuardsCheckEnd;constructor(t,n,r,o,i){super(t,n),this.urlAfterRedirects=r,this.state=o,this.shouldActivate=i}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Kp=class extends wt{urlAfterRedirects;state;type=Fe.ResolveStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Yp=class extends wt{urlAfterRedirects;state;type=Fe.ResolveEnd;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Qp=class{route;type=Fe.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Jp=class{route;type=Fe.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Xp=class{snapshot;type=Fe.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},eh=class{snapshot;type=Fe.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},th=class{snapshot;type=Fe.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},nh=class{snapshot;type=Fe.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Is=class{},$o=class{url;navigationBehaviorOptions;constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}};function RF(e,t){return e.providers&&!e._injector&&(e._injector=tp(e.providers,t,`Route: ${e.path}`)),e._injector??t}function Rt(e){return e.outlet||L}function OF(e,t){let n=e.filter(r=>Rt(r)===t);return n.push(...e.filter(r=>Rt(r)!==t)),n}function As(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let n=t.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}var rh=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return As(this.route?.snapshot)??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new Ml(this.rootInjector)}},Ml=(()=>{class e{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new rh(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static \u0275fac=function(r){return new(r||e)(I(Ye))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),El=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=oh(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=oh(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=ih(t,this._root);return n.length<2?[]:n[n.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return ih(t,this._root).map(n=>n.value)}};function oh(e,t){if(e===t.value)return t;for(let n of t.children){let r=oh(e,n);if(r)return r}return null}function ih(e,t){if(e===t.value)return[t];for(let n of t.children){let r=ih(e,n);if(r.length)return r.unshift(t),r}return[]}var ut=class{value;children;constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}};function Lo(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var Il=class extends El{snapshot;constructor(t,n){super(t),this.snapshot=n,gh(this,t)}toString(){return this.snapshot.toString()}};function fb(e){let t=FF(e),n=new Ae([new Ur("",{})]),r=new Ae({}),o=new Ae({}),i=new Ae({}),s=new Ae(""),a=new zr(n,r,i,s,o,L,e,t.root);return a.snapshot=t.root,new Il(new ut(a,[]),t)}function FF(e){let t={},n={},r={},o="",i=new jo([],t,r,o,n,L,e,null,{});return new xl("",new ut(i,[]))}var zr=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,n,r,o,i,s,a,u){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(A(l=>l[Ms]))??_(void 0),this.url=t,this.params=n,this.queryParams=r,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(A(t=>Bo(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(A(t=>Bo(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function _l(e,t,n="emptyOnly"){let r,{routeConfig:o}=e;return t!==null&&(n==="always"||o?.path===""||!t.component&&!t.routeConfig?.loadComponent)?r={params:y(y({},t.params),e.params),data:y(y({},t.data),e.data),resolve:y(y(y(y({},e.data),t.data),o?.data),e._resolvedData)}:r={params:y({},e.params),data:y({},e.data),resolve:y(y({},e.data),e._resolvedData??{})},o&&hb(o)&&(r.resolve[Ms]=o.title),r}var jo=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Ms]}constructor(t,n,r,o,i,s,a,u,l){this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=l}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??=Bo(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Bo(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${n}')`}},xl=class extends El{url;constructor(t,n){super(n),this.url=t,gh(this,n)}toString(){return pb(this._root)}};function gh(e,t){t.value._routerState=e,t.children.forEach(n=>gh(e,n))}function pb(e){let t=e.children.length>0?` { ${e.children.map(pb).join(", ")} } `:"";return`${e.value}${t}`}function jp(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Gt(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Gt(t.params,n.params)||e.paramsSubject.next(n.params),aF(t.url,n.url)||e.urlSubject.next(n.url),Gt(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function sh(e,t){let n=Gt(e.params,t.params)&&dF(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||sh(e.parent,t.parent))}function hb(e){return typeof e.title=="string"||e.title===null}var PF=new E(""),kF=(()=>{class e{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=L;activateEvents=new ee;deactivateEvents=new ee;attachEvents=new ee;detachEvents=new ee;routerOutletData=sy(void 0);parentContexts=v(Ml);location=v(kr);changeDetector=v(vt);inputBinder=v(mh,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),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 w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,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,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=n;let o=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new ah(n,a,o.injector,this.routerOutletData);this.activated=o.createComponent(s,{index:o.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[pt]})}return e})(),ah=class e{route;childContexts;parent;outletData;__ngOutletInjector(t){return new e(this.route,this.childContexts,t,this.outletData)}constructor(t,n,r,o){this.route=t,this.childContexts=n,this.parent=r,this.outletData=o}get(t,n){return t===zr?this.route:t===Ml?this.childContexts:t===PF?this.outletData:this.parent.get(t,n)}},mh=new E("");function LF(e,t,n){let r=_s(e,t._root,n?n._root:void 0);return new Il(r,t)}function _s(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let r=n.value;r._futureSnapshot=t.value;let o=VF(e,t,n);return new ut(r,o)}else{if(e.shouldAttach(t.value)){let i=e.retrieve(t.value);if(i!==null){let s=i.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>_s(e,a)),s}}let r=jF(t.value),o=t.children.map(i=>_s(e,i));return new ut(r,o)}}function VF(e,t,n){return t.children.map(r=>{for(let o of n.children)if(e.shouldReuseRoute(r.value,o.value.snapshot))return _s(e,r,o);return _s(e,r)})}function jF(e){return new zr(new Ae(e.url),new Ae(e.params),new Ae(e.queryParams),new Ae(e.fragment),new Ae(e.data),e.outlet,e.component,e)}var xs=class{redirectTo;navigationBehaviorOptions;constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}},gb="ngNavigationCancelingError";function Tl(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=$r(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=mb(!1,lt.Redirect);return o.url=n,o.navigationBehaviorOptions=r,o}function mb(e,t){let n=new Error(`NavigationCancelingError: ${e||""}`);return n[gb]=!0,n.cancellationCode=t,n}function UF(e){return vb(e)&&$r(e.url)}function vb(e){return!!e&&e[gb]}var BF=(e,t,n,r)=>A(o=>(new uh(t,o.targetRouterState,o.currentRouterState,n,r).activate(e),o)),uh=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,n,r,o,i){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=o,this.inputBindingEnabled=i}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),jp(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let o=Lo(n);t.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],r),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,r)})}deactivateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(o===i)if(o.component){let s=r.getContext(o.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else i&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=Lo(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=Lo(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){let o=Lo(n);t.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],r),this.forwardEvent(new nh(i.value.snapshot))}),t.children.length&&this.forwardEvent(new eh(t.value.snapshot))}activateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(jp(o),o===i)if(o.component){let s=r.getOrCreateContext(o.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(o.component){let s=r.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),jp(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=o,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}},Sl=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Uo=class{component;route;constructor(t,n){this.component=t,this.route=n}};function $F(e,t,n){let r=e._root,o=t?t._root:null;return ms(r,o,n,[r.value])}function HF(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function zo(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e=="function"&&!ev(e)?e:t.get(e):r}function ms(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=Lo(t);return e.children.forEach(s=>{zF(s,i[s.value.outlet],n,r.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>Ds(a,n.getContext(s),o)),o}function zF(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&i.routeConfig===s.routeConfig){let u=GF(s,i,i.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new Sl(r)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?ms(e,t,a?a.children:null,r,o):ms(e,t,n,r,o),u&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new Uo(a.outlet.component,s))}else s&&Ds(t,a,o),o.canActivateChecks.push(new Sl(r)),i.component?ms(e,null,a?a.children:null,r,o):ms(e,null,n,r,o);return o}function GF(e,t,n){if(typeof n=="function")return n(e,t);switch(n){case"pathParamsChange":return!Br(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Br(e.url,t.url)||!Gt(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!sh(e,t)||!Gt(e.queryParams,t.queryParams);case"paramsChange":default:return!sh(e,t)}}function Ds(e,t,n){let r=Lo(e),o=e.value;Object.entries(r).forEach(([i,s])=>{o.component?t?Ds(s,t.children.getContext(i),n):Ds(s,null,n):Ds(s,t,n)}),o.component?t&&t.outlet&&t.outlet.isActivated?n.canDeactivateChecks.push(new Uo(t.outlet.component,o)):n.canDeactivateChecks.push(new Uo(null,o)):n.canDeactivateChecks.push(new Uo(null,o))}function Ns(e){return typeof e=="function"}function WF(e){return typeof e=="boolean"}function qF(e){return e&&Ns(e.canLoad)}function ZF(e){return e&&Ns(e.canActivate)}function KF(e){return e&&Ns(e.canActivateChild)}function YF(e){return e&&Ns(e.canDeactivate)}function QF(e){return e&&Ns(e.canMatch)}function yb(e){return e instanceof Qt||e?.name==="EmptyError"}var ml=Symbol("INITIAL_VALUE");function Ho(){return De(e=>Aa(e.map(t=>t.pipe(Ie(1),Fa(ml)))).pipe(A(t=>{for(let n of t)if(n!==!0){if(n===ml)return ml;if(n===!1||JF(n))return n}return!0}),ke(t=>t!==ml),Ie(1)))}function JF(e){return $r(e)||e instanceof xs}function XF(e,t){return le(n=>{let{targetSnapshot:r,currentSnapshot:o,guards:{canActivateChecks:i,canDeactivateChecks:s}}=n;return s.length===0&&i.length===0?_(F(y({},n),{guardsResult:!0})):eP(s,r,o,e).pipe(le(a=>a&&WF(a)?tP(r,i,e,t):_(a)),A(a=>F(y({},n),{guardsResult:a})))})}function eP(e,t,n,r){return X(e).pipe(le(o=>sP(o.component,o.route,n,t,r)),en(o=>o!==!0,!0))}function tP(e,t,n,r){return X(t).pipe(kt(o=>tt(rP(o.route.parent,r),nP(o.route,r),iP(e,o.path,n),oP(e,o.route,n))),en(o=>o!==!0,!0))}function nP(e,t){return e!==null&&t&&t(new th(e)),_(!0)}function rP(e,t){return e!==null&&t&&t(new Xp(e)),_(!0)}function oP(e,t,n){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return _(!0);let o=r.map(i=>Jt(()=>{let s=As(t)??n,a=zo(i,s),u=ZF(a)?a.canActivate(t,e):rt(s,()=>a(t,e));return Qn(u).pipe(en())}));return _(o).pipe(Ho())}function iP(e,t,n){let r=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(s=>HF(s)).filter(s=>s!==null).map(s=>Jt(()=>{let a=s.guards.map(u=>{let l=As(s.node)??n,c=zo(u,l),d=KF(c)?c.canActivateChild(r,e):rt(l,()=>c(r,e));return Qn(d).pipe(en())});return _(a).pipe(Ho())}));return _(i).pipe(Ho())}function sP(e,t,n,r,o){let i=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!i||i.length===0)return _(!0);let s=i.map(a=>{let u=As(t)??o,l=zo(a,u),c=YF(l)?l.canDeactivate(e,t,n,r):rt(u,()=>l(e,t,n,r));return Qn(c).pipe(en())});return _(s).pipe(Ho())}function aP(e,t,n,r){let o=t.canLoad;if(o===void 0||o.length===0)return _(!0);let i=o.map(s=>{let a=zo(s,e),u=qF(a)?a.canLoad(t,n):rt(e,()=>a(t,n));return Qn(u)});return _(i).pipe(Ho(),Db(r))}function Db(e){return Pc(we(t=>{if(typeof t!="boolean")throw Tl(e,t)}),A(t=>t===!0))}function uP(e,t,n,r){let o=t.canMatch;if(!o||o.length===0)return _(!0);let i=o.map(s=>{let a=zo(s,e),u=QF(a)?a.canMatch(t,n):rt(e,()=>a(t,n));return Qn(u)});return _(i).pipe(Ho(),Db(r))}var Ts=class{segmentGroup;constructor(t){this.segmentGroup=t||null}},Ss=class extends Error{urlTree;constructor(t){super(),this.urlTree=t}};function ko(e){return An(new Ts(e))}function lP(e){return An(new w(4e3,!1))}function cP(e){return An(mb(!1,lt.GuardRejected))}var lh=class{urlSerializer;urlTree;constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){let r=[],o=n.root;for(;;){if(r=r.concat(o.segments),o.numberOfChildren===0)return _(r);if(o.numberOfChildren>1||!o.children[L])return lP(`${t.redirectTo}`);o=o.children[L]}}applyRedirectCommands(t,n,r,o,i){if(typeof n!="string"){let a=n,{queryParams:u,fragment:l,routeConfig:c,url:d,outlet:f,params:p,data:h,title:g}=o,m=rt(i,()=>a({params:p,data:h,queryParams:u,fragment:l,routeConfig:c,url:d,outlet:f,title:g}));if(m instanceof yn)throw new Ss(m);n=m}let s=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,r);if(n[0]==="/")throw new Ss(s);return s}applyRedirectCreateUrlTree(t,n,r,o){let i=this.createSegmentGroup(t,n.root,r,o);return new yn(i,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([o,i])=>{if(typeof i=="string"&&i[0]===":"){let a=i.substring(1);r[o]=n[a]}else r[o]=i}),r}createSegmentGroup(t,n,r,o){let i=this.createSegments(t,n.segments,r,o),s={};return Object.entries(n.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(t,u,r,o)}),new G(i,s)}createSegments(t,n,r,o){return n.map(i=>i.path[0]===":"?this.findPosParam(t,i,o):this.findOrReturn(i,r))}findPosParam(t,n,r){let o=r[n.path.substring(1)];if(!o)throw new w(4001,!1);return o}findOrReturn(t,n){let r=0;for(let o of n){if(o.path===t.path)return n.splice(r),o;r++}return t}},ch={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function dP(e,t,n,r,o){let i=wb(e,t,n);return i.matched?(r=RF(t,r),uP(r,t,n,o).pipe(A(s=>s===!0?i:y({},ch)))):_(i)}function wb(e,t,n){if(t.path==="**")return fP(n);if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||n.length>0)?y({},ch):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let o=(t.matcher||sF)(n,e,t);if(!o)return y({},ch);let i={};Object.entries(o.posParams??{}).forEach(([a,u])=>{i[a]=u.path});let s=o.consumed.length>0?y(y({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:n.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function fP(e){return{matched:!0,parameters:e.length>0?Xw(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function Zw(e,t,n,r){return n.length>0&&gP(e,n,r)?{segmentGroup:new G(t,hP(r,new G(n,e.children))),slicedSegments:[]}:n.length===0&&mP(e,n,r)?{segmentGroup:new G(e.segments,pP(e,n,r,e.children)),slicedSegments:n}:{segmentGroup:new G(e.segments,e.children),slicedSegments:n}}function pP(e,t,n,r){let o={};for(let i of n)if(Al(e,t,i)&&!r[Rt(i)]){let s=new G([],{});o[Rt(i)]=s}return y(y({},r),o)}function hP(e,t){let n={};n[L]=t;for(let r of e)if(r.path===""&&Rt(r)!==L){let o=new G([],{});n[Rt(r)]=o}return n}function gP(e,t,n){return n.some(r=>Al(e,t,r)&&Rt(r)!==L)}function mP(e,t,n){return n.some(r=>Al(e,t,r))}function Al(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch==="full"?!1:n.path===""}function vP(e,t,n){return t.length===0&&!e.children[n]}var dh=class{};function yP(e,t,n,r,o,i,s="emptyOnly"){return new fh(e,t,n,r,o,s,i).recognize()}var DP=31,fh=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,n,r,o,i,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new lh(this.urlSerializer,this.urlTree)}noMatchError(t){return new w(4002,`'${t.segmentGroup}'`)}recognize(){let t=Zw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(A(({children:n,rootSnapshot:r})=>{let o=new ut(r,n),i=new xl("",o),s=_F(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}}))}match(t){let n=new jo([],Object.freeze({}),Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),L,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,L,n).pipe(A(r=>({children:r,rootSnapshot:n})),Rn(r=>{if(r instanceof Ss)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Ts?this.noMatchError(r):r}))}processSegmentGroup(t,n,r,o,i){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,n,r,i):this.processSegment(t,n,r,r.segments,o,!0,i).pipe(A(s=>s instanceof ut?[s]:[]))}processChildren(t,n,r,o){let i=[];for(let s of Object.keys(r.children))s==="primary"?i.unshift(s):i.push(s);return X(i).pipe(kt(s=>{let a=r.children[s],u=OF(n,s);return this.processSegmentGroup(t,u,a,s,o)}),Oa((s,a)=>(s.push(...a),s)),On(null),zc(),le(s=>{if(s===null)return ko(r);let a=bb(s);return wP(a),_(a)}))}processSegment(t,n,r,o,i,s,a){return X(n).pipe(kt(u=>this.processSegmentAgainstRoute(u._injector??t,n,u,r,o,i,s,a).pipe(Rn(l=>{if(l instanceof Ts)return _(null);throw l}))),en(u=>!!u),Rn(u=>{if(yb(u))return vP(r,o,i)?_(new dh):ko(r);throw u}))}processSegmentAgainstRoute(t,n,r,o,i,s,a,u){return Rt(r)!==s&&(s===L||!Al(o,i,r))?ko(o):r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,o,r,i,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,o,n,r,i,s,u):ko(o)}expandSegmentAgainstRouteUsingRedirect(t,n,r,o,i,s,a){let{matched:u,parameters:l,consumedSegments:c,positionalParamSegments:d,remainingSegments:f}=wb(n,o,i);if(!u)return ko(n);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>DP&&(this.allowRedirects=!1));let p=new jo(i,l,Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Kw(o),Rt(o),o.component??o._loadedComponent??null,o,Yw(o)),h=_l(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(h.params),p.data=Object.freeze(h.data);let g=this.applyRedirects.applyRedirectCommands(c,o.redirectTo,d,p,t);return this.applyRedirects.lineralizeSegments(o,g).pipe(le(m=>this.processSegment(t,r,n,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(t,n,r,o,i,s){let a=dP(n,r,o,t,this.urlSerializer);return r.path==="**"&&(n.children={}),a.pipe(De(u=>u.matched?(t=r._injector??t,this.getChildConfig(t,r,o).pipe(De(({routes:l})=>{let c=r._loadedInjector??t,{parameters:d,consumedSegments:f,remainingSegments:p}=u,h=new jo(f,d,Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Kw(r),Rt(r),r.component??r._loadedComponent??null,r,Yw(r)),g=_l(h,s,this.paramsInheritanceStrategy);h.params=Object.freeze(g.params),h.data=Object.freeze(g.data);let{segmentGroup:m,slicedSegments:D}=Zw(n,f,p,l);if(D.length===0&&m.hasChildren())return this.processChildren(c,l,m,h).pipe(A(B=>new ut(h,B)));if(l.length===0&&D.length===0)return _(new ut(h,[]));let R=Rt(r)===i;return this.processSegment(c,l,m,D,R?L:i,!0,h).pipe(A(B=>new ut(h,B instanceof ut?[B]:[])))}))):ko(n)))}getChildConfig(t,n,r){return n.children?_({routes:n.children,injector:t}):n.loadChildren?n._loadedRoutes!==void 0?_({routes:n._loadedRoutes,injector:n._loadedInjector}):aP(t,n,r,this.urlSerializer).pipe(le(o=>o?this.configLoader.loadChildren(t,n).pipe(we(i=>{n._loadedRoutes=i.routes,n._loadedInjector=i.injector})):cP(n))):_({routes:[],injector:t})}};function wP(e){e.sort((t,n)=>t.value.outlet===L?-1:n.value.outlet===L?1:t.value.outlet.localeCompare(n.value.outlet))}function bP(e){let t=e.value.routeConfig;return t&&t.path===""}function bb(e){let t=[],n=new Set;for(let r of e){if(!bP(r)){t.push(r);continue}let o=t.find(i=>r.value.routeConfig===i.value.routeConfig);o!==void 0?(o.children.push(...r.children),n.add(o)):t.push(r)}for(let r of n){let o=bb(r.children);t.push(new ut(r.value,o))}return t.filter(r=>!n.has(r))}function Kw(e){return e.data||{}}function Yw(e){return e.resolve||{}}function CP(e,t,n,r,o,i){return le(s=>yP(e,t,n,r,s.extractedUrl,o,i).pipe(A(({state:a,tree:u})=>F(y({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function EP(e,t){return le(n=>{let{targetSnapshot:r,guards:{canActivateChecks:o}}=n;if(!o.length)return _(n);let i=new Set(o.map(u=>u.route)),s=new Set;for(let u of i)if(!s.has(u))for(let l of Cb(u))s.add(l);let a=0;return X(s).pipe(kt(u=>i.has(u)?IP(u,r,e,t):(u.data=_l(u,u.parent,e).resolve,_(void 0))),we(()=>a++),co(1),le(u=>a===s.size?_(n):Ee))})}function Cb(e){let t=e.children.map(n=>Cb(n)).flat();return[e,...t]}function IP(e,t,n,r){let o=e.routeConfig,i=e._resolve;return o?.title!==void 0&&!hb(o)&&(i[Ms]=o.title),_P(i,e,t,r).pipe(A(s=>(e._resolvedData=s,e.data=_l(e,e.parent,n).resolve,null)))}function _P(e,t,n,r){let o=$p(e);if(o.length===0)return _({});let i={};return X(o).pipe(le(s=>xP(e[s],t,n,r).pipe(en(),we(a=>{if(a instanceof xs)throw Tl(new ws,a);i[s]=a}))),co(1),A(()=>i),Rn(s=>yb(s)?Ee:An(s)))}function xP(e,t,n,r){let o=As(t)??r,i=zo(e,o),s=i.resolve?i.resolve(t,n):rt(o,()=>i(t,n));return Qn(s)}function Up(e){return De(t=>{let n=e(t);return n?X(n).pipe(A(()=>t)):_(t)})}var Eb=(()=>{class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(i=>i.outlet===L);return r}getResolvedTitleForRoute(n){return n.data[Ms]}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(TP),providedIn:"root"})}return e})(),TP=(()=>{class e extends Eb{title;constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||e)(I(Hw))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),vh=new E("",{providedIn:"root",factory:()=>({})}),SP=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=wD({type:e,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,o){r&1&&sp(0,"router-outlet")},dependencies:[kF],encapsulation:2})}return e})();function yh(e){let t=e.children&&e.children.map(yh),n=t?F(y({},e),{children:t}):y({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==L&&(n.component=SP),n}var Dh=new E(""),MP=(()=>{class e{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=v(lp);loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return _(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=Qn(n.loadComponent()).pipe(A(Ib),we(i=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=i}),Fn(()=>{this.componentLoaders.delete(n)})),o=new io(r,()=>new J).pipe(oo());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return _({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=AP(r,this.compiler,n,this.onLoadEndListener).pipe(Fn(()=>{this.childrenLoaders.delete(r)})),s=new io(i,()=>new J).pipe(oo());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function AP(e,t,n,r){return Qn(e.loadChildren()).pipe(A(Ib),le(o=>o instanceof Wi||Array.isArray(o)?_(o):X(t.compileModuleAsync(o))),A(o=>{r&&r(e);let i,s,a=!1;return Array.isArray(o)?(s=o,a=!0):(i=o.create(n).injector,s=i.get(Dh,[],{optional:!0,self:!0}).flat()),{routes:s.map(yh),injector:i}}))}function NP(e){return e&&typeof e=="object"&&"default"in e}function Ib(e){return NP(e)?e.default:e}var wh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(RP),providedIn:"root"})}return e})(),RP=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),OP=new E("");var FP=new E(""),PP=(()=>{class e{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new J;transitionAbortSubject=new J;configLoader=v(MP);environmentInjector=v(Ye);destroyRef=v(zn);urlSerializer=v(hh);rootContexts=v(Ml);location=v(us);inputBindingEnabled=v(mh,{optional:!0})!==null;titleStrategy=v(Eb);options=v(vh,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=v(wh);createViewTransition=v(OP,{optional:!0});navigationErrorHandler=v(FP,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>_(void 0);rootComponentType=null;destroyed=!1;constructor(){let n=o=>this.events.next(new Qp(o)),r=o=>this.events.next(new Jp(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(F(y(y({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Ae({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:ys,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ke(i=>i.id!==0),A(i=>F(y({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),De(i=>{let s=!1,a=!1;return _(i).pipe(De(u=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",lt.SupersededByNewNavigation),Ee;this.currentTransition=i,this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,targetBrowserUrl:typeof u.extras.browserUrl=="string"?this.urlSerializer.parse(u.extras.browserUrl):u.extras.browserUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?F(y({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&c!=="reload"){let d="";return this.events.next(new Hr(u.id,this.urlSerializer.serialize(u.rawUrl),d,Wp.IgnoredSameUrlNavigation)),u.resolve(!1),Ee}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return _(u).pipe(De(d=>{let f=this.transitions?.getValue();return this.events.next(new Cs(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions?.getValue()?Ee:Promise.resolve(d)}),CP(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),we(d=>{i.targetSnapshot=d.targetSnapshot,i.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=F(y({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let f=new Cl(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:d,extractedUrl:f,source:p,restoredState:h,extras:g}=u,m=new Cs(d,this.urlSerializer.serialize(f),p,h);this.events.next(m);let D=fb(this.rootComponentType).snapshot;return this.currentTransition=i=F(y({},u),{targetSnapshot:D,urlAfterRedirects:f,extras:F(y({},g),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,_(i)}else{let d="";return this.events.next(new Hr(u.id,this.urlSerializer.serialize(u.extractedUrl),d,Wp.IgnoredByUrlHandlingStrategy)),u.resolve(!1),Ee}}),we(u=>{let l=new qp(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(l)}),A(u=>(this.currentTransition=i=F(y({},u),{guards:$F(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),i)),XF(this.environmentInjector,u=>this.events.next(u)),we(u=>{if(i.guardsResult=u.guardsResult,u.guardsResult&&typeof u.guardsResult!="boolean")throw Tl(this.urlSerializer,u.guardsResult);let l=new Zp(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(l)}),ke(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",lt.GuardRejected),!1)),Up(u=>{if(u.guards.canActivateChecks.length)return _(u).pipe(we(l=>{let c=new Kp(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),De(l=>{let c=!1;return _(l).pipe(EP(this.paramsInheritanceStrategy,this.environmentInjector),we({next:()=>c=!0,complete:()=>{c||this.cancelNavigationTransition(l,"",lt.NoDataFromResolver)}}))}),we(l=>{let c=new Yp(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}))}),Up(u=>{let l=c=>{let d=[];c.routeConfig?.loadComponent&&!c.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(c.routeConfig).pipe(we(f=>{c.component=f}),A(()=>{})));for(let f of c.children)d.push(...l(f));return d};return Aa(l(u.targetSnapshot.root)).pipe(On(null),Ie(1))}),Up(()=>this.afterPreactivation()),De(()=>{let{currentSnapshot:u,targetSnapshot:l}=i,c=this.createViewTransition?.(this.environmentInjector,u.root,l.root);return c?X(c).pipe(A(()=>i)):_(i)}),A(u=>{let l=LF(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=i=F(y({},u),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,i}),we(()=>{this.events.next(new Is)}),BF(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),Ie(1),we({next:u=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Dn(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{s=!0}}),Pa(this.transitionAbortSubject.pipe(we(u=>{throw u}))),Fn(()=>{!s&&!a&&this.cancelNavigationTransition(i,"",lt.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation=null,this.currentTransition=null)}),Rn(u=>{if(this.destroyed)return i.resolve(!1),Ee;if(a=!0,vb(u))this.events.next(new vn(i.id,this.urlSerializer.serialize(i.extractedUrl),u.message,u.cancellationCode)),UF(u)?this.events.next(new $o(u.url,u.navigationBehaviorOptions)):i.resolve(!1);else{let l=new Es(i.id,this.urlSerializer.serialize(i.extractedUrl),u,i.targetSnapshot??void 0);try{let c=rt(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof xs){let{message:d,cancellationCode:f}=Tl(this.urlSerializer,c);this.events.next(new vn(i.id,this.urlSerializer.serialize(i.extractedUrl),d,f)),this.events.next(new $o(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(l),u}catch(c){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(c)}}return Ee}))}))}cancelNavigationTransition(n,r,o){let i=new vn(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(i),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function kP(e){return e!==ys}var LP=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(VP),providedIn:"root"})}return e})(),ph=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}},VP=(()=>{class e extends ph{static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),_b=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(jP),providedIn:"root"})}return e})(),jP=(()=>{class e extends _b{location=v(us);urlSerializer=v(hh);options=v(vh,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=v(wh);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new yn;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=fb(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof Cs)this.stateMemento=this.createStateMemento();else if(n instanceof Hr)this.rawUrlTree=r.initialUrl;else if(n instanceof Cl){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else n instanceof Is?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof vn&&(n.code===lt.GuardRejected||n.code===lt.NoDataFromResolver)?this.restoreHistory(r):n instanceof Es?this.restoreHistory(r,!0):n instanceof Dn&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=n instanceof yn?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let i=this.browserPageId,s=y(y({},r.extras.state),this.generateNgRouterState(r.id,i));this.location.replaceState(o,"",s)}else{let i=y(y({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",i)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,i=this.currentPageId-o;i!==0?this.location.historyGo(i):this.currentUrlTree===n.finalUrl&&i===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&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,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function UP(e,t){e.events.pipe(ke(n=>n instanceof Dn||n instanceof vn||n instanceof Es||n instanceof Hr),A(n=>n instanceof Dn||n instanceof Hr?0:(n instanceof vn?n.code===lt.Redirect||n.code===lt.SupersededByNewNavigation:!1)?2:1),ke(n=>n!==2),Ie(1)).subscribe(()=>{t()})}var BP={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},$P={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Nl=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=v(rp);stateManager=v(_b);options=v(vh,{optional:!0})||{};pendingTasks=v(dn);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=v(PP);urlSerializer=v(hh);location=v(us);urlHandlingStrategy=v(wh);_events=new J;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=v(LP);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=v(Dh,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!v(mh,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}eventsSubscription=new se;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,i=this.navigationTransitions.currentNavigation;if(o!==null&&i!==null){if(this.stateManager.handleRouterEvent(r,i),r instanceof vn&&r.code!==lt.Redirect&&r.code!==lt.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Dn)this.navigated=!0;else if(r instanceof $o){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),u=y({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||kP(o.source)},s);this.scheduleNavigation(a,ys,null,u,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}zP(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});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),ys,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let i={replaceUrl:!0},s=o?.navigationId?o:null;if(o){let u=y({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(i.state=u)}let a=this.parseUrl(n);this.scheduleNavigation(a,r,s,i)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(yh),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:i,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,l=u?this.currentUrlTree.fragment:s,c=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":c=y(y({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}c!==null&&(c=this.removeEmptyProps(c));let d;try{let f=o?o.snapshot:this.routerState.snapshot.root;d=ub(f)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return lb(d,n,c,l??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=$r(n)?n:this.parseUrl(n),i=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(i,ys,null,r)}navigate(n,r={skipLocationChange:!1}){return HP(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=y({},BP):r===!1?o=y({},$P):o=r,$r(n))return zw(this.currentUrlTree,n,o);let i=this.parseUrl(n);return zw(this.currentUrlTree,i,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,i])=>(i!=null&&(r[o]=i),r),{})}scheduleNavigation(n,r,o,i,s){if(this.disposed)return Promise.resolve(!1);let a,u,l;s?(a=s.resolve,u=s.reject,l=s.promise):l=new Promise((d,f)=>{a=d,u=f});let c=this.pendingTasks.add();return UP(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(c))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:i,resolve:a,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(d=>Promise.reject(d))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function HP(e){for(let t=0;t{class e{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new J;constructor(n,r,o,i,s,a){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=i,this.el=s,this.locationStrategy=a;let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area",this.isAnchorElement?this.subscription=n.events.subscribe(l=>{l instanceof Dn&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(n){n==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):($r(n)?this.routerLinkInput=n:this.routerLinkInput=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0"))}onClick(n,r,o,i,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(n!==0||r||o||i||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u),!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 r=this.href===null?null:Fy(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(n,r){let o=this.renderer,i=this.el.nativeElement;r!==null?o.setAttribute(i,n,r):o.removeAttribute(i,n)}get urlTree(){return this.routerLinkInput===null?null:$r(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||e)(b(Nl),b(zr),Mf("tabindex"),b(ot),b(xe),b(Kn))};static \u0275dir=H({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,o){r&1&&mt("click",function(s){return o.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Lr("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Zn],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Zn],replaceUrl:[2,"replaceUrl","replaceUrl",Zn],routerLink:"routerLink"},features:[np,pt]})}return e})(),TZ=(()=>{class e{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ee;constructor(n,r,o,i,s){this.router=n,this.element=r,this.renderer=o,this.cdr=i,this.link=s,this.routerEventsSubscription=n.events.subscribe(a=>{a instanceof Dn&&this.update()})}ngAfterContentInit(){_(this.links.changes,_(null)).pipe(Nn()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=X(n).pipe(Nn()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){let r=Array.isArray(n)?n:n.split(" ");this.classes=r.filter(o=>!!o)}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(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),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 r=GP(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>{let i=o.urlTree;return i?n.isActive(i,r):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}static \u0275fac=function(r){return new(r||e)(b(Nl),b(xe),b(ot),b(vt),b(Qw,8))};static \u0275dir=H({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(r,o,i){if(r&1&&WD(i,Qw,5),r&2){let s;qD(s=ZD())&&(o.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[pt]})}return e})();function GP(e){return!!e.paths}var WP=new E("");function SZ(e,...t){return Ar([{provide:Dh,multi:!0,useValue:e},[],{provide:zr,useFactory:qP,deps:[Nl]},{provide:Gu,multi:!0,useFactory:KP},t.map(n=>n.\u0275providers)])}function qP(e){return e.routerState.root}function ZP(e,t){return{\u0275kind:e,\u0275providers:t}}function KP(){let e=v(je);return t=>{let n=e.get(un);if(t!==n.components[0])return;let r=e.get(Nl),o=e.get(YP);e.get(QP)===1&&r.initialNavigation(),e.get(JP,null,U.Optional)?.setUpPreloading(),e.get(WP,null,U.Optional)?.init(),r.resetRootComponentType(n.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var YP=new E("",{factory:()=>new J}),QP=new E("",{providedIn:"root",factory:()=>1});var JP=new E("");function MZ(){return ZP(6,[{provide:Kn,useClass:pw}])}function xb(e){let t=e.split(/\D/).map(n=>Number(n));return new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5])}function Tb(e){let t=e.split(/\D/).map(n=>Number(n));return new Date(t[0],t[1]-1,t[2])}function Sb(e){return bh(e)+`T${Rs(e.getHours())}:${Rs(e.getMinutes())}:${Rs(e.getSeconds())}`}function bh(e){return`${e.getFullYear()}-${Rs(e.getMonth()+1)}-${Rs(e.getDate())}`}function Rs(e){return("0"+e).slice(-2)}var XP=function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r=e}:e;return function(){var r=Array.from(arguments);return n(arguments)?t.apply(this,r):function(o){return t.apply(void 0,XP([o],r,!1))}}};var Ab=function(e){return e._tag==="Left"};var Nb=function(e){return{_tag:"Left",left:e}},Rb=function(e){return{_tag:"Right",right:e}};function Ch(e){return function(t,n){return e.map(t,function(){return n})}}function Ob(e){var t=Ch(e);return function(n){return t(n,void 0)}}function Fb(e){return function(t,n){return e.chain(t,function(r){return e.map(n(r),function(){return r})})}}var Ol=Nb,Os=Rb,Pb=Rl(2,function(e,t){return pe(e)?e:t(e.right)}),kb=function(e,t){return Jn(e,r1(t))},n1=function(e,t){return Jn(e,i1(t))};var Eh="Either";var r1=function(e){return function(t){return pe(t)?t:Os(e(t.right))}},Lb={URI:Eh,map:kb},QZ=Rl(2,Ch(Lb)),JZ=Ob(Lb);var o1=function(e){return function(t){return pe(t)?t:pe(e)?e:Os(t.right(e.right))}},i1=o1;var s1={URI:Eh,map:kb,ap:n1,chain:Pb};var a1={URI:Eh,fromEither:Mb};var pe=Ab;var u1=function(e,t){return function(n){return pe(n)?e(n.left):t(n.right)}};var l1=u1,Fl=l1;var XZ=Rl(2,Fb(s1));var eK={fromEither:a1.fromEither};var c1=function(e){return function(t){return pe(t)?e(t.left):t}},tK=c1;var Ih=Pb;var q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Go=function(){return Go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n")}function Xn(e,t,n,r){for(var o=e.length,i=Array(o+1),s=0;s")}function f1(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var o=e.length,i={},s=0;s0?qr(s):W(l?i:r)}return Bb(t)&&Array.isArray(r)?W(r):ce(r,o)},e.encode===z&&t.encode===z?function(r){return Vb(r,e)}:function(r){for(var o={},i=Object.keys(Vb(r,e)),s=i.length,a=0;a")}function m1(e){return e.length>0}var ct={};function Wb(e,t){for(var n=[],r=0,o=e;r")),new $1(t,function(n){return $b.is(n)&&n.every(e.is)},function(n,r){var o=$b.validate(n,r);if(pe(o))return o;for(var i=o.right,s=i.length,a=i,u=[],l=0;l0?qr(u):W(a)},e.encode===z?z:function(n){return n.map(e.encode)},e)}var H1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.props=s,a._tag="InterfaceType",a}return t}($);function dt(e,t){t===void 0&&(t=Hb(e));var n=Object.keys(e),r=n.map(function(i){return e[i]}),o=n.length;return new H1(t,function(i){if(Ot.is(i)){for(var s=0;s0?qr(c):W(l)},Pl(r)?z:function(i){for(var s=Go({},i),a=0;a0?qr(c):W(l)},Pl(r)?z:function(i){for(var s=Go({},i),a=0;a0){var r=n[0],o=n[1],i=o.length,s=function(a){for(var u=0;u0?qr(s):W(jb(r,i))},e.length===0?z:function(r){return jb(r,e.map(function(o){return o.encode(r)}))},e)}var fK=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.types=s,a._tag="TupleType",a}return t}($);var W1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ReadonlyType",a}return t}($);function pK(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new W1(t,e.is,e.validate,e.encode,e)}var q1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ReadonlyArrayType",a}return t}($);function eC(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=Pe(e);return new q1(t,n.is,n.validate,n.encode,e)}var Z1=function(e,t){return Y1(dt(e),t)},K1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ExactType",a}return t}($);function Y1(e,t){t===void 0&&(t=g1(e));var n=Th(e);return new K1(t,e.is,function(r,o){var i=Ot.validate(r,o);if(pe(i))return i;var s=e.validate(r,o);return pe(s)?s:Os(Ub(s.right,n))},function(r){return e.encode(Ub(r,n))},e)}var Q1=function(e){q(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,o){return n.is(r)?W(r):ce(r,o)},z)||this;return n._tag="FunctionType",n}return t}($);var hK=new Q1,J1=function(e){q(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,o){return ce(r,o)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}($);var gK=new J1,X1=function(e){q(t,e);function t(){var n=e.call(this,"any",function(r){return!0},W,z)||this;return n._tag="AnyType",n}return t}($);var mK=new X1;function tC(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(Sh(t),")")),new U1(n,function(r){return e.is(r)&&t(r)},function(r,o){var i=e.validate(r,o);if(pe(i))return i;var s=i.right;return t(s)?W(s):ce(s,o)},e.encode,e,t)}var vK=tC(he,Number.isInteger,"Integer"),ek=function(e){q(t,e);function t(n,r,o,i,s,a){var u=e.call(this,n,r,o,i,s)||this;return u.tag=a,u}return t}(Xb);var yK=function(e){return[{key:"",type:e}]};var tk=function(e){q(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,o){return n.is(r)?W(r):ce(r,o)},z)||this;return n._tag="ObjectType",n}return t}($);var DK=new tk;var wK=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.props=s,a._tag="StrictType",a}return t}($);var nk=Mh("JsonArray",function(){return eC(Ah)}),rk=Mh("JsonRecord",function(){return qo(Y,Ah)}),Ah=ks([Yb,he,Y,Ps,nk,rk],"Json"),nC=new $("JsonFromString",Ah.is,function(e,t){try{return W(JSON.parse(e))}catch{return ce(e,t)}},function(e){return JSON.stringify(e)});function Vs(e){return ks([Ps,e])}function xK(e){return ks([Ps,Fs,e])}var TK=dt({Id:he});var SK=dt({Id:he,HRef:Vs(Y)});var MK=dt({Id:Vs(he),HRef:Vs(Y)});var AK=Y.pipe(nC,"JsonFromUnknown"),NK=new $("LocalDateTimeFromString",e=>e instanceof Date,(e,t)=>Jn(Y.validate(e,t),Ih(n=>{let r=xb(n);return isNaN(r.getTime())?ce(e,t):W(r)})),e=>Sb(e)),RK=new $("LocalDateTimeFromString",e=>e instanceof Date,(e,t)=>Jn(Y.validate(e,t),Ih(n=>{let r=Tb(n);return isNaN(r.getTime())?ce(e,t):W(r)})),e=>bh(e));function FK(e,t){return t.reduce((n,r)=>F(y({},n),{[r]:e[r]}),{})}function rC(e,t){let n=r=>Object.values(t).includes(r);return new $(e,n,(r,o)=>n(r)?W(r):ce(r,o),z)}var oC=function(e){return e.Crystal="crystal",e.Excel="excel",e}(oC||{}),wn=dt({type:rC("ReportType",oC),id:he});var ok=dt({de:dt({label:Y,description:Y}),fr:dt({label:Y,description:Y})}),ik=qo(Y,ok),sk=dt({roles:Pe(Y),types:Pe(Y)}),ak=dt({substitutionsAdminLink:Y}),UK=dt({apiUrl:Y,scriptsAndAssetsPath:Y,paginationLimit:he,absencePresenceTypeId:he,latePresenceTypeId:he,dispensationPresenceTypeId:he,halfDayPresenceTypeId:he,unconfirmedAbsenceStateId:he,unexcusedAbsenceStateId:he,excusedAbsenceStateId:he,checkableAbsenceStateId:he,lessonPresencesRefreshTime:he,unconfirmedAbsencesRefreshTime:Vs(he),personMasterDataReports:Pe(wn),studentConfirmationReports:Pe(wn),evaluateAbsencesReports:Pe(wn),myAbsencesReports:Pe(wn),testsByCourseReports:Pe(wn),testsBySubscriptionStudentReports:Pe(wn),testsBySubscriptionTeacherReports:Pe(wn),studyClassStudentsReports:Pe(wn),courseStudentsReports:Pe(wn),subscriptionDetailGroupId:he,headerRoleRestriction:qo(Y,Y),notificationTypes:ik,notificationTypesAssignments:Pe(sk),eventlist:qo(Y,Y),dashboard:ak,preventStudentAbsenceAfterLessonStart:Pe(Y)});var BK=new E("Application Settings",{providedIn:"root",factory:()=>window.schulverwaltung.settings});var hC=(()=>{class e{_renderer;_elementRef;onChange=n=>{};onTouched=()=>{};constructor(n,r){this._renderer=n,this._elementRef=r}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static \u0275fac=function(r){return new(r||e)(b(ot),b(xe))};static \u0275dir=H({type:e})}return e})(),Xo=(()=>{class e extends hC{static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,features:[Ce]})}return e})(),Cn=new E(""),uk={provide:Cn,useExisting:Re(()=>lk),multi:!0},lk=(()=>{class e extends Xo{writeValue(n){this.setProperty("checked",n)}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,o){r&1&&mt("change",function(s){return o.onChange(s.target.checked)})("blur",function(){return o.onTouched()})},standalone:!1,features:[He([uk]),Ce]})}return e})(),ck={provide:Cn,useExisting:Re(()=>gC),multi:!0};function dk(){let e=mn()?mn().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var fk=new E(""),gC=(()=>{class e extends hC{_compositionMode;_composing=!1;constructor(n,r,o){super(n,r),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!dk())}writeValue(n){let r=n??"";this.setProperty("value",r)}_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)}static \u0275fac=function(r){return new(r||e)(b(ot),b(xe),b(fk,8))};static \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(r,o){r&1&&mt("input",function(s){return o._handleInput(s.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(s){return o._compositionEnd(s.target.value)})},standalone:!1,features:[He([ck]),Ce]})}return e})();function er(e){return e==null||(typeof e=="string"||Array.isArray(e))&&e.length===0}function mC(e){return e!=null&&typeof e.length=="number"}var nr=new E(""),Gs=new E(""),pk=/^(?=.{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])?)*$/,iC=class{static min(t){return vC(t)}static max(t){return yC(t)}static required(t){return DC(t)}static requiredTrue(t){return hk(t)}static email(t){return gk(t)}static minLength(t){return mk(t)}static maxLength(t){return vk(t)}static pattern(t){return yk(t)}static nullValidator(t){return Ll(t)}static compose(t){return _C(t)}static composeAsync(t){return xC(t)}};function vC(e){return t=>{if(er(t.value)||er(e))return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(er(t.value)||er(e))return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function DC(e){return er(e.value)?{required:!0}:null}function hk(e){return e.value===!0?null:{required:!0}}function gk(e){return er(e.value)||pk.test(e.value)?null:{email:!0}}function mk(e){return t=>er(t.value)||!mC(t.value)?null:t.value.lengthmC(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}function yk(e){if(!e)return Ll;let t,n;return typeof e=="string"?(n="",e.charAt(0)!=="^"&&(n+="^"),n+=e,e.charAt(e.length-1)!=="$"&&(n+="$"),t=new RegExp(n)):(n=e.toString(),t=e),r=>{if(er(r.value))return null;let o=r.value;return t.test(o)?null:{pattern:{requiredPattern:n,actualValue:o}}}}function Ll(e){return null}function wC(e){return e!=null}function bC(e){return qn(e)?X(e):e}function CC(e){let t={};return e.forEach(n=>{t=n!=null?y(y({},t),n):t}),Object.keys(t).length===0?null:t}function EC(e,t){return t.map(n=>n(e))}function Dk(e){return!e.validate}function IC(e){return e.map(t=>Dk(t)?t:n=>t.validate(n))}function _C(e){if(!e)return null;let t=e.filter(wC);return t.length==0?null:function(n){return CC(EC(n,t))}}function kh(e){return e!=null?_C(IC(e)):null}function xC(e){if(!e)return null;let t=e.filter(wC);return t.length==0?null:function(n){let r=EC(n,t).map(bC);return Ni(r).pipe(A(CC))}}function Lh(e){return e!=null?xC(IC(e)):null}function sC(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function TC(e){return e._rawValidators}function SC(e){return e._rawAsyncValidators}function Nh(e){return e?Array.isArray(e)?e:[e]:[]}function Vl(e,t){return Array.isArray(e)?e.includes(t):e===t}function aC(e,t){let n=Nh(t);return Nh(e).forEach(o=>{Vl(n,o)||n.push(o)}),n}function uC(e,t){return Nh(t).filter(n=>!Vl(e,n))}var jl=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=kh(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Lh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return this.control?this.control.hasError(t,n):!1}getError(t,n){return this.control?this.control.getError(t,n):null}},bn=class extends jl{name;get formDirective(){return null}get path(){return null}},Wt=class extends jl{_parent=null;name=null;valueAccessor=null},Ul=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},wk={"[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"},oY=F(y({},wk),{"[class.ng-submitted]":"isSubmitted"}),iY=(()=>{class e extends Ul{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(b(Wt,2))};static \u0275dir=H({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&Wu("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[Ce]})}return e})(),sY=(()=>{class e extends Ul{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(b(bn,10))};static \u0275dir=H({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&Wu("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[Ce]})}return e})();var js="VALID",kl="INVALID",Zo="PENDING",Us="DISABLED",tr=class{},Bl=class extends tr{value;source;constructor(t,n){super(),this.value=t,this.source=n}},$s=class extends tr{pristine;source;constructor(t,n){super(),this.pristine=t,this.source=n}},Hs=class extends tr{touched;source;constructor(t,n){super(),this.touched=t,this.source=n}},Ko=class extends tr{status;source;constructor(t,n){super(),this.status=t,this.source=n}},Rh=class extends tr{source;constructor(t){super(),this.source=t}},Oh=class extends tr{source;constructor(t){super(),this.source=t}};function Vh(e){return(Gl(e)?e.validators:e)||null}function bk(e){return Array.isArray(e)?kh(e):e||null}function jh(e,t){return(Gl(t)?t.asyncValidators:e)||null}function Ck(e){return Array.isArray(e)?Lh(e):e||null}function Gl(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function MC(e,t,n){let r=e.controls;if(!(t?Object.keys(r):r).length)throw new w(1e3,"");if(!r[n])throw new w(1001,"")}function AC(e,t,n){e._forEachChild((r,o)=>{if(n[o]===void 0)throw new w(1002,"")})}var Qo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,n){this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return yt(this.statusReactive)}set status(t){yt(()=>this.statusReactive.set(t))}_status=Oo(()=>this.statusReactive());statusReactive=Or(void 0);get valid(){return this.status===js}get invalid(){return this.status===kl}get pending(){return this.status==Zo}get disabled(){return this.status===Us}get enabled(){return this.status!==Us}errors;get pristine(){return yt(this.pristineReactive)}set pristine(t){yt(()=>this.pristineReactive.set(t))}_pristine=Oo(()=>this.pristineReactive());pristineReactive=Or(!0);get dirty(){return!this.pristine}get touched(){return yt(this.touchedReactive)}set touched(t){yt(()=>this.touchedReactive.set(t))}_touched=Oo(()=>this.touchedReactive());touchedReactive=Or(!1);get untouched(){return!this.touched}_events=new J;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(aC(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(aC(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(uC(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(uC(t,this._rawAsyncValidators))}hasValidator(t){return Vl(this._rawValidators,t)}hasAsyncValidator(t){return Vl(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let n=this.touched===!1;this.touched=!0;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(F(y({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new Hs(!0,r))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(t))}markAsUntouched(t={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=t.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:r})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,r),n&&t.emitEvent!==!1&&this._events.next(new Hs(!1,r))}markAsDirty(t={}){let n=this.pristine===!0;this.pristine=!1;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(F(y({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new $s(!1,r))}markAsPristine(t={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=t.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,r),n&&t.emitEvent!==!1&&this._events.next(new $s(!0,r))}markAsPending(t={}){this.status=Zo;let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ko(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(F(y({},t),{sourceControl:n}))}disable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Us,this.errors=null,this._forEachChild(o=>{o.disable(F(y({},t),{onlySelf:!0}))}),this._updateValue();let r=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Bl(this.value,r)),this._events.next(new Ko(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(F(y({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=js,this._forEachChild(r=>{r.enable(F(y({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(F(y({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t,n){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===js||this.status===Zo)&&this._runAsyncValidator(r,t.emitEvent)}let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Bl(this.value,n)),this._events.next(new Ko(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(F(y({},t),{sourceControl:n}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Us:js}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,n){if(this.asyncValidator){this.status=Zo,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1};let r=bC(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:n,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(t){let n=t;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((r,o)=>r&&r._find(o),this)}getError(t,n){let r=n?this.get(n):this;return r&&r.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,n,r){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||r)&&this._events.next(new Ko(this.status,n)),this._parent&&this._parent._updateControlsErrors(t,n,r)}_initObservables(){this.valueChanges=new ee,this.statusChanges=new ee}_calculateStatus(){return this._allControlsDisabled()?Us:this.errors?kl:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Zo)?Zo:this._anyControlsHaveStatus(kl)?kl:js}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,n){let r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),o&&this._events.next(new $s(this.pristine,n))}_updateTouched(t={},n){this.touched=this._anyControlsTouched(),this._events.next(new Hs(this.touched,n)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Gl(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let n=this._parent&&this._parent.dirty;return!t&&!!n&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=bk(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ck(this._rawAsyncValidators)}},Jo=class extends Qo{constructor(t,n,r){super(Vh(n),jh(r,n)),this.controls=t,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,n){return this.controls[t]?this.controls[t]:(this.controls[t]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(t,n,r={}){this.registerControl(t,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(t,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(t,n,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],n&&this.registerControl(t,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,n={}){AC(this,!0,t),Object.keys(t).forEach(r=>{MC(this,!0,r),this.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(t,n={}){t!=null&&(Object.keys(t).forEach(r=>{let o=this.controls[r];o&&o.patchValue(t[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(t={},n={}){this._forEachChild((r,o)=>{r.reset(t?t[o]:null,{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(t,n,r)=>(t[r]=n.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(n,r)=>r._syncPendingControls()?!0:n);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(n=>{let r=this.controls[n];r&&t(r,n)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[n,r]of Object.entries(this.controls))if(this.contains(n)&&t(r))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(n,r,o)=>((r.enabled||this.disabled)&&(n[o]=r.value),n))}_reduceChildren(t,n){let r=t;return this._forEachChild((o,i)=>{r=n(r,o,i)}),r}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Fh=class extends Jo{};var Zr=new E("",{providedIn:"root",factory:()=>Ws}),Ws="always";function NC(e,t){return[...t.path,e]}function zs(e,t,n=Ws){Uh(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||n==="always")&&t.valueAccessor.setDisabledState?.(e.disabled),Ik(e,t),xk(e,t),_k(e,t),Ek(e,t)}function $l(e,t,n=!0){let r=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(r),t.valueAccessor.registerOnTouched(r)),zl(e,t),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function Hl(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function Ek(e,t){if(t.valueAccessor.setDisabledState){let n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}function Uh(e,t){let n=TC(e);t.validator!==null?e.setValidators(sC(n,t.validator)):typeof n=="function"&&e.setValidators([n]);let r=SC(e);t.asyncValidator!==null?e.setAsyncValidators(sC(r,t.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let o=()=>e.updateValueAndValidity();Hl(t._rawValidators,o),Hl(t._rawAsyncValidators,o)}function zl(e,t){let n=!1;if(e!==null){if(t.validator!==null){let o=TC(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==t.validator);i.length!==o.length&&(n=!0,e.setValidators(i))}}if(t.asyncValidator!==null){let o=SC(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==t.asyncValidator);i.length!==o.length&&(n=!0,e.setAsyncValidators(i))}}}let r=()=>{};return Hl(t._rawValidators,r),Hl(t._rawAsyncValidators,r),n}function Ik(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&RC(e,t)})}function _k(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&RC(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function RC(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function xk(e,t){let n=(r,o)=>{t.valueAccessor.writeValue(r),o&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}function OC(e,t){e==null,Uh(e,t)}function Tk(e,t){return zl(e,t)}function Bh(e,t){if(!e.hasOwnProperty("model"))return!1;let n=e.model;return n.isFirstChange()?!0:!Object.is(t,n.currentValue)}function Sk(e){return Object.getPrototypeOf(e.constructor)===Xo}function FC(e,t){e._syncPendingControls(),t.forEach(n=>{let r=n.control;r.updateOn==="submit"&&r._pendingChange&&(n.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function $h(e,t){if(!t)return null;Array.isArray(t);let n,r,o;return t.forEach(i=>{i.constructor===gC?n=i:Sk(i)?r=i:o=i}),o||r||n||null}function Mk(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ak={provide:bn,useExisting:Re(()=>Nk)},Bs=Promise.resolve(),Nk=(()=>{class e extends bn{callSetDisabledState;get submitted(){return yt(this.submittedReactive)}_submitted=Oo(()=>this.submittedReactive());submittedReactive=Or(!1);_directives=new Set;form;ngSubmit=new ee;options;constructor(n,r,o){super(),this.callSetDisabledState=o,this.form=new Jo({},kh(n),Lh(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Bs.then(()=>{let r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),zs(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Bs.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Bs.then(()=>{let r=this._findContainer(n.path),o=new Jo({});OC(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Bs.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){Bs.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submittedReactive.set(!0),FC(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submittedReactive.set(!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}static \u0275fac=function(r){return new(r||e)(b(nr,10),b(Gs,10),b(Zr,8))};static \u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&mt("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[He([Ak]),Ce]})}return e})();function lC(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function cC(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Yo=class extends Qo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,n,r){super(Vh(n),jh(r,n)),this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Gl(n)&&(n.nonNullable||n.initialValueIsDefault)&&(cC(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){lC(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){lC(this._onDisabledChange,t)}_forEachChild(t){}_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(t){cC(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},uY=Yo,Rk=e=>e instanceof Yo;var Ok={provide:Wt,useExisting:Re(()=>Fk)},dC=Promise.resolve(),Fk=(()=>{class e extends Wt{_changeDetectorRef;callSetDisabledState;control=new Yo;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new ee;constructor(n,r,o,i,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=$h(this,i)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),Bh(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(){zs(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){dC.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,o=r!==0&&Zn(r);dC.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?NC(n,this._parent):[n]}static \u0275fac=function(r){return new(r||e)(b(bn,9),b(nr,10),b(Gs,10),b(Cn,10),b(vt,8),b(Zr,8))};static \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"],standalone:!1,features:[He([Ok]),Ce,pt]})}return e})(),lY=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return e})(),Pk={provide:Cn,useExisting:Re(()=>kk),multi:!0},kk=(()=>{class e extends Xo{writeValue(n){let r=n??"";this.setProperty("value",r)}registerOnChange(n){this.onChange=r=>{n(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,o){r&1&&mt("input",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[He([Pk]),Ce]})}return e})(),Lk={provide:Cn,useExisting:Re(()=>jk),multi:!0};var Vk=(()=>{class e{_accessors=[];add(n,r){this._accessors.push([n,r])}remove(n){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===n){this._accessors.splice(r,1);return}}select(n){this._accessors.forEach(r=>{this._isSameGroup(r,n)&&r[1]!==n&&r[1].fireUncheck(n.value)})}_isSameGroup(n,r){return n[0].control?n[0]._parent===r._control._parent&&n[1].name===r.name:!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jk=(()=>{class e extends Xo{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=v(Zr,{optional:!0})??Ws;constructor(n,r,o,i){super(n,r),this._registry=o,this._injector=i}ngOnInit(){this._control=this._injector.get(Wt),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)}static \u0275fac=function(r){return new(r||e)(b(ot),b(xe),b(Vk),b(je))};static \u0275dir=H({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(r,o){r&1&&mt("change",function(){return o.onChange()})("blur",function(){return o.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[He([Lk]),Ce]})}return e})();var Hh=new E(""),Uk={provide:Wt,useExisting:Re(()=>Bk)},Bk=(()=>{class e extends Wt{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(n){}model;update=new ee;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(n,r,o,i,s){super(),this._ngModelWarningConfig=i,this.callSetDisabledState=s,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=$h(this,o)}ngOnChanges(n){if(this._isControlChanged(n)){let r=n.form.previousValue;r&&$l(r,this,!1),zs(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Bh(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&$l(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")}static \u0275fac=function(r){return new(r||e)(b(nr,10),b(Gs,10),b(Cn,10),b(Hh,8),b(Zr,8))};static \u0275dir=H({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[He([Uk]),Ce,pt]})}return e})(),$k={provide:bn,useExisting:Re(()=>Hk)},Hk=(()=>{class e extends bn{callSetDisabledState;get submitted(){return yt(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}_submitted=Oo(()=>this._submittedReactive());_submittedReactive=Or(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new ee;constructor(n,r,o){super(),this.callSetDisabledState=o,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(zl(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 r=this.form.get(n.path);return zs(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){$l(n.control||null,n,!1),Mk(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,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),FC(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new Rh(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new Oh(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&($l(r||null,n),Rk(o)&&(zs(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);OC(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&Tk(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Uh(this.form,this),this._oldForm&&zl(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(r){return new(r||e)(b(nr,10),b(Gs,10),b(Zr,8))};static \u0275dir=H({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&mt("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[He([$k]),Ce,pt]})}return e})();var zk={provide:Wt,useExisting:Re(()=>Gk)},Gk=(()=>{class e extends Wt{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(n){}model;update=new ee;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(n,r,o,i,s){super(),this._ngModelWarningConfig=s,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=$h(this,i)}ngOnChanges(n){this._added||this._setUpControl(),Bh(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 NC(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||e)(b(bn,13),b(nr,10),b(Gs,10),b(Cn,10),b(Hh,8))};static \u0275dir=H({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[He([zk]),Ce,pt]})}return e})(),Wk={provide:Cn,useExisting:Re(()=>kC),multi:!0};function PC(e,t){return e==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function qk(e){return e.split(":")[0]}var kC=(()=>{class e extends Xo{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r=this._getOptionId(n),o=PC(r,n);this.setProperty("value",o)}registerOnChange(n){this.onChange=r=>{this.value=this._getOptionValue(r),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),n))return r;return null}_getOptionValue(n){let r=qk(n);return this._optionMap.has(r)?this._optionMap.get(r):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,o){r&1&&mt("change",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[He([Wk]),Ce]})}return e})(),cY=(()=>{class e{_element;_renderer;_select;id;constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(n){this._select!=null&&(this._select._optionMap.set(this.id,n),this._setElementValue(PC(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))}static \u0275fac=function(r){return new(r||e)(b(xe),b(ot),b(kC,9))};static \u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),Zk={provide:Cn,useExisting:Re(()=>LC),multi:!0};function fC(e,t){return e==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function Kk(e){return e.split(":")[0]}var LC=(()=>{class e extends Xo{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r;if(Array.isArray(n)){let o=n.map(i=>this._getOptionId(i));r=(i,s)=>{i._setSelected(o.indexOf(s.toString())>-1)}}else r=(o,i)=>{o._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(n){this.onChange=r=>{let o=[],i=r.selectedOptions;if(i!==void 0){let s=i;for(let a=0;a{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,o){r&1&&mt("change",function(s){return o.onChange(s.target)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[He([Zk]),Ce]})}return e})(),dY=(()=>{class e{_element;_renderer;_select;id;_value;constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){this._select!=null&&(this._value=n,this._setElementValue(fC(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(fC(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))}static \u0275fac=function(r){return new(r||e)(b(xe),b(ot),b(LC,9))};static \u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();function VC(e){return typeof e=="number"?e:parseFloat(e)}var zh=(()=>{class e{_validator=Ll;_onChange;_enabled;ngOnChanges(n){if(this.inputName in n){let r=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):Ll,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,features:[pt]})}return e})(),Yk={provide:nr,useExisting:Re(()=>Qk),multi:!0},Qk=(()=>{class e extends zh{max;inputName="max";normalizeInput=n=>VC(n);createValidator=n=>yC(n);static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&Lr("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[He([Yk]),Ce]})}return e})(),Jk={provide:nr,useExisting:Re(()=>Xk),multi:!0},Xk=(()=>{class e extends zh{min;inputName="min";normalizeInput=n=>VC(n);createValidator=n=>vC(n);static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&Lr("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[He([Jk]),Ce]})}return e})(),eL={provide:nr,useExisting:Re(()=>tL),multi:!0};var tL=(()=>{class e extends zh{required;inputName="required";normalizeInput=Zn;createValidator=n=>DC;enabled(n){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,o){r&2&&Lr("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[He([eL]),Ce]})}return e})();var jC=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({})}return e})(),Ph=class extends Qo{constructor(t,n,r){super(Vh(n),jh(r,n)),this.controls=t,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,n={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(t,n,r={}){this.controls.splice(t,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(t,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(t,n,r={}){let o=this._adjustIndex(t);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),n&&(this.controls.splice(o,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,n={}){AC(this,!1,t),t.forEach((r,o)=>{MC(this,!1,o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(t,n={}){t!=null&&(t.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(t=[],n={}){this._forEachChild((r,o)=>{r.reset(t[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((n,r)=>r._syncPendingControls()?!0:n,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((n,r)=>{t(n,r)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(n=>n.enabled&&t(n))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function pC(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var nL=(()=>{class e{useNonNullable=!1;get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,r=null){let o=this._reduceControls(n),i={};return pC(r)?i=r:r!==null&&(i.validators=r.validator,i.asyncValidators=r.asyncValidator),new Jo(o,i)}record(n,r=null){let o=this._reduceControls(n);return new Fh(o,r)}control(n,r,o){let i={};return this.useNonNullable?(pC(r)?i=r:(i.validators=r,i.asyncValidators=o),new Yo(n,F(y({},i),{nonNullable:!0}))):new Yo(n,r,o)}array(n,r,o){let i=n.map(s=>this._createControl(s));return new Ph(i,r,o)}_reduceControls(n){let r={};return Object.keys(n).forEach(o=>{r[o]=this._createControl(n[o])}),r}_createControl(n){if(n instanceof Yo)return n;if(n instanceof Qo)return n;if(Array.isArray(n)){let r=n[0],o=n.length>1?n[1]:null,i=n.length>2?n[2]:null;return this.control(r,o,i)}else return this.control(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var fY=(()=>{class e extends nL{group(n,r=null){return super.group(n,r)}control(n,r,o){return super.control(n,r,o)}array(n,r,o){return super.array(n,r,o)}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var pY=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Zr,useValue:n.callSetDisabledState??Ws}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({imports:[jC]})}return e})(),hY=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Hh,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:Zr,useValue:n.callSetDisabledState??Ws}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({imports:[jC]})}return e})();function rL(e,t){for(var n=-1,r=t.length,o=e.length;++n0&&n(a)?t>1?qC(a,t-1,n,r,o):ei(o,a):r||(o[o.length]=a)}return o}var ZC=qC;function _L(e){var t=e==null?0:e.length;return t?ZC(e,1):[]}var xL=_L;function TL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bt=TL;var SL="[object AsyncFunction]",ML="[object Function]",AL="[object GeneratorFunction]",NL="[object Proxy]";function RL(e){if(!bt(e))return!1;var t=Ft(e);return t==ML||t==AL||t==SL||t==NL}var ql=RL;var OL=me["__core-js_shared__"],Zl=OL;var KC=function(){var e=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function FL(e){return!!KC&&KC in e}var YC=FL;var PL=Function.prototype,kL=PL.toString;function LL(e){if(e!=null){try{return kL.call(e)}catch{}try{return e+""}catch{}}return""}var En=LL;var VL=/[\\^$.*+?()[\]{}|]/g,jL=/^\[object .+?Constructor\]$/,UL=Function.prototype,BL=Object.prototype,$L=UL.toString,HL=BL.hasOwnProperty,zL=RegExp("^"+$L.call(HL).replace(VL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function GL(e){if(!bt(e)||YC(e))return!1;var t=ql(e)?zL:jL;return t.test(En(e))}var QC=GL;function WL(e,t){return e?.[t]}var JC=WL;function qL(e,t){var n=JC(e,t);return QC(n)?n:void 0}var et=qL;var ZL=et(Object,"create"),In=ZL;function KL(){this.__data__=In?In(null):{},this.size=0}var XC=KL;function YL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var eE=YL;var QL="__lodash_hash_undefined__",JL=Object.prototype,XL=JL.hasOwnProperty;function eV(e){var t=this.__data__;if(In){var n=t[e];return n===QL?void 0:n}return XL.call(t,e)?t[e]:void 0}var tE=eV;var tV=Object.prototype,nV=tV.hasOwnProperty;function rV(e){var t=this.__data__;return In?t[e]!==void 0:nV.call(t,e)}var nE=rV;var oV="__lodash_hash_undefined__";function iV(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===void 0?oV:t,this}var rE=iV;function ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var aE=pV;function hV(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var uE=hV;function oi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var bE=AV;function NV(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=VV){var l=t?null:IE(e);if(l)return si(l);s=!1,o=Ql,u=new Yl}else u=t?[]:a;e:for(;++r-1&&e%1==0&&e-1&&e%1==0&&e<=sj}var li=aj;function uj(e){return e!=null&&li(e.length)&&!ql(e)}var ci=uj;var lj=Object.prototype;function cj(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||lj;return e===n}var di=cj;function dj(e,t){for(var n=-1,r=Array(e);++no?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:QE(e,t,n)}var JE=CU;var EU="\\ud800-\\udfff",IU="\\u0300-\\u036f",_U="\\ufe20-\\ufe2f",xU="\\u20d0-\\u20ff",TU=IU+_U+xU,SU="\\ufe0e\\ufe0f",MU="\\u200d",AU=RegExp("["+MU+EU+TU+SU+"]");function NU(e){return AU.test(e)}var uc=NU;function RU(e){return e.split("")}var XE=RU;var eI="\\ud800-\\udfff",OU="\\u0300-\\u036f",FU="\\ufe20-\\ufe2f",PU="\\u20d0-\\u20ff",kU=OU+FU+PU,LU="\\ufe0e\\ufe0f",VU="["+eI+"]",Yh="["+kU+"]",Qh="\\ud83c[\\udffb-\\udfff]",jU="(?:"+Yh+"|"+Qh+")",tI="[^"+eI+"]",nI="(?:\\ud83c[\\udde6-\\uddff]){2}",rI="[\\ud800-\\udbff][\\udc00-\\udfff]",UU="\\u200d",oI=jU+"?",iI="["+LU+"]?",BU="(?:"+UU+"(?:"+[tI,nI,rI].join("|")+")"+iI+oI+")*",$U=iI+oI+BU,HU="(?:"+[tI+Yh+"?",Yh,nI,rI,VU].join("|")+")",zU=RegExp(Qh+"(?="+Qh+")|"+HU+$U,"g");function GU(e){return e.match(zU)||[]}var sI=GU;function WU(e){return uc(e)?sI(e):XE(e)}var aI=WU;function qU(e){return function(t){t=Ct(t);var n=uc(t)?aI(t):void 0,r=n?n[0]:t.charAt(0),o=n?JE(n,1).join(""):t.slice(1);return r[e]()+o}}var uI=qU;var ZU=uI("toUpperCase"),lI=ZU;function KU(e){return lI(Ct(e).toLowerCase())}var cI=KU;function YU(e,t,n,r){var o=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++o]);++oa))return!1;var l=i.get(e),c=i.get(t);if(l&&c)return l==t&&c==e;var d=-1,f=!0,p=n&R$?new Yl:void 0;for(i.set(e,t),i.set(t,e);++d{class e extends Qs{getTranslation(n){return _({})}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),bc=class{},jH=(()=>{class e{handle(n){return n.key}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function Cc(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;let n=typeof e,r=typeof t,o,i,s;if(n==r&&n=="object")if(Array.isArray(e)){if(!Array.isArray(t))return!1;if((o=e.length)==t.length){for(i=0;i{ta(t[r])?r in e?n[r]=eg(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n):eg({},t)}function tg(e,t){let n=t.split(".");t="";do t+=n.shift(),dr(e)&&dr(e[t])&&(ta(e[t])||ng(e[t])||!n.length)?(e=e[t],t=""):n.length?t+=".":e=void 0;while(n.length);return e}function BH(e,t,n){let r=t.split("."),o=e;for(let i=0;i{class e extends Js{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(n,r){if(rg(n))return this.interpolateString(n,r);if(UH(n))return this.interpolateFunction(n,r)}interpolateFunction(n,r){return n(r)}interpolateString(n,r){return r?n.replace(this.templateMatcher,(o,i)=>{let s=tg(r,i);return dr(s)?s:o}):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Xs=class{},HH=(()=>{class e extends Xs{compile(n,r){return n}compileTranslations(n,r){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Oe(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),ea=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new ee;onLangChange=new ee;onDefaultLangChange=new ee},Q_=new E("ISOLATE_TRANSLATE_SERVICE"),J_=new E("USE_DEFAULT_LANG"),X_=new E("DEFAULT_LANGUAGE"),ex=new E("USE_EXTEND"),Ys=e=>Yt(e)?e:_(e),tx=(()=>{class e{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(n){this.store.defaultLang=n}get currentLang(){return this.store.currentLang}set currentLang(n){this.store.currentLang=n}get langs(){return this.store.langs}set langs(n){this.store.langs=n}get translations(){return this.store.translations}set translations(n){this.store.translations=n}constructor(n,r,o,i,s,a=!0,u=!1,l=!1,c){this.store=n,this.currentLoader=r,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.extend=l,u&&(this.store=new ea),c&&this.setDefaultLang(c)}setDefaultLang(n){if(n===this.defaultLang)return;let r=this.retrieveTranslations(n);typeof r<"u"?(this.defaultLang==null&&(this.defaultLang=n),r.pipe(Ie(1)).subscribe(()=>{this.changeDefaultLang(n)})):this.changeDefaultLang(n)}getDefaultLang(){return this.defaultLang}use(n){if(this.lastUseLanguage=n,n===this.currentLang)return _(this.translations[n]);this.currentLang||(this.currentLang=n);let r=this.retrieveTranslations(n);return Yt(r)?(r.pipe(Ie(1)).subscribe(()=>{this.changeLang(n)}),r):(this.changeLang(n),_(this.translations[n]))}changeLang(n){n===this.lastUseLanguage&&(this.currentLang=n,this.onLangChange.emit({lang:n,translations:this.translations[n]}),this.defaultLang==null&&this.changeDefaultLang(n))}retrieveTranslations(n){if(typeof this.translations[n]>"u"||this.extend)return this._translationRequests[n]=this._translationRequests[n]||this.loadAndCompileTranslations(n),this._translationRequests[n]}getTranslation(n){return this.loadAndCompileTranslations(n)}loadAndCompileTranslations(n){this.pending=!0;let r=this.currentLoader.getTranslation(n).pipe(Ri(1),Ie(1));return this.loadingTranslations=r.pipe(A(o=>this.compiler.compileTranslations(o,n)),Ri(1),Ie(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[n]=this.extend&&this.translations[n]?y(y({},o),this.translations[n]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),r}setTranslation(n,r,o=!1){let i=this.compiler.compileTranslations(r,n);(o||this.extend)&&this.translations[n]?this.translations[n]=eg(this.translations[n],i):this.translations[n]=i,this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}getLangs(){return this.langs}addLangs(n){let r=n.filter(o=>!this.langs.includes(o));r.length>0&&(this.langs=[...this.langs,...r])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(n,r,o){let i;if(n&&(i=this.runInterpolation(tg(n,r),o)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(tg(this.translations[this.defaultLang],r),o)),i===void 0){let s={key:r,translateService:this};typeof o<"u"&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return i!==void 0?i:r}runInterpolation(n,r){if(ng(n))return n.map(o=>this.runInterpolation(o,r));if(ta(n)){let o={};for(let i in n){let s=this.runInterpolation(n[i],r);s!==void 0&&(o[i]=s)}return o}else return this.parser.interpolate(n,r)}getParsedResult(n,r,o){if(r instanceof Array){let i={},s=!1;for(let u of r)i[u]=this.getParsedResultForKey(n,u,o),s=s||Yt(i[u]);if(!s)return i;let a=r.map(u=>Ys(i[u]));return Ni(a).pipe(A(u=>{let l={};return u.forEach((c,d)=>{l[r[d]]=c}),l}))}return this.getParsedResultForKey(n,r,o)}get(n,r){if(!dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(kt(o=>Ys(this.getParsedResult(o,n,r)))):Ys(this.getParsedResult(this.translations[this.currentLang],n,r))}getStreamOnTranslationChange(n,r){if(!dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return tt(Jt(()=>this.get(n,r)),this.onTranslationChange.pipe(De(o=>{let i=this.getParsedResult(o.translations,n,r);return Ys(i)})))}stream(n,r){if(!dr(n)||!n.length)throw new Error('Parameter "key" required');return tt(Jt(()=>this.get(n,r)),this.onLangChange.pipe(De(o=>{let i=this.getParsedResult(o.translations,n,r);return Ys(i)})))}instant(n,r){if(!dr(n)||n.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],n,r);return Yt(o)?Array.isArray(n)?n.reduce((i,s)=>(i[s]=s,i),{}):n:o}set(n,r,o=this.currentLang){BH(this.translations[o],n,rg(r)?this.compiler.compile(r,o):this.compiler.compileTranslations(r,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(n){this.defaultLang=n,this.onDefaultLangChange.emit({lang:n,translations:this.translations[n]})}reloadLang(n){return this.resetLang(n),this.loadAndCompileTranslations(n)}resetLang(n){delete this._translationRequests[n],delete this.translations[n]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let n=this.getBrowserCultureLang();return n?n.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(r){return new(r||e)(I(ea),I(Qs),I(Xs),I(Js),I(bc),I(J_),I(Q_),I(ex),I(X_))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var use=(()=>{class e{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(n,r){this.translate=n,this._ref=r}updateValue(n,r,o){let i=s=>{this.value=s!==void 0?s:n,this.lastKey=n,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,n,r);Yt(s)?s.subscribe(i):i(s)}this.translate.get(n,r).subscribe(i)}transform(n,...r){if(!n||!n.length)return n;if(Cc(n,this.lastKey)&&Cc(r,this.lastParams))return this.value;let o;if(dr(r[0])&&r.length)if(rg(r[0])&&r[0].length){let i=r[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(i)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else ta(r[0])&&(o=r[0]);return this.lastKey=n,this.lastParams=r,this.updateValue(n,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,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(r){return new(r||e)(b(tx,16),b(vt,16))};static \u0275pipe=Ro({name:"translate",type:e,pure:!1});static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var lse=(e={})=>Ar([e.loader||{provide:Qs,useClass:VH},e.compiler||{provide:Xs,useClass:HH},e.parser||{provide:Js,useClass:$H},e.missingTranslationHandler||{provide:bc,useClass:jH},ea,{provide:Q_,useValue:e.isolate},{provide:J_,useValue:e.useDefaultLang},{provide:ex,useValue:e.extend},{provide:X_,useValue:e.defaultLanguage},tx]);var zH="uiCulture",GH="CLX.LoginToken",WH="CLX.RefreshToken",qH="CLX.TokenExpire",fse=(()=>{class e{getLanguage(){return this.getValue(zH)}getAccessToken(){let n=this.getValue(GH);return n?n.replace(/^"+|"+$/g,""):null}getRefreshToken(){return this.getValue(WH)}getTokenExpire(){return this.getValue(qH)}getPayload(){let n=this.getAccessToken(),r=n?n.split(".")[1]:null,o=r?r.replace("-","+").replace("_","/"):null,i=JSON.parse(window.atob(o||""));return i.roles="holder_roles"in i?i.holder_roles:i.roles,i}getValue(n){return sessionStorage.getItem(n)||localStorage.getItem(n)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ZH(e){return typeof e=="function"?Sh(e):typeof e=="number"&&!isFinite(e)?isNaN(e)?"NaN":e>0?"Infinity":"-Infinity":JSON.stringify(e)}function KH(e){return e.map(function(t){var n=t.key,r=t.type;return"".concat(n,": ").concat(r.name)}).join("/")}function YH(e){return e.message!==void 0?e.message:"Invalid value ".concat(ZH(e.value)," supplied to ").concat(KH(e.context))}function QH(e){return e.map(YH)}function JH(){return["No errors!"]}var nx={report:Fl(QH,JH)};var og=class extends Error{constructor(){super(...arguments),this.name="DecodeError"}};function XH(e){return t=>Jn(e.decode(t),Fl(n=>An(()=>new og(nx.report(Ol(n)).join(` +`))),n=>_(n)))}function bse(e){return XH(Pe(e))}export{y as a,F as b,ux as c,Ec as d,O as e,J as f,Ae as g,Si as h,Ix as i,_x as j,Ee as k,_ as l,An as m,A as n,Aa as o,le as p,Jt as q,$x as r,Ni as s,$c as t,Xt as u,Kx as v,Yx as w,ke as x,Jx as y,e0 as z,t0 as A,Rn as B,kt as C,Xg as D,On as E,Ie as F,n0 as G,nm as H,i0 as I,Fn as J,Oa as K,Wc as L,Ri as M,s0 as N,Fa as O,De as P,a0 as Q,Pa as R,we as S,u0 as T,l0 as U,w as V,Re as W,C as X,$t as Y,E as Z,I as _,v as $,Ye as aa,rt as ba,Au as ca,pt as da,o9 as ea,i9 as fa,s9 as ga,a9 as ha,Oe as ia,Mf as ja,je as ka,zn as la,ee as ma,be as na,St as oa,u9 as pa,sy as qa,xe as ra,gt as sa,Or as ta,l9 as ua,tS as va,Dy as wa,ES as xa,c9 as ya,b as za,ZS as Aa,Gi as Ba,xo as Ca,ot as Da,kr as Ea,h9 as Fa,g9 as Ga,m9 as Ha,wD as Ia,zt as Ja,H as Ka,Ro as La,Ce as Ma,v9 as Na,np as Oa,UA as Pa,un as Qa,Lr as Ra,aN as Sa,Wu as Ta,y9 as Ua,D9 as Va,w9 as Wa,b9 as Xa,C9 as Ya,E9 as Za,I9 as _a,_9 as $a,jD as ab,UD as bb,sp as cb,BD as db,$D as eb,EN as fb,x9 as gb,_N as hb,mt as ib,T9 as jb,S9 as kb,M9 as lb,PN as mb,GD as nb,WD as ob,A9 as pb,qD as qb,ZD as rb,N9 as sb,R9 as tb,O9 as ub,F9 as vb,LN as wb,KD as xb,VN as yb,jN as zb,UN as Ab,BN as Bb,P9 as Cb,$N as Db,HN as Eb,k9 as Fb,L9 as Gb,He as Hb,V9 as Ib,j9 as Jb,U9 as Kb,B9 as Lb,$9 as Mb,H9 as Nb,z9 as Ob,G9 as Pb,W9 as Qb,q9 as Rb,ss as Sb,vt as Tb,Zn as Ub,cR as Vb,Oo as Wb,yt as Xb,vR as Yb,Z9 as Zb,Be as _b,us as $b,kR as ac,QR as bc,y7 as cc,D7 as dc,w7 as ec,b7 as fc,C7 as gc,E7 as hc,I7 as ic,lO as jc,dO as kc,jr as lc,Yn as mc,bw as nc,Tp as oc,cl as pc,bO as qc,V7 as rc,j7 as sc,kw as tc,iZ as uc,rF as vc,L as wc,ws as xc,Cs as yc,Dn as zc,nh as Ac,zr as Bc,kF as Cc,Nl as Dc,Qw as Ec,TZ as Fc,SZ as Gc,MZ as Hc,tK as Ic,ce as Jc,W as Kc,$ as Lc,Y as Mc,he as Nc,Yb as Oc,aK as Pc,uK as Qc,Pe as Rc,dt as Sc,cK as Tc,ks as Uc,dK as Vc,pK as Wc,yK as Xc,Tb as Yc,Vs as Zc,xK as _c,TK as $c,SK as ad,MK as bd,AK as cd,NK as dd,RK as ed,FK as fd,UK as gd,BK as hd,Cn as id,lk as jd,gC as kd,nr as ld,iC as md,iY as nd,sY as od,Nk as pd,uY as qd,Fk as rd,lY as sd,kk as td,jk as ud,Bk as vd,Hk as wd,Gk as xd,kC as yd,cY as zd,dY as Ad,Qk as Bd,Xk as Cd,tL as Dd,fY as Ed,pY as Fd,hY as Gd,xL as Hd,Jh as Id,UB as Jd,M$ as Kd,AH as Ld,RH as Md,BV as Nd,FH as Od,LH as Pd,Qs as Qd,tx as Rd,use as Sd,lse as Td,fse as Ud,XH as Vd,bse as Wd}; diff --git a/public/apps/webapp-schulverwaltung/chunk-PFRWXAMB.js b/public/apps/webapp-schulverwaltung/chunk-PFRWXAMB.js deleted file mode 100644 index b73f16c2..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-PFRWXAMB.js +++ /dev/null @@ -1 +0,0 @@ -import{a as pe,b as Pe}from"./chunk-37I3VMAS.js";import{a as bn}from"./chunk-QE74EW6O.js";import{a as _n,b as vn}from"./chunk-NK7SMC5C.js";import{b as Pn}from"./chunk-SWPDWQYJ.js";import{a as Cn}from"./chunk-DQSLVCJO.js";import{e as fn}from"./chunk-AXC265QM.js";import{q as gn,v as ye}from"./chunk-LY5STZD6.js";import{a as ct}from"./chunk-RC3KCROY.js";import{b as zt,c as Xt,e as Qe}from"./chunk-TMXWSOGF.js";import{a as rn}from"./chunk-UPTESATB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import{a as yn}from"./chunk-KV3V2W4Q.js";import{c as at,g as un}from"./chunk-LZEJSWWW.js";import{a as cn}from"./chunk-UN6AN2DI.js";import{a as an,b as pn}from"./chunk-CXJU4L5R.js";import"./chunk-M5HHSMYB.js";import{a as Sn}from"./chunk-EJNJ2ZNZ.js";import{C as ve,D as sn,F as st,H as hn,g as Zt,h as He,l as qe,m as en,n as tn,o as rt,u as nn,y as on}from"./chunk-W6XALPR5.js";import{d as se}from"./chunk-XBIMNMBY.js";import{e as Jt,o as Yt}from"./chunk-A7CCEKNQ.js";import{g as z,j as ce}from"./chunk-2AZMKO7X.js";import{a as We,b as be,f as ln,g as dn,h as mn}from"./chunk-HLAFRD2O.js";import{h as At,i as Rt,j as Ge,k as Gt,l as Nt,m as Ut,o as Ht,p as qt,q as Le,r as re,x as Kt,z as Ue}from"./chunk-QTBTUQ3W.js";import{a as _e}from"./chunk-HVJBOTRL.js";import{$a as a,$b as Ot,Ab as G,Ac as Re,B as ht,Bb as Y,Bd as oe,C as Ct,Cb as Q,D as tt,Db as ue,Dd as ot,Eb as ke,F as O,Fb as ne,Ga as D,Gb as $t,H as Be,Id as Ne,Jb as p,Jd as $e,K as _t,Kb as m,L as vt,Lb as U,M as E,N as nt,Na as L,Nd as Wt,O as je,P as T,Pd as K,Qa as x,Qd as V,R as q,Ra as J,Sa as Pt,Sd as Qt,Ta as Ve,Uc as Bt,Va as k,X as R,Xa as St,Xb as Dt,Ya as B,Za as j,_,_a as c,a as le,ab as W,b as de,cc as ie,da as bt,dc as ge,dd as H,ea as v,eb as S,f as $,fa as b,g as me,gb as C,gd as jt,h as we,hb as f,ia as yt,jd as Vt,kc as it,kd as fe,l as Z,lb as X,ld as he,ma as te,mc as Fe,n as u,nb as xt,nd as Ft,o as M,ob as It,od as Ce,pb as wt,qb as Mt,rb as d,s as Me,sb as I,tb as y,u as ft,ub as Tt,vb as kt,w as ee,wb as Lt,x as Te,xc as Ae,ya as s,yc as Et,za as h}from"./chunk-S3H6YSFW.js";function xn(n,r){return+z(n)<+z(r)}function In(n,r){return+z(n)==+z(r)}function wn(n,r,e){let t=+z(n,e?.in),[i,o]=[+z(r.start,e?.in),+z(r.end,e?.in)].sort((l,g)=>l-g);return t>=i&&t<=o}function Mn(n,r,e){let t=r.map(o=>({eventId:o,group:n})),i=e.map(o=>t.find(l=>l.eventId===o.eventId)||o);return[...new Set([...i,...t])].filter(o=>o.group!==null)}var Ke=(()=>{class n extends nn{static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=yt(n)))(i||n)}})()}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();function Tn(n,r){return[...n].sort(oi(r))}function oi(n){return(r,e)=>{switch(n.primarySortKey){case"name":{let t=r.name.localeCompare(e.name);return n.ascending?t*-1:t}case"group":{let t=(r.detail.Value||"").localeCompare(e.detail.Value||"");return n.ascending?t*-1:t}}}}function kn(n,r){return n.map(e=>ri(e,r))}function ri(n,r){return{id:n.IdPerson,name:r.find(e=>e.StudentRef.Id===n.IdPerson)?.StudentFullName||"",group:n.Value,detail:n}}function Ln(n,r){return n.filter(e=>e.VssId===r.subscriptionDetailGroupId)}function pt(n,r){return n.find(e=>e.VssId===r.subscriptionDetailGroupId)}var si=(n,r)=>r.id;function ci(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit,o=f();return b(o.onSelectionChange(i))}),a(),c(2,"label",6),d(3),a()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","group-",t,""),x("checked",e.id===i.selected.id)("value",e.id),s(),X("for","group-",t,""),s(),y(" ",e.label," ")}}var De=function(n){return n.Select="select",n.Assign="assign",n}(De||{}),$n=(()=>{class n{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}static{this.\u0275fac=function(t){return new(t||n)(h(re),h(K))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-group-dialog"]],inputs:{dialogMode:"dialogMode",subscriptionDetailsDefinitions:"subscriptionDetailsDefinitions",group:"group"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","groups",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,ci,4,7,"div",1,si),a()(),c(7,"div",2)(8,"button",3),C("click",function(){return i.activeModal.dismiss()}),d(9),p(10,"translate"),a(),c(11,"button",4),C("click",function(){return i.activeModal.close(i.getSelectedGroup())}),d(12),p(13,"translate"),a()()),t&2&&(s(2),y(" ",m(3,3,i.title)," "),s(3),j(i.groupOptions),s(4),y(" ",m(10,5,"presence-control.groups.cancel")," "),s(3),y(" ",m(13,7,"presence-control.groups.save")," "))},dependencies:[oe,Ce,fe,he,V],encapsulation:2})}}return n})();function Dn(n,r){return n===null&&r===null||n!==null&&r!==null&&n.TeacherInformation===r.TeacherInformation&&n.LessonDateTimeFrom.getTime()===r.LessonDateTimeFrom.getTime()&&n.LessonDateTimeTo.getTime()===r.LessonDateTimeTo.getTime()}function On(n){let r=new dt(n.TeacherInformation,n.LessonDateTimeFrom,n.LessonDateTimeTo);return r.addLesson(n),r}var dt=class{constructor(r,e,t){this.TeacherInformation=r,this.LessonDateTimeFrom=e,this.LessonDateTimeTo=t,this.lessons=[]}addLesson(r){this.lessons.some(e=>qe(e,r))||(this.lessons.push(r),this.updateId(),this.updateStudyClassNumbers(),this.updateEventDesignations())}getIds(){return[...new Set(this.lessons.map(r=>r.LessonRef.Id))]}getEventIds(){return[...new Set(this.lessons.map(r=>r.EventRef.Id))]}updateId(){this.id=[...new Set(this.lessons.map(r=>r.LessonRef.Id).sort())].join("-")}updateStudyClassNumbers(){this.studyClassNumbers=[...new Set(this.lessons.map(r=>r.StudyClassNumber).sort((r,e)=>r.localeCompare(e)))].join(", ")}updateEventDesignations(){this.eventDesignations=[...new Set(this.lessons.map(r=>r.EventDesignation).sort())].join(", ")}};function En(n){return ai(n).reduce((r,e)=>{let t=r.find(o=>Dn(o,e));if(t)return t.addLesson(e),r;let i=On(e);return[...r,i]},[]).sort(rt)}function Bn(n){if(n.length===0)return null;let r=new Date;if(n=[...n].sort(rt),Xt(r,n[0].LessonDateTimeFrom)){for(let e of n)if(xn(r,e.LessonDateTimeFrom)||wn(r,{start:e.LessonDateTimeFrom,end:e.LessonDateTimeTo}))return e;return n[n.length-1]}return n[0]}function ai(n){return n.reduce((r,e)=>r.some(t=>qe(t,e))?r:[...r,e],[])}function jn(n,r,e,t){return n.map(i=>{let o=r.find(l=>pi(l.presence,i));if(o){let l;return!o.newPresenceTypeId&&i.Comment?l=e.find(g=>g.IsComment)||null:l=e.find(g=>g.Id===o.newPresenceTypeId)||null,de(le({},i),{TypeRef:li(l),Date:null,Type:l?l.Designation:null,ConfirmationStateId:He(l,t)})}return i})}function pi(n,r){return n.LessonRef.Id===r.LessonRef.Id&&n.StudentRef.Id===r.StudentRef.Id}function li(n){return{Id:n?n.Id:null,HRef:null}}function Xe(n){return r=>r.reduce((e,t)=>e+(t.presenceCategory===n?1:0),0)}function Vn(){return n=>n.reduce((r,e)=>r+(e.precedingAbsences&&e.precedingAbsences.length>0?1:0),0)}var Fn=(()=>{class n extends We{constructor(e,t){super(e,t,at,"LessonTeachers")}loadOtherTeachersLessonAbsences(e,t,i){let o=`${this.baseUrl}/except/${e}/LessonAbsences?expand=LessonRef`;return t&&t.length>0&&(o=o.concat("&filter.StudentRef=;"+t.join(";"))),this.http.get(o,{params:i}).pipe(T(Wt(at)))}static{this.\u0275fac=function(t){return new(t||n)(_(Fe),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ye=(()=>{class n extends We{constructor(e,t){super(e,t,gn,"SubscriptionDetails")}getListForEvent(e){return this.getList({params:{IdEvent:String(e)}})}update(e,t){let i={IdPerson:t.IdPerson,EventId:t.EventId,Value:e};return this.http.put(`${this.baseUrl}/${t.Id}`,i).pipe(u(()=>{}))}static{this.\u0275fac=function(t){return new(t||n)(_(Fe),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Rn="presence-control-group",ae=(()=>{class n{constructor(e,t,i,o,l){this.userSettings=e,this.eventService=t,this.subscriptionDetailsService=i,this.loadingService=o,this.settings=l,this.selectGroup$=new $,this.selectedLesson$=new we,this.lessonPresences$=new we,this.reloadSubscriptionDetails$=new $,this.defaultGroup=null,this.savedGroup$=this.selectedLesson$.pipe(T(g=>this.userSettings.getPresenceControlGroupView().pipe(u(w=>this.findGroupByLesson(w,g))))),this.group$=ee(this.selectGroup$,this.savedGroup$).pipe(je(this.defaultGroup),E(1)),this.loading$=this.loadingService.loading(Rn),this.subscriptionDetailsDefinitions$=this.selectedLesson$.pipe(u(g=>g?.getEventIds()||[]),T(g=>Me(g.map(w=>this.eventService.getSubscriptionDetailsDefinitions(w)))),E(1)),this.groupsAvailability$=this.subscriptionDetailsDefinitions$.pipe(u(g=>g.every(w=>pt(w,this.settings))),E(1)),this.subscriptionDetails$=M([this.selectedLesson$,this.groupsAvailability$,this.reloadSubscriptionDetails$.pipe(u(()=>!1),je(!0))]).pipe(T(([g,w,F])=>g&&w?this.loadSubscriptionDetailsForLesson(g,F):Z([])),u(g=>Ln(g,this.settings)),E(1)),this.subscriptionDetailPersonIds$=M([this.group$,this.subscriptionDetails$]).pipe(u(([g,w])=>w.filter(F=>F.Value===g).map(F=>F.IdPerson)),je([]))}selectGroup(e){this.selectGroup$.next(e)}setSelectedLesson(e){this.selectedLesson$.next(e)}setLessonPresences(e){this.lessonPresences$.next(e)}getSubscriptionDetailsDefinitions(){return this.subscriptionDetailsDefinitions$.pipe(u(ot),u(e=>pt(e,this.settings)))}getSubscriptionDetailsForStudents(){return M([this.subscriptionDetails$,this.lessonPresences$]).pipe(u(se(kn)))}reloadSubscriptionDetails(){this.reloadSubscriptionDetails$.next(void 0)}loadSubscriptionDetailsForLesson(e,t=!0){return this.loadingService.load(Me($e(e.getEventIds()).map(i=>this.subscriptionDetailsService.getListForEvent(i))),t?void 0:Rn).pipe(u(ot))}findGroupByLesson(e,t){return e.find(o=>o.eventId===t?.getEventIds()[0])?.group||this.defaultGroup}static{this.\u0275fac=function(t){return new(t||n)(_(Pe),_(bn),_(Ye),_(ce),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var Un=Object.values(pe),N=(()=>{class n{constructor(e,t,i,o,l,g,w,F,Se,xe){this.userSettings=e,this.lessonPresencesService=t,this.lessonTeacherService=i,this.presenceTypesService=o,this.groupService=l,this.dropDownItemsService=g,this.loadingService=w,this.storageService=F,this.settings=Se,this.location=xe,this.selectedDateSubject$=new me(new Date),this.selectedDate$=this.selectedDateSubject$.asObservable().pipe(u(P=>Jt(P)),Be(Ne)),this.viewModeSubject$=new $,this.viewMode$=ee(this.viewModeSubject$,this.userSettings.getPresenceControlViewMode().pipe(O(1))),this.lessons$=this.selectedDate$.pipe(T(P=>this.loadLessonsByDate(P)),E(1)),this.selectLessonId$=new $,this.selectLesson$=this.selectLessonId$.pipe(T(P=>this.getLessonById(P))),this.selectedLesson$=M([ln(this.selectLesson$.pipe(Be((P,Ie)=>Ne(P,Ie))),dn(this.settings.lessonPresencesRefreshTime)),this.lessons$]).pipe(u(([P,Ie])=>Ie.find(ni=>ni.id===P.id)?P:null),E(1)),this.studyClassCount$=this.selectedLesson$.pipe(u(P=>P?.lessons.length||0)),this.updateLessonPresences$=new $,this.reloadLessonPresences$=new $,this.lessonPresences$=ee(mn(this.selectedLesson$,this.reloadLessonPresences$).pipe(T(P=>P?this.loadLessonPresencesByLesson(P):Z([]))),this.updateLessonPresences$).pipe(E(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(E(1)),this.reloadStudentIdsWithUnconfirmedAbsences$=new $,this.studentIdsWithUnconfirmedAbsences$=ee(this.selectedDate$,this.selectedLesson$.pipe(nt(1)),this.reloadStudentIdsWithUnconfirmedAbsences$).pipe(T(()=>this.loadStudentIdsWithUnconfirmedAbsences()),E(1)),this.loading$=this.loadingService.loading$,this.absenceConfirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(E(1)),this.studentIds$=this.lessonPresences$.pipe(u(P=>$e(P.map(Ie=>Ie.StudentRef.Id))),E(1)),this.otherTeachersAbsences$=this.studentIds$.pipe(Be(Ne),T(P=>P.length>0?this.lessonTeacherService.loadOtherTeachersLessonAbsences(this.getMyself(),P):Z([])),E(1)),this.groupsAvailability$=this.groupService.groupsAvailability$,this.presenceControlEntries$=M([this.selectedLesson$,this.lessonPresences$,this.presenceTypes$,this.absenceConfirmationStates$,this.otherTeachersAbsences$]).pipe(u(se(en))),this.presenceControlEntriesByGroup$=M([this.groupService.group$,this.presenceControlEntries$,this.groupService.subscriptionDetailPersonIds$]).pipe(u(se(Pn)),E(1)),this.presentCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("present"))),this.absentCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("absent"))),this.unapprovedCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("unapproved"))),this.absentPrecedingCount$=this.presenceControlEntriesByGroup$.pipe(u(Vn())),this.queryParamsString$=M([this.selectedDate$,this.selectedLesson$,this.viewMode$]).pipe(u(se(this.buildQueryParams.bind(this))),u(pn)),this.destroy$=new $,this.queryParamsString$.pipe(q(this.destroy$)).subscribe(P=>{this.location.replaceState("/presence-control",P),this.confirmBackLinkParams={returnparams:P}}),this.viewMode$.pipe(nt(1),T(P=>this.userSettings.savePresenceControlViewMode(P)),q(this.destroy$)).subscribe(),this.selectedLesson$.pipe(q(this.destroy$)).subscribe(P=>{this.groupService.setSelectedLesson(P)}),this.lessonPresences$.pipe(q(this.destroy$)).subscribe(P=>this.groupService.setLessonPresences(P))}ngOnDestroy(){this.destroy$.next()}setDate(e){this.selectedDateSubject$.next(e)}setLessonId(e){this.selectLessonId$.next(e)}setViewMode(e){this.viewModeSubject$.next(e)}updateLessonPresencesTypes(e){M([this.lessonPresences$.pipe(O(1)),this.presenceTypes$.pipe(O(1))]).pipe(u(([t,i])=>jn(t,e,i,this.settings))).subscribe(t=>this.updateLessonPresences$.next(t))}getNextPresenceType(e){return this.presenceTypes$.pipe(O(1),u(t=>e.getNextPresenceType(t)))}hasUnconfirmedAbsences(e){return this.studentIdsWithUnconfirmedAbsences$.pipe(u(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(u(En))}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.presenceTypes$)}loadStudentIdsWithUnconfirmedAbsences(){return ft(0,this.settings.unconfirmedAbsencesRefreshTime||-1).pipe(T(()=>this.lessonPresencesService.getListOfUnconfirmed()),u(e=>$e(e.map(t=>t.StudentRef.Id))))}buildQueryParams(e,t,i){let o={date:Yt(e,"yyyy-MM-dd"),viewMode:i};return t&&(o.lesson=String(t.id)),o}getLessonById(e){let t=String(e);return this.lessons$.pipe(u(i=>t&&i.find(o=>o.id===t)||Bn(i)),Te(Boolean))}getMyself(){let e=this.storageService.getPayload();return Number(e?.holder_id||e?.id_person)}static{this.\u0275fac=function(t){return new(t||n)(_(Pe),_(Qe),_(Fn),_(ve),_(ae),_(rn),_(ce),_(Qt),_(H),_(Dt))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var fi=(n,r)=>r.id,hi=()=>[],Ci=()=>["/presence-control"];function _i(n,r){if(n&1&&(c(0,"span",12),d(1),a()),n&2){let e=f().$implicit,t=f(),i=Q(0);s(),I(t.getSortDirectionCharacter(i,e))}}function vi(n,r){if(n&1){let e=S();c(0,"div",11),C("click",function(){let i=v(e).$implicit,o=f();return b(o.toggleSort(i))}),d(1),p(2,"translate"),L(3,_i,2,1,"span",12),a()}if(n&2){let e=r.$implicit;f();let t=Q(0);x("className",e),s(),y(" ",m(2,3,"presence-control.groups.list.header."+e)," "),s(2),k(t?3:-1)}}function bi(n,r){n&1&&W(0,"bkd-spinner")}function yi(n,r){n&1&&W(0,"bkd-spinner",18)}function Pi(n,r){if(n&1){let e=S();c(0,"div",13)(1,"div",14)(2,"input",15,0),p(4,"async"),C("change",function(){let i=v(e).$implicit,o=f(2);return b(o.selectionService.toggle(i))}),a()(),c(5,"div",16),d(6),a(),c(7,"div",17)(8,"span"),d(9),a(),L(10,yi,1,0,"bkd-spinner",18),p(11,"async"),a()()}if(n&2){let e=r.$implicit,t=f(2);s(2),x("checked",m(4,4,t.selectionService.isSelected$(e))),s(4),y(" ",e.name," "),s(3),I(e.group?e.group:""),s(),k(m(11,6,t.groupService.loading$)?10:-1)}}function Si(n,r){if(n&1&&B(0,Pi,12,8,"div",13,fi),n&2){f();let e=Q(2);j(e)}}var Wn=(()=>{class n{constructor(e,t,i,o,l,g,w,F,Se){this.route=e,this.state=t,this.selectionService=i,this.groupService=o,this.userSettings=l,this.subscriptionDetailService=g,this.toastService=w,this.translate=F,this.modalService=Se,this.primarySortKeys=["name","group"],this.backlinkQueryParams$=this.route.queryParams.pipe(u(({returnparams:xe})=>xe),u(an)),this.eventIds$=this.state.selectedLesson$.pipe(u(xe=>xe?.getEventIds()||[])),this.sortCriteriaSubject$=new me({primarySortKey:"name",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=M([this.groupService.getSubscriptionDetailsForStudents(),this.sortCriteria$]).pipe(u(se(Tn))),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){M([this.groupService.getSubscriptionDetailsDefinitions(),this.groupService.group$]).pipe(O(1)).subscribe(([i,o])=>{let l=this.modalService.open($n);l.componentInstance.dialogMode=e,l.componentInstance.subscriptionDetailsDefinitions=i,l.componentInstance.group=o,l.result.then(g=>{t(g)},()=>{})})}selectCallback(e){M([this.eventIds$,this.userSettings.getPresenceControlGroupView()]).pipe(O(1),T(([t,i])=>this.userSettings.savePresenceControlGroupView(Mn(e.id,t,i))),u(()=>e.id)).subscribe(t=>this.groupService.selectGroup(t))}assignCallback(e){Me(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(O(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}static{this.\u0275fac=function(t){return new(t||n)(h(Ae),h(N),h(Ke),h(ae),h(Pe),h(Ye),h(_e),h(K),h(ye))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-group"]],features:[ue([Ke])],decls:33,vars:32,consts:[["checkbox",""],[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"],[3,"click","className"],[1,"sort-direction"],[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"],[1,"inline","small"]],template:function(t,i){if(t&1){let o=S();G(0),p(1,"async"),G(2),p(3,"async"),G(4),p(5,"async"),G(6),p(7,"async"),c(8,"div"),W(9,"bkd-backlink",1),p(10,"async"),c(11,"h1"),d(12),p(13,"translate"),a(),c(14,"div",2)(15,"div",3)(16,"span",4),d(17),p(18,"translate"),a(),c(19,"button",5),C("click",function(){return v(o),b(i.selectGroup())}),d(20),p(21,"translate"),p(22,"translate"),a()(),c(23,"a",6),C("click",function(){return v(o),b(i.assignGroup())}),c(24,"i",7),d(25,"edit"),a()()(),c(26,"div",8)(27,"div",9),B(28,vi,4,5,"div",10,St),a(),L(30,bi,1,0,"bkd-spinner"),p(31,"async"),L(32,Si,2,0),a()()}if(t&2){let o;Y(m(1,8,i.sortCriteria$)),s(2),Y(m(3,11,i.sortedEntries$));let l=(o=m(5,14,i.selectionService.selection$))!==null&&o!==void 0?o:ke(30,hi),g=m(7,16,i.groupService.group$);s(7),x("link",ke(31,Ci))("params",m(10,18,i.backlinkQueryParams$)),s(3),I(m(13,20,"presence-control.groups.title")),s(5),I(m(18,22,"presence-control.groups.show")),s(3),y(" ",g?m(21,24,"presence-control.groups.group")+" "+g:m(22,26,"presence-control.groups.all")," "),s(3),J("disabled",l.length===0),s(5),j(i.primarySortKeys),s(2),k(m(31,28,i.state.loading$)?30:32)}},dependencies:[hn,be,ie,V],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})}}return n})();var xi=(n,r)=>r.entry.id;function Ii(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit;return b(i.selected=!i.selected)}),a(),c(2,"label",6)(3,"i"),d(4),a(),c(5,"div",7),d(6),p(7,"date"),p(8,"date"),a()()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","lesson-presence-",t,""),x("checked",e.selected),s(),J("fw-bold",i.isCurrentLesson(e)),X("for","lesson-presence-",t,""),s(),Ve("",e.entry.presenceCategory," material-icons pe-2"),s(),I(e.entry.presenceCategoryIcon),s(2),kt(" ",U(7,14,e.entry.lessonPresence.LessonDateTimeFrom,"HH:mm"),"\u2013",U(8,17,e.entry.lessonPresence.LessonDateTimeTo,"HH:mm")," ",e.entry.lessonPresence.EventDesignation," ")}}var Qn=(()=>{class n{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 In(e.entry.lessonPresence.LessonDateTimeFrom,this.entry.lessonPresence.LessonDateTimeFrom)}buildLessonPresenceOptions(){return this.blockPresenceControlEntries.map(e=>({entry:e,selected:this.entry.confirmationState===e.confirmationState}))}static{this.\u0275fac=function(t){return new(t||n)(h(re))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-block-lesson-component"]],inputs:{entry:"entry",blockPresenceControlEntries:"blockPresenceControlEntries"},decls:15,vars:11,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label","d-flex",3,"for"],[1,"d-block","text-truncate"]],template:function(t,i){if(t&1){let o=S();c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,Ii,9,20,"div",1,xi),a()(),G(7),c(8,"div",2)(9,"button",3),C("click",function(){return v(o),b(i.activeModal.close())}),d(10),p(11,"translate"),a(),c(12,"button",4),C("click",function(){v(o);let g=Q(7);return b(i.activeModal.close(g))}),d(13),p(14,"translate"),a()()}if(t&2){s(2),y(" ",m(3,4,"presence-control.block-lesson.text")," "),s(3),j(i.blockLessonOptions),s(2);let o=Y(i.getSelectedEntries());s(3),y(" ",m(11,7,"presence-control.block-lesson.cancel")," "),s(2),x("disabled",o.length===0),s(),y(" ",m(14,9,"presence-control.block-lesson.save")," ")}},dependencies:[oe,Ce,fe,he,ge,V],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}"]})}}return n})();var wi=30;function gt(n){return`blockLesson${n.lessonPresence.Id}`}var Ze=(()=>{class n{constructor(e,t,i,o){this.state=e,this.lessonPresencesService=t,this.loadingService=i,this.settings=o}getBlockLessonPresenceControlEntries(e){return M([this.state.lessons$.pipe(O(1)),this.loadChangeableLessonPresences(e),this.state.presenceTypes$.pipe(O(1)),this.state.absenceConfirmationStates$.pipe(O(1)),this.state.otherTeachersAbsences$.pipe(O(1))]).pipe(u(([t,i,o,l,g])=>this.filterBlockLessonPresences(e,i).map(w=>tn(t.find(F=>F.id===w.LessonRef.Id.toString()),w,o,l,g))))}filterBlockLessonPresences(e,t){return[...t].sort((i,o)=>i.LessonDateTimeFrom>o.LessonDateTimeFrom?1:-1).reduce((i,o)=>{let l=i[i.length-1];return this.isWithinBlockTime(o,l)?(i.push(o),i):i.find(g=>g.Id===e.lessonPresence.Id)?i:[o]},[])}isWithinBlockTime(e,t){return t?e.LessonDateTimeFrom.getTime()-t.LessonDateTimeTo.getTime()<=wi*60*1e3:!0}loadChangeableLessonPresences(e){return M([this.loadLessonPresences(e),this.state.presenceTypes$.pipe(O(1))]).pipe(u(([t,i])=>t.filter(o=>Zt(o,i.find(l=>l.Id===o.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(u(t=>t.filter(i=>i.TeacherInformation===e.lessonPresence.TeacherInformation))),gt(e))}static{this.\u0275fac=function(t){return new(t||n)(_(N),_(Qe),_(ce),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var Ti=(n,r)=>r.Id;function ki(n,r){if(n&1&&(c(0,"div"),d(1),p(2,"date"),p(3,"date"),p(4,"addSpace"),a()),n&2){let e=r.$implicit;s(),Lt(" ",U(2,5,e.LessonRef.From,"HH:mm"),"\u2013",U(3,8,e.LessonRef.To,"HH:mm")," ",e.LessonRef.EventDesignation,"",U(4,11,":",":")," ",e.Type," ")}}var Kn=(()=>{class n{constructor(e){this.activeModal=e}static{this.\u0275fac=function(t){return new(t||n)(h(re))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-preceding-absence"]],inputs:{precedingAbsences:"precedingAbsences"},decls:10,vars:6,consts:[[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),B(4,ki,5,14,"div",null,Ti),a(),c(6,"div",1)(7,"button",2),C("click",function(){return i.activeModal.dismiss()}),d(8),p(9,"translate"),a()()),t&2&&(s(2),y(" ",m(3,2,"presence-control.preceding-absence.text")," "),s(2),j(i.precedingAbsences),s(4),y(" ",m(9,4,"presence-control.preceding-absence.cancel")," "))},dependencies:[ge,V,un],encapsulation:2})}}return n})();var Li=n=>["student",n,"absences"],$i=n=>["/presence-control/student",n,"absences"];function Di(n,r){if(n&1&&(W(0,"bkd-avatar",0),p(1,"async")),n&2){let e=f();x("studentId",m(1,3,e.studentId$))("link",ne(5,$i,e.entry.lessonPresence.StudentRef.Id.toString()))("linkParams",e.profileReturnParams)}}function Oi(n,r){if(n&1&&(c(0,"span"),d(1),a()),n&2){let e=f(2);s(),I(e.entry.presenceType==null?null:e.entry.presenceType.Designation)}}function Ei(n,r){if(n&1){let e=S();c(0,"button",12),C("click",function(){v(e);let i=f();return b(i.updatePresenceType(i.entry))}),L(1,Oi,2,1,"span"),a()}if(n&2){let e=f();s(),k(e.entry.presenceType!=null&&e.entry.presenceType.IsIncident?-1:1)}}function Bi(n,r){n&1&&W(0,"bkd-spinner",5)}function ji(n,r){if(n&1){let e=S();c(0,"button",13),C("click",function(){v(e);let i=f();return b(i.showPrecedingAbsences(i.entry))}),c(1,"i",14),d(2,"info"),a()()}}function Vi(n,r){if(n&1&&(c(0,"span",9),d(1),a()),n&2){let e=f();s(),y(" ",e.entry.lessonPresence.StudyClassNumber," ")}}function Fi(n,r){if(n&1){let e=S();c(0,"a",15),C("click",function(){v(e);let i=f();return b(i.updateIncident(i.entry))}),c(1,"i",4),d(2,"edit"),a(),c(3,"span"),d(4),p(5,"translate"),a()()}if(n&2){let e=f();s(4),I(m(5,1,(e.entry.presenceType==null?null:e.entry.presenceType.IsIncident)&&(e.entry.presenceType==null?null:e.entry.presenceType.Designation)||"presence-control.entry.incident"))}}var zn=(()=>{class n{get classNames(){return[this.entry.presenceCategory,this.viewMode].join(" ")}constructor(e,t,i,o){this.toastService=e,this.translate=t,this.modalService=i,this.loadingService=o,this.hasUnconfirmedAbsences=!1,this.showClassName=!1,this.togglePresenceType=new te,this.changeIncident=new te,this.entry$=new we(1),this.studentId$=this.entry$.pipe(u(({lessonPresence:l})=>l.StudentRef.Id)),this.loading$=this.entry$.pipe(T(l=>this.loadingService.loading(gt(l))))}ngOnChanges(e){e.entry&&this.entry$.next(e.entry.currentValue)}get isListViewMode(){return this.viewMode===pe.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(Kn);t.componentInstance.precedingAbsences=e.precedingAbsences}static{this.\u0275fac=function(t){return new(t||n)(h(_e),h(K),h(ye),h(ce))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-entry"]],hostVars:2,hostBindings:function(t,i){t&2&&Pt(i.classNames)},inputs:{entry:"entry",hasUnconfirmedAbsences:"hasUnconfirmedAbsences",viewMode:"viewMode",showClassName:"showClassName",profileReturnParams:"profileReturnParams"},outputs:{togglePresenceType:"togglePresenceType",changeIncident:"changeIncident"},features:[bt],decls:18,vars:20,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],["type","button",1,"presence-category","designation","btn","btn-link"],["type","button",1,"presence-category","status","btn","btn-link",3,"click","disabled"],[1,"position-relative"],[1,"material-icons"],[1,"inline","small"],["type","button",1,"previously-absent","d-flex","btn","btn-link"],[1,"student-info",3,"routerLink","queryParams"],[1,"student-name","text-truncate"],[1,"study-class","text-truncate"],[1,"unconfirmed-absences"],[1,"incident","btn","btn-link"],["type","button",1,"presence-category","designation","btn","btn-link",3,"click"],["type","button",1,"previously-absent","d-flex","btn","btn-link",3,"click"],[1,"material-icons-outlined"],[1,"incident","btn","btn-link",3,"click"]],template:function(t,i){if(t&1){let o=S();L(0,Di,2,7,"bkd-avatar",0)(1,Ei,2,1,"button",1),G(2),p(3,"async"),c(4,"button",2),C("click",function(){return v(o),b(i.updatePresenceType(i.entry))}),c(5,"div",3)(6,"i",4),d(7),a(),L(8,Bi,1,0,"bkd-spinner",5),a()(),L(9,ji,3,0,"button",6),c(10,"a",7)(11,"span",8),d(12),a(),L(13,Vi,2,1,"span",9),c(14,"span",10),d(15),p(16,"translate"),a()(),L(17,Fi,6,3,"a",11)}if(t&2){k(i.isListViewMode?-1:0),s(),k(i.entry.showDesignation?1:-1);let o=m(3,14,i.loading$);s(3),x("disabled",o),s(2),J("invisible",o),s(),I(i.entry.presenceCategoryIcon),s(),k(o?8:-1),s(),k(i.entry.precedingAbsences!=null&&i.entry.precedingAbsences.length?9:-1),s(),x("routerLink",ne(18,Li,i.entry.lessonPresence.StudentRef.Id))("queryParams",i.profileReturnParams),s(2),I(i.entry.lessonPresence.StudentFullName),s(),k(i.isListViewMode&&i.showClassName?13:-1),s(2),y(" ",i.hasUnconfirmedAbsences?m(16,16,"presence-control.entry.unconfirmed-absences"):""," "),s(2),k(i.entry.canChangeIncident?17:-1)}},dependencies:[fn,be,Re,ie,V],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}}']})}}return n})();var Ai=(n,r)=>r.viewMode,Ri=(n,r)=>r.id,Gi=(n,r)=>({"btn-link":n,"btn-danger":r}),Ni=n=>["groups",n],Ui=n=>({returnparams:n});function Hi(n,r){if(n&1){let e=S();c(0,"div",22),C("click",function(){v(e);let i=f();return b(i.lessonDropdown==null?null:i.lessonDropdown.toggle())}),d(1),p(2,"date"),c(3,"span",23),d(4),p(5,"date"),a()()}if(n&2){let e=f();s(),y(" ",U(2,2,e.selectedLesson.LessonDateTimeFrom,"HH:mm"),"\u2013"),s(3),I(U(5,5,e.selectedLesson.LessonDateTimeTo,"HH:mm"))}}function qi(n,r){if(n&1){let e=S();c(0,"div",28),C("click",function(){let i=v(e).$implicit,o=f(2);return b(o.selectLessonChange.emit(i))}),c(1,"div",29)(2,"div"),d(3),p(4,"date"),p(5,"date"),a(),c(6,"div",25),d(7),a(),c(8,"div",25),d(9),a()()()}if(n&2){let e=r.$implicit,t=f(2);J("active",e.id===t.selectedLesson.id),s(3),Tt(" ",U(4,6,e.LessonDateTimeFrom,"HH:mm"),"\u2013",U(5,9,e.LessonDateTimeTo,"HH:mm")," "),s(4),y(" ",e.eventDesignations," "),s(2),y(" ",e.studyClassNumbers," ")}}function Wi(n,r){if(n&1&&(c(0,"div",7)(1,"div",24)(2,"div",25),d(3),a(),c(4,"div",25),d(5),a()(),c(6,"div",26),B(7,qi,10,12,"div",27,Ri),a()()),n&2){let e=f();s(3),I(e.selectedLesson.eventDesignations),s(2),I(e.selectedLesson.studyClassNumbers),s(2),j(e.lessons)}}function Qi(n,r){if(n&1){let e=S();c(0,"bkd-caret",30),C("click",function(){v(e);let i=f();return b(i.lessonDropdown==null?null:i.lessonDropdown.toggle())}),a()}if(n&2){let e=f();x("expanded",(e.lessonDropdown==null?null:e.lessonDropdown.isOpen())||!1)}}function Ki(n,r){if(n&1&&(c(0,"a",19),p(1,"async"),p(2,"async"),p(3,"async"),c(4,"i",31),d(5,"groups"),a()()),n&2){let e=f();x("ngClass",$t(9,Gi,m(1,3,e.isGroupSelected$)===!1,m(2,5,e.isGroupSelected$)))("routerLink",ne(12,Ni,e.selectedLesson.id))("queryParams",ne(14,Ui,m(3,7,e.state.queryParamsString$)))}}function zi(n,r){if(n&1){let e=S();c(0,"button",32),C("click",function(){let i=v(e).$implicit,o=f();return b(o.viewModeChange.emit(i.viewMode))}),c(1,"i",31),d(2),a()()}if(n&2){let e=r.$implicit,t=f();J("btn-outline-secondary",e.viewMode===t.viewMode)("btn-link",e.viewMode!==t.viewMode)("active",e.viewMode===t.viewMode),x("disabled",!t.selectedLesson),s(2),I(e.icon)}}var Ji=Le.prototype._positionMenu;Le.prototype._positionMenu=function(...r){let e=Ji.apply(this,r);if(this._anchor.nativeElement.id==="lesson-dropdown"){let t=this._bodyContainer||this._menu.nativeElement,i=t.style.transform?.match(/translate\(([0-9-.]+)px, ([0-9-.]+)px\)/);i&&parseFloat(i[1])<0&&(t.style.transform=`translate(0px, ${i[2]}px)`)}return e};var Jn=(()=>{class n{constructor(e,t,i){this.state=e,this.groupService=t,this.presentCount=null,this.absentCount=null,this.unapprovedCount=null,this.absentPrecedingCount=null,this.search="",this.selectLessonChange=new te,this.selectDateChange=new te,this.searchChange=new te,this.viewModeChange=new te,this.viewModeOptions=[{viewMode:pe.List,icon:"list"},{viewMode:pe.Grid,icon:"view_module"}],this.isGroupSelected$=this.groupService.group$.pipe(u(Kt)),i.popperOptions=o=>de(le({},o),{modifiers:o.modifiers?.map(l=>(l.name==="offset"&&(l.options={offset:({placement:g,reference:w,popper:F})=>g==="bottom-start"?[(window.innerWidth-F.width)/2-w.x,0]:[]}),l))})}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(ae),h(Ge))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-header"]],viewQuery:function(t,i){if(t&1&&xt(Le,5),t&2){let o;It(o=wt())&&(i.lessonDropdown=o.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"},features:[ue([Ge,{provide:At,useClass:Nt},{provide:Rt,useClass:yn}])],decls:41,vars:19,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"],[1,"lesson-time"],["ngbDropdown","","container","body","display","dynamic","placement","bottom",1,"lesson-description"],[1,"dropdown-caret",3,"expanded"],[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",1,"group","btn","me-2","me-sm-4",3,"ngClass","routerLink","queryParams"],[1,"views"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"disabled","btn-outline-secondary","btn-link","active"],[1,"lesson-time",3,"click"],[1,"lesson-time-to"],["id","lesson-dropdown","ngbDropdownToggle",""],[1,"text-truncate"],["ngbDropdownMenu","","aria-labelledby","lesson-dropdown"],["ngbDropdownItem","",3,"active"],["ngbDropdownItem","",3,"click"],[1,"lesson-entry"],[1,"dropdown-caret",3,"click","expanded"],[1,"material-icons","align-middle"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"click","disabled"]],template:function(t,i){if(t&1){let o=S();c(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){v(o);let g=Mt(6);return b(g.toggle())}),c(3,"i",4),d(4,"calendar_today"),a()(),c(5,"input",5,0),C("ngModelChange",function(g){return v(o),b(i.selectDateChange.emit(g))}),a()(),L(7,Hi,6,8,"div",6)(8,Wi,9,2,"div",7)(9,Qi,1,1,"bkd-caret",8),a(),c(10,"div",9)(11,"div",10)(12,"i",4),d(13,"check_circle"),a(),c(14,"span",11),d(15),a()(),c(16,"div",12)(17,"i",4),d(18,"cancel"),a(),c(19,"span",11),d(20),a()(),c(21,"div",13)(22,"i",4),d(23,"help"),a(),c(24,"span",11),d(25),a()(),c(26,"div",14)(27,"i",15),d(28,"info"),a(),c(29,"span",11),d(30),a()()(),c(31,"div",16)(32,"bkd-resettable-input",17),p(33,"translate"),p(34,"translate"),C("valueChange",function(g){return v(o),b(i.searchChange.emit(g))}),a(),c(35,"div",18),L(36,Ki,6,16,"a",19),p(37,"async"),c(38,"div",20),B(39,zi,3,8,"button",21,Ai),a()()()}t&2&&(s(5),x("ngModel",i.selectDate),s(2),k(i.selectedLesson?7:-1),s(),k(i.selectedLesson?8:-1),s(),k(i.lessons.length>0?9:-1),s(6),I(i.presentCount!==null?i.presentCount:"?"),s(5),I(i.absentCount!==null?i.absentCount:"?"),s(5),I(i.unapprovedCount!==null?i.unapprovedCount:"?"),s(5),I(i.absentPrecedingCount!==null?i.absentPrecedingCount:"?"),s(2),x("value",i.search)("disabled",!i.selectedLesson)("placeholder",m(33,13,"presence-control.header.search-by-name"))("label",m(34,15,"presence-control.header.search")),s(4),k(m(37,17,i.selectedLesson&&i.state.groupsAvailability$)?36:-1),s(3),j(i.viewModeOptions))},dependencies:[Gt,oe,jt,Vt,Ft,Le,qt,Ht,Ut,cn,_n,Ot,Re,ie,ge,V],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}}']})}}return n})();var Xi=(n,r)=>r.id;function Yi(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit,o=f();return b(o.onSelectionChange(i))}),a(),c(2,"label",6),d(3),a()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","incident-",t,""),x("checked",e.id===i.selected.id)("value",e.id),s(),X("for","incident-",t,""),s(),y(" ",e.label," ")}}var Xn=(()=>{class n{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}static{this.\u0275fac=function(t){return new(t||n)(h(re),h(K))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-incident"]],inputs:{incident:"incident",incidentTypes:"incidentTypes"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","incident",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,Yi,4,7,"div",1,Xi),a()(),c(7,"div",2)(8,"button",3),C("click",function(){return i.activeModal.dismiss()}),d(9),p(10,"translate"),a(),c(11,"button",4),C("click",function(){return i.activeModal.close(i.getSelectedIncident())}),d(12),p(13,"translate"),a()()),t&2&&(s(2),y(" ",m(3,3,"presence-control.incident.text")," "),s(3),j(i.incidentOptions),s(4),y(" ",m(10,5,"presence-control.incident.cancel")," "),s(3),y(" ",m(13,7,"presence-control.incident.save")," "))},dependencies:[oe,Ce,fe,he,V],styles:["form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #dee2e6;padding-bottom:1rem;margin-bottom:1rem}"]})}}return n})();var Zi=20,eo=100,Ee=function(n){return n.AddUpdateAction="ADD",n.RemoveUpdateAction="REMOVE",n}(Ee||{}),et=(()=>{class n{constructor(e,t,i,o,l){this.toastService=e,this.translate=t,this.restService=i,this.presenceTypesService=o,this.settings=l,this.destroy$=new $,this.action$=new $,this.pendingUpdates$=this.action$.pipe(_t(this.reduceUpdates.bind(this),[]),vt()),this.revertUpdates$=new $,this.performUpdates$=this.pendingUpdates$.pipe(tt(eo),Te(Ue(st)),Ct(this.performUpdates.bind(this))),this.stateUpdates$=ee(this.pendingUpdates$,this.revertUpdates$).pipe(tt(Zi),Te(Ue(st))),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 M(Object.keys(t).reduce((i,o)=>{let l=t[o];return Object.keys(l).forEach(g=>{let w=l[g];i.push(this.performUpdateForGroup(w))}),i},[])).pipe(u(()=>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,i=null){return i?(i?this.presenceTypesService.getPresenceType(i):Z(null)).pipe(T(l=>this.restService.editLessonPresences([e],t,l?.Id,He(l,this.settings)||void 0,{context:new it().set(ct,{disableErrorHandling:!0})}))):this.restService.removeLessonPresences([e],t,{context:new it().set(ct,{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(i=>de(le({},i),{newPresenceTypeId:i.presence.TypeRef.Id}))),Z(void 0)}groupUpdates(e){return e.reduce((t,i)=>{let o=String(i.newPresenceTypeId&&i.newPresenceTypeId);return t[o]||(t[o]={}),Array.isArray(t[o][i.presence.LessonRef.Id])||(t[o][i.presence.LessonRef.Id]=[]),t[o][i.presence.LessonRef.Id].push(i),t},{})}reduceUpdates(e,t){switch(t.type){case Ee.AddUpdateAction:{let{presence:i,newPresenceTypeId:o}=t.payload,l=e.findIndex(Yn(i));return l===-1?[...e,{presence:i,newPresenceTypeId:o}]:[...e.slice(0,l),{presence:e[l].presence,newPresenceTypeId:o},...e.slice(l+1)]}case Ee.RemoveUpdateAction:return e.filter(Ue(Yn(t.payload)));default:return e}}dispatchAddUpdate(e,t){this.action$.next({type:Ee.AddUpdateAction,payload:{presence:e,newPresenceTypeId:t}})}dispatchRemoveUpdate(e){this.action$.next({type:Ee.RemoveUpdateAction,payload:e})}static{this.\u0275fac=function(t){return new(t||n)(_(_e),_(K),_(sn),_(ve),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Yn(n){return r=>r.presence.LessonRef.Id===n.LessonRef.Id&&r.presence.StudentRef.Id===n.StudentRef.Id}var to=(n,r)=>r.id,no=()=>[],io=n=>({returnparams:n});function oo(n,r){n&1&&W(0,"bkd-spinner")}function ro(n,r){n&1&&(c(0,"p",1),d(1),p(2,"translate"),a()),n&2&&(s(),I(m(2,1,"presence-control.no-lessons")))}function so(n,r){n&1&&(c(0,"p",1),d(1),p(2,"translate"),a()),n&2&&(s(),y(" ",m(2,1,"presence-control.no-lesson-presences")," "))}function co(n,r){if(n&1){let e=S();c(0,"bkd-presence-control-entry",4),p(1,"async"),p(2,"async"),p(3,"async"),p(4,"async"),C("togglePresenceType",function(i){v(e);let o=f(3);return b(o.togglePresenceType(i))})("changeIncident",function(i){v(e);let o=f(3);return b(o.changeIncident(i))}),a()}if(n&2){let e,t=r.$implicit,i=f(3);x("entry",t)("hasUnconfirmedAbsences",m(1,5,i.state.hasUnconfirmedAbsences(t)))("viewMode",m(2,7,i.state.viewMode$))("showClassName",((e=m(3,9,i.state.studyClassCount$))!==null&&e!==void 0?e:0)>1)("profileReturnParams",ne(13,io,m(4,11,i.state.queryParamsString$)))}}function ao(n,r){if(n&1&&(c(0,"div"),p(1,"async"),B(2,co,5,15,"bkd-presence-control-entry",3,to),a()),n&2){let e=f(2),t=Q(4);Ve("default-entries entries view-mode-",m(1,3,e.state.viewMode$),""),s(2),j(t)}}function po(n,r){if(n&1){let e=S();c(0,"bkd-presence-control-header",0),p(1,"async"),p(2,"async"),p(3,"async"),p(4,"async"),p(5,"async"),p(6,"async"),p(7,"async"),C("searchChange",function(i){v(e);let o=f();return b(o.search$.next(i))})("viewModeChange",function(i){v(e);let o=f();return b(o.state.setViewMode(i))})("selectDateChange",function(i){v(e);let o=f();return b(o.state.setDate(i))})("selectLessonChange",function(i){v(e);let o=f();return b(o.state.setLessonId(i.id))}),a(),L(8,ro,3,3,"p",1)(9,so,3,3,"p",1)(10,ao,4,5,"div",2)}if(n&2){let e=f(),t=Q(0),i=Q(2),o=Q(4);x("selectedLesson",t)("lessons",i)("presentCount",m(1,10,e.state.presentCount$))("absentCount",m(2,12,e.state.absentCount$))("unapprovedCount",m(3,14,e.state.unapprovedCount$))("absentPrecedingCount",m(4,16,e.state.absentPrecedingCount$))("viewMode",m(5,18,e.state.viewMode$))("selectDate",m(6,20,e.state.selectedDate$))("search",m(7,22,e.search$)),s(8),k(t?o.length===0?9:10:8)}}var lo=["studentFullName"],ei=(()=>{class n{constructor(e,t,i,o,l,g,w){this.state=e,this.blockLessons=t,this.lessonPresencesUpdateService=i,this.presenceTypesService=o,this.modalService=l,this.scrollPosition=g,this.route=w,this.search$=new me(""),this.entries$=M([this.state.presenceControlEntriesByGroup$,this.search$]).pipe(u(([F,Se])=>vn(F,lo,Se)),E(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(i=>this.lessonPresencesUpdateService.updatePresenceType(t,i?i.Id:null)))}togglePresenceType(e){this.blockLessons.getBlockLessonPresenceControlEntries(e).pipe(O(1)).subscribe(t=>{if(t.length===1){let i=t[0];this.doTogglePresenceType([i])}else{let i=this.modalService.open(Qn);i.componentInstance.entry=e,i.componentInstance.blockPresenceControlEntries=t,i.result.then(o=>{o&&this.doTogglePresenceType(o)},()=>{})}})}updateIncident(e,t){this.lessonPresencesUpdateService.updatePresenceType(e,t)}changeIncident(e){this.presenceTypesService.incidentTypes$.subscribe(t=>{let i=this.modalService.open(Xn);i.componentInstance.incident=t.find(o=>o.Id===e.presenceType?.Id)||null,i.componentInstance.incidentTypes=t,i.result.then(o=>{this.updateIncident(e,o?.Id||null)},()=>{})})}restoreStateFromParams(e){e.date&&this.state.setDate(Bt(e.date));let t=String(e.lesson);t&&this.state.setLessonId(t),e.viewMode&&Un.includes(e.viewMode)&&this.state.setViewMode(e.viewMode)}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(Ze),h(et),h(ve),h(ye),h(Sn),h(Ae))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-list"]],decls:12,vars:16,consts:[[3,"searchChange","viewModeChange","selectDateChange","selectLessonChange","selectedLesson","lessons","presentCount","absentCount","unapprovedCount","absentPrecedingCount","viewMode","selectDate","search"],[1,"mt-3"],[3,"class"],[3,"entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"],[3,"togglePresenceType","changeIncident","entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"]],template:function(t,i){if(t&1&&(G(0),p(1,"async"),G(2),p(3,"async"),G(4),p(5,"async"),c(6,"h1"),d(7),p(8,"translate"),a(),L(9,oo,1,0,"bkd-spinner"),p(10,"async"),L(11,po,11,24)),t&2){let o;Y(m(1,2,i.state.selectedLesson$)),s(2),Y(m(3,5,i.state.lessons$)),s(2),Y((o=m(5,8,i.entries$))!==null&&o!==void 0?o:ke(15,no)),s(3),I(m(8,11,"presence-control.title")),s(2),k(m(10,13,i.state.loading$)?9:11)}},dependencies:[Jn,zn,be,ie,V],styles:["bkd-presence-control-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.entries.view-mode-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{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})}}return n})();var ti=(()=>{class n{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()}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(et))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control"]],features:[ue([N,Ze,ae,on,{provide:zt,useExisting:N}])],decls:1,vars:0,template:function(t,i){t&1&&W(0,"router-outlet")},dependencies:[Et],encapsulation:2,changeDetection:0})}}return n})();var sc=[{path:"",component:ti,children:[{path:"",component:ei,data:{restoreScrollPositionFrom:["/presence-control/student/:id/addresses","/presence-control/student/:id/absences","/presence-control/student/:id/grades"]}},Cn,{path:"groups/:id",component:Wn}]}];export{sc as PRESENCE_CONTROL_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-PMHSF6LH.js b/public/apps/webapp-schulverwaltung/chunk-PMHSF6LH.js new file mode 100644 index 00000000..fea2ed9c --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-PMHSF6LH.js @@ -0,0 +1 @@ +import{b as a,c as b}from"./chunk-6W5EYLX6.js";import"./chunk-FGETUL3R.js";import"./chunk-LQUABKN6.js";import"./chunk-FN7XEGJE.js";import"./chunk-SME4UDGV.js";import"./chunk-GCWE54XA.js";import"./chunk-DJNW6R6G.js";import"./chunk-N2RKIMWO.js";import"./chunk-FMUJPUYQ.js";import"./chunk-SKUS47ZU.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import"./chunk-ETZGBBG5.js";import"./chunk-2ZRHGKSY.js";import"./chunk-26VH6QDS.js";import"./chunk-JGKXAFYO.js";import"./chunk-A7EOJZ46.js";import"./chunk-ZELJ2QPT.js";import"./chunk-KQORGECX.js";import"./chunk-K42F6AEW.js";import"./chunk-NC6UEGAF.js";import"./chunk-SL67CYEF.js";import"./chunk-HQSONWXM.js";import"./chunk-RXRYDGZR.js";import"./chunk-F4XODHS2.js";import"./chunk-NEW5VGRB.js";export{b as EVENTS_ROUTES,a as getStudentsRoute}; diff --git a/public/apps/webapp-schulverwaltung/chunk-PUOZNCOL.js b/public/apps/webapp-schulverwaltung/chunk-PUOZNCOL.js new file mode 100644 index 00000000..b8bd7688 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-PUOZNCOL.js @@ -0,0 +1,2 @@ +import{a as Ve,b as qe}from"./chunk-6W5EYLX6.js";import{b as X}from"./chunk-QB4CDTWV.js";import"./chunk-FGETUL3R.js";import"./chunk-LQUABKN6.js";import{a as Ge}from"./chunk-Y3BQLEPF.js";import"./chunk-FN7XEGJE.js";import{a as He}from"./chunk-SME4UDGV.js";import"./chunk-GCWE54XA.js";import{l as Ue}from"./chunk-DJNW6R6G.js";import"./chunk-N2RKIMWO.js";import{e as J}from"./chunk-FMUJPUYQ.js";import{b as Fe}from"./chunk-SKUS47ZU.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import"./chunk-ETZGBBG5.js";import"./chunk-2ZRHGKSY.js";import{d as Ne,f as B,g as ze}from"./chunk-26VH6QDS.js";import"./chunk-JGKXAFYO.js";import{d as Be}from"./chunk-A7EOJZ46.js";import"./chunk-ZELJ2QPT.js";import{D as we,g as Oe,h as Le}from"./chunk-KQORGECX.js";import"./chunk-K42F6AEW.js";import{e as re,o as Ie}from"./chunk-NC6UEGAF.js";import{i as je}from"./chunk-SL67CYEF.js";import{a as Z,h as Q}from"./chunk-HQSONWXM.js";import{x as Ae}from"./chunk-RXRYDGZR.js";import"./chunk-F4XODHS2.js";import{$ as l,$a as ue,Cc as Te,Dc as Pe,Eb as k,Ec as W,Fb as F,Gb as N,Hb as ye,Ia as v,Ib as I,La as me,M as y,Mc as De,Nb as o,Nc as $e,Nd as ke,O as le,Ob as r,Od as Me,P as T,Pa as m,Pb as M,Ra as te,Rb as ve,Sa as f,Sc as Y,Sd as D,Ta as he,Ud as Ee,Wd as Re,X as L,Xa as h,_a as be,a as z,ab as d,b as U,bb as c,cb as g,d as se,ea as V,fa as q,fb as ie,fc as Se,g as ce,ga as pe,gb as fe,gc as R,h as de,hc as G,hd as A,ib as w,jb as u,kb as _e,l as E,lb as Ce,mc as ae,n as b,o as H,qc as K,ub as ne,vb as p,vc as xe,wb as x,xa as j,xb as S,ya as n,yb as oe,zb as ge}from"./chunk-NEW5VGRB.js";var Ke=Y({Id:$e,Holder:De});var We=(()=>{class e extends Z{constructor(){let i=l(K),t=l(A);super(i,t,Ke,"TeacherSubstitutions")}getTeacherSubstitution(i){return this.getList({params:{"filter.Id":`=${i}`}}).pipe(b(t=>t[0]||null))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var lt=["LessonTeacherRole","ClassTeacherRole","TeacherRole","AbsenceAdministratorRole"],pt=["LessonTeacherRole","TeacherRole","StudentRole","SubstituteAdministratorRole"],mt=["LessonTeacherRole","StudentRole"],$=(()=>{class e{constructor(){this.settingsService=l(X),this.lessonPresencesService=l(J),this.studentsService=l(B),this.courseService=l(Ue),this.teacherSubstitutionService=l(We),this.personService=l(Fe),this.storageService=l(Ee),this.settings=l(A),this.rolesAndPermissions$=this.settingsService.getRolesAndPermissions(),this.userId$=new de(1),this.lessonAbsences$=this.userId$.pipe(T(t=>this.studentsService.getLessonAbsences(t)),y(1)),this.lessonIncidents$=this.userId$.pipe(T(t=>this.studentsService.getLessonIncidents(t)),y(1)),this.loading$=this.rolesAndPermissions$.pipe(b(t=>t==null)),this.hasSearch$=this.rolesAndPermissions$.pipe(b(this.hasRoles(lt))),this.hasActions$=this.rolesAndPermissions$.pipe(b(this.hasRoles(pt))),this.hasTimetable$=this.rolesAndPermissions$.pipe(b(this.hasRoles(mt))),this.hasLessonTeacherRole$=this.rolesAndPermissions$.pipe(b(this.hasRoles(["LessonTeacherRole"])),y(1)),this.hasTeacherRole$=this.rolesAndPermissions$.pipe(b(this.hasRoles(["TeacherRole"])),y(1)),this.hasStudentRole$=this.rolesAndPermissions$.pipe(b(this.hasRoles(["StudentRole"])),y(1)),this.hasSubstituteAdministratorRole$=this.rolesAndPermissions$.pipe(b(this.hasRoles(["SubstituteAdministratorRole"])),y(1)),this.editAbsencesCount$=this.hasLessonTeacherRole$.pipe(T(t=>t?this.lessonPresencesService.checkableAbsencesCount():E(!1)),y(1)),this.openAbsencesCount$=this.rolesAndPermissions$.pipe(b(this.hasRoles(["LessonTeacherRole","ClassTeacherRole"])),T(t=>t?this.lessonPresencesService.getListOfUnconfirmed():E([])),b(t=>t.length),y(1)),this.myAbsencesCount$=this.hasStudentRole$.pipe(T(t=>t?this.getMyAbsences():E([])),b(this.getMyAbsencesCount.bind(this)),y(1)),this.coursesToRateCount$=this.courseService.getNumberOfCoursesForRating().pipe(le(0),y(1)),this.hasPresenceControl$=this.hasLessonTeacherRole$.pipe(T(t=>t?this.lessonPresencesService.hasLessonsLessonTeacher():E(!1)),y(1)),this.hasOpenAbsences$=this.openAbsencesCount$.pipe(b(t=>t>0),y(1)),this.editAbsencesParams$=this.getFullName().pipe(b(t=>({confirmationStates:this.settings.checkableAbsenceStateId,teacher:t})),y(1));let i=this.storageService.getPayload()?.id_person;i&&this.userId$.next(Number(i))}hasRoles(i){return t=>(t??[]).some(a=>i.includes(a))}getMyAbsences(){return H([this.userId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(T(([i,t,a])=>this.loadTimetableEntries(i,t,a).pipe(b(_=>[...t,...a].map(C=>this.withTimetableEntry(C,_)).filter(Ae)))))}getMyAbsencesCount(i){return i?.filter(t=>("ConfirmationStateId"in t?t.ConfirmationStateId:null)===this.settings.unconfirmedAbsenceStateId).length||0}getFullName(){let i=Number(this.storageService.getPayload()?.substitution_id)||null;return i?this.teacherSubstitutionService.getTeacherSubstitution(i).pipe(b(t=>t?.Holder)):this.personService.getMyself().pipe(b(t=>t.FullName))}withTimetableEntry(i,t){return t.find(a=>a.Id===i.LessonRef.Id)?i:null}loadTimetableEntries(i,t,a){return this.studentsService.getTimetableEntries(i,{"filter.Id":`;${[...t,...a].map(_=>_.LessonRef.Id).join(";")}`})}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=L({token:e,factory:e.\u0275fac})}}return e})();var ht=["*"];function bt(e,s){e&1&&ie(0)}function ut(e,s){if(e&1&&(d(0,"a",1),m(1,bt,1,0,"ng-container",3),c()),e&2){let i=u(),t=ne(3);f("routerLink",i.link)("queryParams",i.linkParams),n(),f("ngTemplateOutlet",t)}}function ft(e,s){e&1&&ie(0)}function _t(e,s){if(e&1&&(d(0,"a",2),m(1,ft,1,0,"ng-container",3),c()),e&2){let i=u(),t=ne(3);f("href",i.externalLink,j),n(),f("ngTemplateOutlet",t)}}function Ct(e,s){if(e&1&&(d(0,"span",5),p(1),c()),e&2){let i=u(2);n(),x(i.count)}}function gt(e,s){e&1&&(pe(),d(0,"svg",6),g(1,"path",7),c())}function yt(e,s){if(e&1&&(d(0,"span",4),p(1),o(2,"translate"),c(),d(3,"div"),Ce(4),m(5,Ct,2,1,"span",5)(6,gt,2,0,":svg:svg",6),c()),e&2){let i=u();n(),x(r(2,2,i.label)),n(4),h(i.hasCount(i.count)?5:6)}}var Ye=(()=>{class e{constructor(){}hasCount(i){return typeof i=="number"&&i>=0}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-action"]],inputs:{label:"label",count:"count",link:"link",linkParams:"linkParams",externalLink:"externalLink"},ngContentSelectors:ht,decls:4,vars:2,consts:[["actionContent",""],[3,"routerLink","queryParams"],[3,"href"],[4,"ngTemplateOutlet"],[1,"label"],[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(t,a){t&1&&(_e(),m(0,ut,2,3,"a",1)(1,_t,2,2,"a",2)(2,yt,7,4,"ng-template",null,0,ve)),t&2&&(h(a.externalLink?-1:0),n(),h(a.externalLink?1:-1))},dependencies:[W,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}"]})}}return e})();var Ze=(()=>{class e{constructor(){}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-deadline"]],inputs:{count:"count"},decls:3,vars:8,template:function(t,a){t&1&&(p(0),o(1,"translate"),o(2,"addSpace")),t&2&&ge("",r(1,3,"dashboard.actions.deadline"),"",M(2,5,": ",":"),"",a.count,` +`)},dependencies:[D,ze],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}"]})}}return e})();var vt=()=>["/presence-control"],St=()=>["/edit-absences"],xt=()=>["/open-absences"],Tt=()=>["/events"],Pt=()=>["/my-absences","report"],Dt=()=>["/my-absences"];function $t(e,s){e&1&&g(0,"bkd-dashboard-action",0),e&2&&f("label","dashboard.actions.presence-control")("link",I(2,vt))}function kt(e,s){if(e&1&&(g(0,"bkd-dashboard-action",1),o(1,"async"),o(2,"async")),e&2){let i=u();f("label","dashboard.actions.edit-absences")("link",I(8,St))("linkParams",r(1,4,i.dashboardService.editAbsencesParams$))("count",r(2,6,i.dashboardService.editAbsencesCount$))}}function Mt(e,s){if(e&1&&(g(0,"bkd-dashboard-action",2),o(1,"async")),e&2){let i=u();f("label","dashboard.actions.open-absences")("link",I(5,xt))("count",r(1,3,i.dashboardService.openAbsencesCount$))}}function Et(e,s){if(e&1&&(g(0,"bkd-dashboard-deadline",4),o(1,"async")),e&2){let i=u(2);f("count",r(1,1,i.dashboardService.coursesToRateCount$))}}function Rt(e,s){if(e&1&&(d(0,"bkd-dashboard-action",0),m(1,Et,2,3,"bkd-dashboard-deadline",4),o(2,"async"),c()),e&2){let i,t=u();f("label","dashboard.actions.tests")("link",I(5,Tt)),n(),h((i=r(2,3,t.dashboardService.coursesToRateCount$))!==null&&i!==void 0&&i?1:-1)}}function At(e,s){e&1&&g(0,"bkd-dashboard-action",0),e&2&&f("label","dashboard.actions.my-absences-report")("link",I(2,Pt))}function Ot(e,s){if(e&1&&(g(0,"bkd-dashboard-action",2),o(1,"async")),e&2){let i=u();f("label","dashboard.actions.my-absences")("link",I(5,Dt))("count",r(1,3,i.dashboardService.myAbsencesCount$))}}function It(e,s){if(e&1&&g(0,"bkd-dashboard-action",3),e&2){let i=u();f("label","dashboard.actions.substitutions")("externalLink",i.substitutionsAdminLink)}}var Je=(()=>{class e{constructor(){this.dashboardService=l($),this.settings=l(A)}get substitutionsAdminLink(){return this.settings.dashboard.substitutionsAdminLink}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-actions"]],decls:15,vars:23,consts:[[3,"label","link"],[3,"label","link","linkParams","count"],[3,"label","link","count"],[3,"label","externalLink"],[3,"count"]],template:function(t,a){t&1&&(m(0,$t,1,3,"bkd-dashboard-action",0),o(1,"async"),m(2,kt,3,9,"bkd-dashboard-action",1),o(3,"async"),o(4,"async"),m(5,Mt,2,6,"bkd-dashboard-action",2),o(6,"async"),m(7,Rt,3,6,"bkd-dashboard-action",0),o(8,"async"),m(9,At,1,3,"bkd-dashboard-action",0),o(10,"async"),m(11,Ot,2,6,"bkd-dashboard-action",2),o(12,"async"),m(13,It,1,2,"bkd-dashboard-action",3),o(14,"async")),t&2&&(h(r(1,7,a.dashboardService.hasPresenceControl$)?0:-1),n(2),h(r(3,9,a.dashboardService.hasLessonTeacherRole$)&&r(4,11,a.dashboardService.editAbsencesParams$)?2:-1),n(3),h(r(6,13,a.dashboardService.hasOpenAbsences$)?5:-1),n(2),h(r(8,15,a.dashboardService.hasTeacherRole$)?7:-1),n(2),h(r(10,17,a.dashboardService.hasStudentRole$)?9:-1),n(2),h(r(12,19,a.dashboardService.hasStudentRole$)?11:-1),n(2),h(r(14,21,a.dashboardService.hasSubstituteAdministratorRole$)?13:-1))},dependencies:[Ye,Ze,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}"]})}}return e})();var Qe=(()=>{class e{constructor(){this.studentsRestService=l(B),this.router=l(Pe)}navigateToDossier(i){return se(this,null,function*(){let t=Number(i);yield this.router.navigate(["dashboard","student",t,"addresses"])})}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-search"]],decls:1,vars:2,consts:[[3,"valueChange","typeaheadService","placeholder"]],template:function(t,a){t&1&&(d(0,"bkd-typeahead",0),w("valueChange",function(C){return C&&a.navigateToDossier(C)}),c()),t&2&&f("typeaheadService",a.studentsRestService)("placeholder","dashboard.search.placeholder")},dependencies:[Ge],styles:["[_nghost-%COMP%]{display:block;padding:.75rem;background:#f7e9d2}"]})}}return e})();var Lt=Y({}),Xe=(()=>{class e extends Z{constructor(){let i=l(K),t=l(A);super(i,t,Lt,"Teachers")}getTimetableEntries(i,t={}){let a=t instanceof ae?t:new ae({fromObject:t});return a=a.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation"),this.http.get(`${this.baseUrl}/${i}/TimetableEntries/CurrentSemester`,{params:a}).pipe(T(Re(Ne)))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var et=(()=>{class e{constructor(){this.sanitizer=l(xe)}transform(i,t){switch(t){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: ${t}`)}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275pipe=me({name:"safe",type:e,pure:!0})}}return e})();function tt(e){return{id:ot(e.EventId,e.Id),from:e.From,until:e.To,eventId:e.EventId,subject:e.EventDesignation,room:e.EventLocation||void 0,teacher:e.EventManagerInformation||void 0}}function it(e){let s=e.reduce((i,t)=>{let a=ot(t.EventRef.Id,t.LessonRef.Id);return U(z({},i),{[a]:[...i[a]??[],t.StudyClassNumber]})},{});return Object.keys(s).reduce((i,t)=>U(z({},i),{[t]:ke([...s[t]].sort())}),{})}function nt(e,s){return e.map(i=>U(z({},i),{studyClass:s[i.id]?.join(", ")}))}function ot(e,s){return`${e}-${s}`}var wt=(e,s)=>s.id;function Bt(e,s){e&1&&(d(0,"th"),p(1),o(2,"translate"),c()),e&2&&(n(),S(" ",r(2,1,"dashboard.timetable.table.teacher")," "))}function jt(e,s){if(e&1&&(k(0),d(1,"a",3),p(2),d(3,"span",8),p(4),c()()),e&2){let i=u().$implicit,t=u(2).buildLink(i.eventId);n(),f("routerLink",t.link)("queryParams",t.params),n(),S(" ",i.subject,""),n(2),S(", ",i.studyClass,"")}}function Ft(e,s){if(e&1&&p(0),e&2){let i=u().$implicit;S(" ",i.subject," ")}}function Nt(e,s){if(e&1&&(d(0,"td",4),p(1),o(2,"translate"),c()),e&2){let i=u().$implicit;n(),oe(" ",r(2,2,"dashboard.timetable.table.study-class"),": ",i.studyClass," ")}}function zt(e,s){if(e&1&&(d(0,"td",5),p(1),c()),e&2){let i=u().$implicit;n(),S(" ",i.teacher," ")}}function Ut(e,s){e&1&&(d(0,"span",7),p(1),o(2,"translate"),c()),e&2&&(n(),x(r(2,1,"dashboard.timetable.table.room")))}function Ht(e,s){if(e&1&&(d(0,"tr")(1,"td",1),p(2),o(3,"date"),o(4,"date"),c(),d(5,"td",2),m(6,jt,5,4,"a",3),o(7,"async"),m(8,Ft,1,1),c(),m(9,Nt,3,4,"td",4),o(10,"async"),m(11,zt,2,1,"td",5),o(12,"async"),d(13,"td",6),m(14,Ut,3,3,"span",7),p(15),c()()),e&2){let i=s.$implicit,t=u(2);n(2),oe(" ",M(3,7,i.from,"HH:mm"),"\u2013",M(4,10,i.until,"HH:mm")," "),n(4),h(r(7,13,t.isTeacher$)?6:8),n(3),h(r(10,15,t.isTeacher$)?9:-1),n(2),h(r(12,17,t.isStudent$)?11:-1),n(3),h(i.room?14:-1),n(),S(" ",i.room," ")}}function Vt(e,s){if(e&1&&(d(0,"table",0)(1,"thead")(2,"tr")(3,"th"),p(4),o(5,"translate"),c(),d(6,"th"),p(7),o(8,"translate"),c(),m(9,Bt,3,3,"th"),o(10,"async"),d(11,"th"),p(12),o(13,"translate"),c()()(),d(14,"tbody"),be(15,Ht,16,19,"tr",null,wt),c()()),e&2){let i=u();n(4),x(r(5,4,"dashboard.timetable.table.time")),n(3),x(r(8,6,"dashboard.timetable.table.subject")),n(2),h(r(10,8,i.isStudent$)?9:-1),n(3),S(" ",r(13,10,"dashboard.timetable.table.room")," "),n(3),ue(i.entries)}}function qt(e,s){e&1&&(d(0,"p"),p(1),o(2,"translate"),c()),e&2&&(n(),x(r(2,1,"dashboard.timetable.no-entries")))}var at=(()=>{class e{constructor(){this.dashboardService=l($),this.entries=[],this.isStudent$=this.dashboardService.hasStudentRole$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$}buildLink(i){return Be(Ve(i,"/dashboard"))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-timetable-table"]],inputs:{entries:"entries"},decls:2,vars:1,consts:[[1,"table"],[1,"time"],[1,"subject"],[3,"routerLink","queryParams"],[1,"study-class"],[1,"teacher"],[1,"room"],[1,"room-label"],[1,"subject-study-class"]],template:function(t,a){t&1&&m(0,Vt,17,12,"table",0)(1,qt,3,3,"p"),t&2&&h(a.entries.length>0?0:1)},dependencies:[R,G,D,W],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}}']})}}return e})();function Gt(e,s){e&1&&(d(0,"a",6),o(1,"safe"),p(2),o(3,"translate"),c()),e&2&&(f("href",M(1,2,s,"url"),j),n(2),S(" ",r(3,5,"dashboard.timetable.subscribe-calendar")," "))}function Kt(e,s){e&1&&g(0,"bkd-spinner")}function Wt(e,s){e&1&&(d(0,"a",8),o(1,"safe"),p(2),o(3,"translate"),c()),e&2&&(f("href",M(1,2,s,"url"),j),n(2),S(" ",r(3,5,"dashboard.timetable.subscribe-calendar")," "))}function Yt(e,s){if(e&1&&(g(0,"bkd-dashboard-timetable-table",7),m(1,Wt,4,7,"a",8),o(2,"async")),e&2){let i,t=u(),a=N(18);f("entries",a),n(),h((i=r(2,2,t.getSubscribeCalendarUrl()))?1:-1,i)}}var Zt="cal",rt=(()=>{class e{constructor(){this.teachersService=l(Xe),this.studentsService=l(B),this.lessonPresencesService=l(J),this.userSettings=l(X),this.dashboardService=l($),this.loadingService=l(je),this.userId$=this.dashboardService.userId$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$,this.isStudent$=this.dashboardService.hasStudentRole$,this.date$=new ce(re(new Date)),this.loading$=this.loadingService.loading$,this.timetableEntries$=this.loadTimetableEntries()}gotoToday(){this.date$.next(re(new Date))}gotoPreviousDay(){this.date$.next(Le(this.date$.getValue(),1))}gotoNextDay(){this.date$.next(Oe(this.date$.getValue(),1))}getSubscribeCalendarUrl(){return this.userSettings.getSetting(Zt)}loadTimetableEntries(){return H([this.isTeacher$,this.isStudent$,this.userId$,this.date$]).pipe(T(([i,t,a,_])=>{let C=()=>i?this.fetchTimetableEntries("teacher",a,_):t?this.fetchTimetableEntries("student",a,_):E([]);return this.loadingService.load(C())}),y(1))}fetchTimetableEntries(i,t,a){let _={"filter.From":`=${Ie(a,"yyyy-MM-dd")}`,sort:"From,To"};return(i==="teacher"?this.teachersService.getTimetableEntries(t,_):this.studentsService.getTimetableEntries(t,_)).pipe(b(C=>C.map(tt)),b(C=>Me(C,O=>O.id)),T(C=>i==="teacher"?this.loadStudyClasses(a).pipe(b(O=>nt(C,O))):E(C)))}loadStudyClasses(i){return this.lessonPresencesService.getLessonStudyClassesByDate(i).pipe(b(it))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-timetable"]],decls:23,vars:24,consts:[[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",1,"btn","btn-secondary","subscribe-calendar-header",3,"href"],[3,"entries"],["target","_parent",1,"btn","btn-secondary","subscribe-calendar-bottom",3,"href"]],template:function(t,a){if(t&1){let _=fe();d(0,"div",0)(1,"button",1),w("click",function(){return V(_),q(a.gotoToday())}),p(2),o(3,"translate"),c(),d(4,"button",2),o(5,"translate"),w("click",function(){return V(_),q(a.gotoPreviousDay())}),d(6,"span",3),p(7,"chevron_left"),c()(),d(8,"button",4),o(9,"translate"),w("click",function(){return V(_),q(a.gotoNextDay())}),d(10,"span",3),p(11,"chevron_right"),c()(),d(12,"div",5),p(13),o(14,"async"),o(15,"date"),c(),m(16,Gt,4,7,"a",6),o(17,"async"),c(),k(18),o(19,"async"),m(20,Kt,1,0,"bkd-spinner"),o(21,"async"),m(22,Yt,3,4)}if(t&2){let _;n(2),S(" ",r(3,6,"dashboard.timetable.today")," "),n(2),te("aria-label",r(5,8,"dashboard.timetable.previousDay")),n(4),te("aria-label",r(9,10,"dashboard.timetable.nextDay")),n(5),x(M(15,14,r(14,12,a.date$),"E, dd. MMMM yyyy")),n(3),h((_=r(17,17,a.getSubscribeCalendarUrl()))?16:-1,_),n(2),F(r(19,19,a.timetableEntries$)),n(2),h(r(21,22,a.loading$)?20:22)}},dependencies:[at,Q,R,G,D,et],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%}}"]})}}return e})();function Jt(e,s){e&1&&g(0,"bkd-spinner")}function Qt(e,s){e&1&&(d(0,"p"),p(1),o(2,"translate"),c()),e&2&&(n(),S(" ",r(2,1,"dashboard.no-access")," "))}function Xt(e,s){e&1&&(d(0,"div")(1,"h2"),p(2),o(3,"translate"),c(),g(4,"bkd-dashboard-search"),c()),e&2&&(n(2),x(r(3,1,"dashboard.search.title")))}function ei(e,s){e&1&&(d(0,"div")(1,"h2"),p(2),o(3,"translate"),c(),g(4,"bkd-dashboard-actions"),c()),e&2&&(n(2),x(r(3,1,"dashboard.actions.title")))}function ti(e,s){if(e&1&&(d(0,"div",1),m(1,Xt,5,3,"div")(2,ei,5,3,"div"),c()),e&2){u();let i=N(2),t=N(4);n(),h(i?1:-1),n(),h(t?2:-1)}}function ii(e,s){e&1&&(d(0,"div",2)(1,"h2"),p(2),o(3,"translate"),c(),g(4,"bkd-dashboard-timetable"),c()),e&2&&(n(2),x(r(3,1,"dashboard.timetable.title")))}var st=(()=>{class e{constructor(){this.dashboardService=l($)}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard-layout"]],decls:17,vars:19,consts:[[1,"columns"],[1,"search-actions-column"],[1,"timetable-column"]],template:function(t,a){if(t&1&&(k(0),o(1,"async"),k(2),o(3,"async"),k(4),o(5,"async"),k(6),o(7,"async"),d(8,"div")(9,"h1"),p(10),o(11,"translate"),c(),m(12,Jt,1,0,"bkd-spinner")(13,Qt,3,3,"p"),d(14,"div",0),m(15,ti,3,2,"div",1)(16,ii,5,3,"div",2),c()()),t&2){let _=r(1,7,a.dashboardService.loading$);n(2);let C=F(r(3,9,a.dashboardService.hasSearch$));n(2);let O=F(r(5,12,a.dashboardService.hasActions$)),ee=r(7,15,a.dashboardService.hasTimetable$);n(5),he("visually-hidden",_||C||O||ee),n(),S(" ",r(11,17,"dashboard.heading")," "),n(2),h(_?12:-1),n(),h(!_&&!C&&!O&&!ee?13:-1),n(2),h(C||O?15:-1),n(),h(ee?16:-1)}},dependencies:[Q,Qe,Je,rt,R,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})}}return e})();var ct=(()=>{class e{constructor(){}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["bkd-dashboard"]],features:[ye([$,we])],decls:1,vars:0,template:function(t,a){t&1&&g(0,"router-outlet")},dependencies:[Te],encapsulation:2,changeDetection:0})}}return e})();var no=[{path:"",component:ct,children:[{path:"",component:st},He,qe("students/:id")]}];export{no as DASHBOARD_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QB4CDTWV.js b/public/apps/webapp-schulverwaltung/chunk-QB4CDTWV.js new file mode 100644 index 00000000..e9512828 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-QB4CDTWV.js @@ -0,0 +1 @@ +import{a as F}from"./chunk-H664QRX4.js";import{a as G,d as u}from"./chunk-HQSONWXM.js";import{$ as f,D as V,Ic as R,Jc as U,Kc as h,Lc as j,M as S,Mc as a,Nc as x,O as C,Oc as m,P as n,Qc as A,Rc as l,S as O,Sc as o,Vd as s,Wc as I,X as g,Xc as _,Zc as v,cd as d,f as T,hd as $,n as c,qc as P}from"./chunk-NEW5VGRB.js";function M(e){var r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}function k(e,r,t){t===void 0&&(t=e.name);var i=M(e);return i.validate=r,i.decode=function(p){return r(p,_(i))},i.name=t,i}function y(e,r,t){return t===void 0&&(t="withFallback("+e.name+")"),k(e,function(i,p){return R(function(){return h(r)})(e.validate(i,p))},t)}var q=o({Key:a,Value:a}),D=o({Id:a,Settings:I(l(q))}),b=d.pipe(o({mail:y(m,!1),gui:y(m,!1),phoneMobile:y(m,!1)})),E=new j("NotificationTypesInactive",e=>Array.isArray(e)&&e.every(r=>typeof r=="string"),(e,r)=>typeof e=="string"?h(e.split(";").filter(Boolean)):U(e,r),e=>e.join(";")),z=function(e){return e.Grid="grid",e.List="list",e}(z||{}),w=d.pipe(o({presenceControl:A({grid:null,list:null})})),Q=o({eventId:v(x),group:v(F.props.Key)}),N=d.pipe(I(l(Q))),Y=o({AccessInfo:o({Roles:l(a),Permissions:l(a)})});var L=(()=>{class e extends G{constructor(){let t=f(P),i=f($);super(t,i,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)),c(({AccessInfo:t})=>t))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Z=100,H="presenceControlViewMode",W="presenceControlGroupView",B="notification",J="notificationTypesInactive",Tt=(()=>{class e{constructor(){this.settingsRestService=f(L),this.refetch$=new T,this.settings$=this.refetch$.pipe(C(null),V(Z),n(()=>this.settingsRestService.getUserSettingsCst()),c(t=>t.Settings),S(1)),this.accessInfo$=this.settingsRestService.getAccessInfo().pipe(S(1))}refetch(){this.refetch$.next()}getSetting(t){return this.settings$.pipe(c(i=>i.find(p=>p.Key===t)?.Value??null))}saveSetting(t,i){return this.settingsRestService.updateUserSettingsCst(this.buildSettings(t,i)).pipe(O(()=>this.refetch$.next()))}getPresenceControlViewMode(){return this.getSetting(H).pipe(u('{"presenceControl":"grid"}'),n(s(w)),c(({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(c(({Roles:t,Permissions:i})=>[...t,...i]),C(null))}buildSettings(t,i){return{Id:"Cst",Settings:[{Key:t,Value:i}]}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{z as a,Tt as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QE74EW6O.js b/public/apps/webapp-schulverwaltung/chunk-QE74EW6O.js deleted file mode 100644 index 986d7267..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-QE74EW6O.js +++ /dev/null @@ -1 +0,0 @@ -import{q as y}from"./chunk-LY5STZD6.js";import{a as v}from"./chunk-HLAFRD2O.js";import{Ic as i,Jc as n,Nd as m,Oc as p,P as o,Wc as d,X as c,_ as s,dd as l,ic as u,mc as f,n as a}from"./chunk-S3H6YSFW.js";var g=p({Id:n,Designation:i,Leadership:d(i),StudentCount:n}),E=p({Id:n,EventType:i,EventTypeId:n,Designation:i});var M=(()=>{class e extends v{constructor(t,r){super(t,r,g,"Events")}getStudyCourseEvents(){let t=new u().set("filter.EventTypeId","=1");return this.getList({params:t})}getSubscriptionDetailsDefinitions(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(o(m(y)))}getEventSummary(t){let r={fields:"Id,EventTypeId,EventType,Designation","filter.Id":`=${t}`};return this.http.get(`${this.baseUrl}/`,{params:r}).pipe(o(m(E)),a(b=>b[0]??null))}static{this.\u0275fac=function(r){return new(r||e)(s(f),s(l))}}static{this.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{M as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QTBTUQ3W.js b/public/apps/webapp-schulverwaltung/chunk-RXRYDGZR.js similarity index 99% rename from public/apps/webapp-schulverwaltung/chunk-QTBTUQ3W.js rename to public/apps/webapp-schulverwaltung/chunk-RXRYDGZR.js index da792e15..b675477c 100644 --- a/public/apps/webapp-schulverwaltung/chunk-QTBTUQ3W.js +++ b/public/apps/webapp-schulverwaltung/chunk-RXRYDGZR.js @@ -1,4 +1,4 @@ -import{$ as c,$a as C,Ba as _t,Db as Rt,Ea as Yt,F as pt,Fb as An,G as Tn,Ga as le,Hb as xn,I as En,Ia as K,Ka as Nn,La as Cn,Na as x,Nb as Pt,Oa as xi,Ob as kn,P as Mi,Pa as Ne,Pb as We,Qa as I,R as W,Ra as U,S as Ot,Sa as Ze,Sb as Bn,Tb as Bi,U as Jt,Ub as In,V as Ri,Va as se,Vb as ei,W as ft,Wa as Zt,Wb as me,X as N,Xa as Xe,Ya as Ee,Yb as Fn,Z as Sn,Za as Se,_a as O,a as Je,aa as Pi,ab as Ce,b as zt,bb as Mn,bc as At,ca as qt,cb as Rn,da as Fe,db as Pn,e as Kt,ea as De,eb as et,ed as ti,f as j,fa as Te,fb as Me,g as mn,gb as ee,h as vn,hb as T,hd as Ln,ia as Le,ib as Ct,ja as On,jb as Mt,k as bn,ka as Z,l as St,la as He,ma as S,mb as Re,n as qe,na as ce,nb as tt,ob as ie,p as yn,pb as ne,qb as Xt,ra as X,rb as de,sb as Oe,t as z,ta as Ai,tb as ki,u as wn,va as Nt,w as Dn,wa as Ye,x as we,y as Ci,ya as y,z as Qt}from"./chunk-S3H6YSFW.js";function it(t){t||(qt(it),t=c(He));let o=new Kt(e=>t.onDestroy(e.next.bind(e)));return e=>e.pipe(W(o))}function So(t,o){!o?.injector&&qt(So);let e=o?.injector??c(Z),i=new vn(1),n=In(()=>{let s;try{s=t()}catch(r){Bi(()=>i.error(r));return}Bi(()=>i.next(s))},{injector:e,manualCleanup:!0});return e.get(He).onDestroy(()=>{n.destroy(),i.complete()}),i.asObservable()}function Oo(t,o){let e=!o?.manualCleanup;e&&!o?.injector&&qt(Oo);let i=e?o?.injector?.get(He)??c(He):null,n=No(o?.equal),s;o?.requireSync?s=Ai({kind:0},{equal:n}):s=Ai({kind:1,value:o?.initialValue},{equal:n});let r=t.subscribe({next:a=>s.set({kind:1,value:a}),error:a=>{if(o?.rejectErrors)throw a;s.set({kind:2,error:a})}});if(o?.requireSync&&s().kind===0)throw new Ri(601,!1);return i?.onDestroy(r.unsubscribe.bind(r)),Bn(()=>{let a=s();switch(a.kind){case 1:return a.value;case 2:throw a.error;case 0:throw new Ri(601,!1)}},{equal:o?.equal})}function No(t=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&t(o.value,e.value)}var k="top",Q="bottom",G="right",F="left",ii="auto",Ue=[k,Q,G,F],Pe="start",nt="end",Hn="clippingParents",ni="viewport",gt="popper",Wn="reference",Ii=Ue.reduce(function(t,o){return t.concat([o+"-"+Pe,o+"-"+nt])},[]),oi=[].concat(Ue,[ii]).reduce(function(t,o){return t.concat([o,o+"-"+Pe,o+"-"+nt])},[]),Co="beforeRead",Mo="read",Ro="afterRead",Po="beforeMain",Ao="main",xo="afterMain",ko="beforeWrite",Bo="write",Io="afterWrite",Un=[Co,Mo,Ro,Po,Ao,xo,ko,Bo,Io];function V(t){return t?(t.nodeName||"").toLowerCase():null}function A(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function ue(t){var o=A(t).Element;return t instanceof o||t instanceof Element}function L(t){var o=A(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function mt(t){if(typeof ShadowRoot>"u")return!1;var o=A(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Fo(t){var o=t.state;Object.keys(o.elements).forEach(function(e){var i=o.styles[e]||{},n=o.attributes[e]||{},s=o.elements[e];!L(s)||!V(s)||(Object.assign(s.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function Lo(t){var o=t.state,e={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,e.popper),o.styles=e,o.elements.arrow&&Object.assign(o.elements.arrow.style,e.arrow),function(){Object.keys(o.elements).forEach(function(i){var n=o.elements[i],s=o.attributes[i]||{},r=Object.keys(o.styles.hasOwnProperty(i)?o.styles[i]:e[i]),a=r.reduce(function(l,d){return l[d]="",l},{});!L(n)||!V(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}var Gn={name:"applyStyles",enabled:!0,phase:"write",fn:Fo,effect:Lo,requires:["computeStyles"]};function $(t){return t.split("-")[0]}var ve=Math.max,ot=Math.min,Ae=Math.round;function vt(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function xt(){return!/^((?!chrome|android).)*safari/i.test(vt())}function he(t,o,e){o===void 0&&(o=!1),e===void 0&&(e=!1);var i=t.getBoundingClientRect(),n=1,s=1;o&&L(t)&&(n=t.offsetWidth>0&&Ae(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Ae(i.height)/t.offsetHeight||1);var r=ue(t)?A(t):window,a=r.visualViewport,l=!xt()&&e,d=(i.left+(l&&a?a.offsetLeft:0))/n,u=(i.top+(l&&a?a.offsetTop:0))/s,f=i.width/n,p=i.height/s;return{width:f,height:p,top:u,right:d+f,bottom:u+p,left:d,x:d,y:u}}function st(t){var o=he(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(o.width-e)<=1&&(e=o.width),Math.abs(o.height-i)<=1&&(i=o.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function kt(t,o){var e=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(e&&mt(e)){var i=o;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oe(t){return A(t).getComputedStyle(t)}function Fi(t){return["table","td","th"].indexOf(V(t))>=0}function J(t){return((ue(t)?t.ownerDocument:t.document)||window.document).documentElement}function xe(t){return V(t)==="html"?t:t.assignedSlot||t.parentNode||(mt(t)?t.host:null)||J(t)}function Vn(t){return!L(t)||oe(t).position==="fixed"?null:t.offsetParent}function Ho(t){var o=/firefox/i.test(vt()),e=/Trident/i.test(vt());if(e&&L(t)){var i=oe(t);if(i.position==="fixed")return null}var n=xe(t);for(mt(n)&&(n=n.host);L(n)&&["html","body"].indexOf(V(n))<0;){var s=oe(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||o&&s.willChange==="filter"||o&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(t){for(var o=A(t),e=Vn(t);e&&Fi(e)&&oe(e).position==="static";)e=Vn(e);return e&&(V(e)==="html"||V(e)==="body"&&oe(e).position==="static")?o:e||Ho(t)||o}function rt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function at(t,o,e){return ve(t,ot(o,e))}function $n(t,o,e){var i=at(t,o,e);return i>e?e:i}function Bt(){return{top:0,right:0,bottom:0,left:0}}function It(t){return Object.assign({},Bt(),t)}function Ft(t,o){return o.reduce(function(e,i){return e[i]=t,e},{})}var Wo=function(o,e){return o=typeof o=="function"?o(Object.assign({},e.rects,{placement:e.placement})):o,It(typeof o!="number"?o:Ft(o,Ue))};function Uo(t){var o,e=t.state,i=t.name,n=t.options,s=e.elements.arrow,r=e.modifiersData.popperOffsets,a=$(e.placement),l=rt(a),d=[F,G].indexOf(a)>=0,u=d?"height":"width";if(!(!s||!r)){var f=Wo(n.padding,e),p=st(s),h=l==="y"?k:F,_=l==="y"?Q:G,v=e.rects.reference[u]+e.rects.reference[l]-r[l]-e.rects.popper[u],g=r[l]-e.rects.reference[l],w=be(s),b=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,R=v/2-g/2,m=f[h],D=b-p[u]-f[_],E=b/2-p[u]/2+R,P=at(m,E,D),M=l;e.modifiersData[i]=(o={},o[M]=P,o.centerOffset=P-E,o)}}function Go(t){var o=t.state,e=t.options,i=e.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=o.elements.popper.querySelector(n),!n)||kt(o.elements.popper,n)&&(o.elements.arrow=n))}var Li={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Go,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pe(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,o){var e=t.x,i=t.y,n=o.devicePixelRatio||1;return{x:Ae(e*n)/n||0,y:Ae(i*n)/n||0}}function jn(t){var o,e=t.popper,i=t.popperRect,n=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,p=r.x,h=p===void 0?0:p,_=r.y,v=_===void 0?0:_,g=typeof u=="function"?u({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var w=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),R=F,m=k,D=window;if(d){var E=be(e),P="clientHeight",M="clientWidth";if(E===A(e)&&(E=J(e),oe(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,n===k||(n===F||n===G)&&s===nt){m=Q;var H=f&&E===D&&D.visualViewport?D.visualViewport.height:E[P];v-=H-i.height,v*=l?1:-1}if(n===F||(n===k||n===Q)&&s===nt){R=G;var B=f&&E===D&&D.visualViewport?D.visualViewport.width:E[M];h-=B-i.width,h*=l?1:-1}}var Y=Object.assign({position:a},d&&Vo),_e=u===!0?$o({x:h,y:v},A(e)):{x:h,y:v};if(h=_e.x,v=_e.y,l){var te;return Object.assign({},Y,(te={},te[m]=b?"0":"",te[R]=w?"0":"",te.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",te))}return Object.assign({},Y,(o={},o[m]=b?v+"px":"",o[R]=w?h+"px":"",o.transform="",o))}function jo(t){var o=t.state,e=t.options,i=e.gpuAcceleration,n=i===void 0?!0:i,s=e.adaptive,r=s===void 0?!0:s,a=e.roundOffsets,l=a===void 0?!0:a,d={placement:$(o.placement),variation:pe(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:n,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,jn(Object.assign({},d,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:r,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,jn(Object.assign({},d,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var zn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var si={passive:!0};function zo(t){var o=t.state,e=t.instance,i=t.options,n=i.scroll,s=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=A(o.elements.popper),d=[].concat(o.scrollParents.reference,o.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",e.update,si)}),a&&l.addEventListener("resize",e.update,si),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",e.update,si)}),a&&l.removeEventListener("resize",e.update,si)}}var Kn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zo,data:{}};var Ko={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t){return t.replace(/left|right|bottom|top/g,function(o){return Ko[o]})}var Qo={start:"end",end:"start"};function ri(t){return t.replace(/start|end/g,function(o){return Qo[o]})}function lt(t){var o=A(t),e=o.pageXOffset,i=o.pageYOffset;return{scrollLeft:e,scrollTop:i}}function ct(t){return he(J(t)).left+lt(t).scrollLeft}function Hi(t,o){var e=A(t),i=J(t),n=e.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){s=n.width,r=n.height;var d=xt();(d||!d&&o==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:r,x:a+ct(t),y:l}}function Wi(t){var o,e=J(t),i=lt(t),n=(o=t.ownerDocument)==null?void 0:o.body,s=ve(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ve(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+ct(t),l=-i.scrollTop;return oe(n||e).direction==="rtl"&&(a+=ve(e.clientWidth,n?n.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function dt(t){var o=oe(t),e=o.overflow,i=o.overflowX,n=o.overflowY;return/auto|scroll|overlay|hidden/.test(e+n+i)}function ai(t){return["html","body","#document"].indexOf(V(t))>=0?t.ownerDocument.body:L(t)&&dt(t)?t:ai(xe(t))}function Ge(t,o){var e;o===void 0&&(o=[]);var i=ai(t),n=i===((e=t.ownerDocument)==null?void 0:e.body),s=A(i),r=n?[s].concat(s.visualViewport||[],dt(i)?i:[]):i,a=o.concat(r);return n?a:a.concat(Ge(xe(r)))}function yt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jo(t,o){var e=he(t,!1,o==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Qn(t,o,e){return o===ni?yt(Hi(t,e)):ue(o)?Jo(o,e):yt(Wi(J(t)))}function qo(t){var o=Ge(xe(t)),e=["absolute","fixed"].indexOf(oe(t).position)>=0,i=e&&L(t)?be(t):t;return ue(i)?o.filter(function(n){return ue(n)&&kt(n,i)&&V(n)!=="body"}):[]}function Ui(t,o,e,i){var n=o==="clippingParents"?qo(t):[].concat(o),s=[].concat(n,[e]),r=s[0],a=s.reduce(function(l,d){var u=Qn(t,d,i);return l.top=ve(u.top,l.top),l.right=ot(u.right,l.right),l.bottom=ot(u.bottom,l.bottom),l.left=ve(u.left,l.left),l},Qn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Lt(t){var o=t.reference,e=t.element,i=t.placement,n=i?$(i):null,s=i?pe(i):null,r=o.x+o.width/2-e.width/2,a=o.y+o.height/2-e.height/2,l;switch(n){case k:l={x:r,y:o.y-e.height};break;case Q:l={x:r,y:o.y+o.height};break;case G:l={x:o.x+o.width,y:a};break;case F:l={x:o.x-e.width,y:a};break;default:l={x:o.x,y:o.y}}var d=n?rt(n):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case Pe:l[d]=l[d]-(o[u]/2-e[u]/2);break;case nt:l[d]=l[d]+(o[u]/2-e[u]/2);break;default:}}return l}function Ve(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=i===void 0?t.placement:i,s=e.strategy,r=s===void 0?t.strategy:s,a=e.boundary,l=a===void 0?Hn:a,d=e.rootBoundary,u=d===void 0?ni:d,f=e.elementContext,p=f===void 0?gt:f,h=e.altBoundary,_=h===void 0?!1:h,v=e.padding,g=v===void 0?0:v,w=It(typeof g!="number"?g:Ft(g,Ue)),b=p===gt?Wn:gt,R=t.rects.popper,m=t.elements[_?b:p],D=Ui(ue(m)?m:m.contextElement||J(t.elements.popper),l,u,r),E=he(t.elements.reference),P=Lt({reference:E,element:R,strategy:"absolute",placement:n}),M=yt(Object.assign({},R,P)),H=p===gt?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},Y=t.modifiersData.offset;if(p===gt&&Y){var _e=Y[n];Object.keys(B).forEach(function(te){var $e=[G,Q].indexOf(te)>=0?1:-1,je=[k,Q].indexOf(te)>=0?"y":"x";B[te]+=_e[je]*$e})}return B}function Gi(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=e.boundary,s=e.rootBoundary,r=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,d=l===void 0?oi:l,u=pe(i),f=u?a?Ii:Ii.filter(function(_){return pe(_)===u}):Ue,p=f.filter(function(_){return d.indexOf(_)>=0});p.length===0&&(p=f);var h=p.reduce(function(_,v){return _[v]=Ve(t,{placement:v,boundary:n,rootBoundary:s,padding:r})[$(v)],_},{});return Object.keys(h).sort(function(_,v){return h[_]-h[v]})}function Yo(t){if($(t)===ii)return[];var o=bt(t);return[ri(t),o,ri(o)]}function Zo(t){var o=t.state,e=t.options,i=t.name;if(!o.modifiersData[i]._skip){for(var n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!0:r,l=e.fallbackPlacements,d=e.padding,u=e.boundary,f=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,_=h===void 0?!0:h,v=e.allowedAutoPlacements,g=o.options.placement,w=$(g),b=w===g,R=l||(b||!_?[bt(g)]:Yo(g)),m=[g].concat(R).reduce(function(ht,Ie){return ht.concat($(Ie)===ii?Gi(o,{placement:Ie,boundary:u,rootBoundary:f,padding:d,flipVariations:_,allowedAutoPlacements:v}):Ie)},[]),D=o.rects.reference,E=o.rects.popper,P=new Map,M=!0,H=m[0],B=0;B=0,je=$e?"width":"height",ae=Ve(o,{placement:Y,boundary:u,rootBoundary:f,altBoundary:p,padding:d}),ge=$e?te?G:F:te?Q:k;D[je]>E[je]&&(ge=bt(ge));var Ut=bt(ge),ze=[];if(s&&ze.push(ae[_e]<=0),a&&ze.push(ae[ge]<=0,ae[Ut]<=0),ze.every(function(ht){return ht})){H=Y,M=!1;break}P.set(Y,ze)}if(M)for(var Gt=_?3:1,Ei=function(Ie){var Et=m.find(function($t){var Ke=P.get($t);if(Ke)return Ke.slice(0,Ie).every(function(Si){return Si})});if(Et)return H=Et,"break"},Tt=Gt;Tt>0;Tt--){var Vt=Ei(Tt);if(Vt==="break")break}o.placement!==H&&(o.modifiersData[i]._skip=!0,o.placement=H,o.reset=!0)}}var Vi={name:"flip",enabled:!0,phase:"main",fn:Zo,requiresIfExists:["offset"],data:{_skip:!1}};function Xo(t,o,e){var i=$(t),n=[F,k].indexOf(i)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},o,{placement:t})):e,r=s[0],a=s[1];return r=r||0,a=(a||0)*n,[F,G].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function es(t){var o=t.state,e=t.options,i=t.name,n=e.offset,s=n===void 0?[0,0]:n,r=oi.reduce(function(u,f){return u[f]=Xo(f,o.rects,s),u},{}),a=r[o.placement],l=a.x,d=a.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=d),o.modifiersData[i]=r}var $i={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:es};function ts(t){var o=t.state,e=t.name;o.modifiersData[e]=Lt({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var Jn={name:"popperOffsets",enabled:!0,phase:"read",fn:ts,data:{}};function ji(t){return t==="x"?"y":"x"}function is(t){var o=t.state,e=t.options,i=t.name,n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!1:r,l=e.boundary,d=e.rootBoundary,u=e.altBoundary,f=e.padding,p=e.tether,h=p===void 0?!0:p,_=e.tetherOffset,v=_===void 0?0:_,g=Ve(o,{boundary:l,rootBoundary:d,padding:f,altBoundary:u}),w=$(o.placement),b=pe(o.placement),R=!b,m=rt(w),D=ji(m),E=o.modifiersData.popperOffsets,P=o.rects.reference,M=o.rects.popper,H=typeof v=="function"?v(Object.assign({},o.rects,{placement:o.placement})):v,B=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,_e={x:0,y:0};if(E){if(s){var te,$e=m==="y"?k:F,je=m==="y"?Q:G,ae=m==="y"?"height":"width",ge=E[m],Ut=ge+g[$e],ze=ge-g[je],Gt=h?-M[ae]/2:0,Ei=b===Pe?P[ae]:M[ae],Tt=b===Pe?-M[ae]:-P[ae],Vt=o.elements.arrow,ht=h&&Vt?st(Vt):{width:0,height:0},Ie=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Bt(),Et=Ie[$e],$t=Ie[je],Ke=at(0,P[ae],ht[ae]),Si=R?P[ae]/2-Gt-Ke-Et-B.mainAxis:Ei-Ke-Et-B.mainAxis,bo=R?-P[ae]/2+Gt+Ke+$t+B.mainAxis:Tt+Ke+$t+B.mainAxis,Oi=o.elements.arrow&&be(o.elements.arrow),yo=Oi?m==="y"?Oi.clientTop||0:Oi.clientLeft||0:0,ln=(te=Y?.[m])!=null?te:0,wo=ge+Si-ln-yo,Do=ge+bo-ln,cn=at(h?ot(Ut,wo):Ut,ge,h?ve(ze,Do):ze);E[m]=cn,_e[m]=cn-ge}if(a){var dn,To=m==="x"?k:F,Eo=m==="x"?Q:G,Qe=E[D],jt=D==="y"?"height":"width",un=Qe+g[To],hn=Qe-g[Eo],Ni=[k,F].indexOf(w)!==-1,pn=(dn=Y?.[D])!=null?dn:0,fn=Ni?un:Qe-P[jt]-M[jt]-pn+B.altAxis,_n=Ni?Qe+P[jt]+M[jt]-pn-B.altAxis:hn,gn=h&&Ni?$n(fn,Qe,_n):at(h?fn:un,Qe,h?_n:hn);E[D]=gn,_e[D]=gn-Qe}o.modifiersData[i]=_e}}var zi={name:"preventOverflow",enabled:!0,phase:"main",fn:is,requiresIfExists:["offset"]};function Ki(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Qi(t){return t===A(t)||!L(t)?lt(t):Ki(t)}function ns(t){var o=t.getBoundingClientRect(),e=Ae(o.width)/t.offsetWidth||1,i=Ae(o.height)/t.offsetHeight||1;return e!==1||i!==1}function Ji(t,o,e){e===void 0&&(e=!1);var i=L(o),n=L(o)&&ns(o),s=J(o),r=he(t,n,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&((V(o)!=="body"||dt(s))&&(a=Qi(o)),L(o)?(l=he(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):s&&(l.x=ct(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function os(t){var o=new Map,e=new Set,i=[];t.forEach(function(s){o.set(s.name,s)});function n(s){e.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!e.has(a)){var l=o.get(a);l&&n(l)}}),i.push(s)}return t.forEach(function(s){e.has(s.name)||n(s)}),i}function qi(t){var o=os(t);return Un.reduce(function(e,i){return e.concat(o.filter(function(n){return n.phase===i}))},[])}function Yi(t){var o;return function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(t())})})),o}}function Zi(t){var o=t.reduce(function(e,i){var n=e[i.name];return e[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,e},{});return Object.keys(o).map(function(e){return o[e]})}var qn={placement:"bottom",modifiers:[],strategy:"absolute"};function Yn(){for(var t=arguments.length,o=new Array(t),e=0;e0?0:-1),y(2),ki(" ",n.i18n.getMonthLabel(e.firstDate)," "),y(),se(i!==n.months.length-1?3:-1)}}function ms(t,o){if(t&1&&Ee(0,gs,4,3,null,null,Xe),t&2){let e=T();Se(e.months)}}function vs(t,o){if(t&1&&(O(0,"div",1),de(1),C()),t&2){let e=T(2);y(),Oe(e.i18n.getWeekLabel())}}function bs(t,o){if(t&1&&(O(0,"div",2),de(1),C()),t&2){let e=o.$implicit;y(),Oe(e)}}function ys(t,o){if(t&1&&(O(0,"div",0),x(1,vs,2,1,"div",1),Ee(2,bs,2,1,"div",2,Zt),C()),t&2){let e=T();y(),se(e.datepicker.showWeekNumbers?1:-1),y(),Se(e.viewModel.weekdays)}}function ws(t,o){if(t&1&&(O(0,"div",4),de(1),C()),t&2){let e=T(2).$implicit,i=T();y(),Oe(i.i18n.getWeekNumerals(e.number))}}function Ds(t,o){}function Ts(t,o){if(t&1&&x(0,Ds,0,0,"ng-template",7),t&2){let e=T().$implicit,i=T(3);I("ngTemplateOutlet",i.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function Es(t,o){if(t&1){let e=et();O(0,"div",6),ee("click",function(n){let s=De(e).$implicit;return T(3).doSelect(s),Te(n.preventDefault())}),x(1,Ts,1,2,null,7),C()}if(t&2){let e=o.$implicit;U("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),I("tabindex",e.tabindex),Ne("aria-label",e.ariaLabel),y(),se(e.hidden?-1:1)}}function Ss(t,o){if(t&1&&(O(0,"div",3),x(1,ws,2,1,"div",4),Ee(2,Es,2,9,"div",5,Xe),C()),t&2){let e=T().$implicit,i=T();y(),se(i.datepicker.showWeekNumbers?1:-1),y(),Se(e.days)}}function Os(t,o){if(t&1&&x(0,Ss,4,1,"div",3),t&2){let e=o.$implicit;se(e.collapsed?-1:0)}}var Ns=["defaultDayTemplate"],Cs=["content"],Ms=t=>({$implicit:t});function Rs(t,o){if(t&1&&Ce(0,"div",8),t&2){let e=o.date,i=o.currentMonth,n=o.selected,s=o.disabled,r=o.focused;I("date",e)("currentMonth",i)("selected",n)("disabled",s)("focused",r)}}function Ps(t,o){if(t&1&&(O(0,"div",10),de(1),C()),t&2){let e=T().$implicit,i=T(2);y(),ki(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function As(t,o){if(t&1&&(O(0,"div",9),x(1,Ps,2,1,"div",10),Ce(2,"ngb-datepicker-month",11),C()),t&2){let e=o.$implicit,i=T(2);y(),se(i.navigation==="none"||i.displayMonths>1&&i.navigation==="select"?1:-1),y(),I("month",e.firstDate)}}function xs(t,o){if(t&1&&Ee(0,As,3,2,"div",9,Xe),t&2){let e=T();Se(e.model.months)}}function ks(t,o){if(t&1){let e=et();O(0,"ngb-datepicker-navigation",12),ee("navigate",function(n){De(e);let s=T();return Te(s.onNavigateEvent(n))})("select",function(n){De(e);let s=T();return Te(s.onNavigateDateSelect(n))}),C()}if(t&2){let e=T();I("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect",e.model.navigation==="select")("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function Bs(t,o){}function Is(t,o){}var Fs=["dialog"];function Ls(t,o){if(t&1&&(O(0,"strong",3),de(1),C()),t&2){let e=T();y(),Oe(e.header)}}function Hs(t,o){}function Ws(t,o){if(t&1){let e=et();O(0,"div",1),x(1,Hs,0,0,"ng-template",4),O(2,"button",5),ee("click",function(){De(e);let n=T();return Te(n.hide())}),C()()}if(t&2){let e=T(),i=Xt(1);y(),I("ngTemplateOutlet",e.contentHeaderTpl||i)}}function Us(t,o){if(t&1&&(O(0,"span"),de(1),C()),t&2){let e=T().$implicit,i=T();Ze(i.highlightClass),y(),Oe(e)}}function Gs(t,o){if(t&1&&(Mn(0),de(1),Rn()),t&2){let e=T().$implicit;y(),Oe(e)}}function Vs(t,o){if(t&1&&x(0,Us,2,4,"span",0)(1,Gs,2,1,"ng-container"),t&2){let e=o.$index;se(e%2!==0?0:1)}}var $s=(t,o,e)=>({result:t,term:o,formatter:e});function js(t,o){if(t&1&&Ce(0,"ngb-highlight",2),t&2){let e=o.result,i=o.term,n=o.formatter;I("result",n(e))("term",i)}}function zs(t,o){}function Ks(t,o){if(t&1){let e=et();O(0,"button",3),ee("mouseenter",function(){let n=De(e).$index,s=T();return Te(s.markActive(n))})("click",function(){let n=De(e).$implicit,s=T();return Te(s.select(n))}),x(1,zs,0,0,"ng-template",4),C()}if(t&2){let e=o.$implicit,i=o.$index,n=T(),s=Xt(1);U("active",i===n.activeIdx),I("id",n.id+"-"+i),y(),I("ngTemplateOutlet",n.resultTemplate||s)("ngTemplateOutletContext",xn(5,$s,e,n.term,n.formatter))}}var lo={animation:!0,transitionTimerDelayMs:5},Wt=(()=>{class t{constructor(){this.animation=lo.animation}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Qs=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Js(t){let{transitionDelay:o,transitionDuration:e}=window.getComputedStyle(t),i=parseFloat(o),n=parseFloat(e);return(i+n)*1e3}function ye(t){return parseInt(`${t}`,10)}function Ht(t){return t!=null?`${t}`:""}function Dt(t){return typeof t=="string"}function ke(t){return!isNaN(ye(t))}function q(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function hi(t){return t!=null}function qs(t){return t&&t.then}function Xn(t){return ke(t)?`0${t}`.slice(-2):""}function Ys(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Zs(t,o){return!o||typeof t.closest>"u"?null:t.closest(o)}function mi(t){return(t||document.body).getBoundingClientRect()}function Xs(t){return o=>new Kt(e=>{let i=r=>t.run(()=>e.next(r)),n=r=>t.run(()=>e.error(r)),s=()=>t.run(()=>e.complete());return o.subscribe({next:i,error:n,complete:s})})}function eo(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function co(t=document){let o=t?.activeElement;return o?o.shadowRoot?co(o.shadowRoot):o:null}var er=()=>{},{transitionTimerDelayMs:tr}=lo,li=new Map,fe=(t,o,e,i)=>{let n=i.context||{},s=li.get(o);if(s)switch(i.runningTransition){case"continue":return bn;case"stop":t.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),li.delete(o)}let r=e(o,i.animation,n)||er;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return t.run(()=>r()),St(void 0).pipe(Xs(t));let a=new j,l=new j,d=a.pipe(En(!0));li.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let u=Js(o);return t.runOutsideAngular(()=>{let f=z(o,"transitionend").pipe(W(d),we(({target:h})=>h===o)),p=wn(u+tr).pipe(W(d));Ci(p,f,l).pipe(W(d)).subscribe(()=>{li.delete(o),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function ir(t,o){if(typeof navigator>"u")return"0px";let{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[o]="";let n=t.getBoundingClientRect()[o]+"px";return i||e.remove("show"),n}var nr=(t,o,e)=>{let{direction:i,maxSize:n,dimension:s}=e,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=ir(t,s),e.maxSize=n,t.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),mi(t),r.add("collapsing")),t.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[s]=""}},or=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),to=(()=>{class t{constructor(){this._config=c(or),this._element=c(X),this._zone=c(ce),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,nr,{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()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&U("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return t})(),sr=0,th=(()=>{class t{constructor(){this._item=c(vi),this._viewRef=null,this.elementRef=c(X)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,_t,7),i&2){let r;ie(r=ne())&&(n._bodyTpl=r.first)}},viewQuery:function(i,n){if(i&1&&tt(rs,7,Yt),i&2){let s;ie(s=ne())&&(n._vcr=s.first)}},hostAttrs:[1,"accordion-body"],attrs:as,ngContentSelectors:gi,decls:3,vars:0,consts:[["container",""]],template:function(i,n){i&1&&(Ct(),Pn(0,null,0),Mt(2))},encapsulation:2})}}return t})(),rr=(()=>{class t{constructor(){this.item=c(vi),this.ngbCollapse=c(to)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,n){i&2&&(Me("id",n.item.collapseId),Ne("aria-labelledby",n.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[Cn([to])]})}}return t})();var ih=(()=>{class t{constructor(){this.item=c(vi)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,n){i&2&&U("collapsed",n.item.collapsed)}})}}return t})(),vi=(()=>{class t{constructor(){this._accordion=c(ar),this._cd=c(We),this._destroyRef=c(He),this._collapsed=!0,this._id=`ngb-accordion-item-${sr++}`,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){Dt(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(it(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),e.shown.pipe(it(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}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)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,rr,7),i&2){let r;ie(r=ne())&&(n._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,n){i&2&&Me("id",n.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]})}}return t})(),ar=(()=>{class t{constructor(){this._config=c(Qs),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)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordion",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,vi,4),i&2){let r;ie(r=ne())&&(n._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]})}}return t})();var re=class t{static from(o){return o instanceof t?o:o?new t(o.year,o.month,o.day):null}constructor(o,e,i){this.year=q(o)?o:null,this.month=q(e)?e:null,this.day=q(i)?i:null}equals(o){return o!=null&&this.year===o.year&&this.month===o.month&&this.day===o.day}before(o){return o?this.year===o.year?this.month===o.month?this.day===o.day?!1:this.dayo.day:this.month>o.month:this.year>o.year:!1}};function io(t){return new re(t.getFullYear(),t.getMonth()+1,t.getDate())}function ci(t){let o=new Date(t.year,t.month-1,t.day,12);return isNaN(o.getTime())||o.setFullYear(t.year),o}function lr(){return new cr}var bi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>lr(),providedIn:"root"})}}return t})(),cr=(()=>{class t extends bi{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",n=1){let s=ci(e),r=!0,a=s.getMonth();switch(i){case"y":s.setFullYear(s.getFullYear()+n);break;case"m":a+=n,s.setMonth(a),a=a%12,a<0&&(a=a+12);break;case"d":s.setDate(s.getDate()+n),r=!1;break;default:return e}return r&&s.getMonth()!==a&&s.setDate(0),io(s)}getPrev(e,i="d",n=1){return this.getNext(e,i,-n)}getWeekday(e){let n=ci(e).getDay();return n===0?7:n}getWeekNumber(e,i){i===7&&(i=0);let n=(11-i)%7,s=e[n],r=ci(s);r.setDate(r.getDate()+4-(r.getDay()||7));let a=r.getTime();return r.setMonth(0),r.setDate(1),Math.floor(Math.round((a-r.getTime())/864e5)/7)+1}getToday(){return io(new Date)}isValid(e){if(!e||!q(e.year)||!q(e.month)||!q(e.day)||e.year===0)return!1;let i=ci(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})();function wt(t,o){return!dr(t,o)}function uo(t,o){return!t&&!o?!1:!t||!o?!0:t.year!==o.year||t.month!==o.month}function dr(t,o){return!t&&!o||!!t&&!!o&&t.equals(o)}function ur(t,o){if(o&&t&&o.before(t))throw new Error(`'maxDate' ${o} should be greater than 'minDate' ${t}`)}function di(t,o,e){return t&&o&&t.before(o)?o:t&&e&&t.after(e)?e:t||null}function en(t,o){let{minDate:e,maxDate:i,disabled:n,markDisabled:s}=o;return!(t==null||n||s&&s(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function hr(t,o,e,i){if(!o)return[];let n=t.getMonths(o.year);if(e&&o.year===e.year){let s=n.findIndex(r=>r===e.month);n=n.slice(s)}if(i&&o.year===i.year){let s=n.findIndex(r=>r===i.month);n=n.slice(0,s+1)}return n}function pr(t,o,e){if(!t)return[];let i=o?Math.max(o.year,t.year-500):t.year-10,s=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,r=Array(s);for(let a=0;a{let f=Object.assign(t.getNext(o,"m",u),{day:1});if(r[u]=null,!n){let p=a.findIndex(h=>h.firstDate.equals(f));p!==-1&&(r[u]=a.splice(p,1)[0])}return f}).forEach((d,u)=>{r[u]===null&&(r[u]=mr(t,d,e,i,a.shift()||{}))}),r}function mr(t,o,e,i,n={}){let{dayTemplateData:s,minDate:r,maxDate:a,firstDayOfWeek:l,markDisabled:d,outsideDays:u,weekdayWidth:f,weekdaysVisible:p}=e,h=t.getToday();n.firstDate=null,n.lastDate=null,n.number=o.month,n.year=o.year,n.weeks=n.weeks||[],n.weekdays=n.weekdays||[],o=vr(t,o,l),p||(n.weekdays.length=0);for(let _=0;_w.date),l),v.collapsed=u==="collapsed"&&g[0].date.month!==n.number&&g[g.length-1].date.month!==n.number}return n}function vr(t,o,e){let i=t.getDaysPerWeek(),n=new re(o.year,o.month,1),s=t.getWeekday(n)%i;return t.getPrev(n,"d",(i+s-e)%i)}var ut=(()=>{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""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>new br,providedIn:"root"})}}return t})(),br=(()=>{class t extends ut{constructor(){super(...arguments),this._locale=c(kn),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short",timeZone:"UTC"}).format(Date.UTC(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long",timeZone:"UTC"}).format(Date.UTC(2e3,e)))}getWeekdayLabel(e,i="narrow"){return[1,2,3,4,5,6,7].map(s=>Intl.DateTimeFormat(this._locale,{weekday:i,timeZone:"UTC"}).format(Date.UTC(2e3,4,s)))[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 Fn(i,"fullDate",this._locale)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),tn=(()=>{class t{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=ye(e),q(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=ye(e),q(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(wt(this._state.maxDate,i))return{maxDate:i}},minDate:e=>{let i=this.toValidDate(e,null);if(wt(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,n=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==i||this._state.weekdaysVisible!==n)return{weekdayWidth:i,weekdaysVisible:n}}},this._calendar=c(bi),this._i18n=c(ut),this._model$=new j,this._dateSelect$=new j,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(we(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(we(e=>e!==null))}set(e){let i=Object.keys(e).map(n=>this._VALIDATORS[n](e[n])).reduce((n,s)=>Je(Je({},n),s),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&wt(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){en(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||uo(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){let n=this.toValidDate(e,null);n!=null&&!this._state.disabled&&(wt(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),i.emitEvent&&en(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,i){let n=re.from(e);return i===void 0&&(i=this._calendar.getToday()),this._calendar.isValid(n)?n: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:n,selectedDate:s,focusDate:r,focusVisible:a,disabled:l,outsideDays:d}=e;e.months.forEach(u=>{u.weeks.forEach(f=>{f.days.forEach(p=>{r&&(p.context.focused=r.equals(p.date)&&a),p.tabindex=!l&&r&&p.date.equals(r)&&r.month===u.number?0:-1,l===!0&&(p.context.disabled=!0),s!==void 0&&(p.context.selected=s!==null&&s.equals(p.date)),u.number!==p.date.month&&(p.hidden=d==="hidden"||d==="collapsed"||n>1&&p.date.after(i[0].firstDate)&&p.date.before(i[n-1].lastDate))})})})}_updateState(e){let i=Object.assign({},this._state,e),n=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(ur(i.minDate,i.maxDate),i.focusDate=di(i.focusDate,i.minDate,i.maxDate),i.firstDate=di(i.firstDate,i.minDate,i.maxDate),n=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(n=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=di(i.focusDate,i.minDate,i.maxDate),n=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=di(i.firstDate,i.minDate,i.maxDate),n=i.firstDate),n){let s="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,r=gr(this._calendar,n,i,this._i18n,s);i.months=r,i.firstDate=r[0].firstDate,i.lastDate=r[r.length-1].lastDate,"selectedDate"in e&&!en(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=n);let a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;i.navigation==="select"?(("minDate"in e||"maxDate"in e||i.selectBoxes.years.length===0||a)&&(i.selectBoxes.years=pr(i.firstDate,i.minDate,i.maxDate)),("minDate"in e||"maxDate"in e||i.selectBoxes.months.length===0||a)&&(i.selectBoxes.months=hr(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},(i.navigation==="arrows"||i.navigation==="select")&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||_r(this._calendar,i.firstDate,i.minDate),i.nextDisabled=i.disabled||fr(this._calendar,i.lastDate,i.maxDate))}return i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),pi=function(t){return t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT",t}(pi||{}),rn=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function yr(){return new wr}var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>yr(),providedIn:"root"})}}return t})(),wr=(()=>{class t extends yi{fromModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),Dr=(()=>{class t{processKey(e,i){let{state:n,calendar:s}=i;switch(e.key){case"PageUp":i.focusDate(s.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":i.focusDate(s.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case"End":i.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case"Home":i.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case"ArrowLeft":i.focusDate(s.getPrev(n.focusedDate,"d",1));break;case"ArrowUp":i.focusDate(s.getPrev(n.focusedDate,"d",s.getDaysPerWeek()));break;case"ArrowRight":i.focusDate(s.getNext(n.focusedDate,"d",1));break;case"ArrowDown":i.focusDate(s.getNext(n.focusedDate,"d",s.getDaysPerWeek()));break;case"Enter":case" ":i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Tr=(()=>{class t{constructor(){this.i18n=c(ut)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(i,n){i&2&&U("bg-primary",n.selected)("text-white",n.selected)("text-muted",n.isMuted())("outside",n.isMuted())("active",n.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:ls,decls:1,vars:1,template:function(i,n){i&1&&de(0),i&2&&Oe(n.i18n.getDayNumerals(n.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 c,$a as Se,Ba as _t,Ea as Yt,F as pt,G as Tn,Hb as Rt,I as En,Ia as le,Jb as An,Ka as K,Lb as xn,Ma as Nn,Na as Cn,P as Mi,Pa as x,Qa as xi,R as W,Ra as Ne,Rb as Pt,S as Ot,Sa as I,Sb as kn,Ta as U,Tb as We,U as Jt,Ua as Ze,V as Ri,W as ft,Wb as Bn,X as N,Xa as se,Xb as Bi,Ya as Zt,Yb as In,Z as Sn,Za as Xe,Zb as ei,_a as Ee,_b as me,a as Je,aa as Pi,ab as O,ac as Fn,b as zt,bb as C,ca as qt,cb as Ce,da as Fe,db as Mn,e as Kt,ea as De,eb as Rn,f as j,fa as Te,fb as Pn,fc as At,g as mn,gb as et,h as vn,hb as Me,ia as Le,ib as ee,id as ti,ja as On,jb as T,k as bn,ka as Z,kb as Ct,l as St,la as He,lb as Mt,ld as Ln,ma as S,n as qe,na as ce,ob as Re,p as yn,pb as tt,qb as ie,ra as X,rb as ne,t as z,ta as Ai,u as wn,ub as Xt,va as Nt,vb as de,w as Dn,wa as Ye,wb as Oe,x as we,xb as ki,y as Ci,ya as y,z as Qt}from"./chunk-NEW5VGRB.js";function it(t){t||(qt(it),t=c(He));let o=new Kt(e=>t.onDestroy(e.next.bind(e)));return e=>e.pipe(W(o))}function So(t,o){!o?.injector&&qt(So);let e=o?.injector??c(Z),i=new vn(1),n=In(()=>{let s;try{s=t()}catch(r){Bi(()=>i.error(r));return}Bi(()=>i.next(s))},{injector:e,manualCleanup:!0});return e.get(He).onDestroy(()=>{n.destroy(),i.complete()}),i.asObservable()}function Oo(t,o){let e=!o?.manualCleanup;e&&!o?.injector&&qt(Oo);let i=e?o?.injector?.get(He)??c(He):null,n=No(o?.equal),s;o?.requireSync?s=Ai({kind:0},{equal:n}):s=Ai({kind:1,value:o?.initialValue},{equal:n});let r=t.subscribe({next:a=>s.set({kind:1,value:a}),error:a=>{if(o?.rejectErrors)throw a;s.set({kind:2,error:a})}});if(o?.requireSync&&s().kind===0)throw new Ri(601,!1);return i?.onDestroy(r.unsubscribe.bind(r)),Bn(()=>{let a=s();switch(a.kind){case 1:return a.value;case 2:throw a.error;case 0:throw new Ri(601,!1)}},{equal:o?.equal})}function No(t=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&t(o.value,e.value)}var k="top",Q="bottom",G="right",F="left",ii="auto",Ue=[k,Q,G,F],Pe="start",nt="end",Hn="clippingParents",ni="viewport",gt="popper",Wn="reference",Ii=Ue.reduce(function(t,o){return t.concat([o+"-"+Pe,o+"-"+nt])},[]),oi=[].concat(Ue,[ii]).reduce(function(t,o){return t.concat([o,o+"-"+Pe,o+"-"+nt])},[]),Co="beforeRead",Mo="read",Ro="afterRead",Po="beforeMain",Ao="main",xo="afterMain",ko="beforeWrite",Bo="write",Io="afterWrite",Un=[Co,Mo,Ro,Po,Ao,xo,ko,Bo,Io];function V(t){return t?(t.nodeName||"").toLowerCase():null}function A(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function ue(t){var o=A(t).Element;return t instanceof o||t instanceof Element}function L(t){var o=A(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function mt(t){if(typeof ShadowRoot>"u")return!1;var o=A(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Fo(t){var o=t.state;Object.keys(o.elements).forEach(function(e){var i=o.styles[e]||{},n=o.attributes[e]||{},s=o.elements[e];!L(s)||!V(s)||(Object.assign(s.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function Lo(t){var o=t.state,e={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,e.popper),o.styles=e,o.elements.arrow&&Object.assign(o.elements.arrow.style,e.arrow),function(){Object.keys(o.elements).forEach(function(i){var n=o.elements[i],s=o.attributes[i]||{},r=Object.keys(o.styles.hasOwnProperty(i)?o.styles[i]:e[i]),a=r.reduce(function(l,d){return l[d]="",l},{});!L(n)||!V(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}var Gn={name:"applyStyles",enabled:!0,phase:"write",fn:Fo,effect:Lo,requires:["computeStyles"]};function $(t){return t.split("-")[0]}var ve=Math.max,ot=Math.min,Ae=Math.round;function vt(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function xt(){return!/^((?!chrome|android).)*safari/i.test(vt())}function he(t,o,e){o===void 0&&(o=!1),e===void 0&&(e=!1);var i=t.getBoundingClientRect(),n=1,s=1;o&&L(t)&&(n=t.offsetWidth>0&&Ae(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Ae(i.height)/t.offsetHeight||1);var r=ue(t)?A(t):window,a=r.visualViewport,l=!xt()&&e,d=(i.left+(l&&a?a.offsetLeft:0))/n,u=(i.top+(l&&a?a.offsetTop:0))/s,f=i.width/n,p=i.height/s;return{width:f,height:p,top:u,right:d+f,bottom:u+p,left:d,x:d,y:u}}function st(t){var o=he(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(o.width-e)<=1&&(e=o.width),Math.abs(o.height-i)<=1&&(i=o.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function kt(t,o){var e=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(e&&mt(e)){var i=o;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oe(t){return A(t).getComputedStyle(t)}function Fi(t){return["table","td","th"].indexOf(V(t))>=0}function J(t){return((ue(t)?t.ownerDocument:t.document)||window.document).documentElement}function xe(t){return V(t)==="html"?t:t.assignedSlot||t.parentNode||(mt(t)?t.host:null)||J(t)}function Vn(t){return!L(t)||oe(t).position==="fixed"?null:t.offsetParent}function Ho(t){var o=/firefox/i.test(vt()),e=/Trident/i.test(vt());if(e&&L(t)){var i=oe(t);if(i.position==="fixed")return null}var n=xe(t);for(mt(n)&&(n=n.host);L(n)&&["html","body"].indexOf(V(n))<0;){var s=oe(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||o&&s.willChange==="filter"||o&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(t){for(var o=A(t),e=Vn(t);e&&Fi(e)&&oe(e).position==="static";)e=Vn(e);return e&&(V(e)==="html"||V(e)==="body"&&oe(e).position==="static")?o:e||Ho(t)||o}function rt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function at(t,o,e){return ve(t,ot(o,e))}function $n(t,o,e){var i=at(t,o,e);return i>e?e:i}function Bt(){return{top:0,right:0,bottom:0,left:0}}function It(t){return Object.assign({},Bt(),t)}function Ft(t,o){return o.reduce(function(e,i){return e[i]=t,e},{})}var Wo=function(o,e){return o=typeof o=="function"?o(Object.assign({},e.rects,{placement:e.placement})):o,It(typeof o!="number"?o:Ft(o,Ue))};function Uo(t){var o,e=t.state,i=t.name,n=t.options,s=e.elements.arrow,r=e.modifiersData.popperOffsets,a=$(e.placement),l=rt(a),d=[F,G].indexOf(a)>=0,u=d?"height":"width";if(!(!s||!r)){var f=Wo(n.padding,e),p=st(s),h=l==="y"?k:F,_=l==="y"?Q:G,v=e.rects.reference[u]+e.rects.reference[l]-r[l]-e.rects.popper[u],g=r[l]-e.rects.reference[l],w=be(s),b=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,R=v/2-g/2,m=f[h],D=b-p[u]-f[_],E=b/2-p[u]/2+R,P=at(m,E,D),M=l;e.modifiersData[i]=(o={},o[M]=P,o.centerOffset=P-E,o)}}function Go(t){var o=t.state,e=t.options,i=e.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=o.elements.popper.querySelector(n),!n)||kt(o.elements.popper,n)&&(o.elements.arrow=n))}var Li={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Go,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pe(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,o){var e=t.x,i=t.y,n=o.devicePixelRatio||1;return{x:Ae(e*n)/n||0,y:Ae(i*n)/n||0}}function jn(t){var o,e=t.popper,i=t.popperRect,n=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,p=r.x,h=p===void 0?0:p,_=r.y,v=_===void 0?0:_,g=typeof u=="function"?u({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var w=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),R=F,m=k,D=window;if(d){var E=be(e),P="clientHeight",M="clientWidth";if(E===A(e)&&(E=J(e),oe(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,n===k||(n===F||n===G)&&s===nt){m=Q;var H=f&&E===D&&D.visualViewport?D.visualViewport.height:E[P];v-=H-i.height,v*=l?1:-1}if(n===F||(n===k||n===Q)&&s===nt){R=G;var B=f&&E===D&&D.visualViewport?D.visualViewport.width:E[M];h-=B-i.width,h*=l?1:-1}}var Y=Object.assign({position:a},d&&Vo),_e=u===!0?$o({x:h,y:v},A(e)):{x:h,y:v};if(h=_e.x,v=_e.y,l){var te;return Object.assign({},Y,(te={},te[m]=b?"0":"",te[R]=w?"0":"",te.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",te))}return Object.assign({},Y,(o={},o[m]=b?v+"px":"",o[R]=w?h+"px":"",o.transform="",o))}function jo(t){var o=t.state,e=t.options,i=e.gpuAcceleration,n=i===void 0?!0:i,s=e.adaptive,r=s===void 0?!0:s,a=e.roundOffsets,l=a===void 0?!0:a,d={placement:$(o.placement),variation:pe(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:n,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,jn(Object.assign({},d,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:r,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,jn(Object.assign({},d,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var zn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var si={passive:!0};function zo(t){var o=t.state,e=t.instance,i=t.options,n=i.scroll,s=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=A(o.elements.popper),d=[].concat(o.scrollParents.reference,o.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",e.update,si)}),a&&l.addEventListener("resize",e.update,si),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",e.update,si)}),a&&l.removeEventListener("resize",e.update,si)}}var Kn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zo,data:{}};var Ko={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t){return t.replace(/left|right|bottom|top/g,function(o){return Ko[o]})}var Qo={start:"end",end:"start"};function ri(t){return t.replace(/start|end/g,function(o){return Qo[o]})}function lt(t){var o=A(t),e=o.pageXOffset,i=o.pageYOffset;return{scrollLeft:e,scrollTop:i}}function ct(t){return he(J(t)).left+lt(t).scrollLeft}function Hi(t,o){var e=A(t),i=J(t),n=e.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){s=n.width,r=n.height;var d=xt();(d||!d&&o==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:r,x:a+ct(t),y:l}}function Wi(t){var o,e=J(t),i=lt(t),n=(o=t.ownerDocument)==null?void 0:o.body,s=ve(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ve(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+ct(t),l=-i.scrollTop;return oe(n||e).direction==="rtl"&&(a+=ve(e.clientWidth,n?n.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function dt(t){var o=oe(t),e=o.overflow,i=o.overflowX,n=o.overflowY;return/auto|scroll|overlay|hidden/.test(e+n+i)}function ai(t){return["html","body","#document"].indexOf(V(t))>=0?t.ownerDocument.body:L(t)&&dt(t)?t:ai(xe(t))}function Ge(t,o){var e;o===void 0&&(o=[]);var i=ai(t),n=i===((e=t.ownerDocument)==null?void 0:e.body),s=A(i),r=n?[s].concat(s.visualViewport||[],dt(i)?i:[]):i,a=o.concat(r);return n?a:a.concat(Ge(xe(r)))}function yt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jo(t,o){var e=he(t,!1,o==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Qn(t,o,e){return o===ni?yt(Hi(t,e)):ue(o)?Jo(o,e):yt(Wi(J(t)))}function qo(t){var o=Ge(xe(t)),e=["absolute","fixed"].indexOf(oe(t).position)>=0,i=e&&L(t)?be(t):t;return ue(i)?o.filter(function(n){return ue(n)&&kt(n,i)&&V(n)!=="body"}):[]}function Ui(t,o,e,i){var n=o==="clippingParents"?qo(t):[].concat(o),s=[].concat(n,[e]),r=s[0],a=s.reduce(function(l,d){var u=Qn(t,d,i);return l.top=ve(u.top,l.top),l.right=ot(u.right,l.right),l.bottom=ot(u.bottom,l.bottom),l.left=ve(u.left,l.left),l},Qn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Lt(t){var o=t.reference,e=t.element,i=t.placement,n=i?$(i):null,s=i?pe(i):null,r=o.x+o.width/2-e.width/2,a=o.y+o.height/2-e.height/2,l;switch(n){case k:l={x:r,y:o.y-e.height};break;case Q:l={x:r,y:o.y+o.height};break;case G:l={x:o.x+o.width,y:a};break;case F:l={x:o.x-e.width,y:a};break;default:l={x:o.x,y:o.y}}var d=n?rt(n):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case Pe:l[d]=l[d]-(o[u]/2-e[u]/2);break;case nt:l[d]=l[d]+(o[u]/2-e[u]/2);break;default:}}return l}function Ve(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=i===void 0?t.placement:i,s=e.strategy,r=s===void 0?t.strategy:s,a=e.boundary,l=a===void 0?Hn:a,d=e.rootBoundary,u=d===void 0?ni:d,f=e.elementContext,p=f===void 0?gt:f,h=e.altBoundary,_=h===void 0?!1:h,v=e.padding,g=v===void 0?0:v,w=It(typeof g!="number"?g:Ft(g,Ue)),b=p===gt?Wn:gt,R=t.rects.popper,m=t.elements[_?b:p],D=Ui(ue(m)?m:m.contextElement||J(t.elements.popper),l,u,r),E=he(t.elements.reference),P=Lt({reference:E,element:R,strategy:"absolute",placement:n}),M=yt(Object.assign({},R,P)),H=p===gt?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},Y=t.modifiersData.offset;if(p===gt&&Y){var _e=Y[n];Object.keys(B).forEach(function(te){var $e=[G,Q].indexOf(te)>=0?1:-1,je=[k,Q].indexOf(te)>=0?"y":"x";B[te]+=_e[je]*$e})}return B}function Gi(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=e.boundary,s=e.rootBoundary,r=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,d=l===void 0?oi:l,u=pe(i),f=u?a?Ii:Ii.filter(function(_){return pe(_)===u}):Ue,p=f.filter(function(_){return d.indexOf(_)>=0});p.length===0&&(p=f);var h=p.reduce(function(_,v){return _[v]=Ve(t,{placement:v,boundary:n,rootBoundary:s,padding:r})[$(v)],_},{});return Object.keys(h).sort(function(_,v){return h[_]-h[v]})}function Yo(t){if($(t)===ii)return[];var o=bt(t);return[ri(t),o,ri(o)]}function Zo(t){var o=t.state,e=t.options,i=t.name;if(!o.modifiersData[i]._skip){for(var n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!0:r,l=e.fallbackPlacements,d=e.padding,u=e.boundary,f=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,_=h===void 0?!0:h,v=e.allowedAutoPlacements,g=o.options.placement,w=$(g),b=w===g,R=l||(b||!_?[bt(g)]:Yo(g)),m=[g].concat(R).reduce(function(ht,Ie){return ht.concat($(Ie)===ii?Gi(o,{placement:Ie,boundary:u,rootBoundary:f,padding:d,flipVariations:_,allowedAutoPlacements:v}):Ie)},[]),D=o.rects.reference,E=o.rects.popper,P=new Map,M=!0,H=m[0],B=0;B=0,je=$e?"width":"height",ae=Ve(o,{placement:Y,boundary:u,rootBoundary:f,altBoundary:p,padding:d}),ge=$e?te?G:F:te?Q:k;D[je]>E[je]&&(ge=bt(ge));var Ut=bt(ge),ze=[];if(s&&ze.push(ae[_e]<=0),a&&ze.push(ae[ge]<=0,ae[Ut]<=0),ze.every(function(ht){return ht})){H=Y,M=!1;break}P.set(Y,ze)}if(M)for(var Gt=_?3:1,Ei=function(Ie){var Et=m.find(function($t){var Ke=P.get($t);if(Ke)return Ke.slice(0,Ie).every(function(Si){return Si})});if(Et)return H=Et,"break"},Tt=Gt;Tt>0;Tt--){var Vt=Ei(Tt);if(Vt==="break")break}o.placement!==H&&(o.modifiersData[i]._skip=!0,o.placement=H,o.reset=!0)}}var Vi={name:"flip",enabled:!0,phase:"main",fn:Zo,requiresIfExists:["offset"],data:{_skip:!1}};function Xo(t,o,e){var i=$(t),n=[F,k].indexOf(i)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},o,{placement:t})):e,r=s[0],a=s[1];return r=r||0,a=(a||0)*n,[F,G].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function es(t){var o=t.state,e=t.options,i=t.name,n=e.offset,s=n===void 0?[0,0]:n,r=oi.reduce(function(u,f){return u[f]=Xo(f,o.rects,s),u},{}),a=r[o.placement],l=a.x,d=a.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=d),o.modifiersData[i]=r}var $i={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:es};function ts(t){var o=t.state,e=t.name;o.modifiersData[e]=Lt({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var Jn={name:"popperOffsets",enabled:!0,phase:"read",fn:ts,data:{}};function ji(t){return t==="x"?"y":"x"}function is(t){var o=t.state,e=t.options,i=t.name,n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!1:r,l=e.boundary,d=e.rootBoundary,u=e.altBoundary,f=e.padding,p=e.tether,h=p===void 0?!0:p,_=e.tetherOffset,v=_===void 0?0:_,g=Ve(o,{boundary:l,rootBoundary:d,padding:f,altBoundary:u}),w=$(o.placement),b=pe(o.placement),R=!b,m=rt(w),D=ji(m),E=o.modifiersData.popperOffsets,P=o.rects.reference,M=o.rects.popper,H=typeof v=="function"?v(Object.assign({},o.rects,{placement:o.placement})):v,B=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,_e={x:0,y:0};if(E){if(s){var te,$e=m==="y"?k:F,je=m==="y"?Q:G,ae=m==="y"?"height":"width",ge=E[m],Ut=ge+g[$e],ze=ge-g[je],Gt=h?-M[ae]/2:0,Ei=b===Pe?P[ae]:M[ae],Tt=b===Pe?-M[ae]:-P[ae],Vt=o.elements.arrow,ht=h&&Vt?st(Vt):{width:0,height:0},Ie=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Bt(),Et=Ie[$e],$t=Ie[je],Ke=at(0,P[ae],ht[ae]),Si=R?P[ae]/2-Gt-Ke-Et-B.mainAxis:Ei-Ke-Et-B.mainAxis,bo=R?-P[ae]/2+Gt+Ke+$t+B.mainAxis:Tt+Ke+$t+B.mainAxis,Oi=o.elements.arrow&&be(o.elements.arrow),yo=Oi?m==="y"?Oi.clientTop||0:Oi.clientLeft||0:0,ln=(te=Y?.[m])!=null?te:0,wo=ge+Si-ln-yo,Do=ge+bo-ln,cn=at(h?ot(Ut,wo):Ut,ge,h?ve(ze,Do):ze);E[m]=cn,_e[m]=cn-ge}if(a){var dn,To=m==="x"?k:F,Eo=m==="x"?Q:G,Qe=E[D],jt=D==="y"?"height":"width",un=Qe+g[To],hn=Qe-g[Eo],Ni=[k,F].indexOf(w)!==-1,pn=(dn=Y?.[D])!=null?dn:0,fn=Ni?un:Qe-P[jt]-M[jt]-pn+B.altAxis,_n=Ni?Qe+P[jt]+M[jt]-pn-B.altAxis:hn,gn=h&&Ni?$n(fn,Qe,_n):at(h?fn:un,Qe,h?_n:hn);E[D]=gn,_e[D]=gn-Qe}o.modifiersData[i]=_e}}var zi={name:"preventOverflow",enabled:!0,phase:"main",fn:is,requiresIfExists:["offset"]};function Ki(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Qi(t){return t===A(t)||!L(t)?lt(t):Ki(t)}function ns(t){var o=t.getBoundingClientRect(),e=Ae(o.width)/t.offsetWidth||1,i=Ae(o.height)/t.offsetHeight||1;return e!==1||i!==1}function Ji(t,o,e){e===void 0&&(e=!1);var i=L(o),n=L(o)&&ns(o),s=J(o),r=he(t,n,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&((V(o)!=="body"||dt(s))&&(a=Qi(o)),L(o)?(l=he(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):s&&(l.x=ct(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function os(t){var o=new Map,e=new Set,i=[];t.forEach(function(s){o.set(s.name,s)});function n(s){e.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!e.has(a)){var l=o.get(a);l&&n(l)}}),i.push(s)}return t.forEach(function(s){e.has(s.name)||n(s)}),i}function qi(t){var o=os(t);return Un.reduce(function(e,i){return e.concat(o.filter(function(n){return n.phase===i}))},[])}function Yi(t){var o;return function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(t())})})),o}}function Zi(t){var o=t.reduce(function(e,i){var n=e[i.name];return e[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,e},{});return Object.keys(o).map(function(e){return o[e]})}var qn={placement:"bottom",modifiers:[],strategy:"absolute"};function Yn(){for(var t=arguments.length,o=new Array(t),e=0;e0?0:-1),y(2),ki(" ",n.i18n.getMonthLabel(e.firstDate)," "),y(),se(i!==n.months.length-1?3:-1)}}function ms(t,o){if(t&1&&Ee(0,gs,4,3,null,null,Xe),t&2){let e=T();Se(e.months)}}function vs(t,o){if(t&1&&(O(0,"div",1),de(1),C()),t&2){let e=T(2);y(),Oe(e.i18n.getWeekLabel())}}function bs(t,o){if(t&1&&(O(0,"div",2),de(1),C()),t&2){let e=o.$implicit;y(),Oe(e)}}function ys(t,o){if(t&1&&(O(0,"div",0),x(1,vs,2,1,"div",1),Ee(2,bs,2,1,"div",2,Zt),C()),t&2){let e=T();y(),se(e.datepicker.showWeekNumbers?1:-1),y(),Se(e.viewModel.weekdays)}}function ws(t,o){if(t&1&&(O(0,"div",4),de(1),C()),t&2){let e=T(2).$implicit,i=T();y(),Oe(i.i18n.getWeekNumerals(e.number))}}function Ds(t,o){}function Ts(t,o){if(t&1&&x(0,Ds,0,0,"ng-template",7),t&2){let e=T().$implicit,i=T(3);I("ngTemplateOutlet",i.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function Es(t,o){if(t&1){let e=et();O(0,"div",6),ee("click",function(n){let s=De(e).$implicit;return T(3).doSelect(s),Te(n.preventDefault())}),x(1,Ts,1,2,null,7),C()}if(t&2){let e=o.$implicit;U("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),I("tabindex",e.tabindex),Ne("aria-label",e.ariaLabel),y(),se(e.hidden?-1:1)}}function Ss(t,o){if(t&1&&(O(0,"div",3),x(1,ws,2,1,"div",4),Ee(2,Es,2,9,"div",5,Xe),C()),t&2){let e=T().$implicit,i=T();y(),se(i.datepicker.showWeekNumbers?1:-1),y(),Se(e.days)}}function Os(t,o){if(t&1&&x(0,Ss,4,1,"div",3),t&2){let e=o.$implicit;se(e.collapsed?-1:0)}}var Ns=["defaultDayTemplate"],Cs=["content"],Ms=t=>({$implicit:t});function Rs(t,o){if(t&1&&Ce(0,"div",8),t&2){let e=o.date,i=o.currentMonth,n=o.selected,s=o.disabled,r=o.focused;I("date",e)("currentMonth",i)("selected",n)("disabled",s)("focused",r)}}function Ps(t,o){if(t&1&&(O(0,"div",10),de(1),C()),t&2){let e=T().$implicit,i=T(2);y(),ki(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function As(t,o){if(t&1&&(O(0,"div",9),x(1,Ps,2,1,"div",10),Ce(2,"ngb-datepicker-month",11),C()),t&2){let e=o.$implicit,i=T(2);y(),se(i.navigation==="none"||i.displayMonths>1&&i.navigation==="select"?1:-1),y(),I("month",e.firstDate)}}function xs(t,o){if(t&1&&Ee(0,As,3,2,"div",9,Xe),t&2){let e=T();Se(e.model.months)}}function ks(t,o){if(t&1){let e=et();O(0,"ngb-datepicker-navigation",12),ee("navigate",function(n){De(e);let s=T();return Te(s.onNavigateEvent(n))})("select",function(n){De(e);let s=T();return Te(s.onNavigateDateSelect(n))}),C()}if(t&2){let e=T();I("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect",e.model.navigation==="select")("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function Bs(t,o){}function Is(t,o){}var Fs=["dialog"];function Ls(t,o){if(t&1&&(O(0,"strong",3),de(1),C()),t&2){let e=T();y(),Oe(e.header)}}function Hs(t,o){}function Ws(t,o){if(t&1){let e=et();O(0,"div",1),x(1,Hs,0,0,"ng-template",4),O(2,"button",5),ee("click",function(){De(e);let n=T();return Te(n.hide())}),C()()}if(t&2){let e=T(),i=Xt(1);y(),I("ngTemplateOutlet",e.contentHeaderTpl||i)}}function Us(t,o){if(t&1&&(O(0,"span"),de(1),C()),t&2){let e=T().$implicit,i=T();Ze(i.highlightClass),y(),Oe(e)}}function Gs(t,o){if(t&1&&(Mn(0),de(1),Rn()),t&2){let e=T().$implicit;y(),Oe(e)}}function Vs(t,o){if(t&1&&x(0,Us,2,4,"span",0)(1,Gs,2,1,"ng-container"),t&2){let e=o.$index;se(e%2!==0?0:1)}}var $s=(t,o,e)=>({result:t,term:o,formatter:e});function js(t,o){if(t&1&&Ce(0,"ngb-highlight",2),t&2){let e=o.result,i=o.term,n=o.formatter;I("result",n(e))("term",i)}}function zs(t,o){}function Ks(t,o){if(t&1){let e=et();O(0,"button",3),ee("mouseenter",function(){let n=De(e).$index,s=T();return Te(s.markActive(n))})("click",function(){let n=De(e).$implicit,s=T();return Te(s.select(n))}),x(1,zs,0,0,"ng-template",4),C()}if(t&2){let e=o.$implicit,i=o.$index,n=T(),s=Xt(1);U("active",i===n.activeIdx),I("id",n.id+"-"+i),y(),I("ngTemplateOutlet",n.resultTemplate||s)("ngTemplateOutletContext",xn(5,$s,e,n.term,n.formatter))}}var lo={animation:!0,transitionTimerDelayMs:5},Wt=(()=>{class t{constructor(){this.animation=lo.animation}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Qs=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Js(t){let{transitionDelay:o,transitionDuration:e}=window.getComputedStyle(t),i=parseFloat(o),n=parseFloat(e);return(i+n)*1e3}function ye(t){return parseInt(`${t}`,10)}function Ht(t){return t!=null?`${t}`:""}function Dt(t){return typeof t=="string"}function ke(t){return!isNaN(ye(t))}function q(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function hi(t){return t!=null}function qs(t){return t&&t.then}function Xn(t){return ke(t)?`0${t}`.slice(-2):""}function Ys(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Zs(t,o){return!o||typeof t.closest>"u"?null:t.closest(o)}function mi(t){return(t||document.body).getBoundingClientRect()}function Xs(t){return o=>new Kt(e=>{let i=r=>t.run(()=>e.next(r)),n=r=>t.run(()=>e.error(r)),s=()=>t.run(()=>e.complete());return o.subscribe({next:i,error:n,complete:s})})}function eo(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function co(t=document){let o=t?.activeElement;return o?o.shadowRoot?co(o.shadowRoot):o:null}var er=()=>{},{transitionTimerDelayMs:tr}=lo,li=new Map,fe=(t,o,e,i)=>{let n=i.context||{},s=li.get(o);if(s)switch(i.runningTransition){case"continue":return bn;case"stop":t.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),li.delete(o)}let r=e(o,i.animation,n)||er;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return t.run(()=>r()),St(void 0).pipe(Xs(t));let a=new j,l=new j,d=a.pipe(En(!0));li.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let u=Js(o);return t.runOutsideAngular(()=>{let f=z(o,"transitionend").pipe(W(d),we(({target:h})=>h===o)),p=wn(u+tr).pipe(W(d));Ci(p,f,l).pipe(W(d)).subscribe(()=>{li.delete(o),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function ir(t,o){if(typeof navigator>"u")return"0px";let{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[o]="";let n=t.getBoundingClientRect()[o]+"px";return i||e.remove("show"),n}var nr=(t,o,e)=>{let{direction:i,maxSize:n,dimension:s}=e,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=ir(t,s),e.maxSize=n,t.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),mi(t),r.add("collapsing")),t.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[s]=""}},or=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),to=(()=>{class t{constructor(){this._config=c(or),this._element=c(X),this._zone=c(ce),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,nr,{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()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&U("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return t})(),sr=0,th=(()=>{class t{constructor(){this._item=c(vi),this._viewRef=null,this.elementRef=c(X)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,_t,7),i&2){let r;ie(r=ne())&&(n._bodyTpl=r.first)}},viewQuery:function(i,n){if(i&1&&tt(rs,7,Yt),i&2){let s;ie(s=ne())&&(n._vcr=s.first)}},hostAttrs:[1,"accordion-body"],attrs:as,ngContentSelectors:gi,decls:3,vars:0,consts:[["container",""]],template:function(i,n){i&1&&(Ct(),Pn(0,null,0),Mt(2))},encapsulation:2})}}return t})(),rr=(()=>{class t{constructor(){this.item=c(vi),this.ngbCollapse=c(to)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,n){i&2&&(Me("id",n.item.collapseId),Ne("aria-labelledby",n.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[Cn([to])]})}}return t})();var ih=(()=>{class t{constructor(){this.item=c(vi)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,n){i&2&&U("collapsed",n.item.collapsed)}})}}return t})(),vi=(()=>{class t{constructor(){this._accordion=c(ar),this._cd=c(We),this._destroyRef=c(He),this._collapsed=!0,this._id=`ngb-accordion-item-${sr++}`,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){Dt(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(it(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),e.shown.pipe(it(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}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)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,rr,7),i&2){let r;ie(r=ne())&&(n._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,n){i&2&&Me("id",n.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]})}}return t})(),ar=(()=>{class t{constructor(){this._config=c(Qs),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)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordion",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,vi,4),i&2){let r;ie(r=ne())&&(n._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]})}}return t})();var re=class t{static from(o){return o instanceof t?o:o?new t(o.year,o.month,o.day):null}constructor(o,e,i){this.year=q(o)?o:null,this.month=q(e)?e:null,this.day=q(i)?i:null}equals(o){return o!=null&&this.year===o.year&&this.month===o.month&&this.day===o.day}before(o){return o?this.year===o.year?this.month===o.month?this.day===o.day?!1:this.dayo.day:this.month>o.month:this.year>o.year:!1}};function io(t){return new re(t.getFullYear(),t.getMonth()+1,t.getDate())}function ci(t){let o=new Date(t.year,t.month-1,t.day,12);return isNaN(o.getTime())||o.setFullYear(t.year),o}function lr(){return new cr}var bi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>lr(),providedIn:"root"})}}return t})(),cr=(()=>{class t extends bi{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",n=1){let s=ci(e),r=!0,a=s.getMonth();switch(i){case"y":s.setFullYear(s.getFullYear()+n);break;case"m":a+=n,s.setMonth(a),a=a%12,a<0&&(a=a+12);break;case"d":s.setDate(s.getDate()+n),r=!1;break;default:return e}return r&&s.getMonth()!==a&&s.setDate(0),io(s)}getPrev(e,i="d",n=1){return this.getNext(e,i,-n)}getWeekday(e){let n=ci(e).getDay();return n===0?7:n}getWeekNumber(e,i){i===7&&(i=0);let n=(11-i)%7,s=e[n],r=ci(s);r.setDate(r.getDate()+4-(r.getDay()||7));let a=r.getTime();return r.setMonth(0),r.setDate(1),Math.floor(Math.round((a-r.getTime())/864e5)/7)+1}getToday(){return io(new Date)}isValid(e){if(!e||!q(e.year)||!q(e.month)||!q(e.day)||e.year===0)return!1;let i=ci(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})();function wt(t,o){return!dr(t,o)}function uo(t,o){return!t&&!o?!1:!t||!o?!0:t.year!==o.year||t.month!==o.month}function dr(t,o){return!t&&!o||!!t&&!!o&&t.equals(o)}function ur(t,o){if(o&&t&&o.before(t))throw new Error(`'maxDate' ${o} should be greater than 'minDate' ${t}`)}function di(t,o,e){return t&&o&&t.before(o)?o:t&&e&&t.after(e)?e:t||null}function en(t,o){let{minDate:e,maxDate:i,disabled:n,markDisabled:s}=o;return!(t==null||n||s&&s(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function hr(t,o,e,i){if(!o)return[];let n=t.getMonths(o.year);if(e&&o.year===e.year){let s=n.findIndex(r=>r===e.month);n=n.slice(s)}if(i&&o.year===i.year){let s=n.findIndex(r=>r===i.month);n=n.slice(0,s+1)}return n}function pr(t,o,e){if(!t)return[];let i=o?Math.max(o.year,t.year-500):t.year-10,s=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,r=Array(s);for(let a=0;a{let f=Object.assign(t.getNext(o,"m",u),{day:1});if(r[u]=null,!n){let p=a.findIndex(h=>h.firstDate.equals(f));p!==-1&&(r[u]=a.splice(p,1)[0])}return f}).forEach((d,u)=>{r[u]===null&&(r[u]=mr(t,d,e,i,a.shift()||{}))}),r}function mr(t,o,e,i,n={}){let{dayTemplateData:s,minDate:r,maxDate:a,firstDayOfWeek:l,markDisabled:d,outsideDays:u,weekdayWidth:f,weekdaysVisible:p}=e,h=t.getToday();n.firstDate=null,n.lastDate=null,n.number=o.month,n.year=o.year,n.weeks=n.weeks||[],n.weekdays=n.weekdays||[],o=vr(t,o,l),p||(n.weekdays.length=0);for(let _=0;_w.date),l),v.collapsed=u==="collapsed"&&g[0].date.month!==n.number&&g[g.length-1].date.month!==n.number}return n}function vr(t,o,e){let i=t.getDaysPerWeek(),n=new re(o.year,o.month,1),s=t.getWeekday(n)%i;return t.getPrev(n,"d",(i+s-e)%i)}var ut=(()=>{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""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>new br,providedIn:"root"})}}return t})(),br=(()=>{class t extends ut{constructor(){super(...arguments),this._locale=c(kn),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short",timeZone:"UTC"}).format(Date.UTC(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long",timeZone:"UTC"}).format(Date.UTC(2e3,e)))}getWeekdayLabel(e,i="narrow"){return[1,2,3,4,5,6,7].map(s=>Intl.DateTimeFormat(this._locale,{weekday:i,timeZone:"UTC"}).format(Date.UTC(2e3,4,s)))[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 Fn(i,"fullDate",this._locale)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),tn=(()=>{class t{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=ye(e),q(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=ye(e),q(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(wt(this._state.maxDate,i))return{maxDate:i}},minDate:e=>{let i=this.toValidDate(e,null);if(wt(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,n=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==i||this._state.weekdaysVisible!==n)return{weekdayWidth:i,weekdaysVisible:n}}},this._calendar=c(bi),this._i18n=c(ut),this._model$=new j,this._dateSelect$=new j,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(we(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(we(e=>e!==null))}set(e){let i=Object.keys(e).map(n=>this._VALIDATORS[n](e[n])).reduce((n,s)=>Je(Je({},n),s),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&wt(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){en(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||uo(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){let n=this.toValidDate(e,null);n!=null&&!this._state.disabled&&(wt(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),i.emitEvent&&en(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,i){let n=re.from(e);return i===void 0&&(i=this._calendar.getToday()),this._calendar.isValid(n)?n: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:n,selectedDate:s,focusDate:r,focusVisible:a,disabled:l,outsideDays:d}=e;e.months.forEach(u=>{u.weeks.forEach(f=>{f.days.forEach(p=>{r&&(p.context.focused=r.equals(p.date)&&a),p.tabindex=!l&&r&&p.date.equals(r)&&r.month===u.number?0:-1,l===!0&&(p.context.disabled=!0),s!==void 0&&(p.context.selected=s!==null&&s.equals(p.date)),u.number!==p.date.month&&(p.hidden=d==="hidden"||d==="collapsed"||n>1&&p.date.after(i[0].firstDate)&&p.date.before(i[n-1].lastDate))})})})}_updateState(e){let i=Object.assign({},this._state,e),n=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(ur(i.minDate,i.maxDate),i.focusDate=di(i.focusDate,i.minDate,i.maxDate),i.firstDate=di(i.firstDate,i.minDate,i.maxDate),n=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(n=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=di(i.focusDate,i.minDate,i.maxDate),n=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=di(i.firstDate,i.minDate,i.maxDate),n=i.firstDate),n){let s="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,r=gr(this._calendar,n,i,this._i18n,s);i.months=r,i.firstDate=r[0].firstDate,i.lastDate=r[r.length-1].lastDate,"selectedDate"in e&&!en(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=n);let a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;i.navigation==="select"?(("minDate"in e||"maxDate"in e||i.selectBoxes.years.length===0||a)&&(i.selectBoxes.years=pr(i.firstDate,i.minDate,i.maxDate)),("minDate"in e||"maxDate"in e||i.selectBoxes.months.length===0||a)&&(i.selectBoxes.months=hr(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},(i.navigation==="arrows"||i.navigation==="select")&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||_r(this._calendar,i.firstDate,i.minDate),i.nextDisabled=i.disabled||fr(this._calendar,i.lastDate,i.maxDate))}return i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),pi=function(t){return t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT",t}(pi||{}),rn=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function yr(){return new wr}var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>yr(),providedIn:"root"})}}return t})(),wr=(()=>{class t extends yi{fromModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),Dr=(()=>{class t{processKey(e,i){let{state:n,calendar:s}=i;switch(e.key){case"PageUp":i.focusDate(s.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":i.focusDate(s.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case"End":i.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case"Home":i.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case"ArrowLeft":i.focusDate(s.getPrev(n.focusedDate,"d",1));break;case"ArrowUp":i.focusDate(s.getPrev(n.focusedDate,"d",s.getDaysPerWeek()));break;case"ArrowRight":i.focusDate(s.getNext(n.focusedDate,"d",1));break;case"ArrowDown":i.focusDate(s.getNext(n.focusedDate,"d",s.getDaysPerWeek()));break;case"Enter":case" ":i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Tr=(()=>{class t{constructor(){this.i18n=c(ut)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(i,n){i&2&&U("bg-primary",n.selected)("text-white",n.selected)("text-muted",n.isMuted())("outside",n.isMuted())("active",n.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:ls,decls:1,vars:1,template:function(i,n){i&1&&de(0),i&2&&Oe(n.i18n.getDayNumerals(n.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})}}return t})(),Er=(()=>{class t{constructor(){this._month=-1,this._year=-1,this.i18n=c(ut),this.select=new S}changeMonth(e){this.select.emit(new re(this.date.year,ye(e),1))}changeYear(e){this.select.emit(new re(ye(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}`))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(i,n){if(i&1&&(tt(cs,7,X),tt(ds,7,X)),i&2){let s;ie(s=ne())&&(n.monthSelect=s.first),ie(s=ne())&&(n.yearSelect=s.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},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 n;n=$localize`:@@ngb.datepicker.select-year:Select year`;let s;return s=$localize`:@@ngb.datepicker.select-year:Select year`,[["month",""],["year",""],["aria-label",e,"title",i,1,"form-select",3,"change","disabled"],[3,"value"],["aria-label",n,"title",s,1,"form-select",3,"change","disabled"]]},template:function(i,n){if(i&1){let s=et();O(0,"select",2,0),ee("change",function(a){return De(s),Te(n.changeMonth(a.target.value))}),Ee(2,us,2,3,"option",3,Xe),C(),O(4,"select",4,1),ee("change",function(a){return De(s),Te(n.changeYear(a.target.value))}),Ee(6,hs,2,2,"option",3,Xe),C()}i&2&&(I("disabled",n.disabled),y(2),Se(n.months),y(2),I("disabled",n.disabled),y(2),Se(n.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})}}return t})(),Sr=(()=>{class t{constructor(){this.navigation=pi,this.i18n=c(ut),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)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({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"},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 n;n=$localize`:@@ngb.datepicker.next-month:Next month`;let s;return s=$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",n,"title",s,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,n){i&1&&(O(0,"div",0)(1,"button",1),ee("click",function(r){return n.onClickPrev(r)}),Ce(2,"span",2),C()(),x(3,ps,1,4,"ngb-datepicker-navigation-select",3)(4,ms,2,0),O(5,"div",4)(6,"button",5),ee("click",function(r){return n.onClickNext(r)}),Ce(7,"span",2),C()()),i&2&&(y(),I("disabled",n.prevDisabled),y(2),se(n.showSelect?3:-1),y(),se(n.showSelect?-1:4),y(2),I("disabled",n.nextDisabled))},dependencies:[Er],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})}}return t})(),Or=(()=>{class t{constructor(){this.templateRef=c(_t)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["ng-template","ngbDatepickerContent",""]]})}}return t})(),Nr=(()=>{class t{constructor(){this._keyboardService=c(Dr),this._service=c(tn),this.i18n=c(ut),this.datepicker=c(ho)}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)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(i,n){i&1&&ee("keydown",function(r){return n.onKeyDown(r)})},inputs:{month:"month"},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,n){i&1&&(x(0,ys,4,1,"div",0),Ee(1,Os,1,1,null,null,Xe)),i&2&&(se(n.viewModel.weekdays.length>0?0:-1),y(),Se(n.viewModel.weeks))},dependencies:[At],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-S3H6YSFW.js b/public/apps/webapp-schulverwaltung/chunk-S3H6YSFW.js deleted file mode 100644 index 5ec50b09..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-S3H6YSFW.js +++ /dev/null @@ -1,9 +0,0 @@ -var X_=Object.defineProperty,ex=Object.defineProperties;var tx=Object.getOwnPropertyDescriptors;var na=Object.getOwnPropertySymbols;var ng=Object.prototype.hasOwnProperty,rg=Object.prototype.propertyIsEnumerable;var tg=(e,t,n)=>t in e?X_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||={})ng.call(t,n)&&tg(e,n,t[n]);if(na)for(var n of na(t))rg.call(t,n)&&tg(e,n,t[n]);return e},F=(e,t)=>ex(e,tx(t));var nx=(e,t)=>{var n={};for(var r in e)ng.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&na)for(var r of na(e))t.indexOf(r)<0&&rg.call(e,r)&&(n[r]=e[r]);return n};var Cc=(e,t,n)=>new Promise((r,o)=>{var i=u=>{try{a(n.next(u))}catch(l){o(l)}},s=u=>{try{a(n.throw(u))}catch(l){o(l)}},a=u=>u.done?r(u.value):Promise.resolve(u.value).then(i,s);a((n=n.apply(e,t)).next())});function ig(e,t){return Object.is(e,t)}var ve=null,bi=!1,xc=1,Be=Symbol("SIGNAL");function V(e){let t=ve;return ve=e,t}function sg(){return ve}function rx(){return bi}var pr={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,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ei(e){if(bi)throw new Error("");if(ve===null)return;ve.consumerOnSignalRead(e);let t=ve.nextProducerIndex++;if(ia(ve),te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function _i(e){ia(e);for(let t=0;t0}function ia(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function fg(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function pg(e){return e.producerNode!==void 0}function hg(e){let t=Object.create(ix);t.computation=e;let n=()=>{if(ag(t),Ei(t),t.value===ra)throw t.error;return t.value};return n[Be]=t,n}var Ec=Symbol("UNSET"),Ic=Symbol("COMPUTING"),ra=Symbol("ERRORED"),ix=F(y({},pr),{value:Ec,dirty:!0,error:null,equal:ig,kind:"computed",producerMustRecompute(e){return e.value===Ec||e.value===Ic},producerRecomputeValue(e){if(e.value===Ic)throw new Error("Detected cycle in computations.");let t=e.value;e.value=Ic;let n=Qr(e),r,o=!1;try{r=e.computation(),V(null),o=t!==Ec&&t!==ra&&r!==ra&&e.equal(t,r)}catch(i){r=ra,e.error=i}finally{Ii(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function sx(){throw new Error}var gg=sx;function mg(){gg()}function vg(e){gg=e}var ax=null;function yg(e){let t=Object.create(Tc);t.value=e;let n=()=>(Ei(t),t.value);return n[Be]=t,n}function xi(e,t){lg()||mg(),e.equal(e.value,t)||(e.value=t,ux(e))}function Dg(e,t){lg()||mg(),xi(e,t(e.value))}var Tc=F(y({},pr),{equal:ig,value:void 0,kind:"signal"});function ux(e){e.version++,ox(),ug(e),ax?.()}function wg(e,t,n){let r=Object.create(lx);n&&(r.consumerAllowSignalWrites=!0),r.fn=e,r.schedule=t;let o=u=>{r.cleanupFn=u};function i(u){return u.fn===null&&u.schedule===null}function s(u){i(u)||(Jr(u),u.cleanupFn(),u.fn=null,u.schedule=null,u.cleanupFn=_c)}let a=()=>{if(r.fn===null)return;if(rx())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(r.dirty=!1,r.hasRun&&!_i(r))return;r.hasRun=!0;let u=Qr(r);try{r.cleanupFn(),r.cleanupFn=_c,r.fn(o)}finally{Ii(r,u)}};return r.ref={notify:()=>cg(r),run:a,cleanup:()=>r.cleanupFn(),destroy:()=>s(r),[Be]:r},r.ref}var _c=()=>{},lx=F(y({},pr),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{e.schedule!==null&&e.schedule(e.ref)},hasRun:!1,cleanupFn:_c});function S(e){return typeof e=="function"}function Xr(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var sa=Xr(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription: -${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(` - `)}`:"",this.name="UnsubscriptionError",this.errors=n});function hr(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var se=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(S(r))try{r()}catch(i){t=i instanceof sa?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{bg(i)}catch(s){t=t??[],s instanceof sa?t=[...t,...s.errors]:t.push(s)}}if(t)throw new sa(t)}}add(t){var n;if(t&&t!==this)if(this.closed)bg(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&hr(n,t)}remove(t){let{_finalizers:n}=this;n&&hr(n,t),t instanceof e&&t._removeParent(this)}};se.EMPTY=(()=>{let e=new se;return e.closed=!0,e})();var Sc=se.EMPTY;function aa(e){return e instanceof se||e&&"closed"in e&&S(e.remove)&&S(e.add)&&S(e.unsubscribe)}function bg(e){S(e)?e():e.unsubscribe()}var Et={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var eo={setTimeout(e,t,...n){let{delegate:r}=eo;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=eo;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ua(e){eo.setTimeout(()=>{let{onUnhandledError:t}=Et;if(t)t(e);else throw e})}function Zt(){}var Cg=Mc("C",void 0,void 0);function Eg(e){return Mc("E",void 0,e)}function Ig(e){return Mc("N",e,void 0)}function Mc(e,t,n){return{kind:e,value:t,error:n}}var gr=null;function to(e){if(Et.useDeprecatedSynchronousErrorHandling){let t=!gr;if(t&&(gr={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=gr;if(gr=null,n)throw r}}else e()}function _g(e){Et.useDeprecatedSynchronousErrorHandling&&gr&&(gr.errorThrown=!0,gr.error=e)}var mr=class extends se{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,aa(t)&&t.add(this)):this.destination=fx}static create(t,n,r){return new Kt(t,n,r)}next(t){this.isStopped?Nc(Ig(t),this):this._next(t)}error(t){this.isStopped?Nc(Eg(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Nc(Cg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},cx=Function.prototype.bind;function Ac(e,t){return cx.call(e,t)}var Rc=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){la(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){la(r)}else la(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){la(n)}}},Kt=class extends mr{constructor(t,n,r){super();let o;if(S(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&Et.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&Ac(t.next,i),error:t.error&&Ac(t.error,i),complete:t.complete&&Ac(t.complete,i)}):o=t}this.destination=new Rc(o)}};function la(e){Et.useDeprecatedSynchronousErrorHandling?_g(e):ua(e)}function dx(e){throw e}function Nc(e,t){let{onStoppedNotification:n}=Et;n&&eo.setTimeout(()=>n(e,t))}var fx={closed:!0,next:Zt,error:dx,complete:Zt};var no=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ye(e){return e}function Oc(...e){return Fc(e)}function Fc(e){return e.length===0?ye:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var O=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,o){let i=hx(n)?n:new Kt(n,r,o);return to(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=xg(r),new r((o,i)=>{let s=new Kt({next:a=>{try{n(a)}catch(u){i(u),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[no](){return this}pipe(...n){return Fc(n)(this)}toPromise(n){return n=xg(n),new n((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=t=>new e(t),e})();function xg(e){var t;return(t=e??Et.Promise)!==null&&t!==void 0?t:Promise}function px(e){return e&&S(e.next)&&S(e.error)&&S(e.complete)}function hx(e){return e&&e instanceof mr||px(e)&&aa(e)}function Pc(e){return S(e?.lift)}function M(e){return t=>{if(Pc(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function x(e,t,n,r,o){return new kc(e,t,n,r,o)}var kc=class extends mr{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(u){t.error(u)}}:super._next,this._error=o?function(a){try{o(a)}catch(u){t.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function ro(){return M((e,t)=>{let n=null;e._refCount++;let r=x(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){n=null;return}let o=e._connection,i=n;n=null,o&&(!i||o===i)&&o.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}var oo=class extends O{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,Pc(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new se;let n=this.getSubject();t.add(this.source.subscribe(x(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=se.EMPTY)}return t}refCount(){return ro()(this)}};var io={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=io;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let o=t(i=>{n=void 0,e(i)});return new se(()=>n?.(o))},requestAnimationFrame(...e){let{delegate:t}=io;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=io;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0};var Tg=Xr(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var J=(()=>{class e extends O{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new ca(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Tg}next(n){to(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){to(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){to(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:o,observers:i}=this;return r||o?Sc:(this.currentObservers=null,i.push(n),new se(()=>{this.currentObservers=null,hr(i,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:o,isStopped:i}=this;r?n.error(o):i&&n.complete()}asObservable(){let n=new O;return n.source=this,n}}return e.create=(t,n)=>new ca(t,n),e})(),ca=class extends J{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:Sc}};var Me=class extends J{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Ti={now(){return(Ti.delegate||Date).now()},delegate:void 0};var Si=class extends J{constructor(t=1/0,n=1/0,r=Ti){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){let{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;n||(r.push(t),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;sSg(t)&&e()),t},clearImmediate(e){Sg(e)}};var{setImmediate:mx,clearImmediate:vx}=Mg,Ai={setImmediate(...e){let{delegate:t}=Ai;return(t?.setImmediate||mx)(...e)},clearImmediate(e){let{delegate:t}=Ai;return(t?.clearImmediate||vx)(e)},delegate:void 0};var fa=class extends Tn{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return r!==null&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Ai.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,n,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(t,n,r);let{actions:i}=t;n!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==n&&(Ai.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))}};var so=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};so.now=Ti.now;var Sn=class extends so{constructor(t,n=so.now){super(t,n),this.actions=[],this._active=!1}flush(t){let{actions:n}=this;if(this._active){n.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}};var pa=class extends Sn{flush(t){this._active=!0;let n=this._scheduled;this._scheduled=void 0;let{actions:r}=this,o;t=t||r.shift();do if(o=t.execute(t.state,t.delay))break;while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}};var yx=new pa(fa);var It=new Sn(Tn),Ag=It;var ha=class extends Tn{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return r!==null&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=io.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,n,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(t,n,r);let{actions:i}=t;n!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==n&&(io.cancelAnimationFrame(n),t._scheduled=void 0)}};var ga=class extends Sn{flush(t){this._active=!0;let n=this._scheduled;this._scheduled=void 0;let{actions:r}=this,o;t=t||r.shift();do if(o=t.execute(t.state,t.delay))break;while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}};var Dx=new ga(ha);var Ee=new O(e=>e.complete());function ma(e){return e&&S(e.schedule)}function jc(e){return e[e.length-1]}function Mn(e){return S(jc(e))?e.pop():void 0}function Pt(e){return ma(jc(e))?e.pop():void 0}function Ng(e,t){return typeof jc(e)=="number"?e.pop():t}function Og(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(c){try{l(r.next(c))}catch(d){s(d)}}function u(c){try{l(r.throw(c))}catch(d){s(d)}}function l(c){c.done?i(c.value):o(c.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function Rg(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vr(e){return this instanceof vr?(this.v=e,this):new vr(e)}function Fg(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(p){return function(h){return Promise.resolve(h).then(p,d)}}function a(p,h){r[p]&&(o[p]=function(g){return new Promise(function(m,D){i.push([p,g,m,D])>1||u(p,g)})},h&&(o[p]=h(o[p])))}function u(p,h){try{l(r[p](h))}catch(g){f(i[0][3],g)}}function l(p){p.value instanceof vr?Promise.resolve(p.value.v).then(c,d):f(i[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function f(p,h){p(h),i.shift(),i.length&&u(i[0][0],i[0][1])}}function Pg(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Rg=="function"?Rg(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,u){s=e[i](s),o(a,u,s.done,s.value)})}}function o(i,s,a,u){Promise.resolve(u).then(function(l){i({value:l,done:a})},s)}}var ao=e=>e&&typeof e.length=="number"&&typeof e!="function";function va(e){return S(e?.then)}function ya(e){return S(e[no])}function Da(e){return Symbol.asyncIterator&&S(e?.[Symbol.asyncIterator])}function wa(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function wx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ba=wx();function Ca(e){return S(e?.[ba])}function Ea(e){return Fg(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield vr(n.read());if(o)return yield vr(void 0);yield yield vr(r)}}finally{n.releaseLock()}})}function Ia(e){return S(e?.getReader)}function j(e){if(e instanceof O)return e;if(e!=null){if(ya(e))return bx(e);if(ao(e))return Cx(e);if(va(e))return Ex(e);if(Da(e))return kg(e);if(Ca(e))return Ix(e);if(Ia(e))return _x(e)}throw wa(e)}function bx(e){return new O(t=>{let n=e[no]();if(S(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Cx(e){return new O(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,ua)})}function Ix(e){return new O(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function kg(e){return new O(t=>{xx(e,t).catch(n=>t.error(n))})}function _x(e){return kg(Ea(e))}function xx(e,t){var n,r,o,i;return Og(this,void 0,void 0,function*(){try{for(n=Pg(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function Ge(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function _a(e,t=0){return M((n,r)=>{n.subscribe(x(r,o=>Ge(r,e,()=>r.next(o),t),()=>Ge(r,e,()=>r.complete(),t),o=>Ge(r,e,()=>r.error(o),t)))})}function xa(e,t=0){return M((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Lg(e,t){return j(e).pipe(xa(t),_a(t))}function Vg(e,t){return j(e).pipe(xa(t),_a(t))}function jg(e,t){return new O(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Ug(e,t){return new O(n=>{let r;return Ge(n,t,()=>{r=e[ba](),Ge(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>S(r?.return)&&r.return()})}function Ta(e,t){if(!e)throw new Error("Iterable cannot be null");return new O(n=>{Ge(n,t,()=>{let r=e[Symbol.asyncIterator]();Ge(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function Bg(e,t){return Ta(Ea(e),t)}function $g(e,t){if(e!=null){if(ya(e))return Lg(e,t);if(ao(e))return jg(e,t);if(va(e))return Vg(e,t);if(Da(e))return Ta(e,t);if(Ca(e))return Ug(e,t);if(Ia(e))return Bg(e,t)}throw wa(e)}function X(e,t){return t?$g(e,t):j(e)}function _(...e){let t=Pt(e);return X(e,t)}function An(e,t){let n=S(e)?e:()=>e,r=o=>o.error(n());return new O(t?o=>t.schedule(r,0,o):r)}function Yt(e){return!!e&&(e instanceof O||S(e.lift)&&S(e.subscribe))}var Qt=Xr(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Hg(e){return e instanceof Date&&!isNaN(e)}function A(e,t){return M((n,r)=>{let o=0;n.subscribe(x(r,i=>{r.next(e.call(t,i,o++))}))})}var{isArray:Tx}=Array;function Sx(e,t){return Tx(t)?e(...t):e(t)}function uo(e){return A(t=>Sx(e,t))}var{isArray:Mx}=Array,{getPrototypeOf:Ax,prototype:Nx,keys:Rx}=Object;function Sa(e){if(e.length===1){let t=e[0];if(Mx(t))return{args:t,keys:null};if(Ox(t)){let n=Rx(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function Ox(e){return e&&typeof e=="object"&&Ax(e)===Nx}function Ma(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function Aa(...e){let t=Pt(e),n=Mn(e),{args:r,keys:o}=Sa(e);if(r.length===0)return X([],t);let i=new O(Fx(r,t,o?s=>Ma(o,s):ye));return n?i.pipe(uo(n)):i}function Fx(e,t,n=ye){return r=>{zg(t,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let u=0;u{let l=X(e[u],t),c=!1;l.subscribe(x(r,d=>{i[u]=d,c||(c=!0,a--),a||r.next(n(i.slice()))},()=>{--s||r.complete()}))},r)},r)}}function zg(e,t,n){e?Ge(n,e,t):t()}function Gg(e,t,n,r,o,i,s,a){let u=[],l=0,c=0,d=!1,f=()=>{d&&!u.length&&!l&&t.complete()},p=g=>l{i&&t.next(g),l++;let m=!1;j(n(g,c++)).subscribe(x(t,D=>{o?.(D),i?p(D):t.next(D)},()=>{m=!0},void 0,()=>{if(m)try{for(l--;u.length&&lh(D)):h(D)}f()}catch(D){t.error(D)}}))};return e.subscribe(x(t,p,()=>{d=!0,f()})),()=>{a?.()}}function le(e,t,n=1/0){return S(t)?le((r,o)=>A((i,s)=>t(r,i,o,s))(j(e(r,o))),n):(typeof t=="number"&&(n=t),M((r,o)=>Gg(r,o,e,n)))}function Nn(e=1/0){return le(ye,e)}function Wg(){return Nn(1)}function tt(...e){return Wg()(X(e,Pt(e)))}function Jt(e){return new O(t=>{j(e()).subscribe(t)})}var Px={connector:()=>new J,resetOnDisconnect:!0};function kx(e,t=Px){let n=null,{connector:r,resetOnDisconnect:o=!0}=t,i=r(),s=new O(a=>i.subscribe(a));return s.connect=()=>((!n||n.closed)&&(n=Jt(()=>e).subscribe(i),o&&n.add(()=>i=r())),n),s}function Ni(...e){let t=Mn(e),{args:n,keys:r}=Sa(e),o=new O(i=>{let{length:s}=n;if(!s){i.complete();return}let a=new Array(s),u=s,l=s;for(let c=0;c{d||(d=!0,l--),a[c]=f},()=>u--,void 0,()=>{(!u||!d)&&(l||i.next(r?Ma(r,a):a),i.complete())}))}});return t?o.pipe(uo(t)):o}var Lx=["addListener","removeListener"],Vx=["addEventListener","removeEventListener"],jx=["on","off"];function Uc(e,t,n,r){if(S(n)&&(r=n,n=void 0),r)return Uc(e,t,n).pipe(uo(r));let[o,i]=$x(e)?Vx.map(s=>a=>e[s](t,a,n)):Ux(e)?Lx.map(qg(e,t)):Bx(e)?jx.map(qg(e,t)):[];if(!o&&ao(e))return le(s=>Uc(s,t,n))(j(e));if(!o)throw new TypeError("Invalid event target");return new O(s=>{let a=(...u)=>s.next(1i(a)})}function qg(e,t){return n=>r=>e[n](t,r)}function Ux(e){return S(e.addListener)&&S(e.removeListener)}function Bx(e){return S(e.on)&&S(e.off)}function $x(e){return S(e.addEventListener)&&S(e.removeEventListener)}function Xt(e=0,t,n=Ag){let r=-1;return t!=null&&(ma(t)?n=t:r=t),new O(o=>{let i=Hg(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function Hx(e=0,t=It){return e<0&&(e=0),Xt(e,e,t)}function zx(...e){let t=Pt(e),n=Ng(e,1/0),r=e;return r.length?r.length===1?j(r[0]):Nn(n)(X(r,t)):Ee}var{isArray:Gx}=Array;function Na(e){return e.length===1&&Gx(e[0])?e[0]:e}function Pe(e,t){return M((n,r)=>{let o=0;n.subscribe(x(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Wx(...e){return e=Na(e),e.length===1?j(e[0]):new O(qx(e))}function qx(e){return t=>{let n=[];for(let r=0;n&&!t.closed&&r{if(n){for(let i=0;i{let o=n.map(()=>[]),i=n.map(()=>!1);r.add(()=>{o=i=null});for(let s=0;!r.closed&&s{if(o[s].push(a),o.every(u=>u.length)){let u=o.map(l=>l.shift());r.next(t?t(...u):u),o.some((l,c)=>!l.length&&i[c])&&r.complete()}},()=>{i[s]=!0,!o[s].length&&r.complete()}));return()=>{o=i=null}}):Ee}function Zg(e){return M((t,n)=>{let r=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,r){r=!1;let l=o;o=null,n.next(l)}s&&n.complete()},u=()=>{i=null,s&&n.complete()};t.subscribe(x(n,l=>{r=!0,o=l,i||j(e(l)).subscribe(i=x(n,a,u))},()=>{s=!0,(!r||!i||i.closed)&&n.complete()}))})}function Kx(e,t=It){return Zg(()=>Xt(e,t))}function Rn(e){return M((t,n)=>{let r=null,o=!1,i;r=t.subscribe(x(n,void 0,void 0,s=>{i=j(e(s,Rn(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}function Kg(e,t,n,r,o){return(i,s)=>{let a=n,u=t,l=0;i.subscribe(x(s,c=>{let d=l++;u=a?e(u,c,d):(a=!0,c),r&&s.next(u)},o&&(()=>{a&&s.next(u),s.complete()})))}}function kt(e,t){return S(t)?le(e,t,1):le(e,1)}function Yg(e,t=It){return M((n,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let l=i;i=null,r.next(l)}};function u(){let l=s+e,c=t.now();if(c{i=l,s=t.now(),o||(o=t.schedule(u,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function On(e){return M((t,n)=>{let r=!1;t.subscribe(x(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function Ie(e){return e<=0?()=>Ee:M((t,n)=>{let r=0;t.subscribe(x(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function Qg(){return M((e,t)=>{e.subscribe(x(t,Zt))})}function Jg(e){return A(()=>e)}function Bc(e,t){return t?n=>tt(t.pipe(Ie(1),Qg()),n.pipe(Bc(e))):le((n,r)=>j(e(n,r)).pipe(Ie(1),Jg(n)))}function Yx(e,t=It){let n=Xt(e,t);return Bc(()=>n)}function Xg(e,t=ye){return e=e??Qx,M((n,r)=>{let o,i=!0;n.subscribe(x(r,s=>{let a=t(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}function Qx(e,t){return e===t}function Ra(e=Jx){return M((t,n)=>{let r=!1;t.subscribe(x(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function Jx(){return new Qt}function Xx(...e){return t=>tt(t,_(...e))}function Fn(e){return M((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function en(e,t){let n=arguments.length>=2;return r=>r.pipe(e?Pe((o,i)=>e(o,i,r)):ye,Ie(1),n?On(t):Ra(()=>new Qt))}function lo(e){return e<=0?()=>Ee:M((t,n)=>{let r=[];t.subscribe(x(n,o=>{r.push(o),e{for(let o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function $c(e,t){let n=arguments.length>=2;return r=>r.pipe(e?Pe((o,i)=>e(o,i,r)):ye,lo(1),n?On(t):Ra(()=>new Qt))}function Oa(e,t){return M(Kg(e,t,arguments.length>=2,!0))}function zc(e={}){let{connector:t=()=>new J,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,u,l=0,c=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},p=()=>{f(),s=u=void 0,c=d=!1},h=()=>{let g=s;p(),g?.unsubscribe()};return M((g,m)=>{l++,!d&&!c&&f();let D=u=u??t();m.add(()=>{l--,l===0&&!d&&!c&&(a=Hc(h,o))}),D.subscribe(m),!s&&l>0&&(s=new Kt({next:N=>D.next(N),error:N=>{d=!0,f(),a=Hc(p,n,N),D.error(N)},complete:()=>{c=!0,f(),a=Hc(p,r),D.complete()}}),j(g).subscribe(s))})(i)}}function Hc(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new Kt({next:()=>{r.unsubscribe(),e()}});return j(t(...n)).subscribe(r)}function Ri(e,t,n){let r,o=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:t=1/0,refCount:o=!1,scheduler:n}=e:r=e??1/0,zc({connector:()=>new Si(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function e0(e){return Pe((t,n)=>e<=n)}function Fa(...e){let t=Pt(e);return M((n,r)=>{(t?tt(e,n,t):tt(e,n)).subscribe(r)})}function De(e,t){return M((n,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();n.subscribe(x(r,u=>{o?.unsubscribe();let l=0,c=i++;j(e(u,c)).subscribe(o=x(r,d=>r.next(t?t(u,d,c,l++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function t0(){return De(ye)}function Pa(e){return M((t,n)=>{j(e).subscribe(x(n,()=>n.complete(),Zt)),!n.closed&&t.subscribe(n)})}function we(e,t,n){let r=S(e)||t||n?{next:e,error:t,complete:n}:e;return r?M((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(x(i,u=>{var l;(l=r.next)===null||l===void 0||l.call(r,u),i.next(u)},()=>{var u;a=!1,(u=r.complete)===null||u===void 0||u.call(r),i.complete()},u=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,u),i.error(u)},()=>{var u,l;a&&((u=r.unsubscribe)===null||u===void 0||u.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):ye}function em(e,t){return M((n,r)=>{let{leading:o=!0,trailing:i=!1}=t??{},s=!1,a=null,u=null,l=!1,c=()=>{u?.unsubscribe(),u=null,i&&(p(),l&&r.complete())},d=()=>{u=null,l&&r.complete()},f=h=>u=j(e(h)).subscribe(x(r,c,d)),p=()=>{if(s){s=!1;let h=a;a=null,r.next(h),!l&&f(h)}};n.subscribe(x(r,h=>{s=!0,a=h,!(u&&!u.closed)&&(o?p():f(h))},()=>{l=!0,!(i&&s&&u&&!u.closed)&&r.complete()}))})}function n0(e,t=It,n){let r=Xt(e,t);return em(()=>r,n)}function r0(...e){let t=Mn(e);return M((n,r)=>{let o=e.length,i=new Array(o),s=e.map(()=>!1),a=!1;for(let u=0;u{i[u]=l,!a&&!s[u]&&(s[u]=!0,(a=s.every(ye))&&(s=null))},Zt));n.subscribe(x(r,u=>{if(a){let l=[u,...i];r.next(t?t(...l):l)}}))})}var Gm="https://g.co/ng/security#xss",w=class extends Error{code;constructor(t,n){super(Eu(t,n)),this.code=t}};function Eu(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}var Iu=Symbol("InputSignalNode#UNSET"),Wm=F(y({},Tc),{transformFn:void 0,applyValueToInputSignal(e,t){xi(e,t)}});function qm(e,t){let n=Object.create(Wm);n.value=e,n.transformFn=t?.transform;function r(){if(Ei(n),n.value===Iu)throw new w(-950,!1);return n.value}return r[Be]=n,r}function Ki(e){return{toString:e}.toString()}var ka="__parameters__";function o0(e){return function(...n){if(e){let r=e(...n);for(let o in r)this[o]=r[o]}}}function Zm(e,t,n){return Ki(()=>{let r=o0(t);function o(...i){if(this instanceof o)return r.apply(this,i),this;let s=new o(...i);return a.annotation=s,a;function a(u,l,c){let d=u.hasOwnProperty(ka)?u[ka]:Object.defineProperty(u,ka,{value:[]})[ka];for(;d.length<=c;)d.push(null);return(d[c]=d[c]||[]).push(s),u}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=e,o.annotationCls=o,o})}var tn=globalThis;function Z(e){for(let t in e)if(e[t]===Z)return t;throw Error("Could not find renamed property on target object.")}function i0(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Ke(e){if(typeof e=="string")return e;if(Array.isArray(e))return"["+e.map(Ke).join(", ")+"]";if(e==null)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;let t=e.toString();if(t==null)return""+t;let n=t.indexOf(` -`);return n===-1?t:t.substring(0,n)}function rd(e,t){return e==null||e===""?t===null?"":t:t==null||t===""?e:e+" "+t}var s0=Z({__forward_ref__:Z});function Ne(e){return e.__forward_ref__=Ne,e.toString=function(){return Ke(this())},e}function Ae(e){return Km(e)?e():e}function Km(e){return typeof e=="function"&&e.hasOwnProperty(s0)&&e.__forward_ref__===Ne}function C(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function $t(e){return{providers:e.providers||[],imports:e.imports||[]}}function _u(e){return tm(e,Qm)||tm(e,Jm)}function Ym(e){return _u(e)!==null}function tm(e,t){return e.hasOwnProperty(t)?e[t]:null}function a0(e){let t=e&&(e[Qm]||e[Jm]);return t||null}function nm(e){return e&&(e.hasOwnProperty(rm)||e.hasOwnProperty(u0))?e[rm]:null}var Qm=Z({\u0275prov:Z}),rm=Z({\u0275inj:Z}),Jm=Z({ngInjectableDef:Z}),u0=Z({ngInjectorDef:Z}),E=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,n){this._desc=t,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=C({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Xm(e){return e&&!!e.\u0275providers}var l0=Z({\u0275cmp:Z}),c0=Z({\u0275dir:Z}),d0=Z({\u0275pipe:Z}),f0=Z({\u0275mod:Z}),Ka=Z({\u0275fac:Z}),ki=Z({__NG_ELEMENT_ID__:Z}),om=Z({__NG_ENV_ID__:Z});function qe(e){return typeof e=="string"?e:e==null?"":String(e)}function p0(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():qe(e)}function h0(e,t){let n=t?`. Dependency path: ${t.join(" > ")} > ${e}`:"";throw new w(-200,e)}function ff(e,t){throw new w(-201,!1)}var U=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(U||{}),od;function ev(){return od}function We(e){let t=od;return od=e,t}function tv(e,t,n){let r=_u(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&U.Optional)return null;if(t!==void 0)return t;ff(e,"Injector")}var g0={},Vi=g0,id="__NG_DI_FLAG__",Ya="ngTempTokenPath",m0="ngTokenPath",v0=/\n/gm,y0="\u0275",im="__source",go;function D0(){return go}function Pn(e){let t=go;return go=e,t}function w0(e,t=U.Default){if(go===void 0)throw new w(-203,!1);return go===null?tv(e,void 0,t):go.get(e,t&U.Optional?null:void 0,t)}function I(e,t=U.Default){return(ev()||w0)(Ae(e),t)}function v(e,t=U.Default){return I(e,xu(t))}function xu(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function sd(e){let t=[];for(let n=0;n ");else if(typeof t=="object"){let i=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];i.push(s+":"+(typeof a=="string"?JSON.stringify(a):Ke(a)))}o=`{${i.join(", ")}}`}return`${n}${r?"("+r+")":""}[${o}]: ${e.replace(v0,` - `)}`}var rv=nv(Zm("Optional"),8);var I0=nv(Zm("SkipSelf"),4);function wr(e,t){let n=e.hasOwnProperty(Ka);return n?e[Ka]:null}function _0(e,t,n){if(e.length!==t.length)return!1;for(let r=0;rArray.isArray(n)?pf(n,t):t(n))}function ov(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Qa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function T0(e,t){let n=[];for(let r=0;rt;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function Tu(e,t,n){let r=Yi(e,t);return r>=0?e[r|1]=n:(r=~r,S0(e,r,t,n)),r}function Gc(e,t){let n=Yi(e,t);if(n>=0)return e[n|1]}function Yi(e,t){return M0(e,t,1)}function M0(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<t?o=i:r=i+1}return~(o<{n.push(s)};return pf(t,s=>{let a=s;ad(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&dv(o,i),n}function dv(e,t){for(let n=0;n{t(i,r)})}}function ad(e,t,n,r){if(e=Ae(e),!e)return!1;let o=null,i=nm(e),s=!i&&Vn(e);if(!i&&!s){let u=e.ngModule;if(i=nm(u),i)o=u;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let u=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of u)ad(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;try{pf(i.imports,c=>{ad(c,t,n,r)&&(l||=[],l.push(c))})}finally{}l!==void 0&&dv(l,t)}if(!a){let l=wr(o)||(()=>new o);t({provide:o,useFactory:l,deps:Ze},o),t({provide:sv,useValue:o,multi:!0},o),t({provide:vo,useValue:()=>I(o),multi:!0},o)}let u=i.providers;if(u!=null&&!a){let l=e;gf(u,c=>{t(c,l)})}}else return!1;return o!==e&&e.providers!==void 0}function gf(e,t){for(let n of e)Xm(n)&&(n=n.\u0275providers),Array.isArray(n)?gf(n,t):t(n)}var N0=Z({provide:String,useValue:Z});function fv(e){return e!==null&&typeof e=="object"&&N0 in e}function R0(e){return!!(e&&e.useExisting)}function O0(e){return!!(e&&e.useFactory)}function yo(e){return typeof e=="function"}function F0(e){return!!e.useClass}var Su=new E(""),$a={},P0={},Wc;function Mu(){return Wc===void 0&&(Wc=new Ja),Wc}var Ye=class{},ji=class extends Ye{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,ld(t,s=>this.processProvider(s)),this.records.set(iv,co(void 0,this)),o.has("environment")&&this.records.set(Ye,co(void 0,this));let i=this.records.get(Su);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(sv,Ze,U.Self))}destroy(){Fi(this),this._destroyed=!0;let t=V(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),V(t)}}onDestroy(t){return Fi(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Fi(this);let n=Pn(this),r=We(void 0),o;try{return t()}finally{Pn(n),We(r)}}get(t,n=Vi,r=U.Default){if(Fi(this),t.hasOwnProperty(om))return t[om](this);r=xu(r);let o,i=Pn(this),s=We(void 0);try{if(!(r&U.SkipSelf)){let u=this.records.get(t);if(u===void 0){let l=U0(t)&&_u(t);l&&this.injectableDefInScope(l)?u=co(ud(t),$a):u=null,this.records.set(t,u)}if(u!=null)return this.hydrate(t,u)}let a=r&U.Self?Mu():this.parent;return n=r&U.Optional&&n===Vi?null:n,a.get(t,n)}catch(a){if(a.name==="NullInjectorError"){if((a[Ya]=a[Ya]||[]).unshift(Ke(t)),i)throw a;return C0(a,t,"R3InjectorError",this.source)}else throw a}finally{We(s),Pn(i)}}resolveInjectorInitializers(){let t=V(null),n=Pn(this),r=We(void 0),o;try{let i=this.get(vo,Ze,U.Self);for(let s of i)s()}finally{Pn(n),We(r),V(t)}}toString(){let t=[],n=this.records;for(let r of n.keys())t.push(Ke(r));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=Ae(t);let n=yo(t)?t:Ae(t&&t.provide),r=L0(t);if(!yo(t)&&t.multi===!0){let o=this.records.get(n);o||(o=co(void 0,$a,!0),o.factory=()=>sd(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n){let r=V(null);try{return n.value===$a&&(n.value=P0,n.value=n.factory()),typeof n.value=="object"&&n.value&&j0(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{V(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=Ae(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function ud(e){let t=_u(e),n=t!==null?t.factory:wr(e);if(n!==null)return n;if(e instanceof E)throw new w(204,!1);if(e instanceof Function)return k0(e);throw new w(204,!1)}function k0(e){if(e.length>0)throw new w(204,!1);let n=a0(e);return n!==null?()=>n.factory(e):()=>new e}function L0(e){if(fv(e))return co(void 0,e.useValue);{let t=pv(e);return co(t,$a)}}function pv(e,t,n){let r;if(yo(e)){let o=Ae(e);return wr(o)||ud(o)}else if(fv(e))r=()=>Ae(e.useValue);else if(O0(e))r=()=>e.useFactory(...sd(e.deps||[]));else if(R0(e))r=()=>I(Ae(e.useExisting));else{let o=Ae(e&&(e.useClass||e.provide));if(V0(e))r=()=>new o(...sd(e.deps));else return wr(o)||ud(o)}return r}function Fi(e){if(e.destroyed)throw new w(205,!1)}function co(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function V0(e){return!!e.deps}function j0(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function U0(e){return typeof e=="function"||typeof e=="object"&&e instanceof E}function ld(e,t){for(let n of e)Array.isArray(n)?ld(n,t):n&&Xm(n)?ld(n.\u0275providers,t):t(n)}function rt(e,t){e instanceof ji&&Fi(e);let n,r=Pn(e),o=We(void 0);try{return t()}finally{Pn(r),We(o)}}function hv(){return ev()!==void 0||D0()!=null}function Au(e){if(!hv())throw new w(-203,!1)}function B0(e){return typeof e=="function"}var ln=0,P=1,R=2,Le=3,Tt=4,Xe=5,Do=6,Xa=7,_e=8,Ui=9,rn=10,ae=11,Bi=12,sm=13,So=14,Qe=15,br=16,fo=17,on=18,Nu=19,gv=20,kn=21,Ha=22,Cr=23,nt=24,fe=25,mv=1;var Er=7,eu=8,wo=9,ke=10;function Ln(e){return Array.isArray(e)&&typeof e[mv]=="object"}function cn(e){return Array.isArray(e)&&e[mv]===!0}function mf(e){return(e.flags&4)!==0}function Nr(e){return e.componentOffset>-1}function Ru(e){return(e.flags&1)===1}function sn(e){return!!e.template}function tu(e){return(e[R]&512)!==0}function Qi(e){return(e[R]&256)===256}var cd=class{previousValue;currentValue;firstChange;constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function vv(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var pt=(()=>{let e=()=>yv;return e.ngInherit=!0,e})();function yv(e){return e.type.prototype.ngOnChanges&&(e.setInput=H0),$0}function $0(){let e=wv(this),t=e?.current;if(t){let n=e.previous;if(n===nn)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function H0(e,t,n,r,o){let i=this.declaredInputs[r],s=wv(e)||z0(e,{previous:nn,current:null}),a=s.current||(s.current={}),u=s.previous,l=u[i];a[i]=new cd(l&&l.currentValue,n,u===nn),vv(e,t,o,n)}var Dv="__ngSimpleChanges__";function wv(e){return e[Dv]||null}function z0(e,t){return e[Dv]=t}var am=null;var ft=function(e,t,n){am?.(e,t,n)},bv="svg",Cv="math";function Vt(e){for(;Array.isArray(e);)e=e[ln];return e}function Ev(e,t){return Vt(t[e])}function Mt(e,t){return Vt(t[e.index])}function vf(e,t){return e.data[t]}function Ji(e,t){return e[t]}function jt(e,t){let n=t[e];return Ln(n)?n:n[ln]}function G0(e){return(e[R]&4)===4}function yf(e){return(e[R]&128)===128}function W0(e){return cn(e[Le])}function jn(e,t){return t==null?null:e[t]}function Iv(e){e[fo]=0}function Df(e){e[R]&1024||(e[R]|=1024,yf(e)&&Xi(e))}function q0(e,t){for(;e>0;)t=t[So],e--;return t}function Ou(e){return!!(e[R]&9216||e[nt]?.dirty)}function dd(e){e[rn].changeDetectionScheduler?.notify(9),e[R]&64&&(e[R]|=1024),Ou(e)&&Xi(e)}function Xi(e){e[rn].changeDetectionScheduler?.notify(0);let t=Ir(e);for(;t!==null&&!(t[R]&8192||(t[R]|=8192,!yf(t)));)t=Ir(t)}function _v(e,t){if(Qi(e))throw new w(911,!1);e[kn]===null&&(e[kn]=[]),e[kn].push(t)}function Z0(e,t){if(e[kn]===null)return;let n=e[kn].indexOf(t);n!==-1&&e[kn].splice(n,1)}function Ir(e){let t=e[Le];return cn(t)?t[Le]:t}function xv(e){return e[Xa]??=[]}function Tv(e){return e.cleanup??=[]}function K0(e,t,n,r){let o=xv(t);o.push(n),e.firstCreatePass&&Tv(e).push(r,o.length-1)}var k={lFrame:kv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var fd=!1;function Y0(){return k.lFrame.elementDepthCount}function Q0(){k.lFrame.elementDepthCount++}function J0(){k.lFrame.elementDepthCount--}function Sv(){return k.bindingsEnabled}function Mv(){return k.skipHydrationRootTNode!==null}function X0(e){return k.skipHydrationRootTNode===e}function eT(){k.skipHydrationRootTNode=null}function T(){return k.lFrame.lView}function te(){return k.lFrame.tView}function Y5(e){return k.lFrame.contextLView=e,e[_e]}function Q5(e){return k.lFrame.contextLView=null,e}function je(){let e=Av();for(;e!==null&&e.type===64;)e=e.parent;return e}function Av(){return k.lFrame.currentTNode}function tT(){let e=k.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function $n(e,t){let n=k.lFrame;n.currentTNode=e,n.isParent=t}function wf(){return k.lFrame.isParent}function bf(){k.lFrame.isParent=!1}function Nv(){return k.lFrame.contextLView}function Rv(){return fd}function nu(e){let t=fd;return fd=e,t}function Hn(){let e=k.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Cf(){return k.lFrame.bindingIndex}function nT(e){return k.lFrame.bindingIndex=e}function Rr(){return k.lFrame.bindingIndex++}function es(e){let t=k.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function rT(){return k.lFrame.inI18n}function oT(e,t){let n=k.lFrame;n.bindingIndex=n.bindingRootIndex=e,pd(t)}function iT(){return k.lFrame.currentDirectiveIndex}function pd(e){k.lFrame.currentDirectiveIndex=e}function sT(e){let t=k.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Ov(){return k.lFrame.currentQueryIndex}function Ef(e){k.lFrame.currentQueryIndex=e}function aT(e){let t=e[P];return t.type===2?t.declTNode:t.type===1?e[Xe]:null}function Fv(e,t,n){if(n&U.SkipSelf){let o=t,i=e;for(;o=o.parent,o===null&&!(n&U.Host);)if(o=aT(i),o===null||(i=i[So],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=k.lFrame=Pv();return r.currentTNode=t,r.lView=e,!0}function If(e){let t=Pv(),n=e[P];k.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Pv(){let e=k.lFrame,t=e===null?null:e.child;return t===null?kv(e):t}function kv(e){let t={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:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Lv(){let e=k.lFrame;return k.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Vv=Lv;function _f(){let e=Lv();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function uT(e){return(k.lFrame.contextLView=q0(e,k.lFrame.contextLView))[_e]}function ht(){return k.lFrame.selectedIndex}function _r(e){k.lFrame.selectedIndex=e}function ts(){let e=k.lFrame;return vf(e.tView,e.selectedIndex)}function J5(){k.lFrame.currentNamespace=bv}function X5(){k.lFrame.currentNamespace=Cv}function lT(){return k.lFrame.currentNamespace}var jv=!0;function Fu(){return jv}function Pu(e){jv=e}function cT(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=yv(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function ku(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[u]<0&&(e[fo]+=65536),(a>14>16&&(e[R]&3)===t&&(e[R]+=16384,um(a,i)):um(a,i)}var mo=-1,xr=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r){this.factory=t,this.canSeeViewProviders=n,this.injectImpl=r}};function fT(e){return e instanceof xr}function pT(e){return(e.flags&8)!==0}function hT(e){return(e.flags&16)!==0}function gT(e,t,n){let r=0;for(;rt){s=i-1;break}}}for(;i>16}function ou(e,t){let n=vT(e),r=t;for(;n>0;)r=r[So],n--;return r}var gd=!0;function iu(e){let t=gd;return gd=e,t}var yT=256,Hv=yT-1,zv=5,DT=0,Lt={};function wT(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(ki)&&(r=n[ki]),r==null&&(r=n[ki]=DT++);let o=r&Hv,i=1<>zv)]|=i}function su(e,t){let n=Gv(e,t);if(n!==-1)return n;let r=t[P];r.firstCreatePass&&(e.injectorIndex=t.length,Kc(r.data,e),Kc(t,null),Kc(r.blueprint,null));let o=xf(e,t),i=e.injectorIndex;if($v(o)){let s=ru(o),a=ou(o,t),u=a[P].data;for(let l=0;l<8;l++)t[i+l]=a[s+l]|u[s+l]}return t[i+8]=o,i}function Kc(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Gv(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function xf(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=Yv(o),r===null)return mo;if(n++,o=o[So],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return mo}function md(e,t,n){wT(e,t,n)}function bT(e,t){if(t==="class")return e.classes;if(t==="style")return e.styles;let n=e.attrs;if(n){let r=n.length,o=0;for(;o>20,d=r?a:a+c,f=o?a+c:l;for(let p=d;p=u&&h.type===n)return p}if(o){let p=s[u];if(p&&sn(p)&&p.type===n)return u}return null}function $i(e,t,n,r){let o=e[n],i=t.data;if(fT(o)){let s=o;s.resolving&&h0(p0(i[n]));let a=iu(s.canSeeViewProviders);s.resolving=!0;let u,l=s.injectImpl?We(s.injectImpl):null,c=Fv(e,r,U.Default);try{o=e[n]=s.factory(void 0,i,e,r),t.firstCreatePass&&n>=r.directiveStart&&cT(n,i[n],t)}finally{l!==null&&We(l),iu(a),s.resolving=!1,Vv()}}return o}function ET(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(ki)?e[ki]:void 0;return typeof t=="number"?t>=0?t&Hv:IT:t}function cm(e,t,n){let r=1<>zv)]&r)}function dm(e,t){return!(e&U.Self)&&!(e&U.Host&&t)}var Dr=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Zv(this._tNode,this._lView,t,xu(r),n)}};function IT(){return new Dr(je(),T())}function Re(e){return Ki(()=>{let t=e.prototype.constructor,n=t[Ka]||vd(t),r=Object.prototype,o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){let i=o[Ka]||vd(o);if(i&&i!==n)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function vd(e){return Km(e)?()=>{let t=vd(Ae(e));return t&&t()}:wr(e)}function _T(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[R]&2048&&!tu(s);){let a=Kv(i,s,n,r|U.Self,Lt);if(a!==Lt)return a;let u=i.parent;if(!u){let l=s[gv];if(l){let c=l.get(n,Lt,r);if(c!==Lt)return c}u=Yv(s),s=s[So]}i=u}return o}function Yv(e){let t=e[P],n=t.type;return n===2?t.declTNode:n===1?e[Xe]:null}function Tf(e){return bT(je(),e)}function fm(e,t=null,n=null,r){let o=Qv(e,t,n,r);return o.resolveInjectorInitializers(),o}function Qv(e,t=null,n=null,r,o=new Set){let i=[n||Ze,A0(e)];return r=r||(typeof e=="object"?void 0:Ke(e)),new ji(i,t||Mu(),r||null,o)}var Ve=class e{static THROW_IF_NOT_FOUND=Vi;static NULL=new Ja;static create(t,n){if(Array.isArray(t))return fm({name:""},n,t,"");{let r=t.name??"";return fm({name:r},t.parent,t.providers,r)}}static \u0275prov=C({token:e,providedIn:"any",factory:()=>I(iv)});static __NG_ELEMENT_ID__=-1};var xT=new E("");xT.__NG_ELEMENT_ID__=e=>{let t=je();if(t===null)throw new w(204,!1);if(t.type&2)return t.value;if(e&U.Optional)return null;throw new w(204,!1)};var Jv=!1,zn=(()=>{class e{static __NG_ELEMENT_ID__=TT;static __NG_ENV_ID__=n=>n}return e})(),au=class extends zn{_lView;constructor(t){super(),this._lView=t}onDestroy(t){return _v(this._lView,t),()=>Z0(this._lView,t)}};function TT(){return new au(T())}var Tr=class{},Sf=new E("",{providedIn:"root",factory:()=>!1});var Xv=new E(""),ey=new E(""),dn=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Me(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(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)}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})();var yd=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,hv()&&(this.destroyRef=v(zn,{optional:!0})??void 0,this.pendingTasks=v(dn,{optional:!0})??void 0)}emit(t){let n=V(null);try{super.next(t)}finally{V(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t=="object"){let u=t;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 t instanceof se&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{t(n),r!==void 0&&this.pendingTasks?.remove(r)})}}},ee=yd;function Hi(...e){}function ty(e){let t,n;function r(){e=Hi;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function pm(e){return queueMicrotask(()=>e()),()=>{e=Hi}}var Mf="isAngularZone",uu=Mf+"_ID",ST=0,be=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ee(!1);onMicrotaskEmpty=new ee(!1);onStable=new ee(!1);onError=new ee(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=Jv}=t;if(typeof Zone>"u")throw new w(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,NT(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Mf)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new w(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new w(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,t,MT,Hi,Hi);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},MT={};function Af(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function AT(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){ty(()=>{e.callbackScheduled=!1,Dd(e),e.isCheckStableRunning=!0,Af(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Dd(e)}function NT(e){let t=()=>{AT(e)},n=ST++;e._inner=e._inner.fork({name:"angular",properties:{[Mf]:!0,[uu]:n,[uu+n]:!0},onInvokeTask:(r,o,i,s,a,u)=>{if(RT(u))return r.invokeTask(i,s,a,u);try{return hm(e),r.invokeTask(i,s,a,u)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),gm(e)}},onInvoke:(r,o,i,s,a,u,l)=>{try{return hm(e),r.invoke(i,s,a,u,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!OT(u)&&t(),gm(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Dd(e),Af(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Dd(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function hm(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function gm(e){e._nesting--,Af(e)}var wd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ee;onMicrotaskEmpty=new ee;onStable=new ee;onError=new ee;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function RT(e){return ny(e,"__ignore_ng_zone__")}function OT(e){return ny(e,"__scheduler_tick__")}function ny(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var St=class{_console=console;handleError(t){this._console.error("ERROR",t)}},FT=new E("",{providedIn:"root",factory:()=>{let e=v(be),t=v(St);return n=>e.runOutsideAngular(()=>t.handleError(n))}}),lu=class{destroyed=!1;listeners=null;errorHandler=v(St,{optional:!0});destroyRef=v(zn);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new w(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let n=this.listeners?.indexOf(t);n!==void 0&&n!==-1&&this.listeners?.splice(n,1)}}}emit(t){if(this.destroyed)throw new w(953,!1);if(this.listeners===null)return;let n=V(null);try{for(let r of this.listeners)try{r(t)}catch(o){this.errorHandler?.handleError(o)}}finally{V(n)}}};function e9(e){return new lu}function mm(e,t){return qm(e,t)}function PT(e){return qm(Iu,e)}var ry=(mm.required=PT,mm);function kT(){return Mo(je(),T())}function Mo(e,t){return new xe(Mt(e,t))}var xe=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=kT}return e})();function LT(e){return e instanceof xe?e.nativeElement:e}var vm=new Set;function gt(e){vm.has(e)||(vm.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function VT(e){return typeof e=="function"&&e[Be]!==void 0}function Ao(e,t){gt("NgSignals");let n=yg(e),r=n[Be];return t?.equal&&(r.equal=t.equal),n.set=o=>xi(r,o),n.update=o=>Dg(r,o),n.asReadonly=oy.bind(n),n}function oy(){let e=this[Be];if(e.readonlyFn===void 0){let t=()=>this();t[Be]=e,e.readonlyFn=t}return e.readonlyFn}function iy(e){return VT(e)&&typeof e.set=="function"}function jT(){return this._results[Symbol.iterator]()}var bd=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new J}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=x0(t);(this._changesDetected=!_0(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=jT};function sy(e){return(e.flags&128)===128}var ay=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(ay||{}),uy=new Map,UT=0;function BT(){return UT++}function $T(e){uy.set(e[Nu],e)}function Cd(e){uy.delete(e[Nu])}var ym="__ngContext__";function Or(e,t){Ln(t)?(e[ym]=t[Nu],$T(t)):e[ym]=t}function ly(e){return dy(e[Bi])}function cy(e){return dy(e[Tt])}function dy(e){for(;e!==null&&!cn(e);)e=e[Tt];return e}var Ed;function fy(e){Ed=e}function HT(){if(Ed!==void 0)return Ed;if(typeof document<"u")return document;throw new w(210,!1)}var Nf=new E("",{providedIn:"root",factory:()=>zT}),zT="ng",Rf=new E(""),Gn=new E("",{providedIn:"platform",factory:()=>"unknown"});var t9=new E(""),Of=new E("",{providedIn:"root",factory:()=>HT().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var GT="h",WT="b";var py=!1,qT=new E("",{providedIn:"root",factory:()=>py});var Ff=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(Ff||{}),No=new E("");var po=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(po||{}),hy=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),ZT=[po.EarlyRead,po.Write,po.MixedReadWrite,po.Read],KT=(()=>{class e{ngZone=v(be);scheduler=v(Tr);errorHandler=v(St,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){v(No,{optional:!0})}execute(){this.executing=!0;for(let n of ZT)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>r.hooks[n](r.pipelinedValue),r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(8),this.deferredRegistrations.clear()}register(n){this.executing?this.deferredRegistrations.add(n):(this.sequences.add(n),this.scheduler.notify(7))}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(Ff.AFTER_NEXT_RENDER,n):n()}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),Id=class{impl;hooks;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i=null){this.impl=t,this.hooks=n,this.once=r,this.snapshot=i,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}};function YT(e,t){!t?.injector&&Au(YT);let n=t?.injector??v(Ve);return gt("NgAfterRender"),my(e,n,t,!1)}function gy(e,t){!t?.injector&&Au(gy);let n=t?.injector??v(Ve);return gt("NgAfterNextRender"),my(e,n,t,!0)}function QT(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function my(e,t,n,r){let o=t.get(hy);o.impl??=t.get(KT);let i=t.get(No,null,{optional:!0}),s=n?.phase??po.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(zn):null,u=new Id(o.impl,QT(e,s),r,a,i?.snapshot(null));return o.impl.register(u),u}var JT=()=>null;function vy(e,t,n=!1){return JT(e,t,n)}function yy(e,t){let n=e.contentQueries;if(n!==null){let r=V(null);try{for(let o=0;oe,createScript:e=>e,createScriptURL:e=>e})}catch{}return La}function Lu(e){return XT()?.createHTML(e)||e}var Va;function eS(){if(Va===void 0&&(Va=null,tn.trustedTypes))try{Va=tn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Va}function Dm(e){return eS()?.createScriptURL(e)||e}var an=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Gm})`}},xd=class extends an{getTypeName(){return"HTML"}},Td=class extends an{getTypeName(){return"Style"}},Sd=class extends an{getTypeName(){return"Script"}},Md=class extends an{getTypeName(){return"URL"}},Ad=class extends an{getTypeName(){return"ResourceURL"}};function At(e){return e instanceof an?e.changingThisBreaksApplicationSecurity:e}function Wn(e,t){let n=tS(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Gm})`)}return n===t}function tS(e){return e instanceof an&&e.getTypeName()||null}function Dy(e){return new xd(e)}function wy(e){return new Td(e)}function by(e){return new Sd(e)}function Cy(e){return new Md(e)}function Ey(e){return new Ad(e)}function nS(e){let t=new Rd(e);return rS()?new Nd(t):t}var Nd=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{let n=new window.DOMParser().parseFromString(Lu(t),"text/html").body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.firstChild?.remove(),n)}catch{return null}}},Rd=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let n=this.inertDocument.createElement("template");return n.innerHTML=Lu(t),n}};function rS(){try{return!!new window.DOMParser().parseFromString(Lu(""),"text/html")}catch{return!1}}var oS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Vu(e){return e=String(e),e.match(oS)?e:"unsafe:"+e}function fn(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function ns(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var Iy=fn("area,br,col,hr,img,wbr"),_y=fn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),xy=fn("rp,rt"),iS=ns(xy,_y),sS=ns(_y,fn("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")),aS=ns(xy,fn("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")),wm=ns(Iy,sS,aS,iS),Ty=fn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),uS=fn("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"),lS=fn("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"),cS=ns(Ty,uS,lS),dS=fn("script,style,template"),Od=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let n=t.firstChild,r=!0,o=[];for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){o.push(n),n=hS(n);continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=pS(n);if(i){n=i;break}n=o.pop()}}return this.buf.join("")}startElement(t){let n=bm(t).toLowerCase();if(!wm.hasOwnProperty(n))return this.sanitizedSomething=!0,!dS.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);let r=t.attributes;for(let o=0;o"),!0}endElement(t){let n=bm(t).toLowerCase();wm.hasOwnProperty(n)&&!Iy.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(Cm(t))}};function fS(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function pS(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw Sy(t);return t}function hS(e){let t=e.firstChild;if(t&&fS(e,t))throw Sy(t);return t}function bm(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function Sy(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var gS=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mS=/([^\#-~ |!])/g;function Cm(e){return e.replace(/&/g,"&").replace(gS,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(mS,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}var ja;function My(e,t){let n=null;try{ja=ja||nS(e);let r=t?String(t):"";n=ja.getInertBodyElement(r);let o=5,i=r;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,r=i,i=n.innerHTML,n=ja.getInertBodyElement(r)}while(r!==i);let a=new Od().sanitizeChildren(Em(n)||n);return Lu(a)}finally{if(n){let r=Em(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function Em(e){return"content"in e&&vS(e)?e.content:null}function vS(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var Ht=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Ht||{});function yS(e){let t=Ny();return t?t.sanitize(Ht.URL,e)||"":Wn(e,"URL")?At(e):Vu(qe(e))}function DS(e){let t=Ny();if(t)return Dm(t.sanitize(Ht.RESOURCE_URL,e)||"");if(Wn(e,"ResourceURL"))return Dm(At(e));throw new w(904,!1)}function wS(e,t){return t==="src"&&(e==="embed"||e==="frame"||e==="iframe"||e==="media"||e==="script")||t==="href"&&(e==="base"||e==="link")?DS:yS}function Ay(e,t,n){return wS(t,n)(e)}function Ny(){let e=T();return e&&e[rn].sanitizer}var bS=/^>|^->||--!>|)/g,ES="\u200B$1\u200B";function IS(e){return e.replace(bS,t=>t.replace(CS,ES))}function Ry(e){return e instanceof Function?e():e}var Un=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Un||{});function _S(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var Oy="ng-template";function xS(e,t,n,r){let o=0;if(r){for(;o-1){let i;for(;++oi?d="":d=o[c+1].toLowerCase(),r&2&&l!==d){if(_t(r))return!1;s=!0}}}}return _t(r)||s}function _t(e){return(e&1)===0}function MS(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o-1)for(n++;n0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!_t(s)&&(t+=Im(i,o),o=""),r=s,i=i||!_t(r);n++}return o!==""&&(t+=Im(i,o)),t}function PS(e){return e.map(FS).join(",")}function kS(e){let t=[],n=[],r=1,o=2;for(;rfe&&Vy(e,t,fe,!1),ft(s?2:0,o),n(r,o)}finally{_r(i),ft(s?3:1,o)}}function Vf(e,t,n){Sv()&&(Or(Mt(n,t),t),$y(e,t,n))}function $y(e,t,n){eM(e,t,n),(n.flags&64)===64&&tM(e,t,n)}function jf(e,t,n=Mt){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;inull;function xm(e,t,n,r,o){for(let i in t){if(!t.hasOwnProperty(i))continue;let s=t[i];if(s===void 0)continue;r??={};let a,u=Un.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let l=i;if(o!==null){if(!o.hasOwnProperty(i))continue;l=o[i]}e===0?Tm(r,n,l,a,u):Tm(r,n,l,a)}return r}function Tm(e,t,n,r,o){let i;e.hasOwnProperty(n)?(i=e[n]).push(t,r):i=e[n]=[t,r],o!==void 0&&i.push(o)}function KS(e,t,n){let r=t.directiveStart,o=t.directiveEnd,i=e.data,s=t.attrs,a=[],u=null,l=null;for(let c=r;c0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function eM(e,t,n){let r=n.directiveStart,o=n.directiveEnd;Nr(n)&&cM(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||su(n,t);let i=n.initialInputs;for(let s=r;s0&&(n[o-1][Tt]=t),r0&&(e[n-1][Tt]=r[Tt]);let i=Qa(e,ke+t);DM(r[P],r);let s=i[on];s!==null&&s.detachView(i[P]),r[Le]=null,r[Tt]=null,r[R]&=-129}return r}function Uu(e,t){if(Qi(t))return;let n=t[ae];n.destroyNode&&$u(e,t,n,3,null,null),bM(t)}function Yc(e,t){if(Qi(t))return;let n=V(null);try{t[R]&=-129,t[R]|=256,t[nt]&&Jr(t[nt]),IM(e,t),EM(e,t),t[P].type===1&&t[ae].destroy();let r=t[br];if(r!==null&&cn(t[Le])){r!==t[Le]&&qf(r,t);let o=t[on];o!==null&&o.detachView(e)}Cd(t)}finally{V(n)}}function EM(e,t){let n=e.cleanup,r=t[Xa];if(n!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Xa]=null);let o=t[kn];if(o!==null){t[kn]=null;for(let s=0;s{Xi(e.lView)},consumerOnSignalRead(){this.lView[nt]=this}});function kM(e){let t=e[nt]??Object.create(LM);return t.lView=e,t}var LM=F(y({},pr),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Ir(e.lView);for(;t&&!nD(t[P]);)t=Ir(t);t&&Df(t)},consumerOnSignalRead(){this.lView[nt]=this}});function nD(e){return e.type!==2}function rD(e){if(e[Cr]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Cr])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[R]&8192)}}var VM=100;function oD(e,t=!0,n=0){let o=e[rn].rendererFactory,i=!1;i||o.begin?.();try{jM(e,n)}catch(s){throw t&&Wy(e,s),s}finally{i||o.end?.()}}function jM(e,t){let n=Rv();try{nu(!0),Pd(e,t);let r=0;for(;Ou(e);){if(r===VM)throw new w(103,!1);r++,Pd(e,1)}}finally{nu(n)}}function UM(e,t,n,r){if(Qi(t))return;let o=t[R],i=!1,s=!1;If(t);let a=!0,u=null,l=null;i||(nD(e)?(l=RM(t),u=Qr(l)):sg()===null?(a=!1,l=kM(t),u=Qr(l)):t[nt]&&(Jr(t[nt]),t[nt]=null));try{Iv(t),nT(e.bindingStartIndex),n!==null&&By(e,t,n,2,r);let c=(o&3)===3;if(!i)if(c){let p=e.preOrderCheckHooks;p!==null&&za(t,p,null)}else{let p=e.preOrderHooks;p!==null&&Ga(t,p,0,null),qc(t,0)}if(s||BM(t),rD(t),iD(t,0),e.contentQueries!==null&&yy(e,t),!i)if(c){let p=e.contentCheckHooks;p!==null&&za(t,p)}else{let p=e.contentHooks;p!==null&&Ga(t,p,1),qc(t,1)}HM(e,t);let d=e.components;d!==null&&aD(t,d,0);let f=e.viewQuery;if(f!==null&&_d(2,f,r),!i)if(c){let p=e.viewCheckHooks;p!==null&&za(t,p)}else{let p=e.viewHooks;p!==null&&Ga(t,p,2),qc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Ha]){for(let p of t[Ha])p();t[Ha]=null}i||(t[R]&=-73)}catch(c){throw i||Xi(t),c}finally{l!==null&&(Ii(l,u),a&&FM(l)),_f()}}function iD(e,t){for(let n=ly(e);n!==null;n=cy(n))for(let r=ke;r-1&&(zi(t,r),Qa(n,r))}this._attachedToViewContainer=!1}Uu(this._lView[P],this._lView)}onDestroy(t){_v(this._lView,t)}markForCheck(){Kf(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Df(this._cdRefInjectingView||this._lView)}detach(){this._lView[R]&=-129}reattach(){dd(this._lView),this._lView[R]|=128}detectChanges(){this._lView[R]|=1024,oD(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new w(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=tu(this._lView),n=this._lView[br];n!==null&&!t&&qf(n,this._lView),qy(this._lView[P],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new w(902,!1);this._appRef=t;let n=tu(this._lView),r=this._lView[br];r!==null&&!n&&Zy(r,this._lView),dd(this._lView)}},Gi=(()=>{class e{static __NG_ELEMENT_ID__=WM}return e})(),zM=Gi,GM=class extends zM{_declarationLView;_declarationTContainer;elementRef;constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=rs(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Sr(o)}};function WM(){return Hu(je(),T())}function Hu(e,t){return e.type&4?new GM(t,e,Mo(e,t)):null}function Fr(e,t,n,r,o){let i=e.data[t];if(i===null)i=qM(e,t,n,r,o),rT()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=tT();i.injectorIndex=s===null?-1:s.injectorIndex}return $n(i,!0),i}function qM(e,t,n,r,o){let i=Av(),s=wf(),a=s?i:i&&i.parent,u=e.data[t]=KM(e,a,n,t,r,o);return ZM(e,u,i,s),u}function ZM(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function KM(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return Mv()&&(a|=128),{type:n,index:r,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:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var o9=new RegExp(`^(\\d+)*(${WT}|${GT})*(.*)`);var YM=()=>null;function Eo(e,t){return YM(e,t)}var kd=class{},fu=class{},Ld=class{resolveComponentFactory(t){throw Error(`No component factory found for ${Ke(t)}.`)}},Io=class{static NULL=new Ld},_o=class{},ot=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>QM()}return e})();function QM(){let e=T(),t=je(),n=jt(t.index,e);return(Ln(n)?n:e)[ae]}var JM=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>null})}return e})();function pu(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s{class e{static __NG_ELEMENT_ID__=tA}return e})();function tA(){let e=je();return lD(e,T())}var nA=Pr,uD=class extends nA{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Mo(this._hostTNode,this._hostLView)}get injector(){return new Dr(this._hostTNode,this._hostLView)}get parentInjector(){let t=xf(this._hostTNode,this._hostLView);if($v(t)){let n=ou(t,this._hostLView),r=ru(t),o=n[P].data[r+8];return new Dr(o,n)}else return new Dr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=Am(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-ke}createEmbeddedView(t,n,r){let o,i;typeof r=="number"?o=r:r!=null&&(o=r.index,i=r.injector);let s=Eo(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},i,s);return this.insertImpl(a,o,Co(this._hostTNode,s)),a}createComponent(t,n,r,o,i){let s=t&&!B0(t),a;if(s)a=n;else{let h=n||{};a=h.index,r=h.injector,o=h.projectableNodes,i=h.environmentInjector||h.ngModuleRef}let u=s?t:new xo(Vn(t)),l=r||this.parentInjector;if(!i&&u.ngModule==null){let g=(s?l:this.parentInjector).get(Ye,null);g&&(i=g)}let c=Vn(u.componentType??{}),d=Eo(this._lContainer,c?.id??null),f=d?.firstChild??null,p=u.create(l,o,f,i);return this.insertImpl(p.hostView,a,Co(this._hostTNode,d)),p}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let o=t._lView;if(W0(o)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let u=o[Le],l=new uD(u,u[Xe],u[Le]);l.detach(l.indexOf(t))}}let i=this._adjustIndex(n),s=this._lContainer;return os(s,o,i,r),t.attachToViewContainerRef(),ov(Qc(s),i,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=Am(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=zi(this._lContainer,n);r&&(Qa(Qc(this._lContainer),n),Uu(r[P],r))}detach(t){let n=this._adjustIndex(t,-1),r=zi(this._lContainer,n);return r&&Qa(Qc(this._lContainer),n)!=null?new Sr(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function Am(e){return e[eu]}function Qc(e){return e[eu]||(e[eu]=[])}function lD(e,t){let n,r=t[e.index];return cn(r)?n=r:(n=Gy(r,t,null,e),t[e.index]=n,$f(t,n)),oA(n,t,e,r),new uD(n,e,t)}function rA(e,t){let n=e[ae],r=n.createComment(""),o=Mt(t,e),i=n.parentNode(o);return cu(n,i,r,n.nextSibling(o),!1),r}var oA=aA,iA=()=>!1;function sA(e,t,n){return iA(e,t,n)}function aA(e,t,n,r){if(e[Er])return;let o;n.type&8?o=Vt(r):o=rA(t,n),e[Er]=o}var jd=class e{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Ud=class e{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,o=[];for(let i=0;i0)r.push(s[a/2]);else{let l=i[a+1],c=t[-u];for(let d=ke;dt.trim())}function fD(e,t,n){e.queries===null&&(e.queries=new Bd),e.queries.track(new $d(t,n))}function mA(e,t){let n=e.contentQueries||(e.contentQueries=[]),r=n.length?n[n.length-1]:-1;t!==r&&n.push(e.queries.length-1,t)}function Yf(e,t){return e.queries.getByIndex(t)}function vA(e,t){let n=e[P],r=Yf(n,t);return r.crossesNgTemplate?Hd(n,e,t,[]):cD(n,e,r,t)}function pD(e,t){let n=Object.create(Wm),r=new lu;n.value=e;function o(){return Ei(n),Nm(n.value),n.value}return o[Be]=n,o.asReadonly=oy.bind(o),o.set=i=>{n.equal(n.value,i)||(xi(n,i),r.emit(i))},o.update=i=>{Nm(n.value),o.set(i(n.value))},o.subscribe=r.subscribe.bind(r),o.destroyRef=r.destroyRef,o}function Nm(e){if(e===Iu)throw new w(952,!1)}function Rm(e,t){return pD(e,t)}function yA(e){return pD(Iu,e)}var s9=(Rm.required=yA,Rm);var Bn=class{},Wi=class{};var zd=class extends Bn{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new hu(this);constructor(t,n,r,o=!0){super(),this.ngModuleType=t,this._parent=n;let i=av(t);this._bootstrapComponents=Ry(i.bootstrap),this._r3Injector=Qv(t,n,[{provide:Bn,useValue:this},{provide:Io,useValue:this.componentFactoryResolver},...r],Ke(t),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},Gd=class extends Wi{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new zd(this.moduleType,t,[])}};var mu=class extends Bn{injector;componentFactoryResolver=new hu(this);instance=null;constructor(t){super();let n=new ji([...t.providers,{provide:Bn,useValue:this},{provide:Io,useValue:this.componentFactoryResolver}],t.parent||Mu(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Qf(e,t,n=null){return new mu({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var DA=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=cv(!1,n.type),o=r.length>0?Qf([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=C({token:e,providedIn:"environment",factory:()=>new e(I(Ye))})}return e})();function hD(e){return Ki(()=>{let t=gD(e),n=F(y({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===ay.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(DA).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Ut.Emulated,styles:e.styles||Ze,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&>("NgStandalone"),mD(n);let r=e.dependencies;return n.directiveDefs=Fm(r,!1),n.pipeDefs=Fm(r,!0),n.id=CA(n),n})}function wA(e){return Vn(e)||hf(e)}function bA(e){return e!==null}function zt(e){return Ki(()=>({type:e.type,bootstrap:e.bootstrap||Ze,declarations:e.declarations||Ze,imports:e.imports||Ze,exports:e.exports||Ze,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Om(e,t){if(e==null)return nn;let n={};for(let r in e)if(e.hasOwnProperty(r)){let o=e[r],i,s,a=Un.None;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i):(i=o,s=o),t?(n[i]=a!==Un.None?[r,a]:r,t[i]=s):n[i]=r}return n}function H(e){return Ki(()=>{let t=gD(e);return mD(t),t})}function Ro(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function gD(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||nn,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ze,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Om(e.inputs,t),outputs:Om(e.outputs),debugInfo:null}}function mD(e){e.features?.forEach(t=>t(e))}function Fm(e,t){if(!e)return null;let n=t?uv:wA;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(bA)}function CA(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function EA(e){return Object.getPrototypeOf(e.prototype).constructor}function Ce(e){let t=EA(e.type),n=!0,r=[e];for(;t;){let o;if(sn(e))o=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new w(903,!1);o=t.\u0275dir}if(o){if(n){r.push(o);let s=e;s.inputs=Ua(e.inputs),s.inputTransforms=Ua(e.inputTransforms),s.declaredInputs=Ua(e.declaredInputs),s.outputs=Ua(e.outputs);let a=o.hostBindings;a&&SA(e,a);let u=o.viewQuery,l=o.contentQueries;if(u&&xA(e,u),l&&TA(e,l),IA(e,o),i0(e.outputs,o.outputs),sn(o)&&o.data.animation){let c=e.data;c.animation=(c.animation||[]).concat(o.data.animation)}}let i=o.features;if(i)for(let s=0;s=0;r--){let o=e[r];o.hostVars=t+=o.hostVars,o.hostAttrs=bo(o.hostAttrs,n=bo(n,o.hostAttrs))}}function Ua(e){return e===nn?{}:e===Ze?[]:e}function xA(e,t){let n=e.viewQuery;n?e.viewQuery=(r,o)=>{t(r,o),n(r,o)}:e.viewQuery=t}function TA(e,t){let n=e.contentQueries;n?e.contentQueries=(r,o,i)=>{t(r,o,i),n(r,o,i)}:e.contentQueries=t}function SA(e,t){let n=e.hostBindings;n?e.hostBindings=(r,o)=>{t(r,o),n(r,o)}:e.hostBindings=t}function a9(e){let t=n=>{let r=Array.isArray(e);n.hostDirectives===null?(n.findHostDirectiveDefs=vD,n.hostDirectives=r?e.map(Wd):[e]):r?n.hostDirectives.unshift(...e.map(Wd)):n.hostDirectives.unshift(e)};return t.ngInherit=!0,t}function vD(e,t,n){if(e.hostDirectives!==null)for(let r of e.hostDirectives)if(typeof r=="function"){let o=r();for(let i of o)Pm(Wd(i),t,n)}else Pm(r,t,n)}function Pm(e,t,n){let r=hf(e.directive);MA(r.declaredInputs,e.inputs),vD(r,t,n),n.set(r,e),t.push(r)}function Wd(e){return typeof e=="function"?{directive:Ae(e),inputs:nn,outputs:nn}:{directive:Ae(e.directive),inputs:km(e.inputs),outputs:km(e.outputs)}}function km(e){if(e===void 0||e.length===0)return nn;let t={};for(let n=0;n{class e{log(n){console.log(n)}warn(n){console.warn(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();var bD=new E("");function qn(e){return!!e&&typeof e.then=="function"}function ep(e){return!!e&&typeof e.subscribe=="function"}var CD=new E("");var ED=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=v(CD,{optional:!0})??[];injector=v(Ve);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=rt(this.injector,o);if(qn(i))n.push(i);else if(ep(i)){let s=new Promise((a,u)=>{i.subscribe({complete:a,error:u})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ID=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>new yu})}return e})(),yu=class{queuedEffectCount=0;queues=new Map;schedule(t){this.enqueue(t)}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),this.queuedEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||(this.queuedEffectCount++,r.add(t))}flush(){for(;this.queuedEffectCount>0;)for(let[t,n]of this.queues)t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n))}flushQueue(t){for(let n of t)t.delete(n),this.queuedEffectCount--,n.run()}},zu=new E("");function PA(){vg(()=>{throw new w(600,!1)})}function kA(e){return e.isBoundToModule}var LA=10;function VA(e,t,n){try{let r=n();return qn(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e.handleError(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var un=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=v(FT);afterRenderManager=v(hy);zonelessEnabled=v(Sf);rootEffectScheduler=v(ID);dirtyFlags=0;deferredDirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=v(dn).hasPendingTasks.pipe(A(n=>!n));constructor(){v(No,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=v(Ye);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){let o=n instanceof fu;if(!this._injector.get(ED).done){let f=!o&&lv(n),p=!1;throw new w(405,p)}let s;o?s=n:s=this._injector.get(Io).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let a=kA(s)?void 0:this._injector.get(Bn),u=r||s.selector,l=s.create(Ve.NULL,[],u,a),c=l.location.nativeElement,d=l.injector.get(bD,null);return d?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),qa(this.components,l),d?.unregisterApplication(c)}),this._loadComponent(l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick=()=>{if(this.tracingSnapshot!==null){let r=this.tracingSnapshot;this.tracingSnapshot=null,r.run(Ff.CHANGE_DETECTION,this._tick),r.dispose();return}if(this._runningTick)throw new w(101,!1);let n=V(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,V(n),this.afterTick.next()}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(_o,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let n=0;for(;this.dirtyFlags!==0&&n++Ou(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;qa(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(zu,[]).forEach(o=>o(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._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>qa(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new w(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qa(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function jA(e,t,n,r){if(!n&&!Ou(e))return;oD(e,t,n&&!r?0:1)}function kr(e,t,n,r){let o=T(),i=Rr();if(Je(o,i,t)){let s=te(),a=ts();dM(a,o,e,t,n,r)}return kr}function tp(e,t,n,r){return Je(e,Rr(),n)?t+qe(n)+r:Te}function UA(e,t,n,r,o,i){let s=Cf(),a=qi(e,s,n,o);return es(2),a?t+qe(n)+r+qe(o)+i:Te}function BA(e,t,n,r,o,i,s,a){let u=Cf(),l=DD(e,u,n,o,s);return es(3),l?t+qe(n)+r+qe(o)+i+qe(s)+a:Te}function $A(e,t,n,r,o,i,s,a,u,l,c,d){let f=Cf(),p=wD(e,f,n,o,s,u);return p=Je(e,f+4,c)||p,es(5),p?t+qe(n)+r+qe(o)+i+qe(s)+a+qe(u)+l+qe(c)+d:Te}function Ba(e,t){return e<<17|t<<2}function Mr(e){return e>>17&32767}function HA(e){return(e&2)==2}function zA(e,t){return e&131071|t<<17}function qd(e){return e|2}function To(e){return(e&131068)>>2}function Jc(e,t){return e&-131069|t<<2}function GA(e){return(e&1)===1}function Zd(e){return e|1}function WA(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=Mr(s),u=To(s);e[r]=n;let l=!1,c;if(Array.isArray(n)){let d=n;c=d[1],(c===null||Yi(d,c)>0)&&(l=!0)}else c=n;if(o)if(u!==0){let f=Mr(e[a+1]);e[r+1]=Ba(f,a),f!==0&&(e[f+1]=Jc(e[f+1],r)),e[a+1]=zA(e[a+1],r)}else e[r+1]=Ba(a,0),a!==0&&(e[a+1]=Jc(e[a+1],r)),a=r;else e[r+1]=Ba(u,0),a===0?a=r:e[u+1]=Jc(e[u+1],r),u=r;l&&(e[r+1]=qd(e[r+1])),Lm(e,c,r,!0),Lm(e,c,r,!1),qA(t,c,e,r,i),s=Ba(a,u),i?t.classBindings=s:t.styleBindings=s}function qA(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&Yi(i,t)>=0&&(n[r+1]=Zd(n[r+1]))}function Lm(e,t,n,r){let o=e[n+1],i=t===null,s=r?Mr(o):To(o),a=!1;for(;s!==0&&(a===!1||i);){let u=e[s],l=e[s+1];ZA(u,t)&&(a=!0,e[s+1]=r?Zd(l):qd(l)),s=r?Mr(l):To(l)}a&&(e[n+1]=r?qd(o):Zd(o))}function ZA(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Yi(e,t)>=0:!1}var xt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function KA(e){return e.substring(xt.key,xt.keyEnd)}function YA(e){return QA(e),_D(e,xD(e,0,xt.textEnd))}function _D(e,t){let n=xt.textEnd;return n===t?-1:(t=xt.keyEnd=JA(e,xt.key=t,n),xD(e,t,n))}function QA(e){xt.key=0,xt.keyEnd=0,xt.value=0,xt.valueEnd=0,xt.textEnd=e.length}function xD(e,t,n){for(;t32;)t++;return t}function XA(e,t,n){let r=T(),o=Rr();if(Je(r,o,t)){let i=te(),s=ts();ju(i,s,r,e,t,r[ae],n,!1)}return XA}function Kd(e,t,n,r,o){let i=t.inputs,s=o?"class":"style";Hf(e,n,i[s],s,r)}function Gu(e,t){return eN(e,t,null,!0),Gu}function u9(e){SD(sN,TD,e,!0)}function TD(e,t){for(let n=YA(t);n>=0;n=_D(t,n))Tu(e,KA(t),!0)}function eN(e,t,n,r){let o=T(),i=te(),s=es(2);if(i.firstUpdatePass&&AD(i,e,s,r),t!==Te&&Je(o,s,t)){let a=i.data[ht()];ND(i,a,o,o[ae],e,o[s+1]=uN(t,n),r,s)}}function SD(e,t,n,r){let o=te(),i=es(2);o.firstUpdatePass&&AD(o,null,i,r);let s=T();if(n!==Te&&Je(s,i,n)){let a=o.data[ht()];if(RD(a,r)&&!MD(o,i)){let u=r?a.classesWithoutHost:a.stylesWithoutHost;u!==null&&(n=rd(u,n||"")),Kd(o,a,s,n,r)}else aN(o,a,s,s[ae],s[i+1],s[i+1]=iN(e,t,n),r,i)}}function MD(e,t){return t>=e.expandoStartIndex}function AD(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[ht()],s=MD(e,n);RD(i,r)&&t===null&&!s&&(t=!1),t=tN(o,i,t,r),WA(o,i,t,n,s,r)}}function tN(e,t,n,r){let o=sT(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Xc(null,e,t,n,r),n=Zi(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Xc(o,e,t,n,r),i===null){let u=nN(e,t,r);u!==void 0&&Array.isArray(u)&&(u=Xc(null,e,t,u[1],r),u=Zi(u,t.attrs,r),rN(e,t,r,u))}else i=oN(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function nN(e,t,n){let r=n?t.classBindings:t.styleBindings;if(To(r)!==0)return e[Mr(r)]}function rN(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[Mr(o)]=r}function oN(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i0;){let u=e[o],l=Array.isArray(u),c=l?u[1]:u,d=c===null,f=n[o+1];f===Te&&(f=d?Ze:void 0);let p=d?Gc(f,r):c===r?f:void 0;if(l&&!Du(p)&&(p=Gc(u,r)),Du(p)&&(a=p,s))return a;let h=e[o+1];o=s?Mr(h):To(h)}if(t!==null){let u=i?t.residualClasses:t.residualStyles;u!=null&&(a=Gc(u,r))}return a}function Du(e){return e!==void 0}function uN(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=Ke(At(e)))),e}function RD(e,t){return(e.flags&(t?8:16))!==0}function l9(e,t,n){let r=T(),o=tp(r,e,t,n);SD(Tu,TD,o,!0)}function c9(){return T()[Qe][_e]}var Yd=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function ed(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function lN(e,t,n){let r,o,i=0,s=e.length-1,a=void 0;if(Array.isArray(t)){let u=t.length-1;for(;i<=s&&i<=u;){let l=e.at(i),c=t[i],d=ed(i,l,i,c,n);if(d!==0){d<0&&e.updateValue(i,c),i++;continue}let f=e.at(s),p=t[u],h=ed(s,f,u,p,n);if(h!==0){h<0&&e.updateValue(s,p),s--,u--;continue}let g=n(i,l),m=n(s,f),D=n(i,c);if(Object.is(D,m)){let N=n(u,p);Object.is(N,g)?(e.swap(i,s),e.updateValue(s,p),u--,s--):e.move(s,i),e.updateValue(i,c),i++;continue}if(r??=new wu,o??=Um(e,i,s,n),Qd(e,r,i,D))e.updateValue(i,c),i++,s++;else if(o.has(D))r.set(g,e.detach(i)),s--;else{let N=e.create(i,t[i]);e.attach(i,N),i++,s++}}for(;i<=u;)jm(e,r,n,i,t[i]),i++}else if(t!=null){let u=t[Symbol.iterator](),l=u.next();for(;!l.done&&i<=s;){let c=e.at(i),d=l.value,f=ed(i,c,i,d,n);if(f!==0)f<0&&e.updateValue(i,d),i++,l=u.next();else{r??=new wu,o??=Um(e,i,s,n);let p=n(i,d);if(Qd(e,r,i,p))e.updateValue(i,d),i++,s++,l=u.next();else if(!o.has(p))e.attach(i,e.create(i,d)),i++,s++,l=u.next();else{let h=n(i,c);r.set(h,e.detach(i)),s--}}}for(;!l.done;)jm(e,r,n,e.length,l.value),l=u.next()}for(;i<=s;)e.destroy(e.detach(s--));r?.forEach(u=>{e.destroy(u)})}function Qd(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function jm(e,t,n,r,o){if(Qd(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function Um(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var wu=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function d9(e,t){gt("NgControlFlow");let n=T(),r=Rr(),o=n[r]!==Te?n[r]:-1,i=o!==-1?bu(n,fe+o):void 0,s=0;if(Je(n,r,e)){let a=V(null);try{if(i!==void 0&&eD(i,s),e!==-1){let u=fe+e,l=bu(n,u),c=tf(n[P],u),d=Eo(l,c.tView.ssrId),f=rs(n,c,t,{dehydratedView:d});os(l,f,s,Co(c,d))}}finally{V(a)}}else if(i!==void 0){let a=Xy(i,s);a!==void 0&&(a[_e]=t)}}var Jd=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-ke}};function f9(e){return e}function p9(e,t){return t}var Xd=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function h9(e,t,n,r,o,i,s,a,u,l,c,d,f){gt("NgControlFlow");let p=T(),h=te(),g=u!==void 0,m=T(),D=a?s.bind(m[Qe][_e]):s,N=new Xd(g,D);m[fe+e]=N,vu(p,h,e+1,t,n,r,o,jn(h.consts,i)),g&&vu(p,h,e+2,u,l,c,d,jn(h.consts,f))}var ef=class extends Yd{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-ke}at(t){return this.getLView(t)[_e].$implicit}attach(t,n){let r=n[Do];this.needsIndexUpdate||=t!==this.length,os(this.lContainer,n,t,Co(this.templateTNode,r))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,cN(this.lContainer,t)}create(t,n){let r=Eo(this.lContainer,this.templateTNode.tView.ssrId),o=rs(this.hostLView,this.templateTNode,new Jd(this.lContainer,n,t),{dehydratedView:r});return this.operationsCounter?.recordCreate(),o}destroy(t){Uu(t[P],t),this.operationsCounter?.recordDestroy()}updateValue(t,n){this.getLView(t)[_e].$implicit=n}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t(Pu(!0),Py(r,o,lT()));function hN(e,t,n,r,o){let i=t.consts,s=jn(i,r),a=Fr(t,e,8,"ng-container",s);s!==null&&pu(a,s,!0);let u=jn(i,o);return Bf(t,n,a,u),t.queries!==null&&t.queries.elementStart(t,a),a}function PD(e,t,n){let r=T(),o=te(),i=e+fe,s=o.firstCreatePass?hN(i,o,r,t,n):o.data[i];$n(s,!0);let a=mN(o,r,s,e);return r[i]=a,Fu()&&Bu(o,r,a,s),Or(a,r),Ru(s)&&(Vf(o,r,s),Pf(o,s,r)),n!=null&&jf(r,s),PD}function kD(){let e=je(),t=te();return wf()?bf():(e=e.parent,$n(e,!1)),t.firstCreatePass&&(ku(t,e),mf(e)&&t.queries.elementEnd(e)),kD}function gN(e,t,n){return PD(e,t,n),kD(),gN}var mN=(e,t,n,r)=>(Pu(!0),jS(t[ae],""));function m9(){return T()}function vN(e,t,n){let r=T(),o=Rr();if(Je(r,o,t)){let i=te(),s=ts();ju(i,s,r,e,t,r[ae],n,!0)}return vN}var yr=void 0;function yN(e){let t=e,n=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return n===1&&r===0?1:5}var DN=["en",[["a","p"],["AM","PM"],yr],[["AM","PM"],yr,yr],[["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"]],yr,[["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"]],yr,[["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}",yr,"{1} 'at' {0}",yr],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",yN],Li={};function LD(e,t,n){typeof t!="string"&&(n=t,t=e[ue.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),Li[t]=e,n&&(Li[t][ue.ExtraData]=n)}function it(e){let t=wN(e),n=Bm(t);if(n)return n;let r=t.split("-")[0];if(n=Bm(r),n)return n;if(r==="en")return DN;throw new w(701,!1)}function Bm(e){return e in Li||(Li[e]=tn.ng&&tn.ng.common&&tn.ng.common.locales&&tn.ng.common.locales[e]),Li[e]}var ue=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(ue||{});function wN(e){return e.toLowerCase().replace(/_/g,"-")}var Cu="en-US";var bN=Cu;function CN(e){typeof e=="string"&&(bN=e.toLowerCase().replace(/_/g,"-"))}var EN=(e,t,n)=>{};function mt(e,t,n,r){let o=T(),i=te(),s=je();return VD(i,o,o[ae],s,e,t,r),mt}function IN(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;iu?a[u]:null}typeof s=="string"&&(i+=2)}return null}function VD(e,t,n,r,o,i,s){let a=Ru(r),l=e.firstCreatePass&&Tv(e),c=t[_e],d=xv(t),f=!0;if(r.type&3||s){let g=Mt(r,t),m=s?s(g):g,D=d.length,N=s?ie=>s(Vt(ie[r.index])):r.index,B=null;if(!s&&a&&(B=IN(e,t,o,r.index)),B!==null){let ie=B.__ngLastListenerFn__||B;ie.__ngNextListenerFn__=i,B.__ngLastListenerFn__=i,f=!1}else{i=Hm(r,t,c,i),EN(g,o,i);let ie=n.listen(m,o,i);d.push(i,ie),l&&l.push(o,N,D,D+1)}}else i=Hm(r,t,c,i);let p=r.outputs,h;if(f&&p!==null&&(h=p[o])){let g=h.length;if(g)for(let m=0;m=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function b9(e){let t=Nv();return Ji(t,fe+e)}function C9(e,t=""){let n=T(),r=te(),o=e+fe,i=r.firstCreatePass?Fr(r,o,1,t,null):r.data[o],s=SN(r,n,i,t,e);n[o]=s,Fu()&&Bu(r,n,s,i),$n(i,!1)}var SN=(e,t,n,r,o)=>(Pu(!0),LS(t[ae],r));function MN(e){return HD("",e,""),MN}function HD(e,t,n){let r=T(),o=tp(r,e,t,n);return o!==Te&&Wu(r,ht(),o),HD}function AN(e,t,n,r,o){let i=T(),s=UA(i,e,t,n,r,o);return s!==Te&&Wu(i,ht(),s),AN}function NN(e,t,n,r,o,i,s){let a=T(),u=BA(a,e,t,n,r,o,i,s);return u!==Te&&Wu(a,ht(),u),NN}function RN(e,t,n,r,o,i,s,a,u,l,c){let d=T(),f=$A(d,e,t,n,r,o,i,s,a,u,l,c);return f!==Te&&Wu(d,ht(),f),RN}function Wu(e,t,n){let r=Ev(t,e);VS(e[ae],r,n)}function ON(e,t,n){iy(t)&&(t=t());let r=T(),o=Rr();if(Je(r,o,t)){let i=te(),s=ts();ju(i,s,r,e,t,r[ae],n,!1)}return ON}function E9(e,t){let n=iy(e);return n&&e.set(t),n}function FN(e,t){let n=T(),r=te(),o=je();return VD(r,n,n[ae],o,e,t),FN}var zD={};function PN(e){let t=te(),n=T(),r=e+fe,o=Fr(t,r,128,null,null);return $n(o,!1),rp(t,n,r,zD),PN}function I9(e){gt("NgLet");let t=te(),n=T(),r=ht();return rp(t,n,r,e),e}function _9(e){let t=Nv(),n=Ji(t,fe+e);if(n===zD)throw new w(314,!1);return n}function kN(e,t,n){let r=te();if(r.firstCreatePass){let o=sn(e);nf(n,r.data,r.blueprint,o,!0),nf(t,r.data,r.blueprint,o,!1)}}function nf(e,t,n,r,o){if(e=Ae(e),Array.isArray(e))for(let i=0;i>20;if(yo(e)||!e.multi){let p=new xr(l,o,b),h=nd(u,t,o?c:c+f,d);h===-1?(md(su(a,s),i,u),td(i,e,t.length),t.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(p),s.push(p)):(n[h]=p,s[h]=p)}else{let p=nd(u,t,c+f,d),h=nd(u,t,c,c+f),g=p>=0&&n[p],m=h>=0&&n[h];if(o&&!m||!o&&!g){md(su(a,s),i,u);let D=jN(o?VN:LN,n.length,o,r,l);!o&&m&&(n[h].providerFactory=D),td(i,e,t.length,0),t.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(D),s.push(D)}else{let D=GD(n[o?h:p],l,!o&&r);td(i,e,p>-1?p:h,D)}!o&&r&&m&&n[h].componentProviders++}}}function td(e,t,n,r){let o=yo(t),i=F0(t);if(o||i){let u=(i?Ae(t.useClass):t).prototype.ngOnDestroy;if(u){let l=e.destroyHooks||(e.destroyHooks=[]);if(!o&&t.multi){let c=l.indexOf(n);c===-1?l.push(n,[r,u]):l[c+1].push(r,u)}else l.push(n,u)}}}function GD(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function nd(e,t,n,r){for(let o=n;o{n.providersResolver=(r,o)=>kN(r,o?o(e):e,t)}}function x9(e,t,n){let r=Hn()+e,o=T();return o[r]===Te?is(o,r,n?t.call(n):t()):AA(o,r)}function T9(e,t,n,r){return WD(T(),Hn(),e,t,n,r)}function S9(e,t,n,r,o){return qD(T(),Hn(),e,t,n,r,o)}function M9(e,t,n,r,o,i){return UN(T(),Hn(),e,t,n,r,o,i)}function A9(e,t,n,r,o,i,s){return ZD(T(),Hn(),e,t,n,r,o,i,s)}function qu(e,t){let n=e[t];return n===Te?void 0:n}function WD(e,t,n,r,o,i){let s=t+n;return Je(e,s,o)?is(e,s+1,i?r.call(i,o):r(o)):qu(e,s+1)}function qD(e,t,n,r,o,i,s){let a=t+n;return qi(e,a,o,i)?is(e,a+2,s?r.call(s,o,i):r(o,i)):qu(e,a+2)}function UN(e,t,n,r,o,i,s,a){let u=t+n;return DD(e,u,o,i,s)?is(e,u+3,a?r.call(a,o,i,s):r(o,i,s)):qu(e,u+3)}function ZD(e,t,n,r,o,i,s,a,u){let l=t+n;return wD(e,l,o,i,s,a)?is(e,l+4,u?r.call(u,o,i,s,a):r(o,i,s,a)):qu(e,l+4)}function N9(e,t){let n=te(),r,o=e+fe;n.firstCreatePass?(r=BN(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=wr(r.type,!0)),s,a=We(b);try{let u=iu(!1),l=i();return iu(u),rp(n,T(),o,l),l}finally{We(a)}}function BN(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function R9(e,t,n){let r=e+fe,o=T(),i=Ji(o,r);return op(o,r)?WD(o,Hn(),t,i.transform,n,i):i.transform(n)}function O9(e,t,n,r){let o=e+fe,i=T(),s=Ji(i,o);return op(i,o)?qD(i,Hn(),t,s.transform,n,r,s):s.transform(n,r)}function F9(e,t,n,r,o,i){let s=e+fe,a=T(),u=Ji(a,s);return op(a,s)?ZD(a,Hn(),t,u.transform,n,r,o,i,u):u.transform(n,r,o,i)}function op(e,t){return e[P].data[t].pure}function P9(e,t){return Hu(e,t)}var of=class{ngModuleFactory;componentFactories;constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}},ip=(()=>{class e{compileModuleSync(n){return new Gd(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),o=av(n),i=Ry(o.declarations).reduce((s,a)=>{let u=Vn(a);return u&&s.push(new xo(u)),s},[]);return new of(r,i)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var $N=(()=>{class e{zone=v(be);changeDetectionScheduler=v(Tr);applicationRef=v(un);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function HN({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new be(F(y({},zN()),{scheduleInRootZone:n})),[{provide:be,useFactory:e},{provide:vo,multi:!0,useFactory:()=>{let r=v($N,{optional:!0});return()=>r.initialize()}},{provide:vo,multi:!0,useFactory:()=>{let r=v(GN);return()=>{r.initialize()}}},t===!0?{provide:Xv,useValue:!0}:[],{provide:ey,useValue:n??Jv}]}function zN(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var GN=(()=>{class e{subscription=new se;initialized=!1;zone=v(be);pendingTasks=v(dn);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(()=>{be.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{be.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var WN=(()=>{class e{appRef=v(un);taskService=v(dn);ngZone=v(be);zonelessEnabled=v(Sf);tracing=v(No,{optional:!0});disableScheduling=v(Xv,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new se;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(uu):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(v(ey,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){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 wd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 8:{this.appRef.deferredDirtyFlags|=8;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 13:{this.appRef.dirtyFlags|=16,r=!0;break}case 14:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{r=!0;break}case 10:case 9:case 7:case 11:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let o=this.useMicrotaskScheduler?pm:ty;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(uu+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,pm(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qN(){return typeof $localize<"u"&&$localize.locale||Cu}var ss=new E("",{providedIn:"root",factory:()=>v(ss,U.Optional|U.SkipSelf)||qN()});var sf=new E(""),ZN=new E("");function Oi(e){return!e.moduleRef}function KN(e){let t=Oi(e)?e.r3Injector:e.moduleRef.injector,n=t.get(be);return n.run(()=>{Oi(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(St,null),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:i=>{r.handleError(i)}})}),Oi(e)){let i=()=>t.destroy(),s=e.platformInjector.get(sf);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(sf);s.add(i),e.moduleRef.onDestroy(()=>{qa(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return VA(r,n,()=>{let i=t.get(ED);return i.runInitializers(),i.donePromise.then(()=>{let s=t.get(ss,Cu);if(CN(s||Cu),!t.get(ZN,!0))return Oi(e)?t.get(un):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Oi(e)){let u=t.get(un);return e.rootComponent!==void 0&&u.bootstrap(e.rootComponent),u}else return YN(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function YN(e,t){let n=e.injector.get(un);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new w(-403,!1);t.push(e)}var Za=null;function QN(e=[],t){return Ve.create({name:t,providers:[{provide:Su,useValue:"platform"},{provide:sf,useValue:new Set([()=>Za=null])},...e]})}function JN(e=[]){if(Za)return Za;let t=QN(e);return Za=t,PA(),XN(t),t}function XN(e){let t=e.get(Rf,null);rt(e,()=>{t?.forEach(n=>n())})}var vt=(()=>{class e{static __NG_ELEMENT_ID__=eR}return e})();function eR(e){return tR(je(),T(),(e&16)===16)}function tR(e,t,n){if(Nr(e)&&!n){let r=jt(e.index,t);return new Sr(r,r)}else if(e.type&175){let r=t[Qe];return new Sr(r,t)}return null}var af=class{constructor(){}supports(t){return t instanceof Map||yD(t)}create(){return new uf}},uf=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(t){let n;for(n=this._mapHead;n!==null;n=n._next)t(n)}forEachPreviousItem(t){let n;for(n=this._previousMapHead;n!==null;n=n._nextPrevious)t(n)}forEachChangedItem(t){let n;for(n=this._changesHead;n!==null;n=n._nextChanged)t(n)}forEachAddedItem(t){let n;for(n=this._additionsHead;n!==null;n=n._nextAdded)t(n)}forEachRemovedItem(t){let n;for(n=this._removalsHead;n!==null;n=n._nextRemoved)t(n)}diff(t){if(!t)t=new Map;else if(!(t instanceof Map||yD(t)))throw new w(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let n=this._mapHead;if(this._appendAfter=null,this._forEach(t,(r,o)=>{if(n&&n.key===o)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{let i=this._getOrCreateRecordForKey(o,r);n=this._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,n){if(t){let r=t._prev;return n._next=t,n._prev=r,t._prev=n,r&&(r._next=n),t===this._mapHead&&(this._mapHead=n),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(t,n){if(this._records.has(t)){let o=this._records.get(t);this._maybeAddToChanges(o,n);let i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}let r=new lf(t);return this._records.set(t,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;t!==null;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;t!=null;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,n){Object.is(n,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=n,this._addToChanges(t))}_addToAdditions(t){this._additionsHead===null?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){this._changesHead===null?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,n){t instanceof Map?t.forEach(n):Object.keys(t).forEach(r=>n(t[r],r))}},lf=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(t){this.key=t}};function zm(){return new sp([new af])}var sp=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:zm});factories;constructor(n){this.factories=n}static create(n,r){if(r){let o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||zm()),deps:[[e,new I0,new rv]]}}find(n){let r=this.factories.find(o=>o.supports(n));if(r)return r;throw new w(901,!1)}}return e})();function KD(e){try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,o=JN(r),i=[HN({}),{provide:Tr,useExisting:WN},...n||[]],s=new mu({providers:i,parent:o,debugName:"",runEnvironmentInitializers:!1});return KN({r3Injector:s.injector,platformInjector:o,rootComponent:t})}catch(t){return Promise.reject(t)}}function Zn(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function nR(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Oo(e,t){gt("NgSignals");let n=hg(e);return t?.equal&&(n[Be].equal=t.equal),n}function yt(e){let t=V(null);try{return e()}finally{V(t)}}var YD=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=rR}return e})();function rR(){return new YD(T(),je())}var oR=!1,iR=(()=>{class e extends yu{pendingTasks=v(dn);taskId=null;schedule(n){super.schedule(n),this.taskId===null&&(this.taskId=this.pendingTasks.add(),queueMicrotask(()=>this.flush()))}flush(){try{super.flush()}finally{this.taskId!==null&&(this.pendingTasks.remove(this.taskId),this.taskId=null)}}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),cf=class{scheduler;effectFn;zone;injector;unregisterOnDestroy;watcher;constructor(t,n,r,o,i,s){this.scheduler=t,this.effectFn=n,this.zone=r,this.injector=i,this.watcher=wg(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}runEffect(t){try{this.effectFn(t)}catch(n){this.injector.get(St,null,{optional:!0})?.handleError(n)}}run(){this.watcher.run()}schedule(){this.scheduler.schedule(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function sR(){}function aR(e,t){gt("NgSignals"),!t?.injector&&Au(sR);let n=t?.injector??v(Ve),r=t?.manualCleanup!==!0?n.get(zn):null,o=new cf(n.get(iR),e,typeof Zone>"u"?null:Zone.current,r,n,t?.allowSignalWrites??!1),i=n.get(vt,null,{optional:!0});return!i||!(i._lView[R]&8)?o.watcher.notify():(i._lView[Ha]??=[]).push(o.watcher.notify),o}var uR=oR;var df=class{[Be];constructor(t){this[Be]=t}destroy(){this[Be].destroy()}};function lR(e,t){if(uR)return aR(e,t);gt("NgSignals"),!t?.injector&&Au(lR);let n=t?.injector??v(Ve),r=t?.manualCleanup!==!0?n.get(zn):null,o,i=n.get(YD,null,{optional:!0}),s=n.get(Tr);return i!==null&&!t?.forceRoot?(o=fR(i.view,s,e),r instanceof au&&r._lView===i.view&&(r=null)):o=pR(e,n.get(ID),s),o.injector=n,r!==null&&(o.onDestroyFn=r.onDestroy(()=>o.destroy())),new df(o)}var QD=F(y({},pr),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,cleanupFns:void 0,zone:null,kind:"effect",onDestroyFn:Hi,run(){if(this.dirty=!1,this.hasRun&&!_i(this))return;this.hasRun=!0;let e=r=>(this.cleanupFns??=[]).push(r),t=Qr(this),n=nu(!1);try{this.maybeCleanup(),this.fn(e)}finally{nu(n),Ii(this,t)}},maybeCleanup(){if(this.cleanupFns?.length)try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[]}}}),cR=F(y({},QD),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(13)},destroy(){Jr(this),this.onDestroyFn(),this.maybeCleanup(),this.scheduler.remove(this)}}),dR=F(y({},QD),{consumerMarkedDirty(){this.view[R]|=8192,Xi(this.view),this.notifier.notify(14)},destroy(){Jr(this),this.onDestroyFn(),this.maybeCleanup(),this.view[Cr]?.delete(this)}});function fR(e,t,n){let r=Object.create(dR);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=t,r.fn=n,e[Cr]??=new Set,e[Cr].add(r),r.consumerMarkedDirty(r),r}function pR(e,t,n){let r=Object.create(cR);return r.fn=e,r.scheduler=t,r.notifier=n,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.schedule(r),r.notifier.notify(13),r}function k9(e,t){let n=Vn(e),r=t.elementInjector||Mu();return new xo(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var rw=null;function mn(){return rw}function ow(e){rw??=e}var nl=class{};var Ue=new E(""),vp=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(hR),providedIn:"platform"})}return e})();var hR=(()=>{class e extends vp{_location;_history;_doc=v(Ue);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return mn().getBaseHref(this._doc)}onPopState(n){let r=mn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=mn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.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,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function yp(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function JD(e){let t=e.match(/#|\?|$/),n=t&&t.index||e.length,r=n-(e[n-1]==="/"?1:0);return e.slice(0,r)+e.slice(n)}function hn(e){return e&&e[0]!=="?"?"?"+e:e}var Kn=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(sw),providedIn:"root"})}return e})(),iw=new E(""),sw=(()=>{class e extends Kn{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??v(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 yp(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+hn(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(I(vp),I(iw,8))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),aw=(()=>{class e extends Kn{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,r!=null&&(this._baseHref=r)}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 r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(n){let r=yp(this._baseHref,n);return r.length>0?"#"+r:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+hn(i));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(I(vp),I(iw,8))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),us=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=vR(JD(XD(r))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+hn(r))}normalize(n){return e.stripTrailingSlash(mR(this._basePath,XD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(r)),o)}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(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r??void 0,complete:o??void 0})}static normalizeQueryParams=hn;static joinWithSlash=yp;static stripTrailingSlash=JD;static \u0275fac=function(r){return new(r||e)(I(Kn))};static \u0275prov=C({token:e,factory:()=>gR(),providedIn:"root"})}return e})();function gR(){return new us(I(Kn))}function mR(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function XD(e){return e.replace(/\/index.html$/,"")}function vR(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var uw=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(uw||{});var He=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(He||{}),K=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(K||{}),st=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(st||{}),at={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 yR(e){return it(e)[ue.LocaleId]}function DR(e,t,n){let r=it(e),o=[r[ue.DayPeriodsFormat],r[ue.DayPeriodsStandalone]],i=Dt(o,t);return Dt(i,n)}function wR(e,t,n){let r=it(e),o=[r[ue.DaysFormat],r[ue.DaysStandalone]],i=Dt(o,t);return Dt(i,n)}function bR(e,t,n){let r=it(e),o=[r[ue.MonthsFormat],r[ue.MonthsStandalone]],i=Dt(o,t);return Dt(i,n)}function CR(e,t){let r=it(e)[ue.Eras];return Dt(r,t)}function Zu(e,t){let n=it(e);return Dt(n[ue.DateFormat],t)}function Ku(e,t){let n=it(e);return Dt(n[ue.TimeFormat],t)}function Yu(e,t){let r=it(e)[ue.DateTimeFormat];return Dt(r,t)}function gn(e,t){let n=it(e),r=n[ue.NumberSymbols][t];if(typeof r>"u"){if(t===at.CurrencyDecimal)return n[ue.NumberSymbols][at.Decimal];if(t===at.CurrencyGroup)return n[ue.NumberSymbols][at.Group]}return r}function ER(e,t){return it(e)[ue.NumberFormats][t]}function lw(e){if(!e[ue.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[ue.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function IR(e){let t=it(e);return lw(t),(t[ue.ExtraData][2]||[]).map(r=>typeof r=="string"?ap(r):[ap(r[0]),ap(r[1])])}function _R(e,t,n){let r=it(e);lw(r);let o=[r[ue.ExtraData][0],r[ue.ExtraData][1]],i=Dt(o,t)||[];return Dt(i,n)||[]}function Dt(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<"u")return e[n];throw new Error("Locale data API: locale data undefined")}function ap(e){let[t,n]=e.split(":");return{hours:+t,minutes:+n}}var xR=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Qu={},TR=/((?:[^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]*)/;function SR(e,t,n,r){let o=LR(e);t=pn(n,t)||t;let s=[],a;for(;t;)if(a=TR.exec(t),a){s=s.concat(a.slice(1));let c=s.pop();if(!c)break;t=c}else{s.push(t);break}let u=o.getTimezoneOffset();r&&(u=dw(r,u),o=kR(o,r,!0));let l="";return s.forEach(c=>{let d=FR(c);l+=d?d(o,n,u):c==="''"?"'":c.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function rl(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function pn(e,t){let n=yR(e);if(Qu[n]??={},Qu[n][t])return Qu[n][t];let r="";switch(t){case"shortDate":r=Zu(e,st.Short);break;case"mediumDate":r=Zu(e,st.Medium);break;case"longDate":r=Zu(e,st.Long);break;case"fullDate":r=Zu(e,st.Full);break;case"shortTime":r=Ku(e,st.Short);break;case"mediumTime":r=Ku(e,st.Medium);break;case"longTime":r=Ku(e,st.Long);break;case"fullTime":r=Ku(e,st.Full);break;case"short":let o=pn(e,"shortTime"),i=pn(e,"shortDate");r=Ju(Yu(e,st.Short),[o,i]);break;case"medium":let s=pn(e,"mediumTime"),a=pn(e,"mediumDate");r=Ju(Yu(e,st.Medium),[s,a]);break;case"long":let u=pn(e,"longTime"),l=pn(e,"longDate");r=Ju(Yu(e,st.Long),[u,l]);break;case"full":let c=pn(e,"fullTime"),d=pn(e,"fullDate");r=Ju(Yu(e,st.Full),[c,d]);break}return r&&(Qu[n][t]=r),r}function Ju(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,r){return t!=null&&r in t?t[r]:n})),e}function Nt(e,t,n="-",r,o){let i="";(e<0||o&&e<=0)&&(o?e=-e+1:(e=-e,i=n));let s=String(e);for(;s.length0||a>-n)&&(a+=n),e===3)a===0&&n===-12&&(a=12);else if(e===6)return MR(a,t);let u=gn(s,at.MinusSign);return Nt(a,t,u,r,o)}}function AR(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}function ne(e,t,n=He.Format,r=!1){return function(o,i){return NR(o,i,e,t,n,r)}}function NR(e,t,n,r,o,i){switch(n){case 2:return bR(t,o,r)[e.getMonth()];case 1:return wR(t,o,r)[e.getDay()];case 0:let s=e.getHours(),a=e.getMinutes();if(i){let l=IR(t),c=_R(t,o,r),d=l.findIndex(f=>{if(Array.isArray(f)){let[p,h]=f,g=s>=p.hours&&a>=p.minutes,m=s0?Math.floor(o/60):Math.ceil(o/60);switch(e){case 0:return(o>=0?"+":"")+Nt(s,2,i)+Nt(Math.abs(o%60),2,i);case 1:return"GMT"+(o>=0?"+":"")+Nt(s,1,i);case 2:return"GMT"+(o>=0?"+":"")+Nt(s,2,i)+":"+Nt(Math.abs(o%60),2,i);case 3:return r===0?"Z":(o>=0?"+":"")+Nt(s,2,i)+":"+Nt(Math.abs(o%60),2,i);default:throw new Error(`Unknown zone width "${e}"`)}}}var RR=0,tl=4;function OR(e){let t=rl(e,RR,1).getDay();return rl(e,0,1+(t<=tl?tl:tl+7)-t)}function cw(e){let t=e.getDay(),n=t===0?-3:tl-t;return rl(e.getFullYear(),e.getMonth(),e.getDate()+n)}function up(e,t=!1){return function(n,r){let o;if(t){let i=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,s=n.getDate();o=1+Math.floor((s+i)/7)}else{let i=cw(n),s=OR(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return Nt(o,e,gn(r,at.MinusSign))}}function el(e,t=!1){return function(n,r){let i=cw(n).getFullYear();return Nt(i,e,gn(r,at.MinusSign),t)}}var lp={};function FR(e){if(lp[e])return lp[e];let t;switch(e){case"G":case"GG":case"GGG":t=ne(3,K.Abbreviated);break;case"GGGG":t=ne(3,K.Wide);break;case"GGGGG":t=ne(3,K.Narrow);break;case"y":t=ge(0,1,0,!1,!0);break;case"yy":t=ge(0,2,0,!0,!0);break;case"yyy":t=ge(0,3,0,!1,!0);break;case"yyyy":t=ge(0,4,0,!1,!0);break;case"Y":t=el(1);break;case"YY":t=el(2,!0);break;case"YYY":t=el(3);break;case"YYYY":t=el(4);break;case"M":case"L":t=ge(1,1,1);break;case"MM":case"LL":t=ge(1,2,1);break;case"MMM":t=ne(2,K.Abbreviated);break;case"MMMM":t=ne(2,K.Wide);break;case"MMMMM":t=ne(2,K.Narrow);break;case"LLL":t=ne(2,K.Abbreviated,He.Standalone);break;case"LLLL":t=ne(2,K.Wide,He.Standalone);break;case"LLLLL":t=ne(2,K.Narrow,He.Standalone);break;case"w":t=up(1);break;case"ww":t=up(2);break;case"W":t=up(1,!0);break;case"d":t=ge(2,1);break;case"dd":t=ge(2,2);break;case"c":case"cc":t=ge(7,1);break;case"ccc":t=ne(1,K.Abbreviated,He.Standalone);break;case"cccc":t=ne(1,K.Wide,He.Standalone);break;case"ccccc":t=ne(1,K.Narrow,He.Standalone);break;case"cccccc":t=ne(1,K.Short,He.Standalone);break;case"E":case"EE":case"EEE":t=ne(1,K.Abbreviated);break;case"EEEE":t=ne(1,K.Wide);break;case"EEEEE":t=ne(1,K.Narrow);break;case"EEEEEE":t=ne(1,K.Short);break;case"a":case"aa":case"aaa":t=ne(0,K.Abbreviated);break;case"aaaa":t=ne(0,K.Wide);break;case"aaaaa":t=ne(0,K.Narrow);break;case"b":case"bb":case"bbb":t=ne(0,K.Abbreviated,He.Standalone,!0);break;case"bbbb":t=ne(0,K.Wide,He.Standalone,!0);break;case"bbbbb":t=ne(0,K.Narrow,He.Standalone,!0);break;case"B":case"BB":case"BBB":t=ne(0,K.Abbreviated,He.Format,!0);break;case"BBBB":t=ne(0,K.Wide,He.Format,!0);break;case"BBBBB":t=ne(0,K.Narrow,He.Format,!0);break;case"h":t=ge(3,1,-12);break;case"hh":t=ge(3,2,-12);break;case"H":t=ge(3,1);break;case"HH":t=ge(3,2);break;case"m":t=ge(4,1);break;case"mm":t=ge(4,2);break;case"s":t=ge(5,1);break;case"ss":t=ge(5,2);break;case"S":t=ge(6,1);break;case"SS":t=ge(6,2);break;case"SSS":t=ge(6,3);break;case"Z":case"ZZ":case"ZZZ":t=Xu(0);break;case"ZZZZZ":t=Xu(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Xu(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=Xu(2);break;default:return null}return lp[e]=t,t}function dw(e,t){e=e.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function PR(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function kR(e,t,n){let r=n?-1:1,o=e.getTimezoneOffset(),i=dw(t,o);return PR(e,r*(i-o))}function LR(e){if(ew(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[o,i=1,s=1]=e.split("-").map(a=>+a);return rl(o,i-1,s)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let r;if(r=e.match(xR))return VR(r)}let t=new Date(e);if(!ew(t))throw new Error(`Unable to convert "${e}" into a date`);return t}function VR(e){let t=new Date(0),n=0,r=0,o=e[8]?t.setUTCFullYear:t.setFullYear,i=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let s=Number(e[4]||0)-n,a=Number(e[5]||0)-r,u=Number(e[6]||0),l=Math.floor(parseFloat("0."+(e[7]||0))*1e3);return i.call(t,s,a,u,l),t}function ew(e){return e instanceof Date&&!isNaN(e.valueOf())}var jR=/^(\d+)?\.((\d+)(-(\d+))?)?$/,tw=22,ol=".",as="0",UR=";",BR=",",cp="#";function $R(e,t,n,r,o,i,s=!1){let a="",u=!1;if(!isFinite(e))a=gn(n,at.Infinity);else{let l=WR(e);s&&(l=GR(l));let c=t.minInt,d=t.minFrac,f=t.maxFrac;if(i){let N=i.match(jR);if(N===null)throw new Error(`${i} is not a valid digit info`);let B=N[1],ie=N[3],Q=N[5];B!=null&&(c=dp(B)),ie!=null&&(d=dp(ie)),Q!=null?f=dp(Q):ie!=null&&d>f&&(f=d)}qR(l,d,f);let p=l.digits,h=l.integerLen,g=l.exponent,m=[];for(u=p.every(N=>!N);h0?m=p.splice(h,p.length):(m=p,p=[0]);let D=[];for(p.length>=t.lgSize&&D.unshift(p.splice(-t.lgSize,p.length).join(""));p.length>t.gSize;)D.unshift(p.splice(-t.gSize,p.length).join(""));p.length&&D.unshift(p.join("")),a=D.join(gn(n,r)),m.length&&(a+=gn(n,o)+m.join("")),g&&(a+=gn(n,at.Exponential)+"+"+g)}return e<0&&!u?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function HR(e,t,n){let r=ER(t,uw.Decimal),o=zR(r,gn(t,at.MinusSign));return $R(e,o,t,at.Group,at.Decimal,n)}function zR(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(UR),o=r[0],i=r[1],s=o.indexOf(ol)!==-1?o.split(ol):[o.substring(0,o.lastIndexOf(as)+1),o.substring(o.lastIndexOf(as)+1)],a=s[0],u=s[1]||"";n.posPre=a.substring(0,a.indexOf(cp));for(let c=0;c-1&&(t=t.replace(ol,"")),(i=t.search(/e/i))>0?(o<0&&(o=i),o+=+t.slice(i+1),t=t.substring(0,i)):o<0&&(o=t.length),i=0;t.charAt(i)===as;i++);if(i===(a=t.length))r=[0],o=1;else{for(a--;t.charAt(a)===as;)a--;for(o-=i,r=[],s=0;i<=a;i++,s++)r[s]=Number(t.charAt(i))}return o>tw&&(r=r.splice(0,tw-1),n=o-1,o=1),{digits:r,exponent:n,integerLen:o}}function qR(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let r=e.digits,o=r.length-e.integerLen,i=Math.min(Math.max(t,o),n),s=i+e.integerLen,a=r[s];if(s>0){r.splice(Math.max(e.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[s-1]++;for(;o=l?h.pop():u=!1),f>=10?1:0},0);c&&(r.unshift(c),e.integerLen++)}function dp(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function s7(e,t,n){return LD(e,t,n)}function il(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[o,i]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()===t)return decodeURIComponent(i)}return null}var fp=/\s+/,nw=[],a7=(()=>{class e{_ngEl;_renderer;initialClasses=nw;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(fp):nw}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(fp):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],o=n[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(fp).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(r){return new(r||e)(b(xe),b(ot))};static \u0275dir=H({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})();var u7=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,o){this._ngEl=n,this._differs=r,this._renderer=o}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,r){let[o,i]=n.split("."),s=o.indexOf("-")===-1?void 0:Bt.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,i?`${r}${i}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,o,s)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||e)(b(xe),b(sp),b(ot))};static \u0275dir=H({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),l7=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}static \u0275fac=function(r){return new(r||e)(b(Pr))};static \u0275dir=H({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[pt]})}return e})();function Dp(e,t){return new w(2100,!1)}var pp=class{createSubscription(t,n){return yt(()=>t.subscribe({next:n,error:r=>{throw r}}))}dispose(t){yt(()=>t.unsubscribe())}},hp=class{createSubscription(t,n){return t.then(n,r=>{throw r})}dispose(t){}},ZR=new hp,KR=new pp,c7=(()=>{class e{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;constructor(n){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,r=>this._updateLatestValue(n,r))}_selectStrategy(n){if(qn(n))return ZR;if(ep(n))return KR;throw Dp(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,r){n===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||e)(b(vt,16))};static \u0275pipe=Ro({name:"async",type:e,pure:!1})}return e})();var YR="mediumDate",QR=new E(""),JR=new E(""),d7=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,r,o){this.locale=n,this.defaultTimezone=r,this.defaultOptions=o}transform(n,r,o,i){if(n==null||n===""||n!==n)return null;try{let s=r??this.defaultOptions?.dateFormat??YR,a=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return SR(n,s,i||this.locale,a)}catch(s){throw Dp(e,s.message)}}static \u0275fac=function(r){return new(r||e)(b(ss,16),b(QR,24),b(JR,24))};static \u0275pipe=Ro({name:"date",type:e,pure:!0})}return e})();var f7=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,r,o){if(!XR(n))return null;o||=this._locale;try{let i=eO(n);return HR(i,o,r)}catch(i){throw Dp(e,i.message)}}static \u0275fac=function(r){return new(r||e)(b(ss,16))};static \u0275pipe=Ro({name:"number",type:e,pure:!0})}return e})();function XR(e){return!(e==null||e===""||e!==e)}function eO(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new Error(`${e} is not a number`);return e}var tO=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({})}return e})(),fw="browser",nO="server";function wp(e){return e===nO}var rO=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>new gp(v(Ue),window)})}return e})(),gp=class{document;window;offset=()=>[0,0];constructor(t,n){this.document=t,this.window=n}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){let n=oO(this.document,t);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){let n=t.getBoundingClientRect(),r=n.left+this.window.pageXOffset,o=n.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(r-i[0],o-i[1])}};function oO(e,t){let n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if(typeof e.createTreeWalker=="function"&&e.body&&typeof e.body.attachShadow=="function"){let r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(t)||i.querySelector(`[name="${t}"]`);if(s)return s}o=r.nextNode()}}return null}var Fo=class{};var cs=class{},al=class{},Vr=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(` -`).forEach(n=>{let r=n.indexOf(":");if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=(t.op==="a"?this.headers.get(n):void 0)||[];o.push(...r),this.headers.set(n,o);break;case"d":let i=t.value;if(!i)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=this.headers.get(n);if(!s)return;s=s.filter(a=>i.indexOf(a)===-1),s.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}break}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var Cp=class{encodeKey(t){return hw(t)}encodeValue(t){return hw(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function iO(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],u=n.get(s)||[];u.push(a),n.set(s,u)}),n}var sO=/%(\d[a-f0-9])/gi,aO={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function hw(e){return encodeURIComponent(e).replace(sO,(t,n)=>aO[n]??t)}function sl(e){return`${e}`}var Yn=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new Cp,t.fromString){if(t.fromObject)throw new w(2805,!1);this.map=iO(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(sl):[sl(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let n=(t.op==="a"?this.map.get(t.param):void 0)||[];n.push(sl(t.value)),this.map.set(t.param,n);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],o=r.indexOf(sl(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}},gw=class{defaultValue;constructor(t){this.defaultValue=t}},Ep=class{map=new Map;set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function uO(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function mw(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function vw(e){return typeof Blob<"u"&&e instanceof Blob}function yw(e){return typeof FormData<"u"&&e instanceof FormData}function lO(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var Dw="Content-Type",ww="Accept",Ew="X-Request-URL",Iw="text/plain",_w="application/json",cO=`${_w}, ${Iw}, */*`,ls=class e{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(uO(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,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 Vr,this.context??=new Ep,!this.params)this.params=new Yn,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n.indexOf("?"),u=a===-1?"?":af.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((f,p)=>f.set(p,t.setParams[p]),c)),new e(n,r,s,{params:c,headers:l,context:d,reportProgress:u,responseType:o,withCredentials:a,transferCache:i})}},Po=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(Po||{}),ds=class{headers;status;statusText;url;ok;type;constructor(t,n=200,r="OK"){this.headers=t.headers||new Vr,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},Ip=class e extends ds{constructor(t={}){super(t)}type=Po.ResponseHeader;clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ul=class e extends ds{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Po.Response;clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ll=class extends ds{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},dO=200,fO=204;function bp(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}var pO=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof ls)i=n;else{let u;o.headers instanceof Vr?u=o.headers:u=new Vr(o.headers);let l;o.params&&(o.params instanceof Yn?l=o.params:l=new Yn({fromObject:o.params})),i=new ls(n,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:l,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let s=_(i).pipe(kt(u=>this.handler.handle(u)));if(n instanceof ls||o.observe==="events")return s;let a=s.pipe(Pe(u=>u instanceof ul));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(A(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new w(2806,!1);return u.body}));case"blob":return a.pipe(A(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new w(2807,!1);return u.body}));case"text":return a.pipe(A(u=>{if(u.body!==null&&typeof u.body!="string")throw new w(2808,!1);return u.body}));case"json":default:return a.pipe(A(u=>u.body))}case"response":return a;default:throw new w(2809,!1)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new Yn().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,bp(o,r))}post(n,r,o={}){return this.request("POST",n,bp(o,r))}put(n,r,o={}){return this.request("PUT",n,bp(o,r))}static \u0275fac=function(r){return new(r||e)(I(cs))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var hO=new E("");function gO(e,t){return t(e)}function mO(e,t,n){return(r,o)=>rt(n,()=>t(r,i=>e(i,o)))}var _p=new E(""),vO=new E(""),yO=new E("",{providedIn:"root",factory:()=>!0});var bw=(()=>{class e extends cs{backend;injector;chain=null;pendingTasks=v(dn);contributeToStability=v(yO);constructor(n,r){super(),this.backend=n,this.injector=r}handle(n){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(_p),...this.injector.get(vO,[])]));this.chain=r.reduceRight((o,i)=>mO(o,i,this.injector),gO)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(Fn(()=>this.pendingTasks.remove(r)))}else return this.chain(n,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||e)(I(al),I(Ye))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var DO=/^\)\]\}',?\n/,wO=RegExp(`^${Ew}:`,"m");function bO(e){return"responseURL"in e&&e.responseURL?e.responseURL:wO.test(e.getAllResponseHeaders())?e.getResponseHeader(Ew):null}var Cw=(()=>{class e{xhrFactory;constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?X(r.\u0275loadImpl()):_(null)).pipe(De(()=>new O(i=>{let s=r.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),n.headers.has(ww)||s.setRequestHeader(ww,cO),!n.headers.has(Dw)){let g=n.detectContentTypeHeader();g!==null&&s.setRequestHeader(Dw,g)}if(n.responseType){let g=n.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=n.serializeBody(),u=null,l=()=>{if(u!==null)return u;let g=s.statusText||"OK",m=new Vr(s.getAllResponseHeaders()),D=bO(s)||n.url;return u=new Ip({headers:m,status:s.status,statusText:g,url:D}),u},c=()=>{let{headers:g,status:m,statusText:D,url:N}=l(),B=null;m!==fO&&(B=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=B?dO:0);let ie=m>=200&&m<300;if(n.responseType==="json"&&typeof B=="string"){let Q=B;B=B.replace(DO,"");try{B=B!==""?JSON.parse(B):null}catch(fr){B=Q,ie&&(ie=!1,B={error:fr,text:B})}}ie?(i.next(new ul({body:B,headers:g,status:m,statusText:D,url:N||void 0})),i.complete()):i.error(new ll({error:B,headers:g,status:m,statusText:D,url:N||void 0}))},d=g=>{let{url:m}=l(),D=new ll({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});i.error(D)},f=!1,p=g=>{f||(i.next(l()),f=!0);let m={type:Po.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),n.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),i.next(m)},h=g=>{let m={type:Po.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),i.next(m)};return s.addEventListener("load",c),s.addEventListener("error",d),s.addEventListener("timeout",d),s.addEventListener("abort",d),n.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",h)),s.send(a),i.next({type:Po.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",c),s.removeEventListener("timeout",d),n.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",h)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||e)(I(Fo))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),xw=new E(""),CO="XSRF-TOKEN",EO=new E("",{providedIn:"root",factory:()=>CO}),IO="X-XSRF-TOKEN",_O=new E("",{providedIn:"root",factory:()=>IO}),cl=class{},xO=(()=>{class e{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=il(n,this.cookieName),this.lastCookieString=n),this.lastToken}static \u0275fac=function(r){return new(r||e)(I(Ue),I(Gn),I(EO))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function TO(e,t){let n=e.url.toLowerCase();if(!v(xw)||e.method==="GET"||e.method==="HEAD"||n.startsWith("http://")||n.startsWith("https://"))return t(e);let r=v(cl).getToken(),o=v(_O);return r!=null&&!e.headers.has(o)&&(e=e.clone({headers:e.headers.set(o,r)})),t(e)}var Tw=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(Tw||{});function SO(e,t){return{\u0275kind:e,\u0275providers:t}}function x7(...e){let t=[pO,Cw,bw,{provide:cs,useExisting:bw},{provide:al,useFactory:()=>v(hO,{optional:!0})??v(Cw)},{provide:_p,useValue:TO,multi:!0},{provide:xw,useValue:!0},{provide:cl,useClass:xO}];for(let n of e)t.push(...n.\u0275providers);return Ar(t)}function T7(e){return SO(Tw.Interceptors,e.map(t=>({provide:_p,useValue:t,multi:!0})))}var Tp=class extends nl{supportsDOMEvents=!0},Sp=class e extends Tp{static makeCurrent(){ow(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=MO();return n==null?null:AO(n)}resetBaseElement(){fs=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return il(document.cookie,t)}},fs=null;function MO(){return fs=fs||document.querySelector("base"),fs?fs.getAttribute("href"):null}function AO(e){return new URL(e,document.baseURI).pathname}var NO=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Mp=new E(""),Ow=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(I(Mp),I(be))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),fl=class{_doc;constructor(t){this._doc=t}manager},dl="ng-app-id";function Sw(e){for(let t of e)t.remove()}function Mw(e,t){let n=t.createElement("style");return n.textContent=e,n}function RO(e,t,n,r){let o=e.head?.querySelectorAll(`style[${dl}="${t}"],link[${dl}="${t}"]`);if(o)for(let i of o)i.removeAttribute(dl),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]})}function Ap(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var Fw=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,this.isServer=wp(i),RO(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,Mw);r?.forEach(o=>this.addUsage(o,this.external,Ap))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(Sw(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Sw(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,Mw(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Ap(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(dl,this.appId),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(I(Ue),I(Nf),I(Of,8),I(Gn))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),xp={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"},Rp=/%COMP%/g;var Pw="%COMP%",OO=`_nghost-${Pw}`,FO=`_ngcontent-${Pw}`,PO=!0,kO=new E("",{providedIn:"root",factory:()=>PO});function LO(e){return FO.replace(Rp,e)}function VO(e){return OO.replace(Rp,e)}function kw(e,t){return t.map(n=>n.replace(Rp,e))}var Aw=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,o,i,s,a,u,l=null,c=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.platformId=a,this.ngZone=u,this.nonce=l,this.tracingService=c,this.platformIsServer=wp(a),this.defaultRenderer=new ps(n,s,u,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Ut.ShadowDom&&(r=F(y({},r),{encapsulation:Ut.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof pl?o.applyToHost(n):o instanceof hs&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,u=this.eventManager,l=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Ut.Emulated:i=new pl(u,l,r,this.appId,c,s,a,d,f);break;case Ut.ShadowDom:return new Np(u,l,n,r,s,a,this.nonce,d,f);default:i=new hs(u,l,r,c,s,a,d,f);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||e)(I(Ow),I(Fw),I(Nf),I(kO),I(Ue),I(Gn),I(be),I(Of),I(No,8))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),ps=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=o,this.tracingService=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(xp[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(Nw(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(Nw(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new w(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;let i=xp[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=xp[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){o&(Bt.DashCase|Bt.Important)?t.style.setProperty(n,r,o&Bt.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&Bt.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t=="string"&&(t=mn().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${n}`);let i=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))===!1&&n.preventDefault()}}};function Nw(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Np=class extends ps{sharedStylesHost;hostEl;shadowRoot;constructor(t,n,r,o,i,s,a,u,l){super(t,i,s,u,l),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=o.styles;c=kw(o.id,c);for(let f of c){let p=document.createElement("style");a&&p.setAttribute("nonce",a),p.textContent=f,this.shadowRoot.appendChild(p)}let d=o.getExternalStyles?.();if(d)for(let f of d){let p=Ap(f,i);a&&p.setAttribute("nonce",a),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},hs=class extends ps{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,u,l){super(t,i,s,a,u),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let c=r.styles;this.styles=l?kw(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},pl=class extends hs{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,u,l){let c=o+"-"+r.id;super(t,n,r,i,s,a,u,l,c),this.contentAttr=LO(c),this.hostAttr=VO(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}},jO=(()=>{class e extends fl{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static \u0275fac=function(r){return new(r||e)(I(Ue))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Rw=["alt","control","meta","shift"],UO={"\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"},BO={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},$O=(()=>{class e extends fl{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>mn().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Rw.forEach(l=>{let c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=i,r.length!=0||i.length===0)return null;let u={};return u.domEventName=o,u.fullKey=s,u}static matchEventFullKeyCode(n,r){let o=UO[n.key]||n.key,i="";return r.indexOf("code.")>-1&&(o=n.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Rw.forEach(s=>{if(s!==o){let a=BO[s];a(n)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(I(Ue))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function q7(e,t){return KD(y({rootComponent:e},HO(t)))}function HO(e){return{appProviders:[...ZO,...e?.providers??[]],platformProviders:qO}}function zO(){Sp.makeCurrent()}function GO(){return new St}function WO(){return fy(document),document}var qO=[{provide:Gn,useValue:fw},{provide:Rf,useValue:zO,multi:!0},{provide:Ue,useFactory:WO,deps:[]}];var ZO=[{provide:Su,useValue:"root"},{provide:St,useFactory:GO,deps:[]},{provide:Mp,useClass:jO,multi:!0,deps:[Ue,be,Gn]},{provide:Mp,useClass:$O,multi:!0,deps:[Ue]},Aw,Fw,Ow,{provide:_o,useExisting:Aw},{provide:Fo,useClass:NO,deps:[]},[]];var Lw=(()=>{class e{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static \u0275fac=function(r){return new(r||e)(I(Ue))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var KO=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(YO),o},providedIn:"root"})}return e})(),YO=(()=>{class e extends KO{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Ht.NONE:return r;case Ht.HTML:return Wn(r,"HTML")?At(r):My(this._doc,String(r)).toString();case Ht.STYLE:return Wn(r,"Style")?At(r):r;case Ht.SCRIPT:if(Wn(r,"Script"))return At(r);throw new w(5200,!1);case Ht.URL:return Wn(r,"URL")?At(r):Vu(String(r));case Ht.RESOURCE_URL:if(Wn(r,"ResourceURL"))return At(r);throw new w(5201,!1);default:throw new w(5202,!1)}}bypassSecurityTrustHtml(n){return Dy(n)}bypassSecurityTrustStyle(n){return wy(n)}bypassSecurityTrustScript(n){return by(n)}bypassSecurityTrustUrl(n){return Cy(n)}bypassSecurityTrustResourceUrl(n){return Ey(n)}static \u0275fac=function(r){return new(r||e)(I(Ue))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var L="primary",Ms=Symbol("RouteTitle"),Lp=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function Bo(e){return new Lp(e)}function JO(e,t,n){let r=n.path.split("/");if(r.length>e.length||n.pathMatch==="full"&&(t.hasChildren()||r.lengthr[i]===o)}else return e===t}function qw(e){return e.length>0?e[e.length-1]:null}function Qn(e){return Yt(e)?e:qn(e)?X(Promise.resolve(e)):_(e)}var eF={exact:Kw,subset:Yw},Zw={exact:tF,subset:nF,ignored:()=>!0};function Vw(e,t,n){return eF[n.paths](e.root,t.root,n.matrixParams)&&Zw[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment==="exact"&&e.fragment!==t.fragment)}function tF(e,t){return Gt(e,t)}function Kw(e,t,n){if(!Ur(e.segments,t.segments)||!ml(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!Kw(e.children[r],t.children[r],n))return!1;return!0}function nF(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>Ww(e[n],t[n]))}function Yw(e,t,n){return Qw(e,t,t.segments,n)}function Qw(e,t,n,r){if(e.segments.length>n.length){let o=e.segments.slice(0,n.length);return!(!Ur(o,n)||t.hasChildren()||!ml(o,n,r))}else if(e.segments.length===n.length){if(!Ur(e.segments,n)||!ml(e.segments,n,r))return!1;for(let o in t.children)if(!e.children[o]||!Yw(e.children[o],t.children[o],r))return!1;return!0}else{let o=n.slice(0,e.segments.length),i=n.slice(e.segments.length);return!Ur(e.segments,o)||!ml(e.segments,o,r)||!e.children[L]?!1:Qw(e.children[L],t,i,r)}}function ml(e,t,n){return t.every((r,o)=>Zw[n](e[o].parameters,r.parameters))}var yn=class{root;queryParams;fragment;_queryParamMap;constructor(t=new G([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap??=Bo(this.queryParams),this._queryParamMap}toString(){return iF.serialize(this)}},G=class{segments;children;parent=null;constructor(t,n){this.segments=t,this.children=n,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return vl(this)}},jr=class{path;parameters;_parameterMap;constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=Bo(this.parameters),this._parameterMap}toString(){return Xw(this)}};function rF(e,t){return Ur(e,t)&&e.every((n,r)=>Gt(n.parameters,t[r].parameters))}function Ur(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function oF(e,t){let n=[];return Object.entries(e.children).forEach(([r,o])=>{r===L&&(n=n.concat(t(o,r)))}),Object.entries(e.children).forEach(([r,o])=>{r!==L&&(n=n.concat(t(o,r)))}),n}var ch=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>new ws,providedIn:"root"})}return e})(),ws=class{parse(t){let n=new Up(t);return new yn(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){let n=`/${gs(t.root,!0)}`,r=uF(t.queryParams),o=typeof t.fragment=="string"?`#${sF(t.fragment)}`:"";return`${n}${r}${o}`}},iF=new ws;function vl(e){return e.segments.map(t=>Xw(t)).join("/")}function gs(e,t){if(!e.hasChildren())return vl(e);if(t){let n=e.children[L]?gs(e.children[L],!1):"",r=[];return Object.entries(e.children).forEach(([o,i])=>{o!==L&&r.push(`${o}:${gs(i,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}else{let n=oF(e,(r,o)=>o===L?[gs(e.children[L],!1)]:[`${o}:${gs(r,!1)}`]);return Object.keys(e.children).length===1&&e.children[L]!=null?`${vl(e)}/${n[0]}`:`${vl(e)}/(${n.join("//")})`}}function Jw(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hl(e){return Jw(e).replace(/%3B/gi,";")}function sF(e){return encodeURI(e)}function jp(e){return Jw(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function yl(e){return decodeURIComponent(e)}function jw(e){return yl(e.replace(/\+/g,"%20"))}function Xw(e){return`${jp(e.path)}${aF(e.parameters)}`}function aF(e){return Object.entries(e).map(([t,n])=>`;${jp(t)}=${jp(n)}`).join("")}function uF(e){let t=Object.entries(e).map(([n,r])=>Array.isArray(r)?r.map(o=>`${hl(n)}=${hl(o)}`).join("&"):`${hl(n)}=${hl(r)}`).filter(n=>n);return t.length?`?${t.join("&")}`:""}var lF=/^[^\/()?;#]+/;function Op(e){let t=e.match(lF);return t?t[0]:""}var cF=/^[^\/()?;=#]+/;function dF(e){let t=e.match(cF);return t?t[0]:""}var fF=/^[^=?&#]+/;function pF(e){let t=e.match(fF);return t?t[0]:""}var hF=/^[^&#]+/;function gF(e){let t=e.match(hF);return t?t[0]:""}var Up=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new G([],{}):new G([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(r[L]=new G(t,n)),r}parseSegment(){let t=Op(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(t),new jr(yl(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let n=dF(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let o=Op(this.remaining);o&&(r=o,this.capture(r))}t[yl(n)]=yl(r)}parseQueryParam(t){let n=pF(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let s=gF(this.remaining);s&&(r=s,this.capture(r))}let o=jw(n),i=jw(r);if(t.hasOwnProperty(o)){let s=t[o];Array.isArray(s)||(s=[s],t[o]=s),s.push(i)}else t[o]=i}parseParens(t){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Op(this.remaining),o=this.remaining[r.length];if(o!=="/"&&o!==")"&&o!==";")throw new w(4010,!1);let i;r.indexOf(":")>-1?(i=r.slice(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=L);let s=this.parseChildren();n[i]=Object.keys(s).length===1?s[L]:new G([],s),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new w(4011,!1)}};function eb(e){return e.segments.length>0?new G([],{[L]:e}):e}function tb(e){let t={};for(let[r,o]of Object.entries(e.children)){let i=tb(o);if(r===L&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))t[s]=a;else(i.segments.length>0||i.hasChildren())&&(t[r]=i)}let n=new G(e.segments,t);return mF(n)}function mF(e){if(e.numberOfChildren===1&&e.children[L]){let t=e.children[L];return new G(e.segments.concat(t.segments),t.children)}return e}function Br(e){return e instanceof yn}function vF(e,t,n=null,r=null){let o=nb(e);return rb(o,t,n,r)}function nb(e){let t;function n(i){let s={};for(let u of i.children){let l=n(u);s[u.outlet]=l}let a=new G(i.url,s);return i===e&&(t=a),a}let r=n(e.root),o=eb(r);return t??o}function rb(e,t,n,r){let o=e;for(;o.parent;)o=o.parent;if(t.length===0)return Fp(o,o,o,n,r);let i=yF(t);if(i.toRoot())return Fp(o,o,new G([],{}),n,r);let s=DF(i,o,e),a=s.processChildren?vs(s.segmentGroup,s.index,i.commands):ib(s.segmentGroup,s.index,i.commands);return Fp(o,s.segmentGroup,a,n,r)}function Dl(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function bs(e){return typeof e=="object"&&e!=null&&e.outlets}function Fp(e,t,n,r,o){let i={};r&&Object.entries(r).forEach(([u,l])=>{i[u]=Array.isArray(l)?l.map(c=>`${c}`):`${l}`});let s;e===t?s=n:s=ob(e,t,n);let a=eb(tb(s));return new yn(a,i,o)}function ob(e,t,n){let r={};return Object.entries(e.children).forEach(([o,i])=>{i===t?r[o]=n:r[o]=ob(i,t,n)}),new G(e.segments,r)}var wl=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&Dl(r[0]))throw new w(4003,!1);let o=r.find(bs);if(o&&o!==qw(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function yF(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new wl(!0,0,e);let t=0,n=!1,r=e.reduce((o,i,s)=>{if(typeof i=="object"&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([u,l])=>{a[u]=typeof l=="string"?l.split("/"):l}),[...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===""?n=!0:a===".."?t++:a!=""&&o.push(a))}),o):[...o,i]},[]);return new wl(n,t,r)}var Vo=class{segmentGroup;processChildren;index;constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function DF(e,t,n){if(e.isAbsolute)return new Vo(t,!0,0);if(!n)return new Vo(t,!1,NaN);if(n.parent===null)return new Vo(n,!0,0);let r=Dl(e.commands[0])?0:1,o=n.segments.length-1+r;return wF(n,o,e.numberOfDoubleDots)}function wF(e,t,n){let r=e,o=t,i=n;for(;i>o;){if(i-=o,r=r.parent,!r)throw new w(4005,!1);o=r.segments.length}return new Vo(r,!1,o-i)}function bF(e){return bs(e[0])?e[0].outlets:{[L]:e}}function ib(e,t,n){if(e??=new G([],{}),e.segments.length===0&&e.hasChildren())return vs(e,t,n);let r=CF(e,t,n),o=n.slice(r.commandIndex);if(r.match&&r.pathIndexi!==L)&&e.children[L]&&e.numberOfChildren===1&&e.children[L].segments.length===0){let i=vs(e.children[L],t,n);return new G(e.segments,i.children)}return Object.entries(r).forEach(([i,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[i]=ib(e.children[i],t,s))}),Object.entries(e.children).forEach(([i,s])=>{r[i]===void 0&&(o[i]=s)}),new G(e.segments,o)}}function CF(e,t,n){let r=0,o=t,i={match:!1,pathIndex:0,commandIndex:0};for(;o=n.length)return i;let s=e.segments[o],a=n[r];if(bs(a))break;let u=`${a}`,l=r0&&u===void 0)break;if(u&&l&&typeof l=="object"&&l.outlets===void 0){if(!Bw(u,l,s))return i;r+=2}else{if(!Bw(u,{},s))return i;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}function Bp(e,t,n){let r=e.segments.slice(0,t),o=0;for(;o{typeof r=="string"&&(r=[r]),r!==null&&(t[n]=Bp(new G([],{}),0,r))}),t}function Uw(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}function Bw(e,t,n){return e==n.path&&Gt(t,n.parameters)}var ys="imperative",Oe=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Oe||{}),wt=class{id;url;constructor(t,n){this.id=t,this.url=n}},Cs=class extends wt{type=Oe.NavigationStart;navigationTrigger;restoredState;constructor(t,n,r="imperative",o=null){super(t,n),this.navigationTrigger=r,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Dn=class extends wt{urlAfterRedirects;type=Oe.NavigationEnd;constructor(t,n,r){super(t,n),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},lt=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(lt||{}),$p=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}($p||{}),vn=class extends wt{reason;code;type=Oe.NavigationCancel;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},$r=class extends wt{reason;code;type=Oe.NavigationSkipped;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}},Es=class extends wt{error;target;type=Oe.NavigationError;constructor(t,n,r,o){super(t,n),this.error=r,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},bl=class extends wt{urlAfterRedirects;state;type=Oe.RoutesRecognized;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Hp=class extends wt{urlAfterRedirects;state;type=Oe.GuardsCheckStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zp=class extends wt{urlAfterRedirects;state;shouldActivate;type=Oe.GuardsCheckEnd;constructor(t,n,r,o,i){super(t,n),this.urlAfterRedirects=r,this.state=o,this.shouldActivate=i}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Gp=class extends wt{urlAfterRedirects;state;type=Oe.ResolveStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Wp=class extends wt{urlAfterRedirects;state;type=Oe.ResolveEnd;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},qp=class{route;type=Oe.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Zp=class{route;type=Oe.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Kp=class{snapshot;type=Oe.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Yp=class{snapshot;type=Oe.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Qp=class{snapshot;type=Oe.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Jp=class{snapshot;type=Oe.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Is=class{},$o=class{url;navigationBehaviorOptions;constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}};function IF(e,t){return e.providers&&!e._injector&&(e._injector=Qf(e.providers,t,`Route: ${e.path}`)),e._injector??t}function Rt(e){return e.outlet||L}function _F(e,t){let n=e.filter(r=>Rt(r)===t);return n.push(...e.filter(r=>Rt(r)!==t)),n}function As(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let n=t.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}var Xp=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return As(this.route?.snapshot)??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new Sl(this.rootInjector)}},Sl=(()=>{class e{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Xp(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static \u0275fac=function(r){return new(r||e)(I(Ye))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Cl=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=eh(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=eh(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=th(t,this._root);return n.length<2?[]:n[n.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return th(t,this._root).map(n=>n.value)}};function eh(e,t){if(e===t.value)return t;for(let n of t.children){let r=eh(e,n);if(r)return r}return null}function th(e,t){if(e===t.value)return[t];for(let n of t.children){let r=th(e,n);if(r.length)return r.unshift(t),r}return[]}var ut=class{value;children;constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}};function Lo(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var El=class extends Cl{snapshot;constructor(t,n){super(t),this.snapshot=n,dh(this,t)}toString(){return this.snapshot.toString()}};function sb(e){let t=xF(e),n=new Me([new jr("",{})]),r=new Me({}),o=new Me({}),i=new Me({}),s=new Me(""),a=new Hr(n,r,i,s,o,L,e,t.root);return a.snapshot=t.root,new El(new ut(a,[]),t)}function xF(e){let t={},n={},r={},o="",i=new jo([],t,r,o,n,L,e,null,{});return new _l("",new ut(i,[]))}var Hr=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,n,r,o,i,s,a,u){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(A(l=>l[Ms]))??_(void 0),this.url=t,this.params=n,this.queryParams=r,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(A(t=>Bo(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(A(t=>Bo(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Il(e,t,n="emptyOnly"){let r,{routeConfig:o}=e;return t!==null&&(n==="always"||o?.path===""||!t.component&&!t.routeConfig?.loadComponent)?r={params:y(y({},t.params),e.params),data:y(y({},t.data),e.data),resolve:y(y(y(y({},e.data),t.data),o?.data),e._resolvedData)}:r={params:y({},e.params),data:y({},e.data),resolve:y(y({},e.data),e._resolvedData??{})},o&&ub(o)&&(r.resolve[Ms]=o.title),r}var jo=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Ms]}constructor(t,n,r,o,i,s,a,u,l){this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=l}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??=Bo(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Bo(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${n}')`}},_l=class extends Cl{url;constructor(t,n){super(n),this.url=t,dh(this,n)}toString(){return ab(this._root)}};function dh(e,t){t.value._routerState=e,t.children.forEach(n=>dh(e,n))}function ab(e){let t=e.children.length>0?` { ${e.children.map(ab).join(", ")} } `:"";return`${e.value}${t}`}function Pp(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Gt(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Gt(t.params,n.params)||e.paramsSubject.next(n.params),XO(t.url,n.url)||e.urlSubject.next(n.url),Gt(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function nh(e,t){let n=Gt(e.params,t.params)&&rF(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||nh(e.parent,t.parent))}function ub(e){return typeof e.title=="string"||e.title===null}var TF=new E(""),SF=(()=>{class e{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=L;activateEvents=new ee;deactivateEvents=new ee;attachEvents=new ee;detachEvents=new ee;routerOutletData=ry(void 0);parentContexts=v(Sl);location=v(Pr);changeDetector=v(vt);inputBinder=v(fh,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),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 w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,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,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=n;let o=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new rh(n,a,o.injector,this.routerOutletData);this.activated=o.createComponent(s,{index:o.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[pt]})}return e})(),rh=class e{route;childContexts;parent;outletData;__ngOutletInjector(t){return new e(this.route,this.childContexts,t,this.outletData)}constructor(t,n,r,o){this.route=t,this.childContexts=n,this.parent=r,this.outletData=o}get(t,n){return t===Hr?this.route:t===Sl?this.childContexts:t===TF?this.outletData:this.parent.get(t,n)}},fh=new E("");function MF(e,t,n){let r=_s(e,t._root,n?n._root:void 0);return new El(r,t)}function _s(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let r=n.value;r._futureSnapshot=t.value;let o=AF(e,t,n);return new ut(r,o)}else{if(e.shouldAttach(t.value)){let i=e.retrieve(t.value);if(i!==null){let s=i.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>_s(e,a)),s}}let r=NF(t.value),o=t.children.map(i=>_s(e,i));return new ut(r,o)}}function AF(e,t,n){return t.children.map(r=>{for(let o of n.children)if(e.shouldReuseRoute(r.value,o.value.snapshot))return _s(e,r,o);return _s(e,r)})}function NF(e){return new Hr(new Me(e.url),new Me(e.params),new Me(e.queryParams),new Me(e.fragment),new Me(e.data),e.outlet,e.component,e)}var xs=class{redirectTo;navigationBehaviorOptions;constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}},lb="ngNavigationCancelingError";function xl(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=Br(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=cb(!1,lt.Redirect);return o.url=n,o.navigationBehaviorOptions=r,o}function cb(e,t){let n=new Error(`NavigationCancelingError: ${e||""}`);return n[lb]=!0,n.cancellationCode=t,n}function RF(e){return db(e)&&Br(e.url)}function db(e){return!!e&&e[lb]}var OF=(e,t,n,r)=>A(o=>(new oh(t,o.targetRouterState,o.currentRouterState,n,r).activate(e),o)),oh=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,n,r,o,i){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=o,this.inputBindingEnabled=i}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),Pp(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let o=Lo(n);t.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],r),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,r)})}deactivateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(o===i)if(o.component){let s=r.getContext(o.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else i&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=Lo(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=Lo(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){let o=Lo(n);t.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],r),this.forwardEvent(new Jp(i.value.snapshot))}),t.children.length&&this.forwardEvent(new Yp(t.value.snapshot))}activateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(Pp(o),o===i)if(o.component){let s=r.getOrCreateContext(o.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(o.component){let s=r.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),Pp(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=o,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}},Tl=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Uo=class{component;route;constructor(t,n){this.component=t,this.route=n}};function FF(e,t,n){let r=e._root,o=t?t._root:null;return ms(r,o,n,[r.value])}function PF(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function zo(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e=="function"&&!Ym(e)?e:t.get(e):r}function ms(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=Lo(t);return e.children.forEach(s=>{kF(s,i[s.value.outlet],n,r.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>Ds(a,n.getContext(s),o)),o}function kF(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&i.routeConfig===s.routeConfig){let u=LF(s,i,i.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new Tl(r)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?ms(e,t,a?a.children:null,r,o):ms(e,t,n,r,o),u&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new Uo(a.outlet.component,s))}else s&&Ds(t,a,o),o.canActivateChecks.push(new Tl(r)),i.component?ms(e,null,a?a.children:null,r,o):ms(e,null,n,r,o);return o}function LF(e,t,n){if(typeof n=="function")return n(e,t);switch(n){case"pathParamsChange":return!Ur(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Ur(e.url,t.url)||!Gt(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!nh(e,t)||!Gt(e.queryParams,t.queryParams);case"paramsChange":default:return!nh(e,t)}}function Ds(e,t,n){let r=Lo(e),o=e.value;Object.entries(r).forEach(([i,s])=>{o.component?t?Ds(s,t.children.getContext(i),n):Ds(s,null,n):Ds(s,t,n)}),o.component?t&&t.outlet&&t.outlet.isActivated?n.canDeactivateChecks.push(new Uo(t.outlet.component,o)):n.canDeactivateChecks.push(new Uo(null,o)):n.canDeactivateChecks.push(new Uo(null,o))}function Ns(e){return typeof e=="function"}function VF(e){return typeof e=="boolean"}function jF(e){return e&&Ns(e.canLoad)}function UF(e){return e&&Ns(e.canActivate)}function BF(e){return e&&Ns(e.canActivateChild)}function $F(e){return e&&Ns(e.canDeactivate)}function HF(e){return e&&Ns(e.canMatch)}function fb(e){return e instanceof Qt||e?.name==="EmptyError"}var gl=Symbol("INITIAL_VALUE");function Ho(){return De(e=>Aa(e.map(t=>t.pipe(Ie(1),Fa(gl)))).pipe(A(t=>{for(let n of t)if(n!==!0){if(n===gl)return gl;if(n===!1||zF(n))return n}return!0}),Pe(t=>t!==gl),Ie(1)))}function zF(e){return Br(e)||e instanceof xs}function GF(e,t){return le(n=>{let{targetSnapshot:r,currentSnapshot:o,guards:{canActivateChecks:i,canDeactivateChecks:s}}=n;return s.length===0&&i.length===0?_(F(y({},n),{guardsResult:!0})):WF(s,r,o,e).pipe(le(a=>a&&VF(a)?qF(r,i,e,t):_(a)),A(a=>F(y({},n),{guardsResult:a})))})}function WF(e,t,n,r){return X(e).pipe(le(o=>JF(o.component,o.route,n,t,r)),en(o=>o!==!0,!0))}function qF(e,t,n,r){return X(t).pipe(kt(o=>tt(KF(o.route.parent,r),ZF(o.route,r),QF(e,o.path,n),YF(e,o.route,n))),en(o=>o!==!0,!0))}function ZF(e,t){return e!==null&&t&&t(new Qp(e)),_(!0)}function KF(e,t){return e!==null&&t&&t(new Kp(e)),_(!0)}function YF(e,t,n){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return _(!0);let o=r.map(i=>Jt(()=>{let s=As(t)??n,a=zo(i,s),u=UF(a)?a.canActivate(t,e):rt(s,()=>a(t,e));return Qn(u).pipe(en())}));return _(o).pipe(Ho())}function QF(e,t,n){let r=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(s=>PF(s)).filter(s=>s!==null).map(s=>Jt(()=>{let a=s.guards.map(u=>{let l=As(s.node)??n,c=zo(u,l),d=BF(c)?c.canActivateChild(r,e):rt(l,()=>c(r,e));return Qn(d).pipe(en())});return _(a).pipe(Ho())}));return _(i).pipe(Ho())}function JF(e,t,n,r,o){let i=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!i||i.length===0)return _(!0);let s=i.map(a=>{let u=As(t)??o,l=zo(a,u),c=$F(l)?l.canDeactivate(e,t,n,r):rt(u,()=>l(e,t,n,r));return Qn(c).pipe(en())});return _(s).pipe(Ho())}function XF(e,t,n,r){let o=t.canLoad;if(o===void 0||o.length===0)return _(!0);let i=o.map(s=>{let a=zo(s,e),u=jF(a)?a.canLoad(t,n):rt(e,()=>a(t,n));return Qn(u)});return _(i).pipe(Ho(),pb(r))}function pb(e){return Oc(we(t=>{if(typeof t!="boolean")throw xl(e,t)}),A(t=>t===!0))}function eP(e,t,n,r){let o=t.canMatch;if(!o||o.length===0)return _(!0);let i=o.map(s=>{let a=zo(s,e),u=HF(a)?a.canMatch(t,n):rt(e,()=>a(t,n));return Qn(u)});return _(i).pipe(Ho(),pb(r))}var Ts=class{segmentGroup;constructor(t){this.segmentGroup=t||null}},Ss=class extends Error{urlTree;constructor(t){super(),this.urlTree=t}};function ko(e){return An(new Ts(e))}function tP(e){return An(new w(4e3,!1))}function nP(e){return An(cb(!1,lt.GuardRejected))}var ih=class{urlSerializer;urlTree;constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){let r=[],o=n.root;for(;;){if(r=r.concat(o.segments),o.numberOfChildren===0)return _(r);if(o.numberOfChildren>1||!o.children[L])return tP(`${t.redirectTo}`);o=o.children[L]}}applyRedirectCommands(t,n,r,o,i){if(typeof n!="string"){let a=n,{queryParams:u,fragment:l,routeConfig:c,url:d,outlet:f,params:p,data:h,title:g}=o,m=rt(i,()=>a({params:p,data:h,queryParams:u,fragment:l,routeConfig:c,url:d,outlet:f,title:g}));if(m instanceof yn)throw new Ss(m);n=m}let s=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,r);if(n[0]==="/")throw new Ss(s);return s}applyRedirectCreateUrlTree(t,n,r,o){let i=this.createSegmentGroup(t,n.root,r,o);return new yn(i,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([o,i])=>{if(typeof i=="string"&&i[0]===":"){let a=i.substring(1);r[o]=n[a]}else r[o]=i}),r}createSegmentGroup(t,n,r,o){let i=this.createSegments(t,n.segments,r,o),s={};return Object.entries(n.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(t,u,r,o)}),new G(i,s)}createSegments(t,n,r,o){return n.map(i=>i.path[0]===":"?this.findPosParam(t,i,o):this.findOrReturn(i,r))}findPosParam(t,n,r){let o=r[n.path.substring(1)];if(!o)throw new w(4001,!1);return o}findOrReturn(t,n){let r=0;for(let o of n){if(o.path===t.path)return n.splice(r),o;r++}return t}},sh={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function rP(e,t,n,r,o){let i=hb(e,t,n);return i.matched?(r=IF(t,r),eP(r,t,n,o).pipe(A(s=>s===!0?i:y({},sh)))):_(i)}function hb(e,t,n){if(t.path==="**")return oP(n);if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||n.length>0)?y({},sh):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let o=(t.matcher||JO)(n,e,t);if(!o)return y({},sh);let i={};Object.entries(o.posParams??{}).forEach(([a,u])=>{i[a]=u.path});let s=o.consumed.length>0?y(y({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:n.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function oP(e){return{matched:!0,parameters:e.length>0?qw(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function $w(e,t,n,r){return n.length>0&&aP(e,n,r)?{segmentGroup:new G(t,sP(r,new G(n,e.children))),slicedSegments:[]}:n.length===0&&uP(e,n,r)?{segmentGroup:new G(e.segments,iP(e,n,r,e.children)),slicedSegments:n}:{segmentGroup:new G(e.segments,e.children),slicedSegments:n}}function iP(e,t,n,r){let o={};for(let i of n)if(Ml(e,t,i)&&!r[Rt(i)]){let s=new G([],{});o[Rt(i)]=s}return y(y({},r),o)}function sP(e,t){let n={};n[L]=t;for(let r of e)if(r.path===""&&Rt(r)!==L){let o=new G([],{});n[Rt(r)]=o}return n}function aP(e,t,n){return n.some(r=>Ml(e,t,r)&&Rt(r)!==L)}function uP(e,t,n){return n.some(r=>Ml(e,t,r))}function Ml(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch==="full"?!1:n.path===""}function lP(e,t,n){return t.length===0&&!e.children[n]}var ah=class{};function cP(e,t,n,r,o,i,s="emptyOnly"){return new uh(e,t,n,r,o,s,i).recognize()}var dP=31,uh=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,n,r,o,i,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new ih(this.urlSerializer,this.urlTree)}noMatchError(t){return new w(4002,`'${t.segmentGroup}'`)}recognize(){let t=$w(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(A(({children:n,rootSnapshot:r})=>{let o=new ut(r,n),i=new _l("",o),s=vF(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}}))}match(t){let n=new jo([],Object.freeze({}),Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),L,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,L,n).pipe(A(r=>({children:r,rootSnapshot:n})),Rn(r=>{if(r instanceof Ss)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Ts?this.noMatchError(r):r}))}processSegmentGroup(t,n,r,o,i){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,n,r,i):this.processSegment(t,n,r,r.segments,o,!0,i).pipe(A(s=>s instanceof ut?[s]:[]))}processChildren(t,n,r,o){let i=[];for(let s of Object.keys(r.children))s==="primary"?i.unshift(s):i.push(s);return X(i).pipe(kt(s=>{let a=r.children[s],u=_F(n,s);return this.processSegmentGroup(t,u,a,s,o)}),Oa((s,a)=>(s.push(...a),s)),On(null),$c(),le(s=>{if(s===null)return ko(r);let a=gb(s);return fP(a),_(a)}))}processSegment(t,n,r,o,i,s,a){return X(n).pipe(kt(u=>this.processSegmentAgainstRoute(u._injector??t,n,u,r,o,i,s,a).pipe(Rn(l=>{if(l instanceof Ts)return _(null);throw l}))),en(u=>!!u),Rn(u=>{if(fb(u))return lP(r,o,i)?_(new ah):ko(r);throw u}))}processSegmentAgainstRoute(t,n,r,o,i,s,a,u){return Rt(r)!==s&&(s===L||!Ml(o,i,r))?ko(o):r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,o,r,i,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,o,n,r,i,s,u):ko(o)}expandSegmentAgainstRouteUsingRedirect(t,n,r,o,i,s,a){let{matched:u,parameters:l,consumedSegments:c,positionalParamSegments:d,remainingSegments:f}=hb(n,o,i);if(!u)return ko(n);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>dP&&(this.allowRedirects=!1));let p=new jo(i,l,Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Hw(o),Rt(o),o.component??o._loadedComponent??null,o,zw(o)),h=Il(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(h.params),p.data=Object.freeze(h.data);let g=this.applyRedirects.applyRedirectCommands(c,o.redirectTo,d,p,t);return this.applyRedirects.lineralizeSegments(o,g).pipe(le(m=>this.processSegment(t,r,n,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(t,n,r,o,i,s){let a=rP(n,r,o,t,this.urlSerializer);return r.path==="**"&&(n.children={}),a.pipe(De(u=>u.matched?(t=r._injector??t,this.getChildConfig(t,r,o).pipe(De(({routes:l})=>{let c=r._loadedInjector??t,{parameters:d,consumedSegments:f,remainingSegments:p}=u,h=new jo(f,d,Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Hw(r),Rt(r),r.component??r._loadedComponent??null,r,zw(r)),g=Il(h,s,this.paramsInheritanceStrategy);h.params=Object.freeze(g.params),h.data=Object.freeze(g.data);let{segmentGroup:m,slicedSegments:D}=$w(n,f,p,l);if(D.length===0&&m.hasChildren())return this.processChildren(c,l,m,h).pipe(A(B=>new ut(h,B)));if(l.length===0&&D.length===0)return _(new ut(h,[]));let N=Rt(r)===i;return this.processSegment(c,l,m,D,N?L:i,!0,h).pipe(A(B=>new ut(h,B instanceof ut?[B]:[])))}))):ko(n)))}getChildConfig(t,n,r){return n.children?_({routes:n.children,injector:t}):n.loadChildren?n._loadedRoutes!==void 0?_({routes:n._loadedRoutes,injector:n._loadedInjector}):XF(t,n,r,this.urlSerializer).pipe(le(o=>o?this.configLoader.loadChildren(t,n).pipe(we(i=>{n._loadedRoutes=i.routes,n._loadedInjector=i.injector})):nP(n))):_({routes:[],injector:t})}};function fP(e){e.sort((t,n)=>t.value.outlet===L?-1:n.value.outlet===L?1:t.value.outlet.localeCompare(n.value.outlet))}function pP(e){let t=e.value.routeConfig;return t&&t.path===""}function gb(e){let t=[],n=new Set;for(let r of e){if(!pP(r)){t.push(r);continue}let o=t.find(i=>r.value.routeConfig===i.value.routeConfig);o!==void 0?(o.children.push(...r.children),n.add(o)):t.push(r)}for(let r of n){let o=gb(r.children);t.push(new ut(r.value,o))}return t.filter(r=>!n.has(r))}function Hw(e){return e.data||{}}function zw(e){return e.resolve||{}}function hP(e,t,n,r,o,i){return le(s=>cP(e,t,n,r,s.extractedUrl,o,i).pipe(A(({state:a,tree:u})=>F(y({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function gP(e,t){return le(n=>{let{targetSnapshot:r,guards:{canActivateChecks:o}}=n;if(!o.length)return _(n);let i=new Set(o.map(u=>u.route)),s=new Set;for(let u of i)if(!s.has(u))for(let l of mb(u))s.add(l);let a=0;return X(s).pipe(kt(u=>i.has(u)?mP(u,r,e,t):(u.data=Il(u,u.parent,e).resolve,_(void 0))),we(()=>a++),lo(1),le(u=>a===s.size?_(n):Ee))})}function mb(e){let t=e.children.map(n=>mb(n)).flat();return[e,...t]}function mP(e,t,n,r){let o=e.routeConfig,i=e._resolve;return o?.title!==void 0&&!ub(o)&&(i[Ms]=o.title),vP(i,e,t,r).pipe(A(s=>(e._resolvedData=s,e.data=Il(e,e.parent,n).resolve,null)))}function vP(e,t,n,r){let o=Vp(e);if(o.length===0)return _({});let i={};return X(o).pipe(le(s=>yP(e[s],t,n,r).pipe(en(),we(a=>{if(a instanceof xs)throw xl(new ws,a);i[s]=a}))),lo(1),A(()=>i),Rn(s=>fb(s)?Ee:An(s)))}function yP(e,t,n,r){let o=As(t)??r,i=zo(e,o),s=i.resolve?i.resolve(t,n):rt(o,()=>i(t,n));return Qn(s)}function kp(e){return De(t=>{let n=e(t);return n?X(n).pipe(A(()=>t)):_(t)})}var vb=(()=>{class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(i=>i.outlet===L);return r}getResolvedTitleForRoute(n){return n.data[Ms]}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(DP),providedIn:"root"})}return e})(),DP=(()=>{class e extends vb{title;constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||e)(I(Lw))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ph=new E("",{providedIn:"root",factory:()=>({})}),wP=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=hD({type:e,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,o){r&1&&np(0,"router-outlet")},dependencies:[SF],encapsulation:2})}return e})();function hh(e){let t=e.children&&e.children.map(hh),n=t?F(y({},e),{children:t}):y({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==L&&(n.component=wP),n}var gh=new E(""),bP=(()=>{class e{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=v(ip);loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return _(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=Qn(n.loadComponent()).pipe(A(yb),we(i=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=i}),Fn(()=>{this.componentLoaders.delete(n)})),o=new oo(r,()=>new J).pipe(ro());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return _({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=CP(r,this.compiler,n,this.onLoadEndListener).pipe(Fn(()=>{this.childrenLoaders.delete(r)})),s=new oo(i,()=>new J).pipe(ro());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function CP(e,t,n,r){return Qn(e.loadChildren()).pipe(A(yb),le(o=>o instanceof Wi||Array.isArray(o)?_(o):X(t.compileModuleAsync(o))),A(o=>{r&&r(e);let i,s,a=!1;return Array.isArray(o)?(s=o,a=!0):(i=o.create(n).injector,s=i.get(gh,[],{optional:!0,self:!0}).flat()),{routes:s.map(hh),injector:i}}))}function EP(e){return e&&typeof e=="object"&&"default"in e}function yb(e){return EP(e)?e.default:e}var mh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(IP),providedIn:"root"})}return e})(),IP=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),_P=new E("");var xP=new E(""),TP=(()=>{class e{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new J;transitionAbortSubject=new J;configLoader=v(bP);environmentInjector=v(Ye);destroyRef=v(zn);urlSerializer=v(ch);rootContexts=v(Sl);location=v(us);inputBindingEnabled=v(fh,{optional:!0})!==null;titleStrategy=v(vb);options=v(ph,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=v(mh);createViewTransition=v(_P,{optional:!0});navigationErrorHandler=v(xP,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>_(void 0);rootComponentType=null;destroyed=!1;constructor(){let n=o=>this.events.next(new qp(o)),r=o=>this.events.next(new Zp(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(F(y(y({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Me({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:ys,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Pe(i=>i.id!==0),A(i=>F(y({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),De(i=>{let s=!1,a=!1;return _(i).pipe(De(u=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",lt.SupersededByNewNavigation),Ee;this.currentTransition=i,this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,targetBrowserUrl:typeof u.extras.browserUrl=="string"?this.urlSerializer.parse(u.extras.browserUrl):u.extras.browserUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?F(y({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&c!=="reload"){let d="";return this.events.next(new $r(u.id,this.urlSerializer.serialize(u.rawUrl),d,$p.IgnoredSameUrlNavigation)),u.resolve(!1),Ee}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return _(u).pipe(De(d=>{let f=this.transitions?.getValue();return this.events.next(new Cs(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions?.getValue()?Ee:Promise.resolve(d)}),hP(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),we(d=>{i.targetSnapshot=d.targetSnapshot,i.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=F(y({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let f=new bl(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:d,extractedUrl:f,source:p,restoredState:h,extras:g}=u,m=new Cs(d,this.urlSerializer.serialize(f),p,h);this.events.next(m);let D=sb(this.rootComponentType).snapshot;return this.currentTransition=i=F(y({},u),{targetSnapshot:D,urlAfterRedirects:f,extras:F(y({},g),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,_(i)}else{let d="";return this.events.next(new $r(u.id,this.urlSerializer.serialize(u.extractedUrl),d,$p.IgnoredByUrlHandlingStrategy)),u.resolve(!1),Ee}}),we(u=>{let l=new Hp(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(l)}),A(u=>(this.currentTransition=i=F(y({},u),{guards:FF(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),i)),GF(this.environmentInjector,u=>this.events.next(u)),we(u=>{if(i.guardsResult=u.guardsResult,u.guardsResult&&typeof u.guardsResult!="boolean")throw xl(this.urlSerializer,u.guardsResult);let l=new zp(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(l)}),Pe(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",lt.GuardRejected),!1)),kp(u=>{if(u.guards.canActivateChecks.length)return _(u).pipe(we(l=>{let c=new Gp(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),De(l=>{let c=!1;return _(l).pipe(gP(this.paramsInheritanceStrategy,this.environmentInjector),we({next:()=>c=!0,complete:()=>{c||this.cancelNavigationTransition(l,"",lt.NoDataFromResolver)}}))}),we(l=>{let c=new Wp(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}))}),kp(u=>{let l=c=>{let d=[];c.routeConfig?.loadComponent&&!c.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(c.routeConfig).pipe(we(f=>{c.component=f}),A(()=>{})));for(let f of c.children)d.push(...l(f));return d};return Aa(l(u.targetSnapshot.root)).pipe(On(null),Ie(1))}),kp(()=>this.afterPreactivation()),De(()=>{let{currentSnapshot:u,targetSnapshot:l}=i,c=this.createViewTransition?.(this.environmentInjector,u.root,l.root);return c?X(c).pipe(A(()=>i)):_(i)}),A(u=>{let l=MF(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=i=F(y({},u),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,i}),we(()=>{this.events.next(new Is)}),OF(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),Ie(1),we({next:u=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Dn(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{s=!0}}),Pa(this.transitionAbortSubject.pipe(we(u=>{throw u}))),Fn(()=>{!s&&!a&&this.cancelNavigationTransition(i,"",lt.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation=null,this.currentTransition=null)}),Rn(u=>{if(this.destroyed)return i.resolve(!1),Ee;if(a=!0,db(u))this.events.next(new vn(i.id,this.urlSerializer.serialize(i.extractedUrl),u.message,u.cancellationCode)),RF(u)?this.events.next(new $o(u.url,u.navigationBehaviorOptions)):i.resolve(!1);else{let l=new Es(i.id,this.urlSerializer.serialize(i.extractedUrl),u,i.targetSnapshot??void 0);try{let c=rt(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof xs){let{message:d,cancellationCode:f}=xl(this.urlSerializer,c);this.events.next(new vn(i.id,this.urlSerializer.serialize(i.extractedUrl),d,f)),this.events.next(new $o(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(l),u}catch(c){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(c)}}return Ee}))}))}cancelNavigationTransition(n,r,o){let i=new vn(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(i),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function SP(e){return e!==ys}var MP=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(AP),providedIn:"root"})}return e})(),lh=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}},AP=(()=>{class e extends lh{static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Db=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(NP),providedIn:"root"})}return e})(),NP=(()=>{class e extends Db{location=v(us);urlSerializer=v(ch);options=v(ph,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=v(mh);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new yn;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=sb(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof Cs)this.stateMemento=this.createStateMemento();else if(n instanceof $r)this.rawUrlTree=r.initialUrl;else if(n instanceof bl){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else n instanceof Is?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof vn&&(n.code===lt.GuardRejected||n.code===lt.NoDataFromResolver)?this.restoreHistory(r):n instanceof Es?this.restoreHistory(r,!0):n instanceof Dn&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=n instanceof yn?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let i=this.browserPageId,s=y(y({},r.extras.state),this.generateNgRouterState(r.id,i));this.location.replaceState(o,"",s)}else{let i=y(y({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",i)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,i=this.currentPageId-o;i!==0?this.location.historyGo(i):this.currentUrlTree===n.finalUrl&&i===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&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,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function RP(e,t){e.events.pipe(Pe(n=>n instanceof Dn||n instanceof vn||n instanceof Es||n instanceof $r),A(n=>n instanceof Dn||n instanceof $r?0:(n instanceof vn?n.code===lt.Redirect||n.code===lt.SupersededByNewNavigation:!1)?2:1),Pe(n=>n!==2),Ie(1)).subscribe(()=>{t()})}var OP={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},FP={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Al=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=v(Xf);stateManager=v(Db);options=v(ph,{optional:!0})||{};pendingTasks=v(dn);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=v(TP);urlSerializer=v(ch);location=v(us);urlHandlingStrategy=v(mh);_events=new J;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=v(MP);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=v(gh,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!v(fh,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}eventsSubscription=new se;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,i=this.navigationTransitions.currentNavigation;if(o!==null&&i!==null){if(this.stateManager.handleRouterEvent(r,i),r instanceof vn&&r.code!==lt.Redirect&&r.code!==lt.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Dn)this.navigated=!0;else if(r instanceof $o){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),u=y({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||SP(o.source)},s);this.scheduleNavigation(a,ys,null,u,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}kP(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});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),ys,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let i={replaceUrl:!0},s=o?.navigationId?o:null;if(o){let u=y({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(i.state=u)}let a=this.parseUrl(n);this.scheduleNavigation(a,r,s,i)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(hh),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:i,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,l=u?this.currentUrlTree.fragment:s,c=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":c=y(y({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}c!==null&&(c=this.removeEmptyProps(c));let d;try{let f=o?o.snapshot:this.routerState.snapshot.root;d=nb(f)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return rb(d,n,c,l??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=Br(n)?n:this.parseUrl(n),i=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(i,ys,null,r)}navigate(n,r={skipLocationChange:!1}){return PP(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=y({},OP):r===!1?o=y({},FP):o=r,Br(n))return Vw(this.currentUrlTree,n,o);let i=this.parseUrl(n);return Vw(this.currentUrlTree,i,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,i])=>(i!=null&&(r[o]=i),r),{})}scheduleNavigation(n,r,o,i,s){if(this.disposed)return Promise.resolve(!1);let a,u,l;s?(a=s.resolve,u=s.reject,l=s.promise):l=new Promise((d,f)=>{a=d,u=f});let c=this.pendingTasks.add();return RP(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(c))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:i,resolve:a,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(d=>Promise.reject(d))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function PP(e){for(let t=0;t{class e{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new J;constructor(n,r,o,i,s,a){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=i,this.el=s,this.locationStrategy=a;let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area",this.isAnchorElement?this.subscription=n.events.subscribe(l=>{l instanceof Dn&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(n){n==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(Br(n)?this.routerLinkInput=n:this.routerLinkInput=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0"))}onClick(n,r,o,i,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(n!==0||r||o||i||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u),!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 r=this.href===null?null:Ay(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(n,r){let o=this.renderer,i=this.el.nativeElement;r!==null?o.setAttribute(i,n,r):o.removeAttribute(i,n)}get urlTree(){return this.routerLinkInput===null?null:Br(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||e)(b(Al),b(Hr),Tf("tabindex"),b(ot),b(xe),b(Kn))};static \u0275dir=H({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,o){r&1&&mt("click",function(s){return o.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&kr("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Zn],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Zn],replaceUrl:[2,"replaceUrl","replaceUrl",Zn],routerLink:"routerLink"},features:[Jf,pt]})}return e})(),gZ=(()=>{class e{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ee;constructor(n,r,o,i,s){this.router=n,this.element=r,this.renderer=o,this.cdr=i,this.link=s,this.routerEventsSubscription=n.events.subscribe(a=>{a instanceof Dn&&this.update()})}ngAfterContentInit(){_(this.links.changes,_(null)).pipe(Nn()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=X(n).pipe(Nn()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){let r=Array.isArray(n)?n:n.split(" ");this.classes=r.filter(o=>!!o)}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(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),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 r=LP(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>{let i=o.urlTree;return i?n.isActive(i,r):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}static \u0275fac=function(r){return new(r||e)(b(Al),b(xe),b(ot),b(vt),b(Gw,8))};static \u0275dir=H({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(r,o,i){if(r&1&&UD(i,Gw,5),r&2){let s;BD(s=$D())&&(o.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[pt]})}return e})();function LP(e){return!!e.paths}var VP=new E("");function mZ(e,...t){return Ar([{provide:gh,multi:!0,useValue:e},[],{provide:Hr,useFactory:jP,deps:[Al]},{provide:zu,multi:!0,useFactory:BP},t.map(n=>n.\u0275providers)])}function jP(e){return e.routerState.root}function UP(e,t){return{\u0275kind:e,\u0275providers:t}}function BP(){let e=v(Ve);return t=>{let n=e.get(un);if(t!==n.components[0])return;let r=e.get(Al),o=e.get($P);e.get(HP)===1&&r.initialNavigation(),e.get(zP,null,U.Optional)?.setUpPreloading(),e.get(VP,null,U.Optional)?.init(),r.resetRootComponentType(n.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var $P=new E("",{factory:()=>new J}),HP=new E("",{providedIn:"root",factory:()=>1});var zP=new E("");function vZ(){return UP(6,[{provide:Kn,useClass:aw}])}function wb(e){let t=e.split(/\D/).map(n=>Number(n));return new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5])}function bb(e){let t=e.split(/\D/).map(n=>Number(n));return new Date(t[0],t[1]-1,t[2])}function Cb(e){return vh(e)+`T${Rs(e.getHours())}:${Rs(e.getMinutes())}:${Rs(e.getSeconds())}`}function vh(e){return`${e.getFullYear()}-${Rs(e.getMonth()+1)}-${Rs(e.getDate())}`}function Rs(e){return("0"+e).slice(-2)}var GP=function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r=e}:e;return function(){var r=Array.from(arguments);return n(arguments)?t.apply(this,r):function(o){return t.apply(void 0,GP([o],r,!1))}}};var Ib=function(e){return e._tag==="Left"};var _b=function(e){return{_tag:"Left",left:e}},xb=function(e){return{_tag:"Right",right:e}};function yh(e){return function(t,n){return e.map(t,function(){return n})}}function Tb(e){var t=yh(e);return function(n){return t(n,void 0)}}function Sb(e){return function(t,n){return e.chain(t,function(r){return e.map(n(r),function(){return r})})}}var Rl=_b,Os=xb,Mb=Nl(2,function(e,t){return pe(e)?e:t(e.right)}),Ab=function(e,t){return Jn(e,KP(t))},ZP=function(e,t){return Jn(e,QP(t))};var Dh="Either";var KP=function(e){return function(t){return pe(t)?t:Os(e(t.right))}},Nb={URI:Dh,map:Ab},jZ=Nl(2,yh(Nb)),UZ=Tb(Nb);var YP=function(e){return function(t){return pe(t)?t:pe(e)?e:Os(t.right(e.right))}},QP=YP;var JP={URI:Dh,map:Ab,ap:ZP,chain:Mb};var XP={URI:Dh,fromEither:Eb};var pe=Ib;var e1=function(e,t){return function(n){return pe(n)?e(n.left):t(n.right)}};var t1=e1,Ol=t1;var BZ=Nl(2,Sb(JP));var $Z={fromEither:XP.fromEither};var n1=function(e){return function(t){return pe(t)?e(t.left):t}},HZ=n1;var wh=Mb;var q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Go=function(){return Go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n")}function Xn(e,t,n,r){for(var o=e.length,i=Array(o+1),s=0;s")}function o1(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var o=e.length,i={},s=0;s0?Wr(s):W(l?i:r)}return Pb(t)&&Array.isArray(r)?W(r):ce(r,o)},e.encode===z&&t.encode===z?function(r){return Rb(r,e)}:function(r){for(var o={},i=Object.keys(Rb(r,e)),s=i.length,a=0;a")}function u1(e){return e.length>0}var ct={};function Ub(e,t){for(var n=[],r=0,o=e;r")),new F1(t,function(n){return kb.is(n)&&n.every(e.is)},function(n,r){var o=kb.validate(n,r);if(pe(o))return o;for(var i=o.right,s=i.length,a=i,u=[],l=0;l0?Wr(u):W(a)},e.encode===z?z:function(n){return n.map(e.encode)},e)}var P1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.props=s,a._tag="InterfaceType",a}return t}($);function dt(e,t){t===void 0&&(t=Lb(e));var n=Object.keys(e),r=n.map(function(i){return e[i]}),o=n.length;return new P1(t,function(i){if(Ot.is(i)){for(var s=0;s0?Wr(c):W(l)},Fl(r)?z:function(i){for(var s=Go({},i),a=0;a0?Wr(c):W(l)},Fl(r)?z:function(i){for(var s=Go({},i),a=0;a0){var r=n[0],o=n[1],i=o.length,s=function(a){for(var u=0;u0?Wr(s):W(Ob(r,i))},e.length===0?z:function(r){return Ob(r,e.map(function(o){return o.encode(r)}))},e)}var eK=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.types=s,a._tag="TupleType",a}return t}($);var V1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ReadonlyType",a}return t}($);function tK(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new V1(t,e.is,e.validate,e.encode,e)}var j1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ReadonlyArrayType",a}return t}($);function Zb(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=Fe(e);return new j1(t,n.is,n.validate,n.encode,e)}var U1=function(e,t){return $1(dt(e),t)},B1=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ExactType",a}return t}($);function $1(e,t){t===void 0&&(t=a1(e));var n=Eh(e);return new B1(t,e.is,function(r,o){var i=Ot.validate(r,o);if(pe(i))return i;var s=e.validate(r,o);return pe(s)?s:Os(Fb(s.right,n))},function(r){return e.encode(Fb(r,n))},e)}var H1=function(e){q(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,o){return n.is(r)?W(r):ce(r,o)},z)||this;return n._tag="FunctionType",n}return t}($);var nK=new H1,z1=function(e){q(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,o){return ce(r,o)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}($);var rK=new z1,G1=function(e){q(t,e);function t(){var n=e.call(this,"any",function(r){return!0},W,z)||this;return n._tag="AnyType",n}return t}($);var oK=new G1;function Kb(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(Ih(t),")")),new R1(n,function(r){return e.is(r)&&t(r)},function(r,o){var i=e.validate(r,o);if(pe(i))return i;var s=i.right;return t(s)?W(s):ce(s,o)},e.encode,e,t)}var iK=Kb(he,Number.isInteger,"Integer"),W1=function(e){q(t,e);function t(n,r,o,i,s,a){var u=e.call(this,n,r,o,i,s)||this;return u.tag=a,u}return t}(qb);var sK=function(e){return[{key:"",type:e}]};var q1=function(e){q(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,o){return n.is(r)?W(r):ce(r,o)},z)||this;return n._tag="ObjectType",n}return t}($);var aK=new q1;var uK=function(e){q(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.props=s,a._tag="StrictType",a}return t}($);var Z1=_h("JsonArray",function(){return Zb(xh)}),K1=_h("JsonRecord",function(){return qo(Y,xh)}),xh=ks([zb,he,Y,Ps,Z1,K1],"Json"),Yb=new $("JsonFromString",xh.is,function(e,t){try{return W(JSON.parse(e))}catch{return ce(e,t)}},function(e){return JSON.stringify(e)});function Vs(e){return ks([Ps,e])}function hK(e){return ks([Ps,Fs,e])}var gK=dt({Id:he});var mK=dt({Id:he,HRef:Vs(Y)});var vK=dt({Id:Vs(he),HRef:Vs(Y)});var yK=Y.pipe(Yb,"JsonFromUnknown"),DK=new $("LocalDateTimeFromString",e=>e instanceof Date,(e,t)=>Jn(Y.validate(e,t),wh(n=>{let r=wb(n);return isNaN(r.getTime())?ce(e,t):W(r)})),e=>Cb(e)),wK=new $("LocalDateTimeFromString",e=>e instanceof Date,(e,t)=>Jn(Y.validate(e,t),wh(n=>{let r=bb(n);return isNaN(r.getTime())?ce(e,t):W(r)})),e=>vh(e));function CK(e,t){return t.reduce((n,r)=>F(y({},n),{[r]:e[r]}),{})}function Qb(e,t){let n=r=>Object.values(t).includes(r);return new $(e,n,(r,o)=>n(r)?W(r):ce(r,o),z)}var Jb=function(e){return e.Crystal="crystal",e.Excel="excel",e}(Jb||{}),wn=dt({type:Qb("ReportType",Jb),id:he});var Y1=dt({de:dt({label:Y,description:Y}),fr:dt({label:Y,description:Y})}),Q1=qo(Y,Y1),J1=dt({roles:Fe(Y),types:Fe(Y)}),X1=dt({substitutionsAdminLink:Y}),SK=dt({apiUrl:Y,scriptsAndAssetsPath:Y,paginationLimit:he,absencePresenceTypeId:he,latePresenceTypeId:he,dispensationPresenceTypeId:he,halfDayPresenceTypeId:he,unconfirmedAbsenceStateId:he,unexcusedAbsenceStateId:he,excusedAbsenceStateId:he,checkableAbsenceStateId:he,lessonPresencesRefreshTime:he,unconfirmedAbsencesRefreshTime:Vs(he),personMasterDataReports:Fe(wn),studentConfirmationReports:Fe(wn),evaluateAbsencesReports:Fe(wn),myAbsencesReports:Fe(wn),testsByCourseReports:Fe(wn),testsBySubscriptionStudentReports:Fe(wn),testsBySubscriptionTeacherReports:Fe(wn),studyClassStudentsReports:Fe(wn),courseStudentsReports:Fe(wn),subscriptionDetailGroupId:he,headerRoleRestriction:qo(Y,Y),notificationTypes:Q1,notificationTypesAssignments:Fe(J1),eventlist:qo(Y,Y),dashboard:X1,preventStudentAbsenceAfterLessonStart:Fe(Y)});var MK=new E("Application Settings",{providedIn:"root",factory:()=>window.schulverwaltung.settings});var uC=(()=>{class e{_renderer;_elementRef;onChange=n=>{};onTouched=()=>{};constructor(n,r){this._renderer=n,this._elementRef=r}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static \u0275fac=function(r){return new(r||e)(b(ot),b(xe))};static \u0275dir=H({type:e})}return e})(),Xo=(()=>{class e extends uC{static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,features:[Ce]})}return e})(),Cn=new E(""),ek={provide:Cn,useExisting:Ne(()=>tk),multi:!0},tk=(()=>{class e extends Xo{writeValue(n){this.setProperty("checked",n)}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,o){r&1&&mt("change",function(s){return o.onChange(s.target.checked)})("blur",function(){return o.onTouched()})},standalone:!1,features:[$e([ek]),Ce]})}return e})(),nk={provide:Cn,useExisting:Ne(()=>lC),multi:!0};function rk(){let e=mn()?mn().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var ok=new E(""),lC=(()=>{class e extends uC{_compositionMode;_composing=!1;constructor(n,r,o){super(n,r),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!rk())}writeValue(n){let r=n??"";this.setProperty("value",r)}_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)}static \u0275fac=function(r){return new(r||e)(b(ot),b(xe),b(ok,8))};static \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(r,o){r&1&&mt("input",function(s){return o._handleInput(s.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(s){return o._compositionEnd(s.target.value)})},standalone:!1,features:[$e([nk]),Ce]})}return e})();function er(e){return e==null||(typeof e=="string"||Array.isArray(e))&&e.length===0}function cC(e){return e!=null&&typeof e.length=="number"}var nr=new E(""),Gs=new E(""),ik=/^(?=.{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])?)*$/,Xb=class{static min(t){return dC(t)}static max(t){return fC(t)}static required(t){return pC(t)}static requiredTrue(t){return sk(t)}static email(t){return ak(t)}static minLength(t){return uk(t)}static maxLength(t){return lk(t)}static pattern(t){return ck(t)}static nullValidator(t){return kl(t)}static compose(t){return DC(t)}static composeAsync(t){return wC(t)}};function dC(e){return t=>{if(er(t.value)||er(e))return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(er(t.value)||er(e))return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function pC(e){return er(e.value)?{required:!0}:null}function sk(e){return e.value===!0?null:{required:!0}}function ak(e){return er(e.value)||ik.test(e.value)?null:{email:!0}}function uk(e){return t=>er(t.value)||!cC(t.value)?null:t.value.lengthcC(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}function ck(e){if(!e)return kl;let t,n;return typeof e=="string"?(n="",e.charAt(0)!=="^"&&(n+="^"),n+=e,e.charAt(e.length-1)!=="$"&&(n+="$"),t=new RegExp(n)):(n=e.toString(),t=e),r=>{if(er(r.value))return null;let o=r.value;return t.test(o)?null:{pattern:{requiredPattern:n,actualValue:o}}}}function kl(e){return null}function hC(e){return e!=null}function gC(e){return qn(e)?X(e):e}function mC(e){let t={};return e.forEach(n=>{t=n!=null?y(y({},t),n):t}),Object.keys(t).length===0?null:t}function vC(e,t){return t.map(n=>n(e))}function dk(e){return!e.validate}function yC(e){return e.map(t=>dk(t)?t:n=>t.validate(n))}function DC(e){if(!e)return null;let t=e.filter(hC);return t.length==0?null:function(n){return mC(vC(n,t))}}function Rh(e){return e!=null?DC(yC(e)):null}function wC(e){if(!e)return null;let t=e.filter(hC);return t.length==0?null:function(n){let r=vC(n,t).map(gC);return Ni(r).pipe(A(mC))}}function Oh(e){return e!=null?wC(yC(e)):null}function eC(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function bC(e){return e._rawValidators}function CC(e){return e._rawAsyncValidators}function Th(e){return e?Array.isArray(e)?e:[e]:[]}function Ll(e,t){return Array.isArray(e)?e.includes(t):e===t}function tC(e,t){let n=Th(t);return Th(e).forEach(o=>{Ll(n,o)||n.push(o)}),n}function nC(e,t){return Th(t).filter(n=>!Ll(e,n))}var Vl=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Rh(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Oh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return this.control?this.control.hasError(t,n):!1}getError(t,n){return this.control?this.control.getError(t,n):null}},bn=class extends Vl{name;get formDirective(){return null}get path(){return null}},Wt=class extends Vl{_parent=null;name=null;valueAccessor=null},jl=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},fk={"[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"},WK=F(y({},fk),{"[class.ng-submitted]":"isSubmitted"}),qK=(()=>{class e extends jl{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(b(Wt,2))};static \u0275dir=H({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&Gu("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[Ce]})}return e})(),ZK=(()=>{class e extends jl{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(b(bn,10))};static \u0275dir=H({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&Gu("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[Ce]})}return e})();var js="VALID",Pl="INVALID",Zo="PENDING",Us="DISABLED",tr=class{},Ul=class extends tr{value;source;constructor(t,n){super(),this.value=t,this.source=n}},$s=class extends tr{pristine;source;constructor(t,n){super(),this.pristine=t,this.source=n}},Hs=class extends tr{touched;source;constructor(t,n){super(),this.touched=t,this.source=n}},Ko=class extends tr{status;source;constructor(t,n){super(),this.status=t,this.source=n}},Sh=class extends tr{source;constructor(t){super(),this.source=t}},Mh=class extends tr{source;constructor(t){super(),this.source=t}};function Fh(e){return(zl(e)?e.validators:e)||null}function pk(e){return Array.isArray(e)?Rh(e):e||null}function Ph(e,t){return(zl(t)?t.asyncValidators:e)||null}function hk(e){return Array.isArray(e)?Oh(e):e||null}function zl(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function EC(e,t,n){let r=e.controls;if(!(t?Object.keys(r):r).length)throw new w(1e3,"");if(!r[n])throw new w(1001,"")}function IC(e,t,n){e._forEachChild((r,o)=>{if(n[o]===void 0)throw new w(1002,"")})}var Qo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,n){this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return yt(this.statusReactive)}set status(t){yt(()=>this.statusReactive.set(t))}_status=Oo(()=>this.statusReactive());statusReactive=Ao(void 0);get valid(){return this.status===js}get invalid(){return this.status===Pl}get pending(){return this.status==Zo}get disabled(){return this.status===Us}get enabled(){return this.status!==Us}errors;get pristine(){return yt(this.pristineReactive)}set pristine(t){yt(()=>this.pristineReactive.set(t))}_pristine=Oo(()=>this.pristineReactive());pristineReactive=Ao(!0);get dirty(){return!this.pristine}get touched(){return yt(this.touchedReactive)}set touched(t){yt(()=>this.touchedReactive.set(t))}_touched=Oo(()=>this.touchedReactive());touchedReactive=Ao(!1);get untouched(){return!this.touched}_events=new J;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(tC(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(tC(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(nC(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(nC(t,this._rawAsyncValidators))}hasValidator(t){return Ll(this._rawValidators,t)}hasAsyncValidator(t){return Ll(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let n=this.touched===!1;this.touched=!0;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(F(y({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new Hs(!0,r))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(t))}markAsUntouched(t={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=t.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:r})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,r),n&&t.emitEvent!==!1&&this._events.next(new Hs(!1,r))}markAsDirty(t={}){let n=this.pristine===!0;this.pristine=!1;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(F(y({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new $s(!1,r))}markAsPristine(t={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=t.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,r),n&&t.emitEvent!==!1&&this._events.next(new $s(!0,r))}markAsPending(t={}){this.status=Zo;let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ko(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(F(y({},t),{sourceControl:n}))}disable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Us,this.errors=null,this._forEachChild(o=>{o.disable(F(y({},t),{onlySelf:!0}))}),this._updateValue();let r=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ul(this.value,r)),this._events.next(new Ko(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(F(y({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=js,this._forEachChild(r=>{r.enable(F(y({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(F(y({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t,n){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===js||this.status===Zo)&&this._runAsyncValidator(r,t.emitEvent)}let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ul(this.value,n)),this._events.next(new Ko(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(F(y({},t),{sourceControl:n}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Us:js}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,n){if(this.asyncValidator){this.status=Zo,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1};let r=gC(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:n,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(t){let n=t;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((r,o)=>r&&r._find(o),this)}getError(t,n){let r=n?this.get(n):this;return r&&r.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,n,r){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||r)&&this._events.next(new Ko(this.status,n)),this._parent&&this._parent._updateControlsErrors(t,n,r)}_initObservables(){this.valueChanges=new ee,this.statusChanges=new ee}_calculateStatus(){return this._allControlsDisabled()?Us:this.errors?Pl:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Zo)?Zo:this._anyControlsHaveStatus(Pl)?Pl:js}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,n){let r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),o&&this._events.next(new $s(this.pristine,n))}_updateTouched(t={},n){this.touched=this._anyControlsTouched(),this._events.next(new Hs(this.touched,n)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){zl(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let n=this._parent&&this._parent.dirty;return!t&&!!n&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=pk(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=hk(this._rawAsyncValidators)}},Jo=class extends Qo{constructor(t,n,r){super(Fh(n),Ph(r,n)),this.controls=t,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,n){return this.controls[t]?this.controls[t]:(this.controls[t]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(t,n,r={}){this.registerControl(t,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(t,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(t,n,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],n&&this.registerControl(t,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,n={}){IC(this,!0,t),Object.keys(t).forEach(r=>{EC(this,!0,r),this.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(t,n={}){t!=null&&(Object.keys(t).forEach(r=>{let o=this.controls[r];o&&o.patchValue(t[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(t={},n={}){this._forEachChild((r,o)=>{r.reset(t?t[o]:null,{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(t,n,r)=>(t[r]=n.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(n,r)=>r._syncPendingControls()?!0:n);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(n=>{let r=this.controls[n];r&&t(r,n)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[n,r]of Object.entries(this.controls))if(this.contains(n)&&t(r))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(n,r,o)=>((r.enabled||this.disabled)&&(n[o]=r.value),n))}_reduceChildren(t,n){let r=t;return this._forEachChild((o,i)=>{r=n(r,o,i)}),r}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Ah=class extends Jo{};var qr=new E("",{providedIn:"root",factory:()=>Ws}),Ws="always";function _C(e,t){return[...t.path,e]}function zs(e,t,n=Ws){kh(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||n==="always")&&t.valueAccessor.setDisabledState?.(e.disabled),mk(e,t),yk(e,t),vk(e,t),gk(e,t)}function Bl(e,t,n=!0){let r=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(r),t.valueAccessor.registerOnTouched(r)),Hl(e,t),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function $l(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function gk(e,t){if(t.valueAccessor.setDisabledState){let n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}function kh(e,t){let n=bC(e);t.validator!==null?e.setValidators(eC(n,t.validator)):typeof n=="function"&&e.setValidators([n]);let r=CC(e);t.asyncValidator!==null?e.setAsyncValidators(eC(r,t.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let o=()=>e.updateValueAndValidity();$l(t._rawValidators,o),$l(t._rawAsyncValidators,o)}function Hl(e,t){let n=!1;if(e!==null){if(t.validator!==null){let o=bC(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==t.validator);i.length!==o.length&&(n=!0,e.setValidators(i))}}if(t.asyncValidator!==null){let o=CC(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==t.asyncValidator);i.length!==o.length&&(n=!0,e.setAsyncValidators(i))}}}let r=()=>{};return $l(t._rawValidators,r),$l(t._rawAsyncValidators,r),n}function mk(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&xC(e,t)})}function vk(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&xC(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function xC(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function yk(e,t){let n=(r,o)=>{t.valueAccessor.writeValue(r),o&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}function TC(e,t){e==null,kh(e,t)}function Dk(e,t){return Hl(e,t)}function Lh(e,t){if(!e.hasOwnProperty("model"))return!1;let n=e.model;return n.isFirstChange()?!0:!Object.is(t,n.currentValue)}function wk(e){return Object.getPrototypeOf(e.constructor)===Xo}function SC(e,t){e._syncPendingControls(),t.forEach(n=>{let r=n.control;r.updateOn==="submit"&&r._pendingChange&&(n.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function Vh(e,t){if(!t)return null;Array.isArray(t);let n,r,o;return t.forEach(i=>{i.constructor===lC?n=i:wk(i)?r=i:o=i}),o||r||n||null}function bk(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ck={provide:bn,useExisting:Ne(()=>Ek)},Bs=Promise.resolve(),Ek=(()=>{class e extends bn{callSetDisabledState;get submitted(){return yt(this.submittedReactive)}_submitted=Oo(()=>this.submittedReactive());submittedReactive=Ao(!1);_directives=new Set;form;ngSubmit=new ee;options;constructor(n,r,o){super(),this.callSetDisabledState=o,this.form=new Jo({},Rh(n),Oh(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Bs.then(()=>{let r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),zs(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Bs.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Bs.then(()=>{let r=this._findContainer(n.path),o=new Jo({});TC(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Bs.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){Bs.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submittedReactive.set(!0),SC(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submittedReactive.set(!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}static \u0275fac=function(r){return new(r||e)(b(nr,10),b(Gs,10),b(qr,8))};static \u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&mt("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[$e([Ck]),Ce]})}return e})();function rC(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function oC(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Yo=class extends Qo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,n,r){super(Fh(n),Ph(r,n)),this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),zl(n)&&(n.nonNullable||n.initialValueIsDefault)&&(oC(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){rC(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){rC(this._onDisabledChange,t)}_forEachChild(t){}_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(t){oC(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},YK=Yo,Ik=e=>e instanceof Yo;var _k={provide:Wt,useExisting:Ne(()=>xk)},iC=Promise.resolve(),xk=(()=>{class e extends Wt{_changeDetectorRef;callSetDisabledState;control=new Yo;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new ee;constructor(n,r,o,i,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Vh(this,i)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),Lh(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(){zs(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){iC.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,o=r!==0&&Zn(r);iC.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?_C(n,this._parent):[n]}static \u0275fac=function(r){return new(r||e)(b(bn,9),b(nr,10),b(Gs,10),b(Cn,10),b(vt,8),b(qr,8))};static \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"],standalone:!1,features:[$e([_k]),Ce,pt]})}return e})(),QK=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return e})(),Tk={provide:Cn,useExisting:Ne(()=>Sk),multi:!0},Sk=(()=>{class e extends Xo{writeValue(n){let r=n??"";this.setProperty("value",r)}registerOnChange(n){this.onChange=r=>{n(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,o){r&1&&mt("input",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[$e([Tk]),Ce]})}return e})(),Mk={provide:Cn,useExisting:Ne(()=>Nk),multi:!0};var Ak=(()=>{class e{_accessors=[];add(n,r){this._accessors.push([n,r])}remove(n){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===n){this._accessors.splice(r,1);return}}select(n){this._accessors.forEach(r=>{this._isSameGroup(r,n)&&r[1]!==n&&r[1].fireUncheck(n.value)})}_isSameGroup(n,r){return n[0].control?n[0]._parent===r._control._parent&&n[1].name===r.name:!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Nk=(()=>{class e extends Xo{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=v(qr,{optional:!0})??Ws;constructor(n,r,o,i){super(n,r),this._registry=o,this._injector=i}ngOnInit(){this._control=this._injector.get(Wt),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)}static \u0275fac=function(r){return new(r||e)(b(ot),b(xe),b(Ak),b(Ve))};static \u0275dir=H({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(r,o){r&1&&mt("change",function(){return o.onChange()})("blur",function(){return o.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[$e([Mk]),Ce]})}return e})();var jh=new E(""),Rk={provide:Wt,useExisting:Ne(()=>Ok)},Ok=(()=>{class e extends Wt{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(n){}model;update=new ee;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(n,r,o,i,s){super(),this._ngModelWarningConfig=i,this.callSetDisabledState=s,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Vh(this,o)}ngOnChanges(n){if(this._isControlChanged(n)){let r=n.form.previousValue;r&&Bl(r,this,!1),zs(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Lh(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Bl(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")}static \u0275fac=function(r){return new(r||e)(b(nr,10),b(Gs,10),b(Cn,10),b(jh,8),b(qr,8))};static \u0275dir=H({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[$e([Rk]),Ce,pt]})}return e})(),Fk={provide:bn,useExisting:Ne(()=>Pk)},Pk=(()=>{class e extends bn{callSetDisabledState;get submitted(){return yt(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}_submitted=Oo(()=>this._submittedReactive());_submittedReactive=Ao(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new ee;constructor(n,r,o){super(),this.callSetDisabledState=o,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Hl(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 r=this.form.get(n.path);return zs(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){Bl(n.control||null,n,!1),bk(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,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),SC(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new Sh(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new Mh(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(Bl(r||null,n),Ik(o)&&(zs(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);TC(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&Dk(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){kh(this.form,this),this._oldForm&&Hl(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(r){return new(r||e)(b(nr,10),b(Gs,10),b(qr,8))};static \u0275dir=H({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&mt("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[$e([Fk]),Ce,pt]})}return e})();var kk={provide:Wt,useExisting:Ne(()=>Lk)},Lk=(()=>{class e extends Wt{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(n){}model;update=new ee;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(n,r,o,i,s){super(),this._ngModelWarningConfig=s,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Vh(this,i)}ngOnChanges(n){this._added||this._setUpControl(),Lh(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 _C(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||e)(b(bn,13),b(nr,10),b(Gs,10),b(Cn,10),b(jh,8))};static \u0275dir=H({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[$e([kk]),Ce,pt]})}return e})(),Vk={provide:Cn,useExisting:Ne(()=>AC),multi:!0};function MC(e,t){return e==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function jk(e){return e.split(":")[0]}var AC=(()=>{class e extends Xo{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r=this._getOptionId(n),o=MC(r,n);this.setProperty("value",o)}registerOnChange(n){this.onChange=r=>{this.value=this._getOptionValue(r),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),n))return r;return null}_getOptionValue(n){let r=jk(n);return this._optionMap.has(r)?this._optionMap.get(r):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,o){r&1&&mt("change",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[$e([Vk]),Ce]})}return e})(),JK=(()=>{class e{_element;_renderer;_select;id;constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(n){this._select!=null&&(this._select._optionMap.set(this.id,n),this._setElementValue(MC(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))}static \u0275fac=function(r){return new(r||e)(b(xe),b(ot),b(AC,9))};static \u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),Uk={provide:Cn,useExisting:Ne(()=>NC),multi:!0};function sC(e,t){return e==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function Bk(e){return e.split(":")[0]}var NC=(()=>{class e extends Xo{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r;if(Array.isArray(n)){let o=n.map(i=>this._getOptionId(i));r=(i,s)=>{i._setSelected(o.indexOf(s.toString())>-1)}}else r=(o,i)=>{o._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(n){this.onChange=r=>{let o=[],i=r.selectedOptions;if(i!==void 0){let s=i;for(let a=0;a{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,o){r&1&&mt("change",function(s){return o.onChange(s.target)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[$e([Uk]),Ce]})}return e})(),XK=(()=>{class e{_element;_renderer;_select;id;_value;constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){this._select!=null&&(this._value=n,this._setElementValue(sC(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(sC(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))}static \u0275fac=function(r){return new(r||e)(b(xe),b(ot),b(NC,9))};static \u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();function RC(e){return typeof e=="number"?e:parseFloat(e)}var Uh=(()=>{class e{_validator=kl;_onChange;_enabled;ngOnChanges(n){if(this.inputName in n){let r=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):kl,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,features:[pt]})}return e})(),$k={provide:nr,useExisting:Ne(()=>Hk),multi:!0},Hk=(()=>{class e extends Uh{max;inputName="max";normalizeInput=n=>RC(n);createValidator=n=>fC(n);static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&kr("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[$e([$k]),Ce]})}return e})(),zk={provide:nr,useExisting:Ne(()=>Gk),multi:!0},Gk=(()=>{class e extends Uh{min;inputName="min";normalizeInput=n=>RC(n);createValidator=n=>dC(n);static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&kr("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[$e([zk]),Ce]})}return e})(),Wk={provide:nr,useExisting:Ne(()=>qk),multi:!0};var qk=(()=>{class e extends Uh{required;inputName="required";normalizeInput=Zn;createValidator=n=>pC;enabled(n){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,o){r&2&&kr("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[$e([Wk]),Ce]})}return e})();var OC=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({})}return e})(),Nh=class extends Qo{constructor(t,n,r){super(Fh(n),Ph(r,n)),this.controls=t,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,n={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(t,n,r={}){this.controls.splice(t,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(t,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(t,n,r={}){let o=this._adjustIndex(t);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),n&&(this.controls.splice(o,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,n={}){IC(this,!1,t),t.forEach((r,o)=>{EC(this,!1,o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(t,n={}){t!=null&&(t.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(t=[],n={}){this._forEachChild((r,o)=>{r.reset(t[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((n,r)=>r._syncPendingControls()?!0:n,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((n,r)=>{t(n,r)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(n=>n.enabled&&t(n))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function aC(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var Zk=(()=>{class e{useNonNullable=!1;get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,r=null){let o=this._reduceControls(n),i={};return aC(r)?i=r:r!==null&&(i.validators=r.validator,i.asyncValidators=r.asyncValidator),new Jo(o,i)}record(n,r=null){let o=this._reduceControls(n);return new Ah(o,r)}control(n,r,o){let i={};return this.useNonNullable?(aC(r)?i=r:(i.validators=r,i.asyncValidators=o),new Yo(n,F(y({},i),{nonNullable:!0}))):new Yo(n,r,o)}array(n,r,o){let i=n.map(s=>this._createControl(s));return new Nh(i,r,o)}_reduceControls(n){let r={};return Object.keys(n).forEach(o=>{r[o]=this._createControl(n[o])}),r}_createControl(n){if(n instanceof Yo)return n;if(n instanceof Qo)return n;if(Array.isArray(n)){let r=n[0],o=n.length>1?n[1]:null,i=n.length>2?n[2]:null;return this.control(r,o,i)}else return this.control(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var eY=(()=>{class e extends Zk{group(n,r=null){return super.group(n,r)}control(n,r,o){return super.control(n,r,o)}array(n,r,o){return super.array(n,r,o)}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var tY=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:qr,useValue:n.callSetDisabledState??Ws}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({imports:[OC]})}return e})(),nY=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:jh,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:qr,useValue:n.callSetDisabledState??Ws}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=zt({type:e});static \u0275inj=$t({imports:[OC]})}return e})();function Kk(e,t){for(var n=-1,r=t.length,o=e.length;++n0&&n(a)?t>1?BC(a,t-1,n,r,o):ei(o,a):r||(o[o.length]=a)}return o}var $C=BC;function vL(e){var t=e==null?0:e.length;return t?$C(e,1):[]}var yL=vL;function DL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bt=DL;var wL="[object AsyncFunction]",bL="[object Function]",CL="[object GeneratorFunction]",EL="[object Proxy]";function IL(e){if(!bt(e))return!1;var t=Ft(e);return t==bL||t==CL||t==wL||t==EL}var Wl=IL;var _L=me["__core-js_shared__"],ql=_L;var HC=function(){var e=/[^.]+$/.exec(ql&&ql.keys&&ql.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xL(e){return!!HC&&HC in e}var zC=xL;var TL=Function.prototype,SL=TL.toString;function ML(e){if(e!=null){try{return SL.call(e)}catch{}try{return e+""}catch{}}return""}var En=ML;var AL=/[\\^$.*+?()[\]{}|]/g,NL=/^\[object .+?Constructor\]$/,RL=Function.prototype,OL=Object.prototype,FL=RL.toString,PL=OL.hasOwnProperty,kL=RegExp("^"+FL.call(PL).replace(AL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function LL(e){if(!bt(e)||zC(e))return!1;var t=Wl(e)?kL:NL;return t.test(En(e))}var GC=LL;function VL(e,t){return e?.[t]}var WC=VL;function jL(e,t){var n=WC(e,t);return GC(n)?n:void 0}var et=jL;var UL=et(Object,"create"),In=UL;function BL(){this.__data__=In?In(null):{},this.size=0}var qC=BL;function $L(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ZC=$L;var HL="__lodash_hash_undefined__",zL=Object.prototype,GL=zL.hasOwnProperty;function WL(e){var t=this.__data__;if(In){var n=t[e];return n===HL?void 0:n}return GL.call(t,e)?t[e]:void 0}var KC=WL;var qL=Object.prototype,ZL=qL.hasOwnProperty;function KL(e){var t=this.__data__;return In?t[e]!==void 0:ZL.call(t,e)}var YC=KL;var YL="__lodash_hash_undefined__";function QL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===void 0?YL:t,this}var QC=QL;function ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var tE=iV;function sV(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var nE=sV;function oi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var gE=CV;function EV(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=AV){var l=t?null:yE(e);if(l)return si(l);s=!1,o=Yl,u=new Kl}else u=t?[]:a;e:for(;++r-1&&e%1==0&&e-1&&e%1==0&&e<=JV}var li=XV;function ej(e){return e!=null&&li(e.length)&&!Wl(e)}var ci=ej;var tj=Object.prototype;function nj(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||tj;return e===n}var di=nj;function rj(e,t){for(var n=-1,r=Array(e);++no?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:GE(e,t,n)}var WE=hU;var gU="\\ud800-\\udfff",mU="\\u0300-\\u036f",vU="\\ufe20-\\ufe2f",yU="\\u20d0-\\u20ff",DU=mU+vU+yU,wU="\\ufe0e\\ufe0f",bU="\\u200d",CU=RegExp("["+bU+gU+DU+wU+"]");function EU(e){return CU.test(e)}var ac=EU;function IU(e){return e.split("")}var qE=IU;var ZE="\\ud800-\\udfff",_U="\\u0300-\\u036f",xU="\\ufe20-\\ufe2f",TU="\\u20d0-\\u20ff",SU=_U+xU+TU,MU="\\ufe0e\\ufe0f",AU="["+ZE+"]",Wh="["+SU+"]",qh="\\ud83c[\\udffb-\\udfff]",NU="(?:"+Wh+"|"+qh+")",KE="[^"+ZE+"]",YE="(?:\\ud83c[\\udde6-\\uddff]){2}",QE="[\\ud800-\\udbff][\\udc00-\\udfff]",RU="\\u200d",JE=NU+"?",XE="["+MU+"]?",OU="(?:"+RU+"(?:"+[KE,YE,QE].join("|")+")"+XE+JE+")*",FU=XE+JE+OU,PU="(?:"+[KE+Wh+"?",Wh,YE,QE,AU].join("|")+")",kU=RegExp(qh+"(?="+qh+")|"+PU+FU,"g");function LU(e){return e.match(kU)||[]}var eI=LU;function VU(e){return ac(e)?eI(e):qE(e)}var tI=VU;function jU(e){return function(t){t=Ct(t);var n=ac(t)?tI(t):void 0,r=n?n[0]:t.charAt(0),o=n?WE(n,1).join(""):t.slice(1);return r[e]()+o}}var nI=jU;var UU=nI("toUpperCase"),rI=UU;function BU(e){return rI(Ct(e).toLowerCase())}var oI=BU;function $U(e,t,n,r){var o=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++o]);++oa))return!1;var l=i.get(e),c=i.get(t);if(l&&c)return l==t&&c==e;var d=-1,f=!0,p=n&I$?new Kl:void 0;for(i.set(e,t),i.set(t,e);++d0?"Infinity":"-Infinity":JSON.stringify(e)}function NH(e){return e.map(function(t){var n=t.key,r=t.type;return"".concat(n,": ").concat(r.name)}).join("/")}function RH(e){return e.message!==void 0?e.message:"Invalid value ".concat(AH(e.value)," supplied to ").concat(NH(e.context))}function OH(e){return e.map(RH)}function FH(){return["No errors!"]}var G_={report:Ol(OH,FH)};var Yh=class extends Error{constructor(){super(...arguments),this.name="DecodeError"}};function PH(e){return t=>Jn(e.decode(t),Ol(n=>An(()=>new Yh(G_.report(Rl(n)).join(` -`))),n=>_(n)))}function Zie(e){return PH(Fe(e))}var Qs=class{},kH=(()=>{class e extends Qs{getTranslation(n){return _({})}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),wc=class{},LH=(()=>{class e{handle(n){return n.key}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function bc(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;let n=typeof e,r=typeof t,o,i,s;if(n==r&&n=="object")if(Array.isArray(e)){if(!Array.isArray(t))return!1;if((o=e.length)==t.length){for(i=0;i{ta(t[r])?r in e?n[r]=Qh(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n):Qh({},t)}function Jh(e,t){let n=t.split(".");t="";do t+=n.shift(),dr(e)&&dr(e[t])&&(ta(e[t])||Xh(e[t])||!n.length)?(e=e[t],t=""):n.length?t+=".":e=void 0;while(n.length);return e}function jH(e,t,n){let r=t.split("."),o=e;for(let i=0;i{class e extends Js{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(n,r){if(eg(n))return this.interpolateString(n,r);if(VH(n))return this.interpolateFunction(n,r)}interpolateFunction(n,r){return n(r)}interpolateString(n,r){return r?n.replace(this.templateMatcher,(o,i)=>{let s=Jh(r,i);return dr(s)?s:o}):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Xs=class{},BH=(()=>{class e extends Xs{compile(n,r){return n}compileTranslations(n,r){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Re(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),ea=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new ee;onLangChange=new ee;onDefaultLangChange=new ee},W_=new E("ISOLATE_TRANSLATE_SERVICE"),q_=new E("USE_DEFAULT_LANG"),Z_=new E("DEFAULT_LANGUAGE"),K_=new E("USE_EXTEND"),Ys=e=>Yt(e)?e:_(e),Y_=(()=>{class e{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(n){this.store.defaultLang=n}get currentLang(){return this.store.currentLang}set currentLang(n){this.store.currentLang=n}get langs(){return this.store.langs}set langs(n){this.store.langs=n}get translations(){return this.store.translations}set translations(n){this.store.translations=n}constructor(n,r,o,i,s,a=!0,u=!1,l=!1,c){this.store=n,this.currentLoader=r,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.extend=l,u&&(this.store=new ea),c&&this.setDefaultLang(c)}setDefaultLang(n){if(n===this.defaultLang)return;let r=this.retrieveTranslations(n);typeof r<"u"?(this.defaultLang==null&&(this.defaultLang=n),r.pipe(Ie(1)).subscribe(()=>{this.changeDefaultLang(n)})):this.changeDefaultLang(n)}getDefaultLang(){return this.defaultLang}use(n){if(this.lastUseLanguage=n,n===this.currentLang)return _(this.translations[n]);this.currentLang||(this.currentLang=n);let r=this.retrieveTranslations(n);return Yt(r)?(r.pipe(Ie(1)).subscribe(()=>{this.changeLang(n)}),r):(this.changeLang(n),_(this.translations[n]))}changeLang(n){n===this.lastUseLanguage&&(this.currentLang=n,this.onLangChange.emit({lang:n,translations:this.translations[n]}),this.defaultLang==null&&this.changeDefaultLang(n))}retrieveTranslations(n){if(typeof this.translations[n]>"u"||this.extend)return this._translationRequests[n]=this._translationRequests[n]||this.loadAndCompileTranslations(n),this._translationRequests[n]}getTranslation(n){return this.loadAndCompileTranslations(n)}loadAndCompileTranslations(n){this.pending=!0;let r=this.currentLoader.getTranslation(n).pipe(Ri(1),Ie(1));return this.loadingTranslations=r.pipe(A(o=>this.compiler.compileTranslations(o,n)),Ri(1),Ie(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[n]=this.extend&&this.translations[n]?y(y({},o),this.translations[n]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),r}setTranslation(n,r,o=!1){let i=this.compiler.compileTranslations(r,n);(o||this.extend)&&this.translations[n]?this.translations[n]=Qh(this.translations[n],i):this.translations[n]=i,this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}getLangs(){return this.langs}addLangs(n){let r=n.filter(o=>!this.langs.includes(o));r.length>0&&(this.langs=[...this.langs,...r])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(n,r,o){let i;if(n&&(i=this.runInterpolation(Jh(n,r),o)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(Jh(this.translations[this.defaultLang],r),o)),i===void 0){let s={key:r,translateService:this};typeof o<"u"&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return i!==void 0?i:r}runInterpolation(n,r){if(Xh(n))return n.map(o=>this.runInterpolation(o,r));if(ta(n)){let o={};for(let i in n){let s=this.runInterpolation(n[i],r);s!==void 0&&(o[i]=s)}return o}else return this.parser.interpolate(n,r)}getParsedResult(n,r,o){if(r instanceof Array){let i={},s=!1;for(let u of r)i[u]=this.getParsedResultForKey(n,u,o),s=s||Yt(i[u]);if(!s)return i;let a=r.map(u=>Ys(i[u]));return Ni(a).pipe(A(u=>{let l={};return u.forEach((c,d)=>{l[r[d]]=c}),l}))}return this.getParsedResultForKey(n,r,o)}get(n,r){if(!dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(kt(o=>Ys(this.getParsedResult(o,n,r)))):Ys(this.getParsedResult(this.translations[this.currentLang],n,r))}getStreamOnTranslationChange(n,r){if(!dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return tt(Jt(()=>this.get(n,r)),this.onTranslationChange.pipe(De(o=>{let i=this.getParsedResult(o.translations,n,r);return Ys(i)})))}stream(n,r){if(!dr(n)||!n.length)throw new Error('Parameter "key" required');return tt(Jt(()=>this.get(n,r)),this.onLangChange.pipe(De(o=>{let i=this.getParsedResult(o.translations,n,r);return Ys(i)})))}instant(n,r){if(!dr(n)||n.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],n,r);return Yt(o)?Array.isArray(n)?n.reduce((i,s)=>(i[s]=s,i),{}):n:o}set(n,r,o=this.currentLang){jH(this.translations[o],n,eg(r)?this.compiler.compile(r,o):this.compiler.compileTranslations(r,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(n){this.defaultLang=n,this.onDefaultLangChange.emit({lang:n,translations:this.translations[n]})}reloadLang(n){return this.resetLang(n),this.loadAndCompileTranslations(n)}resetLang(n){delete this._translationRequests[n],delete this.translations[n]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let n=this.getBrowserCultureLang();return n?n.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(r){return new(r||e)(I(ea),I(Qs),I(Xs),I(Js),I(wc),I(q_),I(W_),I(K_),I(Z_))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ise=(()=>{class e{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(n,r){this.translate=n,this._ref=r}updateValue(n,r,o){let i=s=>{this.value=s!==void 0?s:n,this.lastKey=n,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,n,r);Yt(s)?s.subscribe(i):i(s)}this.translate.get(n,r).subscribe(i)}transform(n,...r){if(!n||!n.length)return n;if(bc(n,this.lastKey)&&bc(r,this.lastParams))return this.value;let o;if(dr(r[0])&&r.length)if(eg(r[0])&&r[0].length){let i=r[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(i)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else ta(r[0])&&(o=r[0]);return this.lastKey=n,this.lastParams=r,this.updateValue(n,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,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(r){return new(r||e)(b(Y_,16),b(vt,16))};static \u0275pipe=Ro({name:"translate",type:e,pure:!1});static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var sse=(e={})=>Ar([e.loader||{provide:Qs,useClass:kH},e.compiler||{provide:Xs,useClass:BH},e.parser||{provide:Js,useClass:UH},e.missingTranslationHandler||{provide:wc,useClass:LH},ea,{provide:W_,useValue:e.isolate},{provide:q_,useValue:e.useDefaultLang},{provide:K_,useValue:e.extend},{provide:Z_,useValue:e.defaultLanguage},Y_]);var $H="uiCulture",HH="CLX.LoginToken",zH="CLX.RefreshToken",GH="CLX.TokenExpire",lse=(()=>{class e{getLanguage(){return this.getValue($H)}getAccessToken(){let n=this.getValue(HH);return n?n.replace(/^"+|"+$/g,""):null}getRefreshToken(){return this.getValue(zH)}getTokenExpire(){return this.getValue(GH)}getPayload(){let n=this.getAccessToken(),r=n?n.split(".")[1]:null,o=r?r.replace("-","+").replace("_","/"):null,i=JSON.parse(window.atob(o||""));return i.roles="holder_roles"in i?i.holder_roles:i.roles,i}getValue(n){return sessionStorage.getItem(n)||localStorage.getItem(n)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{y as a,F as b,nx as c,Cc as d,O as e,J as f,Me as g,Si as h,yx as i,Dx as j,Ee as k,_ as l,An as m,A as n,Aa as o,le as p,Jt as q,kx as r,Ni as s,Uc as t,Xt as u,Hx as v,zx as w,Pe as x,Wx as y,Zx as z,Kx as A,Rn as B,kt as C,Yg as D,On as E,Ie as F,Yx as G,Xg as H,Xx as I,Fn as J,Oa as K,zc as L,Ri as M,e0 as N,Fa as O,De as P,t0 as Q,Pa as R,we as S,n0 as T,r0 as U,w as V,Ne as W,C as X,$t as Y,E as Z,I as _,v as $,Ye as aa,rt as ba,Au as ca,pt as da,Y5 as ea,Q5 as fa,J5 as ga,X5 as ha,Re as ia,Tf as ja,Ve as ka,zn as la,ee as ma,be as na,St as oa,e9 as pa,ry as qa,xe as ra,gt as sa,Ao as ta,t9 as ua,YT as va,gy as wa,yS as xa,n9 as ya,b as za,HS as Aa,Gi as Ba,_o as Ca,ot as Da,Pr as Ea,s9 as Fa,hD as Ga,zt as Ha,H as Ia,Ro as Ja,Ce as Ka,a9 as La,Jf as Ma,RA as Na,un as Oa,kr as Pa,XA as Qa,Gu as Ra,u9 as Sa,l9 as Ta,c9 as Ua,d9 as Va,f9 as Wa,p9 as Xa,h9 as Ya,g9 as Za,OD as _a,FD as $a,np as ab,PD as bb,kD as cb,gN as db,m9 as eb,vN as fb,mt as gb,v9 as hb,y9 as ib,D9 as jb,TN as kb,jD as lb,UD as mb,w9 as nb,BD as ob,$D as pb,b9 as qb,C9 as rb,MN as sb,HD as tb,AN as ub,NN as vb,RN as wb,ON as xb,E9 as yb,FN as zb,PN as Ab,I9 as Bb,_9 as Cb,$e as Db,x9 as Eb,T9 as Fb,S9 as Gb,M9 as Hb,A9 as Ib,N9 as Jb,R9 as Kb,O9 as Lb,F9 as Mb,P9 as Nb,ss as Ob,vt as Pb,Zn as Qb,nR as Rb,Oo as Sb,yt as Tb,lR as Ub,k9 as Vb,Ue as Wb,us as Xb,SR as Yb,HR as Zb,s7 as _b,a7 as $b,u7 as ac,l7 as bc,c7 as cc,d7 as dc,f7 as ec,tO as fc,rO as gc,Vr as hc,Yn as ic,gw as jc,Ep as kc,ll as lc,pO as mc,x7 as nc,T7 as oc,Aw as pc,q7 as qc,KO as rc,L as sc,ws as tc,Cs as uc,Dn as vc,Jp as wc,Hr as xc,SF as yc,Al as zc,Gw as Ac,gZ as Bc,mZ as Cc,vZ as Dc,HZ as Ec,ce as Fc,W as Gc,$ as Hc,Y as Ic,he as Jc,zb as Kc,KZ as Lc,YZ as Mc,Fe as Nc,dt as Oc,JZ as Pc,ks as Qc,XZ as Rc,tK as Sc,sK as Tc,bb as Uc,Vs as Vc,hK as Wc,gK as Xc,mK as Yc,vK as Zc,yK as _c,DK as $c,wK as ad,CK as bd,SK as cd,MK as dd,Cn as ed,tk as fd,lC as gd,nr as hd,Xb as id,qK as jd,ZK as kd,Ek as ld,YK as md,xk as nd,QK as od,Sk as pd,Nk as qd,Ok as rd,Pk as sd,Lk as td,AC as ud,JK as vd,XK as wd,Hk as xd,Gk as yd,qk as zd,eY as Ad,tY as Bd,nY as Cd,yL as Dd,Zh as Ed,RB as Fd,b$ as Gd,CH as Hd,IH as Id,OV as Jd,xH as Kd,MH as Ld,PH as Md,Zie as Nd,Qs as Od,Y_ as Pd,ise as Qd,sse as Rd,lse as Sd}; diff --git a/public/apps/webapp-schulverwaltung/chunk-S7HYT6Z5.js b/public/apps/webapp-schulverwaltung/chunk-S7HYT6Z5.js new file mode 100644 index 00000000..dec5ba3e --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-S7HYT6Z5.js @@ -0,0 +1 @@ +import{a as ke,b as Be,c as Ae,d as De,e as Ve}from"./chunk-GCWE54XA.js";import"./chunk-N2RKIMWO.js";import{b as Ee}from"./chunk-SKUS47ZU.js";import"./chunk-H664QRX4.js";import"./chunk-26VH6QDS.js";import{c as $e,d as Le}from"./chunk-JGKXAFYO.js";import"./chunk-ZELJ2QPT.js";import{a as z}from"./chunk-K42F6AEW.js";import{j as Ie}from"./chunk-SL67CYEF.js";import{h as Te}from"./chunk-HQSONWXM.js";import{c as he,d as xe,e as ge,f as be,g as Se,x as we}from"./chunk-RXRYDGZR.js";import{a as Pe}from"./chunk-F4XODHS2.js";import{$ as h,$a as $,B as J,Cc as ae,Dc as le,Eb as F,Ec as pe,Ed as ye,F as H,Fb as R,Fd as ve,Gb as v,Gd as Ce,Hb as re,Ia as g,J as K,M as G,Nb as a,O as Q,Ob as d,P as I,Pa as _,Pb as E,Ra as te,Rd as Me,Sa as y,Sd as D,Ta as ie,X,Xa as u,Za as U,_a as T,ab as r,bb as o,cb as c,da as ee,ea as S,fa as P,g as N,gb as w,gc as A,h as Y,hc as j,ib as M,jb as m,kd as de,l as O,m as Z,mb as B,md as se,n as k,nd as me,od as ce,sd as fe,ub as b,vb as l,wb as C,wd as _e,x as q,xb as f,xd as ue,ya as i,yb as ne,zb as oe}from"./chunk-NEW5VGRB.js";var W="no_access",V=(()=>{class e{constructor(){this.profileService=h(ke),this.reset$=new N(void 0),this.rawProfile$=this.reset$.pipe(I(()=>this.loadProfile()),G(1)),this.profile$=this.rawProfile$.pipe(k(t=>t===W?null:t)),this.noAccess$=this.rawProfile$.pipe(k(t=>t===W)),this.loading$=this.profileService.loading$}reset(){this.reset$.next()}loadProfile(){return this.profileService.getMyProfile().pipe(J(t=>t.status===403?O(W):Z(()=>t)))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=X({token:e,factory:e.\u0275fac})}}return e})();function Ue(e,p){if(e&1&&(r(0,"div"),l(1),o()),e&2){m(2);let t=v(2);i(),f(" ",t.AddressLine2," ")}}function ze(e,p){if(e&1&&(r(0,"div",5),l(1),a(2,"translate"),o()),e&2){let t=p.$implicit;i(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function We(e,p){if(e&1&&(r(0,"div",13),l(1),a(2,"translate"),o()),e&2){let t=p.$implicit;i(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Ye(e,p){e&1&&(r(0,"div",18)(1,"span",19),l(2,"Loading..."),o()())}function Ze(e,p){if(e&1){let t=w();r(0,"form",2),M("ngSubmit",function(){S(t);let s=m();return P(s.onSubmit())}),r(1,"div",3)(2,"p"),l(3),a(4,"translate"),o(),r(5,"address",4)(6,"div"),l(7),o(),_(8,Ue,2,1,"div"),r(9,"div"),l(10),o()()(),T(11,ze,3,4,"div",5,U),a(13,"async"),r(14,"div",3)(15,"label",6),l(16),a(17,"translate"),o(),c(18,"input",7),o(),r(19,"div",3)(20,"label",8),l(21),a(22,"translate"),o(),c(23,"input",9),r(24,"small",10),l(25),a(26,"translate"),o()(),r(27,"div",3)(28,"label",11),l(29),a(30,"translate"),o(),c(31,"input",12),a(32,"async"),T(33,We,3,4,"div",13,U),a(35,"async"),r(36,"small",14),l(37),a(38,"translate"),o()(),r(39,"div",15)(40,"button",16),a(41,"async"),M("click",function(){S(t);let s=m();return P(s.cancel())}),l(42),a(43,"translate"),o(),r(44,"button",17),a(45,"async"),l(46),a(47,"translate"),_(48,Ye,3,0,"div",18),a(49,"async"),o()()()}if(e&2){let t,n=m(),s=v(0),x=v(2);y("formGroup",s),i(3),C(d(4,18,"my-profile.edit.address-changes-remark")),i(4),C(x.AddressLine1),i(),u(x.AddressLine2?8:-1),i(2),ne("",x.Zip||""," ",x.Location,""),i(),$(d(13,20,n.formErrors$)),i(5),f(" ",d(17,22,"my-profile.edit.fields.phone-private")," "),i(5),f(" ",d(22,24,"my-profile.edit.fields.phone-mobile")," "),i(4),C(d(26,26,"my-profile.edit.fields.phone-mobile-hint")),i(4),f(" ",d(30,28,"my-profile.edit.fields.email2")," "),i(2),ie("is-invalid",((t=(t=d(32,30,n.email2Errors$))==null?null:t.length)!==null&&t!==void 0?t:0)>0),i(2),$(d(35,32,n.email2Errors$)),i(4),C(d(38,34,"my-profile.edit.fields.email2-hint")),i(3),y("disabled",d(41,36,n.saving$)),i(2),f(" ",d(43,38,"my-profile.edit.cancel")," "),i(2),y("disabled",d(45,40,n.saving$)),i(2),f(" ",d(47,42,"my-profile.edit.save")," "),i(2),u(d(49,44,n.saving$)?48:-1)}}var Ne=(()=>{class e{constructor(){this.fb=h(ye),this.router=h(le),this.toastService=h(Pe),this.translate=h(Me),this.profileService=h(V),this.personsService=h(Ee),this.student$=this.profileService.profile$.pipe(q(we),k(({student:t})=>t)),this.formGroup$=this.student$.pipe(k(this.createFormGroup.bind(this)),G(1)),this.saving$=new N(!1),this.submitted$=new N(!1),this.formErrors$=z(this.formGroup$,this.submitted$),this.email2Errors$=z(this.formGroup$,this.submitted$,"email2")}cancel(){this.navigateBack()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(H(1)).subscribe(t=>{if(t.valid){let{phonePrivate:n,phoneMobile:s,email2:x}=t.value;this.save(n?.trim()||null,s?.trim()||null,x||null)}})}createFormGroup(t){return this.fb.group({phonePrivate:[t.PhonePrivate],phoneMobile:[t.PhoneMobile],email2:[t.Email2,se.email]})}save(t,n,s){this.saving$.next(!0),this.student$.pipe(H(1),I(x=>this.personsService.update(x.Id,t,n,s)),K(()=>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"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-my-profile-edit"]],decls:9,vars:10,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"mb-3"],[1,"text-muted"],[1,"alert","alert-danger"],["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"],[1,"invalid-feedback"],["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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,s){if(n&1&&(F(0),a(1,"async"),F(2),a(3,"async"),r(4,"div",0)(5,"h1"),l(6),a(7,"translate"),o(),_(8,Ze,50,46,"form",1),o()),n&2){let x=R(d(1,2,s.formGroup$));i(2);let He=R(d(3,5,s.student$));i(4),C(d(7,8,"my-profile.edit.title")),i(2),u(x&&He?8:-1)}},dependencies:[ve,fe,de,me,ce,Ce,_e,ue,A,D],encapsulation:2,changeDetection:0})}}return e})();var Fe=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-my-profile-address"]],inputs:{address:"address"},decls:2,vars:1,template:function(n,s){n&1&&(r(0,"address"),l(1),o()),n&2&&(i(),C(s.address))},styles:["[_nghost-%COMP%]{padding:1rem}address[_ngcontent-%COMP%]{white-space:pre-wrap}"],changeDetection:0})}}return e})();var Re=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-my-profile-entry"]],inputs:{label:"label",value:"value"},decls:6,vars:4,consts:[[1,"row"],[1,"col-md-6"]],template:function(n,s){n&1&&(r(0,"dl",0)(1,"dt",1),l(2),a(3,"translate"),o(),r(4,"dd",1),l(5),o()()),n&2&&(i(2),C(d(3,2,s.label)),i(3),C(s.value))},dependencies:[D],styles:["dl[_ngcontent-%COMP%]{padding:0 1rem}dt[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0})}}return e})();function qe(e,p){if(e&1&&(r(0,"span"),l(1),o()),e&2){let t=m(2);i(),f("(",t.student.Gender,")")}}function Je(e,p){if(e&1&&(r(0,"div",0)(1,"div",2),c(2,"bkd-avatar",3),r(3,"div",4),l(4),_(5,qe,2,1,"span"),r(6,"div",5),l(7),a(8,"date"),o()()(),c(9,"bkd-reports-link",6),a(10,"async"),o()),e&2){let t=m();i(2),y("studentId",t.student.Id),i(2),oe(" ",t.student.LastName," ",t.student.FirstName," ",t.student.MiddleName," "),i(),u(t.student.Gender?5:-1),i(2),f(" ",E(8,7,t.student.Birthdate,"dd.MM.yyyy")," "),i(2),y("reports",d(10,10,t.reports$))}}function Ke(e,p){if(e&1&&(r(0,"div",1),l(1),o()),e&2){let t=m();i(),C(t.student.Email)}}var Oe=(()=>{class e{constructor(){this.reportsService=h(Le),this.studentId$=new Y(1),this.reports$=this.studentId$.pipe(I(t=>t?this.reportsService.getPersonMasterDataReports(t):O([])),Q([]))}ngOnChanges(t){t.student&&this.studentId$.next(t.student.currentValue?.Id||null)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-my-profile-header"]],inputs:{student:"student"},features:[ee],decls:2,vars:2,consts:[[1,"avatar-person"],[1,"email"],[1,"d-flex"],[1,"me-3","avatar","large",3,"studentId"],[1,"person"],[1,"birthdate"],[3,"reports"]],template:function(n,s){n&1&&_(0,Je,11,12,"div",0)(1,Ke,2,1,"div",1),n&2&&(u(s.student?0:-1),i(),u(s.student?1:-1))},dependencies:[Ve,Ie,A,j],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})}}return e})();var Qe=(e,p)=>p.apprenticeshipContract.Id,Xe=(e,p)=>p.Id;function et(e,p){e&1&&c(0,"bkd-spinner")}function tt(e,p){e&1&&(r(0,"p",7),l(1),a(2,"translate"),o()),e&2&&(i(),f(" ",d(2,1,"shared.profile.substitution-profile")," "))}function it(e,p){e&1&&(r(0,"p",8),l(1),a(2,"translate"),o()),e&2&&(i(),f(" ",d(2,1,"shared.profile.no-profile")," "))}function nt(e,p){if(e&1&&(_(0,tt,3,3,"p",7),a(1,"async"),_(2,it,3,3,"p",8)),e&2){let t=m();u(d(1,1,t.profileService.noAccess$)?0:2)}}function ot(e,p){if(e&1&&c(0,"bkd-my-profile-entry",12),e&2){m(2);let t=v(0);B("value",t.student.SocialSecurityNumber)}}function rt(e,p){if(e&1&&c(0,"bkd-my-profile-entry",13),e&2){m(2);let t=v(0);B("value",t.student.HomeTown||t.student.Nationality)}}function at(e,p){if(e&1&&c(0,"bkd-my-profile-entry",14),e&2){m(2);let t=v(0);B("value",t.student.NativeLanguage)}}function lt(e,p){if(e&1&&c(0,"bkd-my-profile-entry",15),e&2){m(2);let t=v(0);B("value",t.stayPermitValue)}}function pt(e,p){if(e&1&&(c(0,"bkd-my-profile-entry",16),a(1,"date")),e&2){m(2);let t=v(0);B("value",E(1,1,t.student.StayPermitExpiry,"mediumDate"))}}function dt(e,p){if(e&1&&(r(0,"div",24)(1,"a",25),a(2,"translate"),r(3,"i",26),l(4,"edit"),o()(),c(5,"bkd-student-dossier-address",27),o()),e&2){m(2);let t=v(0);i(),te("aria-label",d(2,2,"my-profile.edit.title")),i(4),y("student",t.student)}}function st(e,p){if(e&1&&c(0,"bkd-my-profile-address",28),e&2){m(3);let t=v(0);y("address",t.student.CorrespondenceAddress)}}function mt(e,p){if(e&1){let t=w();r(0,"div",18,1)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let s=b(1);return P(s.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,st,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);i(3),y("opened",!t.collapsed),i(),f(" ",d(5,2,"shared.profile.correspondence-address")," ")}}function ct(e,p){if(e&1&&c(0,"bkd-my-profile-address",28),e&2){m(3);let t=v(0);y("address",t.student.BillingAddress)}}function ft(e,p){if(e&1){let t=w();r(0,"div",18,2)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let s=b(1);return P(s.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,ct,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);i(3),y("opened",!t.collapsed),i(),f(" ",d(5,2,"shared.profile.billing-address")," ")}}function _t(e,p){if(e&1&&c(0,"bkd-student-dossier-legal-representative",29),e&2){let t=p.$implicit;y("person",t)}}function ut(e,p){if(e&1&&T(0,_t,1,1,"bkd-student-dossier-legal-representative",29,Xe),e&2){m(3);let t=v(0);$(t.legalRepresentativePersons)}}function yt(e,p){if(e&1){let t=w();r(0,"div",18,3)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let s=b(1);return P(s.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,ut,2,0,"ng-template"),o()()()}if(e&2){let t=b(1);i(3),y("opened",!t.collapsed),i(),f(" ",d(5,2,"shared.profile.legal-representation")," ")}}function vt(e,p){if(e&1&&l(0),e&2){let t=m().$index;f(" ",t+1," ")}}function Ct(e,p){if(e&1&&c(0,"bkd-student-dossier-apprenticeship-company",30),e&2){let t=m().$implicit;y("company",t)}}function ht(e,p){if(e&1){let t=w();r(0,"div",23,4)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let s=b(1);return P(s.toggle())}),l(4),a(5,"translate"),_(6,vt,1,1),o()(),r(7,"div",21)(8,"div",22),_(9,Ct,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);m(2);let n=v(0);i(3),y("opened",!t.collapsed),i(),f(" ",d(5,3,"shared.profile.apprenticeship-company")," "),i(2),u(n.apprenticeshipCompanies.length>1?6:-1)}}function xt(e,p){if(e&1){let t=w();c(0,"bkd-my-profile-header",9),r(1,"div",10)(2,"div",11),_(3,ot,1,1,"bkd-my-profile-entry",12)(4,rt,1,1,"bkd-my-profile-entry",13)(5,at,1,1,"bkd-my-profile-entry",14)(6,lt,1,1,"bkd-my-profile-entry",15)(7,pt,2,4,"bkd-my-profile-entry",16),o(),r(8,"div",17)(9,"div",18,0)(11,"div",19)(12,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let s=b(10);return P(s.toggle())}),l(13),a(14,"translate"),o()(),r(15,"div",21)(16,"div",22),_(17,dt,6,4,"ng-template"),o()()(),_(18,mt,9,4,"div",18)(19,ft,9,4,"div",18)(20,yt,9,4,"div",18),T(21,ht,10,5,"div",23,Qe),o()()}if(e&2){let t=b(10);m();let n=v(0);y("student",n.student),i(3),u(n.student.SocialSecurityNumber?3:-1),i(),u(n.student.HomeTown||n.student.Nationality?4:-1),i(),u(n.student.NativeLanguage?5:-1),i(),u(n.stayPermitValue?6:-1),i(),u(n.student.StayPermitExpiry?7:-1),i(5),y("opened",!t.collapsed),i(),f(" ",d(14,11,"shared.profile.student-address")," "),i(5),u(n.student.CorrespondenceAddress?18:-1),i(),u(n.student.BillingAddress?19:-1),i(),u(n.legalRepresentativePersons.length>0?20:-1),i(),$(n.apprenticeshipCompanies)}}var Ge=(()=>{class e{constructor(){this.profileService=h(V)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-my-profile-show"]],decls:10,vars:9,consts:[["studentAddress","ngbAccordionItem"],["correspondenceAddress","ngbAccordionItem"],["billingAddress","ngbAccordionItem"],["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"bkd-container","bkd-container-limited"],["data-testid","profile-title"],["data-testid","profile-substitution"],["data-testid","profile-none"],[3,"student"],["data-testid","profile-content",1,"profile-content"],[1,"profile-entries","pt-3"],["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"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"ngbAccordionItem"],[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"],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(n,s){if(n&1&&(F(0),a(1,"async"),r(2,"div",5)(3,"h1",6),l(4),a(5,"translate"),o(),_(6,et,1,0,"bkd-spinner"),a(7,"async"),_(8,nt,3,3)(9,xt,23,13),o()),n&2){let x=R(d(1,2,s.profileService.profile$));i(4),C(d(5,5,"my-profile.title")),i(2),u(d(7,7,s.profileService.loading$)?6:x?9:8)}},dependencies:[Oe,Re,Se,be,ge,$e,xe,he,pe,Be,Fe,De,Ae,Te,A,j,D],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})}}return e})();var je=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=g({type:e,selectors:[["bkd-my-profile"]],features:[re([V])],decls:1,vars:0,template:function(n,s){n&1&&c(0,"router-outlet")},dependencies:[ae],encapsulation:2,changeDetection:0})}}return e})();var wi=[{path:"",component:je,children:[{path:"",component:Ge},{path:"edit",component:Ne}]}];export{wi as MY_PROFILE_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SGUU3JRZ.js b/public/apps/webapp-schulverwaltung/chunk-SGUU3JRZ.js deleted file mode 100644 index 2adc9053..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-SGUU3JRZ.js +++ /dev/null @@ -1 +0,0 @@ -import{a as Ae,b as De,c as Le,d as Ve,e as Fe}from"./chunk-AXC265QM.js";import"./chunk-RC3KCROY.js";import{b as Be}from"./chunk-UPTESATB.js";import"./chunk-XKNLLORS.js";import"./chunk-LZEJSWWW.js";import{b as $e,d as Ne}from"./chunk-UN6AN2DI.js";import"./chunk-M5HHSMYB.js";import{a as W}from"./chunk-XBIMNMBY.js";import{i as Ie}from"./chunk-2AZMKO7X.js";import{b as Te}from"./chunk-HLAFRD2O.js";import{c as ge,d as be,e as Se,f as Pe,g as Me,x as ke}from"./chunk-QTBTUQ3W.js";import{a as we}from"./chunk-HVJBOTRL.js";import{$a as o,Ab as F,Ac as se,Ad as Ce,B as K,Bb as R,Bd as he,Cb as v,Cd as xe,Db as le,F as U,Ga as x,J as Q,Jb as a,Kb as s,Lb as E,M as j,Na as _,O as X,P as I,Pa as ne,Pd as Ee,Qa as y,Qd as D,Ra as oe,Va as u,X as ee,Xa as z,Ya as T,Za as $,_ as te,_a as r,ab as m,cc as A,da as ie,dc as G,ea as S,eb as w,fa as P,g as N,gb as M,gd as ce,h as Z,hb as c,id as me,jd as fe,kb as B,kd as _e,l as O,m as q,n as k,od as ue,qb as b,rb as l,sb as C,sd as ye,tb as f,td as ve,ub as re,vb as ae,x as J,ya as n,yc as pe,za as g,zc as de}from"./chunk-S3H6YSFW.js";var Y="no_access",V=(()=>{class e{constructor(t){this.profileService=t,this.reset$=new N(void 0),this.rawProfile$=this.reset$.pipe(I(()=>this.loadProfile()),j(1)),this.profile$=this.rawProfile$.pipe(k(i=>i===Y?null:i)),this.noAccess$=this.rawProfile$.pipe(k(i=>i===Y)),this.loading$=this.profileService.loading$}reset(){this.reset$.next()}loadProfile(){return this.profileService.getMyProfile().pipe(K(t=>t.status===403?O(Y):q(()=>t)))}static{this.\u0275fac=function(i){return new(i||e)(te(Ae))}}static{this.\u0275prov=ee({token:e,factory:e.\u0275fac})}}return e})();function Ze(e,d){if(e&1&&(r(0,"div"),l(1),o()),e&2){c(2);let t=v(2);n(),f(" ",t.AddressLine2," ")}}function qe(e,d){if(e&1&&(r(0,"div",5),l(1),a(2,"translate"),o()),e&2){let t=d.$implicit;n(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Je(e,d){if(e&1&&(r(0,"div",13),l(1),a(2,"translate"),o()),e&2){let t=d.$implicit;n(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Ke(e,d){e&1&&(r(0,"div",18)(1,"span",19),l(2,"Loading..."),o()())}function Qe(e,d){if(e&1){let t=w();r(0,"form",2),M("ngSubmit",function(){S(t);let p=c();return P(p.onSubmit())}),r(1,"div",3)(2,"p"),l(3),a(4,"translate"),o(),r(5,"address",4)(6,"div"),l(7),o(),_(8,Ze,2,1,"div"),r(9,"div"),l(10),o()()(),T(11,qe,3,4,"div",5,z),a(13,"async"),r(14,"div",3)(15,"label",6),l(16),a(17,"translate"),o(),m(18,"input",7),o(),r(19,"div",3)(20,"label",8),l(21),a(22,"translate"),o(),m(23,"input",9),r(24,"small",10),l(25),a(26,"translate"),o()(),r(27,"div",3)(28,"label",11),l(29),a(30,"translate"),o(),m(31,"input",12),a(32,"async"),T(33,Je,3,4,"div",13,z),a(35,"async"),r(36,"small",14),l(37),a(38,"translate"),o()(),r(39,"div",15)(40,"button",16),a(41,"async"),M("click",function(){S(t);let p=c();return P(p.cancel())}),l(42),a(43,"translate"),o(),r(44,"button",17),a(45,"async"),l(46),a(47,"translate"),_(48,Ke,3,0,"div",18),a(49,"async"),o()()()}if(e&2){let t,i=c(),p=v(0),h=v(2);y("formGroup",p),n(3),C(s(4,18,"my-profile.edit.address-changes-remark")),n(4),C(h.AddressLine1),n(),u(h.AddressLine2?8:-1),n(2),re("",h.Zip||""," ",h.Location,""),n(),$(s(13,20,i.formErrors$)),n(5),f(" ",s(17,22,"my-profile.edit.fields.phone-private")," "),n(5),f(" ",s(22,24,"my-profile.edit.fields.phone-mobile")," "),n(4),C(s(26,26,"my-profile.edit.fields.phone-mobile-hint")),n(4),f(" ",s(30,28,"my-profile.edit.fields.email2")," "),n(2),oe("is-invalid",((t=(t=s(32,30,i.email2Errors$))==null?null:t.length)!==null&&t!==void 0?t:0)>0),n(2),$(s(35,32,i.email2Errors$)),n(4),C(s(38,34,"my-profile.edit.fields.email2-hint")),n(3),y("disabled",s(41,36,i.saving$)),n(2),f(" ",s(43,38,"my-profile.edit.cancel")," "),n(2),y("disabled",s(45,40,i.saving$)),n(2),f(" ",s(47,42,"my-profile.edit.save")," "),n(2),u(s(49,44,i.saving$)?48:-1)}}var Oe=(()=>{class e{constructor(t,i,p,h,H,We){this.fb=t,this.router=i,this.toastService=p,this.translate=h,this.profileService=H,this.personsService=We,this.student$=this.profileService.profile$.pipe(J(ke),k(({student:Ye})=>Ye)),this.formGroup$=this.student$.pipe(k(this.createFormGroup.bind(this)),j(1)),this.saving$=new N(!1),this.submitted$=new N(!1),this.formErrors$=W(this.formGroup$,this.submitted$),this.email2Errors$=W(this.formGroup$,this.submitted$,"email2")}cancel(){this.navigateBack()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(U(1)).subscribe(t=>{if(t.valid){let{phonePrivate:i,phoneMobile:p,email2:h}=t.value;this.save(i?.trim()||null,p?.trim()||null,h||null)}})}createFormGroup(t){return this.fb.group({phonePrivate:[t.PhonePrivate],phoneMobile:[t.PhoneMobile],email2:[t.Email2,me.email]})}save(t,i,p){this.saving$.next(!0),this.student$.pipe(U(1),I(h=>this.personsService.update(h.Id,t,i,p)),Q(()=>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"])}static{this.\u0275fac=function(i){return new(i||e)(g(Ce),g(de),g(we),g(Ee),g(V),g(Be))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-edit"]],decls:9,vars:10,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"mb-3"],[1,"text-muted"],[1,"alert","alert-danger"],["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"],[1,"invalid-feedback"],["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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(i,p){if(i&1&&(F(0),a(1,"async"),F(2),a(3,"async"),r(4,"div",0)(5,"h1"),l(6),a(7,"translate"),o(),_(8,Qe,50,46,"form",1),o()),i&2){let h=R(s(1,2,p.formGroup$));n(2);let H=R(s(3,5,p.student$));n(4),C(s(7,8,"my-profile.edit.title")),n(2),u(h&&H?8:-1)}},dependencies:[he,ue,ce,fe,_e,xe,ye,ve,A,D],encapsulation:2,changeDetection:0})}}return e})();var je=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-address"]],inputs:{address:"address"},decls:2,vars:1,template:function(i,p){i&1&&(r(0,"address"),l(1),o()),i&2&&(n(),C(p.address))},styles:["[_nghost-%COMP%]{padding:1rem}address[_ngcontent-%COMP%]{white-space:pre-wrap}"],changeDetection:0})}}return e})();var Ge=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-entry"]],inputs:{label:"label",value:"value"},decls:6,vars:4,consts:[[1,"row"],[1,"col-md-6"]],template:function(i,p){i&1&&(r(0,"dl",0)(1,"dt",1),l(2),a(3,"translate"),o(),r(4,"dd",1),l(5),o()()),i&2&&(n(2),C(s(3,2,p.label)),n(3),C(p.value))},dependencies:[D],styles:["dl[_ngcontent-%COMP%]{padding:0 1rem}dt[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0})}}return e})();function Xe(e,d){if(e&1&&(r(0,"span"),l(1),o()),e&2){let t=c(2);n(),f("(",t.student.Gender,")")}}function et(e,d){if(e&1&&(r(0,"div",0)(1,"div",2),m(2,"bkd-avatar",3),r(3,"div",4),l(4),_(5,Xe,2,1,"span"),r(6,"div",5),l(7),a(8,"date"),o()()(),m(9,"bkd-reports-link",6),a(10,"async"),o()),e&2){let t=c();n(2),y("studentId",t.student.Id),n(2),ae(" ",t.student.LastName," ",t.student.FirstName," ",t.student.MiddleName," "),n(),u(t.student.Gender?5:-1),n(2),f(" ",E(8,7,t.student.Birthdate,"dd.MM.yyyy")," "),n(2),y("reports",s(10,10,t.reports$))}}function tt(e,d){if(e&1&&(r(0,"div",1),l(1),o()),e&2){let t=c();n(),C(t.student.Email)}}var He=(()=>{class e{constructor(t){this.reportsService=t,this.studentId$=new Z(1),this.reports$=this.studentId$.pipe(I(i=>i?this.reportsService.getPersonMasterDataReports(i):O([])),X([]))}ngOnChanges(t){t.student&&this.studentId$.next(t.student.currentValue?.Id||null)}static{this.\u0275fac=function(i){return new(i||e)(g(Ne))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-header"]],inputs:{student:"student"},features:[ie],decls:2,vars:2,consts:[[1,"avatar-person"],[1,"email"],[1,"d-flex"],[1,"me-3","avatar","large",3,"studentId"],[1,"person"],[1,"birthdate"],[3,"reports"]],template:function(i,p){i&1&&_(0,et,11,12,"div",0)(1,tt,2,1,"div",1),i&2&&(u(p.student?0:-1),n(),u(p.student?1:-1))},dependencies:[Fe,Ie,A,G],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})}}return e})();var it=(e,d)=>d.apprenticeshipContract.Id,nt=(e,d)=>d.Id;function ot(e,d){e&1&&m(0,"bkd-spinner")}function rt(e,d){e&1&&(r(0,"p",7),l(1),a(2,"translate"),o()),e&2&&(n(),f(" ",s(2,1,"shared.profile.substitution-profile")," "))}function at(e,d){e&1&&(r(0,"p",8),l(1),a(2,"translate"),o()),e&2&&(n(),f(" ",s(2,1,"shared.profile.no-profile")," "))}function lt(e,d){if(e&1&&(_(0,rt,3,3,"p",7),a(1,"async"),_(2,at,3,3,"p",8)),e&2){let t=c();u(s(1,1,t.profileService.noAccess$)?0:2)}}function pt(e,d){if(e&1&&m(0,"bkd-my-profile-entry",12),e&2){c(2);let t=v(0);B("value",t.student.SocialSecurityNumber)}}function dt(e,d){if(e&1&&m(0,"bkd-my-profile-entry",13),e&2){c(2);let t=v(0);B("value",t.student.HomeTown||t.student.Nationality)}}function st(e,d){if(e&1&&m(0,"bkd-my-profile-entry",14),e&2){c(2);let t=v(0);B("value",t.student.NativeLanguage)}}function ct(e,d){if(e&1&&m(0,"bkd-my-profile-entry",15),e&2){c(2);let t=v(0);B("value",t.stayPermitValue)}}function mt(e,d){if(e&1&&(m(0,"bkd-my-profile-entry",16),a(1,"date")),e&2){c(2);let t=v(0);B("value",E(1,1,t.student.StayPermitExpiry,"mediumDate"))}}function ft(e,d){if(e&1&&(r(0,"div",24)(1,"a",25),a(2,"translate"),r(3,"i",26),l(4,"edit"),o()(),m(5,"bkd-student-dossier-address",27),o()),e&2){c(2);let t=v(0);n(),ne("aria-label",s(2,2,"my-profile.edit.title")),n(4),y("student",t.student)}}function _t(e,d){if(e&1&&m(0,"bkd-my-profile-address",28),e&2){c(3);let t=v(0);y("address",t.student.CorrespondenceAddress)}}function ut(e,d){if(e&1){let t=w();r(0,"div",18,1)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,_t,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.correspondence-address")," ")}}function yt(e,d){if(e&1&&m(0,"bkd-my-profile-address",28),e&2){c(3);let t=v(0);y("address",t.student.BillingAddress)}}function vt(e,d){if(e&1){let t=w();r(0,"div",18,2)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,yt,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.billing-address")," ")}}function Ct(e,d){if(e&1&&m(0,"bkd-student-dossier-legal-representative",29),e&2){let t=d.$implicit;y("person",t)}}function ht(e,d){if(e&1&&T(0,Ct,1,1,"bkd-student-dossier-legal-representative",29,nt),e&2){c(3);let t=v(0);$(t.legalRepresentativePersons)}}function xt(e,d){if(e&1){let t=w();r(0,"div",18,3)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,ht,2,0,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.legal-representation")," ")}}function gt(e,d){if(e&1&&l(0),e&2){let t=c().$index;f(" ",t+1," ")}}function bt(e,d){if(e&1&&m(0,"bkd-student-dossier-apprenticeship-company",30),e&2){let t=c().$implicit;y("company",t)}}function St(e,d){if(e&1){let t=w();r(0,"div",23,4)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),_(6,gt,1,1),o()(),r(7,"div",21)(8,"div",22),_(9,bt,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);c(2);let i=v(0);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,3,"shared.profile.apprenticeship-company")," "),n(2),u(i.apprenticeshipCompanies.length>1?6:-1)}}function Pt(e,d){if(e&1){let t=w();m(0,"bkd-my-profile-header",9),r(1,"div",10)(2,"div",11),_(3,pt,1,1,"bkd-my-profile-entry",12)(4,dt,1,1,"bkd-my-profile-entry",13)(5,st,1,1,"bkd-my-profile-entry",14)(6,ct,1,1,"bkd-my-profile-entry",15)(7,mt,2,4,"bkd-my-profile-entry",16),o(),r(8,"div",17)(9,"div",18,0)(11,"div",19)(12,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(10);return P(p.toggle())}),l(13),a(14,"translate"),o()(),r(15,"div",21)(16,"div",22),_(17,ft,6,4,"ng-template"),o()()(),_(18,ut,9,4,"div",18)(19,vt,9,4,"div",18)(20,xt,9,4,"div",18),T(21,St,10,5,"div",23,it),o()()}if(e&2){let t=b(10);c();let i=v(0);y("student",i.student),n(3),u(i.student.SocialSecurityNumber?3:-1),n(),u(i.student.HomeTown||i.student.Nationality?4:-1),n(),u(i.student.NativeLanguage?5:-1),n(),u(i.stayPermitValue?6:-1),n(),u(i.student.StayPermitExpiry?7:-1),n(5),y("opened",!t.collapsed),n(),f(" ",s(14,11,"shared.profile.student-address")," "),n(5),u(i.student.CorrespondenceAddress?18:-1),n(),u(i.student.BillingAddress?19:-1),n(),u(i.legalRepresentativePersons.length>0?20:-1),n(),$(i.apprenticeshipCompanies)}}var Ue=(()=>{class e{constructor(t){this.profileService=t}static{this.\u0275fac=function(i){return new(i||e)(g(V))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-show"]],decls:10,vars:9,consts:[["studentAddress","ngbAccordionItem"],["correspondenceAddress","ngbAccordionItem"],["billingAddress","ngbAccordionItem"],["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"bkd-container","bkd-container-limited"],["data-testid","profile-title"],["data-testid","profile-substitution"],["data-testid","profile-none"],[3,"student"],["data-testid","profile-content",1,"profile-content"],[1,"profile-entries","pt-3"],["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"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"ngbAccordionItem"],[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"],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(i,p){if(i&1&&(F(0),a(1,"async"),r(2,"div",5)(3,"h1",6),l(4),a(5,"translate"),o(),_(6,ot,1,0,"bkd-spinner"),a(7,"async"),_(8,lt,3,3)(9,Pt,23,13),o()),i&2){let h=R(s(1,2,p.profileService.profile$));n(4),C(s(5,5,"my-profile.title")),n(2),u(s(7,7,p.profileService.loading$)?6:h?9:8)}},dependencies:[He,Ge,Me,Pe,Se,$e,be,ge,se,De,je,Ve,Le,Te,A,G,D],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})}}return e})();var ze=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile"]],features:[le([V])],decls:1,vars:0,template:function(i,p){i&1&&m(0,"router-outlet")},dependencies:[pe],encapsulation:2,changeDetection:0})}}return e})();var yi=[{path:"",component:ze,children:[{path:"",component:Ue},{path:"edit",component:Oe}]}];export{yi as MY_PROFILE_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SKUS47ZU.js b/public/apps/webapp-schulverwaltung/chunk-SKUS47ZU.js new file mode 100644 index 00000000..b4be8ca6 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-SKUS47ZU.js @@ -0,0 +1 @@ +import{a as u}from"./chunk-H664QRX4.js";import{a as F}from"./chunk-HQSONWXM.js";import{$ as a,M as l,Mc as t,Nc as g,P as o,Pc as h,Sc as m,Uc as S,Vd as P,Wd as n,X as c,Zc as r,_c as p,dd as b,fd as E,hd as f,l as I,n as y,qc as d}from"./chunk-NEW5VGRB.js";var B=(()=>{class i{constructor(){this.http=a(d),this.settings=a(f)}getWeekdays(){return this.http.get(`${this.baseUrl}/Weekdays`).pipe(o(n(u)),l(1))}getAbsenceConfirmationStates(){return this.http.get(`${this.baseUrl}/AbsenceConfirmationStates`).pipe(o(n(u)),l(1))}getStayPermits(){return this.http.get(`${this.baseUrl}/StayPermits`).pipe(o(n(u)),l(1))}get baseUrl(){return`${this.settings.apiUrl}/DropDownItems`}static{this.\u0275fac=function(s){return new(s||i)}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var A=m({Id:g,FormOfAddress:t,Nationality:r(t),AddressLine1:r(t),AddressLine2:r(t),BillingAddress:r(t),Birthdate:r(b),CorrespondenceAddress:r(t),DisplayEmail:r(t),Email:p(t),Email2:p(t),FirstName:r(t),Gender:r(S([h("M"),h("F"),h("X")])),HomeTown:r(t),LastName:r(t),FullName:r(t),Location:r(t),MiddleName:r(t),NativeLanguage:r(t),PhoneMobile:r(t),PhonePrivate:r(t),PhoneBusiness:p(t),SocialSecurityNumber:r(t),StayPermit:r(g),StayPermitExpiry:r(b),Zip:r(t)}),N=m({Id:g,FullName:t,DisplayEmail:r(t),Email:p(t)});var Y=(()=>{class i extends F{constructor(){let e=a(d),s=a(f);super(e,s,A,"Persons"),this.personEmailCodec=m(E(this.codec.props,["Email","FormOfAddress"]))}getListForIds(e){return this.getList({params:{"filter.Id":`;${e.join(";")}`}})}getSummaries(e){return e.length===0?I([]):this.http.get(`${this.baseUrl}/`,{params:{"filter.Id":`;${e.join(";")}`,fields:["Id","FullName","DisplayEmail","Email"].join(",")}}).pipe(o(n(N)))}getMyself(e){return this.http.get(`${this.baseUrl}/me`,e).pipe(o(P(this.codec)))}getByIdWithEmailInfos(e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id=":e.toString(),fields:["FormOfAddress","Email"].join(",")}}).pipe(o(n(this.personEmailCodec)),y(s=>s[0]))}update(e,s,$,j){let U={PhonePrivate:s,PhoneMobile:$,Email2:j};return this.http.put(`${this.baseUrl}/${e}`,U).pipe(y(()=>{}))}static{this.\u0275fac=function(s){return new(s||i)}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{B as a,Y as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SL67CYEF.js b/public/apps/webapp-schulverwaltung/chunk-SL67CYEF.js new file mode 100644 index 00000000..25fdd716 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-SL67CYEF.js @@ -0,0 +1 @@ +import{c as Q}from"./chunk-HQSONWXM.js";import{m as Y,n as z,o as W,p as H,q}from"./chunk-RXRYDGZR.js";import{$a as E,H as y,Ia as M,J as w,K as D,O as k,Pa as $,Pd as P,Ra as R,S as v,Sa as u,Ta as U,X as F,Xa as f,_a as j,ab as s,bb as c,ea as T,f as h,fa as S,gb as N,h as _,ib as O,jb as a,n as m,r as C,vb as p,xa as L,xb as V,ya as i}from"./chunk-NEW5VGRB.js";var b="default",at=(()=>{class t{constructor(){this.action$=new h,this.loadingCounts$=C(this.action$.pipe(D((n,{action:e,context:r})=>{switch(e){case"increment":return n[r]=(n[r]||0)+1,n;case"decrement":return n[r]=Math.max(0,(n[r]||0)-1),n;default:return n}},{}),k({})),{connector:()=>new _(1)}),this.loading$=this.loading(),this.loadingCountsSub=this.loadingCounts$.connect()}ngOnDestroy(){this.loadingCountsSub.unsubscribe()}loading(n=b){return this.loadingCounts$.pipe(m(e=>e[n]),m(Z),y())}load(n,e=b){let r=typeof e=="string"?e:e.context||b,d=typeof e=="object"&&e.stopOnFirstValue||!1,g=this.decrementLoadingCount(r),I=!0;function B(){I&&(g(),I=!1)}return n.pipe(Q(this.incrementLoadingCount(r)),d?v(B):w(g))}incrementLoadingCount(n){return()=>this.action$.next({action:"increment",context:n})}decrementLoadingCount(n){return()=>this.action$.next({action:"decrement",context:n})}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=F({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Z(t){return(t||0)!==0}var G=(t,o)=>o.id;function J(t,o){if(t&1&&(s(0,"a",2)(1,"i",3),p(2,"description"),c()()),t&2){let n=a();U("disabled",n.disableIfUnavailable&&n.reports.length===0),u("href",n.reports.length>0&&n.reports[0].url,L)}}function K(t,o){if(t&1){let n=N();s(0,"button",7),O("click",function(){let r=T(n).$implicit,d=a(2);return S(d.openReport(r))}),p(1),c()}if(t&2){let n=o.$implicit;i(),V(" ",n.title," ")}}function tt(t,o){if(t&1&&(s(0,"div",1)(1,"a",4)(2,"i",3),p(3,"description"),c()(),s(4,"div",5),j(5,K,2,1,"button",6,G),c()()),t&2){let n=a();i(),u("id",n.dropdownId),i(3),R("aria-labelledby",n.dropdownId),i(),E(n.reports)}}var mt=(()=>{class t{constructor(){this.reports=[],this.disableIfUnavailable=!1,this.dropdownId=P("reports-link-dropdown")}openReport(n){window.open(n.url,"_blank")}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=M({type:t,selectors:[["bkd-reports-link"]],inputs:{reports:"reports",disableIfUnavailable:"disableIfUnavailable"},decls:2,vars:2,consts:[["target","_blank",1,"btn","btn-primary","btn-icon",3,"href","disabled"],["ngbDropdown","",1,"d-inline-block"],["target","_blank",1,"btn","btn-primary","btn-icon",3,"href"],[1,"material-icons"],["ngbDropdownToggle","",1,"btn","btn-primary","btn-icon","d-flex","align-items-center",3,"id"],["ngbDropdownMenu",""],["ngbDropdownItem",""],["ngbDropdownItem","",3,"click"]],template:function(e,r){e&1&&$(0,J,3,3,"a",0)(1,tt,7,2,"div",1),e&2&&(f(r.reports.length===1||r.reports.length===0&&r.disableIfUnavailable?0:-1),i(),f(r.reports.length>1?1:-1))},dependencies:[q,H,W,z,Y],styles:["a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}"]})}}return t})();var nt=Math.pow(10,8)*24*60*60*1e3,ft=-nt,bt=6048e5,xt=864e5,gt=6e4,It=36e5,ht=1e3;var et=3600;var A=et*24,_t=A*7,ot=A*365.2425,rt=ot/12,Ct=rt*3,x=Symbol.for("constructDateFrom");function l(t,o){return typeof t=="function"?t(o):t&&typeof t=="object"&&x in t?t[x](o):t instanceof Date?new t.constructor(o):new Date(o)}function vt(t,o){return l(o||t,t)}function St(t,...o){let n=l.bind(null,t||o.find(e=>typeof e=="object"));return o.map(n)}export{bt as a,xt as b,gt as c,It as d,ht as e,l as f,vt as g,St as h,at as i,mt as j}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SME4UDGV.js b/public/apps/webapp-schulverwaltung/chunk-SME4UDGV.js new file mode 100644 index 00000000..031d8107 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-SME4UDGV.js @@ -0,0 +1 @@ +import{a as Ie,b as Be,c as we,d as Ee,e as Fe}from"./chunk-GCWE54XA.js";import{p as O,w as Ve}from"./chunk-DJNW6R6G.js";import{d as De,e as Te}from"./chunk-FMUJPUYQ.js";import{c as ee}from"./chunk-JGKXAFYO.js";import{a as $e}from"./chunk-A7EOJZ46.js";import{D as ke,G as Le,H as Me,f as X}from"./chunk-KQORGECX.js";import{j as Pe}from"./chunk-SL67CYEF.js";import{h as Z}from"./chunk-HQSONWXM.js";import{c as W,d as Y,e as z,f as J,g as K}from"./chunk-RXRYDGZR.js";import{a as Se}from"./chunk-F4XODHS2.js";import{$ as f,$a as j,Bc as Ce,Cc as ve,Eb as x,Ec as xe,Fb as g,Fc as ge,Gb as v,Hb as Q,Ia as D,Ib as ie,Jb as se,L as pe,M as le,Nb as d,O as ne,Ob as m,P as B,Pa as c,Pb as be,R as q,Rd as Ae,Sa as p,Sd as M,Ta as me,X as U,Xa as b,Ya as ue,_a as N,a as E,ab as r,b as V,bb as a,cb as h,ea as A,f as H,fa as k,g as re,gb as F,gc as L,h as te,hc as he,hd as ye,ib as $,jb as l,k as ae,kb as fe,l as ce,lb as _e,n as T,o as de,ub as C,vb as u,wb as G,xb as _,ya as i}from"./chunk-NEW5VGRB.js";var P=(()=>{class e{constructor(){this.profileService=f(Ie),this.route=f(Ce),this.currentDossier$=new re("addresses"),this.studentId$=this.route.paramMap.pipe(T(t=>Number(t.get("id")))),this.profile$=this.studentId$.pipe(B(t=>this.profileService.getProfile(t)),le(1)),this.returnParams$=this.route.queryParams.pipe(T(({returnparams:t})=>t)),this.backlinkQueryParams$=this.returnParams$.pipe(T($e)),this.loading$=this.profileService.loading$}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=U({token:e,factory:e.\u0275fac})}}return e})();var oe=(()=>{class e{constructor(){this.settings=f(ye),this.lessonPresencesService=f(Te),this.presenceTypesService=f(X),this.toastService=f(Se),this.translate=f(Ae),this.studentId$=new te(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(t){this.studentId$.next(t)}getAbsences(t){return this.studentId$.pipe(B(t),ne(null),pe({connector:()=>new te(1)}))}getCounts(){return this.studentId$.pipe(B(t=>de([this.loadStatistics(t).pipe(ne(null)),this.openAbsences$.pipe(T(n=>n?.length??null)),this.checkableAbsences$.pipe(T(n=>n?.length??null))])),T(([t,n,s])=>({openAbsences:n,checkableAbsences:s,excusedAbsences:t?.TotalAbsencesValidExcuse??null,unexcusedAbsences:t?.TotalAbsencesWithoutExcuse??null,incidents:t?.TotalIncidents??null,halfDays:t?.TotalHalfDays??null})))}loadStatistics(t){return this.lessonPresencesService.getStatistics({student:t,educationalEvent:null,studyClass:null},null,0).pipe(B(({entries:n})=>n.length>0?ce(n[0]):(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),ae)))}loadOpenAbsences(t){return this.lessonPresencesService.getListOfUnconfirmed(this.getBaseParams(t))}loadCheckableAbsences(t){return this.lessonPresencesService.getList({params:V(E({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.checkableAbsenceStateId}`})})}loadExcusedAbsences(t){return this.lessonPresencesService.getList({params:V(E({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.excusedAbsenceStateId}`})})}loadUnexcusedAbsences(t){return this.lessonPresencesService.getList({params:V(E({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.unexcusedAbsenceStateId}`})})}loadIncidents(t){return this.presenceTypesService.incidentTypes$.pipe(T(n=>V(E({},this.getBaseParams(t)),{"filter.TypeRef":`;${n.map(s=>s.Id).join(";")}`})),B(n=>this.lessonPresencesService.getList({params:n})))}loadHalfDays(t){return this.lessonPresencesService.getList({params:V(E({},this.getBaseParams(t)),{"filter.TypeRef":`=${this.settings.halfDayPresenceTypeId}`})})}getBaseParams(t){return{sort:"LessonDateTimeFrom.asc","filter.StudentRef":`=${t}`}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=U({token:e,factory:e.\u0275fac})}}return e})();function Ue(e,o){if(e&1&&u(0),e&2){l();let t=v(0);_(" (",t==null?null:t.checkableAbsences,") ")}}function Qe(e,o){if(e&1&&h(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.checkableAbsences$)}}function We(e,o){if(e&1&&u(0),e&2){l();let t=v(0);_(" (",t==null?null:t.openAbsences,") ")}}function Ye(e,o){if(e&1&&h(0,"bkd-student-dossier-absences",14),e&2){let t=l();p("absences$",t.absencesService.openAbsences$)("selectionService",t.absencesSelectionService)}}function ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);_(" (",t==null?null:t.excusedAbsences,") ")}}function Je(e,o){if(e&1&&h(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.excusedAbsences$)}}function Ke(e,o){if(e&1&&u(0),e&2){l();let t=v(0);_(" (",t==null?null:t.unexcusedAbsences,") ")}}function Xe(e,o){if(e&1&&h(0,"bkd-student-dossier-absences",15),e&2){let t=l();p("absences$",t.absencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function Ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);_(" (",t==null?null:t.incidents,") ")}}function et(e,o){if(e&1&&h(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.incidents$)}}function tt(e,o){if(e&1&&u(0),e&2){l(2);let t=v(0);_(" (",t==null?null:t.halfDays,") ")}}function nt(e,o){if(e&1&&h(0,"bkd-student-dossier-absences",15),e&2){let t=l(2);p("absences$",t.absencesService.halfDays$)("displayPresenceType",!1)}}function it(e,o){if(e&1){let t=F();r(0,"div",12,5)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),$("click",function(){A(t);let s=C(1);return k(s.toggle())}),u(4),d(5,"translate"),c(6,tt,1,1),a()(),r(7,"div",10)(8,"div",11),c(9,nt,1,2,"ng-template"),a()()()}if(e&2){let t=C(1);l();let n=v(0);i(3),p("opened",!t.collapsed),i(),_(" ",m(5,3,"shared.profile.half-days")," "),i(2),b((n==null?null:n.halfDays)!==null?6:-1)}}var Re=(()=>{class e{constructor(){this.state=f(P),this.presenceTypesService=f(X),this.absencesService=f(oe),this.absencesSelectionService=f(ke),this.halfDayActive$=this.presenceTypesService.halfDayActive$,this.destroy$=new H,this.state.currentDossier$.next("absences")}ngOnInit(){this.state.studentId$.pipe(q(this.destroy$)).subscribe(t=>this.absencesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["bkd-dossier-absences"]],features:[Q([oe])],decls:55,vars:31,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["halfDays","ngbAccordionItem"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","","id","half-days"],[3,"absences$"],[3,"absences$","selectionService"],[3,"absences$","displayPresenceType"]],template:function(n,s){if(n&1){let I=F();x(0),d(1,"async"),r(2,"div",6)(3,"div",7,0)(5,"div",8)(6,"bkd-student-dossier-entry-header",9),$("click",function(){A(I);let y=C(4);return k(y.toggle())}),u(7),d(8,"translate"),c(9,Ue,1,1),a()(),r(10,"div",10)(11,"div",11),c(12,Qe,1,1,"ng-template"),a()()(),r(13,"div",7,1)(15,"div",8)(16,"bkd-student-dossier-entry-header",9),$("click",function(){A(I);let y=C(14);return k(y.toggle())}),u(17),d(18,"translate"),c(19,We,1,1),a()(),r(20,"div",10)(21,"div",11),c(22,Ye,1,2,"ng-template"),a()()(),r(23,"div",7,2)(25,"div",8)(26,"bkd-student-dossier-entry-header",9),$("click",function(){A(I);let y=C(24);return k(y.toggle())}),u(27),d(28,"translate"),c(29,ze,1,1),a()(),r(30,"div",10)(31,"div",11),c(32,Je,1,1,"ng-template"),a()()(),r(33,"div",7,3)(35,"div",8)(36,"bkd-student-dossier-entry-header",9),$("click",function(){A(I);let y=C(34);return k(y.toggle())}),u(37),d(38,"translate"),c(39,Ke,1,1),a()(),r(40,"div",10)(41,"div",11),c(42,Xe,1,2,"ng-template"),a()()(),r(43,"div",7,4)(45,"div",8)(46,"bkd-student-dossier-entry-header",9),$("click",function(){A(I);let y=C(44);return k(y.toggle())}),u(47),d(48,"translate"),c(49,Ze,1,1),a()(),r(50,"div",10)(51,"div",11),c(52,et,1,1,"ng-template"),a()()(),c(53,it,10,5,"div",12),d(54,"async"),a()}if(n&2){let I=C(4),w=C(14),y=C(24),He=C(34),qe=C(44),S=g(m(1,16,s.absencesService.counts$));i(6),p("opened",!I.collapsed),i(),_(" ",m(8,19,"shared.profile.checkable-absences")," "),i(2),b((S==null?null:S.checkableAbsences)!==null?9:-1),i(7),p("opened",!w.collapsed),i(),_(" ",m(18,21,"shared.profile.open-absences")," "),i(2),b((S==null?null:S.openAbsences)!==null?19:-1),i(7),p("opened",!y.collapsed),i(),_(" ",m(28,23,"shared.profile.excused-absences")," "),i(2),b((S==null?null:S.excusedAbsences)!==null?29:-1),i(7),p("opened",!He.collapsed),i(),_(" ",m(38,25,"shared.profile.unexcused-absences")," "),i(2),b((S==null?null:S.unexcusedAbsences)!==null?39:-1),i(7),p("opened",!qe.collapsed),i(),_(" ",m(48,27,"shared.profile.incidents")," "),i(2),b((S==null?null:S.incidents)!==null?49:-1),i(4),b(m(54,29,s.halfDayActive$)?53:-1)}},dependencies:[K,J,z,ee,Y,W,Le,L,M],encapsulation:2,changeDetection:0})}}return e})();var st=(e,o)=>o.apprenticeshipContract.Id,ot=(e,o)=>o.Id;function rt(e,o){if(e&1&&h(0,"bkd-student-dossier-legal-representative",9),e&2){let t=o.$implicit;p("person",t)}}function at(e,o){if(e&1&&N(0,rt,1,1,"bkd-student-dossier-legal-representative",9,ot),e&2){l(3);let t=v(0);j(t.legalRepresentativePersons)}}function ct(e,o){if(e&1){let t=F();r(0,"div",4,0)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){A(t);let s=C(1);return k(s.toggle())}),u(4),d(5,"translate"),a()(),r(6,"div",7)(7,"div",8),c(8,at,2,0,"ng-template"),a()()()}if(e&2){let t=C(1);i(3),p("opened",!t.collapsed),i(),_(" ",m(5,2,"shared.profile.legal-representation")," ")}}function dt(e,o){if(e&1&&u(0),e&2){let t=l().$index;_(" ",t+1," ")}}function pt(e,o){if(e&1&&h(0,"bkd-student-dossier-apprenticeship-company",10),e&2){let t=l().$implicit;p("company",t)}}function lt(e,o){if(e&1){let t=F();r(0,"div",4,1)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){A(t);let s=C(1);return k(s.toggle())}),u(4),d(5,"translate"),c(6,dt,1,1),a()(),r(7,"div",7)(8,"div",8),c(9,pt,1,1,"ng-template"),a()()()}if(e&2){let t=C(1);l(2);let n=v(0);i(3),p("opened",!t.collapsed),i(),_(" ",m(5,3,"shared.profile.apprenticeship-company")," "),i(2),b(n.apprenticeshipCompanies.length>1?6:-1)}}function mt(e,o){if(e&1&&(h(0,"bkd-student-dossier-address",2),r(1,"div",3),c(2,ct,9,4,"div",4),N(3,lt,10,5,"div",4,st),a()),e&2){l();let t=v(0);p("student",t.student),i(2),b(t.legalRepresentativePersons.length>0?2:-1),i(),j(t.apprenticeshipCompanies)}}var Ne=(()=>{class e{constructor(){this.state=f(P),this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["bkd-dossier-addresses"]],decls:3,vars:4,consts:[["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"profile-entry",3,"student"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(n,s){if(n&1&&(x(0),d(1,"async"),c(2,mt,5,2)),n&2){let I=g(m(1,1,s.state.profile$));i(2),b(I?2:-1)}},dependencies:[Be,K,J,z,ee,Y,W,Ee,we,L,M],styles:[".profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}"],changeDetection:0})}}return e})();function ut(e,o){e&1&&h(0,"bkd-spinner")}function ft(e,o){if(e&1&&h(0,"bkd-dossier-grades-view",0),e&2){l();let t=v(0),n=v(2),s=v(4);p("courses",t)("studentId",n)("gradingScales",s)}}var je=(()=>{class e{constructor(){this.state=f(P),this.dossierGradesService=f(O),this.destroy$=new H}ngOnInit(){this.state.currentDossier$.next("grades"),this.state.studentId$.pipe(q(this.destroy$)).subscribe(t=>this.dossierGradesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["bkd-dossier-grades"]],decls:9,vars:12,consts:[[3,"courses","studentId","gradingScales"]],template:function(n,s){n&1&&(x(0),d(1,"async"),x(2),d(3,"async"),x(4),d(5,"async"),c(6,ut,1,0,"bkd-spinner"),d(7,"async"),c(8,ft,1,3,"bkd-dossier-grades-view",0)),n&2&&(g(m(1,1,s.dossierGradesService.studentCourses$)),i(2),g(m(3,4,s.state.studentId$)),i(2),g(m(5,7,s.dossierGradesService.gradingScales$)),i(2),b(m(7,10,s.dossierGradesService.loading$)?6:8))},dependencies:[Ve,Z,L],encapsulation:2})}}return e})();var _t=["*"];function bt(e,o){if(e&1&&(r(0,"div",5)(1,"span",6),u(2),d(3,"date"),a(),r(4,"span",7),u(5),a()()),e&2){let t=l();i(2),G(be(3,2,t.student.Birthdate,"dd.MM.yyyy")),i(3),_("(",t.student.Gender,")")}}var Ge=(()=>{class e{constructor(){this.link="/"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["bkd-student-backlink"]],inputs:{link:"link",queryParams:"queryParams",studentId:"studentId",studentName:"studentName",student:"student"},ngContentSelectors:_t,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"],[1,"additional-info"],[1,"birthday"],[1,"gender"]],template:function(n,s){n&1&&(fe(),r(0,"div",0)(1,"bkd-backlink",1),_e(2),a(),r(3,"div",2),h(4,"bkd-avatar",3),r(5,"div",4)(6,"h1"),u(7),a(),c(8,bt,6,5,"div",5),a()()()),n&2&&(i(),p("link",s.link)("params",s.queryParams),i(3),p("studentId",s.studentId),i(3),G(s.student?s.student.FullName:s.studentName),i(),b(s.student?8:-1))},dependencies:[Me,Fe,he],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})}}return e})();var ht=()=>["addresses","absences","grades"],Ct=()=>[],vt=e=>({returnparams:e}),xt=e=>[e];function gt(e,o){e&1&&h(0,"bkd-spinner")}function yt(e,o){if(e&1&&h(0,"bkd-reports-link",3),e&2){let t;l(2);let n=v(4);p("reports",(t=n)!==null&&t!==void 0?t:ie(1,Ct))}}function St(e,o){if(e&1&&(r(0,"a",5),d(1,"async"),r(2,"button",6,0),u(4),d(5,"translate"),a()()),e&2){let t=o.$implicit,n=C(3),s=l(2);p("queryParams",se(9,vt,m(1,5,s.state.returnParams$)))("routerLink",se(11,xt,t)),i(2),me("btn-outline-secondary",!n.isActive),i(2),_(" ",m(5,7,"dossier."+t)," ")}}function At(e,o){e&1&&(r(0,"div"),h(1,"router-outlet"),a())}function kt(e,o){e&1&&(r(0,"p"),u(1),d(2,"translate"),a()),e&2&&(i(),G(m(2,1,"shared.profile.no-profile")))}function Dt(e,o){if(e&1&&(r(0,"bkd-student-backlink",2),d(1,"async"),d(2,"async"),c(3,yt,1,2,"bkd-reports-link",3),a(),r(4,"div",4),N(5,St,6,13,"a",5,ue),a(),c(7,At,2,0,"div")(8,kt,3,3,"p")),e&2){let t=l(),n=v(0),s=v(2);p("link","../..")("queryParams",m(1,6,t.state.backlinkQueryParams$))("studentId",m(2,8,t.state.studentId$))("student",n&&n.student),i(3),b(s==="grades"?3:-1),i(2),j(ie(10,ht)),i(2),b(n?7:8)}}var Oe=(()=>{class e{constructor(){this.state=f(P),this.dossierGradesService=f(O),this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["bkd-student-dossier"]],features:[Q([P,O])],decls:10,vars:12,consts:[["rla","routerLinkActive"],[1,"bkd-container","bkd-container-limited"],[1,"mb-2",3,"link","queryParams","studentId","student"],[1,"ms-2",3,"reports"],[1,"d-flex","flex-row","py-3","flex-wrap"],[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(n,s){n&1&&(x(0),d(1,"async"),x(2),d(3,"async"),x(4),d(5,"async"),r(6,"div",1),c(7,gt,1,0,"bkd-spinner"),d(8,"async"),c(9,Dt,9,11),a()),n&2&&(g(m(1,1,s.state.profile$)),i(2),g(m(3,4,s.state.currentDossier$)),i(2),g(m(5,7,s.dossierGradesService.testReports$)),i(3),b(m(8,10,s.state.loading$)?7:9))},dependencies:[Ge,Pe,xe,ge,ve,Z,L,M],encapsulation:2,changeDetection:0})}}return e})();var Jn={path:"student/:id",children:[{path:"",component:Oe,children:[{path:"addresses",component:Ne},{path:"absences",component:Re},{path:"grades",component:je}]},{path:"absences/confirm",component:De}]};export{Jn as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-T2Q3L4WP.js b/public/apps/webapp-schulverwaltung/chunk-T2Q3L4WP.js deleted file mode 100644 index ece2c5cb..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-T2Q3L4WP.js +++ /dev/null @@ -1,2 +0,0 @@ -import{a as We,b as Ye}from"./chunk-IYHUHAMR.js";import{b as ie}from"./chunk-37I3VMAS.js";import"./chunk-QE74EW6O.js";import"./chunk-NK7SMC5C.js";import{a as Ze}from"./chunk-PU3XKQPJ.js";import"./chunk-TO3HOIOR.js";import{a as Ke}from"./chunk-DQSLVCJO.js";import"./chunk-AXC265QM.js";import{p as Ge}from"./chunk-LY5STZD6.js";import"./chunk-RC3KCROY.js";import{e as ee}from"./chunk-TMXWSOGF.js";import{b as He}from"./chunk-UPTESATB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import"./chunk-KV3V2W4Q.js";import"./chunk-3PSL2UAK.js";import{d as Ue,f as F,g as qe}from"./chunk-LZEJSWWW.js";import"./chunk-UN6AN2DI.js";import{d as ze}from"./chunk-CXJU4L5R.js";import"./chunk-M5HHSMYB.js";import{b as Be,c as Fe,y as Ne}from"./chunk-W6XALPR5.js";import"./chunk-XBIMNMBY.js";import{e as de,o as je}from"./chunk-A7CCEKNQ.js";import{j as Ve}from"./chunk-2AZMKO7X.js";import{a as X,b as te}from"./chunk-HLAFRD2O.js";import{x as we}from"./chunk-QTBTUQ3W.js";import"./chunk-HVJBOTRL.js";import{$a as c,Ab as E,Ac as J,Bb as U,Cb as H,Db as Te,Eb as w,Ga as S,Ic as Ie,Ja as fe,Jb as a,Jc as Ee,Jd as Re,Kb as r,Kd as Ae,Lb as R,M as y,Na as p,Nb as Pe,Nd as Oe,O as be,Oc as Q,P as D,Pa as oe,Qa as _,Qd as M,Ra as _e,Sd as Le,Va as m,X as B,Ya as Ce,Za as ge,_ as x,_a as d,a as V,ab as C,b as q,bc as De,cc as O,d as pe,db as ae,dc as Y,dd as L,ea as K,eb as ve,fa as W,g as me,ga as ue,gb as j,h as he,hb as f,ib as ye,ic as ce,jb as Se,l as A,mc as Z,n as u,o as G,qb as re,rb as l,rc as $e,sb as P,tb as T,ub as se,vb as xe,xa as z,ya as n,yc as ke,za as v,zc as Me}from"./chunk-S3H6YSFW.js";var ut=["*"];function ft(e,s){e&1&&ae(0)}function _t(e,s){if(e&1&&(d(0,"a",1),p(1,ft,1,0,"ng-container",3),c()),e&2){let t=f(),i=re(3);_("routerLink",t.link)("queryParams",t.linkParams),n(),_("ngTemplateOutlet",i)}}function Ct(e,s){e&1&&ae(0)}function gt(e,s){if(e&1&&(d(0,"a",2),p(1,Ct,1,0,"ng-container",3),c()),e&2){let t=f(),i=re(3);_("href",t.externalLink,z),n(),_("ngTemplateOutlet",i)}}function vt(e,s){if(e&1&&(d(0,"span",5),l(1),c()),e&2){let t=f(2);n(),P(t.count)}}function yt(e,s){e&1&&(ue(),d(0,"svg",6),C(1,"path",7),c())}function St(e,s){if(e&1&&(d(0,"span",4),l(1),a(2,"translate"),c(),d(3,"div"),Se(4),p(5,vt,2,1,"span",5)(6,yt,2,0,":svg:svg",6),c()),e&2){let t=f();n(),P(r(2,2,t.label)),n(4),m(t.hasCount(t.count)?5:6)}}var Je=(()=>{class e{constructor(){}hasCount(t){return typeof t=="number"&&t>=0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-action"]],inputs:{label:"label",count:"count",link:"link",linkParams:"linkParams",externalLink:"externalLink"},ngContentSelectors:ut,decls:4,vars:2,consts:[["actionContent",""],[3,"routerLink","queryParams"],[3,"href"],[4,"ngTemplateOutlet"],[1,"label"],[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(i,o){i&1&&(ye(),p(0,_t,2,3,"a",1)(1,gt,2,2,"a",2)(2,St,7,4,"ng-template",null,0,Pe)),i&2&&(m(o.externalLink?-1:0),n(),m(o.externalLink?1:-1))},dependencies:[J,De,M],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}"]})}}return e})();var Qe=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-deadline"]],inputs:{count:"count"},decls:3,vars:8,template:function(i,o){i&1&&(l(0),a(1,"translate"),a(2,"addSpace")),i&2&&xe("",r(1,3,"dashboard.actions.deadline"),"",R(2,5,": ",":"),"",o.count,` -`)},dependencies:[M,qe],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}"]})}}return e})();var Xe=Q({Id:Ee,Holder:Ie});var et=(()=>{class e extends X{constructor(t,i){super(t,i,Xe,"TeacherSubstitutions")}getTeacherSubstitution(t){return this.getList({params:{"filter.Id":`=${t}`}}).pipe(u(i=>i[0]||null))}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(L))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var kt=["LessonTeacherRole","ClassTeacherRole","TeacherRole","AbsenceAdministratorRole"],Mt=["LessonTeacherRole","TeacherRole","StudentRole","SubstituteAdministratorRole"],It=["LessonTeacherRole","StudentRole"],I=(()=>{class e{constructor(t,i,o,h,b,$,N,bt){this.settingsService=t,this.lessonPresencesService=i,this.studentsService=o,this.courseService=h,this.teacherSubstitutionService=b,this.personService=$,this.storageService=N,this.settings=bt,this.rolesAndPermissions$=this.settingsService.getRolesAndPermissions(),this.userId$=new he(1),this.lessonAbsences$=this.userId$.pipe(D(g=>this.studentsService.getLessonAbsences(g)),y(1)),this.lessonIncidents$=this.userId$.pipe(D(g=>this.studentsService.getLessonIncidents(g)),y(1)),this.loading$=this.rolesAndPermissions$.pipe(u(g=>g==null)),this.hasSearch$=this.rolesAndPermissions$.pipe(u(this.hasRoles(kt))),this.hasActions$=this.rolesAndPermissions$.pipe(u(this.hasRoles(Mt))),this.hasTimetable$=this.rolesAndPermissions$.pipe(u(this.hasRoles(It))),this.hasLessonTeacherRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["LessonTeacherRole"])),y(1)),this.hasTeacherRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["TeacherRole"])),y(1)),this.hasStudentRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["StudentRole"])),y(1)),this.hasSubstituteAdministratorRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["SubstituteAdministratorRole"])),y(1)),this.editAbsencesCount$=this.hasLessonTeacherRole$.pipe(D(g=>g?this.lessonPresencesService.checkableAbsencesCount():A(!1)),y(1)),this.openAbsencesCount$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["LessonTeacherRole","ClassTeacherRole"])),D(g=>g?this.lessonPresencesService.getListOfUnconfirmed():A([])),u(g=>g.length),y(1)),this.myAbsencesCount$=this.hasStudentRole$.pipe(D(g=>g?this.getMyAbsences():A([])),u(this.getMyAbsencesCount.bind(this)),y(1)),this.coursesToRateCount$=this.courseService.getNumberOfCoursesForRating().pipe(be(0),y(1)),this.hasPresenceControl$=this.hasLessonTeacherRole$.pipe(D(g=>g?this.lessonPresencesService.hasLessonsLessonTeacher():A(!1)),y(1)),this.hasOpenAbsences$=this.openAbsencesCount$.pipe(u(g=>g>0),y(1)),this.editAbsencesParams$=this.getFullName().pipe(u(g=>({confirmationStates:this.settings.checkableAbsenceStateId,teacher:g})),y(1));let le=this.storageService.getPayload()?.id_person;le&&this.userId$.next(Number(le))}hasRoles(t){return i=>(i??[]).some(o=>t.includes(o))}getMyAbsences(){return G([this.userId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(D(([t,i,o])=>this.loadTimetableEntries(t,i,o).pipe(u(h=>[...i,...o].map(b=>this.withTimetableEntry(b,h)).filter(we)))))}getMyAbsencesCount(t){return t?.filter(i=>("ConfirmationStateId"in i?i.ConfirmationStateId:null)===this.settings.unconfirmedAbsenceStateId).length||0}getFullName(){let t=Number(this.storageService.getPayload()?.substitution_id)||null;return t?this.teacherSubstitutionService.getTeacherSubstitution(t).pipe(u(i=>i?.Holder)):this.personService.getMyself().pipe(u(i=>i.FullName))}withTimetableEntry(t,i){return i.find(o=>o.Id===t.LessonRef.Id)?t:null}loadTimetableEntries(t,i,o){return this.studentsService.getTimetableEntries(t,{"filter.Id":`;${[...i,...o].map(h=>h.LessonRef.Id).join(";")}`})}static{this.\u0275fac=function(i){return new(i||e)(x(ie),x(ee),x(F),x(Ge),x(et),x(He),x(Le),x(L))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac})}}return e})();var Et=()=>["/presence-control"],Rt=()=>["/edit-absences"],At=()=>["/open-absences"],Ot=()=>["/events"],Lt=()=>["/my-absences","report"],wt=()=>["/my-absences"];function Bt(e,s){e&1&&C(0,"bkd-dashboard-action",0),e&2&&_("label","dashboard.actions.presence-control")("link",w(2,Et))}function jt(e,s){if(e&1&&(C(0,"bkd-dashboard-action",1),a(1,"async"),a(2,"async")),e&2){let t=f();_("label","dashboard.actions.edit-absences")("link",w(8,Rt))("linkParams",r(1,4,t.dashboardService.editAbsencesParams$))("count",r(2,6,t.dashboardService.editAbsencesCount$))}}function Ft(e,s){if(e&1&&(C(0,"bkd-dashboard-action",2),a(1,"async")),e&2){let t=f();_("label","dashboard.actions.open-absences")("link",w(5,At))("count",r(1,3,t.dashboardService.openAbsencesCount$))}}function Nt(e,s){if(e&1&&(C(0,"bkd-dashboard-deadline",4),a(1,"async")),e&2){let t=f(2);_("count",r(1,1,t.dashboardService.coursesToRateCount$))}}function zt(e,s){if(e&1&&(d(0,"bkd-dashboard-action",0),p(1,Nt,2,3,"bkd-dashboard-deadline",4),a(2,"async"),c()),e&2){let t,i=f();_("label","dashboard.actions.tests")("link",w(5,Ot)),n(),m((t=r(2,3,i.dashboardService.coursesToRateCount$))!==null&&t!==void 0&&t?1:-1)}}function Ut(e,s){e&1&&C(0,"bkd-dashboard-action",0),e&2&&_("label","dashboard.actions.my-absences-report")("link",w(2,Lt))}function Ht(e,s){if(e&1&&(C(0,"bkd-dashboard-action",2),a(1,"async")),e&2){let t=f();_("label","dashboard.actions.my-absences")("link",w(5,wt))("count",r(1,3,t.dashboardService.myAbsencesCount$))}}function Vt(e,s){if(e&1&&C(0,"bkd-dashboard-action",3),e&2){let t=f();_("label","dashboard.actions.substitutions")("externalLink",t.substitutionsAdminLink)}}var it=(()=>{class e{constructor(t,i){this.dashboardService=t,this.settings=i}get substitutionsAdminLink(){return this.settings.dashboard.substitutionsAdminLink}static{this.\u0275fac=function(i){return new(i||e)(v(I),v(L))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-actions"]],decls:15,vars:23,consts:[[3,"label","link"],[3,"label","link","linkParams","count"],[3,"label","link","count"],[3,"label","externalLink"],[3,"count"]],template:function(i,o){i&1&&(p(0,Bt,1,3,"bkd-dashboard-action",0),a(1,"async"),p(2,jt,3,9,"bkd-dashboard-action",1),a(3,"async"),a(4,"async"),p(5,Ft,2,6,"bkd-dashboard-action",2),a(6,"async"),p(7,zt,3,6,"bkd-dashboard-action",0),a(8,"async"),p(9,Ut,1,3,"bkd-dashboard-action",0),a(10,"async"),p(11,Ht,2,6,"bkd-dashboard-action",2),a(12,"async"),p(13,Vt,1,2,"bkd-dashboard-action",3),a(14,"async")),i&2&&(m(r(1,7,o.dashboardService.hasPresenceControl$)?0:-1),n(2),m(r(3,9,o.dashboardService.hasLessonTeacherRole$)&&r(4,11,o.dashboardService.editAbsencesParams$)?2:-1),n(3),m(r(6,13,o.dashboardService.hasOpenAbsences$)?5:-1),n(2),m(r(8,15,o.dashboardService.hasTeacherRole$)?7:-1),n(2),m(r(10,17,o.dashboardService.hasStudentRole$)?9:-1),n(2),m(r(12,19,o.dashboardService.hasStudentRole$)?11:-1),n(2),m(r(14,21,o.dashboardService.hasSubstituteAdministratorRole$)?13:-1))},dependencies:[Je,Qe,O],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}"]})}}return e})();var nt=(()=>{class e{constructor(t,i){this.studentsRestService=t,this.router=i}navigateToDossier(t){return pe(this,null,function*(){let i=Number(t);yield this.router.navigate(["dashboard","student",i,"addresses"])})}static{this.\u0275fac=function(i){return new(i||e)(v(F),v(Me))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-search"]],decls:1,vars:2,consts:[[3,"valueChange","typeaheadService","placeholder"]],template:function(i,o){i&1&&(d(0,"bkd-typeahead",0),j("valueChange",function(b){return b&&o.navigateToDossier(b)}),c()),i&2&&_("typeaheadService",o.studentsRestService)("placeholder","dashboard.search.placeholder")},dependencies:[Ze],styles:["[_nghost-%COMP%]{display:block;padding:.75rem;background:#f7e9d2}"]})}}return e})();var ot=(()=>{class e{constructor(t){this.sanitizer=t}transform(t,i){switch(i){case"html":return this.sanitizer.bypassSecurityTrustHtml(t);case"style":return this.sanitizer.bypassSecurityTrustStyle(t);case"script":return this.sanitizer.bypassSecurityTrustScript(t);case"url":return this.sanitizer.bypassSecurityTrustUrl(t);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(t);default:throw new Error(`Invalid safe type specified: ${i}`)}}static{this.\u0275fac=function(i){return new(i||e)(v($e,16))}}static{this.\u0275pipe=fe({name:"safe",type:e,pure:!0})}}return e})();function at(e){return{id:ct(e.EventId,e.Id),from:e.From,until:e.To,eventId:e.EventId,subject:e.EventDesignation,room:e.EventLocation||void 0,teacher:e.EventManagerInformation||void 0}}function rt(e){let s=e.reduce((t,i)=>{let o=ct(i.EventRef.Id,i.LessonRef.Id);return q(V({},t),{[o]:[...t[o]??[],i.StudyClassNumber]})},{});return Object.keys(s).reduce((t,i)=>q(V({},t),{[i]:Re([...s[i]].sort())}),{})}function st(e,s){return e.map(t=>q(V({},t),{studyClass:s[t.id]?.join(", ")}))}function ct(e,s){return`${e}-${s}`}var qt=(e,s)=>s.id;function Gt(e,s){e&1&&(d(0,"th"),l(1),a(2,"translate"),c()),e&2&&(n(),T(" ",r(2,1,"dashboard.timetable.table.teacher")," "))}function Kt(e,s){if(e&1&&(E(0),d(1,"a",3),l(2),d(3,"span",8),l(4),c()()),e&2){let t=f().$implicit,i=f(2).buildLink(t.eventId);n(),_("routerLink",i.link)("queryParams",i.params),n(),T(" ",t.subject,""),n(2),T(", ",t.studyClass,"")}}function Wt(e,s){if(e&1&&l(0),e&2){let t=f().$implicit;T(" ",t.subject," ")}}function Yt(e,s){if(e&1&&(d(0,"td",4),l(1),a(2,"translate"),c()),e&2){let t=f().$implicit;n(),se(" ",r(2,2,"dashboard.timetable.table.study-class"),": ",t.studyClass," ")}}function Zt(e,s){if(e&1&&(d(0,"td",5),l(1),c()),e&2){let t=f().$implicit;n(),T(" ",t.teacher," ")}}function Jt(e,s){e&1&&(d(0,"span",7),l(1),a(2,"translate"),c()),e&2&&(n(),P(r(2,1,"dashboard.timetable.table.room")))}function Qt(e,s){if(e&1&&(d(0,"tr")(1,"td",1),l(2),a(3,"date"),a(4,"date"),c(),d(5,"td",2),p(6,Kt,5,4,"a",3),a(7,"async"),p(8,Wt,1,1),c(),p(9,Yt,3,4,"td",4),a(10,"async"),p(11,Zt,2,1,"td",5),a(12,"async"),d(13,"td",6),p(14,Jt,3,3,"span",7),l(15),c()()),e&2){let t=s.$implicit,i=f(2);n(2),se(" ",R(3,7,t.from,"HH:mm"),"\u2013",R(4,10,t.until,"HH:mm")," "),n(4),m(r(7,13,i.isTeacher$)?6:8),n(3),m(r(10,15,i.isTeacher$)?9:-1),n(2),m(r(12,17,i.isStudent$)?11:-1),n(3),m(t.room?14:-1),n(),T(" ",t.room," ")}}function Xt(e,s){if(e&1&&(d(0,"table",0)(1,"thead")(2,"tr")(3,"th"),l(4),a(5,"translate"),c(),d(6,"th"),l(7),a(8,"translate"),c(),p(9,Gt,3,3,"th"),a(10,"async"),d(11,"th"),l(12),a(13,"translate"),c()()(),d(14,"tbody"),Ce(15,Qt,16,19,"tr",null,qt),c()()),e&2){let t=f();n(4),P(r(5,4,"dashboard.timetable.table.time")),n(3),P(r(8,6,"dashboard.timetable.table.subject")),n(2),m(r(10,8,t.isStudent$)?9:-1),n(3),T(" ",r(13,10,"dashboard.timetable.table.room")," "),n(3),ge(t.entries)}}function ei(e,s){e&1&&(d(0,"p"),l(1),a(2,"translate"),c()),e&2&&(n(),P(r(2,1,"dashboard.timetable.no-entries")))}var dt=(()=>{class e{constructor(t){this.dashboardService=t,this.entries=[],this.isStudent$=this.dashboardService.hasStudentRole$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$}buildLink(t){return ze(We(t,"/dashboard"))}static{this.\u0275fac=function(i){return new(i||e)(v(I))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-timetable-table"]],inputs:{entries:"entries"},decls:2,vars:1,consts:[[1,"table"],[1,"time"],[1,"subject"],[3,"routerLink","queryParams"],[1,"study-class"],[1,"teacher"],[1,"room"],[1,"room-label"],[1,"subject-study-class"]],template:function(i,o){i&1&&p(0,Xt,17,12,"table",0)(1,ei,3,3,"p"),i&2&&m(o.entries.length>0?0:1)},dependencies:[O,Y,M,J],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}}']})}}return e})();var ti=Q({}),lt=(()=>{class e extends X{constructor(t,i){super(t,i,ti,"Teachers")}getTimetableEntries(t,i={}){let o=i instanceof ce?i:new ce({fromObject:i});return o=o.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation"),this.http.get(`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:o}).pipe(D(Oe(Ue)))}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(L))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ni(e,s){e&1&&(d(0,"a",6),a(1,"safe"),l(2),a(3,"translate"),c()),e&2&&(_("href",R(1,2,s,"url"),z),n(2),T(" ",r(3,5,"dashboard.timetable.subscribe-calendar")," "))}function oi(e,s){e&1&&C(0,"bkd-spinner")}function ai(e,s){e&1&&(d(0,"a",8),a(1,"safe"),l(2),a(3,"translate"),c()),e&2&&(_("href",R(1,2,s,"url"),z),n(2),T(" ",r(3,5,"dashboard.timetable.subscribe-calendar")," "))}function ri(e,s){if(e&1&&(C(0,"bkd-dashboard-timetable-table",7),p(1,ai,4,7,"a",8),a(2,"async")),e&2){let t,i=f(),o=H(18);_("entries",o),n(),m((t=r(2,2,i.getSubscribeCalendarUrl()))?1:-1,t)}}var si="cal",pt=(()=>{class e{constructor(t,i,o,h,b,$){this.teachersService=t,this.studentsService=i,this.lessonPresencesService=o,this.userSettings=h,this.dashboardService=b,this.loadingService=$,this.userId$=this.dashboardService.userId$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$,this.isStudent$=this.dashboardService.hasStudentRole$,this.date$=new me(de(new Date)),this.loading$=this.loadingService.loading$,this.timetableEntries$=this.loadTimetableEntries()}gotoToday(){this.date$.next(de(new Date))}gotoPreviousDay(){this.date$.next(Fe(this.date$.getValue(),1))}gotoNextDay(){this.date$.next(Be(this.date$.getValue(),1))}getSubscribeCalendarUrl(){return this.userSettings.getSetting(si)}loadTimetableEntries(){return G([this.isTeacher$,this.isStudent$,this.userId$,this.date$]).pipe(D(([t,i,o,h])=>{let b=()=>t?this.fetchTimetableEntries("teacher",o,h):i?this.fetchTimetableEntries("student",o,h):A([]);return this.loadingService.load(b())}),y(1))}fetchTimetableEntries(t,i,o){let h={"filter.From":`=${je(o,"yyyy-MM-dd")}`,sort:"From,To"};return(t==="teacher"?this.teachersService.getTimetableEntries(i,h):this.studentsService.getTimetableEntries(i,h)).pipe(u(b=>b.map(at)),u(b=>Ae(b,$=>$.id)),D(b=>t==="teacher"?this.loadStudyClasses(o).pipe(u($=>st(b,$))):A(b)))}loadStudyClasses(t){return this.lessonPresencesService.getLessonStudyClassesByDate(t).pipe(u(rt))}static{this.\u0275fac=function(i){return new(i||e)(v(lt),v(F),v(ee),v(ie),v(I),v(Ve))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-timetable"]],decls:23,vars:24,consts:[[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",1,"btn","btn-secondary","subscribe-calendar-header",3,"href"],[3,"entries"],["target","_parent",1,"btn","btn-secondary","subscribe-calendar-bottom",3,"href"]],template:function(i,o){if(i&1){let h=ve();d(0,"div",0)(1,"button",1),j("click",function(){return K(h),W(o.gotoToday())}),l(2),a(3,"translate"),c(),d(4,"button",2),a(5,"translate"),j("click",function(){return K(h),W(o.gotoPreviousDay())}),d(6,"span",3),l(7,"chevron_left"),c()(),d(8,"button",4),a(9,"translate"),j("click",function(){return K(h),W(o.gotoNextDay())}),d(10,"span",3),l(11,"chevron_right"),c()(),d(12,"div",5),l(13),a(14,"async"),a(15,"date"),c(),p(16,ni,4,7,"a",6),a(17,"async"),c(),E(18),a(19,"async"),p(20,oi,1,0,"bkd-spinner"),a(21,"async"),p(22,ri,3,4)}if(i&2){let h;n(2),T(" ",r(3,6,"dashboard.timetable.today")," "),n(2),oe("aria-label",r(5,8,"dashboard.timetable.previousDay")),n(4),oe("aria-label",r(9,10,"dashboard.timetable.nextDay")),n(5),P(R(15,14,r(14,12,o.date$),"E, dd. MMMM yyyy")),n(3),m((h=r(17,17,o.getSubscribeCalendarUrl()))?16:-1,h),n(2),U(r(19,19,o.timetableEntries$)),n(2),m(r(21,22,o.loading$)?20:22)}},dependencies:[dt,te,O,Y,M,ot],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%}}"]})}}return e})();function ci(e,s){e&1&&C(0,"bkd-spinner")}function di(e,s){e&1&&(d(0,"p"),l(1),a(2,"translate"),c()),e&2&&(n(),T(" ",r(2,1,"dashboard.no-access")," "))}function li(e,s){e&1&&(d(0,"div")(1,"h2"),l(2),a(3,"translate"),c(),C(4,"bkd-dashboard-search"),c()),e&2&&(n(2),P(r(3,1,"dashboard.search.title")))}function pi(e,s){e&1&&(d(0,"div")(1,"h2"),l(2),a(3,"translate"),c(),C(4,"bkd-dashboard-actions"),c()),e&2&&(n(2),P(r(3,1,"dashboard.actions.title")))}function mi(e,s){if(e&1&&(d(0,"div",1),p(1,li,5,3,"div")(2,pi,5,3,"div"),c()),e&2){f();let t=H(2),i=H(4);n(),m(t?1:-1),n(),m(i?2:-1)}}function hi(e,s){e&1&&(d(0,"div",2)(1,"h2"),l(2),a(3,"translate"),c(),C(4,"bkd-dashboard-timetable"),c()),e&2&&(n(2),P(r(3,1,"dashboard.timetable.title")))}var mt=(()=>{class e{constructor(t){this.dashboardService=t}static{this.\u0275fac=function(i){return new(i||e)(v(I))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-layout"]],decls:17,vars:19,consts:[[1,"columns"],[1,"search-actions-column"],[1,"timetable-column"]],template:function(i,o){if(i&1&&(E(0),a(1,"async"),E(2),a(3,"async"),E(4),a(5,"async"),E(6),a(7,"async"),d(8,"div")(9,"h1"),l(10),a(11,"translate"),c(),p(12,ci,1,0,"bkd-spinner")(13,di,3,3,"p"),d(14,"div",0),p(15,mi,3,2,"div",1)(16,hi,5,3,"div",2),c()()),i&2){let h=r(1,7,o.dashboardService.loading$);n(2);let b=U(r(3,9,o.dashboardService.hasSearch$));n(2);let $=U(r(5,12,o.dashboardService.hasActions$)),N=r(7,15,o.dashboardService.hasTimetable$);n(5),_e("visually-hidden",h||b||$||N),n(),T(" ",r(11,17,"dashboard.heading")," "),n(2),m(h?12:-1),n(),m(!h&&!b&&!$&&!N?13:-1),n(2),m(b||$?15:-1),n(),m(N?16:-1)}},dependencies:[te,nt,it,pt,O,M],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})}}return e})();var ht=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard"]],features:[Te([I,Ne])],decls:1,vars:0,template:function(i,o){i&1&&C(0,"router-outlet")},dependencies:[ke],encapsulation:2,changeDetection:0})}}return e})();var En=[{path:"",component:ht,children:[{path:"",component:mt},Ke,Ye("students/:id")]}];export{En as DASHBOARD_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-TMXWSOGF.js b/public/apps/webapp-schulverwaltung/chunk-TMXWSOGF.js deleted file mode 100644 index 21533166..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-TMXWSOGF.js +++ /dev/null @@ -1 +0,0 @@ -import{a as it}from"./chunk-UPTESATB.js";import{a as J}from"./chunk-Y4QYVF5K.js";import{C as st,D as rt,b as Qe,c as Ze,t as et,y as tt}from"./chunk-W6XALPR5.js";import{a as ce,b as N,c as Je,d as ot}from"./chunk-XBIMNMBY.js";import{e as pe,o as E}from"./chunk-A7CCEKNQ.js";import{h as Ye}from"./chunk-2AZMKO7X.js";import{a as nt}from"./chunk-HLAFRD2O.js";import{x as _}from"./chunk-QTBTUQ3W.js";import{a as Ke}from"./chunk-HVJBOTRL.js";import{$a as m,$c as k,Ab as w,Ac as ke,Ad as Xe,Bb as H,Bd as Fe,Cb as K,Cd as He,Eb as $e,F as L,Fb as Ie,Ga as Ce,Ic as d,J as ge,Jb as a,Jc as g,Kb as c,Kc as Be,Lb as q,M as ie,Na as j,Nd as S,Oc as v,P as l,Pd as qe,Qa as C,Qd as We,R as M,Ra as Re,Sd as ze,Va as P,Vc as I,X as ve,Xa as re,Ya as G,Yc as u,Z as Se,Za as X,Zc as W,_ as O,_a as p,a as V,ab as F,ad as je,b as U,bd as ae,cc as _e,dd as z,ea as ne,eb as Te,f as ye,fa as se,g as ee,gb as oe,gd as Pe,hb as x,hc as xe,ic as $,id as we,jd as Ne,kd as Ve,l as te,mc as Ee,n as y,o as D,od as Ue,qd as Me,rb as f,s as be,sb as Le,sd as Oe,tb as b,td as Ge,x as T,xc as Ae,ya as o,za as h,zc as De}from"./chunk-S3H6YSFW.js";function de(i,r){return i.pipe(y(e=>e.find(t=>t.Key===r)||null))}function _t(i){return i.slice().sort((r,e)=>r.Value.localeCompare(e.Value))}var at=new Se("Confirm Absences Service");function ct(i,r,e){let[t,n]=Ye(e?.in,i,r);return+pe(t)==+pe(n)}var ht=(i,r)=>r.Id,yt=i=>({count:i}),bt=()=>["/edit-absences"];function gt(i,r){if(i&1&&(p(0,"div",4),f(1),a(2,"translate"),m()),i&2){let e=r.$implicit;o(),b(" ",q(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vt(i,r){if(i&1&&(p(0,"div",21),f(1),a(2,"translate"),m()),i&2){let e=r.$implicit;o(),b(" ",q(2,1,"global.validation-errors."+e.error,e.params)," ")}}function St(i,r){if(i&1&&(G(0,vt,3,4,"div",21,re),a(2,"async")),i&2){let e=x(4);X(c(2,0,e.absenceTypeIdErrors$))}}function Ct(i,r){if(i&1&&(p(0,"div",16),F(1,"input",19),a(2,"async"),p(3,"label",20),f(4),m(),j(5,St,3,2),a(6,"async"),m()),i&2){let e,t,n=r.$implicit,s=r.$index,R=x(3);o(),Re("is-invalid",((e=(e=c(2,7,R.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),C("id","absence-type-"+s)("value",n.Id),o(2),C("for","absence-type-"+s),o(),b(" ",n.Designation," "),o(),P(((t=(t=c(6,9,R.absenceTypes$))==null?null:t.length)!==null&&t!==void 0?t:0)-1===s?5:-1)}}function Rt(i,r){if(i&1&&(G(0,Ct,7,11,"div",16,ht),a(2,"async"),p(3,"div",17),f(4),a(5,"translate"),p(6,"a",18),f(7),a(8,"translate"),m()()),i&2){let e=x(2);X(c(2,3,e.absenceTypes$)),o(4),b(" ",c(5,5,"open-absences.edit.remark")," "),o(2),C("routerLink",$e(9,bt)),o(),b(" ",c(8,7,"edit-absences.title")," ")}}function Tt(i,r){i&1&&(p(0,"div",15)(1,"span",22),f(2,"Loading..."),m()())}function Lt(i,r){if(i&1){let e=Te();p(0,"form",3),oe("ngSubmit",function(){ne(e);let n=x();return se(n.onSubmit())}),G(1,gt,3,4,"div",4,re),a(3,"async"),p(4,"div",5)(5,"div",6),F(6,"input",7),p(7,"label",8),f(8),m(),j(9,Rt,9,10),m(),p(10,"div",9),F(11,"input",10),p(12,"label",11),f(13),m()()(),p(14,"div",12)(15,"button",13),a(16,"async"),oe("click",function(){ne(e);let n=x();return se(n.cancel())}),f(17),a(18,"translate"),m(),p(19,"button",14),a(20,"async"),f(21),a(22,"translate"),j(23,Tt,3,0,"div",15),a(24,"async"),m()()()}if(i&2){let e=x(),t=K(0),n=K(2),s=K(4);C("formGroup",t),o(),X(c(3,11,e.formErrors$)),o(5),C("value",s.Key),o(2),b(" ",s.Value," "),o(),P(t.get("absenceTypeId")?9:-1),o(2),C("value",n.Key),o(2),b(" ",n.Value," "),o(2),C("disabled",c(16,13,e.saving$)),o(2),b(" ",c(18,15,"open-absences.edit.cancel")," "),o(2),C("disabled",c(20,17,e.saving$)),o(2),b(" ",c(22,19,"open-absences.edit.save")," "),o(2),P(c(24,21,e.saving$)?23:-1)}}var Zt=(()=>{class i{constructor(e,t,n,s,R,B,A,dt,mt,lt,ft){this.fb=e,this.router=t,this.activatedRoute=n,this.toastService=s,this.translate=R,this.selectionService=B,this.dropDownItemsService=A,this.presenceTypesService=dt,this.updateService=mt,this.settings=lt,this.openAbsencesEditService=ft,this.formGroup$=this.selectionService.selectedWithoutPresenceType$.pipe(y(this.createFormGroup.bind(this)),ie(1)),this.saving$=new ee(!1),this.submitted$=new ee(!1),this.formErrors$=ce(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=ce(this.formGroup$,this.submitted$,"absenceTypeId"),this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(ie(1)),this.excusedState$=de(this.confirmationStates$,this.settings.excusedAbsenceStateId),this.unexcusedState$=de(this.confirmationStates$,this.settings.unexcusedAbsenceStateId),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.destroy$=new ye}ngOnInit(){this.selectionService.selectedIds$.pipe(L(1)).subscribe(e=>{e.length===0&&this.navigateBack()}),Je(this.formGroup$,"confirmationValue").pipe(M(this.destroy$)).subscribe(e=>{typeof e=="number"&&this.updateAbsenceTypeIdDisabled(e)}),D([N(this.formGroup$,"confirmationValue").pipe(T(_)),N(this.formGroup$,"absenceTypeId").pipe(T(_)),this.saving$]).pipe(M(this.destroy$)).subscribe(([e,t,n])=>{n?(e.disable(),t.disable()):(e.enable(),this.updateAbsenceTypeIdDisabled(e.value))}),D([N(this.formGroup$,"confirmationValue").pipe(T(_)),this.excusedState$.pipe(L(1),T(_))]).pipe(M(this.destroy$)).subscribe(([e,t])=>e.setValue(t.Key))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(L(1)).subscribe(e=>{if(e.valid){let{confirmationValue:t,absenceTypeId:n}=e.value;this.save(t,n)}})}cancel(){this.navigateBack()}getSelectedCount(){return this.selectionService.selectedLessons$.pipe(y(e=>e.length))}createFormGroup(e){return e.length>0?this.fb.group({confirmationValue:[null],absenceTypeId:[null,we.required]}):this.fb.group({confirmationValue:[null]})}updateAbsenceTypeIdDisabled(e){D([N(this.formGroup$,"absenceTypeId").pipe(L(1),T(_)),this.excusedState$.pipe(L(1),T(_))]).subscribe(([t,n])=>{e===n.Key?t.enable():t.disable()})}save(e,t){this.saving$.next(!0),D([this.selectionService.selectedIds$.pipe(L(1)),this.unexcusedState$.pipe(L(1),T(_))]).pipe(l(([n,s])=>D(n.map(({lessonIds:R,personId:B,presenceTypeId:A})=>this.updateService.confirmLessonPresences(R,[B],this.getNewAbsenceTypeId(A,e,Number(s.Key),t),e)))),ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}getNewAbsenceTypeId(e,t,n,s){if(!e)throw new Error("absence type id cannot be null");return t===n?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})}static{this.\u0275fac=function(t){return new(t||i)(h(Xe),h(De),h(Ae),h(Ke),h(qe),h(tt),h(it),h(st),h(rt),h(z),h(at,8))}}static{this.\u0275cmp=Ce({type:i,selectors:[["bkd-confirm-absences"]],decls:16,vars:21,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[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"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"form-check","my-3"],[1,"remark"],[3,"routerLink"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback"],[1,"visually-hidden"]],template:function(t,n){if(t&1&&(w(0),a(1,"async"),w(2),a(3,"async"),w(4),a(5,"async"),p(6,"div",0)(7,"h1"),f(8),a(9,"translate"),m(),p(10,"div",1),w(11),a(12,"async"),f(13),a(14,"translate"),m(),j(15,Lt,25,23,"form",2),m()),t&2){let s=H(c(1,3,n.formGroup$));o(2);let R=H(c(3,6,n.unexcusedState$));o(2);let B=H(c(5,9,n.excusedState$));o(4),Le(c(9,12,"open-absences.edit.title"));let A=c(12,14,n.getSelectedCount());o(5),b(" ",q(14,16,A===1?"open-absences.edit.lesson-selected":"open-absences.edit.lessons-selected",Ie(19,yt,A))," "),o(2),P(s&&R&&B?15:-1)}},dependencies:[Fe,Ue,Pe,Me,Ne,Ve,He,Oe,Ge,ke,_e,We],encapsulation:2,changeDetection:0})}}return i})();var pt=v({StudentRef:u,StudentFullName:d,TotalAbsences:g,TotalAbsencesUnconfirmed:g,TotalAbsencesValidExcuse:g,TotalAbsencesWithoutExcuse:g,TotalAbsencesUnchecked:g,TotalDispensations:g,TotalHalfDays:g,TotalIncidents:g});var me=v({Id:d,LessonRef:u,StudentRef:u,EventRef:u,TypeRef:W,RegistrationRef:W,StudyClassRef:W,ConfirmationStateId:I(g),EventDesignation:d,HasStudyCourseConfirmationCode:Be,LessonDateTimeFrom:k,LessonDateTimeTo:k,Comment:I(d),Date:I(je),Type:I(d),StudentFullName:d,StudyClassNumber:d,TeacherInformation:I(d)});var Y=v({LessonRef:u,EventRef:u,StudyClassNumber:d,StudentRef:u});var le=v({LessonRef:u,EventRef:u,EventDesignation:d,StudyClassNumber:d,TeacherInformation:I(d),LessonDateTimeFrom:k,LessonDateTimeTo:k});function fe(i){return r=>r.pipe(l(e=>{let t=Number(e.headers.get("X-Pagination-Offset")),n=Number(e.headers.get("X-Pagination-Total"));return S(i)(e.body).pipe(y(s=>({offset:t,total:n,entries:s})))}))}function Z(i,r,e=new $){return e.set("offset",String(i)).set("limit",String(r))}function ue(i=new xe){return i.set("X-Pagination-Total","on")}var Di=(()=>{class i extends nt{constructor(e,t,n){super(e,t,me,"LessonPresences"),this.storage=n,this.lessonPresenceRefCodec=v(ae(this.codec.props,["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"])),this.lessonPresenceIdCodec=v(ae(this.codec.props,["Id"]))}getLessonsByDate(e){let t={fields:Object.keys(le.props).join(","),"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(le)))}getLessonStudyClassesByDate(e){let t={fields:Object.keys(Y.props).join(","),"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(Y)))}getLessonStudyClassesByEvent(e){let t={"filter.EventRef":`=${e}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(Y)))}getListByLessons(e){if(e.length===0)return te([]);let n={"filter.LessonRef":`;${e.map(s=>s.LessonRef.Id).join(";")}`};return this.getList({params:n,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListByDateStudentClass(e,t,n){let s={"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,"filter.StudentRef":`=${t}`};return n!=null&&(s["filter.StudyClassRef"]=`=${n}`),this.getList({params:s,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListForToday(){return this.http.get(`${this.baseUrl}/Today`,{headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(l(S(this.codec)))}getListOfUnconfirmed(e){return J(this.storage.getPayload()?.roles,"ClassTeacherRole")?be([this.getListOfUnconfirmedClassTeacher(e),this.getListOfUnconfirmedLessonTeacher(e)]).pipe(y(ot(et))):J(this.storage.getPayload()?.roles,"LessonTeacherRole")?this.getListOfUnconfirmedLessonTeacher(e):J(this.storage.getPayload()?.roles,"AbsenceAdministratorRole")?this.getListOfUnconfirmedAbsenceAdministrator(e):te([])}getStatistics(e,t,n){let s=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return s=$t(t,s),s=Z(n,this.settings.paginationLimit,s),this.http.get(`${this.baseUrl}/Statistics`,{params:s,headers:ue(),observe:"response"}).pipe(fe(pt))}getLessonRefs(e){let t=he([[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(l(S(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(l(S(this.lessonPresenceRefCodec)))}getFilteredList(e,t,n){let s=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]],new $({fromObject:n}));return e.teacher&&(s=s.set("filter.TeacherInformation",`~*${e.teacher}*`)),e.dateFrom&&e.dateTo&&ct(e.dateFrom,e.dateTo)?s=s.set("filter.LessonDateTimeFrom",`=${E(e.dateFrom,"yyyy-MM-dd")}`):(e.dateFrom&&(s=s.set("filter.LessonDateTimeFrom",`>${E(Ze(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(s=s.set("filter.LessonDateTimeTo",`<${E(Qe(e.dateTo,1),"yyyy-MM-dd")}`))),e.weekdays&&(s=s.set("filter.WeekdayId",`;${e.weekdays.join(";")}`)),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:Z(t,this.settings.paginationLimit,s),headers:ue(),observe:"response"}).pipe(fe(me))}hasLessonsLessonTeacher(){let e=new $().set("fields","Id");return this.http.get(`${this.baseUrl}/`,{params:Z(0,1,e),headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(l(S(this.lessonPresenceIdCodec)),y(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(l(S(this.lessonPresenceIdCodec)),y(e=>e.length))}getListOfUnconfirmedLessonTeacher(e){return this.getList({headers:{"X-Role-Restriction":"LessonTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=false"})})}getListOfUnconfirmedClassTeacher(e){return this.getList({headers:{"X-Role-Restriction":"ClassTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=true"})})}getListOfUnconfirmedAbsenceAdministrator(e){return this.getList({headers:{"X-Role-Restriction":"AbsenceAdministratorRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`})})}static{this.\u0275fac=function(t){return new(t||i)(O(Ee),O(z),O(ze))}}static{this.\u0275prov=ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function he(i,r=new $){return i.reduce((e,[t,n])=>t&&n?e.set(`filter.${n}`,`=${t}`):e,r)}function $t(i,r=new $){return i?r.set("sort",`${i.key}.${i.ascending?"asc":"desc"}`):r}export{_t as a,at as b,ct as c,Zt as d,Di as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-TO3HOIOR.js b/public/apps/webapp-schulverwaltung/chunk-TO3HOIOR.js deleted file mode 100644 index c44ed245..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-TO3HOIOR.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-LY5STZD6.js";import{e as p}from"./chunk-LZEJSWWW.js";import{Nd as o,P as i,X as c,_ as s,dd as m,mc as n}from"./chunk-S3H6YSFW.js";var I=(()=>{class t extends p{constructor(a,r){super(a,r,e,"StudyClasses","Number")}getActive(){return this.http.get(`${this.baseUrl}/?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(i(o(e)))}getActiveFormativeAssessments(){return this.http.get(`${this.baseUrl}/FormativeAssessments?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(i(o(e)))}static{this.\u0275fac=function(r){return new(r||t)(s(n),s(m))}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{I as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UN6AN2DI.js b/public/apps/webapp-schulverwaltung/chunk-UN6AN2DI.js deleted file mode 100644 index 5171b67d..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-UN6AN2DI.js +++ /dev/null @@ -1 +0,0 @@ -import{$a as g,$c as w,Dd as O,Ga as d,Hd as B,Ic as o,Jc as h,Lc as f,Md as I,Nc as F,Oc as R,P as C,Qa as x,Qc as k,Sd as _,Vc as a,Wc as L,X as P,_ as c,_a as u,a as b,ab as M,b as y,dd as E,ib as j,jb as D,l as A,mc as $,n as v,o as S,rb as T,sb as U,ya as m}from"./chunk-S3H6YSFW.js";var N=(()=>{class i{constructor(){this.expanded=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=d({type:i,selectors:[["bkd-caret"]],inputs:{expanded:"expanded"},decls:2,vars:1,consts:[["role","button",1,"d-flex","material-icons"]],template:function(e,r){e&1&&(u(0,"i",0),T(1),g()),e&2&&(m(),U(r.expanded?"expand_less":"expand_more"))},styles:["i[_ngcontent-%COMP%]:hover{color:#ea161f}"]})}}return i})();var X=["*"],V=(()=>{class i{constructor(){this.opened=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=d({type:i,selectors:[["bkd-student-dossier-entry-header"]],inputs:{opened:"opened"},ngContentSelectors:X,decls:3,vars:1,consts:[[1,"m-0"],[1,"d-flex","align-items-center",3,"expanded"]],template:function(e,r){e&1&&(j(),u(0,"h5",0),D(1),g(),M(2,"bkd-caret",1)),e&2&&(m(2),x("expanded",r.opened))},dependencies:[N],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})}}return i})();var J=R({Id:h,Title:o}),z=a(F(J));var pt=(()=>{class i{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)}getCourseTestsReports(t){return this.getAvailableReports("Anlass",this.settings.testsByCourseReports,[t])}getStudentSubscriptionGradesReports(t){return this.settings.testsBySubscriptionStudentReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getTeacherSubscriptionGradesReports(t){return this.settings.testsBySubscriptionTeacherReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getStudyClassStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.studyClassStudentsReports,[t])}getCourseStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.courseStudentsReports,[t])}getAvailableReports(t,e,r){let n=B(e,p=>p.type),s=S(Object.keys(n).map(p=>this.getAvailableReportsForType(p,t,n[p].map(({id:l})=>l),r)));return this.mergeAvailableReports(s,e)}getAvailableReportsForType(t,e,r,n){return n.length===0?A([]):this.http.get(this.getReportAvailabilityUrl(t,e,r,n)).pipe(C(I(z)),v(s=>s?s.map(({Id:p,Title:l})=>({type:t,id:p,title:l,url:this.getReportUrl(t,e,p,n)})):[]))}mergeAvailableReports(t,e){return t.pipe(v(r=>{let n=O(r);return e.reduce((s,p)=>{let l=n.find(({id:H})=>H===p.id);return l?[...s,l]:s},[])}))}getReportUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/Files/${this.getReportTypePathPart(t)}/${e}/${r}`);return s.searchParams.set("ids",n.join(",")),s.searchParams.set("token",this.storageService.getAccessToken()??""),s.toString()}getReportAvailabilityUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/${this.getReportTypePathPart(t)}/AvailableReports/${e}`);return s.searchParams.set("ids",Array.isArray(r)?r.join(","):String(r)),s.searchParams.set("keys",n.join(",")),s.toString()}getReportTypePathPart(t){return`${t[0].toUpperCase()+t.slice(1)}Reports`}static{this.\u0275fac=function(e){return new(e||i)(c(E),c(_),c($))}}static{this.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var dt=R({Id:h,AddressLine1:a(o),AddressLine2:L(o),Birthdate:a(w),DisplayEmail:a(o),FirstName:o,FullName:o,Gender:k([f("M"),f("F"),f("X")]),LastName:o,Location:a(o),PhoneMobile:a(o),PhonePrivate:a(o),PostalCode:a(o)});export{N as a,V as b,dt as c,pt as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UPTESATB.js b/public/apps/webapp-schulverwaltung/chunk-UPTESATB.js deleted file mode 100644 index 79de21b2..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-UPTESATB.js +++ /dev/null @@ -1 +0,0 @@ -import{a as u}from"./chunk-XKNLLORS.js";import{a as j}from"./chunk-HLAFRD2O.js";import{$c as b,Ic as t,Jc as g,Lc as f,M as l,Md as P,Nd as n,Oc as m,P as o,Qc as S,Vc as r,Wc as p,X as c,_ as a,bd as E,dd as h,l as I,mc as d,n as y}from"./chunk-S3H6YSFW.js";var k=(()=>{class i{constructor(e,s){this.http=e,this.settings=s}getWeekdays(){return this.http.get(`${this.baseUrl}/Weekdays`).pipe(o(n(u)),l(1))}getAbsenceConfirmationStates(){return this.http.get(`${this.baseUrl}/AbsenceConfirmationStates`).pipe(o(n(u)),l(1))}getStayPermits(){return this.http.get(`${this.baseUrl}/StayPermits`).pipe(o(n(u)),l(1))}get baseUrl(){return`${this.settings.apiUrl}/DropDownItems`}static{this.\u0275fac=function(s){return new(s||i)(a(d),a(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var F=m({Id:g,FormOfAddress:t,Nationality:r(t),AddressLine1:r(t),AddressLine2:r(t),BillingAddress:r(t),Birthdate:r(b),CorrespondenceAddress:r(t),DisplayEmail:r(t),Email:p(t),Email2:p(t),FirstName:r(t),Gender:r(S([f("M"),f("F"),f("X")])),HomeTown:r(t),LastName:r(t),FullName:r(t),Location:r(t),MiddleName:r(t),NativeLanguage:r(t),PhoneMobile:r(t),PhonePrivate:r(t),PhoneBusiness:p(t),SocialSecurityNumber:r(t),StayPermit:r(g),StayPermitExpiry:r(b),Zip:r(t)}),A=m({Id:g,FullName:t,DisplayEmail:r(t),Email:p(t)});var z=(()=>{class i extends j{constructor(e,s){super(e,s,F,"Persons"),this.personEmailCodec=m(E(this.codec.props,["Email","FormOfAddress"]))}getListForIds(e){return this.getList({params:{"filter.Id":`;${e.join(";")}`}})}getSummaries(e){return e.length===0?I([]):this.http.get(`${this.baseUrl}/`,{params:{"filter.Id":`;${e.join(";")}`,fields:["Id","FullName","DisplayEmail","Email"].join(",")}}).pipe(o(n(A)))}getMyself(e){return this.http.get(`${this.baseUrl}/me`,e).pipe(o(P(this.codec)))}getByIdWithEmailInfos(e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id=":e.toString(),fields:["FormOfAddress","Email"].join(",")}}).pipe(o(n(this.personEmailCodec)),y(s=>s[0]))}update(e,s,N,$){let U={PhonePrivate:s,PhoneMobile:N,Email2:$};return this.http.put(`${this.baseUrl}/${e}`,U).pipe(y(()=>{}))}static{this.\u0275fac=function(s){return new(s||i)(a(d),a(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{k as a,z as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UZJ4FIXB.js b/public/apps/webapp-schulverwaltung/chunk-UZJ4FIXB.js new file mode 100644 index 00000000..62bb6b7c --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-UZJ4FIXB.js @@ -0,0 +1 @@ +import{$ as a,Ac as P,Dc as m,F as e,M as u,P as p,Q as f,R as s,X as d,f as h,kc as g,l,n,p as c,x as r,yc as S,zc as v}from"./chunk-NEW5VGRB.js";var N=(()=>{class o{constructor(){this.router=a(m),this.viewportScroller=a(g),this.scrollPositions={},this.previousRoute=null,this.currentRoute=this.getInitialActivatedRouteSnapshot(),this.currentScrollPosition=[0,0],this.destroy$=new h,this.activationEnd$=this.router.events.pipe(r($)),this.navigationEnd$=this.router.events.pipe(r(y)),this.navigationStart$=this.router.events.pipe(r(R)),this.scrollPosition$=this.navigationStart$.pipe(n(this.getScrollPosition.bind(this))),this.route$=this.activationEnd$.pipe(e(1)).pipe(c(t=>[l(t),this.navigationEnd$.pipe(p(()=>this.activationEnd$.pipe(e(1))))]),f(),n(t=>t.snapshot),u(1)),this.scrollPosition$.pipe(s(this.destroy$)).subscribe(t=>this.currentScrollPosition=t),this.route$.pipe(s(this.destroy$)).subscribe(t=>{this.previousRoute=this.currentRoute,this.currentRoute=t})}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(e(1),s(this.destroy$),r(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}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function $(o){return o instanceof P}function R(o){return o instanceof S}function y(o){return o instanceof v}export{N as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-T2GDLGV4.js b/public/apps/webapp-schulverwaltung/chunk-VANM6WSB.js similarity index 78% rename from public/apps/webapp-schulverwaltung/chunk-T2GDLGV4.js rename to public/apps/webapp-schulverwaltung/chunk-VANM6WSB.js index 06c65c76..a7390742 100644 --- a/public/apps/webapp-schulverwaltung/chunk-T2GDLGV4.js +++ b/public/apps/webapp-schulverwaltung/chunk-VANM6WSB.js @@ -1 +1 @@ -import{o as A}from"./chunk-A7CCEKNQ.js";import{a as B}from"./chunk-HLAFRD2O.js";import{a as V}from"./chunk-HVJBOTRL.js";import{Ia as k,Ic as D,Jc as R,Nd as b,Oc as S,P as m,Pd as x,S as w,T as P,X as M,_ as d,a as p,b as h,bd as Y,da as j,dd as $,k as W,l as g,ma as T,mc as z,n as u,na as U,p as O,ra as F,t as K,x as N,za as y}from"./chunk-S3H6YSFW.js";function _(t,e,o,i){let n=window&&!!window.document&&window.document.documentElement,r=n&&e?window:o;if(t&&(r=t&&n&&typeof t=="string"?tt(t,o.nativeElement,i):t,!r))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return r}function tt(t,e,o){return(o?window.document:e).querySelector(t)}function E(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"},v=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,o){return!!(t&&e||!o&&e)}function rt({windowElement:t,axis:e}){return lt({axis:e,isWindow:st(t)},t)}function lt(t,e){let o=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return h(p({},t),{container:o})}function st(t){return["Window","global"].some(o=>Object.prototype.toString.call(t).includes(o))}function I(t,e){return t?e.document.documentElement:null}function G(t,e){let o=ft(e);return e.isWindow?ct(o,t,e):at(o,t,e)}function ct(t,e,o){let{axis:i,container:n,isWindow:r}=o,{offsetHeightKey:l,clientHeightKey:c}=X(i),a=t+q(I(r,n),i,r),s=L(e.nativeElement,r,l,c),f=ut(e.nativeElement,i,r)+s;return{height:t,scrolled:a,totalToScroll:f,isWindow:r}}function at(t,e,o){let{axis:i,container:n}=o,r=n[i.scrollTopKey()],l=n[i.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:o}){let{offsetHeightKey:i,clientHeightKey:n}=X(o);return L(t,e,i,n)}function L(t,e,o,i){if(isNaN(t[o])){let n=I(e,t);return n?n[i]:0}else return t[o]}function ut(t,e,o){let i=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[i]+q(t,e,o)}function q(t,e,o){let i=e.pageYOffsetKey(),n=e.scrollTopKey(),r=e.offsetTopKey();return isNaN(window.pageYOffset)?I(o,t)[n]:t.ownerDocument?t.ownerDocument.defaultView[i]:t[r]}function dt(t,e={down:0,up:0},o){let i,n;if(t.totalToScroll<=0)return!1;let r=t.isWindow?t.scrolled:t.height+t.scrolled;if(o)i=(t.totalToScroll-r)/t.totalToScroll,n=(e?.down?e.down:0)/10;else{let c=t.scrolled+(t.totalToScroll-r);i=t.scrolled/c,n=(e?.up?e.up:0)/10}return i<=n}function pt(t,e){return tg(G(i,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=K(t.container,"scroll");return t.throttle&&(e=e.pipe(P(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function St(t,e,o){let{scrollDown:i,fire:n}=ht(t,e,o);return{scrollDown:i,fire:n,stats:e}}var H={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function wt(t){let{scrollDown:e,stats:{scrolled:o}}=t;return{type:e?H.DOWN:H.UP,payload:{currentScrollPosition:o}}}var Nt=(()=>{class t{constructor(o,i){this.element=o,this.zone=i,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:i,infiniteScrollDistance:n}){let r=E(o),l=E(i),c=E(n),a=!l&&!this.infiniteScrollDisabled||l&&!i.currentValue||c;(r||l||c)&&(this.destroyScroller(),a&&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:i}){let n=o===H.DOWN?this.scrolled:this.scrolledUp;Tt(n)&&this.zone.run(()=>n.emit(i))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)(y(F),y(U))}}static{this.\u0275dir=k({type:t,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"},features:[j]})}}return t})();function Tt(t){return t.observed??t.observers.length>0}function Ut(t){return Object.keys(t).reduce((e,o)=>{let i=yt(t[o]);return i?h(p({},e),{[o]:i}):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=(()=>{class t extends B{constructor(o,i,n,r){super(o,i,Z,"EducationalEvents"),this.translate=n,this.toastService=r,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(i=>i.map(n=>({Key:n.Id,Value:`${n.Designation} (${n.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(i=>i.length===0?(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),W):g({Key:i[0].Id,Value:`${i[0].Designation} (${i[0].Number})`})))}static{this.\u0275fac=function(i){return new(i||t)(d(z),d($),d(x),d(V))}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Ut as a,Nt as b,qt as c}; +import{o as B}from"./chunk-NC6UEGAF.js";import{a as A}from"./chunk-HQSONWXM.js";import{a as V}from"./chunk-F4XODHS2.js";import{$ as d,Ka as j,Mc as D,Nc as R,P as m,Rd as x,S as w,Sc as S,T as P,Wd as b,X as M,a as p,b as h,da as U,fd as Y,hd as $,k as W,l as g,ma as T,n as u,na as F,p as O,qc as z,ra as k,t as K,x as N,za as y}from"./chunk-NEW5VGRB.js";function _(t,e,o,i){let n=window&&!!window.document&&window.document.documentElement,r=n&&e?window:o;if(t&&(r=t&&n&&typeof t=="string"?tt(t,o.nativeElement,i):t,!r))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return r}function tt(t,e,o){return(o?window.document:e).querySelector(t)}function E(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"},v=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,o){return!!(t&&e||!o&&e)}function rt({windowElement:t,axis:e}){return lt({axis:e,isWindow:st(t)},t)}function lt(t,e){let o=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return h(p({},t),{container:o})}function st(t){return["Window","global"].some(o=>Object.prototype.toString.call(t).includes(o))}function I(t,e){return t?e.document.documentElement:null}function G(t,e){let o=ft(e);return e.isWindow?ct(o,t,e):at(o,t,e)}function ct(t,e,o){let{axis:i,container:n,isWindow:r}=o,{offsetHeightKey:l,clientHeightKey:c}=X(i),a=t+q(I(r,n),i,r),s=L(e.nativeElement,r,l,c),f=ut(e.nativeElement,i,r)+s;return{height:t,scrolled:a,totalToScroll:f,isWindow:r}}function at(t,e,o){let{axis:i,container:n}=o,r=n[i.scrollTopKey()],l=n[i.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:o}){let{offsetHeightKey:i,clientHeightKey:n}=X(o);return L(t,e,i,n)}function L(t,e,o,i){if(isNaN(t[o])){let n=I(e,t);return n?n[i]:0}else return t[o]}function ut(t,e,o){let i=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[i]+q(t,e,o)}function q(t,e,o){let i=e.pageYOffsetKey(),n=e.scrollTopKey(),r=e.offsetTopKey();return isNaN(window.pageYOffset)?I(o,t)[n]:t.ownerDocument?t.ownerDocument.defaultView[i]:t[r]}function dt(t,e={down:0,up:0},o){let i,n;if(t.totalToScroll<=0)return!1;let r=t.isWindow?t.scrolled:t.height+t.scrolled;if(o)i=(t.totalToScroll-r)/t.totalToScroll,n=(e?.down?e.down:0)/10;else{let c=t.scrolled+(t.totalToScroll-r);i=t.scrolled/c,n=(e?.up?e.up:0)/10}return i<=n}function pt(t,e){return tg(G(i,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=K(t.container,"scroll");return t.throttle&&(e=e.pipe(P(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function St(t,e,o){let{scrollDown:i,fire:n}=ht(t,e,o);return{scrollDown:i,fire:n,stats:e}}var H={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function wt(t){let{scrollDown:e,stats:{scrolled:o}}=t;return{type:e?H.DOWN:H.UP,payload:{currentScrollPosition:o}}}var Nt=(()=>{class t{constructor(o,i){this.element=o,this.zone=i,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:i,infiniteScrollDistance:n}){let r=E(o),l=E(i),c=E(n),a=!l&&!this.infiniteScrollDisabled||l&&!i.currentValue||c;(r||l||c)&&(this.destroyScroller(),a&&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:i}){let n=o===H.DOWN?this.scrolled:this.scrolledUp;Tt(n)&&this.zone.run(()=>n.emit(i))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)(y(k),y(F))}}static{this.\u0275dir=j({type:t,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"},features:[U]})}}return t})();function Tt(t){return t.observed??t.observers.length>0}function Ft(t){return Object.keys(t).reduce((e,o)=>{let i=yt(t[o]);return i?h(p({},e),{[o]:i}):e},{})}function yt(t){return t?t instanceof Date?B(t,"yyyy-MM-dd"):String(t):null}var Z=S({Id:R,Designation:D,Number:D});var Jt=(()=>{class t extends A{constructor(){let o=d(z),i=d($);super(o,i,Z,"EducationalEvents"),this.translate=d(x),this.toastService=d(V),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(i=>i.map(n=>({Key:n.Id,Value:`${n.Designation} (${n.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(i=>i.length===0?(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),W):g({Key:i[0].Id,Value:`${i[0].Designation} (${i[0].Number})`})))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Ft as a,Nt as b,Jt as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-VMIOSRDB.js b/public/apps/webapp-schulverwaltung/chunk-VMIOSRDB.js new file mode 100644 index 00000000..e5ee1b8a --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-VMIOSRDB.js @@ -0,0 +1 @@ +import{l as q,m as J,o as V,p as Y,w as z}from"./chunk-DJNW6R6G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-H664QRX4.js";import{d as U}from"./chunk-JGKXAFYO.js";import"./chunk-NC6UEGAF.js";import{i as O,j as H}from"./chunk-SL67CYEF.js";import{h as N}from"./chunk-HQSONWXM.js";import{D as M,x as I}from"./chunk-RXRYDGZR.js";import{$ as r,Cc as B,Eb as v,Fb as y,Gb as C,Hb as G,Ia as c,Ib as P,M as F,Nb as o,Ob as n,P as x,Pa as w,Sa as S,Sd as b,Ud as A,X as L,Xa as D,ab as f,bb as m,cb as p,gc as $,h as _,hd as j,jb as E,n as a,o as R,s as T,vb as g,wb as h,ya as d}from"./chunk-NEW5VGRB.js";var l=(()=>{class t{constructor(){this.storageService=r(A),this.loadingService=r(O),this.coursesRestService=r(q),this.subscriptionRestService=r(V),this.reportsService=r(U),this.gradingScalesRestService=r(J),this.settings=r(j),this.studentId$=new _(1),this.loading$=this.loadingService.loading$,this.studentCourses$=this.loadCourses().pipe(F(1)),this.studentCoursesSorted$=this.studentCourses$.pipe(a(e=>e.slice().sort((i,u)=>i.Designation.localeCompare(u.Designation)))),this.studentCourseIds$=this.studentCourses$.pipe(a(e=>e.flatMap(i=>i.Id))),this.subscriptionIds$=R([this.studentId$,this.studentCourseIds$]).pipe(x(([e,i])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(e,i))),this.testReports$=this.subscriptionIds$.pipe(a(e=>this.reportsService.getStudentSubscriptionGradesReports(e))),this.tests$=this.studentCourses$.pipe(a(e=>e.flatMap(i=>i.Tests).filter(I))),this.gradingScaleIdsFromTests$=this.tests$.pipe(a(e=>[...e.map(i=>i.GradingScaleId)].filter(I).filter(M))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(a(e=>e.flatMap(i=>i.GradingScaleId).filter(I).filter(M))),this.gradingScaleIds$=R([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(a(([e,i])=>e.concat(i).filter(M))),this.gradingScales$=this.gradingScaleIds$.pipe(x(e=>T(e.map(i=>this.gradingScalesRestService.getGradingScale(i)))));let s=this.storageService.getPayload()?.id_person;s&&this.studentId$.next(Number(s))}loadCourses(){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForStudent())}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac})}}return t})();var Z=()=>[],K=(()=>{class t{constructor(){this.myGradesService=r(l)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=c({type:t,selectors:[["bkd-my-grades-header"]],decls:7,vars:7,consts:[[1,"d-flex","justify-content-between","header"],[3,"reports"]],template:function(e,i){if(e&1&&(f(0,"div",0)(1,"div"),g(2),o(3,"translate"),m(),f(4,"div"),p(5,"bkd-reports-link",1),o(6,"async"),m()()),e&2){let u;d(2),h(n(3,2,"my-grades.header")),d(3),S("reports",(u=n(6,4,i.myGradesService.testReports$))!==null&&u!==void 0?u:P(6,Z))}},dependencies:[H,$,b],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}.report[_ngcontent-%COMP%]{margin-left:1rem}"]})}}return t})();function ee(t,X){t&1&&p(0,"bkd-spinner")}function te(t,X){if(t&1&&p(0,"bkd-dossier-grades-view",1),t&2){E();let s=C(0),e=C(2),i=C(4);S("courses",s)("studentId",e)("gradingScales",i)("isEditable",!1)}}var Q=(()=>{class t{constructor(){this.myGradesService=r(l)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=c({type:t,selectors:[["bkd-my-grades-show"]],features:[G([Y])],decls:14,vars:15,consts:[[1,"bkd-container","bkd-container-limited"],[3,"courses","studentId","gradingScales","isEditable"]],template:function(e,i){e&1&&(v(0),o(1,"async"),v(2),o(3,"async"),v(4),o(5,"async"),f(6,"div",0)(7,"h1"),g(8),o(9,"translate"),m(),p(10,"bkd-my-grades-header"),w(11,ee,1,0,"bkd-spinner"),o(12,"async"),w(13,te,1,4,"bkd-dossier-grades-view",1),m()),e&2&&(y(n(1,2,i.myGradesService.studentCoursesSorted$)),d(2),y(n(3,5,i.myGradesService.studentId$)),d(2),y(n(5,8,i.myGradesService.gradingScales$)),d(4),h(n(9,11,"my-grades.title")),d(3),D(n(12,13,i.myGradesService.loading$)?11:13))},dependencies:[K,z,N,$,b],encapsulation:2})}}return t})();var W=(()=>{class t{constructor(){}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=c({type:t,selectors:[["bkd-my-grades"]],features:[G([l])],decls:1,vars:0,template:function(e,i){e&1&&p(0,"router-outlet")},dependencies:[B],encapsulation:2})}}return t})();var Pe=[{path:"",component:W,children:[{path:"",component:Q}]}];export{Pe as MY_GRADES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-W6XALPR5.js b/public/apps/webapp-schulverwaltung/chunk-W6XALPR5.js deleted file mode 100644 index 6719e215..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-W6XALPR5.js +++ /dev/null @@ -1,2 +0,0 @@ -import{e as je,f as Ue,o as S}from"./chunk-A7CCEKNQ.js";import{f as Be,g as Ne,i as He}from"./chunk-2AZMKO7X.js";import{a as Ve,b as Ge}from"./chunk-HLAFRD2O.js";import{C as ne,x as Me,z as Oe}from"./chunk-QTBTUQ3W.js";import{$a as p,Ab as Pe,Ac as G,Bb as Le,Cb as Ae,F as $,Ga as U,H as N,Ic as Re,Ja as ye,Jb as l,Jc as te,K as de,Kb as d,Kc as T,Kd as q,Lb as M,M as y,Na as g,O as I,Oc as we,P as Y,Pd as Ee,Q as ue,Qa as A,Qd as K,Ra as he,Va as b,Vc as Fe,X as _,Ya as ge,Za as be,_ as h,_a as c,ab as Z,cc as ke,da as me,dc as $e,dd as v,ea as R,eb as V,f as re,fa as w,g as se,gb as F,h as k,hb as m,ib as _e,jb as xe,kb as Ce,l as ae,lb as Te,mc as H,n as r,nb as ve,o as ce,ob as Se,pb as Ie,qb as De,r as le,rb as u,sb as E,tb as C,ub as ee,x as pe,xa as fe,ya as s,za as j}from"./chunk-S3H6YSFW.js";var qe=function(e){return function(i){return!e(i)}};function it(e){return!e}function ot(e){return!!(e&&e.IsComment)}function rt(e){return!!(e&&e.IsIncident)}function W(e){return!!(e&&(e.IsAbsence||e.IsDispensation||e.IsHalfDay))}function ie(e,i){return!!(e&&i&&e.Id===i.absencePresenceTypeId)}function oe(e,i){return!!(e&&i&&i===e.checkableAbsenceStateId)}function Ke(e,i,t){return!!(it(i)&&e.ConfirmationStateId===null||ot(i)||rt(i)||W(i)&&e.ConfirmationStateId===t.unconfirmedAbsenceStateId||oe(t,e.ConfirmationStateId))}function Ft(e,i){return e?.IsAbsence?i.unconfirmedAbsenceStateId:null}var f=function(e){return e.Present="present",e.Unapproved="unapproved",e.Absent="absent",e}(f||{});function st(e){switch(e){case f.Absent:return"cancel";case f.Unapproved:return"help";default:return"check_circle"}}var Q=class{constructor(i,t,n,o){this.lessonPresence=i,this.presenceType=t,this.precedingAbsences=n,this.confirmationState=o,this.studentFullName=i.StudentFullName}get id(){return`${this.lessonPresence.LessonRef.Id}-${this.lessonPresence.StudentRef.Id}`}get presenceCategory(){return oe(this.settings,this.confirmationState&&Number(this.confirmationState.Key))?f.Unapproved:W(this.presenceType)?f.Absent:f.Present}get nextPresenceCategory(){return this.presenceCategory===f.Absent?f.Present:f.Absent}getNextPresenceType(i){switch(this.nextPresenceCategory){case f.Absent:return this.presenceCategory===f.Unapproved?this.presenceType:i.find(t=>ie(t,this.settings))||null;default:return null}}get canChangePresenceType(){return Ke(this.lessonPresence,this.presenceType,this.settings)}get canChangeIncident(){return!W(this.presenceType)}get showDesignation(){return!this.canChangePresenceType||this.presenceCategory===f.Absent&&!ie(this.presenceType,this.settings)||this.presenceCategory===f.Unapproved}get presenceCategoryIcon(){return st(this.presenceCategory)}get settings(){return window.schulverwaltung.settings}};function We(e,i,t){let n=Ne(e,t?.in);return isNaN(i)?Be(t?.in||e,NaN):(i&&n.setDate(n.getDate()+i),n)}function Vt(e,i,t){return We(e,-i,t)}var D=class{constructor(i){if(this.absences=i,i.length===0)throw new Error("Absences array is empty");this.date=je(this.absences[0].LessonDateTimeFrom),this.dateString=S(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}get id(){return`${this.dateString}-${this.studentId}`}};function Qt(e,i){return e===null&&i===null||e!==null&&i!==null&&e.LessonRef.Id===i.LessonRef.Id&&e.EventDesignation===i.EventDesignation&&e.StudyClassNumber===i.StudyClassNumber&&e.TeacherInformation===i.TeacherInformation&&e.LessonDateTimeFrom.getTime()===i.LessonDateTimeFrom.getTime()&&e.LessonDateTimeTo.getTime()===i.LessonDateTimeTo.getTime()}function at(e,i){return e?i.filter(t=>e.lessons.map(n=>n.LessonRef.Id).indexOf(t.LessonRef.Id)>=0).sort(pt):[]}function ct(e,i,t){return q(e.filter(n=>n.StudentRef.Id===i.StudentRef.Id&&n.LessonRef.From&&n.LessonRef.From.toDateString()===t?.LessonDateTimeFrom.toDateString()&&n.LessonRef.Fromlt(e,a,t,n,o))}function lt(e,i,t,n,o){let a=null;i.TypeRef.Id&&(a=t.find(X=>X.Id===i.TypeRef.Id)||null);let x=ct(o,i,e),L;return i.ConfirmationStateId&&(L=n.find(X=>X.Key===i.ConfirmationStateId)),new Q(i,a,x,L)}function Qe(e,i){let t=e.LessonDateTimeFrom.getTime(),n=i.LessonDateTimeFrom.getTime();return t-n===0?e.LessonDateTimeTo.getTime()-i.LessonDateTimeTo.getTime():t-n}function pt(e,i){return e.StudentFullName.localeCompare(i.StudentFullName)}function dt(e,i){return e.LessonRef.From&&e.LessonRef.To&&i.LessonRef.From&&i.LessonRef.To?e.LessonRef.From.getTime()-i.LessonRef.From.getTime()===0?e.LessonRef.To.getTime()-i.LessonRef.To.getTime():e.LessonRef.From.getTime()-i.LessonRef.From.getTime():0}var z=class extends Error{constructor(i,t){super(`TypeScript thought we could never end up here -${t}`)}};function on(e){let i=mt(e);return Object.keys(i).reduce((t,n)=>(Object.keys(i[n]).forEach(o=>{t=[...t,new D(i[n][o].sort(Qe))]}),t),[])}function rn(e,i){return[...e].sort(ut(i))}function J(e){return e.reduce((i,t)=>i.concat(t.absences),[])}function sn(e,i){return e.filter(t=>!i.some(({lessonIds:n,personId:o})=>n.includes(t.LessonRef.Id)&&o===t.StudentRef.Id))}function an(e,i){return q([...e,...i],"Id")}function ut(e){return(i,t)=>{switch(e.primarySortKey){case"date":{let n=i.date.getTime(),o=t.date.getTime();return n===o?i.studentFullName.localeCompare(t.studentFullName):e.ascending?n-o:o-n}case"name":{let n=e.ascending?i.studentFullName.localeCompare(t.studentFullName):t.studentFullName.localeCompare(i.studentFullName);return n===0?t.date.getTime()-i.date.getTime():n}default:throw new z(e.primarySortKey,"Unhandled sort criteria")}}}function mt(e){return e.reduce((i,t)=>{let n=S(t.LessonDateTimeFrom,"yyyy-MM-dd"),o=t.StudentRef.Id;return i[n]||(i[n]={}),i[n][o]||(i[n][o]=[]),i[n][o].push(t),i},{})}var O=function(e){return e.ToggleSelection="TOGGLE",e.ClearSelection="CLEAR",e}(O||{}),ze=(()=>{class e{constructor(){this.action$=new re,this.selection$=le(this.action$.pipe(de(this.reduceSelection.bind(this),[]),I([])),{connector:()=>new k(1)}),this.selectionSub=this.selection$.connect()}ngOnDestroy(){this.selectionSub.unsubscribe()}toggle(t){this.action$.next({type:O.ToggleSelection,payload:t})}clear(t=null){this.action$.next({type:O.ClearSelection,payload:t})}isSelected$(t){return this.selection$.pipe(r(n=>n.includes(t)),N())}reduceSelection(t,n){switch(n.type){case O.ToggleSelection:return t.includes(n.payload)?t.filter(o=>o!==n.payload):[...t,n.payload];case O.ClearSelection:return n.payload||[];default:return t}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac})}}return e})();function mn(e){let i=e.reduce((t,n)=>(t[n.StudentRef.Id]||(t[n.StudentRef.Id]=[]),t[n.StudentRef.Id].push(n.LessonRef.Id),t),{});return Object.keys(i).map(t=>({personIds:[Number(t)],lessonIds:i[t]}))}function Je(e){let i={};return e.forEach(t=>{i[t.StudentRef.Id]||(i[t.StudentRef.Id]={}),i[t.StudentRef.Id][String(t.TypeRef.Id)]||(i[t.StudentRef.Id][String(t.TypeRef.Id)]=[]),i[t.StudentRef.Id][String(t.TypeRef.Id)].push(t.LessonRef.Id)}),Object.keys(i).reduce((t,n)=>[...t,...Object.keys(i[n]).map(o=>({personId:Number(n),presenceTypeId:o==="null"?null:Number(o),lessonIds:i[n][String(o)]}))],[])}function fn(e){return e.slice().sort((i,t)=>i.LessonDateTimeFrom.getTime()-t.LessonDateTimeFrom.getTime())}function yn(e){return`${e.EventDesignation}, ${S(e.LessonDateTimeFrom,"dd.MM.yyyy")}, ${S(e.LessonDateTimeFrom,"HH:mm")}-${S(e.LessonDateTimeTo,"HH:mm")}`}var In=(()=>{class e extends ze{constructor(t){super(),this.settings=t,this.selectedIds$=this.selection$.pipe(r(B),r(({openAbsencesEntries:n,lessonPresences:o})=>Je([...J(n),...o])),y(1)),this.selectedLessons$=this.selection$.pipe(r(B),r(({openAbsencesEntries:n,lessonPresences:o})=>[...J(n),...o]),y(1)),this.selectedWithoutPresenceType$=this.selection$.pipe(r(B),r(({openAbsencesEntries:n,lessonPresences:o})=>[...J(n),...o].filter(a=>a.TypeRef.Id===this.settings.absencePresenceTypeId)))}clearNonOpenAbsencesEntries(){this.selection$.pipe($(1),r(B)).subscribe(({openAbsencesEntries:t})=>this.clear(t))}clearNonLessonPresences(){this.selection$.pipe($(1),r(B)).subscribe(({lessonPresences:t})=>this.clear(t))}static{this.\u0275fac=function(n){return new(n||e)(h(v))}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac})}}return e})();function B(e){return{openAbsencesEntries:e.filter(ne(D)),lessonPresences:e.filter(qe(ne(D)))}}function Xe(e){return e.slice().sort((i,t)=>i.Sort-t.Sort)}function Pn(e){return e.map(i=>({Key:i.Id,Value:i.Designation||""}))}function Ln(e,i){return e.map(t=>Object.assign(t,{Group:i}))}var Ye=we({Id:te,Active:T,Designation:Fe(Re),IsAbsence:T,IsComment:T,IsDispensation:T,IsIncident:T,IsHalfDay:T,NeedsConfirmation:T,Sort:te});var Ze=(()=>{class e extends Ve{constructor(t,n){super(t,n,Ye,"PresenceTypes")}static{this.\u0275fac=function(n){return new(n||e)(h(H),h(v))}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var et=(()=>{class e{constructor(t,n){this.restService=t,this.settings=n,this.presenceTypes$=this.loadPresenceTypes().pipe(y(1)),this.activePresenceTypes$=this.presenceTypes$.pipe(r(this.filterActiveTypes.bind(this)),y(1)),this.confirmationTypes$=this.presenceTypes$.pipe(r(this.filterConfirmationTypes.bind(this)),y(1)),this.incidentTypes$=this.presenceTypes$.pipe(r(this.filterIncidentTypes.bind(this)),y(1)),this.displayedTypes$=this.presenceTypes$.pipe(r(this.filterDisplayedTypes.bind(this)),y(1)),this.halfDayActive$=this.presenceTypes$.pipe(r(this.isHalfDayActive.bind(this)),I(!1),N(),y(1))}getPresenceType(t){return this.presenceTypes$.pipe(r(n=>{let o=n.find(a=>a.Id===t);if(!o)throw new Error("presence type not found");return o}))}loadPresenceTypes(){return this.restService.getList().pipe(r(Xe))}filterActiveTypes(t){return t.filter(n=>n.Active)}filterConfirmationTypes(t){return t.filter(n=>n.NeedsConfirmation&&n.Active&&n.Id!==this.settings.absencePresenceTypeId)}filterIncidentTypes(t){return t.filter(n=>n.IsIncident&&n.Active)}filterDisplayedTypes(t){return t.filter(n=>n.Id!==this.settings.absencePresenceTypeId)}isHalfDayActive(t){return!!t.find(n=>n.Id===this.settings.halfDayPresenceTypeId)?.Active}static{this.\u0275fac=function(n){return new(n||e)(h(Ze),h(v))}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Un=(()=>{class e{constructor(t,n){this.http=t,this.settings=n}editLessonPresences(t,n,o,a,x){let L={LessonIds:t,PersonIds:n};return o!==void 0&&(L.PresenceTypeId=o),a!==void 0&&(L.ConfirmationValue=a),this.http.put(`${this.settings.apiUrl}/LessonPresences/Edit`,L,x).pipe(r(()=>{}))}removeLessonPresences(t,n,o){return this.http.put(`${this.settings.apiUrl}/LessonPresences/Reset`,{LessonIds:t,PersonIds:n,WithComment:!0},o).pipe(r(()=>{}))}confirmLessonPresences(t,n,o,a){let x={LessonIds:t,PersonIds:n,AbsenceTypeId:o,ConfirmationValue:a};return this.http.put(`${this.settings.apiUrl}/LessonAbsences/Confirm`,x).pipe(r(()=>{}))}static{this.\u0275fac=function(n){return new(n||e)(h(H),h(v))}}static{this.\u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tt=(()=>{class e{constructor(t){this.translate=t}transform(t){if(!t)return"";let n=Ue(t,new Date);return this.translate.instant(`shared.daysDifference.${this.getKey(n)}`,{count:Math.abs(n)})}getKey(t){return t===0?"today":t===1?"tomorrow":t===-1?"yesterday":t>0?"in":"ago"}static{this.\u0275fac=function(n){return new(n||e)(j(Ee,16))}}static{this.\u0275pipe=ye({name:"bkdDaysDifference",type:e,pure:!0})}}return e})();function Kn(e){return e.length===0}function nt(e){return Array.isArray(e)}var gt=["checkbox"],bt=(e,i)=>i.Id;function _t(e,i){e&1&&Z(0,"bkd-spinner",2)}function xt(e,i){if(e&1&&Z(0,"bkd-reports-link",13),e&2){let t=m(4);A("reports",t.reports)("disableIfUnavailable",!0)}}function Ct(e,i){if(e&1&&(c(0,"a",14),l(1,"async"),c(2,"i",12),u(3,"mail"),p()()),e&2){let t=m(4);Te("href","mailto:",d(1,2,t.mailTo$),"",fe)}}function Tt(e,i){if(e&1&&(c(0,"div",15),u(1),p()),e&2){let t=m(4);s(),C(" ",t.defaultAbsenceSelectionMessage," ")}}function vt(e,i){if(e&1){let t=V();c(0,"div",6),F("click",function(o){R(t);let a=De(3),x=m(3);return w(x.onRowClick(o,a))}),c(1,"div",7)(2,"input",8,0),l(4,"async"),F("change",function(o){R(t);let a=m(3);return w(a.toggleAll(o.target==null?null:o.target.checked))}),p()(),c(5,"div",9),u(6),l(7,"translate"),p(),c(8,"div",10)(9,"a",11),l(10,"async"),c(11,"i",12),u(12,"edit"),p()(),g(13,xt,1,2,"bkd-reports-link",13)(14,Ct,4,4,"a",14),p(),g(15,Tt,2,1,"div",15),l(16,"async"),p()}if(e&2){let t,n,o=m(3);s(2),A("checked",d(4,8,o.allSelected$)),s(4),E(d(7,10,"open-absences.detail.all")),s(3),he("disabled",((t=d(10,12,o.selectionService==null?null:o.selectionService.selection$))==null?null:t.length)===0),Ce("routerLink",o.confirmLink),s(4),b(o.reports?13:-1),s(),b(o.displayEmail?14:-1),s(),b(o.defaultAbsenceSelectionMessage&&((n=d(16,14,o.selectionService==null?null:o.selectionService.selectedWithoutPresenceType$))!=null&&n.length)?15:-1)}}function St(e,i){if(e&1){let t=V();c(0,"div",7)(1,"input",8,1),l(3,"async"),F("change",function(){R(t);let o=m().$implicit,a=m(3);return w(a.selectionService==null?null:a.selectionService.toggle(o))}),p()()}if(e&2){let t=m().$implicit,n=m(3);s(),A("checked",d(3,1,n.selectionService==null?null:n.selectionService.isSelected$(t)))}}function It(e,i){if(e&1&&u(0),e&2){let t=m().$implicit;C(" , ",t.StudyClassNumber," ")}}function Dt(e,i){if(e&1&&(c(0,"div",20),u(1),p()),e&2){m();let t=Ae(12);s(),C(" ",t," ")}}function Pt(e,i){e&1&&(c(0,"div",21),u(1),l(2,"translate"),p()),e&2&&(s(),C(" ",d(2,1,"my-absences.show.confirm-presence-type")," "))}function Lt(e,i){if(e&1){let t=V();c(0,"div",16),F("click",function(o){let a=R(t).$index,x=m(3);return w(x.onRowClick(o,a))}),g(1,St,4,3,"div",7),l(2,"async"),c(3,"div",17),u(4),g(5,It,1,1),p(),c(6,"div",18),u(7),l(8,"date"),l(9,"date"),p(),c(10,"div",19),u(11),p(),Pe(12),l(13,"async"),g(14,Dt,2,1,"div",20)(15,Pt,3,3,"div",21),c(16,"div",22),u(17),l(18,"date"),p(),c(19,"div",23),u(20),l(21,"bkdDaysDifference"),p(),c(22,"div",24),u(23),l(24,"date"),l(25,"bkdDaysDifference"),p()()}if(e&2){let t=i.$implicit,n=m(3);s(),b(d(2,12,n.editable$)?1:-1),s(3),C(" ",t.EventDesignation," "),s(),b(t.StudyClassNumber?5:-1),s(2),ee(" ",M(8,14,t.LessonDateTimeFrom,"HH:mm"),"\u2013",M(9,17,t.LessonDateTimeTo,"HH:mm")," "),s(4),C(" ",t.TeacherInformation," "),s();let o=Le(d(13,20,n.getPresenceTypeDesignation(t)));s(2),b(o?14:-1),s(),b(n.displayPresenceType&&!o&&n.defaultAbsenceSelectionMessage?15:-1),s(2),C(" ",M(18,23,t.LessonDateTimeFrom,"dd.MM.yyyy")," "),s(3),C(" ",d(21,26,t.LessonDateTimeFrom)," "),s(3),ee(" ",M(24,28,t.LessonDateTimeFrom,"dd.MM.yyyy"),", ",d(25,31,t.LessonDateTimeFrom)," ")}}function At(e,i){if(e&1&&(g(0,vt,17,16,"div",4),l(1,"async"),ge(2,Lt,26,33,"div",5,bt),l(4,"async")),e&2){let t=m(2);b(d(1,1,t.editable$)?0:-1),s(2),be(d(4,3,t.lessonPresences$))}}function kt(e,i){e&1&&(c(0,"p",3),u(1),l(2,"translate"),p()),e&2&&(s(),E(d(2,1,"shared.profile.no-absences")))}function $t(e,i){if(e&1&&(g(0,At,5,5),l(1,"async"),g(2,kt,3,3,"p",3)),e&2){let t,n=m();b(((t=(t=d(1,1,n.lessonPresences$))==null?null:t.length)!==null&&t!==void 0?t:0)>0?0:2)}}var oi=(()=>{class e{constructor(t){this.presenceTypesService=t,this.selectionService=null,this.displayPresenceType=!0,this.defaultAbsenceSelectionMessage=null,this.reports=null,this.confirmLink="confirm",this.displayEmail=!1,this.lessonPresences$$=new k(1),this.lessonPresences$=this.lessonPresences$$.pipe(ue(),I(null),y(1)),this.loading$=this.lessonPresences$.pipe(r(Oe(nt))),this.selectionService$=new k(1),this.editable$=this.selectionService$.pipe(r(()=>!0),I(!1)),this.displayPresenceType$=new se(!0),this.allSelected$=ce([this.lessonPresences$.pipe(pe(Me)),this.selectionService$.pipe(Y(n=>n.selection$))]).pipe(r(([n,o])=>n.length===o.length))}ngOnChanges(t){t.absences$&&this.lessonPresences$$.next(t.absences$.currentValue),t.selectionService&&t.selectionService.currentValue&&(t.selectionService.currentValue.clear(),this.selectionService$.next(t.selectionService.currentValue)),t.displayPresenceType&&this.displayPresenceType$.next(t.displayPresenceType.currentValue)}toggleAll(t){t?this.lessonPresences$.pipe($(1)).subscribe(n=>this.selectionService?.clear(n)):this.selectionService?.clear()}onRowClick(t,n){if(this.checkboxes.length===0)return;let o;typeof n=="number"?o=this.checkboxes.toArray()[n].nativeElement:o=n,t.target!==o&&!t.target.closest(".buttons")&&o.click()}getPresenceTypeDesignation(t){return this.displayPresenceType$.pipe(Y(n=>n?this.presenceTypesService.displayedTypes$:ae([])),r(n=>t.TypeRef.Id&&n.find(o=>o.Id===t.TypeRef.Id)?.Designation||null))}static{this.\u0275fac=function(n){return new(n||e)(j(et))}}static{this.\u0275cmp=U({type:e,selectors:[["bkd-student-dossier-absences"]],viewQuery:function(n,o){if(n&1&&ve(gt,5),n&2){let a;Se(a=Ie())&&(o.checkboxes=a)}},inputs:{absences$:"absences$",selectionService:"selectionService",displayPresenceType:"displayPresenceType",defaultAbsenceSelectionMessage:"defaultAbsenceSelectionMessage",reports:"reports",confirmLink:"confirmLink",displayEmail:"displayEmail",mailTo$:"mailTo$"},features:[me],decls:3,vars:3,consts:[["allCheckbox",""],["checkbox",""],[1,"inline","d-block","mb-3"],[1,"mx-3"],[1,"absence-all"],[1,"absence-entry"],[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"],[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"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"presence-type","confirm"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(n,o){n&1&&(g(0,_t,1,0,"bkd-spinner",2),l(1,"async"),g(2,$t,3,3)),n&2&&b(d(1,1,o.loading$)?0:2)},dependencies:[G,He,Ge,ke,$e,K,tt],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})}}return e})();var Rt=["*"],ci=(()=>{class e{constructor(){this.link=[]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=U({type:e,selectors:[["bkd-backlink"]],inputs:{link:"link",params:"params"},ngContentSelectors:Rt,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(n,o){n&1&&(_e(),c(0,"div",0)(1,"a",1)(2,"span",2),u(3,"arrow_back"),p(),c(4,"span",3),u(5),l(6,"translate"),p()(),xe(7),p()),n&2&&(s(),A("routerLink",o.link)("queryParams",o.params),s(4),E(d(6,3,"global.back")))},dependencies:[G,K],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}"]})}}return e})();export{qe as a,We as b,Vt as c,ot as d,rt as e,W as f,Ke as g,Ft as h,f as i,st as j,Q as k,Qt as l,zt as m,lt as n,Qe as o,z as p,on as q,rn as r,sn as s,an as t,ze as u,mn as v,fn as w,yn as x,In as y,Xe as z,Pn as A,Ln as B,et as C,Un as D,tt as E,Kn as F,oi as G,ci as H}; diff --git a/public/apps/webapp-schulverwaltung/chunk-WHFJNRLF.js b/public/apps/webapp-schulverwaltung/chunk-WHFJNRLF.js new file mode 100644 index 00000000..57553a8f --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-WHFJNRLF.js @@ -0,0 +1,2 @@ +import{a as Ot}from"./chunk-BGWLZKVI.js";import{a as Ft}from"./chunk-ETZGBBG5.js";import{a as Pt,b as Dt,c as Et}from"./chunk-2ZRHGKSY.js";import{f as Fe,g as Ee}from"./chunk-26VH6QDS.js";import{c as Rt,d as $t}from"./chunk-JGKXAFYO.js";import"./chunk-A7EOJZ46.js";import"./chunk-ZELJ2QPT.js";import{a as Bt}from"./chunk-UZJ4FIXB.js";import{A as St,B as xt,D as me,E as It,F as Tt,G as Lt,H as wt,b as de,f as Q,g as ht,h as vt,k as De,n as he,o as je,z as Ct}from"./chunk-KQORGECX.js";import{a as _t,d as ue}from"./chunk-K42F6AEW.js";import{e as gt,o as _e}from"./chunk-NC6UEGAF.js";import{i as At,j as kt}from"./chunk-SL67CYEF.js";import{h as Mt}from"./chunk-HQSONWXM.js";import{c as ct,d as pt,e as lt,f as dt,g as mt,h as ut,i as ft,l as bt,x as te,z as yt}from"./chunk-RXRYDGZR.js";import{a as pe}from"./chunk-F4XODHS2.js";import{$ as u,$a as K,$b as nt,Bb as Ze,Bc as ot,Cb as et,Cc as xe,Db as tt,Dc as re,Eb as O,Ec as Ae,Ed as ae,F,Fa as Qe,Fb as J,Fd as we,Gb as $,Gd as Pe,Hb as se,Hd as ee,Ia as T,Ib as Z,J as Ge,Jb as oe,L as qe,M as E,Ma as ve,Nb as r,Nd as ce,O as Ue,Ob as p,P as M,Pa as h,Pb as P,R as We,Rd as le,Sa as b,Sd as D,Ta as ie,Ud as H,Va as Ye,X as ne,Xa as C,Yc as He,Za as Ce,_a as W,a as Oe,ab as a,bb as c,cb as S,dc as Se,ea as A,f as ge,fa as I,g as Ne,gb as B,gc as z,gd as rt,h as Ve,hc as it,hd as V,ia as Ke,ib as v,jb as _,kd as Ie,l as j,ma as ze,mc as st,md as at,n as y,nd as Te,o as x,od as ke,sb as Xe,sd as Me,tb as Je,ub as L,ud as Le,vb as d,wb as R,wd as Re,x as U,xb as f,xd as $e,ya as s,yb as X,za as G}from"./chunk-NEW5VGRB.js";var fe=(()=>{class t{constructor(){this.settings=u(V),this.storageService=u(H),this.studentsService=u(Fe),this.studentId$=new Ve(1),this.lessonAbsences$=this.studentId$.pipe(M(this.loadLessonAbsences.bind(this)),E(1)),this.lessonIncidents$=this.studentId$.pipe(M(this.loadLessonIncidents.bind(this)),E(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$=x([this.openAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),E(1)),this.checkableLessonAbsences$=x([this.checkableAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),E(1)),this.excusedLessonAbsences$=x([this.excusedAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),E(1)),this.unexcusedLessonAbsences$=x([this.unexcusedAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),E(1)),this.incidentsLessonAbsences$=x([this.incidents$.pipe(U(te)),this.lessonIncidents$]).pipe(y(ue(this.getLessonIncidents.bind(this))),E(1)),this.counts$=this.getCounts();let e=this.storageService.getPayload()?.id_person;e&&this.studentId$.next(Number(e))}reset(){this.studentId$.pipe(F(1)).subscribe(e=>this.studentId$.next(e))}getLessonPresences(){return this.getCached(x([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(M(([e,n,i])=>this.loadTimetableEntries(e,n,i).pipe(y(o=>this.buildLessonPresences(n,i,o)))),y(xt)))}getAbsences(e){return this.getCached(this.lessonPresences$.pipe(y(n=>n?.filter(i=>i.ConfirmationStateId===e)||null)))}getLessonAbsences(e,n){let i=e.map(o=>o.LessonRef.Id);return n.filter(o=>i.includes(o.LessonRef.Id))}getLessonIncidents(e,n){let i=e.map(o=>o.LessonRef.Id);return n.filter(o=>i.includes(o.LessonRef.Id))}getCounts(){return x([this.getCount(this.checkableAbsences$),this.getCount(this.openAbsences$),this.getCount(this.excusedAbsences$),this.getCount(this.unexcusedAbsences$),this.getCount(this.incidents$)]).pipe(y(([e,n,i,o,l])=>({checkableAbsences:e,openAbsences:n,excusedAbsences:i,unexcusedAbsences:o,incidents:l,halfDays:null})))}getCached(e){return e.pipe(Ue(null),qe({connector:()=>new Ve(1)}))}getCount(e){return e.pipe(y(n=>n?.length??null))}loadLessonAbsences(e){return this.studentsService.getLessonAbsences(e)}loadLessonIncidents(e){return this.studentsService.getLessonIncidents(e)}loadTimetableEntries(e,n,i){return this.studentsService.getTimetableEntries(e,{"filter.Id":`;${[...n,...i].map(o=>o.LessonRef.Id).join(";")}`})}buildLessonPresences(e,n,i){return[...e,...n].map(o=>this.buildLessonPresence(o,i)).filter(te)}buildLessonPresence(e,n){let i=n.find(o=>o.Id===e.LessonRef.Id);return i?{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:i.EventDesignation,HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:i.From,LessonDateTimeTo:i.To,Comment:null,Date:i.From,Type:e.Type,StudentFullName:e.StudentFullName,StudyClassNumber:"",TeacherInformation:i.EventManagerInformation??null}:null}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();var Be=(()=>{class t{constructor(e,n,i,o,l,g,w,Y){this.fb=e,this.router=n,this.toastService=i,this.translate=o,this.presenceTypesService=l,this.updateService=g,this.storageService=w,this.settings=Y,this.formGroup=this.createFormGroup(),this.saving$=new Ne(!1),this.submitted$=new Ne(!1),this.absenceTypes$=x([this.getConfirmationTypes(),this.getHalfDayType()]).pipe(y(([q,k])=>k?[...q,k]:q)),this.absenceTypeIdErrors$=_t(j(this.formGroup),this.submitted$,"absenceTypeId"),this.destroy$=new ge}ngOnInit(){this.selectedLessonIds$.pipe(F(1),U(Tt)).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(y(e=>e.length))}getConfirmationTypes(){return this.presenceTypesService.confirmationTypes$.pipe(y(e=>e.filter(n=>n.IsAbsence&&n.Id!==this.settings.halfDayPresenceTypeId)))}getHalfDayType(){return j(null)}createFormGroup(){return this.fb.group({absenceTypeId:[null,at.required]})}save(e){this.saving$.next(!0),this.selectedLessonIds$.pipe(F(1),M(n=>this.updateService.editLessonPresences(n,[Number(this.storageService.getPayload()?.id_person)],e)),Ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-absences.confirm.save-success")),this.navigateBack()}static{this.\u0275fac=function(n){return new(n||t)(G(ae),G(re),G(pe),G(le),G(Q),G(de),G(H),G(rt))}}static{this.\u0275cmp=T({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(n,i){},encapsulation:2})}}return t})();var Yt=(t,m)=>m.Id,Xt=t=>({count:t}),Jt=t=>({"border-top pt-3":t});function Zt(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;s(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function en(t,m){if(t&1&&(W(0,Zt,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);K(p(2,0,e.absenceTypeIdErrors$))}}function tn(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,en,3,2),r(6,"async"),c()),t&2){let e,n,i=m.$implicit,o=m.$index,l=_();b("ngClass",oe(12,Jt,i.IsHalfDay)),s(),ie("is-invalid",((e=(e=p(2,8,l.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+o)("value",i.Id),s(2),b("for","absence-type-"+o),s(),f(" ",i.Designation," "),s(),C(((n=(n=p(6,10,l.absenceTypes$))==null?null:n.length)!==null&&n!==void 0?n:0)-1===o?5:-1)}}function nn(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var Vt=(()=>{class t extends Be{constructor(){let e=u(ae),n=u(re),i=u(pe),o=u(le),l=u(Q),g=u(de),w=u(H),Y=u(V);super(e,n,i,o,l,g,w,Y),this.myAbsencesService=u(fe),this.selectionService=u(me),this.titleKey="my-absences.confirm.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(q=>ce(ee(q.map(k=>k.lessonIds))))),this.confirmationStateId=this.settings.unconfirmedAbsencesRefreshTime}onSaveSuccess(){this.selectionService.clear(),this.myAbsencesService.reset(),super.onSaveSuccess()}navigateBack(){this.router.navigate(["/my-absences"])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ve],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(n,i){if(n&1){let o=B();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),O(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),v("ngSubmit",function(){return A(o),I(i.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),W(15,tn,7,14,"div",5,Yt),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),v("click",function(){return A(o),I(i.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,nn,3,0,"div",10),r(31,"async"),c()()()()}if(n&2){s(2),R(p(3,11,i.titleKey));let o=p(6,13,i.getSelectedCount());s(5),f(" ",P(8,15,o===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,Xt,o))," "),s(2),b("formGroup",i.formGroup),s(3),X("",p(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),s(3),K(p(17,23,i.absenceTypes$)),s(4),f(" ",p(20,25,"my-absences.confirm.remark")," "),s(3),b("disabled",p(23,27,i.saving$)),s(2),f(" ",p(25,29,"my-absences.confirm.cancel")," "),s(2),b("disabled",p(27,31,i.saving$)),s(2),f(" ",p(29,33,"my-absences.confirm.save")," "),s(2),C(p(31,35,i.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var be=(()=>{class t extends Ct{constructor(){super(...arguments),this.selectedIds$=this.selection$.pipe(y(St))}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})()}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();var ye=(()=>{class t extends Dt{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(){let e=u(nt),n=u(At),i=u(V),o=u(Et);super(e,n,o,i,"/my-absences/report"),this.studentsService=u(Fe),this.storageService=u(H)}getInitialFilter(){return{dateFrom:null,dateTo:null}}isValidFilter(e){return!!(e.dateFrom||e.dateTo)}loadEntries(e,n,i){let o=this.buildRequestParamsFromFilter(e).set("sort","From.asc");return this.loadingService.load(this.loadTimetableEntries(o).pipe(y(l=>this.filterAbsencesAfterLessonStart(l)),M(l=>x([j(l),this.loadLessonAbsences(l),this.loadLessonDispensations(l)])),y(([l,g,w])=>this.buildLessonPresences(l,g,w)),y(l=>({offset:0,total:l.length,entries:l}))),Pt)}filterAbsencesAfterLessonStart(e){return this.preventAbsencesAfterStart?e.filter(n=>n.From.getTime()>=new Date().getTime()):e}buildParamsFromFilter(e){let{dateFrom:n,dateTo:i}=e,o={};return n&&(o.dateFrom=_e(n,"yyyy-MM-dd")),i&&(o.dateTo=_e(i,"yyyy-MM-dd")),o}buildRequestParamsFromFilter(e){let n=new st;return e.dateFrom&&(n=n.set("filter.From",`>${_e(vt(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(n=n.set("filter.To",`<${_e(ht(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(";")}`}):j([])}loadLessonDispensations(e){return e.length>0?this.studentsService.getLessonDispensations(this.studentId,{"filter.Id":`;${e.map(n=>n.Id).join(";")}`}):j([])}buildLessonPresences(e,n,i){return e.map(o=>this.buildLessonPresence(o,n,i))}buildLessonPresence(e,n,i){let o=n.find(w=>w.LessonRef.Id===e.Id),l=i.find(w=>w.LessonRef.Id===e.Id),g=this.buildLessonPresenceTypeRef(o,l);return{Id:"",LessonRef:{Id:e.Id,HRef:null},StudentRef:(o||l)?.StudentRef||{Id:this.studentId,HRef:null},EventRef:{Id:0,HRef:null},TypeRef:g,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:o?.ConfirmationStateId||l&&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:(o||l)?.Type||null,StudentFullName:(o||l)?.StudentFullName||"",StudyClassNumber:"",TeacherInformation:e.EventManagerInformation??null}}buildLessonPresenceTypeRef(e,n){return e?Oe({},e.TypeRef):n?Oe({},n.TypeRef):{Id:null,HRef:null}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ne({token:t,factory:t.\u0275fac})}}return t})();var sn=(t,m)=>m.Id,on=t=>({count:t}),rn=t=>({"border-top pt-3":t});function an(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;s(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function cn(t,m){if(t&1&&(W(0,an,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);K(p(2,0,e.absenceTypeIdErrors$))}}function pn(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,cn,3,2),r(6,"async"),c()),t&2){let e,n,i=m.$implicit,o=m.$index,l=_();b("ngClass",oe(12,rn,i.IsHalfDay)),s(),ie("is-invalid",((e=(e=p(2,8,l.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+o)("value",i.Id),s(2),b("for","absence-type-"+o),s(),f(" ",i.Designation," "),s(),C(((n=(n=p(6,10,l.absenceTypes$))==null?null:n.length)!==null&&n!==void 0?n:0)-1===o?5:-1)}}function ln(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var Ht=(()=>{class t extends Be{constructor(){let e=u(ae),n=u(re),i=u(pe),o=u(le),l=u(Q),g=u(de),w=u(H),Y=u(V);super(e,n,i,o,l,g,w,Y),this.state=u(ye),this.selectionService=u(be),this.titleKey="my-absences.report.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(q=>ce(ee(q.map(k=>k.lessonIds))))),this.confirmationStateId=this.settings.checkableAbsenceStateId}getHalfDayType(){return this.presenceTypesService.getPresenceType(this.settings.halfDayPresenceTypeId).pipe(y(e=>e.Active?e:null))}onSaveSuccess(){this.selectionService.clear(),this.state.resetEntries(),super.onSaveSuccess()}navigateBack(){this.state.queryParams$.pipe(F(1)).subscribe(e=>{this.router.navigate(["/my-absences/report"],{queryParams:e})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ve],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[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"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(n,i){if(n&1){let o=B();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),O(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),v("ngSubmit",function(){return A(o),I(i.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),W(15,pn,7,14,"div",5,sn),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),v("click",function(){return A(o),I(i.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,ln,3,0,"div",10),r(31,"async"),c()()()()}if(n&2){s(2),R(p(3,11,i.titleKey));let o=p(6,13,i.getSelectedCount());s(5),f(" ",P(8,15,o===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,on,o))," "),s(2),b("formGroup",i.formGroup),s(3),X("",p(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),s(3),K(p(17,23,i.absenceTypes$)),s(4),f(" ",p(20,25,"my-absences.confirm.remark")," "),s(3),b("disabled",p(23,27,i.saving$)),s(2),f(" ",p(25,29,"my-absences.confirm.cancel")," "),s(2),b("disabled",p(27,31,i.saving$)),s(2),f(" ",p(29,33,"my-absences.confirm.save")," "),s(2),C(p(31,35,i.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var dn=()=>["/my-absences"],Gt=(()=>{class t{constructor(){this.filter={dateFrom:null,dateTo:null},this.filterChange=new ze,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:jt(this.filter.dateFrom),dateTo:jt(this.filter.dateTo)})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-report-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[se([{provide:ut,useClass:bt},{provide:ft,useClass:Ft}])],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,i){n&1&&(S(0,"bkd-backlink",0),a(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1)(5,"div",2)(6,"label",3),d(7),r(8,"translate"),c(),a(9,"bkd-date-select",4),v("valueChange",function(l){return i.updateDateFrom(l)}),c()(),a(10,"div",2)(11,"label",3),d(12),r(13,"translate"),c(),a(14,"bkd-date-select",4),tt("valueChange",function(l){return et(i.filter.dateTo,l)||(i.filter.dateTo=l),l}),c()(),a(15,"div",5)(16,"button",6),v("click",function(){return i.show()}),d(17),r(18,"translate"),c()()()),n&2&&(b("link",Z(17,dn)),s(2),R(p(3,9,"my-absences.report.title")),s(5),R(p(8,11,"my-absences.report.header.date-from")),s(2),b("minDate",i.minDate)("value",i.filter.dateFrom),s(3),R(p(13,13,"my-absences.report.header.date-to")),s(2),b("minDate",i.minDate),Ze("value",i.filter.dateTo),s(3),f(" ",p(18,15,"my-absences.report.header.show")," "))},dependencies:[wt,Ot,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})}}return t})();function jt(t){return t?gt(t):null}var mn=(t,m)=>m.Id;function un(t,m){t&1&&S(0,"bkd-spinner")}function fn(t,m){if(t&1){let e=B();a(0,"div",8)(1,"input",9,2),r(3,"async"),v("change",function(){A(e);let i=_().$implicit,o=_(5);return I(o.selectionService.toggle(i))}),c()()}if(t&2){let e=_().$implicit,n=_(5);s(),b("checked",p(3,1,n.selectionService.isSelected$(e)))}}function bn(t,m){if(t&1&&(a(0,"div")(1,"i",13),d(2),c()()),t&2){_();let e=$(2);Ye("checkbox presence-category ",e.category,""),s(2),R(e.icon)}}function yn(t,m){if(t&1&&d(0),t&2){let e=_().$implicit;f(" , ",e.StudyClassNumber," ")}}function _n(t,m){if(t&1&&(a(0,"div",20),d(1),c()),t&2){_();let e=$(15);s(),f(" ",e," ")}}function hn(t,m){if(t&1){let e=B();a(0,"div",15,1),v("click",function(i){A(e);let o=L(1),l=_(5);return I(l.onRowClick(i,o))}),O(2),r(3,"async"),h(4,fn,4,3,"div",8)(5,bn,3,4,"div",16),a(6,"div",17),d(7),h(8,yn,1,1),c(),a(9,"div",18),d(10),r(11,"date"),r(12,"date"),c(),a(13,"div",19),d(14),c(),O(15),r(16,"async"),h(17,_n,2,1,"div",20),a(18,"div",21),d(19),r(20,"date"),c(),a(21,"div",22),d(22),r(23,"bkdDaysDifference"),c(),a(24,"div",23),d(25),r(26,"date"),r(27,"bkdDaysDifference"),c()()}if(t&2){let e=m.$implicit,n=_(5);s(2);let i=J(p(3,11,n.getPresenceCategory(e)));s(2),C(i?5:4),s(3),f(" ",e.EventDesignation," "),s(),C(e.StudyClassNumber?8:-1),s(2),X(" ",P(11,14,e.LessonDateTimeFrom,"HH:mm"),"\u2013",P(12,17,e.LessonDateTimeTo,"HH:mm")," "),s(4),f(" ",e.TeacherInformation," "),s();let o=J(p(16,20,n.getPresenceTypeDesignation(e)));s(2),C(o?17:-1),s(2),f(" ",P(20,23,e.LessonDateTimeFrom,"dd.MM.yyyy")," "),s(3),f(" ",p(23,26,e.LessonDateTimeFrom)," "),s(3),X(" ",P(26,28,e.LessonDateTimeFrom,"dd.MM.yyyy"),", ",p(27,31,e.LessonDateTimeFrom)," ")}}function gn(t,m){if(t&1){let e=B();a(0,"div")(1,"div",7,0),v("click",function(i){A(e);let o=L(2),l=_(4);return I(l.onRowClick(i,o))}),a(3,"div",8)(4,"input",9),r(5,"async"),v("change",function(i){A(e);let o=_(4);return I(o.toggleAll(i.target==null?null:i.target.checked))}),c()(),a(6,"div",10),d(7),r(8,"translate"),c(),a(9,"div",11)(10,"a",12),r(11,"async"),a(12,"i",13),d(13,"edit"),c()()()(),W(14,hn,28,33,"div",14,mn),c()}if(t&2){let e,n=_(4),i=$(0);s(4),b("checked",p(5,4,n.allSelected$)),s(3),f(" ",p(8,6,"my-absences.report.list.all")," "),s(3),ie("disabled",((e=p(11,8,n.selectionService.selection$))==null?null:e.length)===0),s(4),K(i)}}function vn(t,m){t&1&&S(0,"bkd-spinner",6)}function Cn(t,m){if(t&1&&(a(0,"div",5),h(1,gn,16,10,"div")(2,vn,1,0,"bkd-spinner",6),c()),t&2){_(3);let e=$(0),n=$(2);s(),C(e&&e.length>0?1:-1),s(),C(n?2:-1)}}function Sn(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(s(),f(" ",p(2,1,"my-absences.report.no-entries")," "))}function xn(t,m){if(t&1&&h(0,Cn,3,2,"div",5)(1,Sn,3,3,"p",4),t&2){_(2);let e=$(0),n=$(2);C(e&&e.length>0||n?0:1)}}function An(t,m){if(t&1&&(h(0,un,1,0,"bkd-spinner"),r(1,"async"),h(2,xn,2,1)),t&2){let e=_();C(p(1,1,e.state.loading$)?0:2)}}function In(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(s(),R(p(2,1,"my-absences.report.no-filter")))}var qt=(()=>{class t{constructor(){this.state=u(ye),this.selectionService=u(be),this.route=u(ot),this.scrollPosition=u(Bt),this.presenceTypesService=u(Q),this.settings=u(V),this.filterFromParams$=this.route.queryParams.pipe(y(Tn)),this.allSelected$=x([this.selectionService.selection$,this.state.entries$.pipe(M(e=>x(e.map(n=>this.getPresenceType(n)))))]).pipe(y(([e,n])=>e.length>0&&e.length===n.filter(yt(De)).length)),this.destroy$=new ge}ngOnInit(){this.filterFromParams$.pipe(F(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(We(this.destroy$)).subscribe(()=>this.selectionService.clear())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}getPresenceCategory(e){return this.getPresenceType(e).pipe(y(n=>De(n)?e.ConfirmationStateId===this.settings.checkableAbsenceStateId?{category:he.Unapproved,icon:je(he.Unapproved)}:{category:he.Absent,icon:je(he.Absent)}:null))}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(y(n=>e.TypeRef.Id&&n.find(i=>i.Id===e.TypeRef.Id)?.Designation||null))}toggleAll(e){x([this.state.entries$.pipe(F(1)),this.presenceTypesService.presenceTypes$.pipe(F(1))]).subscribe(([n,i])=>{let o=i.filter(l=>De(l)).map(l=>l.Id);this.selectionService.clear(e?n.filter(l=>l.TypeRef.Id==null||!o.includes(l.TypeRef.Id)):null)})}onRowClick(e,n){let i=n.querySelector('input[type="checkbox"]');i&&e.target!==i&&!e.target.closest(".buttons")&&i.click()}getPresenceType(e){return this.presenceTypesService.presenceTypes$.pipe(y(n=>e.TypeRef.Id&&n.find(i=>i.Id===e.TypeRef.Id)||null))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-report-list"]],decls:9,vars:12,consts:[["all",""],["row",""],["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"inline"],[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"],[1,"entry"],[1,"entry",3,"click"],[3,"class"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(n,i){if(n&1){let o=B();O(0),r(1,"async"),O(2),r(3,"async"),a(4,"bkd-my-absences-report-header",3),r(5,"async"),v("filterChange",function(g){return A(o),I(i.state.setFilter(g))}),c(),h(6,An,3,3),r(7,"async"),h(8,In,3,3,"p",4)}n&2&&(J(p(1,2,i.state.entries$)),s(2),J(p(3,5,i.state.loadingPage$)),s(2),b("filter",p(5,8,i.filterFromParams$)),s(2),C(p(7,10,i.state.isFilterValid$)?6:8))},dependencies:[Gt,Ae,Mt,z,it,D,It],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})}}return t})();function Tn(t){return{dateFrom:t.dateFrom?He(t.dateFrom):null,dateTo:t.dateTo?He(t.dateTo):null}}var Ut=(()=>{class t{constructor(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-report"]],features:[se([ye,be])],decls:1,vars:0,template:function(n,i){n&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var kn=["link"],Mn=()=>["/my-absences/report"],Wt=(()=>{class t{onClick(){this.link().nativeElement.click()}constructor(){this.link=Qe.required("link")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-report-link"]],viewQuery:function(n,i){n&1&&Xe(i.link,kn,5),n&2&&Je()},hostBindings:function(n,i){n&1&&v("click",function(l){return i.onClick(l)})},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,i){n&1&&(a(0,"h5",1),d(1),r(2,"translate"),c(),a(3,"a",2,0)(5,"div",3)(6,"i",4),d(7,"keyboard_arrow_right"),c()()()),n&2&&(s(),f(" ",p(2,2,"my-absences.report.title"),` +`),s(2),b("routerLink",Z(4,Mn)))},dependencies:[Ae,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})}}return t})();var Kt=()=>[];function Ln(t,m){}function Rn(t,m){if(t&1&&d(0),t&2){_();let e=$(0);f(" (",e==null?null:e.checkableAbsences,") ")}}function $n(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.checkableAbsences$)}}function wn(t,m){if(t&1&&d(0),t&2){_();let e=$(0);f(" (",e==null?null:e.openAbsences,") ")}}function Pn(t,m){if(t&1&&(S(0,"bkd-student-dossier-absences",16),r(1,"translate"),r(2,"async")),t&2){let e,n=_();b("absences$",n.myAbsencesService.openAbsences$)("selectionService",n.absencesSelectionService)("defaultAbsenceSelectionMessage",p(1,4,"my-absences.show.default-absence-selection-message"))("reports",(e=p(2,6,n.openAbsencesReports$))!==null&&e!==void 0?e:Z(8,Kt))}}function Dn(t,m){if(t&1&&d(0),t&2){_();let e=$(0);f(" (",e==null?null:e.excusedAbsences,") ")}}function Fn(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.excusedAbsences$)}}function En(t,m){if(t&1&&d(0),t&2){_();let e=$(0);f(" (",e==null?null:e.unexcusedAbsences,") ")}}function Bn(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",17),t&2){let e=_();b("absences$",e.myAbsencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function On(t,m){if(t&1&&d(0),t&2){_();let e=$(0);f(" (",e==null?null:e.incidents,") ")}}function Nn(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.incidents$)}}var zt=(()=>{class t{constructor(){this.reportsService=u($t),this.myAbsencesService=u(fe),this.absencesSelectionService=u(me),this.openAbsencesReports$=this.loadOpenAbsencesReports(),this.allAbsencesReports$=this.loadAllAbsencesReports()}loadOpenAbsencesReports(){return x([this.absencesSelectionService.selectedWithoutPresenceType$,this.absencesSelectionService.selectedIds$]).pipe(M(([e,n])=>e.length===0&&n.length>0?this.getOpenAbsencesRecordIds(ce(ee(n.map(i=>i.lessonIds)))):j([])),M(e=>this.reportsService.getStudentConfirmationReports(e)),E(1))}loadAllAbsencesReports(){return x([this.myAbsencesService.openLessonAbsences$,this.myAbsencesService.checkableLessonAbsences$,this.myAbsencesService.excusedLessonAbsences$,this.myAbsencesService.unexcusedLessonAbsences$,this.myAbsencesService.incidentsLessonAbsences$]).pipe(y(e=>this.getAllAbsencesRecordIds(ee(e))),M(e=>this.reportsService.getMyAbsencesReports(e)),E(1))}getAllAbsencesRecordIds(e){return e.map(n=>`${n.LessonRef.Id}_${n.RegistrationId}`)}getOpenAbsencesRecordIds(e){return this.myAbsencesService.openLessonAbsences$.pipe(y(n=>n.filter(i=>e.includes(i.LessonRef.Id)).map(i=>`${i.LessonRef.Id}_${i.RegistrationId}`)))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences-show"]],decls:70,vars:38,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],[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"],[3,"absences$"],[3,"absences$","selectionService","defaultAbsenceSelectionMessage","reports"],[3,"absences$","displayPresenceType"]],template:function(n,i){if(n&1){let o=B();O(0),r(1,"async"),a(2,"div",5)(3,"h1"),d(4),r(5,"translate"),c(),a(6,"div",6)(7,"div"),d(8),r(9,"translate"),c(),a(10,"div",7),S(11,"bkd-reports-link",8),r(12,"async"),c()(),a(13,"div",9)(14,"div",10)(15,"div",11),S(16,"bkd-my-absences-report-link"),c(),a(17,"div",12)(18,"div",13),h(19,Ln,0,0,"ng-template"),c()()(),a(20,"div",10,0)(22,"div",11)(23,"bkd-student-dossier-entry-header",14),v("click",function(){A(o);let g=L(21);return I(g.toggle())}),d(24),r(25,"translate"),h(26,Rn,1,1),c()(),a(27,"div",12)(28,"div",13),h(29,$n,1,1,"ng-template"),c()()(),a(30,"div",10,1)(32,"div",11)(33,"bkd-student-dossier-entry-header",14),v("click",function(){A(o);let g=L(31);return I(g.toggle())}),d(34),r(35,"translate"),h(36,wn,1,1),c()(),a(37,"div",12)(38,"div",13),h(39,Pn,3,9,"ng-template"),c()()(),a(40,"div",10,2)(42,"div",11)(43,"bkd-student-dossier-entry-header",14),v("click",function(){A(o);let g=L(41);return I(g.toggle())}),d(44),r(45,"translate"),h(46,Dn,1,1),c()(),a(47,"div",12)(48,"div",13),h(49,Fn,1,1,"ng-template"),c()()(),a(50,"div",10,3)(52,"div",11)(53,"bkd-student-dossier-entry-header",14),v("click",function(){A(o);let g=L(51);return I(g.toggle())}),d(54),r(55,"translate"),h(56,En,1,1),c()(),a(57,"div",12)(58,"div",13),h(59,Bn,1,2,"ng-template"),c()()(),a(60,"div",10,4)(62,"div",11)(63,"bkd-student-dossier-entry-header",14),v("click",function(){A(o);let g=L(61);return I(g.toggle())}),d(64),r(65,"translate"),h(66,On,1,1),c()(),a(67,"div",12)(68,"div",13),h(69,Nn,1,1,"ng-template"),c()()()()()}if(n&2){let o,l=L(21),g=L(31),w=L(41),Y=L(51),q=L(61),k=J(p(1,18,i.myAbsencesService.counts$));s(4),R(p(5,21,"my-absences.title")),s(4),R(p(9,23,"my-absences.description")),s(3),b("reports",(o=p(12,25,i.allAbsencesReports$))!==null&&o!==void 0?o:Z(37,Kt)),s(12),b("opened",!l.collapsed),s(),f(" ",p(25,27,"shared.profile.checkable-absences")," "),s(2),C((k==null?null:k.checkableAbsences)!==null?26:-1),s(7),b("opened",!g.collapsed),s(),f(" ",p(35,29,"shared.profile.open-absences")," "),s(2),C((k==null?null:k.openAbsences)!==null?36:-1),s(7),b("opened",!w.collapsed),s(),f(" ",p(45,31,"shared.profile.excused-absences")," "),s(2),C((k==null?null:k.excusedAbsences)!==null?46:-1),s(7),b("opened",!Y.collapsed),s(),f(" ",p(55,33,"shared.profile.unexcused-absences")," "),s(2),C((k==null?null:k.unexcusedAbsences)!==null?56:-1),s(7),b("opened",!q.collapsed),s(),f(" ",p(65,35,"shared.profile.incidents")," "),s(2),C((k==null?null:k.incidents)!==null?66:-1)}},dependencies:[kt,mt,dt,lt,Wt,pt,ct,Rt,Lt,z,D],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();var Qt=(()=>{class t{constructor(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["bkd-my-absences"]],features:[se([fe,me])],decls:1,vars:0,template:function(n,i){n&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var wo=[{path:"",component:Qt,children:[{path:"",component:zt},{path:"confirm",component:Vt},{path:"report",component:Ut,children:[{path:"",component:qt,data:{restoreScrollPositionFrom:["/my-absences/report/confirm"]}},{path:"confirm",component:Ht}]}]}];export{wo as MY_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-XKNLLORS.js b/public/apps/webapp-schulverwaltung/chunk-XKNLLORS.js deleted file mode 100644 index 71810f24..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-XKNLLORS.js +++ /dev/null @@ -1 +0,0 @@ -import{Ic as t,Jc as n,Oc as o,Qc as r}from"./chunk-S3H6YSFW.js";var i=o({Key:r([n,t]),Value:t});export{i as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-XYEOQKXF.js b/public/apps/webapp-schulverwaltung/chunk-XYEOQKXF.js deleted file mode 100644 index a31c96b5..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-XYEOQKXF.js +++ /dev/null @@ -1 +0,0 @@ -import{p as Y,r as z,s as Q,t as W,w as X}from"./chunk-LY5STZD6.js";import"./chunk-Y4QYVF5K.js";import"./chunk-XKNLLORS.js";import{d as K}from"./chunk-UN6AN2DI.js";import"./chunk-A7CCEKNQ.js";import{i as J,j as V}from"./chunk-2AZMKO7X.js";import{b as U}from"./chunk-HLAFRD2O.js";import{D as w,x}from"./chunk-QTBTUQ3W.js";import{$a as u,Ab as G,Bb as I,Cb as $,Db as b,Eb as O,Ga as l,Jb as o,Kb as a,M as E,Na as j,P as _,Qa as v,Qd as R,Sd as q,Va as B,X as P,_ as p,_a as g,ab as m,cc as M,dd as N,h as L,hb as A,n as d,o as k,rb as y,s as D,sb as C,ya as c,yc as H,za as h}from"./chunk-S3H6YSFW.js";var f=(()=>{class e{constructor(s,t,n,S,se,ne,oe){this.storageService=s,this.loadingService=t,this.coursesRestService=n,this.subscriptionRestService=S,this.reportsService=se,this.gradingScalesRestService=ne,this.settings=oe,this.studentId$=new L(1),this.loading$=this.loadingService.loading$,this.studentCourses$=this.loadCourses().pipe(E(1)),this.studentCoursesSorted$=this.studentCourses$.pipe(d(i=>i.slice().sort((r,ae)=>r.Designation.localeCompare(ae.Designation)))),this.studentCourseIds$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.Id))),this.subscriptionIds$=k([this.studentId$,this.studentCourseIds$]).pipe(_(([i,r])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(i,r))),this.testReports$=this.subscriptionIds$.pipe(d(i=>this.reportsService.getStudentSubscriptionGradesReports(i))),this.tests$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.Tests).filter(x))),this.gradingScaleIdsFromTests$=this.tests$.pipe(d(i=>[...i.map(r=>r.GradingScaleId)].filter(x).filter(w))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.GradingScaleId).filter(x).filter(w))),this.gradingScaleIds$=k([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(d(([i,r])=>i.concat(r).filter(w))),this.gradingScales$=this.gradingScaleIds$.pipe(_(i=>D(i.map(r=>this.gradingScalesRestService.getGradingScale(r)))));let F=this.storageService.getPayload()?.id_person;F&&this.studentId$.next(Number(F))}loadCourses(){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForStudent())}static{this.\u0275fac=function(t){return new(t||e)(p(q),p(V),p(Y),p(z),p(K),p(Q),p(N))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var de=()=>[],ee=(()=>{class e{constructor(s){this.myGradesService=s}static{this.\u0275fac=function(t){return new(t||e)(h(f))}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades-header"]],decls:7,vars:7,consts:[[1,"d-flex","justify-content-between","header"],[3,"reports"]],template:function(t,n){if(t&1&&(g(0,"div",0)(1,"div"),y(2),o(3,"translate"),u(),g(4,"div"),m(5,"bkd-reports-link",1),o(6,"async"),u()()),t&2){let S;c(2),C(a(3,2,"my-grades.header")),c(3),v("reports",(S=a(6,4,n.myGradesService.testReports$))!==null&&S!==void 0?S:O(6,de))}},dependencies:[J,M,R],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}.report[_ngcontent-%COMP%]{margin-left:1rem}"]})}}return e})();function pe(e,re){e&1&&m(0,"bkd-spinner")}function ce(e,re){if(e&1&&m(0,"bkd-dossier-grades-view",1),e&2){A();let s=$(0),t=$(2),n=$(4);v("courses",s)("studentId",t)("gradingScales",n)("isEditable",!1)}}var te=(()=>{class e{constructor(s){this.myGradesService=s}static{this.\u0275fac=function(t){return new(t||e)(h(f))}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades-show"]],features:[b([W])],decls:14,vars:15,consts:[[1,"bkd-container","bkd-container-limited"],[3,"courses","studentId","gradingScales","isEditable"]],template:function(t,n){t&1&&(G(0),o(1,"async"),G(2),o(3,"async"),G(4),o(5,"async"),g(6,"div",0)(7,"h1"),y(8),o(9,"translate"),u(),m(10,"bkd-my-grades-header"),j(11,pe,1,0,"bkd-spinner"),o(12,"async"),j(13,ce,1,4,"bkd-dossier-grades-view",1),u()),t&2&&(I(a(1,2,n.myGradesService.studentCoursesSorted$)),c(2),I(a(3,5,n.myGradesService.studentId$)),c(2),I(a(5,8,n.myGradesService.gradingScales$)),c(4),C(a(9,11,"my-grades.title")),c(3),B(a(12,13,n.myGradesService.loading$)?11:13))},dependencies:[ee,X,U,M,R],encapsulation:2})}}return e})();var ie=(()=>{class e{constructor(){}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades"]],features:[b([f])],decls:1,vars:0,template:function(t,n){t&1&&m(0,"router-outlet")},dependencies:[H],encapsulation:2})}}return e})();var Ee=[{path:"",component:ie,children:[{path:"",component:te}]}];export{Ee as MY_GRADES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-PU3XKQPJ.js b/public/apps/webapp-schulverwaltung/chunk-Y3BQLEPF.js similarity index 90% rename from public/apps/webapp-schulverwaltung/chunk-PU3XKQPJ.js rename to public/apps/webapp-schulverwaltung/chunk-Y3BQLEPF.js index 993c80e5..51155d58 100644 --- a/public/apps/webapp-schulverwaltung/chunk-PU3XKQPJ.js +++ b/public/apps/webapp-schulverwaltung/chunk-Y3BQLEPF.js @@ -1 +1 @@ -import{A as H,v as B}from"./chunk-QTBTUQ3W.js";import{$a as o,Bd as V,D as _,Ga as O,H as u,J as h,Jb as l,Kb as p,Ld as N,Na as g,P as T,Pa as S,Qa as f,Qd as D,Va as y,_a as a,cc as P,da as I,ea as M,eb as $,fa as E,g as m,gb as C,gd as k,hb as x,jd as w,n as c,nd as F,rb as d,x as v,ya as r}from"./chunk-S3H6YSFW.js";function z(n,s){if(n&1){let e=$();a(0,"button",6),C("click",function(t){M(e);let b=x();return E(b.modelChange(t))}),a(1,"i",2),d(2,"clear"),o()()}}function L(n,s){n&1&&(a(0,"div",5)(1,"div",7)(2,"span",8),d(3,"Loading..."),o()()())}var A=300,j=3,ne=(()=>{class n{constructor(){this.selectedItem$=new m(null),this.placeholder="shared.typeahead.default-placeholder",this.valueChange=this.selectedItem$.pipe(c(e=>e?e.Key:null),u()),this.componentId=N("bkd-typeahead-"),this.loading$=new m(!1),this.search=e=>e.pipe(q(j,A),T(this.fetchItems.bind(this)))}ngOnChanges(e){e.value&&e.value.currentValue&&e.value.currentValue!==this.selectedItemKey&&this.fetchItem(e.value.currentValue).subscribe(i=>{this.modelChange(i)})}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(h(()=>this.loading$.next(!1)))}fetchItem(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItemByKey(e).pipe(h(()=>this.loading$.next(!1)))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=O({type:n,selectors:[["bkd-typeahead"]],inputs:{typeaheadService:"typeaheadService",placeholder:"placeholder",value:"value",additionalHttpParams:"additionalHttpParams"},outputs:{valueChange:"valueChange"},features:[I],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"],["type","button",1,"btn","btn-link","text-decoration-none"],[1,"spinner-container"],["type","button",1,"btn","btn-link","text-decoration-none",3,"click"],["role","status",1,"spinner-border","spinner-border-sm"],[1,"visually-hidden"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),d(3,"search"),o()(),a(4,"input",3),l(5,"async"),l(6,"translate"),l(7,"translate"),C("ngModelChange",function(K){return t.modelChange(K)}),o(),g(8,z,3,0,"button",4),o(),g(9,L,4,0,"div",5),l(10,"async")),i&2&&(r(),f("id",t.componentId),r(3),f("ngbTypeahead",t.search)("inputFormatter",t.format)("resultFormatter",t.format)("ngModel",p(5,10,t.selectedItem$)),S("placeholder",p(6,12,t.placeholder))("aria-label",p(7,14,t.placeholder))("aria-describedby",t.componentId),r(4),y(t.value?8:-1),r(),y(p(10,16,t.loading$)?9:-1))},dependencies:[B,V,k,w,F,P,D],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})}}return n})();function q(n,s){return e=>e.pipe(_(s),c(U),u(),v(H(n)))}function U(n){return n.trim().toLowerCase()}export{ne as a}; +import{A as H,v as B}from"./chunk-RXRYDGZR.js";import{D as _,Fd as V,H as u,Ia as O,J as h,Nb as l,Ob as p,P as T,Pa as g,Pd as N,Ra as S,Sa as f,Sd as D,Xa as y,ab as a,bb as o,da as I,ea as M,fa as E,g as m,gb as $,gc as P,ib as C,jb as x,kd as k,n as c,nd as w,rd as F,vb as d,x as v,ya as r}from"./chunk-NEW5VGRB.js";function z(n,s){if(n&1){let e=$();a(0,"button",6),C("click",function(t){M(e);let b=x();return E(b.modelChange(t))}),a(1,"i",2),d(2,"clear"),o()()}}function L(n,s){n&1&&(a(0,"div",5)(1,"div",7)(2,"span",8),d(3,"Loading..."),o()()())}var A=300,j=3,ne=(()=>{class n{constructor(){this.selectedItem$=new m(null),this.placeholder="shared.typeahead.default-placeholder",this.valueChange=this.selectedItem$.pipe(c(e=>e?e.Key:null),u()),this.componentId=N("bkd-typeahead-"),this.loading$=new m(!1),this.search=e=>e.pipe(q(j,A),T(this.fetchItems.bind(this)))}ngOnChanges(e){e.value&&e.value.currentValue&&e.value.currentValue!==this.selectedItemKey&&this.fetchItem(e.value.currentValue).subscribe(i=>{this.modelChange(i)})}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(h(()=>this.loading$.next(!1)))}fetchItem(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItemByKey(e).pipe(h(()=>this.loading$.next(!1)))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=O({type:n,selectors:[["bkd-typeahead"]],inputs:{typeaheadService:"typeaheadService",placeholder:"placeholder",value:"value",additionalHttpParams:"additionalHttpParams"},outputs:{valueChange:"valueChange"},features:[I],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"],["type","button",1,"btn","btn-link","text-decoration-none"],[1,"spinner-container"],["type","button",1,"btn","btn-link","text-decoration-none",3,"click"],["role","status",1,"spinner-border","spinner-border-sm"],[1,"visually-hidden"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),d(3,"search"),o()(),a(4,"input",3),l(5,"async"),l(6,"translate"),l(7,"translate"),C("ngModelChange",function(K){return t.modelChange(K)}),o(),g(8,z,3,0,"button",4),o(),g(9,L,4,0,"div",5),l(10,"async")),i&2&&(r(),f("id",t.componentId),r(3),f("ngbTypeahead",t.search)("inputFormatter",t.format)("resultFormatter",t.format)("ngModel",p(5,10,t.selectedItem$)),S("placeholder",p(6,12,t.placeholder))("aria-label",p(7,14,t.placeholder))("aria-describedby",t.componentId),r(4),y(t.value?8:-1),r(),y(p(10,16,t.loading$)?9:-1))},dependencies:[B,V,k,w,F,P,D],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})}}return n})();function q(n,s){return e=>e.pipe(_(s),c(U),u(),v(H(n)))}function U(n){return n.trim().toLowerCase()}export{ne as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-ZELJ2QPT.js b/public/apps/webapp-schulverwaltung/chunk-ZELJ2QPT.js new file mode 100644 index 00000000..0f8f2717 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-ZELJ2QPT.js @@ -0,0 +1 @@ +import{$ as r,Rd as s,Sb as g,Ud as u,X as o}from"./chunk-NEW5VGRB.js";var i=["de-CH","fr-CH"],n=i[0];function f(){return[{provide:g,useFactory:t=>t.detectLanguage(),deps:[c]}]}var c=(()=>{class t{constructor(){this.translate=r(s),this.storage=r(u)}initialize(){this.translate.setDefaultLang(n),this.translate.use(this.detectLanguage())}detectLanguage(){return this.detectedLanguage||(this.detectedLanguage=this.getDocumentLanguage()||this.getStoredLanguage()||this.getBrowserLanguage()||n),this.detectedLanguage}getLocalizedLanguage(e){return e=i.find(a=>a===`${(e||"").toLowerCase()}-CH`),e||n}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&&i.find(a=>e===a.split("-")[0])||null}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{f as a,c as b}; diff --git a/public/apps/webapp-schulverwaltung/doc/reactivity.md b/public/apps/webapp-schulverwaltung/doc/angular.md similarity index 62% rename from public/apps/webapp-schulverwaltung/doc/reactivity.md rename to public/apps/webapp-schulverwaltung/doc/angular.md index b2196fed..4edd2704 100644 --- a/public/apps/webapp-schulverwaltung/doc/reactivity.md +++ b/public/apps/webapp-schulverwaltung/doc/angular.md @@ -1,6 +1,21 @@ [back](../README.md) -# Reactivity +# Angular Conventions + +## General + +- We use [standalone components](https://angular.dev/reference/migrations/standalone) and no Angular modules +- We use [control flow syntax](https://angular.dev/reference/migrations/control-flow) +- We use the [inject function](https://angular.dev/reference/migrations/inject-function) instead of constructor injection +- We use [signal inputs](https://angular.dev/reference/migrations/signal-inputs) instead of `@Input` +- We use the [output function](https://angular.dev/reference/migrations/outputs) instead of `@Output` +- We use the [model signal](https://angular.dev/api/core/model) for two-way input/output pairs (e.g. `name` input and `nameChange` output) +- We use [signal queries](https://angular.dev/reference/migrations/signal-queries) instead of `@ViewChild()`, `@ViewChildren`, `@ContentChild` and `@ContentChildren` +- We use [OnPush](https://angular.dev/best-practices/skipping-subtrees#using-onpush) instead of the `Default` change detection strategy + - As a consequence, state has to be handled reactively, using signals (preferred) or observables (for more advanced async use cases) → see next section + - When generating components with `ng generate component` the correct strategy will already be configured + +## Reactivity Previously the go-to tool for reactivity has been RxJS and observables. With Angular 17 a new reactive building block has been introduced: signals. With this change Angular is shifting towards signal-based APIs and patterns. But as of 2025 this is still "work in progress" and there are dos and don'ts to consider: diff --git a/public/apps/webapp-schulverwaltung/index.html b/public/apps/webapp-schulverwaltung/index.html index 9a5c883c..0d30e393 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 d7eb1ad7..96a5016c 100644 --- a/public/apps/webapp-schulverwaltung/main.js +++ b/public/apps/webapp-schulverwaltung/main.js @@ -1 +1 @@ -import{b as An}from"./chunk-RC3KCROY.js";import{c as wn}from"./chunk-CXJU4L5R.js";import{a as Tn,b as bn}from"./chunk-M5HHSMYB.js";import{t as pn}from"./chunk-QTBTUQ3W.js";import{a as ge}from"./chunk-HVJBOTRL.js";import{$ as G,$a as Y,Ac as hn,B as jt,Ca as Gt,Cc as dn,Dc as mn,Fd as gn,Ga as J,Jb as fe,Kb as pe,Md as yn,Na as xt,Od as _n,Pd as Sn,Qa as Ne,Qd as Oe,Rd as En,Sa as Wt,Sd as vn,V as v,Va as Jt,Wa as Yt,Wb as nn,X as q,Xa as Xt,Ya as Ce,Z as qt,Za as Fe,_ as R,_a as Q,_b as rt,a as Pe,ab as Zt,c as Bt,cc as sn,cd as fn,dd as X,ea as Ut,eb as en,fa as Qt,gb as tn,hb as it,k as Kt,lc as rn,mc as ke,na as De,nc as on,oa as Ht,oc as an,pc as ln,qc as cn,rb as oe,sa as Vt,sb as st,tb as Re,ua as nt,ya as U,yc as un,za as re,zc as Ie}from"./chunk-S3H6YSFW.js";function _i(i){let e=i,t=Math.floor(Math.abs(i)),n=i.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var Mn=["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",_i];function Si(i){let e=i,t=Math.floor(Math.abs(i)),n=i.toString().replace(/^[^.]*\.?/,"").length,s=parseInt(i.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:s===0&&t!==0&&t%1e6===0&&n===0||!(s>=0&&s<=5)?4:5}var Pn=["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",Si];function Ei(i,e){if(i&1&&(Q(0,"i",3),oe(1),Y()),i&2){let t=it().$implicit;U(),st(t.icon)}}function vi(i,e){if(i&1){let t=en();Q(0,"ngb-toast",1),tn("hidden",function(){let s=Ut(t).$implicit,r=it();return Qt(r.toastService.remove(s))}),Q(1,"div",2),xt(2,Ei,2,1,"i",3),Q(3,"span"),oe(4),Y()()()}if(i&2){let t=e.$implicit;Wt(t.classname),Ne("header",t.header||"")("autohide",!0),U(2),Jt(t.icon?2:-1),U(2),st(t.message)}}var Nn=(()=>{class i{constructor(t){this.toastService=t}static{this.\u0275fac=function(n){return new(n||i)(re(ge))}}static{this.\u0275cmp=J({type:i,selectors:[["bkd-toast"]],decls:3,vars:2,consts:[[3,"header","class","autohide"],[3,"hidden","header","autohide"],[1,"d-flex","gap-2"],[1,"material-icons"]],template:function(n,s){n&1&&(Ce(0,vi,5,6,"ngb-toast",0,Xt),fe(2,"async")),n&2&&Fe(pe(2,0,s.toastService.toasts$))},dependencies:[pn,sn],styles:["[_nghost-%COMP%]{position:fixed;top:0;right:0;margin:.5em;z-index:1200}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{font-size:medium}"]})}}return i})();var Cn=new qt("Navigator API",{providedIn:"root",factory:()=>navigator});var Fn=(()=>{class i{constructor(t,n,s,r){this.toastService=n,this.settings=s,this.navigator=r,t.initialize(),this.checkSettings()}checkSettings(){yn(fn)(this.settings).pipe(jt(t=>(console.error(String(t)),this.toastService.error("Please check the contents of the settings.js file (see Console output for more details).","Invalid Settings"),Kt))).subscribe()}static{this.\u0275fac=function(n){return new(n||i)(re(bn),re(ge),re(X),re(Cn))}}static{this.\u0275cmp=J({type:i,selectors:[["bkd-app"]],decls:2,vars:0,consts:[["aria-live","polite","aria-atomic","true"]],template:function(n,s){n&1&&Zt(0,"bkd-toast",0)(1,"router-outlet")},dependencies:[Nn,un],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}}return i})();var _=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(_||{}),H="*";function Rn(i,e=null){return{type:_.Sequence,steps:i,options:e}}function ot(i){return{type:_.Style,styles:i,offset:null}}var ee=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){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(n=>n()),t.length=0}},Se=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,n=0,s=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++n==r&&this._onDestroy()}),o.onStart(()=>{++s==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(n=>{let s=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(s)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n: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(n=>n()),t.length=0}},Le="!";function kn(i){return new v(3e3,!1)}function Ti(){return new v(3100,!1)}function bi(){return new v(3101,!1)}function wi(i){return new v(3001,!1)}function Ai(i){return new v(3003,!1)}function Mi(i){return new v(3004,!1)}function Pi(i,e){return new v(3005,!1)}function Di(){return new v(3006,!1)}function Ni(){return new v(3007,!1)}function Ci(i,e){return new v(3008,!1)}function Fi(i){return new v(3002,!1)}function Ri(i,e,t,n,s){return new v(3010,!1)}function ki(){return new v(3011,!1)}function Ii(){return new v(3012,!1)}function Oi(){return new v(3200,!1)}function Li(){return new v(3202,!1)}function $i(){return new v(3013,!1)}function zi(i){return new v(3014,!1)}function Bi(i){return new v(3015,!1)}function Ki(i){return new v(3016,!1)}function ji(i,e){return new v(3404,!1)}function qi(i){return new v(3502,!1)}function Ui(i){return new v(3503,!1)}function Qi(){return new v(3300,!1)}function Hi(i){return new v(3504,!1)}function Vi(i){return new v(3301,!1)}function Gi(i,e){return new v(3302,!1)}function xi(i){return new v(3303,!1)}function Wi(i,e){return new v(3400,!1)}function Ji(i){return new v(3401,!1)}function Yi(i){return new v(3402,!1)}function Xi(i,e){return new v(3505,!1)}function te(i){switch(i.length){case 0:return new ee;case 1:return i[0];default:return new Se(i)}}function Gn(i,e,t=new Map,n=new Map){let s=[],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 m=y,g=S;if(y!=="offset")switch(m=i.normalizePropertyName(m,s),g){case Le:g=t.get(y);break;case H:g=n.get(y);break;default:g=i.normalizeStyleValue(y,m,g,s);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),s.length)throw qi(s);return r}function Dt(i,e,t,n){switch(e){case"start":i.onStart(()=>n(t&&at(t,"start",i)));break;case"done":i.onDone(()=>n(t&&at(t,"done",i)));break;case"destroy":i.onDestroy(()=>n(t&&at(t,"destroy",i)));break}}function at(i,e,t){let n=t.totalTime,s=!!t.disabled,r=Nt(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,n??i.totalTime,s),o=i._data;return o!=null&&(r._data=o),r}function Nt(i,e,t,n,s="",r=0,o){return{element:i,triggerName:e,fromState:t,toState:n,phaseName:s,totalTime:r,disabled:!!o}}function O(i,e,t){let n=i.get(e);return n||i.set(e,n=t),n}function In(i){let e=i.indexOf(":"),t=i.substring(1,e),n=i.slice(e+1);return[t,n]}var Zi=typeof document>"u"?null:document.documentElement;function Ct(i){let e=i.parentNode||i.host||null;return e===Zi?null:e}function es(i){return i.substring(1,6)=="ebkit"}var ae=null,On=!1;function ts(i){ae||(ae=ns()||{},On=ae.style?"WebkitAppearance"in ae.style:!1);let e=!0;return ae.style&&!es(i)&&(e=i in ae.style,!e&&On&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in ae.style)),e}function ns(){return typeof document<"u"?document.body:null}function xn(i,e){for(;e;){if(e===i)return!0;e=Ct(e)}return!1}function Wn(i,e,t){if(t)return Array.from(i.querySelectorAll(e));let n=i.querySelector(e);return n?[n]:[]}var Ft=(()=>{class i{validateStyleProperty(t){return ts(t)}containsElement(t,n){return xn(t,n)}getParentElement(t){return Ct(t)}query(t,n,s){return Wn(t,n,s)}computeStyle(t,n,s){return s||""}animate(t,n,s,r,o,a=[],l){return new ee(s,r)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=q({token:i,factory:i.\u0275fac})}return i})(),ue=class{static NOOP=new Ft},he=class{};var is=1e3,Jn="{{",ss="}}",Yn="ng-enter",mt="ng-leave",$e="ng-trigger",qe=".ng-trigger",Ln="ng-animating",ft=".ng-animating";function x(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:pt(parseFloat(e[1]),e[2])}function pt(i,e){switch(e){case"s":return i*is;default:return i}}function Ue(i,e,t){return i.hasOwnProperty("duration")?i:rs(i,e,t)}function rs(i,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,s,r=0,o="";if(typeof i=="string"){let a=i.match(n);if(a===null)return e.push(kn(i)),{duration:0,delay:0,easing:""};s=pt(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=pt(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else s=i;if(!t){let a=!1,l=e.length;s<0&&(e.push(Ti()),a=!0),r<0&&(e.push(bi()),a=!0),a&&e.splice(l,0,kn(i))}return{duration:s,delay:r,easing:o}}function os(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function V(i,e,t){e.forEach((n,s)=>{let r=Rt(s);t&&!t.has(s)&&t.set(s,i.style[r]),i.style[r]=n})}function ce(i,e){e.forEach((t,n)=>{let s=Rt(n);i.style[s]=""})}function Ee(i){return Array.isArray(i)?i.length==1?i[0]:Rn(i):i}function as(i,e,t){let n=e.params||{},s=Xn(i);s.length&&s.forEach(r=>{n.hasOwnProperty(r)||t.push(wi(r))})}var gt=new RegExp(`${Jn}\\s*(.+?)\\s*${ss}`,"g");function Xn(i){let e=[];if(typeof i=="string"){let t;for(;t=gt.exec(i);)e.push(t[1]);gt.lastIndex=0}return e}function Te(i,e,t){let n=`${i}`,s=n.replace(gt,(r,o)=>{let a=e[o];return a==null&&(t.push(Ai(o)),a=""),a.toString()});return s==n?i:s}var ls=/-+([a-z0-9])/g;function Rt(i){return i.replace(ls,(...e)=>e[1].toUpperCase())}function cs(i,e){return i===0||e===0}function us(i,e,t){if(t.size&&e.length){let n=e[0],s=[];if(t.forEach((r,o)=>{n.has(o)||s.push(o),n.set(o,r)}),s.length)for(let r=1;ro.set(a,kt(i,a)))}}return e}function I(i,e,t){switch(e.type){case _.Trigger:return i.visitTrigger(e,t);case _.State:return i.visitState(e,t);case _.Transition:return i.visitTransition(e,t);case _.Sequence:return i.visitSequence(e,t);case _.Group:return i.visitGroup(e,t);case _.Animate:return i.visitAnimate(e,t);case _.Keyframes:return i.visitKeyframes(e,t);case _.Style:return i.visitStyle(e,t);case _.Reference:return i.visitReference(e,t);case _.AnimateChild:return i.visitAnimateChild(e,t);case _.AnimateRef:return i.visitAnimateRef(e,t);case _.Query:return i.visitQuery(e,t);case _.Stagger:return i.visitStagger(e,t);default:throw Mi(e.type)}}function kt(i,e){return window.getComputedStyle(i)[e]}var hs=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"]),Qe=class extends he{normalizePropertyName(e,t){return Rt(e)}normalizeStyleValue(e,t,n,s){let r="",o=n.toString().trim();if(hs.has(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&s.push(Pi(e,n))}return o+r}};var He="*";function ds(i,e){let t=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>ms(n,t,e)):t.push(i),t}function ms(i,e,t){if(i[0]==":"){let l=fs(i,t);if(typeof l=="function"){e.push(l);return}i=l}let n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(Bi(i)),e;let s=n[1],r=n[2],o=n[3];e.push($n(s,o));let a=s==He&&o==He;r[0]=="<"&&!a&&e.push($n(o,s))}function fs(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var ze=new Set(["true","1"]),Be=new Set(["false","0"]);function $n(i,e){let t=ze.has(i)||Be.has(i),n=ze.has(e)||Be.has(e);return(s,r)=>{let o=i==He||i==s,a=e==He||e==r;return!o&&t&&typeof s=="boolean"&&(o=s?ze.has(i):Be.has(i)),!a&&n&&typeof r=="boolean"&&(a=r?ze.has(e):Be.has(e)),o&&a}}var Zn=":self",ps=new RegExp(`s*${Zn}s*,?`,"g");function ei(i,e,t,n){return new yt(i).build(e,t,n)}var zn="",yt=class{_driver;constructor(e){this._driver=e}build(e,t,n){let s=new _t(t);return this._resetContextStyleTimingState(s),I(this,Ee(e),s)}_resetContextStyleTimingState(e){e.currentQuerySelector=zn,e.collectedStyles=new Map,e.collectedStyles.set(zn,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,s=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Di()),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);n+=l.queryCount,s+=l.depCount,o.push(l)}else t.errors.push(Ni())}),{type:_.Trigger,name:e.name,states:r,transitions:o,queryCount:n,depCount:s,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),s=e.options&&e.options.params||null;if(n.containsDynamicStyles){let r=new Set,o=s||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Xn(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Ci(e.name,[...r.values()]))}return{type:_.State,name:e.name,style:n,options:s?{params:s}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=I(this,Ee(e.animation),t),s=ds(e.expr,t.errors);return{type:_.Transition,matchers:s,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:le(e.options)}}visitSequence(e,t){return{type:_.Sequence,steps:e.steps.map(n=>I(this,n,t)),options:le(e.options)}}visitGroup(e,t){let n=t.currentTime,s=0,r=e.steps.map(o=>{t.currentTime=n;let a=I(this,o,t);return s=Math.max(s,t.currentTime),a});return t.currentTime=s,{type:_.Group,steps:r,options:le(e.options)}}visitAnimate(e,t){let n=Ss(e.timings,t.errors);t.currentAnimateTimings=n;let s,r=e.styles?e.styles:ot({});if(r.type==_.Keyframes)s=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};n.easing&&(c.easing=n.easing),o=ot(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,s=l}return t.currentAnimateTimings=null,{type:_.Animate,timings:n,style:s,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],s=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of s)typeof a=="string"?a===H?n.push(a):t.errors.push(Fi(a)):n.push(new Map(Object.entries(a)));let r=!1,o=null;return n.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(Jn)>=0){r=!0;break}}}),{type:_.Style,styles:n,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,s=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.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!=s&&r>=h.startTime&&s<=h.endTime&&(t.errors.push(Ri(l,h.startTime,h.endTime,r,s)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:s}),t.options&&as(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(ki()),n;let s=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:_s(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=m+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=N,n.styles.push(w)}),n}visitReference(e,t){return{type:_.Reference,animation:I(this,Ee(e.animation),t),options:le(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:le(e.options)}}visitAnimateRef(e,t){return{type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:le(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,s=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=gs(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,O(t.collectedStyles,t.currentQuerySelector,new Map);let a=I(this,Ee(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:_.Query,selector:r,limit:s.limit||0,optional:!!s.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:le(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push($i());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Ue(e.timings,t.errors,!0);return{type:_.Stagger,animation:I(this,Ee(e.animation),t),timings:n,options:null}}};function gs(i){let e=!!i.split(/\s*,\s*/).find(t=>t==Zn);return e&&(i=i.replace(ps,"")),i=i.replace(/@\*/g,qe).replace(/@\w+/g,t=>qe+"-"+t.slice(1)).replace(/:animating/g,ft),[i,e]}function ys(i){return i?Pe({},i):null}var _t=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function _s(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Ss(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let r=Ue(i,e).duration;return lt(r,0,"")}let t=i;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=lt(0,0,"");return r.dynamic=!0,r.strValue=t,r}let s=Ue(t,e);return lt(s.duration,s.delay,s.easing)}function le(i){return i?(i=Pe({},i),i.params&&(i.params=ys(i.params))):i={},i}function lt(i,e,t){return{duration:i,delay:e,easing:t}}function It(i,e,t,n,s,r,o=null,a=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:n,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:a}}var be=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Es=1,vs=":enter",Ts=new RegExp(vs,"g"),bs=":leave",ws=new RegExp(bs,"g");function ti(i,e,t,n,s,r=new Map,o=new Map,a,l,c=[]){return new St().buildKeyframes(i,e,t,n,s,r,o,a,l,c)}var St=class{buildKeyframes(e,t,n,s,r,o,a,l,c,h=[]){c=c||new be;let u=new Et(e,t,c,s,r,h,[]);u.options=l;let S=l.delay?x(l.delay):0;u.currentTimeline.delayNextStep(S),u.currentTimeline.setStyles([o],null,u.errors,l),I(this,n,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[It(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let s=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,s,s.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let s of e){let r=s?.delay;if(r){let o=typeof r=="number"?r:x(Te(r,s?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime,o=n.duration!=null?x(n.duration):null,a=n.delay!=null?x(n.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),I(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,s=t,r=e.options;if(r&&(r.params||r.delay)&&(s=t.createSubContext(r),s.transformIntoNewTimeline(),r.delay!=null)){s.previousNode.type==_.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=Ve);let o=x(r.delay);s.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>I(this,o,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>n&&s.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],s=t.currentTimeline.currentTime,r=e.options&&e.options.delay?x(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),I(this,o,a),s=Math.max(s,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(s),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,s=t.params?Te(n,t.params,t.errors):n;return Ue(s,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),s=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),s.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),s.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,s=t.currentAnimateTimings;!s&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=s&&s.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,s=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.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(s+r),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,s=e.options||{},r=s.delay?x(s.delay):0;r&&(t.previousNode.type===_.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ve);let o=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!s.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),I(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 n=t.parentContext,s=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=n.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;I(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=s.currentTime-u+(s.startTime-n.currentTimeline.startTime)}},Ve={},Et=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ve;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,n,s,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=s,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Ge(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,s=this.options;n.duration!=null&&(s.duration=x(n.duration)),n.delay!=null&&(s.delay=x(n.delay));let r=n.params;if(r){let o=s.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Te(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(s=>{n[s]=t[s]})}}return e}createSubContext(e=null,t,n){let s=t||this.element,r=new i(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,n||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=Ve,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let s={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},r=new vt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,s,e.stretchStartingKeyframe);return this.timelines.push(r),s}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,s,r,o){let a=[];if(s&&a.push(this.element),e.length>0){e=e.replace(Ts,"."+this._enterClassName),e=e.replace(ws,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!r&&a.length==0&&o.push(zi(t)),a}},Ge=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,n,s){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=s,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 i(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+=Es,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,n]of this._globalTimelineStyles)this._backFill.set(t,n||H),this._currentKeyframe.set(t,H);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,s){t&&this._previousKeyframe.set("easing",t);let r=s&&s.params||{},o=As(e,this._globalTimelineStyles);for(let[a,l]of o){let c=Te(l,r,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??H),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,n)=>{let s=this._styleSummary.get(n);(!s||t.time>s.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,s=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===Le?e.add(u):h===H&&t.add(u)}),n||c.set("offset",l/this.duration),s.push(c)});let r=[...e.values()],o=[...t.values()];if(n){let a=s[0],l=new Map(a);a.set("offset",0),l.set("offset",1),s=[a,l]}return It(this.element,s,r,o,this.duration,this.startTime,this.easing,!1)}},vt=class extends Ge{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,n,s,r,o,a=!1){super(e,t,o.delay),this.keyframes=n,this.preStyleProps=s,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:n,easing:s}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=n+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",Bn(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"),m=t+y*n;S.set("offset",Bn(m/o)),r.push(S)}n=o,t=0,s="",e=r}return It(this.element,e,this.preStyleProps,this.postStyleProps,n,t,s,!0)}};function Bn(i,e=3){let t=Math.pow(10,e-1);return Math.round(i*t)/t}function As(i,e){let t=new Map,n;return i.forEach(s=>{if(s==="*"){n??=e.keys();for(let r of n)t.set(r,H)}else for(let[r,o]of s)t.set(r,o)}),t}function Kn(i,e,t,n,s,r,o,a,l,c,h,u,S){return{type:0,element:i,triggerName:e,isRemovalTransition:s,fromState:t,fromStyles:r,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:S}}var ct={},xe=class{_triggerName;ast;_stateStyles;constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,s){return Ms(this.ast.matchers,e,t,n,s)}buildStyles(e,t,n){let s=this._stateStyles.get("*");return e!==void 0&&(s=this._stateStyles.get(e?.toString())||s),s?s.buildStyles(t,n):new Map}build(e,t,n,s,r,o,a,l,c,h){let u=[],S=this.ast.options&&this.ast.options.params||ct,y=a&&a.params||ct,m=this.buildStyles(n,y,u),g=l&&l.params||ct,T=this.buildStyles(s,g,u),w=new Set,A=new Map,N=new Map,P=s==="void",de={params:ni(g,S),delay:this.ast.options?.delay},K=h?[]:ti(e,t,this.ast.animation,r,o,m,T,de,c,u),C=0;return K.forEach(F=>{C=Math.max(F.duration+F.delay,C)}),u.length?Kn(t,this._triggerName,n,s,P,m,T,[],[],A,N,C,u):(K.forEach(F=>{let ne=F.element,me=O(A,ne,new Set);F.preStyleProps.forEach(ie=>me.add(ie));let Ot=O(N,ne,new Set);F.postStyleProps.forEach(ie=>Ot.add(ie)),ne!==t&&w.add(ne)}),Kn(t,this._triggerName,n,s,P,m,T,K,[...w.values()],A,N,C))}};function Ms(i,e,t,n,s){return i.some(r=>r(e,t,n,s))}function ni(i,e){let t=Pe({},e);return Object.entries(i).forEach(([n,s])=>{s!=null&&(t[n]=s)}),t}var Tt=class{styles;defaultParams;normalizer;constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,s=ni(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=Te(o,s,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),n.set(a,o)})}),n}};function Ps(i,e,t){return new bt(i,e,t)}var bt=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,t.states.forEach(s=>{let r=s.options&&s.options.params||{};this.states.set(s.name,new Tt(s.style,r,n))}),jn(this.states,"true","1"),jn(this.states,"false","0"),t.transitions.forEach(s=>{this.transitionFactories.push(new xe(e,s,this.states))}),this.fallbackTransition=Ds(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,s){return this.transitionFactories.find(o=>o.match(e,t,n,s))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function Ds(i,e,t){let n=[(o,a)=>!0],s={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:s,matchers:n,options:null,queryCount:0,depCount:0};return new xe(i,r,e)}function jn(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}var Ns=new be,wt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n}register(e,t){let n=[],s=[],r=ei(this._driver,t,n,s);if(n.length)throw Ui(n);this._animations.set(e,r)}_buildPlayer(e,t,n){let s=e.element,r=Gn(this._normalizer,e.keyframes,t,n);return this._driver.animate(s,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let s=[],r=this._animations.get(e),o,a=new Map;if(r?(o=ti(this._driver,t,r,Yn,mt,new Map,new Map,n,Ns,s),o.forEach(h=>{let u=O(a,h.element,new Map);h.postStyleProps.forEach(S=>u.set(S,null))})):(s.push(Qi()),o=[]),s.length)throw Hi(s);a.forEach((h,u)=>{h.forEach((S,y)=>{h.set(y,this._driver.computeStyle(u,y,H))})});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 n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Vi(e);return t}listen(e,t,n,s){let r=Nt(t,"","","");return Dt(this._getPlayer(e),n,r,s),()=>{}}command(e,t,n,s){if(n=="register"){this.register(e,s[0]);return}if(n=="create"){let o=s[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(n){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(s[0]));break;case"destroy":this.destroy(e);break}}},qn="ng-animate-queued",Cs=".ng-animate-queued",ut="ng-animate-disabled",Fs=".ng-animate-disabled",Rs="ng-star-inserted",ks=".ng-star-inserted",Is=[],ii={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Os={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},z="__ng_removed",we=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),s=n?e.value:e;if(this.value=$s(s),n){let r=e,{value:o}=r,a=Bt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(s=>{n[s]==null&&(n[s]=t[s])})}}},ve="void",ht=new we(ve),At=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+e,$(t,this._hostClassName)}listen(e,t,n,s){if(!this._triggers.has(t))throw Gi(n,t);if(n==null||n.length==0)throw xi(t);if(!zs(n))throw Wi(n,t);let r=O(this._elementListeners,e,[]),o={name:t,phase:n,callback:s};r.push(o);let a=O(this._engine.statesByElement,e,new Map);return a.has(t)||($(e,$e),$(e,$e+"-"+t),a.set(t,ht)),()=>{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 Ji(e);return t}trigger(e,t,n,s=!0){let r=this._getTrigger(t),o=new Ae(this.id,t,e),a=this._engine.statesByElement.get(e);a||($(e,$e),$(e,$e+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new we(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ht),!(c.value===ve)&&l.value===c.value){if(!js(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(()=>{ce(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),m=!1;if(!y){if(!s)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||($(e,qn),o.onStart(()=>{ye(e,qn)})),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,n)=>{this._elementListeners.set(n,t.filter(s=>s.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,qe,!0);n.forEach(s=>{if(s[z])return;let r=this._engine.fetchNamespacesByElement(s);r.size?r.forEach(o=>o.triggerLeaveAnimation(s,t,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(e,t,n,s){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,ve,s);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),n&&te(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let s=new Set;t.forEach(r=>{let o=r.name;if(s.has(o))return;s.add(o);let l=this._triggers.get(o).fallbackTransition,c=n.get(o)||ht,h=new we(ve),u=new Ae(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 n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let s=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(e):[];if(r&&r.length)s=!0;else{let o=e;for(;o=o.parentNode;)if(n.statesByElement.get(o)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(e),s)n.markElementAsRemoved(this.id,e,!1,t);else{let r=e[z];(!r||r===ii)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){$(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let s=n.player;if(s.destroyed)return;let r=n.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==n.triggerName){let l=Nt(r,n.triggerName,n.fromState.value,n.toState.value);l._data=e,Dt(n.player,a.phase,l,a.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):t.push(n)}),this._queue=[],t.sort((n,s)=>{let r=n.transition.ast.depCount,o=s.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(n.element,s.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Mt=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new At(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,s=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=s.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(e)}else n.push(e);return s.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let s=this._namespaceLookup[e];s&&s.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let s=this._namespaceList.indexOf(n);s>=0&&this._namespaceList.splice(s,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let s of n.values())if(s.namespaceId){let r=this._fetchNamespace(s.namespaceId);r&&t.add(r)}}return t}trigger(e,t,n,s){if(Ke(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,n,s),!0}return!1}insertNode(e,t,n,s){if(!Ke(t))return;let r=t[z];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,n)}s&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),$(e,ut)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ye(e,ut))}removeNode(e,t,n){if(Ke(t)){let s=e?this._fetchNamespace(e):null;s?s.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,s,r){this.collectedLeaveElements.push(t),t[z]={namespaceId:e,setForRemoval:s,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,n,s,r){return Ke(t)?this._fetchNamespace(e).listen(t,n,s,r):()=>{}}_buildInstruction(e,t,n,s,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,s,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,qe,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,ft,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return te(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[z];if(t&&t.setForRemoval){if(e[z]=ii,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ut)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Fs,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,s)=>this._balanceNamespaceList(n,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?te(t).onDone(()=>{n.forEach(s=>s())}):n.forEach(s=>s())}}reportError(e){throw Yi(e)}_flushAnimations(e,t){let n=new be,s=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Cs,!0);for(let p=0;p{let p=Yn+g++;m.set(f,p),d.forEach(E=>$(E,p))});let T=[],w=new Set,A=new Set;for(let d=0;dw.add(E)):A.add(f))}let N=new Map,P=Hn(S,Array.from(w));P.forEach((d,f)=>{let p=mt+g++;N.set(f,p),d.forEach(E=>$(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ye(E,p))}),P.forEach((d,f)=>{let p=N.get(f);d.forEach(E=>ye(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let de=[],K=[];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(de.push(E),this.collectedEnterElements.length){let D=M[z];if(D&&D.setForMove){if(D.previousTriggersValues&&D.previousTriggersValues.has(p.triggerName)){let se=D.previousTriggersValues.get(p.triggerName),L=this.statesByElement.get(p.element);if(L&&L.has(p.triggerName)){let Me=L.get(p.triggerName);Me.value=se,L.set(p.triggerName,Me)}}E.destroy();return}}let j=!u||!this.driver.containsElement(u,M),k=N.get(M),W=m.get(M),b=this._buildInstruction(p,n,W,k,j);if(b.errors&&b.errors.length){K.push(b);return}if(j){E.onStart(()=>ce(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),s.push(E);return}if(p.isFallbackTransition){E.onStart(()=>ce(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),s.push(E);return}let zt=[];b.timelines.forEach(D=>{D.stretchStartingKeyframe=!0,this.disabledNodes.has(D.element)||zt.push(D)}),b.timelines=zt,n.append(M,b.timelines);let yi={instruction:b,player:E,element:M};o.push(yi),b.queriedElements.forEach(D=>O(a,D,[]).push(E)),b.preStyleProps.forEach((D,se)=>{if(D.size){let L=l.get(se);L||l.set(se,L=new Set),D.forEach((Me,tt)=>L.add(tt))}}),b.postStyleProps.forEach((D,se)=>{let L=c.get(se);L||c.set(se,L=new Set),D.forEach((Me,tt)=>L.add(tt))})});if(K.length){let d=[];K.forEach(f=>{d.push(Xi(f.triggerName,f.errors))}),de.forEach(f=>f.destroy()),this.reportError(d)}let C=new Map,F=new Map;o.forEach(d=>{let f=d.element;n.has(f)&&(F.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,C))}),s.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{O(C,f,[]).push(E),E.destroy()})});let ne=T.filter(d=>Vn(d,l,c)),me=new Map;Qn(me,this.driver,A,c,H).forEach(d=>{Vn(d,l,c)&&ne.push(d)});let ie=new Map;y.forEach((d,f)=>{Qn(ie,this.driver,new Set(d),l,Le)}),ne.forEach(d=>{let f=me.get(d),p=ie.get(d);me.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let et=[],Lt=[],$t={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(n.has(f)){if(h.has(f)){p.onDestroy(()=>V(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),s.push(p);return}let M=$t;if(F.size>1){let k=f,W=[];for(;k=k.parentNode;){let b=F.get(k);if(b){M=b;break}W.push(k)}W.forEach(b=>F.set(b,M))}let j=this._buildAnimation(p.namespaceId,E,C,r,ie,me);if(p.setRealPlayer(j),M===$t)et.push(p);else{let k=this.playersByElement.get(M);k&&k.length&&(p.parentPlayer=te(k)),s.push(p)}}else ce(f,E.fromStyles),p.onDestroy(()=>V(f,E.toStyles)),Lt.push(p),h.has(f)&&s.push(p)}),Lt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=te(f);d.setRealPlayer(p)}}),s.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d!j.destroyed);M.length?Bs(this,f,M):this.processLeaveNode(f)}return T.length=0,et.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),et}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,s,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==ve;a.forEach(c=>{c.queued||!l&&c.triggerName!=s||o.push(c)})}}return(n||s)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||s&&s!=a.triggerName))),o}_beforeAnimationBuild(e,t,n){let s=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:s;for(let l of t.timelines){let c=l.element,h=c!==r,u=O(n,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}ce(r,t.fromStyles)}_buildAnimation(e,t,n,s,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,S=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[z];if(T&&T.removedBeforeQueried)return new ee(m.duration,m.delay);let w=g!==l,A=Ks((n.get(g)||Is).map(C=>C.getRealPlayer())).filter(C=>{let F=C;return F.element?F.element===g:!1}),N=r.get(g),P=o.get(g),de=Gn(this._normalizer,m.keyframes,N,P),K=this._buildPlayer(m,de,A);if(m.subTimeline&&s&&u.add(g),w){let C=new Ae(e,a,g);C.setRealPlayer(K),c.push(C)}return K});c.forEach(m=>{O(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Ls(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>$(m,Ln));let y=te(S);return y.onDestroy(()=>{h.forEach(m=>ye(m,Ln)),V(l,t.toStyles)}),u.forEach(m=>{O(s,m,[]).push(y)}),y}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new ee(e.duration,e.delay)}},Ae=class{namespaceId;triggerName;element;_player=new ee;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(s=>Dt(e,n,void 0,s))}),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 Ls(i,e,t){let n=i.get(e);if(n){if(n.length){let s=n.indexOf(t);n.splice(s,1)}n.length==0&&i.delete(e)}return n}function $s(i){return i??null}function Ke(i){return i&&i.nodeType===1}function zs(i){return i=="start"||i=="done"}function Un(i,e){let t=i.style.display;return i.style.display=e??"none",t}function Qn(i,e,t,n,s){let r=[];t.forEach(l=>r.push(Un(l)));let o=[];n.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let S=e.computeStyle(c,u,s);h.set(u,S),(!S||S.length==0)&&(c[z]=Os,o.push(c))}),i.set(c,h)});let a=0;return t.forEach(l=>Un(l,r[a++])),o}function Hn(i,e){let t=new Map;if(i.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,s=new Set(e),r=new Map;function o(a){if(!a)return n;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:s.has(c)?l=n:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==n&&t.get(l).push(a)}),t}function $(i,e){i.classList?.add(e)}function ye(i,e){i.classList?.remove(e)}function Bs(i,e,t){te(t).onDone(()=>i.processLeaveNode(e))}function Ks(i){let e=[];return si(i,e),e}function si(i,e){for(let t=0;ts.add(r)):e.set(i,n),t.delete(i),!0}var _e=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,n){this._driver=t,this._normalizer=n,this._transitionEngine=new Mt(e.body,t,n),this._timelineEngine=new wt(e.body,t,n),this._transitionEngine.onRemovalComplete=(s,r)=>this.onRemovalComplete(s,r)}registerTrigger(e,t,n,s,r){let o=e+"-"+s,a=this._triggerCache[o];if(!a){let l=[],c=[],h=ei(this._driver,r,l,c);if(l.length)throw ji(s,l);a=Ps(s,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,s,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,s){this._transitionEngine.insertNode(e,t,n,s)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,s){if(n.charAt(0)=="@"){let[r,o]=In(n),a=s;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,n,s)}listen(e,t,n,s,r){if(n.charAt(0)=="@"){let[o,a]=In(n);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,n,s,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 qs(i,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=dt(e[0]),e.length>1&&(n=dt(e[e.length-1]))):e instanceof Map&&(t=dt(e)),t||n?new Us(i,t,n):null}var Us=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,n,s){this._element=t,this._startStyles=n,this._endStyles=s;let r=i.initialStylesByElement.get(t);r||i.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}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&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(ce(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ce(this._element,this._endStyles),this._endStyles=null),V(this._element,this._initialStyles),this._state=3)}}return i})();function dt(i){let e=null;return i.forEach((t,n)=>{Qs(n)&&(e=e||new Map,e.set(n,t))}),e}function Qs(i){return i==="display"||i==="position"}var We=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,n,s){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=s,this._duration=n.duration,this._delay=n.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(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}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((n,s)=>{s!=="offset"&&e.set(s,this._finished?n:kt(this.element,s))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Je=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return xn(e,t)}getParentElement(e){return Ct(e)}query(e,t,n){return Wn(e,t,n)}computeStyle(e,t,n){return kt(e,t)}animate(e,t,n,s,r,o=[]){let a=s==0?"both":"forwards",l={duration:n,delay:s,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof We);cs(n,s)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=os(t).map(y=>new Map(y));u=us(e,u,c);let S=qs(e,u);return new We(e,u,l,S)}};var je="@",ri="@.disabled",Ye=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,n,s){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=s}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,n,s=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,s)}removeChild(e,t,n){this.parentNode(t)&&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,n,s){this.delegate.setAttribute(e,t,n,s)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,s){this.delegate.setStyle(e,t,n,s)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==je&&t==ri?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n,s){return this.delegate.listen(e,t,n,s)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},Pt=class extends Ye{factory;constructor(e,t,n,s,r){super(t,n,s,r),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==je?t.charAt(1)=="."&&t==ri?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n,s){if(t.charAt(0)==je){let r=Hs(e),o=t.slice(1),a="";return o.charAt(0)!=je&&([o,a]=Vs(o)),this.engine.listen(this.namespaceId,r,o,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,n,l)})}return this.delegate.listen(e,t,n,s)}};function Hs(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function Vs(i){let e=i.indexOf("."),t=i.substring(0,e),n=i.slice(e+1);return[t,n]}var Xe=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,t.onRemovalComplete=(s,r)=>{r?.removeChild(null,s)}}createRenderer(e,t){let n="",s=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(s);if(!h){let u=()=>c.delete(s);h=new Ye(n,s,this.engine,u),c.set(s,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 Pt(this,o,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let s=this._animationCallbacksBuffer;s.length==0&&queueMicrotask(()=>{this._zone.run(()=>{s.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),s.push([t,n])}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()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var xs=(()=>{class i extends _e{constructor(t,n,s){super(t,n,s)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||i)(R(nn),R(ue),R(he))};static \u0275prov=q({token:i,factory:i.\u0275fac})}return i})();function Ws(){return new Qe}function Js(i,e,t){return new Xe(i,e,t)}var oi=[{provide:he,useFactory:Ws},{provide:_e,useClass:xs},{provide:Gt,useFactory:Js,deps:[ln,_e,De]}],Ys=[{provide:ue,useFactory:()=>new Je},{provide:nt,useValue:"BrowserAnimations"},...oi],kr=[{provide:ue,useClass:Ft},{provide:nt,useValue:"NoopAnimations"},...oi];function ai(){return Vt("NgEagerAnimations"),[...Ys]}var li=(()=>{class i{http;prefix;suffix;constructor(t,n="/assets/i18n/",s=".json"){this.http=t,this.prefix=n,this.suffix=s}getTranslation(t){return this.http.get(`${this.prefix}${t}${this.suffix}`)}static \u0275fac=function(n){return new(n||i)(R(ke),R(String),R(String))};static \u0275prov=q({token:i,factory:i.\u0275fac})}return i})();function Xs(i,e){if(i&1&&(Q(0,"li")(1,"h2")(2,"a",1),oe(3),fe(4,"translate"),Y()()()),i&2){let t,n=e.$implicit;U(2),Ne("routerLink","/"+n.path),U(),Re(" ",pe(4,2,((t=n.name)!==null&&t!==void 0?t:n.path)+".title")," ")}}var ci=(()=>{class i{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"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=J({type:i,selectors:[["bkd-home"]],decls:3,vars:0,consts:[[1,"mt-3"],[3,"routerLink"]],template:function(n,s){n&1&&(Q(0,"ul",0),Ce(1,Xs,5,4,"li",null,Yt),Y()),n&2&&(U(),Fe(s.sections))},dependencies:[hn,Oe],encapsulation:2,changeDetection:0})}}return i})();var ui=(()=>{class i{constructor(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=J({type:i,selectors:[["bkd-unauthenticated"]],decls:4,vars:3,consts:[[1,"bkd-container"],[1,"alert","alert-danger","my-3"]],template:function(n,s){n&1&&(Q(0,"div",0)(1,"div",1),oe(2),fe(3,"translate"),Y()()),n&2&&(U(2),Re(" ",pe(3,1,"unauthenticated.message")," "))},dependencies:[Oe],encapsulation:2})}}return i})();var Ze=(()=>{class i{constructor(t){this.storage=t}get isAuthenticated(){return!!this.accessToken}get accessToken(){return this.storage.getAccessToken()}static{this.\u0275fac=function(n){return new(n||i)(R(vn))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function B(){return()=>{let i=G(Ze),e=G(Ie);return i.isAuthenticated?!0:(e.navigate(["/unauthenticated"]),!1)}}var hi=[{path:"dashboard",canActivate:[B()],loadChildren:()=>import("./chunk-T2Q3L4WP.js").then(i=>i.DASHBOARD_ROUTES)},{path:"presence-control",canActivate:[B()],loadChildren:()=>import("./chunk-PFRWXAMB.js").then(i=>i.PRESENCE_CONTROL_ROUTES)},{path:"open-absences",canActivate:[B()],loadChildren:()=>import("./chunk-B5LBXM2A.js").then(i=>i.OPEN_ABSENCES_ROUTES)},{path:"edit-absences",canActivate:[B()],loadChildren:()=>import("./chunk-MJ4YAPVT.js").then(i=>i.EDIT_ABSENCES_ROUTES)},{path:"evaluate-absences",canActivate:[B()],loadChildren:()=>import("./chunk-DFJBP4SC.js").then(i=>i.EVALUATE_ABSENCES_ROUTES)},{path:"events",canActivate:[B()],loadChildren:()=>import("./chunk-K7OUA36X.js").then(i=>i.EVENTS_ROUTES)},{path:"my-absences",canActivate:[B()],loadChildren:()=>import("./chunk-2D243XFA.js").then(i=>i.MY_ABSENCES_ROUTES)},{path:"my-profile",canActivate:[B()],loadChildren:()=>import("./chunk-SGUU3JRZ.js").then(i=>i.MY_PROFILE_ROUTES)},{path:"my-grades",canActivate:[B()],loadChildren:()=>import("./chunk-XYEOQKXF.js").then(i=>i.MY_GRADES_ROUTES)},{path:"my-settings",canActivate:[B()],loadChildren:()=>import("./chunk-EUJUXKHH.js").then(i=>i.MY_SETTINGS_ROUTES)},{path:"unauthenticated",component:ui},{path:"",component:ci,pathMatch:"full"}];function di(){return(i,e)=>{let t=G(Ze),n=G(X);if(i.url.startsWith(n.apiUrl)&&t.accessToken){let s=i.headers.set("Authorization",`Bearer ${t.accessToken}`);return e(i.clone({headers:s}))}return e(i)}}function mi(){return(i,e)=>{let t=G(X);if(!i.headers.has("X-Role-Restriction")&&t.headerRoleRestriction){let n=Zs();if(n&&t.headerRoleRestriction[n]){let s=i.headers.set("X-Role-Restriction",t.headerRoleRestriction[n]);return e(i.clone({headers:s}))}}return e(i)}}function Zs(){let i=G(Ie),e=i.url?wn(i.url):null;return e?gn(e):null}function fi(){return[{provide:Ht,useClass:er}]}var er=(()=>{class i{constructor(t,n,s){this.ngZone=t,this.translate=n,this.toastService=s}handleError(t){console.error(String(t)),t instanceof rn||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"))})}static{this.\u0275fac=function(n){return new(n||i)(R(De),R(Sn),R(ge))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();function tr(i,e){return new li(i,`${e.scriptsAndAssetsPath}/assets/locales/`,".json")}var pi={providers:[dn(hi,mn()),on(an([An(),di(),mi()])),ai(),fi(),En({loader:{provide:_n,useFactory:tr,deps:[ke,X]}}),Tn()]};var gi={production:!0};gi.production&&void 0;rt(Mn);rt(Pn);cn(Fn,pi).catch(i=>console.error(i)); +import{b as wn}from"./chunk-N2RKIMWO.js";import{c as bn}from"./chunk-A7EOJZ46.js";import{a as En,b as vn}from"./chunk-ZELJ2QPT.js";import{t as fn}from"./chunk-RXRYDGZR.js";import{a as pe}from"./chunk-F4XODHS2.js";import{$ as w,$a as Ce,B as Kt,Ca as Vt,Cc as cn,Dc as ke,Ec as un,Gc as hn,Hc as dn,Ia as J,Jd as pn,Nb as me,Ob as fe,Pa as Gt,Qd as gn,Rd as yn,Sa as De,Sd as Oe,Td as _n,Ua as xt,Ud as Sn,V as v,Vd as Tn,X as q,Xa as Wt,Ya as Jt,Z as jt,Za as Yt,_ as W,_a as Ne,_b as tn,a as Me,ab as Q,bb as Y,c as zt,cb as Xt,cc as it,ea as qt,fa as Ut,gb as Zt,gc as nn,gd as mn,hd as X,ib as en,jb as nt,k as Bt,na as Pe,oa as Qt,pc as sn,qc as Re,rc as rn,sa as Ht,sc as on,tc as an,ua as tt,uc as ln,vb as re,wb as st,xb as Fe,ya as U}from"./chunk-NEW5VGRB.js";function gs(s){let e=s,t=Math.floor(Math.abs(s)),n=s.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var An=["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",gs];function ys(s){let e=s,t=Math.floor(Math.abs(s)),n=s.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(s.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var Mn=["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",ys];function _s(s,e){if(s&1&&(Q(0,"i",3),re(1),Y()),s&2){let t=nt().$implicit;U(),st(t.icon)}}function Ss(s,e){if(s&1){let t=Zt();Q(0,"ngb-toast",1),en("hidden",function(){let i=qt(t).$implicit,r=nt();return Ut(r.toastService.remove(i))}),Q(1,"div",2),Gt(2,_s,2,1,"i",3),Q(3,"span"),re(4),Y()()()}if(s&2){let t=e.$implicit;xt(t.classname),De("header",t.header||"")("autohide",!0),U(2),Wt(t.icon?2:-1),U(2),st(t.message)}}var Pn=(()=>{class s{constructor(){this.toastService=w(pe)}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-toast"]],decls:3,vars:2,consts:[[3,"header","class","autohide"],[3,"hidden","header","autohide"],[1,"d-flex","gap-2"],[1,"material-icons"]],template:function(n,i){n&1&&(Ne(0,Ss,5,6,"ngb-toast",0,Yt),me(2,"async")),n&2&&Ce(fe(2,0,i.toastService.toasts$))},dependencies:[fn,nn],styles:["[_nghost-%COMP%]{position:fixed;top:0;right:0;margin:.5em;z-index:1200}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{font-size:medium}"]})}}return s})();var Dn=new jt("Navigator API",{providedIn:"root",factory:()=>navigator});var Nn=(()=>{class s{constructor(){this.toastService=w(pe),this.settings=w(X),this.navigator=w(Dn),w(vn).initialize(),this.checkSettings()}checkSettings(){Tn(mn)(this.settings).pipe(Kt(t=>(console.error(String(t)),this.toastService.error("Please check the contents of the settings.js file (see Console output for more details).","Invalid Settings"),Bt))).subscribe()}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-app"]],decls:2,vars:0,consts:[["aria-live","polite","aria-atomic","true"]],template:function(n,i){n&1&&Xt(0,"bkd-toast",0)(1,"router-outlet")},dependencies:[Pn,cn],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}}return s})();var _=function(s){return s[s.State=0]="State",s[s.Transition=1]="Transition",s[s.Sequence=2]="Sequence",s[s.Group=3]="Group",s[s.Animate=4]="Animate",s[s.Keyframes=5]="Keyframes",s[s.Style=6]="Style",s[s.Trigger=7]="Trigger",s[s.Reference=8]="Reference",s[s.AnimateChild=9]="AnimateChild",s[s.AnimateRef=10]="AnimateRef",s[s.Query=11]="Query",s[s.Stagger=12]="Stagger",s}(_||{}),H="*";function Cn(s,e=null){return{type:_.Sequence,steps:s,options:e}}function rt(s){return{type:_.Style,styles:s,offset:null}}var ee=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){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(n=>n()),t.length=0}},_e=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,n=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++n==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(n=>{let i=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(i)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n: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(n=>n()),t.length=0}},Ie="!";function Fn(s){return new v(3e3,!1)}function Es(){return new v(3100,!1)}function vs(){return new v(3101,!1)}function Ts(s){return new v(3001,!1)}function bs(s){return new v(3003,!1)}function ws(s){return new v(3004,!1)}function As(s,e){return new v(3005,!1)}function Ms(){return new v(3006,!1)}function Ps(){return new v(3007,!1)}function Ds(s,e){return new v(3008,!1)}function Ns(s){return new v(3002,!1)}function Cs(s,e,t,n,i){return new v(3010,!1)}function Fs(){return new v(3011,!1)}function Rs(){return new v(3012,!1)}function ks(){return new v(3200,!1)}function Os(){return new v(3202,!1)}function Is(){return new v(3013,!1)}function Ls(s){return new v(3014,!1)}function $s(s){return new v(3015,!1)}function zs(s){return new v(3016,!1)}function Bs(s,e){return new v(3404,!1)}function Ks(s){return new v(3502,!1)}function js(s){return new v(3503,!1)}function qs(){return new v(3300,!1)}function Us(s){return new v(3504,!1)}function Qs(s){return new v(3301,!1)}function Hs(s,e){return new v(3302,!1)}function Vs(s){return new v(3303,!1)}function Gs(s,e){return new v(3400,!1)}function xs(s){return new v(3401,!1)}function Ws(s){return new v(3402,!1)}function Js(s,e){return new v(3505,!1)}function te(s){switch(s.length){case 0:return new ee;case 1:return s[0];default:return new _e(s)}}function Hn(s,e,t=new Map,n=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 m=y,g=S;if(y!=="offset")switch(m=s.normalizePropertyName(m,i),g){case Ie:g=t.get(y);break;case H:g=n.get(y);break;default:g=s.normalizeStyleValue(y,m,g,i);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),i.length)throw Ks(i);return r}function Pt(s,e,t,n){switch(e){case"start":s.onStart(()=>n(t&&ot(t,"start",s)));break;case"done":s.onDone(()=>n(t&&ot(t,"done",s)));break;case"destroy":s.onDestroy(()=>n(t&&ot(t,"destroy",s)));break}}function ot(s,e,t){let n=t.totalTime,i=!!t.disabled,r=Dt(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,n??s.totalTime,i),o=s._data;return o!=null&&(r._data=o),r}function Dt(s,e,t,n,i="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:n,phaseName:i,totalTime:r,disabled:!!o}}function I(s,e,t){let n=s.get(e);return n||s.set(e,n=t),n}function Rn(s){let e=s.indexOf(":"),t=s.substring(1,e),n=s.slice(e+1);return[t,n]}var Ys=typeof document>"u"?null:document.documentElement;function Nt(s){let e=s.parentNode||s.host||null;return e===Ys?null:e}function Xs(s){return s.substring(1,6)=="ebkit"}var oe=null,kn=!1;function Zs(s){oe||(oe=ei()||{},kn=oe.style?"WebkitAppearance"in oe.style:!1);let e=!0;return oe.style&&!Xs(s)&&(e=s in oe.style,!e&&kn&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in oe.style)),e}function ei(){return typeof document<"u"?document.body:null}function Vn(s,e){for(;e;){if(e===s)return!0;e=Nt(e)}return!1}function Gn(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let n=s.querySelector(e);return n?[n]:[]}var Ct=(()=>{class s{validateStyleProperty(t){return Zs(t)}containsElement(t,n){return Vn(t,n)}getParentElement(t){return Nt(t)}query(t,n,i){return Gn(t,n,i)}computeStyle(t,n,i){return i||""}animate(t,n,i,r,o,a=[],l){return new ee(i,r)}static \u0275fac=function(n){return new(n||s)};static \u0275prov=q({token:s,factory:s.\u0275fac})}return s})(),ce=class{static NOOP=new Ct},ue=class{};var ti=1e3,xn="{{",ni="}}",Wn="ng-enter",dt="ng-leave",Le="ng-trigger",je=".ng-trigger",On="ng-animating",mt=".ng-animating";function G(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ft(parseFloat(e[1]),e[2])}function ft(s,e){switch(e){case"s":return s*ti;default:return s}}function qe(s,e,t){return s.hasOwnProperty("duration")?s:si(s,e,t)}function si(s,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,r=0,o="";if(typeof s=="string"){let a=s.match(n);if(a===null)return e.push(Fn(s)),{duration:0,delay:0,easing:""};i=ft(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=ft(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else i=s;if(!t){let a=!1,l=e.length;i<0&&(e.push(Es()),a=!0),r<0&&(e.push(vs()),a=!0),a&&e.splice(l,0,Fn(s))}return{duration:i,delay:r,easing:o}}function ii(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function V(s,e,t){e.forEach((n,i)=>{let r=Ft(i);t&&!t.has(i)&&t.set(i,s.style[r]),s.style[r]=n})}function le(s,e){e.forEach((t,n)=>{let i=Ft(n);s.style[i]=""})}function Se(s){return Array.isArray(s)?s.length==1?s[0]:Cn(s):s}function ri(s,e,t){let n=e.params||{},i=Jn(s);i.length&&i.forEach(r=>{n.hasOwnProperty(r)||t.push(Ts(r))})}var pt=new RegExp(`${xn}\\s*(.+?)\\s*${ni}`,"g");function Jn(s){let e=[];if(typeof s=="string"){let t;for(;t=pt.exec(s);)e.push(t[1]);pt.lastIndex=0}return e}function ve(s,e,t){let n=`${s}`,i=n.replace(pt,(r,o)=>{let a=e[o];return a==null&&(t.push(bs(o)),a=""),a.toString()});return i==n?s:i}var oi=/-+([a-z0-9])/g;function Ft(s){return s.replace(oi,(...e)=>e[1].toUpperCase())}function ai(s,e){return s===0||e===0}function li(s,e,t){if(t.size&&e.length){let n=e[0],i=[];if(t.forEach((r,o)=>{n.has(o)||i.push(o),n.set(o,r)}),i.length)for(let r=1;ro.set(a,Rt(s,a)))}}return e}function O(s,e,t){switch(e.type){case _.Trigger:return s.visitTrigger(e,t);case _.State:return s.visitState(e,t);case _.Transition:return s.visitTransition(e,t);case _.Sequence:return s.visitSequence(e,t);case _.Group:return s.visitGroup(e,t);case _.Animate:return s.visitAnimate(e,t);case _.Keyframes:return s.visitKeyframes(e,t);case _.Style:return s.visitStyle(e,t);case _.Reference:return s.visitReference(e,t);case _.AnimateChild:return s.visitAnimateChild(e,t);case _.AnimateRef:return s.visitAnimateRef(e,t);case _.Query:return s.visitQuery(e,t);case _.Stagger:return s.visitStagger(e,t);default:throw ws(e.type)}}function Rt(s,e){return window.getComputedStyle(s)[e]}var ci=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"]),Ue=class extends ue{normalizePropertyName(e,t){return Ft(e)}normalizeStyleValue(e,t,n,i){let r="",o=n.toString().trim();if(ci.has(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(As(e,n))}return o+r}};var Qe="*";function ui(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(n=>hi(n,t,e)):t.push(s),t}function hi(s,e,t){if(s[0]==":"){let l=di(s,t);if(typeof l=="function"){e.push(l);return}s=l}let n=s.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push($s(s)),e;let i=n[1],r=n[2],o=n[3];e.push(In(i,o));let a=i==Qe&&o==Qe;r[0]=="<"&&!a&&e.push(In(o,i))}function di(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var $e=new Set(["true","1"]),ze=new Set(["false","0"]);function In(s,e){let t=$e.has(s)||ze.has(s),n=$e.has(e)||ze.has(e);return(i,r)=>{let o=s==Qe||s==i,a=e==Qe||e==r;return!o&&t&&typeof i=="boolean"&&(o=i?$e.has(s):ze.has(s)),!a&&n&&typeof r=="boolean"&&(a=r?$e.has(e):ze.has(e)),o&&a}}var Yn=":self",mi=new RegExp(`s*${Yn}s*,?`,"g");function Xn(s,e,t,n){return new gt(s).build(e,t,n)}var Ln="",gt=class{_driver;constructor(e){this._driver=e}build(e,t,n){let i=new yt(t);return this._resetContextStyleTimingState(i),O(this,Se(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=Ln,e.collectedStyles=new Map,e.collectedStyles.set(Ln,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,i=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Ms()),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);n+=l.queryCount,i+=l.depCount,o.push(l)}else t.errors.push(Ps())}),{type:_.Trigger,name:e.name,states:r,transitions:o,queryCount:n,depCount:i,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){let r=new Set,o=i||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Jn(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Ds(e.name,[...r.values()]))}return{type:_.State,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=O(this,Se(e.animation),t),i=ui(e.expr,t.errors);return{type:_.Transition,matchers:i,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:ae(e.options)}}visitSequence(e,t){return{type:_.Sequence,steps:e.steps.map(n=>O(this,n,t)),options:ae(e.options)}}visitGroup(e,t){let n=t.currentTime,i=0,r=e.steps.map(o=>{t.currentTime=n;let a=O(this,o,t);return i=Math.max(i,t.currentTime),a});return t.currentTime=i,{type:_.Group,steps:r,options:ae(e.options)}}visitAnimate(e,t){let n=yi(e.timings,t.errors);t.currentAnimateTimings=n;let i,r=e.styles?e.styles:rt({});if(r.type==_.Keyframes)i=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};n.easing&&(c.easing=n.easing),o=rt(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,i=l}return t.currentAnimateTimings=null,{type:_.Animate,timings:n,style:i,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===H?n.push(a):t.errors.push(Ns(a)):n.push(new Map(Object.entries(a)));let r=!1,o=null;return n.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(xn)>=0){r=!0;break}}}),{type:_.Style,styles:n,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.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(Cs(l,h.startTime,h.endTime,r,i)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:i}),t.options&&ri(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Fs()),n;let i=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(A=>{let M=this._makeStyleAst(A,t),C=M.offset!=null?M.offset:gi(M.styles),D=0;return C!=null&&(r++,D=M.offset=C),l=l||D<0||D>1,a=a||D0&&r{let C=S>0?M==y?1:S*M:o[M],D=C*T;t.currentTime=m+g.delay+D,g.duration=D,this._validateStyleAst(A,t),A.offset=C,n.styles.push(A)}),n}visitReference(e,t){return{type:_.Reference,animation:O(this,Se(e.animation),t),options:ae(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:ae(e.options)}}visitAnimateRef(e,t){return{type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:ae(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=fi(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,I(t.collectedStyles,t.currentQuerySelector,new Map);let a=O(this,Se(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:_.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:ae(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Is());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:qe(e.timings,t.errors,!0);return{type:_.Stagger,animation:O(this,Se(e.animation),t),timings:n,options:null}}};function fi(s){let e=!!s.split(/\s*,\s*/).find(t=>t==Yn);return e&&(s=s.replace(mi,"")),s=s.replace(/@\*/g,je).replace(/@\w+/g,t=>je+"-"+t.slice(1)).replace(/:animating/g,mt),[s,e]}function pi(s){return s?Me({},s):null}var yt=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function gi(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function yi(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=qe(s,e).duration;return at(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=at(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=qe(t,e);return at(i.duration,i.delay,i.easing)}function ae(s){return s?(s=Me({},s),s.params&&(s.params=pi(s.params))):s={},s}function at(s,e,t){return{duration:s,delay:e,easing:t}}function kt(s,e,t,n,i,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:n,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}var Te=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},_i=1,Si=":enter",Ei=new RegExp(Si,"g"),vi=":leave",Ti=new RegExp(vi,"g");function Zn(s,e,t,n,i,r=new Map,o=new Map,a,l,c=[]){return new _t().buildKeyframes(s,e,t,n,i,r,o,a,l,c)}var _t=class{buildKeyframes(e,t,n,i,r,o,a,l,c,h=[]){c=c||new Te;let u=new St(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),O(this,n,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[kt(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let i of e){let r=i?.delay;if(r){let o=typeof r=="number"?r:G(ve(r,i?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime,o=n.duration!=null?G(n.duration):null,a=n.delay!=null?G(n.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),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=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=He);let o=G(r.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>O(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],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),O(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,i=t.params?ve(n,t.params,t.errors):n;return qe(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.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 n=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?G(i.delay):0;r&&(t.previousNode.type===_.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=He);let o=n,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),O(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 n=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=n.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;O(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}},He={},St=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=He;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,n,i,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Ve(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,i=this.options;n.duration!=null&&(i.duration=G(n.duration)),n.delay!=null&&(i.delay=G(n.delay));let r=n.params;if(r){let o=i.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=ve(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(i=>{n[i]=t[i]})}}return e}createSubContext(e=null,t,n){let i=t||this.element,r=new s(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||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=He,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},r=new Et(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,n,i,r,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(Ei,"."+this._enterClassName),e=e.replace(Ti,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!r&&a.length==0&&o.push(Ls(t)),a}},Ve=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,n,i){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,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 s(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+=_i,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,n]of this._globalTimelineStyles)this._backFill.set(t,n||H),this._currentKeyframe.set(t,H);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},o=bi(e,this._globalTimelineStyles);for(let[a,l]of o){let c=ve(l,r,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??H),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,n)=>{let i=this._styleSummary.get(n);(!i||t.time>i.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=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===Ie?e.add(u):h===H&&t.add(u)}),n||c.set("offset",l/this.duration),i.push(c)});let r=[...e.values()],o=[...t.values()];if(n){let a=i[0],l=new Map(a);a.set("offset",0),l.set("offset",1),i=[a,l]}return kt(this.element,i,r,o,this.duration,this.startTime,this.easing,!1)}},Et=class extends Ve{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,n,i,r,o,a=!1){super(e,t,o.delay),this.keyframes=n,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:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=n+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",$n(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"),m=t+y*n;S.set("offset",$n(m/o)),r.push(S)}n=o,t=0,i="",e=r}return kt(this.element,e,this.preStyleProps,this.postStyleProps,n,t,i,!0)}};function $n(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function bi(s,e){let t=new Map,n;return s.forEach(i=>{if(i==="*"){n??=e.keys();for(let r of n)t.set(r,H)}else for(let[r,o]of i)t.set(r,o)}),t}function zn(s,e,t,n,i,r,o,a,l,c,h,u,S){return{type:0,element:s,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:S}}var lt={},Ge=class{_triggerName;ast;_stateStyles;constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,i){return wi(this.ast.matchers,e,t,n,i)}buildStyles(e,t,n){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,n):new Map}build(e,t,n,i,r,o,a,l,c,h){let u=[],S=this.ast.options&&this.ast.options.params||lt,y=a&&a.params||lt,m=this.buildStyles(n,y,u),g=l&&l.params||lt,T=this.buildStyles(i,g,u),A=new Set,M=new Map,C=new Map,D=i==="void",he={params:es(g,S),delay:this.ast.options?.delay},K=h?[]:Zn(e,t,this.ast.animation,r,o,m,T,he,c,u),F=0;return K.forEach(R=>{F=Math.max(R.duration+R.delay,F)}),u.length?zn(t,this._triggerName,n,i,D,m,T,[],[],M,C,F,u):(K.forEach(R=>{let ne=R.element,de=I(M,ne,new Set);R.preStyleProps.forEach(se=>de.add(se));let Ot=I(C,ne,new Set);R.postStyleProps.forEach(se=>Ot.add(se)),ne!==t&&A.add(ne)}),zn(t,this._triggerName,n,i,D,m,T,K,[...A.values()],M,C,F))}};function wi(s,e,t,n,i){return s.some(r=>r(e,t,n,i))}function es(s,e){let t=Me({},e);return Object.entries(s).forEach(([n,i])=>{i!=null&&(t[n]=i)}),t}var vt=class{styles;defaultParams;normalizer;constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,i=es(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=ve(o,i,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),n.set(a,o)})}),n}};function Ai(s,e,t){return new Tt(s,e,t)}var Tt=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new vt(i.style,r,n))}),Bn(this.states,"true","1"),Bn(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Ge(e,i,this.states))}),this.fallbackTransition=Mi(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,i){return this.transitionFactories.find(o=>o.match(e,t,n,i))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function Mi(s,e,t){let n=[(o,a)=>!0],i={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new Ge(s,r,e)}function Bn(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var Pi=new Te,bt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n}register(e,t){let n=[],i=[],r=Xn(this._driver,t,n,i);if(n.length)throw js(n);this._animations.set(e,r)}_buildPlayer(e,t,n){let i=e.element,r=Hn(this._normalizer,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let i=[],r=this._animations.get(e),o,a=new Map;if(r?(o=Zn(this._driver,t,r,Wn,dt,new Map,new Map,n,Pi,i),o.forEach(h=>{let u=I(a,h.element,new Map);h.postStyleProps.forEach(S=>u.set(S,null))})):(i.push(qs()),o=[]),i.length)throw Us(i);a.forEach((h,u)=>{h.forEach((S,y)=>{h.set(y,this._driver.computeStyle(u,y,H))})});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 n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Qs(e);return t}listen(e,t,n,i){let r=Dt(t,"","","");return Pt(this._getPlayer(e),n,r,i),()=>{}}command(e,t,n,i){if(n=="register"){this.register(e,i[0]);return}if(n=="create"){let o=i[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(n){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}}},Kn="ng-animate-queued",Di=".ng-animate-queued",ct="ng-animate-disabled",Ni=".ng-animate-disabled",Ci="ng-star-inserted",Fi=".ng-star-inserted",Ri=[],ts={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ki={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},z="__ng_removed",be=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),i=n?e.value:e;if(this.value=Ii(i),n){let r=e,{value:o}=r,a=zt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(i=>{n[i]==null&&(n[i]=t[i])})}}},Ee="void",ut=new be(Ee),wt=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+e,$(t,this._hostClassName)}listen(e,t,n,i){if(!this._triggers.has(t))throw Hs(n,t);if(n==null||n.length==0)throw Vs(t);if(!Li(n))throw Gs(n,t);let r=I(this._elementListeners,e,[]),o={name:t,phase:n,callback:i};r.push(o);let a=I(this._engine.statesByElement,e,new Map);return a.has(t)||($(e,Le),$(e,Le+"-"+t),a.set(t,ut)),()=>{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 xs(e);return t}trigger(e,t,n,i=!0){let r=this._getTrigger(t),o=new we(this.id,t,e),a=this._engine.statesByElement.get(e);a||($(e,Le),$(e,Le+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new be(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ut),!(c.value===Ee)&&l.value===c.value){if(!Bi(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),A=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{le(e,T),V(e,A)})}return}let S=I(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),m=!1;if(!y){if(!i)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||($(e,Kn),o.onStart(()=>{ge(e,Kn)})),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 A=T.indexOf(o);A>=0&&T.splice(A,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,n)=>{this._elementListeners.set(n,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(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,je,!0);n.forEach(i=>{if(i[z])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(o=>o.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,n,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,Ee,i);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),n&&te(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){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=n.get(o)||ut,h=new be(Ee),u=new we(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 n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(n.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,t);else{let r=e[z];(!r||r===ts)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){$(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let r=n.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==n.triggerName){let l=Dt(r,n.triggerName,n.fromState.value,n.toState.value);l._data=e,Pt(n.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((n,i)=>{let r=n.transition.ast.depCount,o=i.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},At=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new wt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=i.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(e)}else n.push(e);return i.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let i of n.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,n,i){if(Be(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}insertNode(e,t,n,i){if(!Be(t))return;let r=t[z];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,n)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),$(e,ct)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ge(e,ct))}removeNode(e,t,n){if(Be(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,i,r){this.collectedLeaveElements.push(t),t[z]={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,n,i,r){return Be(t)?this._fetchNamespace(e).listen(t,n,i,r):()=>{}}_buildInstruction(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,je,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,mt,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return te(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[z];if(t&&t.setForRemoval){if(e[z]=ts,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ct)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Ni,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?te(t).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(e){throw Ws(e)}_flushAnimations(e,t){let n=new Te,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 f=this.driver.query(d,Di,!0);for(let p=0;p{let p=Wn+g++;m.set(f,p),d.forEach(E=>$(E,p))});let T=[],A=new Set,M=new Set;for(let d=0;dA.add(E)):M.add(f))}let C=new Map,D=Un(S,Array.from(A));D.forEach((d,f)=>{let p=dt+g++;C.set(f,p),d.forEach(E=>$(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ge(E,p))}),D.forEach((d,f)=>{let p=C.get(f);d.forEach(E=>ge(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let he=[],K=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,P=p.element;if(he.push(E),this.collectedEnterElements.length){let N=P[z];if(N&&N.setForMove){if(N.previousTriggersValues&&N.previousTriggersValues.has(p.triggerName)){let ie=N.previousTriggersValues.get(p.triggerName),L=this.statesByElement.get(p.element);if(L&&L.has(p.triggerName)){let Ae=L.get(p.triggerName);Ae.value=ie,L.set(p.triggerName,Ae)}}E.destroy();return}}let j=!u||!this.driver.containsElement(u,P),k=C.get(P),x=m.get(P),b=this._buildInstruction(p,n,x,k,j);if(b.errors&&b.errors.length){K.push(b);return}if(j){E.onStart(()=>le(P,b.fromStyles)),E.onDestroy(()=>V(P,b.toStyles)),i.push(E);return}if(p.isFallbackTransition){E.onStart(()=>le(P,b.fromStyles)),E.onDestroy(()=>V(P,b.toStyles)),i.push(E);return}let $t=[];b.timelines.forEach(N=>{N.stretchStartingKeyframe=!0,this.disabledNodes.has(N.element)||$t.push(N)}),b.timelines=$t,n.append(P,b.timelines);let ps={instruction:b,player:E,element:P};o.push(ps),b.queriedElements.forEach(N=>I(a,N,[]).push(E)),b.preStyleProps.forEach((N,ie)=>{if(N.size){let L=l.get(ie);L||l.set(ie,L=new Set),N.forEach((Ae,et)=>L.add(et))}}),b.postStyleProps.forEach((N,ie)=>{let L=c.get(ie);L||c.set(ie,L=new Set),N.forEach((Ae,et)=>L.add(et))})});if(K.length){let d=[];K.forEach(f=>{d.push(Js(f.triggerName,f.errors))}),he.forEach(f=>f.destroy()),this.reportError(d)}let F=new Map,R=new Map;o.forEach(d=>{let f=d.element;n.has(f)&&(R.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,F))}),i.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{I(F,f,[]).push(E),E.destroy()})});let ne=T.filter(d=>Qn(d,l,c)),de=new Map;qn(de,this.driver,M,c,H).forEach(d=>{Qn(d,l,c)&&ne.push(d)});let se=new Map;y.forEach((d,f)=>{qn(se,this.driver,new Set(d),l,Ie)}),ne.forEach(d=>{let f=de.get(d),p=se.get(d);de.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let Ze=[],It=[],Lt={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(n.has(f)){if(h.has(f)){p.onDestroy(()=>V(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),i.push(p);return}let P=Lt;if(R.size>1){let k=f,x=[];for(;k=k.parentNode;){let b=R.get(k);if(b){P=b;break}x.push(k)}x.forEach(b=>R.set(b,P))}let j=this._buildAnimation(p.namespaceId,E,F,r,se,de);if(p.setRealPlayer(j),P===Lt)Ze.push(p);else{let k=this.playersByElement.get(P);k&&k.length&&(p.parentPlayer=te(k)),i.push(p)}}else le(f,E.fromStyles),p.onDestroy(()=>V(f,E.toStyles)),It.push(p),h.has(f)&&i.push(p)}),It.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=te(f);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d!j.destroyed);P.length?$i(this,f,P):this.processLeaveNode(f)}return T.length=0,Ze.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),Ze}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,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==Ee;a.forEach(c=>{c.queued||!l&&c.triggerName!=i||o.push(c)})}}return(n||i)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,t,n){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=I(n,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}le(r,t.fromStyles)}_buildAnimation(e,t,n,i,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,S=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[z];if(T&&T.removedBeforeQueried)return new ee(m.duration,m.delay);let A=g!==l,M=zi((n.get(g)||Ri).map(F=>F.getRealPlayer())).filter(F=>{let R=F;return R.element?R.element===g:!1}),C=r.get(g),D=o.get(g),he=Hn(this._normalizer,m.keyframes,C,D),K=this._buildPlayer(m,he,M);if(m.subTimeline&&i&&u.add(g),A){let F=new we(e,a,g);F.setRealPlayer(K),c.push(F)}return K});c.forEach(m=>{I(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Oi(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>$(m,On));let y=te(S);return y.onDestroy(()=>{h.forEach(m=>ge(m,On)),V(l,t.toStyles)}),u.forEach(m=>{I(i,m,[]).push(y)}),y}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new ee(e.duration,e.delay)}},we=class{namespaceId;triggerName;element;_player=new ee;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(i=>Pt(e,n,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){I(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 Oi(s,e,t){let n=s.get(e);if(n){if(n.length){let i=n.indexOf(t);n.splice(i,1)}n.length==0&&s.delete(e)}return n}function Ii(s){return s??null}function Be(s){return s&&s.nodeType===1}function Li(s){return s=="start"||s=="done"}function jn(s,e){let t=s.style.display;return s.style.display=e??"none",t}function qn(s,e,t,n,i){let r=[];t.forEach(l=>r.push(jn(l)));let o=[];n.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[z]=ki,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>jn(l,r[a++])),o}function Un(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,i=new Set(e),r=new Map;function o(a){if(!a)return n;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:i.has(c)?l=n:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==n&&t.get(l).push(a)}),t}function $(s,e){s.classList?.add(e)}function ge(s,e){s.classList?.remove(e)}function $i(s,e,t){te(t).onDone(()=>s.processLeaveNode(e))}function zi(s){let e=[];return ns(s,e),e}function ns(s,e){for(let t=0;ti.add(r)):e.set(s,n),t.delete(s),!0}var ye=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,n){this._driver=t,this._normalizer=n,this._transitionEngine=new At(e.body,t,n),this._timelineEngine=new bt(e.body,t,n),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,n,i,r){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let l=[],c=[],h=Xn(this._driver,r,l,c);if(l.length)throw Bs(i,l);a=Ai(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,n,i){this._transitionEngine.insertNode(e,t,n,i)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,i){if(n.charAt(0)=="@"){let[r,o]=Rn(n),a=i;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,n,i)}listen(e,t,n,i,r){if(n.charAt(0)=="@"){let[o,a]=Rn(n);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,n,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 Ki(s,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=ht(e[0]),e.length>1&&(n=ht(e[e.length-1]))):e instanceof Map&&(t=ht(e)),t||n?new ji(s,t,n):null}var ji=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}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&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(le(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(le(this._element,this._endStyles),this._endStyles=null),V(this._element,this._initialStyles),this._state=3)}}return s})();function ht(s){let e=null;return s.forEach((t,n)=>{qi(n)&&(e=e||new Map,e.set(n,t))}),e}function qi(s){return s==="display"||s==="position"}var xe=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,n,i){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=i,this._duration=n.duration,this._delay=n.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(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}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((n,i)=>{i!=="offset"&&e.set(i,this._finished?n:Rt(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},We=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Vn(e,t)}getParentElement(e){return Nt(e)}query(e,t,n){return Gn(e,t,n)}computeStyle(e,t,n){return Rt(e,t)}animate(e,t,n,i,r,o=[]){let a=i==0?"both":"forwards",l={duration:n,delay:i,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof xe);ai(n,i)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=ii(t).map(y=>new Map(y));u=li(e,u,c);let S=Ki(e,u);return new xe(e,u,l,S)}};var Ke="@",ss="@.disabled",Je=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,n,i){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=i}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,n,i=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,n){this.parentNode(t)&&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,n,i){this.delegate.setAttribute(e,t,n,i)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,i){this.delegate.setStyle(e,t,n,i)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Ke&&t==ss?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n,i){return this.delegate.listen(e,t,n,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},Mt=class extends Je{factory;constructor(e,t,n,i,r){super(t,n,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Ke?t.charAt(1)=="."&&t==ss?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n,i){if(t.charAt(0)==Ke){let r=Ui(e),o=t.slice(1),a="";return o.charAt(0)!=Ke&&([o,a]=Qi(o)),this.engine.listen(this.namespaceId,r,o,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,n,l)})}return this.delegate.listen(e,t,n,i)}};function Ui(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function Qi(s){let e=s.indexOf("."),t=s.substring(0,e),n=s.slice(e+1);return[t,n]}var Ye=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(e,t){let n="",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 Je(n,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 Mt(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));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,n])}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()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var Vi=(()=>{class s extends ye{constructor(t,n,i){super(t,n,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||s)(W(tn),W(ce),W(ue))};static \u0275prov=q({token:s,factory:s.\u0275fac})}return s})();function Gi(){return new Ue}function xi(s,e,t){return new Ye(s,e,t)}var is=[{provide:ue,useFactory:Gi},{provide:ye,useClass:Vi},{provide:Vt,useFactory:xi,deps:[an,ye,Pe]}],Wi=[{provide:ce,useFactory:()=>new We},{provide:tt,useValue:"BrowserAnimations"},...is],zr=[{provide:ce,useClass:Ct},{provide:tt,useValue:"NoopAnimations"},...is];function rs(){return Ht("NgEagerAnimations"),[...Wi]}var os=(()=>{class s{http;prefix;suffix;constructor(t,n="/assets/i18n/",i=".json"){this.http=t,this.prefix=n,this.suffix=i}getTranslation(t){return this.http.get(`${this.prefix}${t}${this.suffix}`)}static \u0275fac=function(n){return new(n||s)(W(Re),W(String),W(String))};static \u0275prov=q({token:s,factory:s.\u0275fac})}return s})();function Ji(s,e){if(s&1&&(Q(0,"li")(1,"h2")(2,"a",1),re(3),me(4,"translate"),Y()()()),s&2){let t,n=e.$implicit;U(2),De("routerLink","/"+n.path),U(),Fe(" ",fe(4,2,((t=n.name)!==null&&t!==void 0?t:n.path)+".title")," ")}}var as=(()=>{class s{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"}]}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-home"]],decls:3,vars:0,consts:[[1,"mt-3"],[3,"routerLink"]],template:function(n,i){n&1&&(Q(0,"ul",0),Ne(1,Ji,5,4,"li",null,Jt),Y()),n&2&&(U(),Ce(i.sections))},dependencies:[un,Oe],encapsulation:2,changeDetection:0})}}return s})();var ls=(()=>{class s{constructor(){}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-unauthenticated"]],decls:4,vars:3,consts:[[1,"bkd-container"],[1,"alert","alert-danger","my-3"]],template:function(n,i){n&1&&(Q(0,"div",0)(1,"div",1),re(2),me(3,"translate"),Y()()),n&2&&(U(2),Fe(" ",fe(3,1,"unauthenticated.message")," "))},dependencies:[Oe],encapsulation:2})}}return s})();var Xe=(()=>{class s{constructor(){this.storage=w(Sn)}get isAuthenticated(){return!!this.accessToken}get accessToken(){return this.storage.getAccessToken()}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275prov=q({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();function B(){return()=>{let s=w(Xe),e=w(ke);return s.isAuthenticated?!0:(e.navigate(["/unauthenticated"]),!1)}}var cs=[{path:"dashboard",canActivate:[B()],loadChildren:()=>import("./chunk-PUOZNCOL.js").then(s=>s.DASHBOARD_ROUTES)},{path:"presence-control",canActivate:[B()],loadChildren:()=>import("./chunk-HK7T6V6Q.js").then(s=>s.PRESENCE_CONTROL_ROUTES)},{path:"open-absences",canActivate:[B()],loadChildren:()=>import("./chunk-G5HWFMIA.js").then(s=>s.OPEN_ABSENCES_ROUTES)},{path:"edit-absences",canActivate:[B()],loadChildren:()=>import("./chunk-5YNREB6T.js").then(s=>s.EDIT_ABSENCES_ROUTES)},{path:"evaluate-absences",canActivate:[B()],loadChildren:()=>import("./chunk-NBXL4QFT.js").then(s=>s.EVALUATE_ABSENCES_ROUTES)},{path:"events",canActivate:[B()],loadChildren:()=>import("./chunk-PMHSF6LH.js").then(s=>s.EVENTS_ROUTES)},{path:"my-absences",canActivate:[B()],loadChildren:()=>import("./chunk-WHFJNRLF.js").then(s=>s.MY_ABSENCES_ROUTES)},{path:"my-profile",canActivate:[B()],loadChildren:()=>import("./chunk-S7HYT6Z5.js").then(s=>s.MY_PROFILE_ROUTES)},{path:"my-grades",canActivate:[B()],loadChildren:()=>import("./chunk-VMIOSRDB.js").then(s=>s.MY_GRADES_ROUTES)},{path:"my-settings",canActivate:[B()],loadChildren:()=>import("./chunk-66LIMDSV.js").then(s=>s.MY_SETTINGS_ROUTES)},{path:"unauthenticated",component:ls},{path:"",component:as,pathMatch:"full"}];function us(){return(s,e)=>{let t=w(Xe),n=w(X);if(s.url.startsWith(n.apiUrl)&&t.accessToken){let i=s.headers.set("Authorization",`Bearer ${t.accessToken}`);return e(s.clone({headers:i}))}return e(s)}}function hs(){return(s,e)=>{let t=w(X);if(!s.headers.has("X-Role-Restriction")&&t.headerRoleRestriction){let n=Yi();if(n&&t.headerRoleRestriction[n]){let i=s.headers.set("X-Role-Restriction",t.headerRoleRestriction[n]);return e(s.clone({headers:i}))}}return e(s)}}function Yi(){let s=w(ke),e=s.url?bn(s.url):null;return e?pn(e):null}function ds(){return[{provide:Qt,useClass:Xi}]}var Xi=(()=>{class s{constructor(){this.ngZone=w(Pe),this.translate=w(yn),this.toastService=w(pe)}handleError(t){console.error(String(t)),t instanceof sn||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"))})}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275prov=q({token:s,factory:s.\u0275fac})}}return s})();function Zi(s,e){return new os(s,`${e.scriptsAndAssetsPath}/assets/locales/`,".json")}var ms={providers:[hn(cs,dn()),rn(on([wn(),us(),hs()])),rs(),ds(),_n({loader:{provide:gn,useFactory:Zi,deps:[Re,X]}}),En()]};var fs={production:!0};fs.production&&void 0;it(An);it(Mn);ln(Nn,ms).catch(s=>console.error(s));