import{g as _n}from"./chunk-W3YWIRPA.js";import{a as pt,c as Ut,d as vn,e as hn,f as kn}from"./chunk-W7OWVJTW.js";import{$ as oe,$d as fi,A as Ft,Aa as v,Ab as Gi,Ac as Ht,B as Y,Ba as Li,Bb as Qi,Ca as p,Cb as jt,Cc as Zi,Cd as Qt,Da as It,E as Mi,Ec as Yi,F as ht,Fa as Vi,Fd as Le,G as je,Ga as X,Gc as Xi,Hb as ut,Ib as W,Ic as tn,Jb as E,Ka as o,La as r,Ma as U,N as rt,Na as S,Nb as zi,Oa as y,Ob as M,P as Bi,Pb as Wi,Pc as D,Q as it,Qa as V,Qb as we,Qc as kt,Ra as Ni,Sa as P,Sc as wt,T as N,Ta as m,Tb as Ae,Td as mi,Ua as st,V as q,Va as J,Vc as Ee,Vd as pi,W as re,Wa as Yt,Wb as li,Wc as en,Wd as ci,Xc as nn,Y as L,Yc as R,Z as Fi,Zd as sn,_ as h,aa as ct,ab as At,ba as G,bb as Et,bd as an,cb as Tt,d as ne,da as xt,db as Pe,ea as $,eb as s,f as Ti,fa as K,fb as u,fd as gt,fe as dn,g as ae,ga as ji,gb as A,gd as vt,ge as mn,h as Fe,hb as Dt,hc as qi,hd as Ue,he as ui,i as Bt,ia as Zt,ib as Vt,id as Oe,ie as pn,ja as Pi,jd as mt,je as cn,ka as ye,kb as le,kd as rn,ke as fn,l as F,la as Lt,lb as se,ld as $e,mb as de,mc as Ji,md as di,me as un,n as et,nb as ft,nc as me,nd as Ke,ne as Ve,o as Se,oa as oi,od as Ct,p as k,pa as wi,pb as Hi,pc as si,q as z,qb as Nt,qc as dt,qd as on,qe as Ne,r as Z,ra as a,rc as B,rd as St,re as He,sa as g,sd as ln,se as gn,ta as Ui,tb as c,td as Re,te as Ge,ua as Oi,ub as f,uc as pe,ud as Gt,vc as _,ve as xn,wa as $i,wb as Ie,wc as b,xa as Ki,xc as Pt,xd as fe,y as Di,ya as C,yc as ce,za as Ri}from"./chunk-JVZYLTZ6.js";var Ia=[[["",8,"ladok-card-body-content"]],[["",8,"ladok-card-body-content-extra"]],[["",8,"ladok-card-footer-content"]]],Aa=[".ladok-card-body-content",".ladok-card-body-content-extra",".ladok-card-footer-content"],Ea=i=>({"shadow-sm":i});function Ta(i,d){if(i&1){let t=V();o(0,"div")(1,"ladok-visa-mer",5),P("visaMer",function(n){$(t);let l=m();return K(l.togglaExtraContent(n))}),r()()}if(i&2){let t=m();a(),p("togglarId",t.id)}}var Ot=(()=>{class i{constructor(){this.interaktivtKort=!0,this.id=Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(),this.visaExtraContent=!1}togglaExtraContent(t){this.visaExtraContent=t}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-card"]],inputs:{interaktivtKort:"interaktivtKort"},ngContentSelectors:Aa,decls:8,vars:7,consts:[["extraContent",""],[1,"card",3,"ngClass"],[1,"card-body"],[4,"ngIf"],[1,"mt-0",3,"id"],[3,"visaMer","togglarId"]],template:function(e,n){if(e&1&&(st(Ia),o(0,"div",1)(1,"div",2),J(2),v(3,Ta,2,1,"div",3),o(4,"div",4,0),J(6,1),r(),J(7,2),r()()),e&2){let l=Pe(5);p("ngClass",Nt(5,Ea,n.interaktivtKort)),a(3),p("ngIf",l.innerHTML==null?null:l.innerHTML.toLowerCase().startsWith("<ladok-card-body-extra")),a(),It("d-none",!n.visaExtraContent),p("id",n.id)}},dependencies:[ut,E,Ke],changeDetection:0})}}return i})();var Da=[[["",8,"ladok-card-body-sub-rubrik"]],[["",8,"ladok-card-body-sub-rubrik-badge"]],"*",[["",8,"ladok-card-body-rubrik"]]],Ma=[".ladok-card-body-sub-rubrik",".ladok-card-body-sub-rubrik-badge","*",".ladok-card-body-rubrik"];function Ba(i,d){i&1&&(o(0,"div",1)(1,"div",6)(2,"h3",7),J(3,3),r()()())}var $t=(()=>{class i{constructor(){this.harRubrik=!0}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-card-body"]],inputs:{harRubrik:"harRubrik"},ngContentSelectors:Ma,decls:11,vars:1,consts:[["class","row",4,"ngIf"],[1,"row"],[1,"d-flex"],[1,"text-break","text-muted"],[1,"ms-auto"],[1,"bredd-col-9"],[1,"col","text-break"],[1,"card-title","mb-0"]],template:function(e,n){e&1&&(st(Da),v(0,Ba,4,0,"div",0),o(1,"div",1)(2,"div")(3,"div",2)(4,"div",3),J(5),r(),o(6,"div",4),J(7,1),r()()()(),o(8,"div",1)(9,"div",5),J(10,2),r()()),e&2&&p("ngIf",n.harRubrik)},dependencies:[E],changeDetection:0})}}return i})();function ja(i,d){if(i&1&&(o(0,"span",2),s(1),r()),i&2){let t=m(2);p("ngClass",t.vyInformation.badgeKlass),a(),u(t.vyInformation.badgeText)}}function Pa(i,d){if(i&1&&(S(0),v(1,ja,2,2,"span",1),y()),i&2){let t=m();a(),p("ngIf",t.vyInformation.visaBadge)}}var zs=(()=>{class i extends b{constructor(t,e){super(),this.tillstandService=t,this.utbildningService=e,this.vyInformation=null}ngOnChanges(t){t?.kurs?.currentValue&&(this.vyInformation=this.uppdateraVyInformationFr\u00E5nKurs(t.kurs.currentValue)),t?.paketering?.currentValue&&(this.vyInformation=this.uppdateraVyInformationFr\u00E5nStruktur(t.paketering.currentValue))}uppdateraVyInformationFr\u00E5nKurs(t){let e={badgeKlass:this.tillstandService.tillst\u00E5ndsmappningkurs[t.tillfallesdeltagande.TillstandKurs.Sammanfattattillstand].cssClass,badgeText:this.tillstandService.tillst\u00E5ndsmappningkurs[t.tillfallesdeltagande.TillstandKurs.Sammanfattattillstand].text,visaBadge:!0};if(this.utbildningService.matcharTillst\u00E5nd(t,"studiedeltagande.domain.tillstandsdefinition.registrerad","studiedeltagande.domain.tillstandsdefinition.omregistrerad")){e.visaBadge=!this.skallBageD\u00F6ljas(t);let n=this.utbildningService.periodInfoF\u00F6rTillst\u00E5nd(t.tillfallesdeltagande,"studiedeltagande.domain.tillstandsdefinition.registrerad","studiedeltagande.domain.tillstandsdefinition.omregistrerad");n.sista&&n.antalPerioder>1&&(e.badgeText+=" "+this.t(this.texter.shared.pa_period)+" "+n.sista)}return e}uppdateraVyInformationFr\u00E5nStruktur(t){let e={badgeKlass:this.tillstandService.tillst\u00E5ndsmappningStruktur[t.TillstandKurspaketering.Sammanfattat]?.cssClass,badgeText:this.tillstandService.tillst\u00E5ndsmappningStruktur[t.TillstandKurspaketering.Sammanfattat]?.text,visaBadge:!0};return e.badgeText?e:void 0}skallBageD\u00F6ljas(t){return!this.utbildningService.kanResultatSattasMapRegler(t)&&this.utbildningService.idag\u00C4rEfterKursensStudieperiod(t)}static{this.\u0275fac=function(e){return new(e||i)(g(Ne),g(Ut))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-studiedeltagande-tillstand-badge"]],inputs:{kurs:"kurs",paketering:"paketering"},features:[C,xt],decls:1,vars:1,consts:[[4,"ngIf"],["class","badge",3,"ngClass",4,"ngIf"],[1,"badge",3,"ngClass"]],template:function(e,n){e&1&&v(0,Pa,2,1,"ng-container",0),e&2&&p("ngIf",n.vyInformation)},dependencies:[ut,E],changeDetection:0})}}return i})();var bn=(()=>{class i{constructor(t){this.i18n=t}validate(t){return this.min<=t.value&&t.value<=this.max?null:{ladokInomValidator:{meddelande:this.i18n.transform(B.validators.inom).replace("{1}",""+this.min).replace("{2}",""+this.max)}}}static{this.\u0275fac=function(e){return new(e||i)(g(_))}}static{this.\u0275dir=ct({type:i,selectors:[["","ladokInomValidator",""]],inputs:{min:"min",max:"max"},features:[ft([{provide:Gt,useExisting:i,multi:!0}])]})}}return i})();var Cn=(()=>{class i{constructor(t){this.i18n=t}validate(t){if(!this.perioder)return null;let e=this.perioder.split(","),n=new Array(e.length/2);return tn(e,(l,x,T)=>{let w=ci.from(t.get(l)?.value),nt=ci.from(t.get(x)?.value);w?.year&&nt?.year&&(w.before(nt)||(n[T]=this.i18n.transform(B.validators.period.fel_datumordning),t.get(l).setErrors({})))}),n.every(l=>!l)?null:{ladokPeriodValidator:{meddelande:n}}}static{this.\u0275fac=function(e){return new(e||i)(g(_))}}static{this.\u0275dir=ct({type:i,selectors:[["","ladokPeriodValidator",""]],inputs:{perioder:[0,"ladokPeriodValidator","perioder"]},features:[ft([{provide:Gt,useExisting:i,multi:!0}])]})}}return i})();var Sn=(()=>{class i{constructor(){}validate(t){if(t.value){let e=this.accept.split(","),n="."+t.value.split(".").pop();if(e.indexOf(n)===-1)return{validExt:!1}}return null}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275dir=ct({type:i,selectors:[["","ladokInputFileValidator",""]],inputs:{accept:"accept"},features:[ft([{provide:Gt,useExisting:i,multi:!0}])]})}}return i})();var gi=(()=>{class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=oe({type:i})}static{this.\u0275inj=re({providers:[bn,Cn,Sn],imports:[Ae]})}}return i})();(function(i){i.ng??={},i.ng.common??={},i.ng.common.locales??={};let d=void 0;function t(e){let n=e,l=Math.floor(Math.abs(e)),x=e.toString().replace(/^[^.]*\.?/,"").length;return l===1&&x===0?1:5}i.ng.common.locales.sv=["sv",[["fm","em"],d,d],[["fm","em"],["f.m.","e.m."],["f\xF6rmiddag","eftermiddag"]],[["S","M","T","O","T","F","L"],["s\xF6n","m\xE5n","tis","ons","tors","fre","l\xF6r"],["s\xF6ndag","m\xE5ndag","tisdag","onsdag","torsdag","fredag","l\xF6rdag"],["s\xF6","m\xE5","ti","on","to","fr","l\xF6"]],d,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]],d,[["f.Kr.","e.Kr."],d,["f\xF6re Kristus","efter Kristus"]],1,[6,0],["y-MM-dd","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",d,d,d],[",","\xA0",";","%","+","\u2212","\xD710^","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"SEK","kr","svensk krona",{AUD:[d,"$"],BBD:["Bds$","$"],BMD:["BM$","$"],BRL:["BR$","R$"],BSD:["BS$","$"],BYN:[d,"\u0440."],BZD:["BZ$","$"],CNY:[d,"\xA5"],DKK:["Dkr","kr"],DOP:["RD$","$"],EEK:["Ekr"],EGP:["EG\xA3","E\xA3"],ESP:[],GBP:[d,"\xA3"],HKD:[d,"$"],IEP:["IE\xA3"],INR:[d,"\u20B9"],ISK:["Ikr","kr"],JMD:["JM$","$"],JPY:[d,"\xA5"],KRW:[d,"\u20A9"],NOK:["Nkr","kr"],NZD:[d,"$"],PHP:[d,"\u20B1"],RON:[d,"L"],SEK:["kr"],TWD:[d,"NT$"],USD:["US$","$"],VND:[d,"\u20AB"]},"ltr",t,[[["midn.","p\xE5 morg.","p\xE5 f\xF6rm.","p\xE5 efterm.","p\xE5 kv\xE4llen","p\xE5 natten"],["midnatt","p\xE5 morg.","p\xE5 f\xF6rm.","p\xE5 efterm.","p\xE5 kv\xE4llen","p\xE5 natten"],["midnatt","p\xE5 morgonen","p\xE5 f\xF6rmiddagen","p\xE5 eftermiddagen","p\xE5 kv\xE4llen","p\xE5 natten"]],[["midn.","morg.","f\xF6rm.","efterm.","kv\xE4ll","natt"],["midnatt","morgon","f\xF6rm.","efterm.","kv\xE4ll","natt"],["midnatt","morgon","f\xF6rmiddag","eftermiddag","kv\xE4ll","natt"]],["00:00",["05:00","10:00"],["10:00","12:00"],["12:00","18:00"],["18:00","24:00"],["00:00","05:00"]]]]})(globalThis);var ze=(()=>{class i{constructor(){this.visaMerSubject=new Fe(!1),this.visaMer$=this.visaMerSubject.asObservable()}togglaVisaMer(){this.visaMerSubject.next(!this.visaMerSubject.getValue())}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();var Ua=["visaMerComponent"],Oa=["textDiv"];function $a(i,d){if(i&1){let t=V();S(0),o(1,"dt",4)(2,"ladok-visa-mer",5,0),P("visaMer",function(n){$(t);let l=m(2);return K(l.visaMerTogglad(n))}),r()(),o(4,"dd",6)(5,"div",7)(6,"div",8,1),c(8,"async"),P("click",function(n){$(t);let l=m(2);return K(l.klickad(n))}),r()()(),y()}if(i&2){let t=m(2);a(2),p("togglarId",t.id)("knapptext",t.visaMerText),a(4),It("minimerad-visning-utanfor-kort",t.utanforKort&&!t.visaMer)("minimerad-visning",!t.visaMer),p("innerHTML",f(8,7,t.aktuellLokalText$),oi)}}function Ka(i,d){if(i&1&&(S(0),o(1,"dt",4),s(2),c(3,"i18n"),r(),o(4,"dd",6)(5,"div",9),U(6,"span",10),c(7,"async"),r()(),y()),i&2){let t=m(2);a(2),u(f(3,6,t.texter.lokala_texter.information)),a(4),It("minimerad-visning-utanfor-kort",!1)("minimerad-visning",!1),p("innerHTML",f(7,8,t.aktuellLokalText$),oi)}}function Ra(i,d){if(i&1&&(S(0),o(1,"dl",3),v(2,$a,9,9,"ng-container",2)(3,Ka,8,10,"ng-container",2),r(),y()),i&2){let t=m();a(2),p("ngIf",t.langLokalText),a(),p("ngIf",!t.langLokalText)}}var hd=(()=>{class i extends b{constructor(t,e){super(),this.lokalTextComponentService=t,this.lokalTextAsyncPipe=e,this.utanforKort=!1,this.id=""+Math.random(),this.visaMerSubject=new Fe(!1),this.visaMer$=this.visaMerSubject.asObservable(),this.visaMerText=this.t(B.lokala_texter.information)}ngOnChanges(t){t&&t.nyckel&&(this.lokalText$=this.lokalTextAsyncPipe.transform(t.nyckel.currentValue).pipe(N(e=>{this.langLokalText=e.length>400})),this.aktuellLokalText$=z([this.lokalText$,this.visaMer$]).pipe(k(([e,n])=>this.langLokalText&&!n?e.substr(0,400):e)))}visaMerTogglad(t){this.visaMer=t,this.visaMerSubject.next(t)}klickad(t){let e=t.target;e===this.textDiv.nativeElement?(this.visaMerComponent.togglaVisaMer(),t.preventDefault()):e.localName==="a"&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer"))}static{this.\u0275fac=function(e){return new(e||i)(g(ze),g(Ge))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-lokal-text"]],viewQuery:function(e,n){if(e&1&&(At(Ua,5),At(Oa,5)),e&2){let l;Et(l=Tt())&&(n.visaMerComponent=l.first),Et(l=Tt())&&(n.textDiv=l.first)}},inputs:{nyckel:"nyckel",utanforKort:"utanforKort"},features:[ft([ze]),C,xt],decls:2,vars:3,consts:[["visaMerComponent",""],["textDiv",""],[4,"ngIf"],[1,"row","mt-3"],[1,"col-12","mb-2"],[3,"visaMer","togglarId","knapptext"],[1,"col-12"],[1,"ladok-lokal-text","cursor-pointer"],[1,"max-bredd",3,"click","innerHTML"],[1,"ladok-lokal-text"],[1,"max-bredd",3,"innerHTML"]],template:function(e,n){e&1&&(v(0,Ra,4,2,"ng-container",2),c(1,"async")),e&2&&p("ngIf",f(1,1,n.lokalText$))},dependencies:[E,Ke,M,_],styles:['.ladok-lokal-text[_ngcontent-%COMP%]{white-space:pre-wrap;border-top:1px solid rgba(0,0,0,.125);padding:1rem;position:relative}.ladok-lokal-text[_ngcontent-%COMP%]   .max-bredd[_ngcontent-%COMP%]{max-width:48rem}.cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}.minimerad-visning[_ngcontent-%COMP%]:before{content:"";width:96%;height:130px;display:block;position:absolute;left:0;bottom:1px;background:linear-gradient(to bottom,#fff0 30%,#fff)}.minimerad-visning-utanfor-kort[_ngcontent-%COMP%]:before{content:"";width:96%;height:130px;display:block;position:absolute;left:0;bottom:1px;background:linear-gradient(to bottom,#fff0 30%,#f0f3f9)}'],changeDetection:0})}}return i})();var La=["*"],ue=(()=>{class i extends b{constructor(){super(),this.Ikoner=Pt,this.fullbredd=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-card-body-extra"]],inputs:{fullbredd:"fullbredd"},features:[C],ngContentSelectors:La,decls:3,vars:2,consts:[[1,"row","mt-3"]],template:function(e,n){e&1&&(st(),o(0,"div",0)(1,"div"),J(2),r()()),e&2&&(a(),It("bredd-col-9",!n.fullbredd))},changeDetection:0})}}return i})();var Va=["*"],yn=(()=>{class i{constructor(){}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-card-footer"]],ngContentSelectors:Va,decls:3,vars:0,consts:[[1,"row"],[1,"bredd-col-9"]],template:function(e,n){e&1&&(st(),o(0,"div",0)(1,"div",1),J(2),r()())},changeDetection:0})}}return i})();var _t=(()=>{class i{constructor(t,e,n,l,x){this.studentService=t,this.h\u00E4ndelseService=e,this.indexService=n,this.i18n=l,this.linkService=x,this.ingaSt\u00F6d={Lista:[]}}kanAns\u00F6ka(t){return this.linkService.exists(t,R.pedagogisktstod.ansokan,"POST")}m\u00F6jligaSt\u00F6dP\u00E5Aktivitetstillf\u00E4lle(t){return this.studentService.aktuellPsStudent$.pipe(k(e=>this.linkService.findByRel(e,R.pedagogisktstod.dokumenterat_stod.for_aktivitetstillfalle,"GET")),it(e=>{if(!e)return F(this.ingaSt\u00F6d);let n=new li().set("aktivitetstillfalleuid",t);return this.linkService.foljLank(e,void 0,void 0,{params:n})}),k(e=>this.unikaSt\u00F6dBen\u00E4mningar(e)),N(e=>console.log("m\xF6jligaSt\xF6dP\xE5Aktivitetstillf\xE4lle",e)),rt(1))}skapaAnpassningsans\u00F6kan(t,e,n=!1){return F(!0).pipe(k(l=>this.linkService.findByRel(t,R.pedagogisktstod.ansokan,"POST")),it(l=>l?this.linkService.foljLank(l,e):F(void 0)),N(l=>{n?this.h\u00E4ndelseService.nyH\u00E4ndelse(D.AnpassningAktivitetstillf\u00E4lle,{}):this.h\u00E4ndelseService.nyH\u00E4ndelse(D.AnpassningAktivitetstillf\u00E4lleEfterAnm\u00E4lan,{})}),Y(l=>{let x={felmeddelande:gt(l)};return this.h\u00E4ndelseService.nyH\u00E4ndelse(D.AnpassningAktivitetstillf\u00E4lle_misslyckad,x),F(x)}))}konfigurationP\u00E5Aktivitetstillf\u00E4lle(t){return this.indexService.psIndex$.pipe(k(e=>this.linkService.findByRel(e,R.pedagogisktstod.konfiguration,"GET")),it(e=>{if(!e)return F(null);let n=new li().set("aktivitetstillfalleUID",t);return this.linkService.foljLank(e,void 0,void 0,{params:n})}),N(e=>console.log("konfigurationP\xE5Aktivitetstillf\xE4lle",e)),rt(1))}unikaSt\u00F6dBen\u00E4mningar(t){return t.Lista=t.Lista.reduce((e,n)=>{let l=this.i18n.transform(n.BenamningEllerAlternativBenamning);return e.find(x=>this.i18n.transform(x.BenamningEllerAlternativBenamning)===l)||e.push(n),e},[]),t}avbrytAns\u00F6kan(t){return F(!0).pipe(k(e=>this.linkService.findByRel(t,R.pedagogisktstod.ansokan,"DELETE")),it(e=>e?this.linkService.foljLank(e):F(void 0)),N(e=>{this.h\u00E4ndelseService.nyH\u00E4ndelse(D.AvbrytAnpassningAktivitetstillf\u00E4lle,{})}),Y(e=>{let n={felmeddelande:gt(e)};return this.h\u00E4ndelseService.nyH\u00E4ndelse(D.AvbrytAnpassningAktivitetstillf\u00E4lle_misslyckad,n),F(n)}))}static{this.\u0275fac=function(e){return new(e||i)(L(Oe),L(wt),L(Ue),L(_),L(vt))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var bt=(()=>{class i{constructor(t,e,n,l){this.studentService=t,this.datumService=e,this.linkService=n,this.h\u00E4ndelseService=l,this.h\u00E4mtaOm$=Di(F(!0),this.h\u00E4ndelseService.h\u00E4ndelser([kt.anm\u00E4lanaktivitetstillf\u00E4lle,kt.avanm\u00E4lanaktivitetstillf\u00E4lle,kt.flyttaanmalan,kt.anpassningaktivitetstillf\u00E4lle,kt.anpassningaktivitetstillf\u00E4lleefteranm\u00E4lan,kt.avbrytanpassningaktivitetstillf\u00E4lle]),this.h\u00E4ndelseService.h\u00E4ndelser([kt.registrering,kt.avbrott,kt.\u00E5terbud,kt.avanm\u00E4lan,kt.kursanm\u00E4lan,kt.studieval,kt.flyttaanmalan],2e3)),this.examinationstillfallen$=z([this.studentService.aktuellRrStudent$,this.h\u00E4mtaOm$]).pipe(N(x=>console.log("H\xE4mtar aktivitetstillf\xE4llen")),it(([x,T])=>{let w=this.linkService.findByRel(x,R.resultat.aktivitetstillfallen_for_student,"GET");return this.linkService.foljLank(w,null,403)}),k(({AktivitetstillfallenForStudent:x})=>x.sort(this.sorteraExaminationstillf\u00E4llen)),rt(1)),this.antalOppnaForAnmalan$=this.examinationstillfallen$.pipe(k(x=>this.beraknaAntalOppnaForAnmalan(x))),this.sorteraAnmalningsbaraExaminationstillfallen=(x,T)=>this.sorteraPaAnmalningsdatumTidigastForst(x,T),this.sorteraExaminationstillf\u00E4llen=(x,T)=>this.sorteraPaDatumTidigastForst(x,T)}skapaOchAnmalTillAktivitetstillfalle(t,e,n){let l={},x=!1;return t.pipe(ht(1),N(T=>l.examinationstillfalle=T),N(T=>x=this.kanSkapaViaNgnMojlighet(T.Aktivitetstillfallesreferenser)),Z(T=>{if(x){let w=this.linkService.findByRel(e.link,R.resultat.examinationstillfalle.skapa_och_anmal,"POST"),nt={AktivitetstillfallesalternativUID:n};return z([F(T),this.linkService.foljLank(w,nt)])}else return z([F(T),F(null)])}),Z(([T,w])=>{if(w)return F(w);{let nt=this.linkService.findByRel(T.Aktivitetstillfallesmojlighet,R.resultat.examinationstillfalle.anmal_mojlighet,"PUT"),at={AktivitetstillfallesalternativUID:n};return this.linkService.foljLank(nt,at)}}),N(T=>console.log(T)),k(T=>(l.m\u00F6jlighet=T,this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Anm\u00E4lanAktivitetstillf\u00E4lle,l),l)),Y(T=>(l.felmeddelande=gt(T),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Anm\u00E4lanAktivitetstillf\u00E4lle_misslyckad,l),F(l))))}avanmalFranAktivitetstillfalle(t){let e={};return t.pipe(ht(1),N(n=>e.examinationstillfalle=n),Z(n=>{let l=this.linkService.findByRel(n.Aktivitetstillfallesmojlighet,R.resultat.examinationstillfalle.avanmal,"PUT");return this.linkService.foljLank(l,null,404)}),N(n=>console.log(n)),k(n=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Avanm\u00E4lanAktivitetstillf\u00E4lle,e),e)),Y(n=>(e.felmeddelande=gt(n),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Avanm\u00E4lanAktivitetstillf\u00E4lle_misslyckad,e),F(e))))}flyttaAnmalan(t,e){let n={};return t.pipe(ht(1),N(l=>n.examinationstillfalle=l),Z(l=>{let x=this.linkService.findByRel(l.Aktivitetstillfallesmojlighet,R.resultat.examinationstillfalle.flytta_anmalan,"PUT"),T={AktivitetstillfallesalternativUID:e};return this.linkService.foljLank(x,T)}),N(l=>console.log(l)),k(l=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.FlyttaAnm\u00E4lan,n),n)),Y(l=>(n.felmeddelande=gt(l),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.FlyttaAnm\u00E4lan_misslyckad,n),F(n))))}kanAvanmala(t){return!!this.avanmalaLank(t)}avanmalaLank(t){return t.Aktivitetstillfallesmojlighet&&this.linkService.findByRel(t.Aktivitetstillfallesmojlighet.link,R.resultat.examinationstillfalle.avanmal,"PUT")}flyttaAnmalanLank(t){return t.Aktivitetstillfallesmojlighet&&this.linkService.findByRel(t.Aktivitetstillfallesmojlighet.link,R.resultat.examinationstillfalle.flytta_anmalan,"PUT")}kanAnmala(t){let e=t.Aktivitetstillfallesmojlighet,n=t.Aktivitetstillfallesreferenser;return!e&&this.kanSkapaViaNgnMojlighet(n)||e&&this.kanAnmalaMojlighet(e)}kanFlyttaAnmalan(t){return!!this.flyttaAnmalanLank(t)&&t.Aktivitetstillfalle.Aktivitetstillfallesalternativ.length>1}filtreraAllaVarsDatumEjPasserat(t){return t.filter(e=>e.Aktivitetstillfalle.Aktivitetstillfallesalternativ.some(n=>n.Datumperiod?this.datumService.beforeOrEqual(this.datumService.idag(),n.Datumperiod.Slutdatum):!0))}filtreraBortTillf\u00E4llenSom\u00C4rMer\u00C4n720DagarEfterSlutdatum(t){let e=this.datumService.datumMinusDagar(this.datumService.idag(),720);return t.filter(n=>n.Aktivitetstillfalle.Aktivitetstillfallesalternativ.every(l=>l.Datumperiod?this.datumService.after(this.datumService.idag(),l.Datumperiod.Slutdatum)&&this.datumService.after(l.Datumperiod.Slutdatum,e):!1))}sorteraPaDatumTidigastForst(t,e){let n=this.datumService.datumPlusDagar(this.datumService.idag(),1e4),l=this.datumService.datumPlusDagar(this.datumService.idag(),1e4);return t.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod&&t.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod.Startdatum&&(n=t.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod.Startdatum),e.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod&&e.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod.Startdatum&&(l=e.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod.Startdatum),this.datumService.compare(n,l)}sorteraPaAnmalningsdatumTidigastForst(t,e){let n=this.datumService.datumPlusDagar(this.datumService.idag(),1e4),l=this.datumService.datumPlusDagar(this.datumService.idag(),1e4);return t.Aktivitetstillfalle.Anmalningsperiod&&t.Aktivitetstillfalle.Anmalningsperiod.Slutdatum&&(n=t.Aktivitetstillfalle.Anmalningsperiod.Slutdatum),e.Aktivitetstillfalle.Anmalningsperiod&&e.Aktivitetstillfalle.Anmalningsperiod.Slutdatum&&(l=e.Aktivitetstillfalle.Anmalningsperiod.Slutdatum),this.datumService.compare(n,l)}beraknaAntalOppnaForAnmalan(t){let e=0;return t.forEach(n=>{n.Aktivitetstillfalle.Anmalan&&(n.Aktivitetstillfallesmojlighet&&!n.Aktivitetstillfallesmojlighet.Anmalan||!n.Aktivitetstillfallesmojlighet)&&this.datumInteEfterIdagOmDatumFinns(n)&&this.kanAnmala(n)&&(e=e+1)}),e}datumInteEfterIdagOmDatumFinns(t){return t.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod?this.datumService.beforeOrEqual(this.datumService.idag(),t.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0].Datumperiod.Slutdatum):!0}kanSkapaViaNgnMojlighet(t){return t.some(e=>this.kanAnmalaReferens(e))}kanAnmalaMojlighet(t){return!!this.anmalaMojlighetLank(t)}anmalaMojlighetLank(t){return this.linkService.findByRel(t.link,R.resultat.examinationstillfalle.anmal_mojlighet,"PUT")}kanAnmalaReferens(t){return this.linkService.exists(t.link,R.resultat.examinationstillfalle.skapa_mojlighet,"POST")}\u00E4rAllaAlternativFulla(t){return t.Aktivitetstillfalle.Aktivitetstillfallesalternativ.every(e=>e.Harttak?(e.AntalAnmalda??0)>=(e.Maxantal??0):!1)}static{this.\u0275fac=function(e){return new(e||i)(L(Oe),L(mt),L(vt),L(wt))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Q=(()=>{class i extends Ee(b){constructor(t,e,n,l,x){super(),this.benamningOchKodPipe=t,this.examinationAnpassningService=e,this.examinationstillfallenService=n,this.linkService=l,this.indexService=x,this.examinationstillfalleSubject=new Bt(1),this.examinationstillfalle$=this.examinationstillfalleSubject.asObservable(),this.ans\u00F6kan$=z([this.examinationstillfalle$,this.indexService.psIndex$]).pipe(k(([T,w])=>this.linkService.exists(w,R.pedagogisktstod.ansokan,"GET")?this.linkService.findByRel(T.Aktivitetstillfallesmojlighet,R.pedagogisktstod.ansokan,"GET"):null),it(T=>this.linkService.foljLank(T)),Y(T=>F(null)),N(T=>console.log("ans\xF6kan$",T)),rt(1)),this.finnsAnsokan$=this.ans\u00F6kan$.pipe(k(Boolean)),this.kanAnmala$=this.examinationstillfalle$.pipe(k(T=>{let w=this.examinationstillfallenService.kanAnmala(T);return{kanAnmala:w,kraverValAvKontext:w&&T.Aktivitetstillfallesreferenser?.length>1}})),this.m\u00F6jligaAnpassningar$=this.examinationstillfalle$.pipe(it(T=>this.examinationAnpassningService.m\u00F6jligaSt\u00F6dP\u00E5Aktivitetstillf\u00E4lle(T.Aktivitetstillfalle.Uid)),rt(1)),this.psKonfiguration$=z([this.finnsAnsokan$,this.m\u00F6jligaAnpassningar$,this.examinationstillfalle$]).pipe(ht(1),it(([T,w,nt])=>this.skapaKonfiguration(nt,w,this.examinationAnpassningService.konfigurationP\u00E5Aktivitetstillf\u00E4lle(nt.Aktivitetstillfalle.Uid))),rt(1)),this.kanAnsokaEfterAnmalan$=z([this.kanAnmala$,this.m\u00F6jligaAnpassningar$]).pipe(k(([T,w])=>!T.kanAnmala&&this.examinationAnpassningService.kanAns\u00F6ka(w)),rt(1)),this.ansokanMojlig$=this.m\u00F6jligaAnpassningar$.pipe(k(T=>this.examinationAnpassningService.kanAns\u00F6ka(T)),rt(1))}initieraExaminationstillfalle(t){this.examinationstillfalleSubject.next(t)}hamtaExaminationenAvser(t){if(this.avserModul(t)){let e="";return t.Aktivitetstillfallesreferenser.forEach(n=>e+=this.benamningOchKodPipe.transform(n.Utbildningsinstans)+", "),e.slice(0,-2)}else{let e="";return t.Aktivitetstillfallesreferenser.forEach(n=>e+=this.benamningOchKodPipe.transform(n.Kursinstans)+", "),e.slice(0,-2)}}avserModul(t){return t.Aktivitetstillfallesreferenser[0].Utbildningsinstans.Uid!==t.Aktivitetstillfallesreferenser[0].Kursinstans.Uid}skapaKonfiguration(t,e,n){return ne(this,null,function*(){if(e.Lista?.length===0)return null;let l=yield Se(n);return l||{AktivitetstillfalleUID:t.Aktivitetstillfalle.Uid,Ansokningsperiod:t.Aktivitetstillfalle.Anmalningsperiod}})}static{this.\u0275fac=function(e){return new(e||i)(L(pt),L(_t),L(bt),L(vt),L(Ue))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();var Qa=i=>({genomstruken:i});function za(i,d){if(i&1&&(o(0,"span",1),s(1),r()),i&2){let t=d.ngIf;p("ngClass",Nt(2,Qa,t.Installt)),a(),A(" ",t.Underrubrik,`
`)}}var In=(()=>{class i extends b{constructor(t,e){super(),this.examinationstillfalleKortComponentService=t,this.i18nPipe=e,this.examinationstillfalle$=this.examinationstillfalleKortComponentService.examinationstillfalle$,this.vyInformation$=this.examinationstillfalle$.pipe(k(n=>({Underrubrik:this.i18nPipe.transform(n.Aktivitetstillfalle),Installt:n.Aktivitetstillfalle.Installd})))}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(_))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-kort-rubrik"]],features:[C],decls:2,vars:3,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,n){e&1&&(v(0,za,2,4,"span",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[ut,E,M],styles:[".genomstruken[_ngcontent-%COMP%]{text-decoration:line-through}"],changeDetection:0})}}return i})();var An=(()=>{class i extends b{constructor(t,e){super(),this.examinationstillfalleKortComponentService=t,this.i18nPipe=e,this.examinationstillfalle$=this.examinationstillfalleKortComponentService.examinationstillfalle$,this.badgeKlass$=this.examinationstillfalle$.pipe(k(n=>this.beraknaBadgeKlass(n))),this.badgeText$=this.examinationstillfalle$.pipe(k(n=>this.beraknaBadgeText(n))),this.beraknaBadgeKlass=n=>n.Aktivitetstillfalle.Installd?"bg-light":n.Aktivitetstillfalle.Anmalan?n.Aktivitetstillfallesmojlighet&&n.Aktivitetstillfallesmojlighet.Anmalan?"bg-primary":"bg-light":n.Aktivitetstillfallesmojlighet?"bg-primary":"bg-light",this.beraknaBadgeText=n=>n.Aktivitetstillfalle.Installd?this.i18nPipe.transform(this.texter.examinationstillfallen.tillstand.installd):n.Aktivitetstillfalle.Anmalan?n.Aktivitetstillfallesmojlighet?n.Aktivitetstillfallesmojlighet.Anmalan?this.i18nPipe.transform(this.texter.examinationstillfallen.tillstand.anmald):this.i18nPipe.transform(this.texter.examinationstillfallen.tillstand.inte_anmald):this.i18nPipe.transform(this.texter.examinationstillfallen.tillstand.inte_anmald):n.Aktivitetstillfallesmojlighet?this.i18nPipe.transform(this.texter.examinationstillfallen.tillstand.deltagare):this.i18nPipe.transform(this.texter.examinationstillfallen.tillstand.inte_deltagare)}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(_))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-kort-status-badge"]],features:[C],decls:4,vars:6,consts:[[1,"badge",3,"ngClass"]],template:function(e,n){e&1&&(o(0,"span",0),c(1,"async"),s(2),c(3,"async"),r()),e&2&&(p("ngClass",f(1,2,n.badgeKlass$)),a(2),u(f(3,4,n.badgeText$)))},dependencies:[ut,M],changeDetection:0})}}return i})();var Wt=(()=>{class i{transform(t,e=!0){if(t.hasOwnProperty("Datumperiod")){let n="";return t.Datumperiod.hasOwnProperty("Startdatum")&&(n=t.Datumperiod.Startdatum,t.Datumperiod.Slutdatum!==t.Datumperiod.Startdatum&&(n+=" - "+t.Datumperiod.Slutdatum)),e&&t.hasOwnProperty("Starttid")&&t.Starttid.length>5&&(n+=" "+t.Starttid.substring(0,5),t.hasOwnProperty("Sluttid")&&t.Sluttid.length>5&&(n+=" - "+t.Sluttid.substring(0,5))),n}else return""}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=G({name:"aktivitetstillfallesalternativperiod",type:i,pure:!0})}}return i})();var qe=(()=>{class i{constructor(t){this.i18n=t,this.texter=B}transform(t,e){if(t){let n="";if(t.Fornamn&&t.Efternamn?n=t.Efternamn+", "+t.Fornamn:t.Fornamn?n=t.Fornamn:t.Efternamn&&(n=t.Efternamn),t.Avliden){let l=this.i18n.transform(this.texter.shared.avliden);n=n+" ("+l+")"}return n}return""}static{this.\u0275fac=function(e){return new(e||i)(g(_,16))}}static{this.\u0275pipe=G({name:"personNamn",type:i,pure:!0})}}return i})();function Za(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.anmalningsperiod)),a(3),u(t.Anmalningsperiod)}}function Ya(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.typ_av_examination)),a(3),u(t.TypAvExamination)}}function Xa(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4)(5,"a",5),s(6),r()(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,3,e.texter.examinationstillfallen.lank)),a(3),Yt("href",t.Lank,wi),a(),u(t.Lank)}}function tr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4)(5,"div",6),s(6),r()(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.ovrig_information)),a(4),u(t.OvrigInformation)}}function er(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.examinationen_avser)),a(3),u(t.ExaminationenAvser)}}function ir(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.omfattning)),a(3),u(t.Omfattning)}}function nr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.anonymiseringskod)),a(3),u(t.Anonymiseringskod)}}function ar(i,d){if(i&1&&(o(0,"div"),s(1),c(2,"personNamn"),r()),i&2){let t=d.$implicit;a(),A(" ",f(2,1,t)," ")}}function rr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),v(5,ar,3,3,"div",2),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.ansvariga)),a(3),p("ngForOf",t.Ansvariga)}}function or(i,d){if(i&1&&(S(0),o(1,"span"),s(2),c(3,"i18n"),c(4,"i18n"),r(),U(5,"hr",7),y()),i&2){let t=m().ngIf,e=m();a(2),Vt("",f(3,3,e.texter.examinationstillfallen.tillfallet_ges_pa)," ",t.Alternativ.length," ",f(4,5,e.texter.examinationstillfallen.alternativ),"")}}function lr(i,d){i&1&&U(0,"hr",9)}function sr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().$implicit,e=m(2);a(2),u(f(3,2,e.texter.examinationstillfallen.tidpunkt)),a(3),u(t.DatumOchTid)}}function dr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().$implicit,e=m(2);a(2),u(f(3,2,e.texter.examinationstillfallen.ort)),a(3),u(t.Alternativ.Ort)}}function mr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4),s(5),r(),y()),i&2){let t=m().$implicit,e=m(2);a(2),u(f(3,2,e.texter.examinationstillfallen.plats)),a(3),u(t.Alternativ.Plats)}}function pr(i,d){if(i&1&&(S(0),o(1,"dt",3),s(2),c(3,"i18n"),r(),o(4,"dd",4)(5,"div",6),s(6),r()(),y()),i&2){let t=m().$implicit,e=m(2);a(2),u(f(3,2,e.texter.examinationstillfallen.information)),a(4),u(t.Alternativ.Information)}}function cr(i,d){if(i&1&&(S(0),v(1,lr,1,0,"hr",8)(2,sr,6,4,"ng-container",0)(3,dr,6,4,"ng-container",0)(4,mr,6,4,"ng-container",0)(5,pr,7,4,"ng-container",0),y()),i&2){let t=d.$implicit,e=d.index,n=m().ngIf;a(),p("ngIf",n.FleraAlternativ&&(e>0||!n.KanAnmala)),a(),p("ngIf",t.DatumOchTid),a(),p("ngIf",t.Alternativ.Ort),a(),p("ngIf",t.Alternativ.Plats),a(),p("ngIf",t.Alternativ.Information)}}function fr(i,d){if(i&1&&(S(0),o(1,"dl",1),v(2,Za,6,4,"ng-container",0)(3,Ya,6,4,"ng-container",0)(4,Xa,7,5,"ng-container",0)(5,tr,7,4,"ng-container",0)(6,er,6,4,"ng-container",0)(7,ir,6,4,"ng-container",0)(8,nr,6,4,"ng-container",0)(9,rr,6,4,"ng-container",0)(10,or,6,7,"ng-container",0)(11,cr,6,5,"ng-container",2),r(),y()),i&2){let t=d.ngIf;a(2),p("ngIf",t.Anmalningsperiod),a(),p("ngIf",t.TypAvExamination),a(),p("ngIf",t.Lank),a(),p("ngIf",t.OvrigInformation),a(),p("ngIf",t.ExaminationenAvser),a(),p("ngIf",t.Omfattning),a(),p("ngIf",t.Anonymiseringskod),a(),p("ngIf",t.Ansvariga&&t.Ansvariga.length),a(),p("ngIf",t.FleraAlternativ&&t.KanAnmala),a(),p("ngForOf",t.Alternativ)}}var En=(()=>{class i extends b{constructor(t,e,n,l){super(),this.examinationstillfalleKortComponentService=t,this.omfattningEnhetPipe=e,this.aktivitetstillfallesalternativperiodPipe=n,this.examinationstillfallenService=l,this.vyInformation$=this.examinationstillfalleKortComponentService.examinationstillfalle$.pipe(k(x=>{let T=this.examinationstillfallenService.kanAnmala(x),w=this.hamtaInformationOmTillagd(x);return{Anmalningsperiod:this.hamtaAnmalningsperiod(x),TypAvExamination:this.hamtaTypAvExamination(x),Lank:this.hamtaLank(x),OvrigInformation:this.hamtaOvrigInformation(x),ExaminationenAvser:this.examinationstillfalleKortComponentService.hamtaExaminationenAvser(x),Omfattning:this.hamtaOmfattning(x),Anonymiseringskod:this.hamtaAnonymiseringskod(x),Ansvariga:this.hamtaAnsvariga(x),Alternativ:this.hamtaVyInformationAlternativ(x,T,w),FleraAlternativ:x.Aktivitetstillfalle.Aktivitetstillfallesalternativ.length>1,TillagdPaAlternativUid:w,KanAnmala:T}}),N(x=>console.log("Extra uppgifter vyInfo",x))),this.formateraDatumperiod=x=>x?x.Startdatum!==x.Slutdatum?x.Startdatum+" - "+x.Slutdatum:x.Startdatum:null}hamtaAnmalningsperiod(t){return this.formateraDatumperiod(t.Aktivitetstillfalle.Anmalningsperiod)}hamtaTypAvExamination(t){return this.t(t.Aktivitetstillfalle.AktivitetstillfallestypBenamning)}hamtaLank(t){return t.Aktivitetstillfalle.Lank}hamtaOvrigInformation(t){return t.Aktivitetstillfalle.OvrigInformation}hamtaOmfattning(t){if(this.examinationstillfalleKortComponentService.avserModul(t)){let e="";return t.Aktivitetstillfallesreferenser.forEach(n=>{e+=this.omfattningEnhetPipe.transform({Omfattningsvarde:n.Utbildningsinstans.Omfattning,Enhetskod:n.Utbildningsinstans.Enhet})+", "}),e.slice(0,-2)}else{let e="";t.Aktivitetstillfallesreferenser.forEach(n=>{e+=this.omfattningEnhetPipe.transform({Omfattningsvarde:n.Kursinstans.Omfattning,Enhetskod:n.Kursinstans.Enhet})+", "})}}hamtaAnonymiseringskod(t){return t.Aktivitetstillfalle.Anmalan?t.Aktivitetstillfallesmojlighet&&t.Aktivitetstillfallesmojlighet.Anmalan?t.Aktivitetstillfallesmojlighet.Anonymiseringskod:"":t.Aktivitetstillfallesmojlighet?t.Aktivitetstillfallesmojlighet.Anonymiseringskod:""}hamtaAnsvariga(t){return t.Aktivitetstillfalle.Ansvariga}hamtaVyInformationAlternativ(t,e,n){return t.Aktivitetstillfalle.Aktivitetstillfallesalternativ.map(l=>({Alternativ:l,DatumOchTid:this.aktivitetstillfallesalternativperiodPipe.transform(l)})).filter(l=>e||l.Alternativ.Uid===n)}hamtaInformationOmTillagd(t){return t.Aktivitetstillfallesmojlighet?.AktivitetstillfallesalternativUID}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(Ct),g(Wt),g(bt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-extrauppgifter"]],features:[C],decls:2,vars:3,consts:[[4,"ngIf"],[1,"row","mb-2"],[4,"ngFor","ngForOf"],[1,"col-lg-4"],[1,"col-lg-8"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"white-space-pre-wrap"],[1,"ms-lg-3"],["class","ms-lg-3 mt-2",4,"ngIf"],[1,"ms-lg-3","mt-2"]],template:function(e,n){e&1&&(v(0,fr,12,10,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[W,E,M,qe,_],changeDetection:0})}}return i})();var Tn=(()=>{class i extends b{constructor(t){super(),this.examinationstillfalleKortComponentService=t,this.examinationstillfalle$=this.examinationstillfalleKortComponentService.examinationstillfalle$,this.datumOchTid$=this.examinationstillfalle$.pipe(k(e=>this.datumOchTidForAktivitetstillfalle(e))),this.datumOchTidForAktivitetstillfalle=e=>{let n=e.Aktivitetstillfalle.Aktivitetstillfallesalternativ[0];if(e.Aktivitetstillfallesmojlighet&&(n=e.Aktivitetstillfalle.Aktivitetstillfallesalternativ.find(Sa=>Sa.Uid===e.Aktivitetstillfallesmojlighet.AktivitetstillfallesalternativUID)),!n.Datumperiod)return"";let l=n.Datumperiod.Startdatum,x=n.Datumperiod.Slutdatum,T=this.trimmaTid(n.Starttid),w=this.trimmaTid(n.Sluttid),nt=[l];T&&nt.push(T);let at=[];x&&x!==l&&at.push(x),w&&(w!==T||l!==x)&&at.push(w);let Ce=nt.join(" ");return at.length&&(Ce=Ce+" - "+at.join(" ")),e.Aktivitetstillfalle.Aktivitetstillfallesalternativ.length>1&&(Ce=Ce+", "+e.Aktivitetstillfalle.Aktivitetstillfallesalternativ.length+" "+this.i18n.transform(B.examinationstillfallen.alternativ)),Ce},this.trimmaTid=e=>e?e.substring(0,5):""}static{this.\u0275fac=function(e){return new(e||i)(g(Q))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-kort-underrubrik"]],features:[C],decls:2,vars:3,template:function(e,n){e&1&&(s(0),c(1,"async")),e&2&&A("",f(1,1,n.datumOchTid$),`
`)},dependencies:[M],changeDetection:0})}}return i})();var H=(()=>{class i{constructor(t,e){this.ngbModal=t,this.router=e,this.currentModals=[]}open(t,e){let n=this.ngbModal.open(t,e);return this.currentModals.push(n),this.subscription=this.router.events.pipe(Ft(l=>l instanceof qi)).subscribe(l=>{this.dismiss()}),n.result.then(()=>{this.currentModals=[],this.subscription.unsubscribe()},()=>{this.currentModals=[],this.subscription.unsubscribe()}),n}close(t){if(this.currentModals&&this.currentModals.length>0)for(let e of this.currentModals)e.close(t)}dismiss(t){if(this.currentModals&&this.currentModals.length>0)for(let e of this.currentModals)e.dismiss(t)}static{this.\u0275fac=function(e){return new(e||i)(L(mn),L(Ji))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var hr=["title"],xr=["*"],ki=(()=>{class i{constructor(){}ngAfterViewInit(){this.title.nativeElement.focus()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-modal-title-focusable"]],viewQuery:function(e,n){if(e&1&&At(hr,5),e&2){let l;Et(l=Tt())&&(n.title=l.first)}},ngContentSelectors:xr,decls:3,vars:0,consts:[["title",""],["tabindex","-1",1,"modal-title"]],template:function(e,n){e&1&&(st(),o(0,"h3",1,0),J(2),r())},styles:["h3[_ngcontent-%COMP%]:focus{outline-style:none}"],changeDetection:0})}}return i})();var kr=[[["",8,"ladok-modal-header"]],[["",8,"ladok-modal-body"]]],_r=[".ladok-modal-header",".ladok-modal-body"],tt=(()=>{class i extends b{constructor(t){super(),this.modalService=t,this.bekraftaTitleText=this.t(this.texter.shared.bekrafta_title),this.avbrytTitleText=this.t(this.texter.shared.avbryt_title),this.labelOkText=this.t(this.texter.shared.bekrafta),this.labelAvbrytText=this.t(this.texter.shared.avbryt),this.onok=new Zt,this.onavbryt=new Zt}ok(){this.onok.observed?this.onok.emit():this.modalService.close("ok")}avbryt(){this.onavbryt.observed?this.onavbryt.emit():this.modalService.dismiss("avbryt")}static{this.\u0275fac=function(e){return new(e||i)(g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-bekrafta-modal"]],inputs:{bekraftaTitleText:"bekraftaTitleText",avbrytTitleText:"avbrytTitleText",labelOkText:"labelOkText",labelAvbrytText:"labelAvbrytText",okDisabled:"okDisabled"},outputs:{onok:"onok",onavbryt:"onavbryt"},features:[C],ngContentSelectors:_r,decls:11,vars:7,consts:[[1,"modal-header"],[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-ladok-brand","btn-lg",3,"click","disabled","title"],["type","button",1,"btn","btn-outline-ladok-brand","btn-lg",3,"click","title"]],template:function(e,n){e&1&&(st(kr),o(0,"div",0)(1,"ladok-modal-title-focusable"),J(2),r()(),o(3,"div",1),J(4,1),r(),o(5,"div",2)(6,"button",3),P("click",function(){return n.ok()}),s(7),r(),o(8,"button",4),P("click",function(){return n.avbryt()}),s(9),c(10,"i18n"),r()()),e&2&&(a(6),Yt("title",n.bekraftaTitleText),p("disabled",n.okDisabled),a(),A(" ",n.labelOkText," "),a(),Yt("title",n.avbrytTitleText),a(),A(" ",f(10,5,n.labelAvbrytText)," "))},dependencies:[ki,_],changeDetection:0})}}return i})();var Je=(()=>{class i{constructor(t){this.i18nPipe=t}transform(t){if(t.Harttak){let e=t.Maxantal??0,n=t.AntalAnmalda??0;return"("+Math.max(0,e-n)+" "+this.i18nPipe.transform(B.examinationstillfallen.antal_platser_kvar)+")"}}static{this.\u0275fac=function(e){return new(e||i)(g(_,16))}}static{this.\u0275pipe=G({name:"aktivitetstillfallesalternativPlatserLabel",type:i,pure:!0})}}return i})();var ge=(()=>{class i{constructor(t,e){this.aktivitetstillfallesalternativperiodPipe=t,this.i18n=e}transform(t){let e=[],n=this.aktivitetstillfallesalternativperiodPipe.transform(t),l="";return n.length&&(n=n+","),e.push(n),e.push(t.Ort),e.push(t.Plats),l=e.join(" ").trim(),l.length>0?l:this.i18n.transform(B.examinationstillfallen.uppgifter_saknas_for_alternativ)}static{this.\u0275fac=function(e){return new(e||i)(g(Wt,16),g(_,16))}}static{this.\u0275pipe=G({name:"aktivitetstillfallesalternativLabel",type:i,pure:!0})}}return i})();function Cr(i,d){if(i&1&&(o(0,"p"),s(1),c(2,"i18n"),r()),i&2){let t=m(3);a(),u(f(2,1,t.texter.examinationstillfallen.anmalan.valj_ett_alternativ.text))}}function Sr(i,d){if(i&1&&(o(0,"p"),s(1),c(2,"i18n"),r()),i&2){let t=m(3);a(),u(f(2,1,t.texter.examinationstillfallen.anmalan.valj_ett_alternativ_byte.text))}}function yr(i,d){if(i&1&&(o(0,"div",7),s(1),r()),i&2){let t=m().$implicit;a(),u(t.Alternativ.Information)}}function Ir(i,d){if(i&1){let t=V();S(0),o(1,"div",2)(2,"input",3),de("ngModelChange",function(n){$(t);let l=m(3);return se(l.valtAlternativ,n)||(l.valtAlternativ=n),K(n)}),P("change",function(){let n=$(t).$implicit,l=m(3);return K(l.ngChangeForAttributvarde(n.Alternativ.Uid))}),r(),o(3,"label",4),s(4),c(5,"aktivitetstillfallesalternativLabel"),o(6,"span",5),s(7),r()(),v(8,yr,2,1,"div",6),r(),y()}if(i&2){let t=d.$implicit,e=d.index,n=m(3);a(2),p("id","alt"+e),le("ngModel",n.valtAlternativ),p("value",t.Alternativ.Uid)("disabled",t.Disablad),a(),p("for","alt"+e),a(),A("",f(5,8,t.Alternativ)," "),a(3),u(t.AntalAnmaldaInfo),a(),p("ngIf",t.Alternativ.Information)}}function Ar(i,d){if(i&1&&(S(0),U(1,"hr"),v(2,Cr,3,3,"p",0)(3,Sr,3,3,"p",0)(4,Ir,9,10,"ng-container",1),y()),i&2){let t=m().ngIf;a(2),p("ngIf",!t.AvserByte),a(),p("ngIf",t.AvserByte),a(),p("ngForOf",t.Alternativ)}}function Er(i,d){if(i&1&&(o(0,"div",7),s(1),r()),i&2){let t=m(2).ngIf;a(),u(t.Alternativ[0].Alternativ.Information)}}function Tr(i,d){if(i&1&&(S(0),U(1,"hr"),o(2,"span"),s(3),c(4,"aktivitetstillfallesalternativLabel"),r(),o(5,"span",5),s(6),r(),v(7,Er,2,1,"div",6),y()),i&2){let t=m().ngIf;a(3),u(f(4,3,t.Alternativ[0].Alternativ)),a(3),A(" ",t.Alternativ[0].AntalAnmaldaInfo,""),a(),p("ngIf",t.Alternativ[0].Alternativ.Information)}}function Dr(i,d){if(i&1&&(S(0),v(1,Ar,5,3,"ng-container",0)(2,Tr,8,5,"ng-container",0),y()),i&2){let t=d.ngIf;a(),p("ngIf",t.Alternativ.length>1||t.AvserByte),a(),p("ngIf",t.Alternativ.length===1&&!t.AvserByte)}}var ve=(()=>{class i{set examinationstillfalle(t){this.examinationstillfalleSubject.next(t)}set avserByte(t){this.avserByteSubject.next(t)}constructor(t,e){this.aktivitetstillfallesalternativperiodPipe=t,this.antalPipe=e,this.texter=B,this.examinationstillfalleSubject=new Bt,this.avserByteSubject=new Bt,this.valtAlternativUid=new Zt,this.vyInformation$=z([this.examinationstillfalleSubject.asObservable(),this.avserByteSubject.asObservable()]).pipe(k(([n,l])=>{let x=this.hamtaVyInformationAlternativ(n.Aktivitetstillfalle.Aktivitetstillfallesalternativ),T=this.hamtaInformationOmTillagd(n);return l&&(x=x.filter(w=>w.Alternativ.Uid!==T)),{Alternativ:x,TillagdPaAlternativUid:T,AvserByte:l}}),N(n=>this.hanteraF\u00F6rval(n)))}ngChangeForAttributvarde(t){this.valtAlternativUid.emit(t)}hamtaVyInformationAlternativ(t){return t.map(e=>({Alternativ:e,DatumOchTid:this.aktivitetstillfallesalternativperiodPipe.transform(e),Disablad:e.Harttak?e.AntalAnmalda>=e.Maxantal:!1,AntalAnmaldaInfo:this.antalPipe.transform(e)}))}hamtaInformationOmTillagd(t){return t.Aktivitetstillfallesmojlighet?.AktivitetstillfallesalternativUID}hanteraF\u00F6rval(t){t.AvserByte?(this.ngChangeForAttributvarde(t.Alternativ[0].Alternativ.Uid),this.valtAlternativ=t.Alternativ[0].Alternativ.Uid):t.Alternativ.length===1?this.ngChangeForAttributvarde(t.Alternativ[0].Alternativ.Uid):(this.ngChangeForAttributvarde(t.TillagdPaAlternativUid),t.TillagdPaAlternativUid&&(this.valtAlternativ=t.TillagdPaAlternativUid))}static{this.\u0275fac=function(e){return new(e||i)(g(Wt),g(Je))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-alternativvaljare"]],inputs:{examinationstillfalle:"examinationstillfalle",avserByte:"avserByte"},outputs:{valtAlternativUid:"valtAlternativUid"},decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"form-check"],["type","radio","name","alt",1,"form-check-input",3,"ngModelChange","change","id","ngModel","value","disabled"],[1,"form-check-label",3,"for"],[1,"fw-bold"],["class","white-space-pre-wrap",4,"ngIf"],[1,"white-space-pre-wrap"]],template:function(e,n){e&1&&(v(0,Dr,3,2,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[W,E,Re,Le,fe,Qt,M,_,ge],changeDetection:0})}}return i})();function Mr(i,d){if(i&1){let t=V();o(0,"div",6)(1,"input",7),de("ngModelChange",function(n){let l=$(t).index,x=m(2);return se(x.valda[l],n)||(x.valda[l]=n),K(n)}),P("change",function(){$(t);let n=m(2);return K(n.valdaAndradSubject.next())}),r(),o(2,"label",8),s(3),c(4,"i18n"),r()()}if(i&2){let t=d.$implicit,e=d.index,n=m(2);a(),p("id","checkbox"+t.Uid),le("ngModel",n.valda[e]),a(),p("for","checkbox"+t.Uid),a(),A(" ",f(4,4,t.BenamningEllerAlternativBenamning)," ")}}function Br(i,d){if(i&1&&(o(0,"p"),s(1),c(2,"i18n"),o(3,"span",2),s(4),r(),s(5),c(6,"i18n"),r()),i&2){let t=m().ngIf,e=m(2);a(),A(" ",f(2,3,e.texter.examinationstillfallen.anpassning.ansok.stodtext_efter)," "),a(3),u(t.Epostadress),a(),A(" ",f(6,5,e.texter.examinationstillfallen.anpassning.ansok.stodtext_efter_andra)," ")}}function Fr(i,d){if(i&1&&(o(0,"p")(1,"span",2),s(2),c(3,"i18n"),r(),s(4),c(5,"i18n"),r()),i&2){let t=m(3);a(2),u(f(3,2,t.texter.examinationstillfallen.anpassning.ansok.stodtext_efter_epost_saknas)),a(2),A(" ",f(5,4,t.texter.examinationstillfallen.anpassning.ansok.stodtext_efter_epost_saknas_fa_meddelande)," ")}}function jr(i,d){if(i&1&&(S(0),v(1,Br,7,7,"p",5)(2,Fr,6,6,"p",5),y()),i&2){let t=d.ngIf;a(),p("ngIf",t.Epostadress),a(),p("ngIf",!t.Epostadress)}}function Pr(i,d){if(i&1&&(o(0,"div",1)(1,"h4",2),s(2),c(3,"i18n"),r(),o(4,"p"),s(5),c(6,"i18n"),r(),o(7,"div",3),v(8,Mr,5,6,"div",4),c(9,"async"),r(),v(10,jr,3,2,"ng-container",5),c(11,"async"),r()),i&2){let t=m();a(2),u(f(3,4,t.texter.examinationstillfallen.anpassning.ansok.rubrik)),a(3),u(f(6,6,t.texter.examinationstillfallen.anpassning.ansok.stodtext_fore)),a(3),p("ngForOf",f(9,8,t.mojligaStod$)),a(2),p("ngIf",f(11,10,t.aktuellaKontaktuppgifter$))}}var he=(()=>{class i extends b{constructor(t){super(),this.kontaktuppgifterService=t,this.valda=[],this.valbara=[],this.valdaAndradSubject=new ae,this.valda$=this.valdaAndradSubject.asObservable().pipe(it(e=>this.input().mojligaStod$),k(e=>e.Lista.filter((n,l)=>this.valda[l])),Bi([])),this.valdaStod=on(this.valda$),this.input=ye.required(),this.aktuellaKontaktuppgifter$=this.kontaktuppgifterService.kontaktuppgifter$}ngOnInit(){this.mojligaStod$=this.input().mojligaStod$.pipe(k(t=>t.Lista)),this.kanAnpassa$=this.input().mojligaStod$.pipe(k(t=>t.Lista.length>0))}static{this.\u0275fac=function(e){return new(e||i)(g(un))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examination-anpassning"]],inputs:{input:[1,"input"]},outputs:{valdaStod:"valdaStod"},features:[C],decls:2,vars:3,consts:[["class","d-grid d-lg-block",4,"ngIf"],[1,"d-grid","d-lg-block"],[1,"fw-bold"],[1,"mb-3"],["class","form-check",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"form-check"],["type","checkbox","value","",1,"form-check-input",3,"ngModelChange","change","id","ngModel"],[1,"form-check-label",3,"for"]],template:function(e,n){e&1&&(v(0,Pr,12,12,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanAnpassa$))},dependencies:[W,E,ln,fe,Qt,M,_],changeDetection:0})}}return i})();function wr(i,d){if(i&1){let t=V();o(0,"div",8)(1,"ladok-examination-anpassning",9),P("valdaStod",function(n){$(t);let l=m(3);return K(l.valdaStod=n)}),r()()}if(i&2){let t=m().ngIf;a(),p("input",t)}}function Ur(i,d){if(i&1&&(S(0),v(1,wr,2,1,"div",7),c(2,"async"),y()),i&2){let t,e=d.ngIf;a(),p("ngIf",(t=f(2,1,e.mojligaStod$))==null||t.Lista==null?null:t.Lista.length)}}function Or(i,d){if(i&1){let t=V();o(0,"div",3)(1,"h4",4),s(2),r(),o(3,"p"),s(4),c(5,"i18n"),r(),o(6,"ladok-alternativvaljare",5),P("valtAlternativUid",function(n){$(t);let l=m();return K(l.alternativAndrat(n))}),r(),v(7,Ur,3,3,"ng-container",6),c(8,"async"),r()}if(i&2){let t=d.ngIf,e=m();a(2),u(t.Examinationstillfallesbenamning),a(2),u(f(5,5,e.texter.examinationstillfallen.anmalan.bekrafta_anmalan.text)),a(2),p("examinationstillfalle",t.Examinationstillfalle)("avserByte",!1),a(),p("ngIf",f(8,7,e.anpassningInput$))}}var Bn=(()=>{class i extends b{constructor(t,e,n){super(),this.modalService=t,this.cdr=e,this.anpassningService=n,this.okDisabled=!0,this.valdaStod=[]}initiera(t){this.anpassningInput$=t.pipe(it(e=>this.anpassningService.m\u00F6jligaSt\u00F6dP\u00E5Aktivitetstillf\u00E4lle(e.Aktivitetstillfalle.Uid)),k(e=>({mojligaStod$:F(this.anpassningService.kanAns\u00F6ka(e)?e:[])}))),this.vyInformation$=t.pipe(k(e=>(this.valdUtbildning=e.Aktivitetstillfallesreferenser[0],{Examinationstillfallesbenamning:this.t(e.Aktivitetstillfalle.Benamning),Examinationstillfalle:e})))}alternativAndrat(t){this.valtAlternativ=t,this.okDisabled=!this.valtAlternativ,this.cdr.detectChanges()}ok(){let t={valtAlternativ:this.valtAlternativ,valdUtbildningsreferens:this.valdUtbildning,valdaSt\u00F6d:this.valdaStod.map(e=>e.Uid)};this.modalService.close(t)}static{this.\u0275fac=function(e){return new(e||i)(g(H),g(Gi),g(_t))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-anmalningsbekraftelse-modal"]],features:[C],decls:7,vars:10,consts:[[3,"onok","bekraftaTitleText","okDisabled"],[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"valtAlternativUid","examinationstillfalle","avserByte"],[4,"ngIf"],["class","gra-ruta mt-2",4,"ngIf"],[1,"gra-ruta","mt-2"],[3,"valdaStod","input"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),P("onok",function(){return n.ok()}),o(2,"span",1),s(3),c(4,"i18n"),r(),v(5,Or,9,9,"div",2),c(6,"async"),r()),e&2&&(p("bekraftaTitleText",f(1,4,n.texter.examinationstillfallen.anmalan.bekrafta_anmalan.bekrafta_knapp_title))("okDisabled",n.okDisabled),a(3),A(" ",f(4,6,n.texter.examinationstillfallen.anmalan.bekrafta_anmalan.rubrik)," "),a(2),p("ngIf",f(6,8,n.vyInformation$)))},dependencies:[E,tt,ve,he,M,_],changeDetection:0})}}return i})();function $r(i,d){if(i&1){let t=V();S(0),o(1,"div",8)(2,"input",9),de("ngModelChange",function(n){$(t);let l=m(2);return se(l.valdUtbildning,n)||(l.valdUtbildning=n),K(n)}),P("change",function(){let n=$(t).$implicit,l=m(2);return K(l.vardeAndrat(n.AktivitetstillfallesreferensForStudenten))}),r(),o(3,"label",10),s(4),r()(),y()}if(i&2){let t=d.$implicit,e=d.index,n=m(2);a(2),p("id","radioref"+e),le("ngModel",n.valdUtbildning),p("value",t)("disabled",!t.KanAnmala),a(),p("for","radioref"+e),a(),u(n.namnPaReferens(t.AktivitetstillfallesreferensForStudenten))}}function Kr(i,d){if(i&1){let t=V();o(0,"div",12)(1,"ladok-examination-anpassning",13),P("valdaStod",function(n){$(t);let l=m(3);return K(l.valdaStod=n)}),r()()}if(i&2){let t=m().ngIf;a(),p("input",t)}}function Rr(i,d){if(i&1&&(S(0),v(1,Kr,2,1,"div",11),c(2,"async"),y()),i&2){let t,e=d.ngIf;a(),p("ngIf",(t=f(2,1,e.mojligaStod$))==null||t.Lista==null?null:t.Lista.length)}}function Lr(i,d){if(i&1){let t=V();o(0,"div",3)(1,"h4",4),s(2),r(),o(3,"p"),s(4),c(5,"i18n"),r(),o(6,"p"),s(7),c(8,"i18n"),r(),v(9,$r,5,6,"ng-container",5),o(10,"ladok-alternativvaljare",6),P("valtAlternativUid",function(n){$(t);let l=m();return K(l.alternativAndrat(n))}),r(),v(11,Rr,3,3,"ng-container",7),c(12,"async"),r()}if(i&2){let t=d.ngIf,e=m();a(2),u(t.Examinationstillfallesbenamning),a(2),u(f(5,7,e.texter.examinationstillfallen.anmalan.bekrafta_anmalan.text)),a(3),u(f(8,9,e.texter.examinationstillfallen.anmalan.bekrafta_anmalan_med_val.text)),a(2),p("ngForOf",t.AktivitetstillfallesreferenserForStudenten),a(),p("examinationstillfalle",t.Examinationstillfalle)("avserByte",!1),a(),p("ngIf",f(12,11,e.anpassningInput$))}}var Fn=(()=>{class i extends b{constructor(t,e,n){super(),this.modalService=t,this.examinationstillfallenService=e,this.anpassningService=n,this.okDisabled=!0,this.valdaStod=[]}initiera(t){this.anpassningInput$=t.pipe(it(e=>this.anpassningService.m\u00F6jligaSt\u00F6dP\u00E5Aktivitetstillf\u00E4lle(e.Aktivitetstillfalle.Uid)),k(e=>({mojligaStod$:F(this.anpassningService.kanAns\u00F6ka(e)?e:[])}))),this.vyInformation$=t.pipe(k(e=>({Examinationstillfallesbenamning:this.t(e.Aktivitetstillfalle.Benamning),AktivitetstillfallesreferenserForStudenten:this.kontrolleraReferens(e.Aktivitetstillfallesreferenser),Examinationstillfalle:e})))}namnPaReferens(t){let e="";return e+=this.t(t.Kursinstans.Benamning),this.avserModul(t)&&(e+=", "+this.t(t.Utbildningsinstans.Benamning)),e}vardeAndrat(t){this.okDisabled=!(this.valtAlternativ&&this.valdUtbildning)}ok(){let t={valtAlternativ:this.valtAlternativ,valdUtbildningsreferens:this.valdUtbildning,valdaSt\u00F6d:this.valdaStod.map(e=>e.Uid)};this.modalService.close(t)}avserModul(t){return t.Utbildningsinstans.Uid!==t.Kursinstans.Uid}alternativAndrat(t){this.valtAlternativ=t,this.okDisabled=!(this.valtAlternativ&&this.valdUtbildning)}kontrolleraReferens(t){let e=[];return t.forEach(n=>{e.push({AktivitetstillfallesreferensForStudenten:n,KanAnmala:this.examinationstillfallenService.kanAnmalaReferens(n)})}),e}static{this.\u0275fac=function(e){return new(e||i)(g(H),g(bt),g(_t))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-anmalningsbekraftelse-med-val-modal"]],features:[C],decls:7,vars:10,consts:[[3,"onok","okDisabled","bekraftaTitleText"],[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[4,"ngFor","ngForOf"],[3,"valtAlternativUid","examinationstillfalle","avserByte"],[4,"ngIf"],[1,"form-check"],["type","radio","name","radioref",1,"form-check-input",3,"ngModelChange","change","id","ngModel","value","disabled"],[1,"form-check-label",3,"for"],["class","gra-ruta mt-2",4,"ngIf"],[1,"gra-ruta","mt-2"],[3,"valdaStod","input"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),P("onok",function(){return n.ok()}),o(2,"span",1),s(3),c(4,"i18n"),r(),v(5,Lr,13,13,"div",2),c(6,"async"),r()),e&2&&(p("okDisabled",n.okDisabled)("bekraftaTitleText",f(1,4,n.texter.examinationstillfallen.anmalan.bekrafta_anmalan.bekrafta_knapp_title)),a(3),A(" ",f(4,6,n.texter.examinationstillfallen.anmalan.bekrafta_anmalan.rubrik)," "),a(2),p("ngIf",f(6,8,n.vyInformation$)))},dependencies:[W,E,Re,Le,fe,Qt,tt,ve,he,M,_],changeDetection:0})}}return i})();function Vr(i,d){if(i&1){let t=V();o(0,"div",2)(1,"button",3),c(2,"async"),P("click",function(){$(t);let n=m().ngIf,l=m();return K(n.kraverValAvKontext?l.anmalMedVal():l.anmal())}),s(3),c(4,"async"),r()()}if(i&2){let t=m(2);a(),p("disabled",f(2,2,t.disabledPgaFullt$)),a(2),u(f(4,4,t.knapptext$))}}function Nr(i,d){if(i&1&&(S(0),v(1,Vr,5,6,"div",1),y()),i&2){let t=d.ngIf;a(),p("ngIf",t.kanAnmala)}}var jn=(()=>{class i extends b{constructor(t,e,n,l){super(),this.kortComponentService=t,this.examinationstillfallenService=e,this.examinationAnpassningService=n,this.modalService=l,this.aktuelltExaminationstillfalle$=this.kortComponentService.examinationstillfalle$,this.kanAnmala$=this.kortComponentService.kanAnmala$,this.disabledPgaFullt$=this.aktuelltExaminationstillfalle$.pipe(k(x=>this.examinationstillfallenService.\u00E4rAllaAlternativFulla(x))),this.knapptext$=this.disabledPgaFullt$.pipe(k(x=>x?this.i18n.transform(this.texter.examinationstillfallen.action.anmal_knapp_disablad_pga_fullt):this.i18n.transform(this.texter.examinationstillfallen.action.anmal)))}anmal(){let t=this.modalService.open(Bn);t.componentInstance.initiera(this.aktuelltExaminationstillfalle$),t.result.then(e=>et(this.skapaAnm\u00E4lOchAnpassa(e))).catch(Ht)}anmalMedVal(){let t=this.modalService.open(Fn);t.componentInstance.initiera(this.aktuelltExaminationstillfalle$),t.result.then(e=>et(this.skapaAnm\u00E4lOchAnpassa(e))).catch(Ht)}skapaAnm\u00E4lOchAnpassa(t){return this.examinationstillfallenService.skapaOchAnmalTillAktivitetstillfalle(this.aktuelltExaminationstillfalle$,t.valdUtbildningsreferens,t.valtAlternativ).pipe(Ft(e=>!e.felmeddelande&&t.valdaSt\u00F6d.length>0),it(e=>this.hanteraAnpassning(t,e)))}hanteraAnpassning(t,e){let n={Aktivitetstillfallesalternativ:e.m\u00F6jlighet.Anmalan.AktivitetstillfallesalternativUID,AktivitetstillfalleUid:e.examinationstillfalle.Aktivitetstillfalle.Uid,DokumenteradeStod:t.valdaSt\u00F6d};return this.examinationAnpassningService.m\u00F6jligaSt\u00F6dP\u00E5Aktivitetstillf\u00E4lle(e.examinationstillfalle.Aktivitetstillfalle.Uid).pipe(it(l=>this.examinationAnpassningService.skapaAnpassningsans\u00F6kan(l,n)))}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(bt),g(_t),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-anmal-till-examinationstillfalle"]],features:[C],decls:2,vars:3,consts:[[4,"ngIf"],["class","d-grid d-lg-block mt-2",4,"ngIf"],[1,"d-grid","d-lg-block","mt-2"],[1,"btn","btn-ladok-brand","btn-lg-min-width",3,"click","disabled"]],template:function(e,n){e&1&&(v(0,Nr,2,1,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanAnmala$))},dependencies:[E,M],changeDetection:0})}}return i})();var Gr=i=>["/min-utbildning/kurs",i];function Qr(i,d){i&1&&(o(0,"span"),s(1,", "),r())}function zr(i,d){if(i&1&&(S(0),o(1,"a",5),s(2),r(),v(3,Qr,2,0,"span",0),y()),i&2){let t=d.$implicit,e=d.last;a(),p("routerLink",Nt(3,Gr,t.UtbildningUID)),a(),A(" ",t.Kursbenamning," "),a(),p("ngIf",!e)}}function Wr(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3),v(5,zr,4,5,"ng-container",4),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.examinationstillfallen.inom_kursen)),a(3),p("ngForOf",t.Kurser)}}function qr(i,d){if(i&1&&(S(0),o(1,"dl",1),v(2,Wr,6,4,"ng-container",0),r(),y()),i&2){let t=d.ngIf;a(2),p("ngIf",t.Kurser&&t.Kurser.length)}}var Pn=(()=>{class i extends b{constructor(t,e){super(),this.examinationstillfalleKortComponentService=t,this.benamningOchKodPipe=e,this.vyInformation$=this.examinationstillfalleKortComponentService.examinationstillfalle$.pipe(k(n=>this.hamtaVyInformation(n)))}hamtaVyInformation(t){let e={},n=[];return t.Aktivitetstillfallesreferenser.forEach(l=>{n.push({Kursbenamning:this.benamningOchKodPipe.transform(l.Kursinstans),UtbildningUID:l.Kursinstans.UtbildningUID})}),e.Kurser=n,e}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(pt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-grunduppgifter"]],features:[C],decls:2,vars:3,consts:[[4,"ngIf"],[1,"row"],[1,"col-lg-4"],[1,"col-lg-8"],[4,"ngFor","ngForOf"],[1,"card-link",3,"routerLink"]],template:function(e,n){e&1&&(v(0,qr,3,1,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[W,E,me,M,_],changeDetection:0})}}return i})();function Zr(i,d){if(i&1&&(S(0),o(1,"dl",6)(2,"dt",7),s(3),c(4,"i18n"),r(),o(5,"dd",8),s(6),r()(),y()),i&2){let t=m().ngIf,e=m();a(3),u(f(4,2,e.texter.examinationstillfallen.avanmalan.bekrafta_avanmalan.anmalningsperiod)),a(3),u(t.Anmalningsperiod)}}function Yr(i,d){if(i&1&&(o(0,"p"),s(1),c(2,"i18n"),r()),i&2){let t=m(2);a(),A(" ",f(2,1,t.texter.examinationstillfallen.avanmalan.bekrafta_avanmalan.text_anmperiod_stangd)," ")}}function Xr(i,d){if(i&1&&(o(0,"div",3)(1,"h4",4),s(2),r(),o(3,"p"),s(4),c(5,"i18n"),r(),v(6,Zr,7,4,"ng-container",5)(7,Yr,3,3,"p",5),r()),i&2){let t=d.ngIf,e=m();a(2),u(t.Examinationstillfallesbenamning),a(2),u(f(5,4,e.texter.examinationstillfallen.avanmalan.bekrafta_avanmalan.text)),a(2),p("ngIf",t.Anmalningsperiod&&!t.AnmalanStangd),a(),p("ngIf",t.AnmalanStangd)}}var wn=(()=>{class i extends b{constructor(t){super(),this.datumService=t,this.formateraDatumperiod=e=>e?e.Startdatum!==e.Slutdatum?e.Startdatum+" - "+e.Slutdatum:e.Startdatum:null}initiera(t){this.aktuelltExaminationstillfalle$=t,this.vyInformation$=this.aktuelltExaminationstillfalle$.pipe(k(e=>({Examinationstillfallesbenamning:this.t(e.Aktivitetstillfalle.Benamning),Anmalningsperiod:this.hamtaAnmalningsperiod(e),AnmalanStangd:this.hamtaAnmalanStang(e)})))}hamtaAnmalningsperiod(t){return this.formateraDatumperiod(t.Aktivitetstillfalle.Anmalningsperiod)}hamtaAnmalanStang(t){return t.Aktivitetstillfalle.Anmalningsperiod&&this.datumService.after(this.datumService.idag(),t.Aktivitetstillfalle.Anmalningsperiod.Slutdatum)}static{this.\u0275fac=function(e){return new(e||i)(g(mt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-avanmal-fran-examinationstillfalle-modal"]],features:[C],decls:7,vars:9,consts:[[3,"bekraftaTitleText"],[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[4,"ngIf"],[1,"row"],[1,"col-lg-4"],[1,"col-lg-8"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),o(2,"span",1),s(3),c(4,"i18n"),r(),v(5,Xr,8,6,"div",2),c(6,"async"),r()),e&2&&(p("bekraftaTitleText",f(1,3,n.texter.examinationstillfallen.avanmalan.bekrafta_avanmalan.bekrafta_knapp_title)),a(3),A(" ",f(4,5,n.texter.examinationstillfallen.avanmalan.bekrafta_avanmalan.rubrik)," "),a(2),p("ngIf",f(6,7,n.vyInformation$)))},dependencies:[E,tt,M,_],changeDetection:0})}}return i})();function to(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.avAnmal())}),s(2),c(3,"i18n"),r()()}if(i&2){let t=m();a(2),u(f(3,1,t.texter.examinationstillfallen.action.avanmal))}}var Un=(()=>{class i extends b{constructor(t,e,n){super(),this.kortComponentService=t,this.examinationstillfallenService=e,this.modalService=n,this.aktuelltExaminationstillfalle$=this.kortComponentService.examinationstillfalle$}ngOnInit(){this.kanAvanmala$=this.aktuelltExaminationstillfalle$.pipe(k(t=>this.examinationstillfallenService.kanAvanmala(t)))}avAnmal(){let t=this.modalService.open(wn);t.componentInstance.initiera(this.aktuelltExaminationstillfalle$),t.result.then(e=>{et(this.examinationstillfallenService.avanmalFranAktivitetstillfalle(this.aktuelltExaminationstillfalle$))}).catch(e=>void 0)}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(bt),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-avanmal-fran-examinationstillfalle"]],features:[C],decls:2,vars:3,consts:[["class","d-grid d-lg-block mt-2",4,"ngIf"],[1,"d-grid","d-lg-block","mt-2"],[1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&(v(0,to,4,3,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanAvanmala$))},dependencies:[E,M,_],changeDetection:0})}}return i})();function io(i,d){if(i&1&&(o(0,"div",2),s(1),r()),i&2){let t=d.ngIf;a(),A(" ",t," ")}}function no(i,d){if(i&1&&(S(0),v(1,io,2,1,"div",1),c(2,"async"),y()),i&2){let t=m();a(),p("ngIf",f(2,1,t.tentaAnmalningsDagar$))}}var On=(()=>{class i extends b{constructor(t,e,n){super(),this.examinationstillfallenService=t,this.modalService=e,this.datumService=n}ngOnInit(){let t=this.examinationstillfalle$.pipe(k(e=>this.examinationstillfallenService.kanAnmala(e)));this.tentaAnmalningsDagar$=z([this.examinationstillfalle$,t]).pipe(k(([e,n])=>this.ber\u00E4knaAnmalningsdagarDagar(e,n))),this.visa$=this.tentaAnmalningsDagar$.pipe(k(e=>!!e))}ber\u00E4knaAnmalningsdagarDagar(t,e){if(!t.Aktivitetstillfalle.Anmalan)return null;if(e){let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Aktivitetstillfalle.Anmalningsperiod.Slutdatum));return n===0?this.t(this.texter.examinationstillfallen.anmalan.stanger_idag):this.t(this.texter.examinationstillfallen.anmalan.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}else{if(this.slutdatumLiggerBak\u00E5tITiden(t.Aktivitetstillfalle.Anmalningsperiod))return null;if(this.datumService.afterOrEqual(this.datumService.idag(),t.Aktivitetstillfalle.Anmalningsperiod.Startdatum)){let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Aktivitetstillfalle.Anmalningsperiod.Slutdatum));return n===0?this.t(this.texter.examinationstillfallen.anmalan.stanger_idag):this.t(this.texter.examinationstillfallen.anmalan.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}else{let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Aktivitetstillfalle.Anmalningsperiod.Startdatum));return this.t(this.texter.examinationstillfallen.anmalan.oppnar)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}}}slutdatumLiggerBak\u00E5tITiden(t){return t.Slutdatum&&this.datumService.before(t.Slutdatum,this.datumService.idag())}static{this.\u0275fac=function(e){return new(e||i)(g(bt),g(H),g(mt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-information-om-tentamensanmalningsdagar"]],inputs:{examinationstillfalle$:"examinationstillfalle$"},features:[C],decls:2,vars:3,consts:[[4,"ngIf"],["class","mb-2",4,"ngIf"],[1,"mb-2"]],template:function(e,n){e&1&&(v(0,no,3,3,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.visa$))},dependencies:[E,M],changeDetection:0})}}return i})();function ro(i,d){if(i&1){let t=V();o(0,"div",3)(1,"h4",4),s(2),r(),o(3,"p"),s(4),c(5,"i18n"),r(),o(6,"p",4),s(7),c(8,"aktivitetstillfallesalternativLabel"),r(),o(9,"ladok-alternativvaljare",5),P("valtAlternativUid",function(n){$(t);let l=m();return K(l.alternativAndrat(n))}),r()()}if(i&2){let t=d.ngIf,e=m();a(2),u(t.Examinationstillfallesbenamning),a(2),u(f(5,5,e.texter.examinationstillfallen.anmalan.valj_ett_alternativ_byte.info_om_nuvarande_alternativ_text)),a(3),u(f(8,7,t.AnmaldPaALternativ)),a(2),p("examinationstillfalle",t.Examinationstillfalle)("avserByte",!0)}}var $n=(()=>{class i extends b{constructor(t){super(),this.modalService=t}initiera(t){this.aktuelltExaminationstillfalle$=t,this.vyInformation$=this.aktuelltExaminationstillfalle$.pipe(k(e=>({Examinationstillfallesbenamning:this.t(e.Aktivitetstillfalle.Benamning),Examinationstillfalle:e,AnmaldPaALternativ:this.hittaAlternativ(e)})))}alternativAndrat(t){this.valtAlternativ=t}ok(){this.modalService.close(this.valtAlternativ)}hittaAlternativ(t){return t.Aktivitetstillfalle.Aktivitetstillfallesalternativ.find(e=>e.Uid===t.Aktivitetstillfallesmojlighet.AktivitetstillfallesalternativUID)}static{this.\u0275fac=function(e){return new(e||i)(g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-flytta-anmalan-modal"]],features:[C],decls:7,vars:9,consts:[[3,"onok","bekraftaTitleText"],[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"valtAlternativUid","examinationstillfalle","avserByte"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),P("onok",function(){return n.ok()}),o(2,"span",1),s(3),c(4,"i18n"),r(),v(5,ro,10,9,"div",2),c(6,"async"),r()),e&2&&(p("bekraftaTitleText",f(1,3,n.texter.examinationstillfallen.flytta_anmalan.bekrafta_anmalan.bekrafta_knapp_title)),a(3),A(" ",f(4,5,n.texter.examinationstillfallen.flytta_anmalan.bekrafta_anmalan.rubrik)," "),a(2),p("ngIf",f(6,7,n.vyInformation$)))},dependencies:[E,tt,ve,M,_,ge],changeDetection:0})}}return i})();function oo(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.flyttaAnmalan())}),s(2),c(3,"i18n"),r()()}if(i&2){let t=m();a(2),u(f(3,1,t.texter.examinationstillfallen.action.flytta_anmalan))}}var Kn=(()=>{class i extends b{constructor(t,e,n){super(),this.kortComponentService=t,this.examinationstillfallenService=e,this.modalService=n,this.aktuelltExaminationstillfalle$=this.kortComponentService.examinationstillfalle$}ngOnInit(){this.kanFlytta$=this.aktuelltExaminationstillfalle$.pipe(k(t=>this.examinationstillfallenService.kanFlyttaAnmalan(t)))}flyttaAnmalan(){let t=this.modalService.open($n);t.componentInstance.initiera(this.aktuelltExaminationstillfalle$),t.result.then(e=>{console.log("valtAlternativUid ",e),et(this.examinationstillfallenService.flyttaAnmalan(this.aktuelltExaminationstillfalle$,e))}).catch(e=>void 0)}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(bt),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-flytta-anmalan-knapp"]],features:[C],decls:2,vars:3,consts:[["class","d-grid d-lg-block mt-2",4,"ngIf"],[1,"d-grid","d-lg-block","mt-2"],[1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&(v(0,oo,4,3,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanFlytta$))},dependencies:[E,M,_],changeDetection:0})}}return i})();var Rn=(()=>{class i extends b{constructor(t,e){super(),this.modalService=t,this.anpassningService=e,this.okDisabled=Ki(!0)}initiera(t){this.anpassningInput$=t.pipe(k(e=>({mojligaStod$:this.anpassningService.m\u00F6jligaSt\u00F6dP\u00E5Aktivitetstillf\u00E4lle(e.Aktivitetstillfalle.Uid)})))}ok(){this.modalService.close(this.valdaStod)}stodAndrade(t){this.okDisabled.update(()=>t.length===0),this.valdaStod=t}static{this.\u0275fac=function(e){return new(e||i)(g(H),g(_t))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-ansok-om-anpassning-modal"]],features:[C],decls:8,vars:10,consts:[[3,"onok","labelOkText","okDisabled"],[1,"ladok-modal-header"],[1,"ladok-modal-body"],[3,"valdaStod","input"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),P("onok",function(){return n.ok()}),o(2,"span",1),s(3),c(4,"i18n"),r(),o(5,"div",2)(6,"ladok-examination-anpassning",3),c(7,"async"),P("valdaStod",function(x){return n.stodAndrade(x)}),r()()()),e&2&&(p("labelOkText",f(1,4,n.texter.examinationstillfallen.anpassning.ansok.knapptext))("okDisabled",n.okDisabled()),a(3),A(" ",f(4,6,n.texter.examinationstillfallen.anpassning.ansok.rubrik)," "),a(3),p("input",f(7,8,n.anpassningInput$)))},dependencies:[tt,he,M,_],changeDetection:0})}}return i})();function so(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.anpassa())}),s(2),c(3,"i18n"),r()()}if(i&2){let t=m();a(2),A("",f(3,1,t.texter.examinationstillfallen.action.anpassa)," ")}}var Ln=(()=>{class i extends b{constructor(t,e,n){super(),this.examinationstillfalleKortComponentService=t,this.anpassningService=e,this.modalService=n}anpassa(){return ne(this,null,function*(){let t=this.modalService.open(Rn);t.componentInstance.initiera(this.examinationstillfalleKortComponentService.examinationstillfalle$);try{let e=yield Se(this.examinationstillfalleKortComponentService.examinationstillfalle$),n=yield Se(this.examinationstillfalleKortComponentService.m\u00F6jligaAnpassningar$),l=yield t.result;if(l?.length>0){let x={Aktivitetstillfallesalternativ:e.Aktivitetstillfallesmojlighet.AktivitetstillfallesalternativUID,AktivitetstillfalleUid:e.Aktivitetstillfalle.Uid,DokumenteradeStod:l.map(T=>T.Uid)};yield et(this.anpassningService.skapaAnpassningsans\u00F6kan(n,x,!0))}}catch{}})}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(_t),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-ansok-om-anpassning-knapp"]],features:[C],decls:2,vars:3,consts:[["class","d-grid d-lg-block mt-2",4,"ngIf"],[1,"d-grid","d-lg-block","mt-2"],[1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&(v(0,so,4,3,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.examinationstillfalleKortComponentService.kanAnsokaEfterAnmalan$))},dependencies:[E,M,_],changeDetection:0})}}return i})();function po(i,d){if(i&1&&(S(0),o(1,"div",1),s(2),r(),y()),i&2){let t=d.ngIf,e=m();a(),p("ngClass",e.styleClasses()),a(),A(" ",t," ")}}var Vn=(()=>{class i extends b{constructor(t){super(),this.datumService=t,this.konfiguration=ye(),this.styleClasses=ye(""),this.dagarKvar=jt(()=>this.ber\u00E4knaDagarKvar(this.konfiguration()))}ber\u00E4knaDagarKvar(t){if(!t||this.slutdatumLiggerBak\u00E5tITiden(t.Ansokningsperiod))return null;if(this.datumService.afterOrEqual(this.datumService.idag(),t.Ansokningsperiod.Startdatum)){let e=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Ansokningsperiod.Slutdatum));return e===0?this.t(this.texter.examinationstillfallen.anpassning.ansokan.stanger_idag):this.t(this.texter.examinationstillfallen.anpassning.ansokan.stanger)+" "+e+" "+this.t(dt(this.texter.shared.dagar,e))}else{let e=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Ansokningsperiod.Startdatum));return this.t(this.texter.examinationstillfallen.anpassning.ansokan.oppnar)+" "+e+" "+this.t(dt(this.texter.shared.dagar,e))}}slutdatumLiggerBak\u00E5tITiden(t){return t.Slutdatum&&this.datumService.before(t.Slutdatum,this.datumService.idag())}static{this.\u0275fac=function(e){return new(e||i)(g(mt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-ansokan-dagar-kvar"]],inputs:{konfiguration:[1,"konfiguration"],styleClasses:[1,"styleClasses"]},features:[C],decls:1,vars:1,consts:[[4,"ngIf"],[3,"ngClass"]],template:function(e,n){e&1&&v(0,po,3,2,"ng-container",0),e&2&&p("ngIf",n.dagarKvar())},dependencies:[ut,E],changeDetection:0})}}return i})();var uo=()=>["/examinationstillfallen/pedagogiskt-stod/overklagandehanvisning"];function go(i,d){i&1&&U(0,"hr",0)}function vo(i,d){if(i&1&&(o(0,"dl",1)(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3)(5,"ladok-alert",4)(6,"span",5)(7,"div",6),s(8),r()()()()()),i&2){let t=m(2);a(2),u(f(3,3,t.texter.examinationstillfallen.anpassning.ansokan.meddelande)),a(3),p("typ","alert-info"),a(3),u(t.ansokan().MeddelandeBeslut.MeddelandeTillStudent)}}function ho(i,d){if(i&1&&v(0,vo,9,5,"dl",1),i&2){let t,e=m();X(((t=e.ansokan())==null?null:t.Tillstand)===e.ansokanMeddelad&&e.ansokan().MeddelandeBeslut.MeddelandeTillStudent.length>0?0:-1)}}function xo(i,d){if(i&1&&(o(0,"li"),s(1),c(2,"i18n"),r()),i&2){let t=d.$implicit;a(),A(" ",f(2,1,t.Dokumenteratstod.BenamningEllerAlternativBenamning)," ")}}function ko(i,d){if(i&1&&(o(0,"dt",2),s(1),c(2,"i18n"),r(),o(3,"dd",3)(4,"ul",7),v(5,xo,3,3,"li",8),r()()),i&2){let t=m(3);a(),u(f(2,2,t.texter.examinationstillfallen.anpassning.ansokan.beviljade_anpassningar)),a(4),p("ngForOf",t.beviljade())}}function _o(i,d){if(i&1&&s(0),i&2){let t=m().$implicit;A(" ",t.Utfall.Motivering," ")}}function bo(i,d){if(i&1&&s(0),i&2){let t=m(2).$implicit;A(" ",t.Utfall.MotiveringEngelska," ")}}function Co(i,d){if(i&1&&s(0),i&2){let t=m(2).$implicit;A(" ",t.Utfall.Motivering," ")}}function So(i,d){if(i&1&&v(0,bo,1,1)(1,Co,1,1),i&2){let t=m().$implicit;X(t.Utfall.MotiveringEngelska?0:1)}}function yo(i,d){if(i&1&&(o(0,"li")(1,"div"),s(2),c(3,"i18n"),r(),o(4,"div",6),s(5),c(6,"i18n"),v(7,_o,1,1),c(8,"async"),v(9,So,2,1),r()()),i&2){let t=d.$implicit,e=m(4);a(2),A(" ",f(3,3,t.Dokumenteratstod.BenamningEllerAlternativBenamning)," "),a(3),A("",f(6,5,e.texter.examinationstillfallen.anpassning.ansokan.avslagna_anpassningar.motivering),": "),a(2),X(f(8,7,e.i18nService.sprakkod$)==="sv"?7:9)}}function Io(i,d){if(i&1&&(U(0,"dt",2),o(1,"dd",3)(2,"a",9),s(3),c(4,"i18n"),r()()),i&2){let t=m(4);a(2),p("routerLink",Hi(4,uo)),a(),A(" ",f(4,2,t.texter.examinationstillfallen.anpassning.ansokan.overklagandetext_rubrik)," ")}}function Ao(i,d){if(i&1&&(o(0,"dt",2),s(1),c(2,"i18n"),r(),o(3,"dd",3)(4,"ul",7),v(5,yo,10,9,"li",8),r()(),v(6,Io,5,5)),i&2){let t=m(3);a(),u(f(2,3,t.texter.examinationstillfallen.anpassning.ansokan.avslagna_anpassningar)),a(4),p("ngForOf",t.avslagna()),a(),X(t.overklagandetextFinnsSignal()?6:-1)}}function Eo(i,d){if(i&1&&v(0,ko,6,4)(1,Ao,7,5),i&2){let t,e,n=m(2);X(((t=n.beviljade())==null?null:t.length)>0?0:-1),a(),X(((e=n.avslagna())==null?null:e.length)>0?1:-1)}}function To(i,d){if(i&1&&(o(0,"li"),s(1),c(2,"i18n"),r()),i&2){let t=d.$implicit;a(),A(" ",f(2,1,t.Dokumenteratstod.BenamningEllerAlternativBenamning)," ")}}function Do(i,d){if(i&1&&(o(0,"dt",2),s(1),c(2,"i18n"),r(),o(3,"dd",3)(4,"ul",7),v(5,To,3,3,"li",8),r()()),i&2){let t=m(2);a(),u(f(2,2,t.texter.examinationstillfallen.anpassning.ansokan.anpassningar)),a(4),p("ngForOf",t.ansokan().Anpassningar)}}function Mo(i,d){if(i&1&&v(0,Eo,2,2)(1,Do,6,4),i&2){let t,e=m();X(((t=e.ansokan())==null?null:t.Tillstand)===e.ansokanMeddelad?0:1)}}function Bo(i,d){if(i&1&&(U(0,"br"),s(1),c(2,"i18n")),i&2){let t=m(2);a(),A("",f(2,1,t.texter.examinationstillfallen.anpassning.anmalan_extrainfo)," ")}}function Fo(i,d){if(i&1&&(o(0,"dt",2),s(1),c(2,"i18n"),r(),o(3,"dd",3),U(4,"ladok-examinationstillfalle-ansokan-dagar-kvar",10),v(5,Bo,3,3),r()),i&2){let t=m();a(),u(f(2,3,t.texter.examinationstillfallen.anpassning.rubrik)),a(3),p("konfiguration",t.konfiguration()),a(),X(t.kanAnmala()&&t.kanAnmala().kanAnmala?5:-1)}}function jo(i,d){i&1&&U(0,"hr",0)}var Gn=(()=>{class i extends b{constructor(t,e,n){super(),this.i18nService=t,this.examinationstillfalleKortComponentService=e,this.lokalTextService=n,this.ansokanMeddelad="MEDDELAD",this.overklagandetextFinnsSignal=St(this.lokalTextService.aviseringstexter$.pipe(k(l=>this.h\u00E4mta\u00D6verklagandetext(l)),Ft(l=>!!l),N(l=>console.log("Det finns en text!")),k(l=>!0),Y(l=>(console.error("catchError",l),F(!1))))),this.kanAnmala=St(this.examinationstillfalleKortComponentService.kanAnmala$),this.finnsAnsokan=St(this.examinationstillfalleKortComponentService.finnsAnsokan$),this.ansokan=St(this.examinationstillfalleKortComponentService.ans\u00F6kan$),this.ansokanMojlig=St(this.examinationstillfalleKortComponentService.ansokanMojlig$),this.beviljade=jt(()=>this.ansokan().Anpassningar.filter(l=>l.Utfall.Beviljad)),this.avslagna=jt(()=>this.ansokan().Anpassningar.filter(l=>!l.Utfall.Beviljad)),this.konfiguration=St(this.examinationstillfalleKortComponentService.psKonfiguration$)}h\u00E4mta\u00D6verklagandetext(t){return t.some(e=>e.Nyckel==="aviseringstext.pedagogisktstod.overklagandetext")}static{this.\u0275fac=function(e){return new(e||i)(g(pe),g(Q),g(Ve))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-ansokansuppgift"]],features:[C],decls:6,vars:5,consts:[[1,"mb-2"],[1,"row","mb-2"],[1,"col-lg-4"],[1,"col-lg-8"],[3,"typ"],[1,"ladok-alert-content"],[1,"white-space-pre-wrap"],[1,"ps-3"],[4,"ngFor","ngForOf"],[1,"card-link",3,"routerLink"],[3,"konfiguration"]],template:function(e,n){e&1&&(v(0,go,1,0,"hr",0)(1,ho,1,1),o(2,"dl",1),v(3,Mo,2,1)(4,Fo,6,5),r(),v(5,jo,1,0,"hr",0)),e&2&&(X(n.finnsAnsokan()||n.ansokanMojlig()?0:-1),a(),X(n.finnsAnsokan()?1:-1),a(2),X(n.finnsAnsokan()?3:-1),a(),X(n.ansokanMojlig()?4:-1),a(),X(n.finnsAnsokan()||n.ansokanMojlig()?5:-1))},dependencies:[W,me,ce,Vn,M,_],encapsulation:2,changeDetection:0})}}return i})();function wo(i,d){if(i&1&&(o(0,"span",0),s(1),r()),i&2){let t=m();p("ngClass",t.badgeKlass()),a(),u(t.badgeText())}}var Qn=(()=>{class i extends b{constructor(t){super(),this.examinationstillfalleKortComponentService=t,this.ansokan=St(this.examinationstillfalleKortComponentService.ans\u00F6kan$),this.badgeKlass=jt(()=>this.beraknaBadgeKlass(this.ansokan())),this.badgeText=jt(()=>this.tillStatus(this.ansokan()))}beraknaBadgeKlass(t){if(!t)return null;switch(console.log("Status ",t.Tillstand),t.Tillstand){case"INKOMMEN":case"BESLUTAD":return"bg-light";case"MEDDELAD":return"bg-primary"}return"bg-light"}tillStatus(t){return t?this.t(this.texter.examinationstillfallen.anpassning.status[t.Tillstand]):""}static{this.\u0275fac=function(e){return new(e||i)(g(Q))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-status-ansokan-badge"]],features:[C],decls:1,vars:1,consts:[[1,"badge",3,"ngClass"]],template:function(e,n){e&1&&v(0,wo,2,2,"span",0),e&2&&X(n.badgeKlass()?0:-1)},dependencies:[ut],changeDetection:0})}}return i})();var zn=(()=>{class i extends b{constructor(){super()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-avbryt-ansokan-modal"]],features:[C],decls:9,vars:9,consts:[[3,"bekraftaTitleText"],[1,"ladok-modal-header"],[1,"ladok-modal-body"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),o(2,"span",1),s(3),c(4,"i18n"),r(),o(5,"div",2)(6,"p"),s(7),c(8,"i18n"),r()()()),e&2&&(p("bekraftaTitleText",f(1,3,n.texter.examinationstillfallen.anpassning.ansokan.avbryt_ansokan.bekrafta_knapp_title)),a(3),A(" ",f(4,5,n.texter.examinationstillfallen.anpassning.ansokan.avbryt_ansokan.rubrik)," "),a(4),u(f(8,7,n.texter.examinationstillfallen.anpassning.ansokan.avbryt_ansokan.bekrafta_avbryt_text)))},dependencies:[tt,_],changeDetection:0})}}return i})();function Oo(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.avbrytAnsokan())}),s(2),c(3,"i18n"),r()()}if(i&2){let t=m();a(2),A("",f(3,1,t.texter.examinationstillfallen.anpassning.ansokan.avbryt_ansokan.avbryt_knapp_title)," ")}}var Wn=(()=>{class i extends b{constructor(t,e,n,l){super(),this.kortComponentService=t,this.linkService=e,this.anpassningService=n,this.modalService=l,this.aktuelltExaminationstillfalle$=this.kortComponentService.examinationstillfalle$,this.ans\u00F6kan=St(this.kortComponentService.ans\u00F6kan$),this.kanAvbryta=jt(()=>this.linkService.exists(this.ans\u00F6kan(),R.pedagogisktstod.ansokan,"DELETE"))}avbrytAnsokan(){this.modalService.open(zn).result.then(()=>ne(this,null,function*(){yield et(this.anpassningService.avbrytAns\u00F6kan(this.ans\u00F6kan()))})).catch(e=>void 0)}static{this.\u0275fac=function(e){return new(e||i)(g(Q),g(vt),g(_t),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-avbryt-ansokan-knapp"]],features:[C],decls:1,vars:1,consts:[["class","d-grid d-lg-block mt-2",4,"ngIf"],[1,"d-grid","d-lg-block","mt-2"],[1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&v(0,Oo,4,3,"div",0),e&2&&p("ngIf",n.kanAvbryta())},dependencies:[E,_],changeDetection:0})}}return i})();function Ko(i,d){if(i&1&&(S(0),o(1,"ladok-card")(2,"ladok-card-body",1)(3,"span",2),U(4,"ladok-examinationstillfalle-kort-rubrik"),r(),o(5,"span",3),U(6,"ladok-examinationstillfalle-kort-underrubrik"),r(),o(7,"div",4)(8,"div",5),U(9,"ladok-examinationstillfalle-kort-status-badge")(10,"ladok-status-ansokan-badge"),r()(),U(11,"ladok-examinationstillfalle-grunduppgifter")(12,"ladok-information-om-tentamensanmalningsdagar",6),r(),o(13,"ladok-card-body-extra",7),U(14,"ladok-examinationstillfalle-extrauppgifter")(15,"ladok-examinationstillfalle-ansokansuppgift")(16,"ladok-ansok-om-anpassning-knapp")(17,"ladok-avanmal-fran-examinationstillfalle")(18,"ladok-flytta-anmalan-knapp")(19,"ladok-avbryt-ansokan-knapp"),r(),o(20,"ladok-card-footer",8),U(21,"ladok-anmal-till-examinationstillfalle"),r()(),y()),i&2){let t=m();a(12),p("examinationstillfalle$",t.aktuelltExaminationstillfalle$)}}var Vp=(()=>{class i{constructor(t){this.componentService=t,this.aktuelltExaminationstillfalle$=this.componentService.examinationstillfalle$,this.psKonfiguration$=this.componentService.psKonfiguration$,this.harInnehall=!1}ngOnChanges(t){t&&t.examinationstillfalle&&(this.examinationstillfalle=t.examinationstillfalle.currentValue,this.componentService.initieraExaminationstillfalle(this.examinationstillfalle))}static{this.\u0275fac=function(e){return new(e||i)(g(Q))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-examinationstillfalle-kort"]],inputs:{examinationstillfalle:"examinationstillfalle"},features:[ft([Q]),xt],decls:2,vars:3,consts:[[4,"ngIf"],[1,"ladok-card-body-content"],[1,"ladok-card-body-rubrik"],[1,"ladok-card-body-sub-rubrik"],[1,"ladok-card-body-sub-rubrik-badge"],[1,"d-flex","gap-2","flex-wrap"],[3,"examinationstillfalle$"],[1,"ladok-card-body-content-extra"],[1,"ladok-card-footer-content"]],template:function(e,n){e&1&&(v(0,Ko,22,1,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.aktuelltExaminationstillfalle$))},dependencies:[E,Ot,$t,ue,yn,In,An,En,Tn,jn,Pn,Un,On,Kn,Ln,Gn,Qn,Wn,M],changeDetection:0})}}return i})();var qt=(()=>{class i{transform(t,e){if(Xi(t))return"";let n=t.Startdatum?t.Startdatum:"";return Yi(t.Slutdatum)&&(n=n+" - "+t.Slutdatum),n}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=G({name:"datumperiod",type:i,pure:!0})}}return i})();var xe=(()=>{class i{transform(t,e){if(!t)return;let n=""+t;return n==="-1"?"FRI":n+"%"}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=G({name:"studietakt",type:i,pure:!0})}}return i})();function Jn(i,d=0){return Ro(i)?Number(i):arguments.length===2?d:0}function Ro(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function Qp(i){return Array.isArray(i)?i:[i]}function Zn(i){return i instanceof Lt?i.nativeElement:i}function Lo(i){if(i.type==="characterData"&&i.target instanceof Comment)return!0;if(i.type==="childList"){for(let d=0;d<i.addedNodes.length;d++)if(!(i.addedNodes[d]instanceof Comment))return!1;for(let d=0;d<i.removedNodes.length;d++)if(!(i.removedNodes[d]instanceof Comment))return!1;return!0}return!1}var Yn=(()=>{class i{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Vo=(()=>{class i{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map,this._ngZone=Fi(Pi)}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){let e=Zn(t);return new Ti(n=>{let x=this._observeElement(e).pipe(k(T=>T.filter(w=>!Lo(w))),Ft(T=>!!T.length)).subscribe(T=>{this._ngZone.run(()=>{n.next(T)})});return()=>{x.unsubscribe(),this._unobserveElement(e)}})}_observeElement(t){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(t))this._observedElements.get(t).count++;else{let e=new ae,n=this._mutationObserverFactory.create(l=>e.next(l));n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream})}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){let{observer:e,stream:n}=this._observedElements.get(t);e&&e.disconnect(),n.complete(),this._observedElements.delete(t)}}static{this.\u0275fac=function(e){return new(e||i)(L(Yn))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Xn=(()=>{class i{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Jn(t),this._subscribe()}constructor(t,e){this._contentObserver=t,this._elementRef=e,this.event=new Zt,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let t=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?t.pipe(Mi(this.debounce)):t).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(g(Vo),g(Lt))}}static{this.\u0275dir=ct({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",Qi],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[Ri]})}}return i})(),ta=(()=>{class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=oe({type:i})}static{this.\u0275inj=re({providers:[Yn]})}}return i})();var Ho=["content"],Go=["*"];function Qo(i,d){if(i&1&&(o(0,"span",3),s(1),r()),i&2){let t=d.ngIf,e=m();a(),Vt("",t.start," ",e.till," ",t.slut,"")}}var ke=(()=>{class i{constructor(t){this.i18n=t,this.till=this.i18n.transform(B.shared.avskiljare.till),this.vyInfoSubject=new ae,this.vyInfo$=this.vyInfoSubject.asObservable().pipe(je(1))}ngAfterViewInit(){this.hanteraContent(this.content.nativeElement.innerText)}onContentChange(t){this.hanteraContent(t[0].target.data)}hanteraContent(t){let e=t.split(" - ");this.vyInfoSubject.next(new yi(e[0],e[1]))}static{this.\u0275fac=function(e){return new(e||i)(g(_))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-aria-datumperiod"]],viewQuery:function(e,n){if(e&1&&At(Ho,5),e&2){let l;Et(l=Tt())&&(n.content=l.first)}},ngContentSelectors:Go,decls:5,vars:3,consts:[["content",""],["aria-hidden","true",3,"cdkObserveContent"],["class","visually-hidden",4,"ngIf"],[1,"visually-hidden"]],template:function(e,n){if(e&1){let l=V();st(),o(0,"span",1,0),P("cdkObserveContent",function(T){return $(l),K(n.onContentChange(T))}),J(2),r(),v(3,Qo,2,3,"span",2),c(4,"async")}e&2&&(a(3),p("ngIf",f(4,1,n.vyInfo$)))},dependencies:[E,Xn,M]})}}return i})(),yi=class{constructor(d,t){this.start=d,this.slut=t}};function zo(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),r(),o(3,"dd")(4,"span")(5,"ladok-aria-datumperiod"),s(6),r()(),U(7,"br"),o(8,"span",2),s(9),r(),U(10,"br"),o(11,"span",2)(12,"ladok-aria-datumperiod"),s(13),r()()(),y()),i&2){let t=d.$implicit;a(2),u(t.rubrik),a(4),Dt("",t.fran," - ",t.till,""),a(3),u(t.omfattning),a(4),u(t.registreringsperiod)}}function Wo(i,d){if(i&1&&(S(0),v(1,zo,14,5,"ng-container",1),y()),i&2){let t=m().ngIf;a(),p("ngForOf",t.Perioddeltaganden)}}function qo(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.studietakt)),a(3),u(t.Studietakt)}}function Jo(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.undervisningsform)),a(3),u(t.Undervisningsform)}}function Zo(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.studieort)),a(3),u(t.Studieort)}}function Yo(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.kurskod)),a(3),u(t.Kurskod)}}function Xo(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.tillfalleskod)),a(3),u(t.Tillfalleskod)}}function tl(i,d){if(i&1&&(o(0,"span",2),s(1),c(2,"i18n"),U(3,"br"),r()),i&2){let t=m(2).ngIf,e=m();a(),Dt("",f(2,2,e.texter.startsida.aktuella_kurser.studieort),": ",t.LasesInom.Studieort,"")}}function el(i,d){if(i&1&&(o(0,"span",2),s(1),c(2,"i18n"),U(3,"br"),r()),i&2){let t=m(2).ngIf,e=m();a(),Dt("",f(2,2,e.texter.startsida.aktuella_kurser.undervisningsform),": ",t.LasesInom.Undervisningsform,"")}}function il(i,d){if(i&1&&(o(0,"span",2),s(1),c(2,"i18n"),r()),i&2){let t=m(2).ngIf,e=m();a(),Dt("",f(2,2,e.texter.startsida.aktuella_kurser.studietakt),": ",t.LasesInom.Studietakt,"")}}function nl(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd")(5,"span"),s(6),r(),U(7,"br"),v(8,tl,4,4,"span",3)(9,el,4,4,"span",3)(10,il,3,4,"span",3),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,5,e.texter.startsida.aktuella_kurser.lases_inom)),a(4),u(t.LasesInom.Benamning),a(2),p("ngIf",t.LasesInom.Studieort),a(),p("ngIf",t.LasesInom.Undervisningsform),a(),p("ngIf",t.LasesInom.Studietakt)}}function al(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),U(4,"dd"),y()),i&2){let t=m(2);a(2),u(f(3,1,t.texter.startsida.aktuella_kurser.lases_fristaende))}}function rl(i,d){if(i&1&&(S(0),o(1,"dl"),v(2,Wo,2,1,"ng-container",0)(3,qo,6,4,"ng-container",0)(4,Jo,6,4,"ng-container",0)(5,Zo,6,4,"ng-container",0)(6,Yo,6,4,"ng-container",0)(7,Xo,6,4,"ng-container",0)(8,nl,11,7,"ng-container",0)(9,al,5,3,"ng-container",0),r(),y()),i&2){let t=d.ngIf;a(),It("ladok-dl-4",!t.Smal),a(),p("ngIf",t.Perioddeltaganden),a(),p("ngIf",t.Studietakt),a(),p("ngIf",t.Undervisningsform),a(),p("ngIf",t.Studieort),a(),p("ngIf",t.Kurskod),a(),p("ngIf",t.Tillfalleskod),a(),p("ngIf",t.LasesInom),a(),p("ngIf",t.Fristaende)}}var Jt=(()=>{class i extends b{constructor(t,e,n,l,x){super(),this.datumperiodPipe=t,this.studietaktPipe=e,this.omfattningEnhetPipe=n,this.utbildningService=l,this.benamningOchKodPipe=x,this.konfiguration=lt.AKTUELL_KURS}ngOnInit(){this.vyInformation$=this.utbildning$.pipe(k(t=>this.skapaVyInformation(t)))}skapaVyInformation(t){let e=this.konfiguration===lt.AKTUELL_KURS,n=this.konfiguration===lt.MIN_UTBILDNING_KURS,l=this.konfiguration===lt.REGISTRERING_BEKR\u00C4FTELSE,x=this.konfiguration===lt.\u00C5TERBUD_BEKR\u00C4FTELSE,T=this.konfiguration===lt.AVBROTT_BEKR\u00C4FTELSE,w=this.konfiguration===lt.ANMALAN_BEKR\u00C4FTELSE,nt=this.konfiguration===lt.AVANMALAN_BEKR\u00C4FTELSE,at={Smal:n};return t.tillfallesdeltagande.Registreringsperiod&&(n||e)&&(at.Registreringsperiod=this.datumperiodPipe.transform(t.tillfallesdeltagande.Registreringsperiod)),t.tillfallesdeltagande.Perioddeltaganden&&(n||e||l||x||T)&&(at.Perioddeltaganden=this.skapaPerioddeltaganden(t,l)),t.tillfallesdeltagande.Utbildningsinformation.Studietakt&&(n||e)&&(at.Studietakt=this.studietaktPipe.transform(t.tillfallesdeltagande.Utbildningsinformation.Studietakt.Takt)),t.tillfallesdeltagande.Utbildningsinformation.Undervisningsform&&(n||e)&&(at.Undervisningsform=this.t(t.tillfallesdeltagande.Utbildningsinformation.Undervisningsform)),t.tillfallesdeltagande.Utbildningsinformation.Studielokalisering&&(n||e)&&(at.Studieort=this.t(t.tillfallesdeltagande.Utbildningsinformation.Studielokalisering)),t.tillfallesdeltagande.Utbildningsinformation.Utbildningskod&&(n||e)&&(at.Kurskod=t.tillfallesdeltagande.Utbildningsinformation.Utbildningskod),t.tillfallesdeltagande.Utbildningsinformation.Utbildningstillfalleskod&&(n||e)&&(at.Tillfalleskod=t.tillfallesdeltagande.Utbildningsinformation.Utbildningstillfalleskod),t.tillfallesdeltagande.Studiestrukturreferens&&(n||e||l)&&(at.LasesInom=this.skapaL\u00E4sesInom(t)),!t.tillfallesdeltagande.Studiestrukturreferens&&(n||e||l)&&(at.Fristaende=this.t(this.texter.startsida.aktuella_kurser.lases_fristaende)),at}skapaPerioddeltaganden(t,e){let n=t.tillfallesdeltagande.Perioddeltaganden.length,l=this.t(this.texter.utbildning.studieperiod),x=this.t(this.texter.shared.av),T;return e&&(T=this.utbildningService.periodInfoF\u00F6rTillst\u00E5nd(t.tillfallesdeltagande,"studiedeltagande.domain.tillstandsdefinition.ej_paborjad")),t.tillfallesdeltagande.Perioddeltaganden.filter(w=>!T||T&&T.f\u00F6rsta===w.Periodindex).map(w=>{let nt=l;return n>1&&(nt+=` ${w.Periodindex} ${x} ${n}`),{rubrik:nt,fran:w.UtbildningsPeriodFran,till:w.UtbildningsPeriodTill,omfattning:this.omfattningEnhetPipe.transform({Omfattningsvarde:w.Omfattningsvarde,Enhetskod:t.tillfallesdeltagande.Utbildningsinformation.Enhetskod}),registreringsperiod:w.Registreringsperiod?this.t(this.texter.deltagande.registrering)+": "+this.datumperiodPipe.transform(w.Registreringsperiod):""}})}skapaL\u00E4sesInom(t){let e=new Ai;return e.Benamning=this.benamningOchKodPipe.transform(t.struktur.repr.Utbildningsinformation),e.Studieort=this.t(t.struktur.repr.Utbildningsinformation.Studielokalisering),e.Undervisningsform=this.t(t.struktur.repr.Utbildningsinformation.Undervisningsform),e.Studietakt=this.studietaktPipe.transform(t.struktur.repr.Utbildningsinformation.Studietakt?.Takt),e}static{this.\u0275fac=function(e){return new(e||i)(g(qt),g(xe),g(Ct),g(Ut),g(pt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-studiedeltagande-uppgifter"]],inputs:{utbildning$:"utbildning$",konfiguration:"konfiguration"},features:[C],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"text-muted"],["class","text-muted",4,"ngIf"]],template:function(e,n){e&1&&(v(0,rl,10,10,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[W,E,ke,M,_],changeDetection:0})}}return i})(),lt=function(i){return i[i.AKTUELL_KURS=0]="AKTUELL_KURS",i[i.MIN_UTBILDNING_KURS=1]="MIN_UTBILDNING_KURS",i[i.REGISTRERING_BEKR\u00C4FTELSE=2]="REGISTRERING_BEKR\xC4FTELSE",i[i.\u00C5TERBUD_BEKR\u00C4FTELSE=3]="\xC5TERBUD_BEKR\xC4FTELSE",i[i.AVBROTT_BEKR\u00C4FTELSE=4]="AVBROTT_BEKR\xC4FTELSE",i[i.ANMALAN_BEKR\u00C4FTELSE=5]="ANMALAN_BEKR\xC4FTELSE",i[i.AVANMALAN_BEKR\u00C4FTELSE=6]="AVANMALAN_BEKR\xC4FTELSE",i}(lt||{});var Ai=class{};function ol(i,d){if(i&1&&(o(0,"p"),s(1),c(2,"i18n"),r()),i&2){let t=m().ngIf,e=m();a(),Dt(" ",f(2,2,e.texter.deltagande.bekrafta_registrering.paborjar_program),": ",t.programbenamning," ")}}function ll(i,d){if(i&1&&(o(0,"div",2)(1,"h4",3),s(2),r(),U(3,"ladok-studiedeltagande-uppgifter",4),o(4,"p"),s(5),c(6,"i18n"),r(),v(7,ol,3,4,"p",5),r()),i&2){let t=d.ngIf,e=m();a(2),u(t.kursbenamning),a(),p("utbildning$",e.kurs$)("konfiguration",e.uppgifterkonfiguration),a(2),u(f(6,5,e.texter.deltagande.bekrafta_registrering.body)),a(2),p("ngIf",t.programbenamning)}}var ea=(()=>{class i extends b{constructor(){super(),this.uppgifterkonfiguration=lt.REGISTRERING_BEKR\u00C4FTELSE}initiera(t){this.kurs$=t,this.vyInformation$=this.kurs$.pipe(k(e=>({kursbenamning:this.t(e.tillfallesdeltagande.Utbildningsinformation.Benamning)})))}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-bekrafta-registrering"]],features:[C],decls:6,vars:6,consts:[[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"utbildning$","konfiguration"],[4,"ngIf"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal")(1,"span",0),s(2),c(3,"i18n"),r(),v(4,ll,8,7,"div",1),c(5,"async"),r()),e&2&&(a(2),A(" ",f(3,2,n.texter.deltagande.bekrafta_registrering.header)," "),a(2),p("ngIf",f(5,4,n.vyInformation$)))},dependencies:[E,tt,Jt,M,_],changeDetection:0})}}return i})();var Kt=(()=>{class i{constructor(t,e,n,l,x,T){this.utbildningService=t,this.datumService=e,this.linkService=n,this.strukturService=l,this.h\u00E4ndelseService=x,this.tillstandService=T,this.aktuellaDeltaganden$=this.utbildningService.allaUtbildningarGrupperade$.pipe(k(w=>this.filtreraAktuellaDeltaganden(w)),k(w=>this.sorteraStigandeDatumOrdning(w)),k(w=>w.reduce((nt,at)=>nt.concat(this.aktuellaDeltagandenF\u00F6rUtbildning(at)),[])),N(w=>console.log("aktuellaDeltaganden$",w)),rt(1))}filtreraAktuellaDeltaganden(t){return t.filter(e=>(e.tillfallesdeltagande.TillstandKurs.Sammanfattattillstand==="studiedeltagande.domain.tillstandsdefinition.ej_paborjad"||e.tillfallesdeltagande.TillstandKurs.Sammanfattattillstand==="studiedeltagande.domain.tillstandsdefinition.registrerad"||e.tillfallesdeltagande.TillstandKurs.Sammanfattattillstand==="studiedeltagande.domain.tillstandsdefinition.omregistrerad"||e.tillfallesdeltagande.TillstandKurs.Sammanfattattillstand==="studiedeltagande.domain.tillstandsdefinition.avklarad")&&this.datumService.beforeOrEqual(this.datumService.idag(),e.tillfallesdeltagande.Utbildningsinformation.Studieperiod.Slutdatum))}sorteraStigandeDatumOrdning(t){return t.sort((e,n)=>this.datumService.compare(e.tillfallesdeltagande.Utbildningsinformation.Studieperiod.Startdatum,n.tillfallesdeltagande.Utbildningsinformation.Studieperiod.Startdatum)),t}aktuellaDeltagandenF\u00F6rUtbildning(t){return t.andraDeltaganden.length===0?[t]:this.tillstandService.\u00E4rUtbildningEjP\u00E5b\u00F6rjad(t)&&t.andraDeltaganden.every(e=>this.tillstandService.\u00E4rUtbildningEjP\u00E5b\u00F6rjad(e))?[t,...t.andraDeltaganden]:[t]}registrera(t){let e={};return t.pipe(ht(1),N(n=>e.utbildning=n),Z(n=>{let l;return this.kanOmregistrera(n)?l=this.linkService.findByRel(n.tillfallesdeltagande,R.studiedeltagande.omregistrering,"POST"):l=this.linkService.findByRel(n.tillfallesdeltagande,R.studiedeltagande.registrering,"POST"),this.linkService.foljLank(l,null,422)}),k(n=>e),Y(n=>(e.felmeddelande=gt(n),F(e))),Z(n=>{let l=this.linkService.findByRel(n.utbildning.tillfallesdeltagande,R.studiedeltagande.registrering_hinder,"GET");return n.felmeddelande&&l?z([F(n),this.linkService.foljLank(l)]):z([F(n),F(null)])}),k(([n,l])=>(l&&(n.hinder=l.Hinder),this.h\u00E4ndelseService.nyH\u00E4ndelse(n.felmeddelande?D.Registrering_misslyckad:D.Registrering,e),n)))}kanRegistrera(t){return this.linkService.exists(t.tillfallesdeltagande.link,R.studiedeltagande.registrering,"POST")||this.linkService.exists(t.tillfallesdeltagande.link,R.studiedeltagande.omregistrering,"POST")}kanOmregistrera(t){return this.linkService.exists(t.tillfallesdeltagande.link,R.studiedeltagande.omregistrering,"POST")}kanG\u00F6ra\u00C5terbud(t){return this.linkService.exists(t.tillfallesdeltagande.link,R.studiedeltagande.aterbudMedOrsak,"POST")}kanG\u00F6raAvbrott(t){return this.linkService.exists(t.tillfallesdeltagande.link,R.studiedeltagande.avbrott,"POST")}g\u00F6r\u00C5terbud(t){let e={};return t.pipe(ht(1),N(n=>e.utbildning=n),Z(n=>{let l=this.linkService.findByRel(n.tillfallesdeltagande,R.studiedeltagande.aterbudMedOrsak,"POST");return this.linkService.foljLank(l)}),k(n=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.\u00C5terbud,e),e)),Y(n=>(e.felmeddelande=gt(n),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.\u00C5terbud_misslyckad,e),F(e))))}g\u00F6rAvbrott(t){return t.pipe(ht(1),Z(e=>{let n=this.linkService.findByRel(e.tillfallesdeltagande,R.studiedeltagande.avbrott,"POST");return z([F(e),this.linkService.foljLank(n,{Avbrottsdatum:this.datumService.idag()})])}),Z(([e,n])=>{let l={utbildning:e},x=this.linkService.findByRel(e.tillfallesdeltagande,R.self,"GET");return z([F(l),this.linkService.foljLank(x)])}),k(([e,n])=>(e.utbildning.programutbildning||(e.tidigtAvbrott=n&&n.TillstandKurs.Sammanfattattillstand==="studiedeltagande.domain.tillstandsdefinition.tidigtavbrott"),e)),k(e=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Avbrott,e),e)),Y(e=>{let n={felmeddelande:gt(e)};return this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Avbrott_misslyckad,n),F(n)}))}kanTaBortVal(t){return this.linkService.exists(t.tillfallesdeltagande,R.studiedeltagande.studieval_delete,"DELETE")}taBortVal(t){let e={};return t.pipe(ht(1),N(n=>e.utbildning=n),Z(n=>{let l=this.linkService.findByRel(n.tillfallesdeltagande,R.studiedeltagande.studieval_delete,"DELETE");return this.linkService.foljLank(l,null,422)}),k(n=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Avanm\u00E4lan,e),e)),Y(n=>(e.felmeddelande=gt(n),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Avanm\u00E4lan_misslyckad,e),F(e))))}h\u00E4mtaTillf\u00E4llesbyteskandidater(t){return F(t.tillfallesdeltagande).pipe(Z(e=>{let n=this.linkService.findByRel(e.link,R.studiedeltagande.nuvarande_tillfallesdeltagande,"GET");return this.linkService.foljLank(n)}),Z(e=>{let n=this.linkService.findByRel(e.link,R.studiedeltagande.tillfallesbyteskandidater,"GET");return this.linkService.foljLank(n)}),k(e=>e.Tillfallesbyteskandidater),Y(e=>F([])))}g\u00F6rKurstillf\u00E4llesbyte(t,e){let n={underlag:e};return this.linkService.foljLank(t,e,422).pipe(k(l=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Tillf\u00E4llesbyte,n),n)),Y(l=>(n.felmeddelande=gt(l),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Tillf\u00E4llesbyte_misslyckad,n),F(n))))}static{this.\u0275fac=function(e){return new(e||i)(L(Ut),L(mt),L(vt),L(He),L(wt),L(Ne))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function dl(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.registrera())}),s(2),r()()}if(i&2){let t=m();a(2),u(t.knappText)}}var Sc=(()=>{class i extends b{constructor(t,e,n){super(),this.deltagandeService=t,this.modalService=e,this.utbildningService=n,this.knappText=this.t(B.deltagande.registrera)}ngOnInit(){this.kanRegistrera$=this.aktuellKurs$.pipe(N(t=>this.s\u00E4ttKnappText(t)),k(t=>this.deltagandeService.kanRegistrera(t)))}registrera(){let t=this.modalService.open(ea);t.componentInstance.initiera(this.aktuellKurs$),t.result.then(e=>{et(this.deltagandeService.registrera(this.aktuellKurs$))}).catch(e=>void 0)}s\u00E4ttKnappText(t){let e=this.utbildningService.periodInfoF\u00F6rTillst\u00E5nd(t.tillfallesdeltagande,"studiedeltagande.domain.tillstandsdefinition.ej_paborjad");e.antalPerioder>1&&(this.knappText=this.t(B.deltagande.registrera_period)+" "+e.f\u00F6rsta)}static{this.\u0275fac=function(e){return new(e||i)(g(Kt),g(H),g(Ut))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-registrera-kurs-knapp"]],inputs:{aktuellKurs$:"aktuellKurs$"},features:[C],decls:2,vars:3,consts:[["class","d-grid d-lg-block mt-3",4,"ngIf"],[1,"d-grid","d-lg-block","mt-3"],[1,"btn","btn-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&(v(0,dl,3,1,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanRegistrera$))},dependencies:[E,M],changeDetection:0})}}return i})();var Ye=(()=>{class i{transform(t,...e){return F(t,...e)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=G({name:"rxjsOf",type:i,pure:!0})}}return i})();function ml(i,d){if(i&1&&(o(0,"li"),s(1),c(2,"benamningOchKod"),r()),i&2){let t=d.$implicit;a(),A(" ",f(2,1,t)," ")}}function pl(i,d){if(i&1&&(S(0),o(1,"p"),s(2),c(3,"i18n"),r(),o(4,"p"),s(5),c(6,"i18n"),r(),o(7,"p"),s(8),c(9,"i18n"),r(),o(10,"ul"),v(11,ml,3,3,"li",7),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,4,e.texter.deltagande.bekrafta_aterbud_program.body1)),a(3),u(f(6,6,e.texter.deltagande.bekrafta_aterbud_program.body2)),a(3),u(f(9,8,e.texter.deltagande.bekrafta_aterbud_program.body3)),a(3),p("ngForOf",t.paverkadeUtbildningar)}}function cl(i,d){if(i&1&&(S(0),o(1,"ladok-alert",8)(2,"span",9),s(3),c(4,"i18n"),r()(),o(5,"p"),s(6),c(7,"i18n"),r(),y()),i&2){let t=m(2);a(),p("typ","alert-info"),a(2),u(f(4,3,t.texter.deltagande.bekrafta_aterbud.body1)),a(3),u(f(7,5,t.texter.deltagande.bekrafta_aterbud.body2))}}function fl(i,d){if(i&1&&(o(0,"div",3)(1,"h4",4),s(2),r(),U(3,"ladok-studiedeltagande-uppgifter",5),c(4,"rxjsOf"),v(5,pl,12,10,"ng-container",6)(6,cl,8,7,"ng-container",6),r()),i&2){let t=d.ngIf,e=m();a(2),u(t.kursbenamning),a(),p("utbildning$",f(4,5,t.utbildning))("konfiguration",e.uppgifterkonfiguration),a(2),p("ngIf",t.utbildning.programutbildning),a(),p("ngIf",!t.utbildning.programutbildning)}}var na=(()=>{class i extends b{constructor(){super(),this.uppgifterkonfiguration=lt.\u00C5TERBUD_BEKR\u00C4FTELSE}initiera(t){this.vyInformation$=t}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-bekrafta-aterbud-modal"]],features:[C],decls:7,vars:9,consts:[[3,"labelOkText"],[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"utbildning$","konfiguration"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"typ"],[1,"ladok-alert-rubrik-content"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),o(2,"span",1),s(3),c(4,"i18n"),r(),v(5,fl,7,7,"div",2),c(6,"async"),r()),e&2&&(p("labelOkText",f(1,3,n.texter.deltagande.bekrafta_aterbud.labelok)),a(3),A(" ",f(4,5,n.texter.deltagande.bekrafta_aterbud.header)," "),a(2),p("ngIf",f(6,7,n.vyInformation$)))},dependencies:[W,E,ce,tt,Jt,M,_,pt,Ye],changeDetection:0})}}return i})();function ul(i,d){if(i&1&&(o(0,"li"),s(1),c(2,"benamningOchKod"),r()),i&2){let t=d.$implicit;a(),A(" ",f(2,1,t)," ")}}function gl(i,d){if(i&1&&(S(0),o(1,"p"),s(2),c(3,"i18n"),r(),o(4,"p"),s(5),c(6,"i18n"),r(),o(7,"ul"),v(8,ul,3,3,"li",7),r(),o(9,"p"),s(10),c(11,"i18n"),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,4,e.texter.deltagande.bekrafta_avbrott_program.body1)),a(3),u(f(6,6,e.texter.deltagande.bekrafta_avbrott_program.body2)),a(3),p("ngForOf",t.paverkadeUtbildningar),a(2),u(f(11,8,e.texter.deltagande.bekrafta_avbrott_program.body3))}}function vl(i,d){if(i&1&&(S(0),o(1,"ladok-alert",8)(2,"span",9),s(3),c(4,"i18n"),r()(),o(5,"p"),s(6),c(7,"i18n"),r(),y()),i&2){let t=m(2);a(),p("typ","alert-info"),a(2),u(f(4,3,t.texter.deltagande.bekrafta_avbrott.body1)),a(3),u(f(7,5,t.texter.deltagande.bekrafta_avbrott.body2))}}function hl(i,d){if(i&1&&(o(0,"div",3)(1,"h4",4),s(2),r(),U(3,"ladok-studiedeltagande-uppgifter",5),c(4,"rxjsOf"),v(5,gl,12,10,"ng-container",6)(6,vl,8,7,"ng-container",6),r()),i&2){let t=d.ngIf,e=m();a(2),u(t.kursbenamning),a(),p("utbildning$",f(4,5,t.utbildning))("konfiguration",e.uppgifterkonfiguration),a(2),p("ngIf",t.utbildning.programutbildning),a(),p("ngIf",!t.utbildning.programutbildning)}}var aa=(()=>{class i extends b{constructor(){super(),this.uppgifterkonfiguration=lt.AVBROTT_BEKR\u00C4FTELSE}initiera(t){this.vyInformation$=t}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-bekrafta-avbrott-modal"]],features:[C],decls:7,vars:9,consts:[[3,"labelOkText"],[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"utbildning$","konfiguration"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"typ"],[1,"ladok-alert-rubrik-content"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal",0),c(1,"i18n"),o(2,"span",1),s(3),c(4,"i18n"),r(),v(5,hl,7,7,"div",2),c(6,"async"),r()),e&2&&(p("labelOkText",f(1,3,n.texter.deltagande.bekrafta_avbrott.labelok)),a(3),A(" ",f(4,5,n.texter.deltagande.bekrafta_avbrott.header)," "),a(2),p("ngIf",f(6,7,n.vyInformation$)))},dependencies:[W,E,ce,tt,Jt,M,_,pt,Ye],changeDetection:0})}}return i})();var Xe=(()=>{class i{constructor(t,e){this.benamningOchKodPipe=t,this.linkService=e}skapaVyinformation(t,e){return e.pipe(Z(n=>{let l=t?R.studiedeltagande.aterbudAtgard:R.studiedeltagande.avbrottAtgard,x=this.linkService.findByRel(n.tillfallesdeltagande,l,"GET");return z([F(n),x?this.linkService.foljLank(x):F(null)])}),k(([n,l])=>({kursbenamning:this.benamningOchKodPipe.transform(n.tillfallesdeltagande.Utbildningsinformation),utbildning:n,paverkadeUtbildningar:l?this.p\u00E5verkadeUtbildningar([l],["studiedeltagande.domain.atgard.avbrott","studiedeltagande.domain.atgard.aterbud"]).filter(x=>x.UtbildningsinstansUID!==n.tillfallesdeltagande.Utbildningsinformation.UtbildningsinstansUID):[]})))}p\u00E5verkadeUtbildningar(t,e){return t.length===0?[]:t.filter(n=>e.find(l=>l===n.Atgardstyp)).map(n=>n.Utbildningsinformation).concat(this.p\u00E5verkadeUtbildningar(t.flatMap(n=>n.IngaendeAtgarder),e))}static{this.\u0275fac=function(e){return new(e||i)(L(pt),L(vt))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();function kl(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.avbryt())}),s(2),c(3,"i18n"),r()()}if(i&2){let t=m();a(2),u(f(3,1,t.texter.deltagande.avbryt))}}var Vc=(()=>{class i extends b{constructor(t,e,n){super(),this.deltagandeService=t,this.modalService=e,this.aterbudAvbrottComponentService=n}ngOnInit(){this.kanAvbryta$=this.aktuellUtbildning$.pipe(k(t=>[this.deltagandeService.kanG\u00F6ra\u00C5terbud(t),this.deltagandeService.kanG\u00F6raAvbrott(t)]),N(([t,e])=>this.\u00E5terbud=t),k(([t,e])=>t||e))}avbryt(){let t=this.\u00E5terbud?na:aa,e=this.modalService.open(t);e.componentInstance.initiera(this.aterbudAvbrottComponentService.skapaVyinformation(this.\u00E5terbud,this.aktuellUtbildning$)),e.result.then(n=>{this.\u00E5terbud?et(this.deltagandeService.g\u00F6r\u00C5terbud(this.aktuellUtbildning$)):et(this.deltagandeService.g\u00F6rAvbrott(this.aktuellUtbildning$))}).catch(n=>void 0)}static{this.\u0275fac=function(e){return new(e||i)(g(Kt),g(H),g(Xe))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-aterbud-avbrott-kurs-knapp"]],inputs:{aktuellUtbildning$:"aktuellUtbildning$"},features:[ft([Xe]),C],decls:2,vars:3,consts:[["class","d-grid d-lg-block mt-3",4,"ngIf"],[1,"d-grid","d-lg-block","mt-3"],[1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&(v(0,kl,4,3,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanAvbryta$))},dependencies:[E,M,_],changeDetection:0})}}return i})();function _l(i,d){if(i&1&&(S(0),o(1,"span",1),s(2),r(),y()),i&2){let t=m();a(),p("ngClass",t.vyInformation.badgeKlass),a(),u(t.vyInformation.badgeText)}}var Gc=(()=>{class i extends b{constructor(t){super(),this.i18nPipe=t,this.vyInformation=null}ngOnChanges(t){t&&t.status&&(this.vyInformation=this.uppdateraVyInformation(t.status.currentValue))}uppdateraVyInformation(t){let e={badgeKlass:"bg-light",badgeText:this.t(this.texter.arenden.status.inskickat)};switch(t.Id){case 2:case 3:return{badgeKlass:"bg-primary",badgeText:this.t(this.texter.arenden.status.behandlas)};case 4:case 5:case 6:case 7:case 8:return{badgeKlass:"bg-secondary",badgeText:this.i18nPipe.transform(this.status.Benamningar)};default:return e}}static{this.\u0275fac=function(e){return new(e||i)(g(_))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-arende-status-badge"]],inputs:{status:"status"},features:[C,xt],decls:1,vars:1,consts:[[4,"ngIf"],[1,"badge",3,"ngClass"]],template:function(e,n){e&1&&v(0,_l,3,2,"ng-container",0),e&2&&p("ngIf",n.vyInformation)},dependencies:[ut,E],changeDetection:0})}}return i})();function bl(i,d){if(i&1&&(o(0,"div",2)(1,"h4",3),s(2),r(),U(3,"ladok-studiedeltagande-uppgifter",4),o(4,"p"),s(5),c(6,"i18n"),r()()),i&2){let t=d.ngIf,e=m();a(2),u(t.kursbenamning),a(),p("utbildning$",e.kurs$)("konfiguration",e.uppgifterkonfiguration),a(2),u(f(6,4,e.texter.deltagande.bekrafta_avanmalan.body))}}var ra=(()=>{class i extends b{constructor(){super(),this.uppgifterkonfiguration=lt.AVANMALAN_BEKR\u00C4FTELSE}initiera(t){this.kurs$=t,this.vyInformation$=this.kurs$.pipe(k(e=>({kursbenamning:this.t(e.tillfallesdeltagande.Utbildningsinformation.Benamning)})))}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-bekrafta-avanmalan"]],features:[C],decls:6,vars:6,consts:[[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"utbildning$","konfiguration"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal")(1,"span",0),s(2),c(3,"i18n"),r(),v(4,bl,7,6,"div",1),c(5,"async"),r()),e&2&&(a(2),A(" ",f(3,2,n.texter.deltagande.bekrafta_avanmalan.header)," "),a(2),p("ngIf",f(5,4,n.vyInformation$)))},dependencies:[E,tt,Jt,M,_],changeDetection:0})}}return i})();function Cl(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3)(5,"ladok-aria-datumperiod"),s(6),r()(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.utbildningsinformation.studieperiod)),a(4),u(t.Studieperiod)}}function Sl(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.studietakt)),a(3),u(t.Studietakt)}}function yl(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.undervisningsform)),a(3),u(t.Undervisningsform)}}function Il(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.studieort)),a(3),u(t.Studieort)}}function Al(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.kurskod)),a(3),u(t.Kurskod)}}function El(i,d){if(i&1&&(S(0),o(1,"dt",2),s(2),c(3,"i18n"),r(),o(4,"dd",3),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.tillfalleskod)),a(3),u(t.Tillfalleskod)}}function Tl(i,d){if(i&1&&(S(0),o(1,"dl",1),v(2,Cl,7,4,"ng-container",0)(3,Sl,6,4,"ng-container",0)(4,yl,6,4,"ng-container",0)(5,Il,6,4,"ng-container",0)(6,Al,6,4,"ng-container",0)(7,El,6,4,"ng-container",0),r(),y()),i&2){let t=d.ngIf;a(2),p("ngIf",t.Studieperiod),a(),p("ngIf",t.Studietakt),a(),p("ngIf",t.Undervisningsform),a(),p("ngIf",t.Studieort),a(),p("ngIf",t.Kurskod),a(),p("ngIf",t.Tillfalleskod)}}var oa=(()=>{class i extends b{constructor(t,e){super(),this.datumperiodPipe=t,this.studietaktPipe=e}ngOnInit(){this.vyInformation$=F(this.skapaVyInformation(this.utbildningsinformation))}skapaVyInformation(t){let e={};return t.Studieperiod&&(e.Studieperiod=this.datumperiodPipe.transform(t.Studieperiod)),t.Studietakt&&(e.Studietakt=this.studietaktPipe.transform(t.Studietakt.Takt)),t.Undervisningsform&&(e.Undervisningsform=this.t(t.Undervisningsform)),t.Studielokalisering&&(e.Studieort=this.t(t.Studielokalisering)),t.Utbildningskod&&(e.Kurskod=t.Utbildningskod),t.Utbildningstillfalleskod&&(e.Tillfalleskod=t.Utbildningstillfalleskod),e}static{this.\u0275fac=function(e){return new(e||i)(g(qt),g(xe))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-utbildningsinformation-uppgifter"]],inputs:{utbildningsinformation:"utbildningsinformation"},features:[C],decls:2,vars:3,consts:[[4,"ngIf"],[1,"row","mt-3"],[1,"col-lg-4"],[1,"col-lg-8"]],template:function(e,n){e&1&&(v(0,Tl,8,6,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[E,ke,M,_],changeDetection:0})}}return i})();function Ml(i,d){if(i&1&&(o(0,"div",2)(1,"h4",3),s(2),r(),U(3,"ladok-utbildningsinformation-uppgifter",4),o(4,"p"),s(5),c(6,"i18n"),r()()),i&2){let t=d.ngIf,e=m();a(2),u(t.kursbenamning),a(),p("utbildningsinformation",e.val.Utbildningsinformation),a(2),u(f(6,3,e.texter.deltagande.bekrafta_anmalan.body))}}var la=(()=>{class i extends b{constructor(){super(),this.uppgifterkonfiguration=lt.ANMALAN_BEKR\u00C4FTELSE}initiera(t){this.val=t,this.vyInformation={kursbenamning:this.t(t.Utbildningsinformation.Benamning)}}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-bekrafta-anmalan"]],features:[C],decls:5,vars:4,consts:[[1,"ladok-modal-header"],["class","ladok-modal-body",4,"ngIf"],[1,"ladok-modal-body"],[1,"fw-bold"],[3,"utbildningsinformation"]],template:function(e,n){e&1&&(o(0,"ladok-bekrafta-modal")(1,"span",0),s(2),c(3,"i18n"),r(),v(4,Ml,7,5,"div",1),r()),e&2&&(a(2),A(" ",f(3,2,n.texter.deltagande.bekrafta_anmalan.header)," "),a(2),p("ngIf",n.vyInformation))},dependencies:[E,tt,oa,_],changeDetection:0})}}return i})();var ti=class{constructor(d,t){this.struktur=d,this.boxMedValRepresentationUnion=t}},ei=class{constructor(d,t){this.struktur=d,this.repr=t}},ii=class{constructor(d,t){this.struktur=d,this.repr=t,this.singelval=this.repr.ValjXAntal&&this.repr.ValjXAntal===1}};var _e=(()=>{class i{constructor(t,e,n){this.strukturService=t,this.linkService=e,this.h\u00E4ndelseService=n,this.aktuellaStudieval$=this.strukturService.strukturerUtplattade$.pipe(Z(l=>l.length>0?z(l.map(x=>this.h\u00E4mtaValbaraStudieval(x))):F([])),k(l=>l.reduce((x,T)=>x.concat(...T),[])),k(l=>this.filtreraBortExternAnsokanOchSkapaInnehall(l)),N(l=>console.log("Alla aktuella studieval",l)),rt(1)),this.aktuellaUtbildningstillfallesval$=this.aktuellaStudieval$.pipe(k(l=>l.filter(x=>x.boxMedValRepresentationUnion.Boxtyp==="UTBILDNINGSTILLFALLE")),k(l=>l.map(x=>new ei(x.struktur,x.boxMedValRepresentationUnion))),N(l=>console.log("aktuellaUtbildningstillfallesval",l)),rt(1)),this.aktuellaValmojligheter$=this.aktuellaStudieval$.pipe(k(l=>l.filter(x=>x.boxMedValRepresentationUnion.Boxtyp==="VAL")),k(l=>l.map(x=>new ii(x.struktur,x.boxMedValRepresentationUnion))),N(l=>console.log("aktuellaValmojligheter",l)),rt(1))}h\u00E4mtaValbaraStudieval(t){let e=this.linkService.findByRel(t.repr,R.studiedeltagande.studieval_studiestruktur,"GET");return this.linkService.foljLank(e,an).pipe(k(n=>n.InnehallLista.filter(l=>l.Tillstand==="VALBAR"||l.Tillstand==="VALBAR_MED_HINDER")),k(n=>n.map(l=>new ti(t,l))))}filtreraBortExternAnsokanOchSkapaInnehall(t){return t.map(e=>{let n=e.boxMedValRepresentationUnion;return n.InnehallLista?(n.Innehall=n.InnehallLista.filter(l=>!l.LadokexternAntagning),n.Innehall.length>0?e:null):e}).filter(e=>e)}kanAnmala(t){return this.linkService.exists(t,R.studiedeltagande.studieval_anmal,"POST")}anmal(t){let e={};return F(t).pipe(ht(1),N(n=>e.val=t),Z(n=>{let l=this.linkService.findByRel(n,R.studiedeltagande.studieval_anmal,"POST");return this.linkService.foljLank(l,null,422)}),k(n=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Kursanm\u00E4lan,e),e)),Y(n=>(e.felmeddelande=gt(n),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Kursanm\u00E4lan_misslyckad,e),F(e))))}v\u00E4lj(t,e){let n={};return F(t.repr).pipe(ht(1),N(l=>n.struktur=t.struktur),Z(l=>{let x=this.linkService.findByRel(l,R.studiedeltagande.studieval_flera,"POST"),T={Identitet:e.map(w=>w.AvserBoxUID)};return this.linkService.foljLank(x,T)}),k(l=>(this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Studieval,n),n)),Y(l=>(n.felmeddelande=gt(l),this.h\u00E4ndelseService.nyH\u00E4ndelse(D.Studieval_misslyckad,n),F(n))))}static{this.\u0275fac=function(e){return new(e||i)(L(He),L(vt),L(wt))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Fl(i,d){if(i&1){let t=V();o(0,"button",2),c(1,"i18n"),P("click",function(){$(t);let n=m();return K(n.anmal())}),s(2),c(3,"i18n"),r()}if(i&2){let t=m();Yt("title",f(1,2,t.texter.deltagande.anmal.tooltip)),a(2),u(f(3,4,t.texter.deltagande.anmal))}}var uf=(()=>{class i extends b{constructor(t,e){super(),this.studievalService=t,this.modalService=e}ngOnChanges(t){t.val&&(this.val=t.val.currentValue,this.kanAnmala=this.studievalService.kanAnmala(this.val))}anmal(){let t=this.modalService.open(la);t.componentInstance.initiera(this.val),t.result.then(e=>{et(this.studievalService.anmal(this.val))}).catch(e=>void 0)}static{this.\u0275fac=function(e){return new(e||i)(g(_e),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-anmal-utbildning-knapp"]],inputs:{val:"val"},features:[C,xt],decls:2,vars:1,consts:[[1,"d-grid","d-lg-block","mt-3"],["class","btn btn-ladok-brand btn-lg-min-width",3,"title","click",4,"ngIf"],[1,"btn","btn-ladok-brand","btn-lg-min-width",3,"click","title"]],template:function(e,n){e&1&&(o(0,"div",0),v(1,Fl,4,6,"button",1),r()),e&2&&(a(),p("ngIf",n.kanAnmala))},dependencies:[E,_],changeDetection:0})}}return i})();function jl(i,d){if(i&1){let t=V();o(0,"div",1)(1,"button",2),P("click",function(){$(t);let n=m();return K(n.avanmal())}),s(2),c(3,"i18n"),r()()}if(i&2){let t=m();a(2),u(f(3,1,t.texter.deltagande.avanmal))}}var _f=(()=>{class i extends b{constructor(t,e){super(),this.deltagandeService=t,this.modalService=e}ngOnInit(){this.kanAvanmala$=this.aktuellKurs$.pipe(k(t=>this.deltagandeService.kanTaBortVal(t)))}avanmal(){let t=this.modalService.open(ra);t.componentInstance.initiera(this.aktuellKurs$),t.result.then(e=>{et(this.deltagandeService.taBortVal(this.aktuellKurs$))}).catch(e=>void 0)}static{this.\u0275fac=function(e){return new(e||i)(g(Kt),g(H))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-avanmal-utbildning-knapp"]],inputs:{aktuellKurs$:"aktuellKurs$"},features:[C],decls:2,vars:3,consts:[["class","d-grid d-lg-block mt-3",4,"ngIf"],[1,"d-grid","d-lg-block","mt-3"],[1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"click"]],template:function(e,n){e&1&&(v(0,jl,4,3,"div",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.kanAvanmala$))},dependencies:[E,M,_],changeDetection:0})}}return i})();var Pl=i=>["kurstillfallesbyte/",i];function wl(i,d){if(i&1&&(S(0),o(1,"div",1)(2,"a",2),s(3),c(4,"i18n"),r()(),y()),i&2){let t=m().ngIf,e=m();a(2),p("routerLink",Nt(4,Pl,t.tillfallesdeltagande.Uid)),a(),A(" ",f(4,2,e.texter.deltagande.tillfallesbyte.byt_tillfalle_knapp)," ")}}function Ul(i,d){if(i&1&&(S(0),v(1,wl,5,6,"ng-container",0),c(2,"async"),y()),i&2){let t,e=m();a(),p("ngIf",((t=f(2,1,e.tillfallesbyteskandidater$))==null?null:t.length)>0)}}var If=(()=>{class i extends b{constructor(t){super(),this.deltagandeService=t}ngOnInit(){this.tillfallesbyteskandidater$=this.aktuellKurs$.pipe(Z(t=>this.deltagandeService.h\u00E4mtaTillf\u00E4llesbyteskandidater(t)),rt(1))}static{this.\u0275fac=function(e){return new(e||i)(g(Kt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-tillfallesbyte-knapp"]],inputs:{aktuellKurs$:"aktuellKurs$"},features:[C],decls:2,vars:3,consts:[[4,"ngIf"],[1,"d-grid","d-lg-block","mt-3"],["role","button",1,"btn","btn-outline-ladok-brand","btn-lg-min-width",3,"routerLink"]],template:function(e,n){e&1&&(v(0,Ul,3,3,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.aktuellKurs$))},dependencies:[E,me,M,_],changeDetection:0})}}return i})();var ni=(()=>{class i extends gn(){constructor(t,e,n){super(),this.datumperiodPipe=t,this.linkService=e,this.i18n=n}skapaVyInformation(t){return t.pipe(this.takeUntilDestroyed(),Z(e=>{let n=this.linkService.findByRel(e,R.studiedeltagande.uppehall,"GET"),l=n?this.linkService.foljLank(n):F(void 0);return z([F(this.skapaBas(e)),l])}),k(([e,n])=>(e.Uppehall=this.skapaUppeh\u00E5llInfo(n),e)),N(e=>console.log("studiedeltagandeuppgifter",e)))}skapaBas(t){let e={};return t.Utbildningsinformation.Studielokalisering&&(e.Studieort=this.i18n.transform(t.Utbildningsinformation.Studielokalisering)),t.Utbildningsinformation.Utbildningskod&&(e.Kurskod=t.Utbildningsinformation.Utbildningskod),t.Utbildningsinformation.Utbildningstillfalleskod&&(e.Tillfalleskod=t.Utbildningsinformation.Utbildningstillfalleskod),t.Utbildningsinformation.Studieperiod&&(e.Studieperiod=this.datumperiodPipe.transform(t.Utbildningsinformation.Studieperiod)),e}skapaUppeh\u00E5llInfo(t){if(t?.UppehallLista.length>0)return t.UppehallLista.map(e=>({Fran:e.FranOchMed,Till:e.TillOchMed}))}static{this.\u0275fac=function(e){return new(e||i)(L(qt),L(vt),L(_))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();function $l(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd")(5,"ladok-aria-datumperiod"),s(6),r()(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.utbildning.studieperiod)),a(4),u(t.Studieperiod)}}function Kl(i,d){if(i&1&&(o(0,"div")(1,"span")(2,"ladok-aria-datumperiod"),s(3),r()(),U(4,"br"),r()),i&2){let t=d.$implicit;a(3),Dt("",t.Fran," - ",t.Till,"")}}function Rl(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),v(5,Kl,5,2,"div",2),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.utbildning.uppehall)),a(3),p("ngForOf",t.Uppehall)}}function Ll(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.studieort)),a(3),u(t.Studieort)}}function Vl(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.kurskod)),a(3),u(t.Kurskod)}}function Nl(i,d){if(i&1&&(S(0),o(1,"dt"),s(2),c(3,"i18n"),r(),o(4,"dd"),s(5),r(),y()),i&2){let t=m().ngIf,e=m();a(2),u(f(3,2,e.texter.startsida.aktuella_kurser.tillfalleskod)),a(3),u(t.Tillfalleskod)}}function Hl(i,d){if(i&1&&(S(0),o(1,"dl",1),v(2,$l,7,4,"ng-container",0)(3,Rl,6,4,"ng-container",0)(4,Ll,6,4,"ng-container",0)(5,Vl,6,4,"ng-container",0)(6,Nl,6,4,"ng-container",0),r(),y()),i&2){let t=d.ngIf;a(2),p("ngIf",t.Studieperiod),a(),p("ngIf",t.Uppehall),a(),p("ngIf",t.Studieort),a(),p("ngIf",t.Kurskod),a(),p("ngIf",t.Tillfalleskod)}}var wf=(()=>{class i extends b{constructor(t){super(),this.studiedeltagandeUppgifterPaketeringService=t}ngOnInit(){this.vyInformation$=this.studiedeltagandeUppgifterPaketeringService.skapaVyInformation(this.paketeringsdeltagande$)}static{this.\u0275fac=function(e){return new(e||i)(g(ni))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-studiedeltagande-uppgifter-paketering"]],inputs:{paketeringsdeltagande$:"paketeringsdeltagande$"},features:[ft([ni]),C],decls:2,vars:3,consts:[[4,"ngIf"],[1,"ladok-dl-4"],[4,"ngFor","ngForOf"]],template:function(e,n){e&1&&(v(0,Hl,7,5,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.vyInformation$))},dependencies:[W,E,ke,M,_],changeDetection:0})}}return i})();var Rt=function(i){return i[i.info=0]="info",i[i.success=1]="success",i[i.warning=2]="warning",i[i.error=3]="error",i}(Rt||{}),ai=class{constructor(){this.text="",this.textEfter=""}},ri=class{constructor(d){this.tidigtAvbrott=d}};var Ql=[[["",8,"ladok-toast-body-content"]],[["",8,"ladok-toast-header-content"]]],zl=[".ladok-toast-body-content",".ladok-toast-header-content"];function Wl(i,d){if(i&1){let t=V();o(0,"div",4),U(1,"fa-icon",5),r(),o(2,"span",6),s(3),r(),J(4,1),o(5,"div",7),U(6,"div",8),o(7,"button",9),c(8,"i18n"),P("click",function(){$(t);let n=m(2);return K(n.visa=!1)}),r()()}if(i&2){let t=m(2);a(),p("size","lg")("icon",t.ikon),a(2),A("",t.srTitel,":"),a(4),Vi("egen ",t.btnCloseClass,""),Li("aria-label",f(8,7,t.texter.shared.stang))}}function ql(i,d){if(i&1){let t=V();o(0,"div",1)(1,"ngb-toast",2),P("hidden",function(){$(t);let n=m();return K(n.visa=!1)})("mouseenter",function(){$(t);let n=m();return K(n.autohide=!1)})("mouseleave",function(){$(t);let n=m();return K(n.autohide=n.autohideOrg)}),v(2,Wl,9,9,"ng-template",3),J(3),r()()}if(i&2){let t=m();a(),p("delay",t.delay)("autohide",t.autohide)("className","toast ladok-toast "+t.classes)}}var sa=(()=>{class i extends b{constructor(t){super(),this.element=t,this.Ikoner=Pt,this.harBody=!1,this.autohide=!0,this.delay=6e3,this.visa=!0,this.btnCloseClass=""}ngOnInit(){switch(this.typ){case Rt.info:this.classes="toast-info",this.ikon=Pt.farInfoCircle,this.srTitel=this.t(B.toast.info.titel),this.btnCloseClass="btn-close btn-close-white";break;case Rt.success:this.classes="toast-success",this.ikon=Pt.farCheckCircle,this.srTitel=this.t(B.toast.success.titel),this.btnCloseClass="btn-close btn-close-white";break;case Rt.warning:this.classes="toast-warning",this.srTitel=this.t(B.toast.warning.titel),this.ikon=Pt.farExclamationTriangle,this.autohide=!1,this.btnCloseClass="btn-close";break;case Rt.error:this.classes="toast-error",this.srTitel=this.t(B.toast.error.titel),this.ikon=Pt.farBan,this.autohide=!1,this.btnCloseClass="btn-close btn-close-white";break}console.log("class ",this.btnCloseClass),this.autohideOrg=this.autohide,this.classes+=this.harBody?"":" ingen-body"}ngAfterViewInit(){let t=this.element.nativeElement.querySelector("button:not(.egen)");t&&t.remove()}static{this.\u0275fac=function(e){return new(e||i)(g(Lt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-toast"]],inputs:{typ:"typ",harBody:"harBody",autohide:"autohide",delay:"delay"},features:[C],ngContentSelectors:zl,decls:1,vars:1,consts:[["class","ladok-toast",4,"ngIf"],[1,"ladok-toast"],[3,"hidden","mouseenter","mouseleave","delay","autohide","className"],["ngbToastHeader",""],["aria-hidden","true",1,"toast-ikon"],[3,"size","icon"],[1,"visually-hidden"],[1,"ms-auto"],[1,"me-auto"],["type","button",3,"click"]],template:function(e,n){e&1&&(st(Ql),v(0,ql,4,3,"div",0)),e&2&&p("ngIf",n.visa)},dependencies:[E,$e,cn,pn,_],styles:[`.ladok-toast{color:#fff;margin-bottom:1rem}.ladok-toast a{color:#fff}.ladok-toast .egen{padding:.75rem}.ladok-toast .ingen-body .toast-body{padding:4px 0 0}.ladok-toast .ingen-body .toast-header{padding-top:6px}.ladok-toast .toast-header button{color:#fff!important}.ladok-toast .toast-header .toast-ikon{min-width:1.5rem;margin-right:1rem;width:1.5rem;text-align:right}.ladok-toast .ladok-toast-body-content{margin-top:-.5rem;padding-left:2.5rem}@media (max-width: 767.98px){.ladok-toast{margin-bottom:.5rem}.ladok-toast .toast-header .toast-ikon{display:none}.ladok-toast .ladok-toast-body-content{padding-left:0}}.toast-info,.toast-info .toast-header{background-color:var(--ladok-alert-info-color);color:#fff}.toast-info .btn-close{color:#fff}.toast-success,.toast-success .toast-header{background-color:var(--ladok-alert-success-color);color:#fff}.toast-success .btn-close{color:#fff}.toast-warning,.toast-warning .toast-header{background-color:var(--ladok-alert-warning-color);color:#000}.toast-warning .toast-header button{color:#000}.toast-error,.toast-error .toast-header{background-color:var(--ladok-alert-error-color);color:#fff}.toast-error .btn-close{color:#fff}
`],encapsulation:2,changeDetection:0})}}return i})();var Zl=["*"],da=(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-toast-container"]],ngContentSelectors:Zl,decls:3,vars:0,consts:[[1,"d-flex","justify-content-center","align-items-center"],[1,"toast-container"]],template:function(e,n){e&1&&(st(),o(0,"div",0)(1,"div",1),J(2),r()())},styles:[".toast-container[_ngcontent-%COMP%]{position:fixed;top:4rem;margin-top:1rem;z-index:1010;width:94%}@media (min-width: 768px){.toast-container[_ngcontent-%COMP%]{width:740px;margin-top:1.5rem}}"],changeDetection:0})}}return i})();var Xl=["textMedLista"],ts=["swUpdateTemplate"],es=["avbrott"];function is(i,d){if(i&1&&(o(0,"span"),s(1),r()),i&2){let t=d.$implicit;a(),u(t)}}function ns(i,d){if(i&1&&(o(0,"span",7),v(1,is,2,1,"span",8),r()),i&2){let t=m().bodyTemplateVyinfo;a(),p("ngForOf",t.lista)}}function as(i,d){if(i&1&&(o(0,"li"),s(1),r()),i&2){let t=d.$implicit;a(),A(" ",t," ")}}function rs(i,d){if(i&1&&(o(0,"ul",9),v(1,as,2,1,"li",8),r()),i&2){let t=m().bodyTemplateVyinfo;a(),p("ngForOf",t.lista)}}function os(i,d){if(i&1&&(s(0),v(1,ns,2,1,"span",5)(2,rs,2,1,"ul",6),s(3)),i&2){let t=d.bodyTemplateVyinfo;A(" ",t.text," "),a(),p("ngIf",t.lista),a(),p("ngIf",t.lista),a(),A(" ",t.textEfter,`
`)}}function ls(i,d){if(i&1){let t=V();o(0,"button",10),P("click",function(){$(t);let n=m();return K(n.reload())}),s(1),c(2,"i18n"),r()}if(i&2){let t=m();a(),u(f(2,1,t.texter.uppdateringsinformation.lanktext))}}function ss(i,d){if(i&1&&(o(0,"div",13),s(1),c(2,"i18n"),r()),i&2){let t=m(2);a(),u(f(2,1,t.texter.deltagande.tidigtavbrottsbekraftelse.lyckad.innehall))}}function ds(i,d){if(i&1&&(v(0,ss,3,3,"div",11),s(1),c(2,"i18n"),o(3,"a",12),s(4),c(5,"i18n"),r()),i&2){let t=d.bodyTemplateVyinfo,e=m();p("ngIf",t.tidigtAvbrott),a(),A(" ",f(2,3,e.texter.deltagande.avbrottCsnInformation.del1)," "),a(3),A(" ",f(5,5,e.texter.deltagande.avbrottCsnInformation.lanktext)," ")}}function ms(i,d){}function ps(i,d){if(i&1&&(S(0),v(1,ms,0,0,"ng-template",19),y()),i&2){let t=m(2).$implicit;a(),p("ngTemplateOutlet",t.bodyTemplateRef)("ngTemplateOutletContext",t)}}function cs(i,d){if(i&1&&s(0),i&2){let t=m(2).$implicit;u(t.bodyText)}}function fs(i,d){if(i&1&&(o(0,"div",17),v(1,ps,2,2,"ng-container",18)(2,cs,1,1,"ng-template",null,3,Ie),r()),i&2){let t=Pe(3),e=m().$implicit;a(),p("ngIf",e.bodyTemplateRef)("ngIfElse",t)}}function us(i,d){if(i&1&&(o(0,"ladok-toast",14)(1,"div",15),s(2),r(),v(3,fs,4,2,"div",16),r()),i&2){let t=d.$implicit;p("typ",t.typ)("harBody",!!t.bodyText||!!t.bodyTemplateRef)("autohide",!t.statisk),a(2),A(" ",t.rubrik," "),a(),p("ngIf",t.bodyText||t.bodyTemplateRef)}}var Jf=(()=>{class i extends Ee(b){constructor(t,e,n){super(),this.h\u00E4ndelseService=t,this.utbildningService=e,this.routeEventsService=n,this.toastSubject=new Bt(1),this.allaToasts$=this.toastSubject.asObservable(),this.subSink=this.h\u00E4ndelseService.h\u00E4ndelser().pipe(je(200)).subscribe(l=>this.hanteraH\u00E4ndelse(l)),this.subSink=this.routeEventsService.newRoute$.subscribe(()=>this.toastSubject.next([]))}skapaToast(t){this.toastSubject.next([t])}hanteraH\u00E4ndelse(t){let e;switch(t.typ){case D.SwUpdateTvingandeOmladdning:e=this.toastF\u00F6rSwUpdate();break;case D.Avanm\u00E4lanAktivitetstillf\u00E4lle:case D.Avanm\u00E4lanAktivitetstillf\u00E4lle_misslyckad:e=this.fr\u00E5nExaminationstillf\u00E4llesavanm\u00E4lanbekr\u00E4ftelse(t.data);break;case D.Anm\u00E4lanAktivitetstillf\u00E4lle:case D.Anm\u00E4lanAktivitetstillf\u00E4lle_misslyckad:e=this.fr\u00E5nExaminationstillf\u00E4llesanm\u00E4lanbekr\u00E4ftelse(t.data);break;case D.AnpassningAktivitetstillf\u00E4lle:case D.AnpassningAktivitetstillf\u00E4lle_misslyckad:e=this.fr\u00E5nAnpassningsans\u00F6kan(t.data);break;case D.AnpassningAktivitetstillf\u00E4lleEfterAnm\u00E4lan:e=this.fr\u00E5nAnpassningsans\u00F6kanEfterAnm\u00E4lan(t.data);break;case D.AvbrytAnpassningAktivitetstillf\u00E4lle:case D.AvbrytAnpassningAktivitetstillf\u00E4lle_misslyckad:e=this.fr\u00E5nAvbrytAnpassningsans\u00F6kan(t.data);break;case D.Registrering:case D.Registrering_misslyckad:e=this.fr\u00E5nRegistreringsbekr\u00E4ftelse(t.data);break;case D.Avbrott:case D.Avbrott_misslyckad:e=this.fr\u00E5nAvbrottsbekr\u00E4ftelse(t.data);break;case D.\u00C5terbud:case D.\u00C5terbud_misslyckad:e=this.fr\u00E5n\u00C5terbudsbekr\u00E4ftelse(t.data);break;case D.Avanm\u00E4lan:case D.Avanm\u00E4lan_misslyckad:e=this.fr\u00E5nAvanm\u00E4lansbekr\u00E4ftelse(t.data);break;case D.FlyttaAnm\u00E4lan:case D.FlyttaAnm\u00E4lan_misslyckad:e=this.fr\u00E5nFlyttAnm\u00E4lansbekr\u00E4ftelse(t.data);break;case D.Kursanm\u00E4lan:case D.Kursanm\u00E4lan_misslyckad:e=this.fr\u00E5nAnm\u00E4lansbekr\u00E4ftelse(t.data);break;case D.Studieval:case D.Studieval_misslyckad:e=this.fr\u00E5nValm\u00F6jlighetbekr\u00E4ftelse(t.data);break;case D.GenereraIntyg:case D.GenereraIntyg_misslyckad:e=this.fr\u00E5nGenereraIntygbekraftelse(t.data);break;case D.Tillf\u00E4llesbyte:case D.Tillf\u00E4llesbyte_misslyckad:e=this.fr\u00E5nTillf\u00E4llesbytebekr\u00E4ftelse(t.data);break;case D.Tillgodoans\u00F6kan:case D.Tillgodoans\u00F6kan_misslyckad:e=this.fr\u00E5nTillgodoansokanbekr\u00E4ftelse(t.data);break;case D.Bevisans\u00F6kan:case D.Bevisans\u00F6kan_misslyckad:e=this.fr\u00E5nBevisansokanbekr\u00E4ftelse(t.data);break;case D.Kontaktuppgifter:case D.Kontaktuppgifter_misslyckad:e=this.fr\u00E5nKontaktuppgifterbekr\u00E4ftelse(t.data);break;case D.TaBortBilaga_misslyckad:e=this.fr\u00E5nTaBortBilaga();break;case D.SkapaDelningAvUtf\u00E4rdadeBevis:case D.SkapaDelningAvUtf\u00E4rdadeBevis_misslyckad:e=this.fr\u00E5nSkapaDelningAvBevisbekr\u00E4ftelse(t.data);break;case D.IspUppgifterSparade:case D.IspUppgifterSparade_misslyckad:case D.IspUppgifterTabort:case D.IspUppgifterTabort_misslyckad:e=this.fr\u00E5nIspUppdatering(t.data);break;case D.IspProcessUppdaterad:e=this.fr\u00E5nIspProcessUppdaterad();break;case D.Isp\u00D6verskrivningsskydd:e=this.fr\u00E5nIsp\u00D6verskrivningsskydd();break;case D.ArendeKomplettering:case D.ArendeKomplettering_misslyckad:e=this.fr\u00E5n\u00C4rendekomplettering(t.data);break}e&&this.skapaToast(e)}toastMedRubrik(t,e){return{typ:t?Rt.error:Rt.success,rubrik:this.i18n.transform(t?e.misslyckad.rubrik:e.lyckad.rubrik),statisk:t}}toastF\u00F6rSwUpdate(){let t={typ:Rt.info,rubrik:this.i18n.transform(B.uppdateringsinformation.rubrik),statisk:!0};return t.bodyTemplateRef=this.swUpdateTpl,t}fr\u00E5nRegistreringsbekr\u00E4ftelse(t){let e=!!t.felmeddelande,n=B.deltagande.registreringsbekraftelse,l=this.toastMedRubrik(e,n);if(e){l.bodyTemplateRef=this.textMedListaTpl,l.bodyTemplateVyinfo=new ai;let x=this.filtreraHinderF\u00F6rRegistrering(t.hinder);x.length>0?(l.bodyTemplateVyinfo.text=this.i18n.transform(n.misslyckad.innehall),l.bodyTemplateVyinfo.lista=x.map(T=>this.i18n.transform(T.Text))):l.bodyTemplateVyinfo.text=this.i18n.transform(n.misslyckad.kontakta)}else if(t.utbildning.tillfallesdeltagande.Perioddeltaganden.length>1){let x=this.utbildningService.periodInfoF\u00F6rTillst\u00E5nd(t.utbildning.tillfallesdeltagande,"studiedeltagande.domain.tillstandsdefinition.ej_paborjad"),T=this.i18n.transform(B.utbildning.studieperiod),w=this.i18n.transform(B.shared.av);l.bodyText=`${T} ${x.f\u00F6rsta} ${w} ${x.antalPerioder}`}return l}filtreraHinderF\u00F6rRegistrering(t){let e=["studiedeltagande.domain.hinder.tillgodoraknande_finns_pa_hel_kurs","studiedeltagande.domain.hinder.avstangd","studiedeltagande.domain.hinder.avskiljd","studiedeltagande.domain.hinder.studieavgift_har_ej_erlagts","studiedeltagande.domain.hinder.villkor_behorighet","studiedeltagande.domain.hinder.utbildning_avklarad","studiedeltagande.domain.hinder.faktura_for_studieavgift_ej_reglerad_for_betalperiod","studiedeltagande.domain.hinder.omfattningsbegransning_for_studieavgiftsperiod_overskrids"];return t?t.filter(n=>e.find(l=>l===n.I18nNyckel)):[]}fr\u00E5nAvbrottsbekr\u00E4ftelse(t){let e=t.tidigtAvbrott?B.deltagande.tidigtavbrottsbekraftelse:B.deltagande.avbrottsbekraftelse,n=!!t.felmeddelande,l=this.toastMedRubrik(n,e);return l.statisk=!0,n||(l.bodyTemplateRef=this.avbrottTpl,l.bodyTemplateVyinfo=new ri(t.tidigtAvbrott)),l}fr\u00E5n\u00C5terbudsbekr\u00E4ftelse(t){let e=B.deltagande.aterbudsbekraftelse,n=!!t.felmeddelande,l=this.toastMedRubrik(n,e);return l.statisk=!0,n||(l.bodyText=this.i18n.transform(e.lyckad.innehall)),l}fr\u00E5nAnm\u00E4lansbekr\u00E4ftelse(t){let e=B.deltagande.anmalningsbekraftelse,n=!!t.felmeddelande,l=this.toastMedRubrik(n,e);return n||(l.bodyText=this.i18n.transform(e.lyckad.innehall)),l}fr\u00E5nFlyttAnm\u00E4lansbekr\u00E4ftelse(t){let e=B.examinationstillfallen.flytta_anmalan,n=!!t.felmeddelande,l=this.toastMedRubrik(n,e);return n||(l.bodyText=this.i18n.transform(e.lyckad.innehall)),l}fr\u00E5nAvanm\u00E4lansbekr\u00E4ftelse(t){let e=B.deltagande.avanmalningsbekraftelse,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nValm\u00F6jlighetbekr\u00E4ftelse(t){let e=B.studieval.bekraftelse,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nExaminationstillf\u00E4llesavanm\u00E4lanbekr\u00E4ftelse(t){let e=B.examinationstillfallen.avanmalan,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nExaminationstillf\u00E4llesanm\u00E4lanbekr\u00E4ftelse(t){let e=B.examinationstillfallen.anmalan,n=!!t.felmeddelande,l=this.toastMedRubrik(n,e);return n||(l.bodyText=this.i18n.transform(e.lyckad.innehall)),l}fr\u00E5nAnpassningsans\u00F6kan(t){let e=B.examinationstillfallen.anpassning,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nAnpassningsans\u00F6kanEfterAnm\u00E4lan(t){let e=B.examinationstillfallen.anpassning_efter_anmalan,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nAvbrytAnpassningsans\u00F6kan(t){let e=B.examinationstillfallen.anpassning.ansokan.avbryt_ansokan,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nGenereraIntygbekraftelse(t){let e=B.intyg.skapa.bekraftelse,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nTillf\u00E4llesbytebekr\u00E4ftelse(t){let e=B.deltagande.tillfallesbyte.bekraftelse,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nTillgodoansokanbekr\u00E4ftelse(t){let e=B.tillgodoansokan.ansokan,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nBevisansokanbekr\u00E4ftelse(t){let e=B.bevisansokan.ansokan,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nKontaktuppgifterbekr\u00E4ftelse(t){let e=B.mina_uppgifter.kontaktuppgifter,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nTaBortBilaga(){let t=B.arenden.bilaga.ta_bort;return this.toastMedRubrik(!0,t)}fr\u00E5nSkapaDelningAvBevisbekr\u00E4ftelse(t){let e=B.bevis.dela_bevis_skapa.delningavbevisstatus,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}reload(){document.location.reload()}fr\u00E5nIspUppdatering(t){let e=B.individuell_studieplan.uppdateringsinformation,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}fr\u00E5nIspProcessUppdaterad(){let t=B.individuell_studieplan.process.uppdatering;return this.toastMedRubrik(!1,t)}fr\u00E5nIsp\u00D6verskrivningsskydd(){let t=B.individuell_studieplan.information_ar_andrad;return this.toastMedRubrik(!0,t)}fr\u00E5n\u00C4rendekomplettering(t){let e=B.arenden.meddelanden.komplettering,n=!!t.felmeddelande;return this.toastMedRubrik(n,e)}static{this.\u0275fac=function(e){return new(e||i)(g(wt),g(Ut),g(en))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-toast-manager"]],viewQuery:function(e,n){if(e&1&&(At(Xl,5),At(ts,5),At(es,5)),e&2){let l;Et(l=Tt())&&(n.textMedListaTpl=l.first),Et(l=Tt())&&(n.swUpdateTpl=l.first),Et(l=Tt())&&(n.avbrottTpl=l.first)}},features:[C],decls:9,vars:3,consts:[["textMedLista",""],["swUpdateTemplate",""],["avbrott",""],["text",""],[3,"typ","harBody","autohide",4,"ngFor","ngForOf"],["class","visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngIf"],[1,"visually-hidden"],[4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"btn","btn-link",3,"click"],["class","mb-2",4,"ngIf"],["href","https://www.csn.se/mina-sidor.html","target","_blank","rel","noopener"],[1,"mb-2"],[3,"typ","harBody","autohide"],[1,"ladok-toast-header-content"],["class","ladok-toast-body-content",4,"ngIf"],[1,"ladok-toast-body-content"],[4,"ngIf","ngIfElse"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){e&1&&(v(0,os,4,4,"ng-template",null,0,Ie)(2,ls,3,3,"ng-template",null,1,Ie)(4,ds,6,7,"ng-template",null,2,Ie),o(6,"ladok-toast-container"),v(7,us,4,5,"ladok-toast",4),c(8,"async"),r()),e&2&&(a(7),p("ngForOf",f(8,1,n.allaToasts$)))},dependencies:[W,E,zi,sa,da,M,_],changeDetection:0})}}return i})();function gs(i,d){if(i&1&&(o(0,"div",2),s(1),r()),i&2){let t=d.ngIf;a(),A(" ",t," ")}}function vs(i,d){if(i&1&&(S(0),v(1,gs,2,1,"div",1),c(2,"async"),y()),i&2){let t=m();a(),p("ngIf",f(2,1,t.registreringsDagar$))}}var i0=(()=>{class i extends b{constructor(t,e,n){super(),this.deltagandeService=t,this.modalService=e,this.datumService=n}ngOnInit(){let t=this.aktuellKurs$.pipe(k(e=>this.deltagandeService.kanRegistrera(e)));this.registreringsDagar$=z([this.aktuellKurs$,t]).pipe(k(([e,n])=>this.ber\u00E4knaRegistreringsDagar(e,n))),this.visa$=this.registreringsDagar$.pipe(k(e=>!!e))}ber\u00E4knaRegistreringsDagar(t,e){if(!t.tillfallesdeltagande.Registreringsperiod)return null;if(e){let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.tillfallesdeltagande.Registreringsperiod.Slutdatum));return n===0?this.t(this.texter.deltagande.registrering.stanger_idag):this.t(this.texter.deltagande.registrering.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}else{if(this.slutdatumLiggerBak\u00E5tITiden(t.tillfallesdeltagande.Registreringsperiod))return null;if(this.datumService.afterOrEqual(this.datumService.idag(),t.tillfallesdeltagande.Registreringsperiod.Startdatum)){let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.tillfallesdeltagande.Registreringsperiod.Slutdatum));return this.t(this.texter.deltagande.registrering.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}else{let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.tillfallesdeltagande.Registreringsperiod.Startdatum));return this.t(this.texter.deltagande.registrering.oppnar)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}}}slutdatumLiggerBak\u00E5tITiden(t){return t.Slutdatum&&this.datumService.before(t.Slutdatum,this.datumService.idag())}static{this.\u0275fac=function(e){return new(e||i)(g(Kt),g(H),g(mt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-information-om-registreringsdagar"]],inputs:{aktuellKurs$:"aktuellKurs$"},features:[C],decls:2,vars:3,consts:[[4,"ngIf"],["class","mb-2",4,"ngIf"],[1,"mb-2"]],template:function(e,n){e&1&&(v(0,vs,3,3,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.visa$))},dependencies:[E,M],changeDetection:0})}}return i})();function hs(i,d){if(i&1&&(o(0,"div",1)(1,"div",2)(2,"span",3),s(3),r()()()),i&2){let t=m();a(3),A(" ",t.anmalningsDagar," ")}}var o0=(()=>{class i extends b{constructor(t,e,n){super(),this.studievalService=t,this.modalService=e,this.datumService=n}ngOnChanges(t){t.val&&(this.val=t.val.currentValue,this.kanAnmala=this.studievalService.kanAnmala(this.val),this.anmalningsDagar=this.ber\u00E4knaAnmalningsDagar(this.val,this.kanAnmala))}ber\u00E4knaAnmalningsDagar(t,e){if(!t.Valperiod)return null;if(e){let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Valperiod.Slutdatum));return n===0?this.t(this.texter.deltagande.anmal.stanger_idag):this.t(this.texter.deltagande.anmal.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}else if(t.Valperiod.Startdatum>this.datumService.idag()){let n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Valperiod.Startdatum));return this.t(this.texter.deltagande.anmal.oppnar)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))}}static{this.\u0275fac=function(e){return new(e||i)(g(_e),g(H),g(mt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-information-om-anmalningsdagar"]],inputs:{val:"val"},features:[C,xt],decls:1,vars:1,consts:[["class","row",4,"ngIf"],[1,"row"],[1,"col-lg-6"],[1,"mt-1"]],template:function(e,n){e&1&&v(0,hs,4,1,"div",0),e&2&&p("ngIf",n.anmalningsDagar)},dependencies:[E],changeDetection:0})}}return i})();var s0=(()=>{class i{transform(t){return t&&t.length===12?t.substring(0,8)+"-"+t.substring(8,12):t}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=G({name:"personnummer",type:i,pure:!0})}}return i})();var ma=(()=>{class i{constructor(t){this.i18nPipe=t,this.texterna=B}transform(t,e){if(typeof t<"u"&&t!==null){if(t.toString().toLowerCase()==="true")return this.i18nPipe.transform(this.texterna.shared.ja);if(t.toString().toLowerCase()==="false")return this.i18nPipe.transform(this.texterna.shared.nej)}return t}static{this.\u0275fac=function(e){return new(e||i)(g(_,16))}}static{this.\u0275pipe=G({name:"jaNej",type:i,pure:!0})}}return i})();var pa=(()=>{class i{transform(t){return!t||!t.Enhetskod?"":t.Enhetskod.toLowerCase()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=G({name:"enhetskod",type:i,pure:!0})}}return i})();var be=(()=>{class i extends sn{constructor(t){super(),this.datumService=t}static toInteger(t){return parseInt(`${t}`,10)}static isNumber(t){return!isNaN(i.toInteger(t))}static padNumber(t){return i.isNumber(t)?`0${t}`.slice(-2):""}static shortHandFormatter(t){return t?t&&t.length===6&&t.match(/\d{6}/)?t.replace(/(\d\d)(\d\d)(\d\d)/,"20$1-$2-$3"):t&&t.length===8&&t.match(/\d{8}/)?t.replace(/(\d\d\d\d)(\d\d)(\d\d)/,"$1-$2-$3"):t:null}parse(t){let e=i.shortHandFormatter(t),n=this.datumService.parseDate(e);return n?{year:i.toInteger(n.getFullYear()),month:i.toInteger(n.getMonth()+1),day:i.toInteger(n.getDate())}:null}format(t){return t?`${t.year}-${i.isNumber(t.month)?i.padNumber(t.month):""}-${i.isNumber(t.day)?i.padNumber(t.day):""}`:""}static{this.\u0275fac=function(e){return new(e||i)(L(mt))}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();var fa=(()=>{class i{constructor(t){this.parser=t}transform(t,...e){return this.parser.parse(t)}static{this.\u0275fac=function(e){return new(e||i)(g(be,16))}}static{this.\u0275pipe=G({name:"tillNgbDate",type:i,pure:!0})}}return i})();var ua=(()=>{class i{constructor(t){this.parser=t}transform(t,...e){return this.parser.format(t)}static{this.\u0275fac=function(e){return new(e||i)(g(be,16))}}static{this.\u0275pipe=G({name:"franNgbDate",type:i,pure:!0})}}return i})();var v0=(()=>{class i{constructor(t){this.element=t,this.tabIndex=-1,this.noOutline=!0}ngAfterViewInit(){this.element.nativeElement.focus()}static{this.\u0275fac=function(e){return new(e||i)(g(Lt))}}static{this.\u0275dir=ct({type:i,selectors:[["","ladokAutoFocus",""]],hostVars:3,hostBindings:function(e,n){e&2&&(Ni("tabindex",n.tabIndex),It("no-outline",n.noOutline))}})}}return i})();var ga=(()=>{class i{constructor(t){this.date=t}transform(t,e){return t&&this.date.transform(t,"yyyy-MM-dd HH:mm:ss")}static{this.\u0275fac=function(e){return new(e||i)(g(we,16))}}static{this.\u0275pipe=G({name:"datumTid",type:i,pure:!0})}}return i})();var _0=(()=>{class i extends b{constructor(t){super(),this.omfattningEnhetPipe=t,this.borttagen=!1}ngOnInit(){this.omfattningText=this.omfattningEnhet&&this.omfattningEnhet.Omfattningsvarde>0?this.omfattningEnhetPipe.transform(this.omfattningEnhet):""}static{this.\u0275fac=function(e){return new(e||i)(g(Ct))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-tillgodoraknande-badge"]],inputs:{omfattningEnhet:"omfattningEnhet",borttagen:"borttagen"},features:[C],decls:3,vars:4,consts:[[1,"badge","bg-ladok-tg"]],template:function(e,n){e&1&&(o(0,"span",0),s(1),c(2,"i18n"),r()),e&2&&(a(),Dt(" ",f(2,2,n.texter.shared.tillgodoraknanden_badgetext)," ",n.omfattningText,`
`))},dependencies:[_],changeDetection:0})}}return i})();var va=(()=>{class i{constructor(){this.Ikoner=Pt}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-extern-ikon"]],decls:2,vars:2,consts:[[1,"ms-1"],[3,"icon","fixedWidth"]],template:function(e,n){e&1&&(o(0,"span",0),U(1,"fa-icon",1),r()),e&2&&(a(),p("icon",n.Ikoner.farExternalLink)("fixedWidth",!0))},dependencies:[$e],changeDetection:0})}}return i})();var A0=(()=>{class i extends b{constructor(t,e,n,l){super(),this.i18nPipe=t,this.container=e,this.template=n,this.componentFactoryResolver=l,this.medIkon=!0}ngOnInit(){let t=this.container.createEmbeddedView(this.template);if(this.s\u00E4ttAttributF\u00F6rExternL\u00E4nk(t.rootNodes[0]),this.medIkon){let e=this.componentFactoryResolver.resolveComponentFactory(va);this.container.createComponent(e)}}s\u00E4ttAttributF\u00F6rExternL\u00E4nk(t){if(t.localName!=="a")throw new Error("*ladokExternLank kan bara anv\xE4ndas p\xE5 <a>");t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t.setAttribute("title",this.i18nPipe.transform(this.texter.shared.oppnas_i_nytt_fonster))}static{this.\u0275fac=function(e){return new(e||i)(g(_),g($i),g(Ui),g(Oi))}}static{this.\u0275dir=ct({type:i,selectors:[["","ladokExternLank",""]],inputs:{medIkon:[0,"ladokExternLank","medIkon"]},features:[C]})}}return i})();var M0=(()=>{class i extends b{constructor(){super()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-inaktiverat"]],features:[C],decls:3,vars:3,template:function(e,n){e&1&&(o(0,"h1"),s(1),c(2,"i18n"),r()),e&2&&(a(),u(f(2,1,n.texter.inaktiverat.rubrik)))},dependencies:[nn,_],changeDetection:0})}}return i})();var ha=(()=>{class i{constructor(){this.valmojlighetSubject=new Bt(1),this.aktuelltValSubject=new Bt(1),this.valmojlighet$=this.valmojlighetSubject.asObservable(),this.aktuelltVal$=this.aktuelltValSubject.asObservable()}initieraValm\u00F6jlighet(t){this.valmojlighetSubject.next(t)}aktuelltVal(t){this.aktuelltValSubject.next(t)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=q({token:i,factory:i.\u0275fac})}}return i})();function ks(i,d){if(i&1&&(S(0),o(1,"div",1),s(2),r(),y()),i&2){let t=d.ngIf;a(2),A(" ",t," ")}}var U0=(()=>{class i extends b{constructor(t,e,n,l){super(),this.studievalService=t,this.valmojlighetKortComponentService=e,this.modalService=n,this.datumService=l}ngOnChanges(t){t&&t.valperiod&&(this.valDagar$=F(this.ber\u00E4knaValperiodDagar(t.valperiod.currentValue)))}ber\u00E4knaValperiodDagar(t){if(!t)return null;let e="",n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Slutdatum));return n===0?(e=this.t(this.texter.studieval.stanger_idag),e):(e=this.t(this.texter.studieval.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n)),this.slutdatumLiggerBak\u00E5tITiden(t)?null:(this.datumService.afterOrEqual(this.datumService.idag(),t.Startdatum)?(n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Slutdatum)),e=this.t(this.texter.studieval.stanger)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))):(n=this.datumService.dagarMellan(this.datumService.parseDate(this.datumService.idag()),this.datumService.parseDate(t.Startdatum)),e=this.t(this.texter.studieval.oppnar)+" "+n+" "+this.t(dt(this.texter.shared.dagar,n))),e))}slutdatumLiggerBak\u00E5tITiden(t){return t.Slutdatum&&this.datumService.before(t.Slutdatum,this.datumService.idag())}static{this.\u0275fac=function(e){return new(e||i)(g(_e),g(ha),g(H),g(mt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-information-om-valdagar"]],inputs:{valperiod:"valperiod"},features:[C,xt],decls:2,vars:3,consts:[[4,"ngIf"],[1,"mb-2"]],template:function(e,n){e&1&&(v(0,ks,3,1,"ng-container",0),c(1,"async")),e&2&&p("ngIf",f(1,1,n.valDagar$))},dependencies:[E,M],changeDetection:0})}}return i})();var _s=new Intl.NumberFormat("sv-SE",{maximumFractionDigits:2}),bs=new Intl.NumberFormat("en-GB",{maximumFractionDigits:2}),Cs=new Intl.NumberFormat("sv-SE",{maximumFractionDigits:2,minimumFractionDigits:2}),Ss=new Intl.NumberFormat("en-GB",{maximumFractionDigits:2,minimumFractionDigits:2});function ys(i){if(typeof i=="number")return i;if(typeof i=="string"){let d=Number(i);if(!Number.isNaN(d))return d}}var xa=(()=>{class i{constructor(t){this.i18nService=t}transform(t){let e=ys(t);if(e===null)return;let n=this.i18nService.sprakkod==="sv";return e%1===0?n?_s.format(e)+" kr":bs.format(e)+" SEK":n?Cs.format(e)+" kr":Ss.format(e)+" SEK"}static{this.\u0275fac=function(e){return new(e||i)(g(pe,16))}}static{this.\u0275pipe=G({name:"valutaSek",type:i,pure:!0})}}return i})();var ka=(()=>{class i{constructor(t,e){this.i18nService=t,this.i18n=e,this.texter=B}transform(t,...e){if(t){let n=new Date(t),l=""+n.getFullYear(),x=n.getMonth()<6?this.i18n.transform(this.texter.shared.termin.vt):this.i18n.transform(this.texter.shared.termin.ht);return this.i18nService.sprakkod==="sv"?`${x}${l}`:`${x} ${l}`}}static{this.\u0275fac=function(e){return new(e||i)(g(pe,16),g(_,16))}}static{this.\u0275pipe=G({name:"terminI18n",type:i,pure:!0})}}return i})();var _a=class i{static{this.uniktNummer=Number.MIN_SAFE_INTEGER}constructor(d){this.ngModel=d,this.ngModel.name="ladok-unikt-name-"+i.uniktNummer,i.uniktNummer++}static{this.\u0275fac=function(t){return new(t||i)(g(Qt))}}static{this.\u0275dir=ct({type:i,selectors:[["","ladokUniktName",""]]})}};var N0=(()=>{class i{constructor(){}validate(t){if(!this.ladokLank||!t.value)return null;try{let e=new URL(t.value);return e.host===""&&e.origin==="null"?{format:!0}:null}catch{return{format:!0}}}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275dir=ct({type:i,selectors:[["input","ladokLank",""]],inputs:{ladokLank:"ladokLank"},features:[ft([{provide:Gt,useExisting:i,multi:!0}])]})}}return i})();function Is(i,d){if(i&1&&(o(0,"span"),s(1),c(2,"i18n"),c(3,"i18n"),r()),i&2){let t=m();a(),Vt("",f(2,3,t.texter.shared.max)," ",t.max," ",f(3,5,t.texter.shared.tecken),"")}}function As(i,d){if(i&1&&(o(0,"span"),s(1),c(2,"i18n"),r()),i&2){let t=m();a(),Vt("",t.text.length," / ",t.max," ",f(2,3,"tecken"),"")}}function Es(i,d){if(i&1&&(o(0,"span"),s(1),c(2,"i18n"),r()),i&2){let t=m();a(),Vt("",t.text.length," / ",t.max," ",f(2,3,"tecken"),"")}}var Q0=(()=>{class i extends b{constructor(){super()}ngOnInit(){}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-max-text-langd"]],inputs:{max:"max",text:"text"},features:[C],decls:3,vars:3,consts:[[4,"ngIf"]],template:function(e,n){e&1&&v(0,Is,4,7,"span",0)(1,As,3,5,"span",0)(2,Es,3,5,"span",0),e&2&&(p("ngIf",!n.text||n.text.length===0),a(),p("ngIf",n.text&&n.text.length>0&&n.text.length<=n.max),a(),p("ngIf",n.text&&n.text.length>n.max))},dependencies:[E,_],encapsulation:2})}}return i})();function ba(i){let d=Zi(i);return d.Benamning.sv=i.Benamning.sv.split("/")[1]===void 0?i.Benamning.sv:i.Benamning.sv.split("/")[1],d.Benamning.en=i.Benamning.en.split("/")[1]===void 0?i.Benamning.en:i.Benamning.en.split("/")[1],d.Utbildningskod=i.Utbildningskod.split("/")[1]===void 0?i.Utbildningskod:i.Utbildningskod.split("/")[1],d}function Ts(i,d){if(i&1&&(o(0,"ladok-card-body-extra",8)(1,"dl",9)(2,"dt",10),s(3),c(4,"i18n"),r(),o(5,"dd",11),s(6),r()()()),i&2){let t=m().$implicit,e=m(2);a(3),u(f(4,2,e.texter.tillgodoraknandevisning.mal.beskrivning)),a(3),u(t.Beskrivning)}}function Ds(i,d){if(i&1&&(S(0),o(1,"ladok-card",2)(2,"ladok-card-body",3)(3,"div",4),s(4),r(),o(5,"span",5),s(6),r(),U(7,"span",6),r(),v(8,Ts,7,4,"ladok-card-body-extra",7),r(),y()),i&2){let t=d.$implicit;a(),p("interaktivtKort",t.HarExtrauppgifter),a(3),A(" ",t.Benamning," "),a(2),A(" ",t.Underrubrik," "),a(2),p("ngIf",t.HarExtrauppgifter)}}function Ms(i,d){if(i&1&&(S(0),o(1,"h3"),s(2),c(3,"i18n"),r(),v(4,Ds,9,4,"ng-container",1),y()),i&2){let t=m();a(2),u(f(3,2,t.texter.tillgodoraknandevisning.mal.rubrik)),a(2),p("ngForOf",t.malinformationLista)}}var ou=(()=>{class i extends b{set mal(t){this.malinformationLista=this.skapaMalInformationsLista(t)}constructor(t,e){super(),this.omfattningEnhetPipe=t,this.benamningOchKodPipe=e}skapaMalInformationsLista(t){return t.map(e=>{switch(e.Typ){case"HEL_KURS":return this.uppdateraVyInformationFranHelkursmal(e);case"DEL_AV_KURS":return this.uppdateraVyInformationFranDelAvKursmal(e);case"FRITEXT":return this.uppdateraVyInformationFranFritextmal(e)}})}uppdateraVyInformationFranHelkursmal(t){let e={Benamning:this.benamningOchKodPipe.transform(t),Underrubrik:this.omfattningEnhetPipe.transform({Omfattningsvarde:t.TillgodoOmfattning,Enhetskod:t.Enhetskod}),HarExtrauppgifter:!0};return e.HarExtrauppgifter=this.harExtrauppgifter(e),e}uppdateraVyInformationFranDelAvKursmal(t){let e=ba(t),n={Benamning:this.benamningOchKodPipe.transform(e),Underrubrik:this.omfattningEnhetPipe.transform({Omfattningsvarde:e.TillgodoOmfattning,Enhetskod:e.Enhetskod}),HarExtrauppgifter:!0};return n.HarExtrauppgifter=this.harExtrauppgifter(n),n}uppdateraVyInformationFranFritextmal(t){let e={Benamning:this.benamningOchKodPipe.transform(t),Underrubrik:this.omfattningEnhetPipe.transform({Omfattningsvarde:t.Omfattning,Enhetskod:t.Enhetskod}),Beskrivning:this.t(t.Beskrivning),HarExtrauppgifter:!0};return e.HarExtrauppgifter=this.harExtrauppgifter(e),e}harExtrauppgifter(t){return!!t.Beskrivning}static{this.\u0275fac=function(e){return new(e||i)(g(Ct),g(pt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-tillgodoraknande-visa-mal"]],inputs:{mal:"mal"},features:[C],decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"interaktivtKort"],[1,"ladok-card-body-content"],[1,"ladok-card-body-rubrik"],[1,"ladok-card-body-sub-rubrik"],[1,"ladok-card-body-sub-rubrik-badge"],["class","ladok-card-body-content-extra",4,"ngIf"],[1,"ladok-card-body-content-extra"],[1,"row"],[1,"col-lg-4"],[1,"col-lg-8"]],template:function(e,n){e&1&&v(0,Ms,5,4,"ng-container",0),e&2&&p("ngIf",n.malinformationLista)},dependencies:[W,E,Ot,$t,ue,_],changeDetection:0})}}return i})();var Ca=(()=>{class i extends b{constructor(){super(),this.borttagen=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-tillgodoraknande-borttagen-badge"]],inputs:{borttagen:"borttagen"},features:[C],decls:3,vars:3,consts:[[1,"badge","bg-danger"]],template:function(e,n){e&1&&(o(0,"span",0),s(1),c(2,"i18n"),r()),e&2&&(a(),A(" ",f(2,1,n.texter.shared.tillgodoraknanden_badgetext_borttagen),`
`))},dependencies:[_],changeDetection:0})}}return i})();function Fs(i,d){i&1&&U(0,"ladok-tillgodoraknande-borttagen-badge")}function js(i,d){if(i&1&&(o(0,"dt",6),s(1),c(2,"i18n"),r(),o(3,"dd",7),s(4),r()),i&2){let t=m();a(),u(f(2,2,t.texter.tillgodoraknandevisning.borttagningsdatum)),a(3),A(" ",t.tillgodoraknande.Borttagningsbeslut.Beslutsdatum," ")}}function Ps(i,d){if(i&1&&(o(0,"dt",6),s(1),c(2,"i18n"),r(),o(3,"dd",7),s(4),r()),i&2){let t=m();a(),u(f(2,2,t.texter.tillgodoraknandevisning.beslutsdatum)),a(3),A(" ",t.tillgodoraknande.Attesteringsbeslut.Beslutsdatum," ")}}function ws(i,d){if(i&1&&s(0),i&2){let t=m();A(" ",t.tillgodoraknande.Borttagningsbeslut.Beslutsfattare," ")}}function Us(i,d){if(i&1&&s(0),i&2){let t=m();A(" ",t.tillgodoraknande.Attesteringsbeslut.Beslutsfattare," ")}}function Os(i,d){if(i&1&&(o(0,"dt",6),s(1),c(2,"i18n"),r(),o(3,"dd",7),s(4),r()),i&2){let t=m();a(),u(f(2,2,t.texter.tillgodoraknandevisning.anteckning)),a(3),A(" ",t.tillgodoraknande.Borttagningsbeslut.Anteckning," ")}}var mu=(()=>{class i extends b{static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=ji(i)))(n||i)}})()}static{this.\u0275cmp=h({type:i,selectors:[["ladok-tillgodoraknande-visa-beslut"]],inputs:{tillgodoraknande:"tillgodoraknande"},features:[C],decls:22,vars:16,consts:[[1,"d-flex","gap-3"],[3,"ngClass"],[4,"ngIf"],[3,"interaktivtKort"],[1,"ladok-card-body-content"],[1,"row"],[1,"col-lg-4"],[1,"col-lg-8"]],template:function(e,n){e&1&&(o(0,"div",0)(1,"h3",1),s(2),c(3,"i18n"),r(),v(4,Fs,1,0,"ladok-tillgodoraknande-borttagen-badge",2),r(),o(5,"ladok-card",3)(6,"ladok-card-body",4)(7,"dl",5),v(8,js,5,4)(9,Ps,5,4),o(10,"dt",6),s(11),c(12,"i18n"),r(),o(13,"dd",7),v(14,ws,1,1)(15,Us,1,1),r(),v(16,Os,5,4),o(17,"dt",6),s(18),c(19,"i18n"),r(),o(20,"dd",7),s(21),r()()()()),e&2&&(a(),p("ngClass",n.tillgodoraknande.Borttagningsbeslut?"text-decoration-line-through":""),a(),u(f(3,10,n.texter.tillgodoraknandevisning.beslutsinformationsrubrik)),a(2),p("ngIf",!!n.tillgodoraknande.Borttagningsbeslut),a(),p("interaktivtKort",!1),a(3),X(n.tillgodoraknande.Borttagningsbeslut?8:9),a(3),u(f(12,12,n.texter.tillgodoraknandevisning.beslutsfattare)),a(3),X(n.tillgodoraknande.Borttagningsbeslut?14:15),a(2),X(n.tillgodoraknande.Borttagningsbeslut?16:-1),a(2),u(f(19,14,n.texter.tillgodoraknandevisning.arendenummer)),a(3),A(" ",n.tillgodoraknande.Arendenummer," "))},dependencies:[ut,E,Ot,$t,Ca,_],changeDetection:0})}}return i})();function $s(i,d){if(i&1&&(S(0),o(1,"dt",9),s(2),c(3,"i18n"),r(),o(4,"dd",10),s(5),r(),y()),i&2){let t=m(2).$implicit,e=m();a(2),u(f(3,2,e.texter.tillgodoraknandevisning.grund.kod)),a(3),u(t.Kod)}}function Ks(i,d){if(i&1&&(S(0),o(1,"dt",9),s(2),c(3,"i18n"),r(),o(4,"dd",10),s(5),r(),y()),i&2){let t=m(2).$implicit,e=m();a(2),u(f(3,2,e.texter.tillgodoraknandevisning.grund.betyg)),a(3),u(t.Betyg)}}function Rs(i,d){if(i&1&&(S(0),o(1,"dt",9),s(2),c(3,"i18n"),r(),o(4,"dd",10),s(5),r(),y()),i&2){let t=m(2).$implicit,e=m();a(2),u(f(3,2,e.texter.tillgodoraknandevisning.grund.examinationsdatum)),a(3),u(t.Examinationsdatum)}}function Ls(i,d){if(i&1&&(S(0),U(1,"br"),o(2,"i"),s(3),r(),y()),i&2){let t=m(3).$implicit;a(3),u(t.LarosateAlternativBenamning)}}function Vs(i,d){if(i&1&&(S(0),o(1,"dt",9),s(2),c(3,"i18n"),r(),o(4,"dd",10),s(5),v(6,Ls,4,1,"ng-container",8),r(),y()),i&2){let t=m(2).$implicit,e=m();a(2),u(f(3,3,e.texter.tillgodoraknandevisning.grund.ursprung)),a(3),A("",t.Larosate," "),a(),p("ngIf",t.LarosateAlternativBenamning)}}function Ns(i,d){if(i&1&&(o(0,"ladok-card-body-extra",6)(1,"dl",7),v(2,$s,6,4,"ng-container",8)(3,Ks,6,4,"ng-container",8)(4,Rs,6,4,"ng-container",8)(5,Vs,7,5,"ng-container",8),r()()),i&2){let t=m().$implicit;a(2),p("ngIf",t.Kod),a(),p("ngIf",t.Betyg),a(),p("ngIf",t.Examinationsdatum),a(),p("ngIf",t.Larosate)}}function Hs(i,d){if(i&1&&(o(0,"ladok-card",1)(1,"ladok-card-body",2)(2,"div",3),s(3),r(),o(4,"span",4),s(5),r()(),v(6,Ns,6,4,"ladok-card-body-extra",5),r()),i&2){let t=d.$implicit;p("interaktivtKort",t.HarExtrauppgifter),a(3),A(" ",t.Rubrik," "),a(2),A(" ",t.Underrubrik," "),a(),p("ngIf",t.HarExtrauppgifter)}}var fu=(()=>{class i extends b{set grunder(t){this.grundinformationLista=this.skapaGrundLista(t)}constructor(t,e){super(),this.omfattningEnhetPipe=t,this.benamningOchKodPipe=e}skapaGrundLista(t){let e=[];return t.forEach(n=>{e.push(this.skapaGrundInformation(n))}),e}skapaGrundInformation(t){if(t.Typ==="ANNAN_MERIT")return this.skapaAnnanMeritGrund(t);if(t.Typ==="ANNAT_RESULTAT")return this.skapaAnnatResultatGrund(t);if(t.Typ==="INTERN")return this.skapaResultatGrund(t)}skapaAnnanMeritGrund(t){let e={Rubrik:t.AnnanMerit.Benamning,Underrubrik:t.AnnanMerit.Omfattning,Kod:t.AnnanMerit.Utbildningskod,Betyg:t.AnnanMerit.Resultat,Examinationsdatum:t.AnnanMerit.Examinationsdatum,Larosate:this.hanteraUrsprungForAnnanMerit(t.AnnanMerit),LarosateAlternativBenamning:this.hanteraUrsprungAlternativBenamningForAnnanMerit(t.AnnanMerit),HarExtrauppgifter:!1};return e.HarExtrauppgifter=this.harExtrauppgifter(e),e}skapaAnnatResultatGrund(t){let e={Rubrik:t.AnnatResultat.Benamning,Underrubrik:this.omfattningEnhetPipe.transform({Enhetskod:t.AnnatResultat.Enhet?.Kod,Omfattningsvarde:t.AnnatResultat.Omfattningsvarde}),Kod:t.AnnatResultat.Utbildningskod,Betyg:t.AnnatResultat.Betygsgradkod,Examinationsdatum:t.AnnatResultat.Examinationsdatum,Larosate:this.hanteraUrsprungForAnnatResultat(t.AnnatResultat),HarExtrauppgifter:!0};return e.HarExtrauppgifter=this.harExtrauppgifter(e),e}skapaResultatGrund(t){let e={Rubrik:this.skapaRubrikForResultatgrund(t),Underrubrik:this.skapaUnderrubrikForResultatgrund(t),Kod:this.skapaKodForResultatgrund(t),Betyg:t.Betygskod,Examinationsdatum:t.Examinationsdatum,Larosate:this.t(t.Larosate.Benamning),HarExtrauppgifter:!0};return e.HarExtrauppgifter=this.harExtrauppgifter(e),e}hanteraUrsprungForAnnanMerit(t){return t.Ursprung}hanteraUrsprungForAnnatResultat(t){}harExtrauppgifter(t){return!!(t.Kod||t.Examinationsdatum||t.Betyg||t.Larosate)}skapaRubrikForResultatgrund(t){let e=this.benamningOchKodPipe.transform(t);return t.IngaendeGrunder&&(e+=" / "+this.benamningOchKodPipe.transform(t.IngaendeGrunder[0])),e}skapaUnderrubrikForResultatgrund(t){let e=t.IngaendeGrunder?t.IngaendeGrunder[0]:t;return this.omfattningEnhetPipe.transform({Enhetskod:e.Enhetskod,Omfattningsvarde:e.Omfattning})}skapaKodForResultatgrund(t){return(t.IngaendeGrunder?t.IngaendeGrunder[0]:t).Utbildningskod}hanteraUrsprungAlternativBenamningForAnnanMerit(t){return t.UrsprungAlternativBenamning}static{this.\u0275fac=function(e){return new(e||i)(g(Ct),g(pt))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-tillgodoraknande-visa-grunder"]],inputs:{grunder:"grunder"},features:[C],decls:4,vars:4,consts:[[3,"interaktivtKort",4,"ngFor","ngForOf"],[3,"interaktivtKort"],[1,"ladok-card-body-content"],[1,"ladok-card-body-rubrik"],[1,"ladok-card-body-sub-rubrik"],["class","ladok-card-body-content-extra",4,"ngIf"],[1,"ladok-card-body-content-extra"],[1,"row"],[4,"ngIf"],[1,"col-lg-4"],[1,"col-lg-8"]],template:function(e,n){e&1&&(o(0,"h3"),s(1),c(2,"i18n"),r(),v(3,Hs,7,4,"ladok-card",0)),e&2&&(a(),u(f(2,2,n.texter.tillgodoraknandevisning.grund.rubrik)),a(2),p("ngForOf",n.grundinformationLista))},dependencies:[W,E,Ot,$t,ue,_],changeDetection:0})}}return i})();function Gs(i,d){if(i&1&&(o(0,"ladok-card",0)(1,"ladok-card-body",1)(2,"span",2),s(3),c(4,"i18n"),r(),o(5,"div",3),s(6),c(7,"i18n"),r()()()),i&2){let t=m();p("interaktivtKort",!1),a(3),u(f(4,3,t.texter.examinationstillfallen.anpassning.ansokan.overklagandetext_rubrik)),a(3),u(f(7,5,t.overklagandetextSignal()))}}var ku=(()=>{class i{constructor(t){this.lokalTextService=t,this.overklagandetextSignal=St(this.lokalTextService.aviseringstexter$.pipe(k(e=>this.h\u00E4mta\u00D6verklagandetext(e)),Ft(e=>!!e),Y(e=>(console.error("catchError",e),F(null))))),this.texter=B}h\u00E4mta\u00D6verklagandetext(t){console.log("Texter ",t);let e=t.filter(n=>n.Nyckel==="aviseringstext.pedagogisktstod.overklagandetext")[0];return{sv:e.SvenskText,en:e.EngelskText}}static{this.\u0275fac=function(e){return new(e||i)(g(Ve))}}static{this.\u0275cmp=h({type:i,selectors:[["ladok-overklagandeinformation"]],decls:1,vars:1,consts:[[3,"interaktivtKort"],[1,"ladok-card-body-content"],[1,"ladok-card-body-rubrik"],[1,"white-space-pre-wrap"]],template:function(e,n){e&1&&v(0,Gs,8,7,"ladok-card",0),e&2&&X(n.overklagandetextSignal()?0:-1)},dependencies:[Ot,$t,_],changeDetection:0})}}return i})();var fx=(()=>{class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=oe({type:i})}static{this.\u0275inj=re({providers:[Wi,vn,qt,xe,ma,_,qe,kn,_n,Ct,Ge,pt,hn,pa,fa,ua,be,ga,we,xa,ka,{provide:rn,useValue:void 0},ge,Wt,Je],imports:[Ae,pi,ui,di,mi,si,xn,fn,fi,gi,ta,Ae,si,pi,dn,ui,fi,di,mi,gi]})}}return i})();export{bt as a,Ot as b,$t as c,ue as d,yn as e,qe as f,H as g,ki as h,tt as i,Vp as j,Kt as k,zs as l,i0 as m,qt as n,xe as o,Qp as p,Vo as q,ke as r,Jt as s,lt as t,Sc as u,Ye as v,Vc as w,_f as x,_e as y,oa as z,uf as A,o0 as B,ha as C,U0 as D,M0 as E,_0 as F,ba as G,Ca as H,mu as I,ou as J,fu as K,wf as L,be as M,ua as N,fa as O,bn as P,Cn as Q,pa as R,hd as S,Gc as T,If as U,Rt as V,sa as W,da as X,Jf as Y,s0 as Z,ma as _,Sn as $,gi as aa,v0 as ba,ga as ca,va as da,A0 as ea,xa as fa,ka as ga,_a as ha,N0 as ia,Q0 as ja,ku as ka,fx as la};