1import{a as Et}from"./chunk-3MWVP776.js";import{a as di,b as Ei,c as fi,d as ui,e as mi,f as Ci}from"./chunk-7K2PJKBE.js";import{a as li,b as ai,c as _i}from"./chunk-TMLFW6PW.js";import{d as dt}from"./chunk-SZC6O2MA.js";import{a as oi,b as ci}from"./chunk-7TQIT453.js";import{a as pt}from"./chunk-HY7LVQAW.js";import{b as ni}from"./chunk-6UVM6BNO.js";import{a as oe}from"./chunk-QEVZWDWZ.js";import{a as Se}from"./chunk-AF5VYIIQ.js";import{a as We}from"./chunk-V26SHIYM.js";import{e as ct}from"./chunk-64Y6MX6B.js";import{a as ti}from"./chunk-7VJ247ZP.js";import"./chunk-IKII64A5.js";import{a as ri}from"./chunk-E7RQV7ML.js";import{a as ne}from"./chunk-XHI7H6ZY.js";import{a as ii}from"./chunk-RACEC6N7.js";import"./chunk-2CS5YJQV.js";import{b as si}from"./chunk-RBIGXTDE.js";import{a as pi}from"./chunk-J5USZYVJ.js";import{a as ei}from"./chunk-3U4K2SS7.js";import{a as st}from"./chunk-HNKH2A6D.js";import{a as Ce}from"./chunk-AZECEMRI.js";import{b}from"./chunk-KWKBYLGL.js";import"./chunk-R5C5HK2J.js";import{a as re}from"./chunk-2H2O3LPK.js";import{a as Qt,b as Jt,d as De,g as Te,h as ge}from"./chunk-HLLUZPF3.js";import{a as Oe}from"./chunk-56EQVOQA.js";import{A as Z,b as Kt,c as Pe,e as L,g as ue,h as B,l as te,m as jt,p as K,r as me,s as Zt,t as Ht,u as Yt,x as we,y as j,z as ke}from"./chunk-N5SR3RF2.js";import{j as ie}from"./chunk-XTG7J2JG.js";import{a as Re}from"./chunk-6TAZAZFQ.js";import{a as ft}from"./chunk-LYZXHOEV.js";import{a as lt}from"./chunk-2236OO75.js";import{a as ot}from"./chunk-SPZV377N.js";import{d as nt,e as Gt}from"./chunk-VG747TC2.js";import{b as qt,h as Bt}from"./chunk-IMGON475.js";import{f as Ut}from"./chunk-SW27BSM2.js";import"./chunk-UCLMWNX4.js";import{a as F}from"./chunk-UMIH5LS3.js";import"./chunk-LJSYQ6VW.js";import{a as be,b as fe}from"./chunk-FUHSAPHN.js";import{a as xe}from"./chunk-CUCZUM3O.js";import{a as _t}from"./chunk-KQI2HKFV.js";import{a as $e}from"./chunk-IJ3ZBT6S.js";import{k as Wt,l as de,m as q,n as Vt,o as zt,r as ye,u as Xt,y as Ee}from"./chunk-UPDZMESH.js";import{a as at}from"./chunk-Y5PPCIEE.js";import{$b as m,Ac as it,Bc as h,Ea as vt,Ec as Ct,Fa as D,Fc as It,Gb as Mt,Gc as Pt,Hc as U,Ic as W,Jc as wt,Kb as d,Kc as kt,Lb as yt,Lc as rt,Mb as xt,N as Le,Nb as bt,Pa as P,Pc as x,Q as Y,Qa as O,Qb as s,Qc as k,Sc as $t,Tb as je,Uc as Ze,Vb as y,Wa as G,X as Q,Ya as J,Zb as a,_b as o,a as Qe,ac as ce,b as Je,bc as pe,dc as v,id as Dt,ka as he,kc as f,lc as ve,ma as Ie,mc as Me,n as Ne,o as et,ob as tt,oc as T,pc as c,sa as ht,sb as _,tb as C,v as Fe,yc as ee,z as se,zc as A}from"./chunk-REFE22HE.js";var Ii=(()=>{let l=class l{constructor(){this.step$=new et(1);}set step(i){this.step$.next(i);}};l.ɵfac=function(n){return new(n||l)();},l.ɵcmp=D({type:l,selectors:[["br-progress-circle"]],inputs:{step:"step"},standalone:!0,features:[W],decls:13,vars:12,consts:[[1,"progress-circle"],[1,"progress","full","progress-circle-circle"],[1,"progress-left"],[1,"progress-right"],[1,"progress","primary","progress-circle-circle"]],template:function(n,r){n&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),m(3,"span"),o(),a(4,"span",3),m(5,"span"),o()(),a(6,"div",4)(7,"span",2),m(8,"span"),x(9,"async"),o(),a(10,"span",3),m(11,"span"),x(12,"async"),o()()()),n&2&&(_(3),je("progress-bar full"),_(2),je("progress-bar full"),_(3),je("progress-bar step-"+k(9,8,r.step$)),_(3),je("progress-bar step-"+k(12,10,r.step$)));},dependencies:[ye],styles:['.progress-circle[_ngcontent-%COMP%]{position:relative}.progress-circle-circle[_ngcontent-%COMP%]{position:absolute!important;top:0;left:0}.progress[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem!important;line-height:1.25rem;background:none;box-shadow:none;position:relative}.progress[_ngcontent-%COMP%]:after{content:"";width:100%;height:100%;border-radius:50%;border:.75rem solid #fff;position:absolute;top:0;left:0}.progress[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{width:50%;height:100%;overflow:hidden;position:absolute;top:0;z-index:1}.progress[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%]{left:0}.progress[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{width:100%;height:100%;background:none;border-width:2px;border-style:solid;position:absolute;top:0}.progress[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar[_ng
1content-%COMP%]{left:100%;border-top-right-radius:80px;border-bottom-right-radius:80px;border-left:0;-webkit-transform-origin:center left;transform-origin:center left}.progress[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%]{right:0}.progress[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{left:-100%;border-top-left-radius:80px;border-bottom-left-radius:80px;border-right:0;-webkit-transform-origin:center right;transform-origin:center right;animation:_ngcontent-%COMP%_loading-1 1.8s linear forwards}.progress.primary[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{border-color:#97a43e}.progress.full[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{border-color:#e0e4c5}.progress.full[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.full[_ngcontent-%COMP%], .progress.full[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.full[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-100 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-1[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-0 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-1[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-1 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-2[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-0 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-2[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-2 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-3[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-0 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-3[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-3 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-4[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-4 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-4[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-100 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-5[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-5 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-5[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-100 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-6[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-6 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-6[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-100 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-left[_ngcontent-%COMP%] .progress-bar.step-7[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-7 1.5s linear forwards 1.8s}.progress.primary[_ngcontent-%COMP%] .progress-right[_ngcontent-%COMP%] .progress-bar.step-7[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_loading-100 1.5s linear forwards 1.8s}@keyframes _ngcontent-%COMP%_loading-0{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(0deg);transform:rotate(0)}}@keyframes _ngcontent-%COMP%_loading-100{0%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes _ngcontent-%COMP%_loading-1{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(51deg);transform:rotate(51deg)}}@keyframes _ngcontent-%COMP%_loading-2{0%{-webkit-transform:rotate(51deg);transform:rotate(51deg)}to{-webkit-transform:rotate(103deg);transform:rotate(103deg)}}@keyframes _ngcontent-%COMP%_loading-3{0%{-webkit-transform:rotate(103deg);transform:rotate(103deg)}to{-webkit-transform:rotate(154deg);transform:rotate(154deg)}}@keyframes _ngcontent-%COMP%_loading-4{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(26deg);transform:rotate(26deg)}}@keyframes _ngcontent-%COMP%_loading-5{0%{-webkit-transform:rotate(26deg);transform:rotate(26deg)}to{-webkit-transform:rotate(77deg);transform:rotate(77deg)}}@keyframes _ngcontent-%COMP%_loading-6{0%{-webkit-transform:rotate(77deg);transform:rotate(77deg)}to{-webkit-transform:rotate(129deg);transform:rotate(129deg)}}@keyframes _ngcontent-%COMP%_loading-7{0%{-webkit-transform:rotate(129deg);transform:rotate(129deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}']});let e=l;return e;})();var Pi=[{stepIndex:1,isComplete:!1,label:"Konto erstellen",description:"Geben Sie Informationen ein",isValid:!1},{stepIndex:2,isComplete:!1,label:"Konto erstellen",description:"Geben Sie Informationen ein",isValid:!1},{stepIndex:3,isComplete:!1,label:"Ihre Kompetenzen und Branchen",description:"W\xE4hlen Sie Kompetenzen und Branchen aus, in denen Sie arbeiten.",isValid:!1},{stepIndex:4,isComplete:!1,label:"Beschreiben Sie Ihre Erfahrung",description:"Eine gut geschriebene Erfahrung erh\xF6ht die Chance, ein Projekt zu erhalten.",isValid:!1},{stepIndex:5,isComplete:!1,label:"Ausbildung und Zertifizierungen hinzuf\xFCgen",description:"Teilen Sie uns mit, wo Sie studiert haben, und f\xFCgen Sie Bescheinigungen bei, die Ihre Qualifikationen best\xE4tigen",isValid:!1},{stepIndex:6,isComplete:!1,label:"Berufserfahrung hinzuf\xFCgen",description:"Bitte mindestens 3 Erfahrungen hinzuf\xFCgen.",isValid:!1},{stepIndex:7,isComplete:!1,label:"Profil abgeschlossen",description:"Ihr Profil wird \xFCberpr\xFCft",isValid:!1}],X=(()=>
1{let l=class l extends Et{constructor(){super(),this.steps$=new Ne(Pi),this.currentStep$=new Ne(Pi[0]),this.currentStep$.next(this.steps$.value[0]);}moveToNextStep(){let i=this.currentStep$.value;i.isComplete=!0,this.currentStep$.next(i);let n=this.currentStep$.value.stepIndex;n<this.steps$.value.length&&this.currentStep$.next(this.steps$.value[n]);}moveToPrevStep(){let i=this.currentStep$.value.stepIndex;i>1&&this.currentStep$.next(this.steps$.value[i-2]);}getCurrentStepIndex(){return this.currentStep$.value.stepIndex;}isFirstStep(){return this.currentStep$.value.stepIndex===1;}setCurrentStepIsValid(i){let n=this.currentStep$.value;n.isValid=i,this.currentStep$.next(n);}};l.ɵfac=function(n){return new(n||l)();},l.ɵprov=ht({token:l,factory:l.ɵfac,providedIn:"root"});let e=l;return e;})();var Oi=(()=>{let l=class l{set currentStepIndex(i){this.currentStepIndex$.next(i);}constructor(i){this.stepsService=i,this.currentStepIndex$=new et(1);}ngOnInit(){this.steps$=this.stepsService.getSteps(),this.currentStep$=this.stepsService.getCurrentStep();}onStepClick(i){this.stepsService.setCurrentStep(i);}getCurrentStep(){return this.currentStep$;}};l.ɵfac=function(n){return new(n||l)(C(X));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-steps"]],inputs:{currentStepIndex:"currentStepIndex"},standalone:!0,features:[W],decls:13,vars:12,consts:[[1,"form-steps-container"],[1,"d-flex","gap-4"],[3,"step"],[1,"paragraph-base","paragraph-2","text-color-grayscale-2"],[1,"heading-base","h4"]],template:function(n,r){if(n&1&&(a(0,"div",0)(1,"div",1),m(2,"br-progress-circle",2),x(3,"async"),a(4,"div",3),A(5),x(6,"async"),o()(),a(7,"h4",4),A(8),x(9,"async"),o(),a(10,"div",3),A(11),x(12,"async"),o()()),n&2){let p,E,u;_(2),s("step",k(3,4,r.currentStepIndex$)),_(3),h(" ",(p=k(6,6,r.currentStep$))==null?null:p.stepIndex," / 7 "),_(3),it((E=k(9,8,r.currentStep$))==null?null:E.label),_(3),h(" ",(u=k(12,10,r.currentStep$))==null?null:u.description," ");}},dependencies:[Ee,ye,Ii],styles:[".form-steps-container[_ngcontent-%COMP%]{padding-bottom:1.5rem}@media (max-width: 767.98px){.form-steps-container[_ngcontent-%COMP%]{flex-wrap:wrap;gap:1rem}}"]});let e=l;return e;})();var Ve=class{static minLengthWithTrim(l){return t=>t.value&&t.value.trim().length<l?{minlength:!0}:null;}};var Mi=()=>["png","jpeg","webp"];function yi(e,l){e&1&&m(0,"img",9);}function xi(e,l){if(e&1&&m(0,"img",23),e&2){let t=c();s("src",t.profilePictureUrl,tt);}}function bi(e,l){e&1&&(a(0,"div"),f(1,3),o());}function wi(e,l){if(e&1&&(a(0,"div",24),d(1,bi,2,0,"div",25),o()),e&2){let t,i=c();_(),s("ngIf",(t=i.headlineForm.get("firstname"))==null||t.errors==null?null:t.errors.required);}}function ki(e,l){e&1&&(a(0,"div"),f(1,4),o());}function $i(e,l){if(e&1&&(a(0,"div",24),d(1,ki,2,0,"div",25),o()),e&2){let t,i=c();_(),s("ngIf",(t=i.headlineForm.get("lastname"))==null||t.errors==null?null:t.errors.required);}}function Di(e,l){e&1&&(a(0,"div"),f(1,5),o());}function Wi(e,l){e&1&&(a(0,"div"),f(1,6),o());}function Vi(e,l){if(e&1&&(a(0,"div",24),d(1,Di,2,0,"div",25)(2,Wi,2,0,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.headlineForm.get("title"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.headlineForm.get("title"))==null?null:i.errors.minlength);}}function zi(e,l){if(e&1){let t=v();a(0,"br-button",26),T("clickAction",function(){P(t);let n=c();return O(n.uploadCV());}),o();}if(e&2){let t=c();s("size",t.EButtonSize.BUTTON_SIZE_XS);}}var Ri=(()=>{let l=class l{set profile(i){this._profile=i,this?.headlineForm?.patchValue({id:i?.id,firstname:i?.firstname,lastname:i?.lastname,title:i?.profileTitle,picture:i?.picture,pictureUrl:i?.pictureUrl,cv:i?.uploadedCv}),this.profilePictureUrl=i?.pictureUrl?i?.pictureUrl:"",this.uploadedCv=i?.uploadedCv;}constructor(i,n,r,p,E,u,I){this.formBuilder=i,this.stepsService=n,this.destroyRef=r,this.modalService=p,this.confirmDialogService=E,this.profileService=u,this.toastr=I,this.subformInitialized=new J(),this.profilePictureUrl="",this.EButtonSize=be;}ngOnInit(){this.startingForm&&this.startingForm.value?(this.headlineForm=this.startingForm,this.uploadedCv=this.headlineForm.get("cv")?.value):this.headlineForm=this.formBuilder.group({id:"",firstname:["",L.required],lastname:["",L.required],title:["",[L.required,Ve.minLengthWithTrim(10)]],picture:["",L.required],pictureUrl:["",L.required],cv:null}),this.profilePictureUrl=this.headlineForm.get("pictureUrl")?.value,setTimeout(()=>{this.subformInitialized.emit(this.headlineForm);},0),this.stepsService.setCurrentStepIsValid(this.headlineForm.valid),this.headlineForm.valueChanges.pipe(F(this.destroyRef)).subscribe(()=>{this._profile.profileTitle=this.headlineForm.get("title")?.value,this._profile.firstname=this.headlineForm.get("firstname")?.value,this._profile.lastname=this.headlineForm.get("lastname")?.value,this.stepsService.setCurrentStepIsValid(this.headlineForm.valid);});}get picture(){return this.headlineForm.get("picture");}get firstname(){return this.headlineForm.get("firstname");}get lastname(){return this.headlineForm.get("lastname");}get title(){return this.headlineForm.get("title");}handlePictureUploaded(i){this.headlineForm.get("picture")?.setValue(i.file),this.headlineForm.get("pictureUrl")?.setValue(i.fileUrl),this.profilePictureUrl=i.fileUrl,this._profile.pictureUrl=i.fileUrl;}uploadCV(){this.uploadCv=this.modalService.open(ci,{scrollable:!0}),this.uploadCv.componentInstance.profileId=this?.headlineForm?.get("id")?.value,this.uploadCv.result.then(i=>{i!==void 0&&(this.headlineForm.patchValue({cv:i}),this.uploadedCv=i);});}confirmDeleteCV(){this.confirmDialogService.confirm("L\xF6schen best\xE4tigen?","Sind Sie sicher, dass Sie CV l\xF6schen m\xF6chten?",()=>this.deleteProfileCV());}deleteProfileCV(){this.profileService.deleteProfileCv().pipe(F(this.destroyRef)).subscribe(i=>{i.success&&(this.toastr.success("CV wurde erfolgreich gel\xF6scht"),this.uploadedCv=void 0,this.headlineForm.patchValue({cv:null}));});}};l.ɵfac=function(n){return new(n||l)(C(j),C(X),C(G),C(De),C(Se),C(b),C(ie));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-headline"]],inputs:{profile:"profile",step:"step",startingForm:"startingForm"},outputs:{subformInitialized:"subformInitialized"},standalone:!0,features:[U([ti,b]),W],decls:29,vars:17,consts:()=>{let i;i="Profilbild";let n;n="Hinzuf\xFCgen";let r;r="Vorname";let p;
1p="Nachname";let E;E="Profiltitel";let u;u="Profilbild";let I;I="Vorname ist erforderlich";let S;S="Nachname ist erforderlich";let g;g="\xDCberschrift ist Pflicht";let R;return R="Die Mindestl\xE4nge betr\xE4gt 10 Zeichen",[r,p,E,I,S,g,R,[1,"d-flex","flex-column",3,"formGroup"],["for","picture",1,"form-label","label",3,"control"],["src","../../../../../../assets/images/no-photo.png","alt",i,1,"profile-picture"],[3,"picture","profileId","requiredFileTypes","maxFileSizeInMB"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","gap-3"],["for","firstname",1,"form-label","label",3,"control"],["id","firstname","type","text","aria-label","First Name","formControlName","firstname","name","firstname",1,"field-text"],["class","alert alert-danger label",4,"ngIf"],["for","lastname",1,"form-label","label",3,"control"],["id","lastname","type","text","aria-label","Last Name","formControlName","lastname","name","lastname",1,"field-text"],["for","title",1,"form-label","label",3,"control"],["id","title","type","text","aria-label","Headline","formControlName","title","name","title","maxlength","100",1,"field-text"],[1,"label"],["text",n,"class","w-fit",3,"size","clickAction",4,"ngIf"],[3,"editCV","deleteCV","editMode","deleteMode","cv"],["alt",u,1,"profile-picture",3,"src"],[1,"alert","alert-danger","label"],[4,"ngIf"],["text",n,1,"w-fit",3,"clickAction","size"]];},template:function(n,r){if(n&1&&(a(0,"form",7)(1,"div")(2,"br-label",8),A(3," Profilbild "),o(),d(4,yi,1,0,"img",9)(5,xi,1,1),a(6,"app-upload-profile-picture",10),T("picture",function(E){return r.handlePictureUploaded(E);}),o()(),a(7,"div",11)(8,"div",12)(9,"div")(10,"br-label",13),f(11,0),o(),m(12,"br-input",14),d(13,wi,2,1,"div",15),o(),a(14,"div")(15,"br-label",16),f(16,1),o(),m(17,"br-input",17),d(18,$i,2,1,"div",15),o()(),a(19,"div")(20,"br-label",18),f(21,2),o(),m(22,"br-input",19),d(23,Vi,3,2,"div",15),o()(),a(24,"div")(25,"span",20),A(26,"CV hochladen"),o(),d(27,zi,1,1,"br-button",21),a(28,"app-cv-item",22),T("editCV",function(){return r.uploadCV();})("deleteCV",function(){return r.confirmDeleteCV();}),o()()()),n&2){let p,E,u,I;s("formGroup",r.headlineForm),_(2),s("control",r.picture),_(2),y(4,r.profilePictureUrl?5:4),_(2),s("profileId",(p=r.headlineForm.get("id"))==null?null:p.value)("requiredFileTypes",wt(16,Mi))("maxFileSizeInMB",6),_(4),s("control",r.firstname),_(3),s("ngIf",((E=r.headlineForm.get("firstname"))==null?null:E.invalid)&&(((E=r.headlineForm.get("firstname"))==null?null:E.dirty)||((E=r.headlineForm.get("firstname"))==null?null:E.touched))),_(2),s("control",r.lastname),_(3),s("ngIf",((u=r.headlineForm.get("lastname"))==null?null:u.invalid)&&(((u=r.headlineForm.get("lastname"))==null?null:u.dirty)||((u=r.headlineForm.get("lastname"))==null?null:u.touched))),_(2),s("control",r.title),_(3),s("ngIf",((I=r.headlineForm.get("title"))==null?null:I.invalid)&&(((I=r.headlineForm.get("title"))==null?null:I.dirty)||((I=r.headlineForm.get("title"))==null?null:I.touched))),_(4),s("ngIf",!r.uploadedCv),_(),s("editMode",!0)("deleteMode",!0)("cv",r.uploadedCv);}},dependencies:[ke,te,ue,B,we,q,ni,Oe,Z,K,me,ne,pi,fe],styles:[".file-input[_ngcontent-%COMP%]{display:none}.profile-picture[_ngcontent-%COMP%]{max-width:4.6875rem;float:left;margin-right:.625rem;border-radius:50%}"]});let e=l;return e;})();var Xi=(e,l)=>[e,l];function Gi(e,l){e&1&&(a(0,"div"),f(1,10),o());}function Ui(e,l){if(e&1&&(a(0,"div",44),d(1,Gi,2,0,"div",45),o()),e&2){let t,i=c();_(),s("ngIf",(t=i.basicInformationForm.get("email"))==null||t.errors==null?null:t.errors.required);}}function qi(e,l){e&1&&(a(0,"div"),f(1,11),o());}function Bi(e,l){if(e&1&&(a(0,"div",44),d(1,qi,2,0,"div",45),o()),e&2){let t,i=c();_(),s("ngIf",(t=i.basicInformationForm.get("selectedCountry"))==null||t.errors==null?null:t.errors.required);}}function Ki(e,l){e&1&&(a(0,"small",26),f(1,12),o());}function ji(e,l){e&1&&(a(0,"div"),f(1,13),o());}function Zi(e,l){if(e&1&&(a(0,"div",44),d(1,ji,2,0,"div",45),o()),e&2){let t,i=c();_(),s("ngIf",(t=i.basicInformationForm.get("city"))==null||t.errors==null?null:t.errors.required);}}function Hi(e,l){if(e&1&&(a(0,"div",47),A(1),x(2,"localizeValidationError"),o()),e&2){let t=c(2);_(),h(" ",k(2,1,t.EValidationMessages.PHONE_IS_REQUIRED)," ");}}function Yi(e,l){if(e&1&&(a(0,"div",47),A(1),x(2,"localizeValidationError"),o()),e&2){let t=c(2);_(),h(" ",k(2,1,t.EValidationMessages.PHONE_IS_INVALID)," ");}}function Qi(e,l){if(e&1&&(a(0,"div",44),d(1,Hi,3,3,"div",46)(2,Yi,3,3,"div",46),o()),e&2){let t=c();_(),s("ngIf",t.phone==null||t.phone.errors==null?null:t.phone.errors.required),_(),s("ngIf",t.phone==null||t.phone.errors==null?null:t.phone.errors.validatePhoneNumber);}}function Ji(e,l){e&1&&(a(0,"div"),f(1,14),o());}function er(e,l){if(e&1&&(a(0,"div",44),d(1,Ji,2,0,"div",45),o()),e&2){let t,i=c();_(),s("ngIf",(t=i.basicInformationForm.get("dayRate"))==null||t.errors==null?null:t.errors.required);}}function tr(e,l){e&1&&(a(0,"div"),f(1,15),o());}function ir(e,l){if(e&1&&(a(0,"div",44),d(1,tr,2,0,"div",45),o()),e&2){let t=c();_(),s("ngIf",t.workExperienceSince==null||t.workExperienceSince.errors==null?null:t.workExperienceSince.errors.required);}}function rr(e,l){if(e&1){let t=v();a(0,"br-tag",48),T("remove",function(){let n=P(t).index,r=c();return O(r.removeLanguage(n));}),o();}if(e&2){let t=l.$implicit,i=c();s("text",t==null?null:t.languageName)("type",i.ETagType.TAG_PRIMARY_OUTLINE)("removable",!0)("xs",!0);}}function nr(e,l){e&1&&(a(0,"div",43),m(1,"br-spinner",49),o()),e&2&&(_(),s("small",!0));}var Si=(()=>{let l=class l{constructor(i,n,r,p,E,u,I,S){this.countryService=i,this.languageService=n,this.profileService=r,this.toastr=p,this.formBuilder=E,this.stepsService=u,this.destroyRef=I,this.locationService=S,this.subformInitialized=new J(),this.profileLanguages=[],this.formatterCountry=g=>g.v,this.formatterLanguage=g=>g.v,this.ETagType=$e,this.EValidationMessages=ii,this.CountryISO=di,this.SearchCountryField=Ei,this.loadingLanguage=!1,this.searching=!1,this.formatterPlace=g=>g.place_name?`${g.place_name}`:"",this.PhoneNumberFormat=fi,this.searchPlace=g=>g.pipe(Y(300),Q(),Ie(()=>this.searching=!0),he(R=>this.locationService.searchPlace(R).pipe(Le(()=>(this.toastr.error("Beim Suchen nach St\xE4dten ist ein Fehler aufgetreten"),Fe([]))))),Ie(()=>this.searching=!1)),this.searchCountry=g=>g.pipe(Y(200),Q(),se(R=>R.length<2?[]:this.countries.filter(N=>N.v.toLowerCase().indexOf(R.toLowerCase())>-1).slice(0,10))),this.searchLanguage=g=>g.pipe(Y(200),Q(),se(R=>R.length<2?[]:this.languages.filter(N=>N.v.toLowerCase().indexOf(R.toLowerCase())>-1).slice(0,10)));}ngOnInit(){this.startingForm&&this.startingForm.value?this.basicInformationForm=this.startingForm:(this.basicInformationForm=this.formBuilder.group({id:"",email:["",L.required],selectedCountry:["",L.required],country:["",L.required],city:["",L.required],selectedCity:{},phone:["",L.required],dayRate:["",L.required],dailyRateOnRequest:!1,workExperienceSince:["",L.required],languages:[]}),this.profile&&this?.basicInformationForm?.patchValue({id:this.profile?.id,email:this.profile?.email,selectedCountry:{k:this.profile?.generalInformation?.country,v:this.profile?.generalInformation?.countryName},country:this.profile?.generalInformation?.country,city:this.profile?.generalInformation?.city,selectedCity:{place_name:this.profile?.generalInformation?.city,country_code:this.profile?.generalInformation?.country},phone:this.profile?.generalInformation?.phone,dayRate:this.profile?.generalInformation?.dayRate,dailyRateOnRequest:this.profile?.generalInformation?.dayRateWhenAsked,workExperienceSince:this.profile?.generalInformation?.workExperienceSince,languages:this.profile?.languages})),this.getCountries(),this.getLanguages(),this.profile.languages.forEac
1h(i=>{this.profileLanguages.push(i);}),setTimeout(()=>{this.subformInitialized.emit(this.basicInformationForm);},0),this.stepsService.setCurrentStepIsValid(!0),this.basicInformationForm.valueChanges.pipe(F(this.destroyRef)).subscribe(()=>{this.profile.email=this.basicInformationForm.get("email")?.value,this.profile.generalInformation.city=this.basicInformationForm.get("city")?.value,this.profile.generalInformation.phone=this.basicInformationForm.get("phone")?.value?.internationalNumber,this.profile.generalInformation.dayRate=this.basicInformationForm.get("dayRate")?.value,this.profile.generalInformation.dayRateWhenAsked=this.basicInformationForm.get("dailyRateOnRequest")?.value,this.profile.generalInformation.workExperienceSince=this.basicInformationForm.get("workExperienceSince")?.value,this.stepsService.setCurrentStepIsValid(this.basicInformationForm.valid);});}get email(){return this.basicInformationForm.get("email");}get selectedCountry(){return this.basicInformationForm.get("selectedCountry");}get city(){return this.basicInformationForm.get("city");}get selectedCity(){return this.basicInformationForm.get("selectedCity");}get phone(){return this.basicInformationForm.get("phone");}get dayRate(){return this.basicInformationForm.get("dayRate");}get workExperienceSince(){return this.basicInformationForm.get("workExperienceSince");}onSelectCountry(i){this.basicInformationForm.patchValue({country:i.item.k}),this.profile.generalInformation.country=i.item.k,this.profile.generalInformation.countryName=i.item.v;}onSelectCity(i){this.basicInformationForm.patchValue({country:i.item.country_code,city:i.item.place_name});}onChangeCity(){(typeof this.basicInformationForm.get("selectedCity")?.value=="string"||this.basicInformationForm.get("selectedCity")?.value instanceof String)&&this.basicInformationForm.patchValue({city:this.basicInformationForm.get("selectedCity")?.value});}onSelectLanguage(i,n){i.preventDefault();let r=i.item.k,p=i.item.v;n.value="",this.loadingLanguage=!0;let E={profileId:this.profile?.id,languageId:r};this.profileService.addProfileLanguage(E).pipe(F(this.destroyRef)).subscribe(I=>{if(I.success){let S={id:I.id,languageId:r,languageName:p};this.profileLanguages.push(S),this.toastr.success("Sprache wurde erfolgreich hinzugef\xFCgt"),this.loadingLanguage=!1;}else this.toastr.error(I?.message),this.loadingLanguage=!1;});let u={languageId:i.item.k,languageName:i.item.v};this.profile.languages.push(u);}getCountries(){this.countryService.getCountries().pipe(F(this.destroyRef)).subscribe(i=>{this.countries=i?.items?i.items:[];});}getLanguages(){this.languageService.getLanguages().pipe(F(this.destroyRef)).subscribe(i=>{this.languages=i.languages;});}removeLanguage(i){let n=this.profileLanguages[i];this.profileService.deleteProfileLanguage(n.id).pipe(F(this.destroyRef)).subscribe(r=>{r.success?(this.profileLanguages.splice(i,1),this.toastr.success("Die Sprache wurde erfolgreich entfernt")):this.toastr.error("Fehler beim Entfernen der Sprache");});}};l.ɵfac=function(n){return new(n||l)(C(oe),C(ct),C(b),C(ie),C(j),C(X),C(G),C(re));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-basic-information"]],inputs:{profile:"profile",step:"step",startingForm:"startingForm"},outputs:{subformInitialized:"subformInitialized"},standalone:!0,features:[U([oe,ct,b,re]),W],decls:49,vars:38,consts:()=>{let i;i="Email";let n;n="Land";let r;r="Stadt";let p;p="Telefon";let E;E="Tagessatz";let u;u=" Zeige \u201ETagessatz auf Anfrage\u201C in meinem Profil ";let I;I=" Jahre Berufserfahrung ";let S;S="Sprachen:";let g;g=" Bitte w\xE4hlen Sie eine Sprache aus. ";let R;R="E-Mail ist erforderlich";let N;N="Land ist erforderlich";let z;z="Suche l\xE4uft...";let H;H="Stadt ist erforderlich";let le;le="Tagessatz ist erforderlich";let ae;return ae=" Jahrelange Berufserfahrung ist erforderlich ",[["inputLanguage",""],i,n,r,p,E,u,I,S,g,R,N,z,H,le,ae,[1,"d-flex","flex-column","gap-2",3,"formGroup"],["for","email",1,"form-label","label",3,"control"],["id","email","type","text","aria-label","Email","formControlName","email","name","email",1,"field-text"],["class","alert alert-danger label",4,"ngIf"],[1,"d-flex","gap-3"],["for","location",1,"form-label","label",3,"control"],["id","location","name","location","formControlName","selectedCountry","type","text",1,"input-input","field-text",3,"selectItem","ngbTypeahead","inputFormatter","resultFormatter","editable"],[1,"general-info-location-input"],["for","place",1,"form-label","label",3,"control"],["id","place","type","text","formControlName","selectedCity",1,"form-control","field-text",3,"change","selectItem","ngbTypeahead","inputFormatter","resultFormatter"],[1,"form-text","text-muted","small"],[1,"d-flex","flex-column"],["for","phone",1,"form-label","label",3,"control"],["name","phone","id","phone","formControlName","phone",1,"field-text",3,"preferredCountries","enableAutoCountrySelect","enablePlaceholder","selectFirstCountry","selectedCountryISO","maxLength","phoneValidation","numberFormat"],["for","dayRate",1,"form-label","label",3,"control"],["id","dayRate","type","number","aria-label","Daily Rate","formControlName","dayRate","name","dailyRate",1,"form-control","field-text"],[1,"d-flex","gap-2","checkbox","mt-2"],["type","checkbox","value","","id","dailyRateOnRequest","name","dailyRateOnRequest","formControlName","dailyRateOnRequest",1,"checkbox-input"],["for","dailyRateOnRequest",1,"checkbox-label","label"],["for","yearsOfWorkExperience",1,"form-label","label",3,"control"],["id","yearsOfWorkExperience","type","number","aria-label","Years of Work Experience","formControlName","workExperienceSince","name","yearsOfWorkExperience",1,"form-control","field-text"],["for","choose-language",1,"label"],["id","choose-language","name","choose-language","type","text",1,"input-input","label","field-text",3,"selectItem","ngbTypeahead","inputFormatter","resultFormatter","editable"],[1,"invalid-feedback"],[1,"d-flex","flex-column","gap-1","mt-2"],[1,"d-flex","gap-1","flex-wrap"],[3,"text","type","removable","xs","remove",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-center"],[1,"alert","alert-danger","label"],[4,"ngIf"],["class","label",4,"ngIf"],[1,"label"],[3,"remove","text","type","removable","xs"],[3,"small"]];},template:function(n,r){if(n&1){let p=v();a(0,"form",16)(1,"div")(2,"br-label",17),f(3,1),o(),m(4,"br-input",18),d(5,Ui,2,1,"div",19),o(),a(6,"div",20)(7,"div")(8,"br-label",21),f(9,2),o(),a(10,"input",22),T("selectItem",function(u){return P(p),O(r.onSelectCountry(u));}),o(),d(11,Bi,2,1,"div",19),o(),a(12,"div")(13,"div",23)(14,"br-label",24),f(15,3),o(),a(16,"input",25),T("change",function(){return P(p),O(r.onChangeCity());})("selectItem",function(u){return P(p),O(r.onSelectCity(u));}),o(),d(17,Ki,2,0,"small",26),o(),d(18,Zi,2,1,"div",19),o()(),a(19,"div",27)(20,"br-label",28),f(21,4),o(),m(22,"ngx-intl-tel-input",29),d(23,Qi,3,2,"div",19),o(),a(24,"div")(25,"br-label",30),f(26,5),o(),m(27,"input",31),d(28,er,2,1,"div",19),o(),a(29,"div",32),m(30,"input",33),a(31,"label",34),f(32,6),o()(),a(33,"div")(34,"br-label",35),f(35,7),o(),m(36,"input",36),d(37,ir,2,1,"div",19),o(),a(38,"div")(39,"label",37),f(40,8),o(),a(41,"input",38,0),T("selectItem",function(u){P(p);let I=ee(42);return O(r.onSelectLanguage(u,I));}),o(),a(43,"div",39),f(44,9),o()(),a(45,"div",40)(46,"div",41),d(47,rr,1,4,"br-tag",42),o(),d(48,nr,2,1,"div",43),o()();}if(n&2){let p,E,u,I;s("formGroup",r.basicInformationForm),_(2),s("control",r.email),_(3),s("ngIf",((p=r.basicInformationForm.get("email"))==null?null:p.invalid)&&
1(((p=r.basicInformationForm.get("email"))==null?null:p.dirty)||((p=r.basicInformationForm.get("email"))==null?null:p.touched))),_(3),s("control",r.selectedCountry),_(2),s("ngbTypeahead",r.searchCountry)("inputFormatter",r.formatterCountry)("resultFormatter",r.formatterCountry)("editable",!1),_(),s("ngIf",((E=r.basicInformationForm.get("selectedCountry"))==null?null:E.invalid)&&(((E=r.basicInformationForm.get("selectedCountry"))==null?null:E.dirty)||((E=r.basicInformationForm.get("selectedCountry"))==null?null:E.touched))),_(3),s("control",r.city),_(2),s("ngbTypeahead",r.searchPlace)("inputFormatter",r.formatterPlace)("resultFormatter",r.formatterPlace),_(),y(17,r.searching?17:-1),_(),s("ngIf",((u=r.basicInformationForm.get("city"))==null?null:u.invalid)&&(((u=r.basicInformationForm.get("city"))==null?null:u.dirty)||((u=r.basicInformationForm.get("city"))==null?null:u.touched))),_(2),s("control",r.phone),_(2),s("preferredCountries",rt(35,Xi,r.CountryISO.Germany,r.CountryISO.Austria))("enableAutoCountrySelect",!0)("enablePlaceholder",!0)("selectFirstCountry",!1)("selectedCountryISO",r.CountryISO.Germany)("maxLength",15)("phoneValidation",!0)("numberFormat",r.PhoneNumberFormat.National),_(),s("ngIf",(r.phone==null?null:r.phone.invalid)&&(r.phone==null?null:r.phone.touched)),_(2),s("control",r.dayRate),_(3),s("ngIf",((I=r.basicInformationForm.get("dayRate"))==null?null:I.invalid)&&(((I=r.basicInformationForm.get("dayRate"))==null?null:I.dirty)||((I=r.basicInformationForm.get("dayRate"))==null?null:I.touched))),_(6),s("control",r.workExperienceSince),_(3),s("ngIf",(r.workExperienceSince==null?null:r.workExperienceSince.invalid)&&((r.workExperienceSince==null?null:r.workExperienceSince.dirty)||(r.workExperienceSince==null?null:r.workExperienceSince.touched))),_(4),s("ngbTypeahead",r.searchLanguage)("inputFormatter",r.formatterLanguage)("resultFormatter",r.formatterLanguage)("editable",!1),_(6),s("ngForOf",r.profileLanguages),_(),y(48,r.loadingLanguage?48:-1);}},dependencies:[ke,te,Pe,jt,Kt,ue,B,ge,Te,de,_t,Oe,Z,K,me,q,ne,Ce,ri,Ci,mi,ui],styles:["br-spinner[_ngcontent-%COMP%]{width:.5rem}"]});let e=l;return e;})();function Rt(e){return l=>{if(!Array.isArray(l.value))return null;let t=l.value.length;return t<e?{minArrayLength:{required:e,actual:t}}:null;};}function lr(e,l){if(e&1){let t=v();a(0,"br-tag",12),T("remove",function(){let n=P(t).index,r=c(2);return O(r.removeSkill(n));}),o();}if(e&2){let t=l.$implicit,i=c(2);s("text",t==null?null:t.name)("type",i.ETagType.TAG_PRIMARY_OUTLINE)("removable",!0)("xs",!0);}}function ar(e,l){if(e&1&&d(0,lr,1,4,"br-tag",11),e&2){let t=c();s("ngForOf",t.profileSkills);}}function _r(e,l){e&1&&m(0,"br-spinner",13),e&2&&s("small",!0);}function sr(e,l){if(e&1){let t=v();a(0,"br-tag",12),T("remove",function(){let n=P(t).index,r=c(2);return O(r.removeIndustry(n));}),o();}if(e&2){let t=l.$implicit,i=c(2);s("text",t==null?null:t.name)("type",i.ETagType.TAG_SECONDARY_OUTLINE)("removable",!0)("xs",!0);}}function cr(e,l){if(e&1&&d(0,sr,1,4,"br-tag",11),e&2){let t=c();s("ngForOf",t.profileIndustries);}}function pr(e,l){e&1&&m(0,"br-spinner",13),e&2&&s("small",!0);}var Ai=(()=>{let l=class l{constructor(i,n,r,p,E,u,I){this.skillService=i,this.industryService=n,this.profileService=r,this.destroyRef=p,this.toastr=E,this.formBuilder=u,this.stepsService=I,this.subformInitialized=new J(),this.profileSkills=[],this.profileIndustries=[],this.formatterSkill=S=>S.name,this.formatterIndustry=S=>S.name,this.ETagType=$e,this.loadingSkill=!1,this.loadingIndustry=!1,this.searchSkills=S=>S.pipe(Y(200),Q(),se(g=>g.length<2?[]:this.skills.filter(R=>R.name.toLowerCase().indexOf(g.toLowerCase())>-1).slice(0,10))),this.searchIndustries=S=>S.pipe(Y(200),Q(),se(g=>g.length<2?[]:this.industries.filter(R=>R.name.toLowerCase().indexOf(g.toLowerCase())>-1).slice(0,10)));}ngOnInit(){this.startingForm&&this.startingForm.value?this.skillsIndustriesForm=this.startingForm:this.skillsIndustriesForm=this.formBuilder.group({skillOffers:[this.profile?.skillOffers,[L.required,Rt(1)]],industries:[this.profile?.industries,[L.required,Rt(1)]]}),this.skillsIndustriesForm?.get("skillOffers")?.value?.forEach(i=>
1{let n={id:i.id,name:i.name};this.profileSkills.push(n);}),this.skillsIndustriesForm?.get("industries")?.value?.forEach(i=>{let n={id:i.id,name:i.name};this.profileIndustries.push(n);}),this.getSkills(),this.getIndustries(),this.stepsService.setCurrentStepIsValid(this.skillsIndustriesForm.valid),this.skillsIndustriesForm.valueChanges.pipe(F(this.destroyRef)).subscribe(()=>{this.stepsService.setCurrentStepIsValid(this.skillsIndustriesForm.valid);}),setTimeout(()=>{this.subformInitialized.emit(this.skillsIndustriesForm);},0);}get selectedIndustries(){return this.skillsIndustriesForm?.get("industries");}get selectedSkills(){return this.skillsIndustriesForm?.get("skillOffers");}onSelectSkill(i){i.preventDefault(),this.loadingSkill=!0;let n={name:i.item.name,skill:{id:i.item.id,name:i.item.name}};this.profile.skillOffers.push(n);let r={profileId:this.profile.id,skillId:i.item.id,name:i.item.name};this.profileService.addProfileSkill(r).pipe(F(this.destroyRef)).subscribe(p=>{if(p.success)this.profileSkills.push({id:p?.id,name:i?.item?.name}),this?.skillsIndustriesForm?.patchValue({skillOffers:this.profileSkills}),this.toastr.success("Kompetenz wurde erfolgreich hinzugef\xFCgt");else{let E=p&&p?.validationErrors?new Map(Object.entries(p?.validationErrors)):null;E&&this.toastr.error(E.get("name")?.toString());}this.loadingSkill=!1;});}onSelectIndustry(i){i.preventDefault(),this.loadingIndustry=!0;let n={industry:{id:i.item.id,name:i.item.name}};this.profile.industries.push(n);let r={id:0,profileId:this.profile.id,industryId:i.item.id};this.profileService.addProfileIndustry(r).pipe(F(this.destroyRef)).subscribe(p=>{if(p.success)this.profileIndustries.push({id:p.id,name:p.name}),this?.skillsIndustriesForm?.patchValue({industries:this.profileIndustries}),this.toastr.success("Branche wurde erfolgreich hinzugef\xFCgt");else{let E=p&&p.validationErrors?new Map(Object.entries(p?.validationErrors)):null;E&&this.toastr.error(E?.get("industryId")?.toString());}this.loadingIndustry=!1;});}getSkills(){this.skillService.getSkills().pipe(F(this.destroyRef)).subscribe(i=>{this.skills=i?.items?i.items:[];});}getIndustries(){this.industryService.getIndustries().pipe(F(this.destroyRef)).subscribe(i=>{this.industries=i.items;});}removeSkill(i){let n=this.profileSkills[i];this.loadingSkill=!0,this.profileService.deleteProfileSkill(n.id).pipe(F(this.destroyRef)).subscribe(r=>{r.success?(this.profileSkills.splice(i,1),this?.skillsIndustriesForm?.patchValue({skillOffers:this.profileSkills}),this.toastr.success("Kompetenz wurde erfolgreich entfernt")):this.toastr.error("Fehler beim Entfernen der Fertigkeit");}),this.loadingSkill=!1;}removeIndustry(i){let n=this.profileIndustries[i];this.loadingIndustry=!0,this.profileService.deleteProfileIndustry(n.id).pipe(F(this.destroyRef)).subscribe(r=>{r.success?(this.profileIndustries.splice(i,1),this?.skillsIndustriesForm?.patchValue({industries:this.profileIndustries}),this.toastr.success("Die Branche wurde erfolgreich entfernt")):this.toastr.error("Fehler beim Entfernen der Branche"),this.loadingIndustry=!1;});}};l.ɵfac=function(n){return new(n||l)(C(st),C(Re),C(b),C(G),C(ie),C(j),C(X));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-skills-industry"]],inputs:{profile:"profile",step:"step",startingForm:"startingForm"},outputs:{subformInitialized:"subformInitialized"},standalone:!0,features:[U([st,Re,b,Et]),W],decls:17,vars:11,consts:()=>{let i;i="Kompetenzen: ";let n;return n="Branche:",[["inputSkill",""],["inputIndustry",""],i,n,[3,"formGroup"],["for","choose-skill",1,"label",3,"control"],["id","choose-skill","name","choose-skill","type","text",1,"form-control","field-text",3,"selectItem","ngbTypeahead","inputFormatter","resultFormatter"],[1,"d-flex","gap-2","flex-wrap","mt-1"],[3,"text","type","removable","xs"],["for","choose-industry",1,"label",3,"control"],["id","choose-industry","name","choose-industry","type","text",1,"form-control","field-text",3,"selectItem","ngbTypeahead","inputFormatter","resultFormatter"],[3,"text","type","removable","xs","remove",4,"ngFor","ngForOf"],[3,"remove","text","type","removable","xs"],[3,"small"]];},template:function(n,r){if(n&1){let p=v();a(0,"form",4)(1,"div")(2,"br-label",5),f(3,2),o(),a(4,"input",6,0),T("selectItem",function(u){P(p);let I=ee(5);return r.onSelectSkill(u),O(I.value="");}),o()(),a(6,"div",7),d(7,ar,1,1,"br-tag",8)(8,_r,1,1),o(),a(9,"div")(10,"br-label",9),f(11,3),o(),a(12,"input",10,1),T("selectItem",function(u){P(p);let I=ee(13);return r.onSelectIndustry(u),O(I.value="");}),o()(),a(14,"div",7),d(15,cr,1,1,"br-tag",8)(16,pr,1,1),o()();}n&2&&(s("formGroup",r.skillsIndustriesForm),_(2),s("control",r.selectedIndustries),_(2),s("ngbTypeahead",r.searchSkills)("inputFormatter",r.formatterSkill)("resultFormatter",r.formatterSkill),_(3),y(7,r.loadingSkill?8:7),_(3),s("control",r.selectedSkills),_(2),s("ngbTypeahead",r.searchIndustries)("inputFormatter",r.formatterIndustry)("resultFormatter",r.formatterIndustry),_(3),y(15,r.loadingIndustry?16:15));},dependencies:[ge,Te,de,Z,te,B,K,_t,Ce,ne],encapsulation:2});let e=l;return e;})();function dr(e,l){e&1&&(a(0,"div"),f(1,1),o());}function Er(e,l){e&1&&(a(0,"div"),f(1,2),o());}function fr(e,l){if(e&1&&(a(0,"div",8),d(1,dr,2,0,"div",9)(2,Er,2,0,"div",9),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.aboutMeForm.get("personalSummary"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.aboutMeForm.get("personalSummary"))==null?null:i.errors.minlength);}}var Ni=(()=>{let l=class l{constructor(i,n,r){this.formBuilder=i,this.destroyRef=n,this.stepsService=r,this.subformInitialized=new J();}ngOnInit(){this.startingForm&&this.startingForm.value?this.aboutMeForm=this.startingForm:(this.aboutMeForm=this.formBuilder.group({personalSummary:["",[L.required,Ve.minLengthWithTrim(200)]]}),this.profile&&this?.aboutMeForm?.patchValue({personalSummary:this.profile?.personalSummary})),this.stepsService.setCurrentStepIsValid(this.aboutMeForm.valid),this.aboutMeForm.valueChanges.pipe(F(this.destroyRef)).subscribe(i=>{let n=this.formBuilder.group(i);this.profile.personalSummary=n.get("personalSummary")?.value,this.stepsService.setCurrentStepIsValid(this.aboutMeForm.valid);}),setTimeout(()=>{this.subformInitialized.emit(this.aboutMeForm);},0);}get personalSummary(){return this.aboutMeForm.get("personalSummary");}};l.ɵfac=function(n){return new(n||l)(C(j),C(G),C(X));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-about-me"]],inputs:{profile:"profile",step:"step",startingForm:"startingForm"},outputs:{subformInitialized:"subformInitialized"},standalone:!0,features:[W],decls:6,vars:5,consts:()=>{let i;i="\xDCber mich";let n;n="\xDCber mich ist erforderlich";let r;return r="Die Mindestl\xE4nge betr\xE4gt 200 Zeichen",[i,n,r,[3,"formGroup"],["for","aboutMe",1,"form-label","label",3,"control"],["id","aboutMe","type","text","rows","8","aria-label","About Me","formControlName","personalSummary","name","aboutMe",1,"form-control","field-text"],["class","alert alert-danger label",4,"ngIf"],[3,"maxLength","control"],[1,"alert","alert-danger","label"],[4,"ngIf"]];},template:function(n,r){if(n&1&&(a(0,"form",3)(1,"br-label",4),f(2,0),o(),m(3,"textarea",5),d(4,fr,3,2,"div",6),m(5,"app-ch
1aracters-left",7),o()),n&2){let p;s("formGroup",r.aboutMeForm),_(),s("control",r.personalSummary),_(3),s("ngIf",((p=r.aboutMeForm.get("personalSummary"))==null?null:p.invalid)&&(((p=r.aboutMeForm.get("personalSummary"))==null?null:p.dirty)||((p=r.aboutMeForm.get("personalSummary"))==null?null:p.touched))),_(),s("maxLength",15e3)("control",r.personalSummary);}},dependencies:[Z,te,Pe,ue,B,K,me,q,ne,We],encapsulation:2});let e=l;return e;})();function ur(e,l){if(e&1){let t=v();a(0,"div",71)(1,"span",72),m(2,"br-svg-icon",73),A(3),o(),a(4,"div",74)(5,"span",75),T("click",function(){let n=P(t).$implicit,r=c();return O(r.editEducation(n.id));})("keydown",function(){let n=P(t).$implicit,r=c();return O(r.editEducation(n.id));}),m(6,"br-svg-icon",76),o(),a(7,"span",77),T("click",function(){let n=P(t).$implicit,r=c();return O(r.deleteEducation(n.id));})("keydown",function(){let n=P(t).$implicit,r=c();return O(r.deleteEducation(n.id));}),m(8,"br-svg-icon",78),o()()();}if(e&2){let t=l.$implicit;_(3),h(" ",t.name," ");}}function mr(e,l){e&1&&m(0,"hr");}function Cr(e,l){if(e&1){let t=v();a(0,"br-button",79),T("clickAction",function(){P(t),c();let n=ee(11);return O(n.toggle());}),f(1,17),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY);}}function Ir(e,l){e&1&&(a(0,"div"),f(1,18),o());}function Pr(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.educationCertificationForm.get("education.name"))==null||t.errors==null?null:t.errors.apiError," ");}}function Or(e,l){if(e&1&&(a(0,"div",80),d(1,Ir,2,0,"div",35)(2,Pr,2,1,"div",35),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.educationCertificationForm.get("education.name"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.educationCertificationForm.get("education.name"))==null||i.errors==null?null:i.errors.apiError);}}function Rr(e,l){e&1&&(a(0,"div"),f(1,19),o());}function Tr(e,l){if(e&1&&(a(0,"div"),f(1,20),o()),e&2){let t,i=c(2);_(),ve((t=i.educationCertificationForm.get("education.type"))==null||t.errors==null||t.errors.maxlength==null?null:t.errors.maxlength.requiredLength),Me(1);}}function gr(e,l){if(e&1&&(a(0,"div",80),d(1,Rr,2,0,"div",35)(2,Tr,2,1,"div",35),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.educationCertificationForm.get("education.type"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.educationCertificationForm.get("education.type"))==null||i.errors==null?null:i.errors.maxlength);}}function Sr(e,l){e&1&&(a(0,"div"),f(1,21),o());}function Ar(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t=c(2);_(),h(" ",t.selectedCountry==null||t.selectedCountry.errors==null?null:t.selectedCountry.errors.apiError," ");}}function Nr(e,l){if(e&1&&(a(0,"div",80),d(1,Sr,2,0,"div",35)(2,Ar,2,1,"div",35),o()),e&2){let t=c();_(),s("ngIf",t.selectedCountry.errors==null?null:t.selectedCountry.errors.required),_(),s("ngIf",t.selectedCountry==null||t.selectedCountry.errors==null?null:t.selectedCountry.errors.apiError);}}function Fr(e,l){e&1&&(a(0,"div"),f(1,22),o());}function Lr(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.educationCertificationForm.get("education.location"))==null||t.errors==null?null:t.errors.apiError," ");}}function hr(e,l){if(e&1&&(a(0,"div",80),d(1,Fr,2,0,"div",35)(2,Lr,2,1,"div",35),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.educationCertificationForm.get("education.location"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.educationCertificationForm.get("education.location"))==null||i.errors==null?null:i.errors.apiError);}}function vr(e,l){e&1&&(a(0,"div"),f(1,23),o());}function Mr(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.educationCertificationForm.get("education.eduStartDate"))==null||t.errors==null?null:t.errors.apiError," ");}}function yr(e,l){if(e&1&&(a(0,"div",80),d(1,vr,2,0,"div",35)(2,Mr,2,1,"div",35),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.educationCertificationForm.get("education.eduStartDate"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.educationCertificationForm.get("education.eduStartDate"))==null||i.errors==null?null:i.errors.apiError);}}function xr(e,l){e&1&&(a(0,"div"),f(1,24),o());}function br(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.educationCertificationForm.get("education.eduEndDate"))==null||t.errors==null?null:t.errors.apiError," ");}}function wr(e,l){e&1&&(a(0,"div"),f(1,25),o());}function kr(e,l){if(e&1&&(a(0,"div",80),d(1,xr,2,0,"div",35)(2,br,2,1,"div",35)(3,wr,2,0,"div",35),o()),e&2){let t,i,n,r=c();_(),s("ngIf",(t=r.educationCertificationForm.get("education.eduEndDate"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=r.educationCertificationForm.get("education.eduEndDate"))==null||i.errors==null?null:i.errors.apiError),_(),s("ngIf",(n=r.educationCertificationForm.get("education.eduEndDate"))==null||n.errors==null?null:n.errors.dateRange);}}function $r(e,l){if(e&1){let t=v();a(0,"br-button",81),T("clickAction",function(){P(t);let n=c();return O(n.hideEducationForm());}),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY)("size",t.EButtonSize.BUTTON_SIZE_S);}}function Dr(e,l){if(e&1){let t=v();a(0,"br-button",82),T("clickAction",function(){P(t);let n=c();return O(n.addEducation());}),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY)("size",t.EButtonSize.BUTTON_SIZE_S);}}function Wr(e,l){e&1&&m(0,"br-spinner");}function Vr(e,l){if(e&1){let t=v();a(0,"div",71)(1,"span",72),m(2,"br-svg-icon",83),A(3),o(),a(4,"div",74)(5,"span",75),T("click",function(){let n=P(t).$implicit,r=c();return O(r.editCertificate(n.id));})("keydown",function(){let n=P(t).$implicit,r=c();return O(r.editCertificate(n.id));}),m(6,"br-svg-icon",76),o(),a(7,"span",75),T("click",function(){let n=P(t).$implicit,r=c();return O(r.deleteCertificate(n.id));})("keydown",function(){let n=P(t).$implicit,r=c();return O(r.deleteCertificate(n.id));}),m(8,"br-svg-icon",78),o()()();}if(e&2){let t=l.$implicit;_(3),h(" ",t.name," ");}}function zr(e,l){e&1&&m(0,"hr");}function Xr(e,l){if(e&1){let t=v();a(0,"br-button",79),T("clickAction",function(){P(t),c();let n=ee(67);return O(n.toggle());}),f(1,26),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY);}}function Gr(e,l){e&1&&(a(0,"div"),f(1,27),o());}function Ur(e,l){if(e&1&&(a(0,"div"),f(1,28),o()),e&2){let t,i=c(2);_(),ve((t=i.educationCertificationForm.get("certificate.name"))==null||t.errors==null||t.errors.maxlength==null?null:t.errors.maxlength.requiredLength),Me(1);}}function qr(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.educationCertificationForm.get("certificate.name"))==null||t.errors==null?null:t.errors.apiError," ");}}function Br(e,l){if(e&1&&(a(0,"div",80),d(1,Gr,2,0,"div",35)(2,Ur,2,1,"div",35)(3,qr,2,1,"div",35),o()),e&2){let t,i,n,r=c();_(),s("ngIf",(t=r.educationCertificationForm.get("certificate.name"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=r.educationCertificationForm.get("certificate.name"))==null||i.errors==null?null:i.errors.maxlength),_(),s("ngIf",(n=r.educationCertificationForm.get("certificate.name"))==null||n.errors==null?null:n.errors.apiError);}}function Kr(e,l){e&1&&(a(0,"div"),f(1,29),o());}function jr(e,l){if(e&1&&(a(0,"div"),f(1,30),o()),e&2){let t,i=c(2);_(),ve((t=i.educationCertificationForm.get("certificate.provider"))==null||t.errors==null||t.errors.maxlength==null?null:t.errors.maxlength.requiredLength),Me(1);}}function Zr(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.educationCertificationForm.get("certificate.provider"))==null||t.errors==null?null:t.errors.apiError," ");}}function Hr(e,l){if(e&1&&(a(0,"div",80),d(1,Kr,2,0,"div",35)(2,jr,2,1,"div",35)(3,Zr,2,1,"div",35),o()),e&2){let t,i,n,r=c();_(),s("ngIf",(t=r.educationCertificationForm.get("certificate.provider"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=r.educationCertificationForm.get("certificate.provider"))==null||i.errors==null?null:i.errors.maxlength),_(),s("ngIf",(n=r.educationCertificationForm.get("certificate.provider"))==null||n.errors==null?null:n.errors.apiError);}}function Yr(e,l){if(e&1){let t=v();a(0,"p")(1,"strong"),A(2),o(),a(3,"a",84),T("click",function(){P(t);let n=c();return O(n.deleteCertificateFile());})("keydown",function(){P(t);let n=c();return O(n.deleteCertificateFile());}),m(4,"br-svg-icon",78),o()();}if(e&2){let t=c();_(2),it(t.certificationFile.filenameOrig);}}function Qr(e,l){if(e&1){let t=v();a(0,"br-button",85),T("clickAction",function(){P(t);let n=c();return O(n.hideCertificationForm());}),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY)("size",t.EButtonSize.BUTTON_SIZE_S);}}function Jr(e,l){if(e&1){let t=v();a(0,"br-button",86),T("clickAction",function(){P(t);let n=c();return O(n.addCertification());}),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY)("size",t.EButtonSize.BUTTON_SIZE_S);}}function en(e,l){e&1&&m(0,"br-spinner");}var Fi=(()=>{let l=class l{constructor(i,n,r,p,E,u,I,S,g){this.profileService=i,this.toastr=n,this.destroyRef=r,this.formBuilder=p,this.countryService=E,this.stepsService=u,this.confirmDialogService=I,this.modalService=S,this.locationService=g,this.subformInitialized=new J(),this.formatterCountry=R=>R.name,this.formatterPlace=R=>R.place_name?`${R.place_name}`:"",this.EButtonType=xe,this.EButtonSize=be,this.savingEducation=!1,this.savingCertificate=!1,this.searching=!1,this.addEducationCollapsed=!0,this.addCertificationCollapsed=!0,this.searchCountry=R=>R.pipe(Y(200),Q(),se(N=>N.length<2?[]:this.countries.filter(z=>z.name.toLowerCase().indexOf(N.toLowerCase())>-1).slice(0,10))),this.searchPlace=R=>R.pipe(Y(300),Q(),Ie(()=>this.searching=!0),he(N=>this.locationService.searchPlace(N).pipe(Le(()=>
1(this.toastr.error("Bei der Suche nach St\xE4dten ist ein Fehler aufgetreten"),Fe([]))))),Ie(()=>this.searching=!1));}ngOnInit(){this.startingForm&&this.startingForm.value?this.educationCertificationForm=this.startingForm:this.educationCertificationForm=this.formBuilder.group({education:this.formBuilder.group({name:["",L.required],description:"",location:"",selectedCity:"",country:"",countryName:"",selectedCountry:"",eduStartDate:"",beginMonth:"",beginYear:"",eduEndDate:"",endMonth:"",endYear:"",type:["",L.required]}),certificate:this.formBuilder.group({name:["",[L.required,L.maxLength(255)]],provider:["",[L.required,L.maxLength(50)]]})},{validators:pt.check("education.eduStartDate","education.eduEndDate")}),this.getCountries(),this.stepsService.setCurrentStepIsValid(!0);}addEducation(){if(this.educationCertificationForm.get("education")?.invalid){this.educationCertificationForm.get("education")?.markAllAsTouched();return;}this.savingEducation=!0;let i={};Object.assign(i,this.educationCertificationForm.get("education")?.value),i.typeName=i.type,this.profile.education.push(i),this.profileService.addProfileEducation(this.profile.id,i).pipe(F(this.destroyRef)).subscribe({next:n=>{this.savingEducation=!1,n.success?(this.toastr.success("Bildung wurde erfolgreich hinzugef\xFCgt"),this.addEducationCollapsed=!0,this.educationCertificationForm.reset()):n?.validationErrors?(n?.validationErrors&&Object.keys(n.validationErrors).forEach(r=>{let p=this.educationCertificationForm.get(r);if(p){let E=p.errors||{};p.setErrors(Je(Qe({},E),{apiError:n.validationErrors[r]}));}}),this.toastr.error("Bitte korrigieren Sie Fehler")):this.toastr.error("Beim Hinzuf\xFCgen der Ausbildung ist ein Fehler aufgetreten");}});}addCertification(){if(this.educationCertificationForm.get("certificate")?.invalid){this.educationCertificationForm.get("certificate")?.markAllAsTouched();return;}this.savingCertificate=!0;let i={profileId:this.profile?.id,name:this.educationCertificationForm.get("certificate.name")?.value,provider:this.educationCertificationForm.get("certificate.provider")?.value,file:this.certificationFile};this.profileService.addProfileCertificate(i).pipe(F(this.destroyRef)).subscribe({next:n=>{this.savingCertificate=!1,n.success?(i.id=n.item.id,this.profile.certificates.push(i),this.toastr.success("Zertifikat wurde erfolgreich hinzugef\xFCgt"),this.addCertificationCollapsed=!0,this.educationCertificationForm.reset()):this.toastr.error("Beim Hinzuf\xFCgen eines Zertifikats ist ein Fehler aufgetreten");}});}setStartDate(i){this.educationCertificationForm.get("education.eduStartDate")?.setValue(i);let n=new Date(i);this.educationCertificationForm.get("education")?.patchValue({beginMonth:n.getMonth()+1,beginYear:n.getFullYear()});}setEndDate(i){this.educationCertificationForm.get("education.eduEndDate")?.setValue(i);let n=new Date(i);this.educationCertificationForm.get("education")?.patchValue({endMonth:n.getMonth()+1,endYear:n.getFullYear()});}onSelectCountry(i){this.educationCertificationForm.get("education")?.patchValue({country:i.item.code,countryName:i.item.name});}handleCertificateFileUploaded(i){this.certificationFile=i;}deleteCertificateFile(){this.certificationFile=null;}onChangeCity(){(typeof this.educationCertificationForm.get("education")?.get("selectedCity")?.value=="string"||this.educationCertificationForm.get("education")?.get("selectedCity")?.value instanceof String)&&this.educationCertificationForm.get("education")?.patchValue({location:this.educationCertificationForm.get("education")?.get("selectedCity")?.value});}onSelectCity(i){this.educationCertificationForm.get("education")?.patchValue({location:i.item.place_name});}get education(){return this.educationCertificationForm.get("education");}get certificate(){return this.educationCertificationForm.get("certificate");}get provider(){return this.educationCertificationForm.get("certificate.provider");}get certificateName(){return this.educationCertificationForm.get("certificate.name");}get name(){return this.educationCertificationForm.get("education.name");}get type(){return this.educationCertificationForm.get("education.type");}get description(){return this.educationCertificationForm.get("education.description");}get selectedCountry(){return this.educationCertificationForm.get("education.selectedCountry");}get location(){return this.educationCertificationForm.get("education.location");}get eduStartDate(){return this.educationCertificationForm.get("education.eduStartDate");}get eduEndDate(){return this.educationCertificationForm.get("education.eduEndDate");}getCountries(){this.countryService.getCountries().subscribe(i=>{this.countries=i?.items?i.items.map(n=>({code:n.k,name:n.v})):[];});}editEducation(i){let n=this.profile?.education.find(r=>r.id===i);this.editProfileEducation=this.modalService.open(_i,{scrollable:!0}),this.editProfileEducation.componentInstance.education=n,this.editProfileEducation.componentInstance.profileId=this.profile.id,this.editProfileEducation.result.then(r=>{if(r!==void 0){let p=this.profile?.education.findIndex(E=>E.id===r.id);p!==-1&&(this.profile.education[p]=r);}});}deleteEducation(i){this.confirmDialogService.confirm("L\xF6schen best\xE4tigen?","M\xF6chten Sie diese Ausbildung wirklich l\xF6schen?",()=>this.deleteProfileEducation(i));}editCertificate(i){let n=this.profile?.certificates.find(r=>r.id===i);this.editProfileCertifications=this.modalService.open(li,{scrollable:!0}),this.editProfileCertifications.componentInstance.certificate=n,this.editProfileCertifications.result.then(r=>{if(r!==void 0){let p=this.profile?.certificates.findIndex(E=>E.id===r.id);p!==-1&&(this.profile.certificates[p]=r);}});}deleteCertificate(i){this.confirmDialogService.confirm("L\xF6schen best\xE4tigen?","M\xF6chten Sie diese Zertifizierung wirklich l\xF6schen?",()=>this.deleteProfileCertification(i));}deleteProfileCertification(i){this.profileService.deleteProfileCertification(i).pipe(F(this.destroyRef)).subscribe(n=>{n.success&&(this.toastr.success("Zertifikat erfolgreich gel\xF6scht"),this.profile.certificates=this.profile.certificates.filter(r=>r.id!==i));});}deleteProfileEducation(i){this.profileService.deleteProfileEducation(i).pipe(F(this.destroyRef)).subscribe(n=>{n.success&&(this.toastr.success("Ausbildung erfolgreich gel\xF6scht"),this.profile.education=this.profile.education.filter(r=>r.id!==i));});}hideEducationForm(){this.educationCertificationForm.reset(),this.addEducationCollapsed=!0;}hideCertificationForm(){this.educationCertificationForm.reset(),this.addCertificationCollapsed=!0;}};l.ɵfac=function(n){return new(n||l)(C(b),C(ie),C(G),C(j),C(oe),C(X),C(Se),C(De),C(re));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-educations-certifications"]],inputs:{profile:"profile",step:"step",startingForm:"startingForm"},outputs:{subformInitialized:"subformInitialized"},standalone:!0,features:[U([b,oe,re]),W],decls:91,vars:47,consts:()=>{let i;i="Abbrechen";let n;n="Bildung hinzuf\xFCgen";let r;r="Abbrechen";let p;p="Zertifikat hinzuf\xFCgen";let E;E="Ausbildungen";let u;u=" Sie m\xFCssen auf \u201EAusbildung hinzuf\xFCgen\u201C klicken, um diese neue Ausbildung zur Liste hinzuzuf\xFCgen. ";let I;I="Ausbildung ";let S;S="Abschluss";let g;g="Land";let R;R="Stadt";let N;N="Beschreibung";let z;z="Startdatum";let H;H="Enddatum";let le;le="Zertifikate";let ae;ae="Sie m\xFCssen auf \u201EZertifikat hinzuf\xFCgen\u201C klicken, um dieses neue Zertifikat zur Liste hinzuzuf\xFCgen.";let $;$="Zertifizierungsname";let V;V="Anbieter";let Xe;Xe="Neue Ausbildung hinzuf\xFCgen";let Ge;Ge="Name der Schule ist erforderlich";let Ue;Ue="Schultyp ist erforderlich";let qe;qe="Die maximale L\xE4nge ist "+"\uFFFD0\uFFFD"+" Zeichen.";let Be;Be="Land ist erforderlich";let Ke;Ke="Stadt ist erforderlich";let w;w="Startdatum ist erforderlich";let Tt;Tt="Enddatum ist erforderlich";let gt;gt="Das Enddatum darf nicht nach dem Startdatum liegen.";let St;St="Neues Zertifikat hinzuf\xFCgen";let At;At="Name ist erforderlich";let Nt;Nt="Die maximale L\xE4nge ist "+"\uFFFD0\uFFFD"+" Zeichen.";let Ft;Ft=" Anbieter ist erforderlich ";let Lt;return Lt=" Maximum length is "+"\uFFFD0\uFFFD"+" characters. ",[["collapseAddEducation","ngbCollapse"],["savingEducationTpl",""],["collapseAddCertificate","ngbCollapse"],["savingCertificateTpl",""],E,u,I,S,g,R,N,z,H,le,ae,$,V,Xe,Ge,Ue,qe,Be,Ke,w,Tt,gt,St,At,Nt,Ft,Lt,[1,"d-flex","flex-column","gap-1",3,"formGroup"],[1,"paragraph-base","paragraph-2","text-color-grayscale-2","mb-2","text-color-primary"],[1,"d-flex","flex-column","gap-1"],["class","d-flex justify-content-between",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"paragraph-base","paragraph-2","text-color-grayscale-2","mb-2"],[1,"d-flex","flex-column","gap-2"],["class","w-fit",3,"btnType","clickAction",4,"ngIf"],[3,"ngbCollapseChange","ngbCollapse"],[1,"fst-italic","text-bold","note"],["for","name",1,"form-label","label",3,"control"],["id","name","type","text","aria-label","School","formControlName","name","name","name",1,"field-text"],["class","alert alert-danger label",4,"ngIf"],["for","type",1,"form-label","label",3,"control"],["id","type","type","text","aria-label","Type","formControlName","type","maxlength","50","name","type",1,"field-text"],["for","country",1,"form-label","label",3,"control"],["id","country","name","country","type","text","formControlName","selectedCountry",1,"form-control","field-text",3,"selectItem","ngbTypeahead","inputFormatter","resultFormatter","editable"],["for","location",1,"form-label","label",3,"control"],["id","location","type","text","formControlName","selectedCity",1,"form-control","w-50","field-text",3,"selectItem","change","ngbTypeahead","inputFormatter","resultFormatter"],["for","description",1,"form-label","label",3,"control"],["rows","4","id","description","type","text","aria-label","Description","formControlName","description","name","description","maxlength","250",1,"form-control","field-text"],[3,"maxLength","control"],["for","startDate",1,"form-label","label",3,"control"],[3,"selectedDate","control"],["for","endDate",1,"form-label","label",3,"control"],[1,"d-flex","flex-column","gap-1","mt-2"],[1,"d-flex","justify-content-end"],["type","button","text",i,"class","w-fit mt-2","style","margin-right: 10px",3,"btnType","size","clickAction",4,"ngIf"],["type","button","text",n,"class","w-fit mt-2",3,"btnType","size","clickAction",4,"ngIf","ngIfElse"],[1,"paragraph-base","paragraph-2","text-color-grayscale-2","mt-3","mb-2","text-color-primary"],[1,"paragraph-base","paragraph-2","text-color-grayscale-2","mb-2","d-flex","flex-column","gap-2"],[1,"fst-italic","note"],["for","certificateName",1,"form-label","label",3,"control"],["id","certificateName","formControlName","name","type","text","aria-label","Certification Name","name","certificateName",1,"field-text"],["for","provider",1,"form-label","label",3,"control"],["id","provider","formControlName","provider","type","text","aria-label","Provider","name","provider",1,"field-text"],[1,"mt-2"],[3,"uploadedFile","certificateFile","showUploadedFile"],["type","button","text",r,"class","w-fit mt-2","style","margin-right: 10px",3,"btnType","size","clickAction",4,"ngIf"],["text",p,"class","w-fit mt-2",3,"btnType","size","clickAction",4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-between"],[1,"paragraph-base","paragraph-2","d-flex","align-items-center","gap-1"],["icon","graduation-cap"],[1,"d-flex","gap-1"],["tabindex","0",1,"icon-container-dark","pointer","p-1",3,"click","keydown"],["icon","pencil-simple"],["tabindex","0",1,"icon-container-dark","pointer","p-1",2,"display","inline",3,"click","keydown"],["icon","trash"],[1,"w-fit",3,"clickAction","btnType"],[1,"alert","alert-danger","label"],["type","button","text",i,1,"w-fit","mt-2",2,"margin-right","10px",3,"clickAction","btnType","size"],["type","button","text",n,1,"w-fit","mt-2",3,"clickAction","btnType","size"],["icon","certificate"],["tabindex","0",3,"click","keydown"],["type","button","text",r,1,"w-fit","mt-2",2,"margin-right","10px",3,"clickAction","btnType","size"],["text",p,1,"w-fit","mt-2",3,"clickAction","btnType","size"]];},template:function(n,r){if(n&1){let p=v();a(0,"form")(1,"div",31)(2,"div",32),f(3,4),o(),a(4,"div",33),d(5,ur,9,1,"div",34),o(),d(6,mr,1,0,"hr",35),a(7,"div",36)(8,"span",37),d(9,Cr,2,1,"br-button",38),o()(),a(10,"div",39,0),Pt("ngbCollapseChange",function(u){return P(p),It(r.addEducationCollapsed,u)||(r.addEducationCollapsed=u),O(u);}),a(12,"div",36)(13,"span",37)(14,"small",40),f(15,5),o()()(),a(16,"div")(17,"br-label",41),f(18,6),o(),m(19,"br-input",42),d(20,Or,3,2,"div",43),o(),a(21,"div")(22,"br-label",44),f(23,7),o(),m(24,"br-input",45),d(25,gr,3,2,"div",43),o(),a(26,"div")(27,"br-label",46),f(28,8),o(),a(29,"input",47),T("selectItem",function(u){return P(p),O(r.onSelectCountry(u));}),o(),d(30,Nr,3,2,"div",43),o(),a(31,"div")(32,"br-label",48),f(33,9),o(),a(34,"input",49),T("selectItem",function(u){return P(p),O(r.onSelectCity(u));})("change",function(){return P(p),O(r.onChangeCity());}),o(),d(35,hr,3,2,"div",43),o(),a(36,"div")(37,"br-label",50),f(38,10),o(),m(39,"textarea",51)(40,"app-ch
1aracters-left",52),o(),a(41,"div")(42,"br-label",53),f(43,11),o(),a(44,"app-br-monthly-calendar",54),T("selectedDate",function(u){return P(p),O(r.setStartDate(u));}),o(),d(45,yr,3,2,"div",43),o(),a(46,"div")(47,"br-label",55),f(48,12),o(),a(49,"app-br-monthly-calendar",54),T("selectedDate",function(u){return P(p),O(r.setEndDate(u));}),o(),d(50,kr,4,3,"div",43),o(),a(51,"div",56)(52,"div",57),d(53,$r,1,2,"br-button",58)(54,Dr,1,2,"br-button",59)(55,Wr,1,0,"ng-template",null,1,Ze),o()()()(),a(57,"div",60)(58,"div",33)(59,"span"),f(60,13),o()()(),a(61,"div",33),d(62,Vr,9,1,"div",34),o(),d(63,zr,1,0,"hr",35),a(64,"div",61),d(65,Xr,2,1,"br-button",38),o(),a(66,"div",39,2),Pt("ngbCollapseChange",function(u){return P(p),It(r.addCertificationCollapsed,u)||(r.addCertificationCollapsed=u),O(u);}),a(68,"div",61)(69,"small",62),f(70,14),o()(),a(71,"div",31)(72,"div")(73,"br-label",63),f(74,15),o(),m(75,"br-input",64),d(76,Br,4,3,"div",43),o(),a(77,"div")(78,"br-label",65),f(79,16),o(),m(80,"br-input",66),d(81,Hr,4,3,"div",43),a(82,"div",67)(83,"app-upload-document",68),T("uploadedFile",function(u){return P(p),O(r.handleCertificateFileUploaded(u));}),o()(),d(84,Yr,5,1,"p",35),o(),a(85,"div",56)(86,"div",57),d(87,Qr,1,2,"br-button",69)(88,Jr,1,2,"br-button",70)(89,en,1,0,"ng-template",null,3,Ze),o()()()()();}if(n&2){let p,E,u,I,S,g,R,N=ee(56),z=ee(90);_(),s("formGroup",r.education),_(4),s("ngForOf",r.profile==null?null:r.profile.education),_(),s("ngIf",(r.profile==null||r.profile.education==null?null:r.profile.education.length)>0),_(3),s("ngIf",r.addEducationCollapsed),_(),Ct("ngbCollapse",r.addEducationCollapsed),_(7),s("control",r.name),_(3),s("ngIf",((p=r.educationCertificationForm.get("education.name"))==null?null:p.invalid)&&(((p=r.educationCertificationForm.get("education.name"))==null?null:p.dirty)||((p=r.educationCertificationForm.get("education.name"))==null?null:p.touched))),_(2),s("control",r.type),_(3),s("ngIf",((E=r.educationCertificationForm.get("education.type"))==null?null:E.invalid)&&(((E=r.educationCertificationForm.get("education.type"))==null?null:E.dirty)||((E=r.educationCertificationForm.get("education.type"))==null?null:E.touched))),_(2),s("control",r.selectedCountry),_(2),s("ngbTypeahead",r.searchCountry)("inputFormatter",r.formatterCountry)("resultFormatter",r.formatterCountry)("editable",!1),_(),s("ngIf",r.selectedCountry.invalid&&(r.selectedCountry.dirty||r.selectedCountry.touched)),_(2),s("control",r.location),_(2),s("ngbTypeahead",r.searchPlace)("inputFormatter",r.formatterPlace)("resultFormatter",r.formatterPlace),_(),s("ngIf",((u=r.educationCertificationForm.get("education.location"))==null?null:u.invalid)&&(((u=r.educationCertificationForm.get("education.location"))==null?null:u.dirty)||((u=r.educationCertificationForm.get("education.location"))==null?null:u.touched))),_(2),s("control",r.description),_(3),s("maxLength",250)("control",r.description),_(2),s("control",r.eduStartDate),_(2),s("control",r.eduStartDate),_(),s("ngIf",((I=r.educationCertificationForm.get("education.eduStartDate"))==null?null:I.invalid)&&(((I=r.educationCertificationForm.get("education.eduStartDate"))==null?null:I.dirty)||((I=r.educationCertificationForm.get("education.eduStartDate"))==null?null:I.touched))),_(2),s("control",r.eduEndDate),_(2),s("control",r.eduEndDate),_(),s("ngIf",((S=r.educationCertificationForm.get("education.eduEndDate"))==null?null:S.invalid)&&(((S=r.educationCertificationForm.get("education.eduEndDate"))==null?null:S.dirty)||((S=r.educationCertificationForm.get("education.eduEndDate"))==null?null:S.touched))),_(3),s("ngIf",!r.savingEducation),_(),s("ngIf",!r.savingEducation)("ngIfElse",N),_(8),s("ngForOf",r.profile==null?null:r.profile.certificates),_(),s("ngIf",(r.profile==null||r.profile.certificates==null?null:r.profile.certificates.length)>0),_(2),s("ngIf",r.addCertificationCollapsed),_(),Ct("ngbCollapse",r.addCertificationCollapsed),_(5),s("formGroup",r.certificate),_(2),s("control",r.certificateName),_(3),s("ngIf",((g=r.educationCertificationForm.get("certificate.name"))==null?null:g.invalid)&&(((g=r.educationCertificationForm.get("certificate.name"))==null?null:g.dirty)||((g=r.educationCertificationForm.get("certificate.name"))==null?null:g.touched))
1),_(2),s("control",r.provider),_(3),s("ngIf",((R=r.educationCertificationForm.get("certificate.provider"))==null?null:R.invalid)&&(((R=r.educationCertificationForm.get("certificate.provider"))==null?null:R.dirty)||((R=r.educationCertificationForm.get("certificate.provider"))==null?null:R.touched))),_(2),s("certificateFile",r.certificationFile)("showUploadedFile",!1),_(),s("ngIf",r.certificationFile),_(3),s("ngIf",!r.savingCertificate),_(),s("ngIf",!r.savingCertificate)("ngIfElse",z);}},dependencies:[Ee,de,q,Z,te,Pe,ue,B,we,K,me,oi,Oe,fe,ge,Te,ne,at,dt,Ce,We,Jt,Qt],encapsulation:2});let e=l;return e;})();function tn(e,l){if(e&1){let t=v();a(0,"div")(1,"div",52)(2,"span",53),m(3,"br-svg-icon",54),A(4),o(),a(5,"div",55)(6,"span",56),T("click",function(){let n=P(t).$implicit,r=c();return O(r.editWork(n.id));})("keydown",function(){let n=P(t).$implicit,r=c();return O(r.editWork(n.id));}),m(7,"br-svg-icon",57),o(),a(8,"span",56),T("click",function(){let n=P(t).$implicit,r=c();return O(r.deleteWork(n.id));})("keydown",function(){let n=P(t).$implicit,r=c();return O(r.deleteWork(n.id));}),m(9,"br-svg-icon",58),o()()()();}if(e&2){let t=l.$implicit;_(4),h(" ",t==null?null:t.company," ");}}function rn(e,l){e&1&&m(0,"hr");}function nn(e,l){e&1&&(a(0,"div"),f(1,12),o());}function on(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("company"))==null||t.errors==null?null:t.errors.apiError," ");}}function ln(e,l){if(e&1&&(a(0,"div",59),d(1,nn,2,0,"div",25)(2,on,2,1,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.workExperienceForm.get("company"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.workExperienceForm.get("company"))==null||i.errors==null?null:i.errors.apiError);}}function an(e,l){e&1&&(a(0,"div"),f(1,13),o());}function _n(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("selectedCountry"))==null||t.errors==null?null:t.errors.apiError," ");}}function sn(e,l){if(e&1&&(a(0,"div",59),d(1,an,2,0,"div",25)(2,_n,2,1,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.workExperienceForm.get("selectedCountry"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.workExperienceForm.get("selectedCountry"))==null||i.errors==null?null:i.errors.apiError);}}function cn(e,l){e&1&&(a(0,"div"),f(1,14),o());}function pn(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("city"))==null||t.errors==null?null:t.errors.apiError," ");}}function dn(e,l){if(e&1&&(a(0,"div",59),d(1,cn,2,0,"div",25)(2,pn,2,1,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.workExperienceForm.get("city"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.workExperienceForm.get("city"))==null||i.errors==null?null:i.errors.apiError);}}function En(e,l){if(e&1&&(a(0,"option",60),A(1),o()),e&2){let t=l.$implicit;s("value",t.id),_(),h(" ",t.name," ");}}function fn(e,l){e&1&&(a(0,"div"),f(1,15),o());}function un(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("selectedIndustry"))==null||t.errors==null?null:t.errors.apiError," ");}}function mn(e,l){if(e&1&&(a(0,"div",59),d(1,fn,2,0,"div",25)(2,un,2,1,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.workExperienceForm.get("selectedIndustry"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.workExperienceForm.get("selectedIndustry"))==null||i.errors==null?null:i.errors.apiError);}}function Cn(e,l){e&1&&(a(0,"div"),f(1,16),o());}function In(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("position"))==null||t.errors==null?null:t.errors.apiError," ");}}function Pn(e,l){if(e&1&&(a(0,"div",59),d(1,Cn,2,0,"div",25)(2,In,2,1,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.workExperienceForm.get("position"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.workExperienceForm.get("position"))==null||i.errors==null?null:i.errors.apiError);}}function On(e,l){e&1&&(a(0,"div"),f(1,17),o());}function Rn(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("workStartDate"))==null||t.errors==null?null:t.errors.apiError," ");}}function Tn(e,l){if(e&1&&(a(0,"div",59),d(1,On,2,0,"div",25)(2,Rn,2,1,"div",25),o()),e&2){let t,i,n=c();_(),s("ngIf",(t=n.workExperienceForm.get("workStartDate"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=n.workExperienceForm.get("workStartDate"))==null||i.errors==null?null:i.errors.apiError);}}function gn(e,l){e&1&&(a(0,"div"),f(1,18),o());}function Sn(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t,i=c(2);_(),h(" ",(t=i.workExperienceForm.get("workEndDate"))==null||t.errors==null?null:t.errors.apiError," ");}}function An(e,l){e&1&&(a(0,"div"),f(1,19),o());}function Nn(e,l){if(e&1&&(a(0,"div",59),d(1,gn,2,0,"div",25)(2,Sn,2,1,"div",25)(3,An,2,0,"div",25),o()),e&2){let t,i,n,r=c();_(),s("ngIf",(t=r.workExperienceForm.get("workEndDate"))==null||t.errors==null?null:t.errors.required),_(),s("ngIf",(i=r.workExperienceForm.get("workEndDate"))==null||i.errors==null?null:i.errors.apiError),_(),s("ngIf",(n=r.workExperienceForm.get("workEndDate"))==null||n.errors==null?null:n.errors.dateRange);}}function Fn(e,l){e&1&&(a(0,"div"),f(1,20),o());}function Ln(e,l){if(e&1&&(a(0,"div"),A(1),o()),e&2){let t=c(2);_(),h(" ",t.description==null||t.description.errors==null?null:t.description.errors.apiError," ");}}function hn(e,l){if(e&1&&(a(0,"div",59),d(1,Fn,2,0,"div",25)(2,Ln,2,1,"div",25),o()),e&2){let t=c();_(),s("ngIf",t.description.errors==null?null:t.description.errors.required),_(),s("ngIf",t.description==null||t.description.errors==null?null:t.description.errors.apiError);}}function vn(e,l){if(e&1){let t=v();a(0,"br-button",61),T("clickAction",function(){P(t);let n=c();return O(n.addWorkExperience());}),o();}if(e&2){let t=c();s("btnType",t.EButtonType.BUTTON_PRIMARY)("size",t.EButtonSize.BUTTON_SIZE_S);}}function Mn(e,l){e&1&&m(0,"br-spinner");}var Li=(()=>{let l=class l{constructor(i,n,r,p,E,u,I,S,g,R){this.industryService=i,this.profileService=n,this.formBuilder=r,this.destroyRef=p,this.toastr=E,this.countryService=u,this.stepsService=I,this.confirmDialogService=S,this.modalService=g,this.locationService=R,this.subformInitialized=new J(),this.formatterCountry=N=>N.name,this.formatterPlace=N=>N.place_name?`${N.place_name}`:"",this.EButtonType=xe,this.EButtonSize=be,this.savingWorkExperience
1=!1,this.searching=!1,this.searchPlace=N=>N.pipe(Y(300),Q(),Ie(()=>this.searching=!0),he(z=>this.locationService.searchPlace(z).pipe(Le(()=>(this.toastr.error("Bei der Suche nach St\xE4dten ist ein Fehler aufgetreten"),Fe([]))))),Ie(()=>this.searching=!1)),this.searchCountry=N=>N.pipe(Y(200),Q(),se(z=>z.length<2?[]:this.countries.filter(H=>H.name.toLowerCase().indexOf(z.toLowerCase())>-1).slice(0,10)));}ngOnInit(){this.startingForm&&this.startingForm.value?this.workExperienceForm=this.startingForm:this.workExperienceForm=this.formBuilder.group({city:["",L.required],selectedCity:[""],country:["",L.required],countryName:"",selectedCountry:["",L.required],company:["",L.required],hideCompany:!1,position:["",L.required],branch:["",L.required],selectedIndustry:"",workStartDate:["",L.required],beginMonth:["",L.required],beginYear:["",L.required],workEndDate:["",L.required],endMonth:"",endYear:"",ongoing:!1,description:["",L.required]},{validators:pt.check("workStartDate","workEndDate")}),this.getIndustries(),this.getCountries(),this.stepsService.setCurrentStepIsValid(this.isCurrentStepValid());}get company(){return this.workExperienceForm.get("company");}get selectedCountry(){return this.workExperienceForm.get("selectedCountry");}get city(){return this.workExperienceForm.get("city");}get selectedIndustry(){return this.workExperienceForm.get("selectedIndustry");}get position(){return this.workExperienceForm.get("position");}get workStartDate(){return this.workExperienceForm.get("workStartDate");}get workEndDate(){return this.workExperienceForm.get("workEndDate");}get description(){return this.workExperienceForm.get("description");}getIndustries(){this.industryService.getIndustries().pipe(F(this.destroyRef)).subscribe(i=>{this.industries=i.items;});}
1addWorkExperience(){if(this.workExperienceForm.invalid){this.workExperienceForm.markAllAsTouched();return;}this.savingWorkExperience=!0;let i={branch:this.workExperienceForm.get("branch")?.value,selectedBranch:["",L.required],position:this.workExperienceForm.get("position")?.value,company:this.workExperienceForm.get("company")?.value,description:this.workExperienceForm.get("description")?.value,beginMonth:this.workExperienceForm.get("beginMonth")?.value,beginYear:this.workExperienceForm.get("beginYear")?.value,endMonth:this.workExperienceForm.get("endMonth")?.value,endYear:this.workExperienceForm.get("endYear")?.value,location:this.workExperienceForm.get("city")?.value,country:this.workExperienceForm.get("country")?.value,countryName:this.workExperienceForm.get("countryName")?.value,categories:[],ongoing:this.workExperienceForm.get("ongoing")?.value,referenceType:"projectExperience",verificationStatus:null,hideCompany:this.workExperienceForm.get("hideCompany")?.value};this.profileService.addProfileWorkExperience(this.profile.id,i).pipe(F(this.destroyRef)).subscribe(n=>{this.savingWorkExperience=!1,n.success?(i.id=n.id,this.profile.workExperience.push(i),this.toastr.success("Berufserfahrung wurde erfolgreich hinzugef\xFCgt"),this.workExperienceForm.reset(),this.workExperienceForm.get("workEndDate")?.enable(),this.stepsService.setCurrentStepIsValid(this.isCurrentStepValid())):n?.validationErrors?(n?.validationErrors&&Object.keys(n.validationErrors).forEach(r=>{let p=this.workExperienceForm.get(r);if(p){let E=p.errors||{};p.setErrors(Je(Qe({},E),{apiError:n.validationErrors[r]}));}}),this.toastr.error("Bitte korrigieren Sie Fehler")):this.toastr.error(n?.message);});}setWorkStartDate(i){this.workExperienceForm.get("workStartDate")?.setValue(i);let n=new Date(this.workExperienceForm.get("workStartDate")?.value);this.workExperienceForm.patchValue({beginMonth:n.getMonth()+1,beginYear:n.getFullYear()});}setWorkEndDate(i){this.workExperienceForm.get("workEndDate")?.setValue(i);let n=new Date(this.workExperienceForm.get("workEndDate")?.value);this.workExperienceForm.patchValue({endMonth:n.getMonth()+1,endYear:n.getFullYear()});}changeIndustry(){let i={id:this.workExperienceForm.get("selectedIndustry")?.value,name:""};this.workExperienceForm.patchValue({branch:i});}toggleDeadlineDate(){this.workExperienceForm?.get("ongoing")?.value?(this.workExperienceForm.get("workEndDate")?.reset(),this.workExperienceForm.get("workEndDate")?.disable(),this.workExperienceForm.get("workEndDate")?.setValidators(null)):(this.workExperienceForm.controls.workEndDate.setValidators([L.required]),this.workExperienceForm.controls.workEndDate.updateValueAndValidity(),this.workExperienceForm.get("workEndDate")?.enable(),this.workExperienceForm.get("workEndDate")?.markAsTouched());}getCountries(){this.countryService.getCountries().pipe(F(this.destroyRef)).subscribe(i=>{this.countries=i?.items?i.items.map(n=>({code:n.k,name:n.v})):[];});}onSelectCountry(i){this.workExperienceForm.patchValue({country:i.item.code,countryName:i.item.name});}editWork(i){let n=this.profile?.workExperience.find(r=>r.id===i);this.editProfileWorkExperience=this.modalService.open(ai,{scrollable:!0}),this.editProfileWorkExperience.componentInstance.profileId=this.profile.id,this.editProfileWorkExperience.componentInstance.workExperience=n,this.editProfileWorkExperience.result.then(r=>{if(r!==void 0){let p=this.profile?.workExperience.findIndex(E=>E.id===r.id);p!==-1&&(this.profile.workExperience[p]=r);}});}deleteWork(i){this.confirmDialogService.confirm("L\xF6schen best\xE4tigen?","M\xF6chten Sie diese Berufserfahrung wirklich l\xF6schen?",()=>this.deleteWorkExperience(i));}onChangeCity(){(typeof this.workExperienceForm.get("selectedCity")?.value=="string"||this.workExperienceForm.get("selectedCity")?.value instanceof String)&&this.workExperienceForm.patchValue({city:this.workExperienceForm.get("selectedCity")?.value});}onSelectCity(i){this.workExperienceForm.patchValue({city:i.item.place_name});}deleteWorkExperience(i){this.profileService.deleteProfileWorkExperience(i).pipe(F(this.destroyRef)).subscribe(n=>
1{n.success&&(this.profile.workExperience=this.profile.workExperience.filter(r=>r.id!==i),this.stepsService.setCurrentStepIsValid(this.isCurrentStepValid()));});}isCurrentStepValid(){return this.profile?.workExperience?.length>=3;}};l.ɵfac=function(n){return new(n||l)(C(Re),C(b),C(j),C(G),C(ie),C(oe),C(X),C(Se),C(De),C(re));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-work-experience"]],inputs:{profile:"profile",step:"step",startingForm:"startingForm"},outputs:{subformInitialized:"subformInitialized"},standalone:!0,features:[U([Re,b,oe,re]),W],decls:64,vars:34,consts:()=>{let i;i="Firmennamen anonymisiert";let n;n=" Ich arbeite derzeit hier";let r;r="Berufserfahrung hinzuf\xFCgen";let p;p="Berufserfahrung";let E;E="Neue Erfahrung hinzuf\xFCgen";let u;u="Sie m\xFCssen auf \u201EBerufserfahrung hinzuf\xFCgen\u201C klicken, um dieses neue Berufserfahrung zur Liste hinzuzuf\xFCgen.";let I;I="Firmenname";let S;S="Land";let g;g="Stadt";let R;R="Branche";let N;N="Position";let z;z="Startdatum";let H;H="Enddatum";let le;le="Beschreibung";let ae;ae="Firma ist erforderlich";let $;$="Land ist erforderlich";let V;V="Stadt ist erforderlich";let Xe;Xe=" Branche ist gefragt ";let Ge;Ge="Beruf ist erforderlich";let Ue;Ue="Startdatum ist erforderlich";let qe;qe="Enddatum ist erforderlich";let Be;Be="Das Enddatum darf nicht nach dem Startdatum liegen.";let Ke;return Ke="Beschreibung ist erforderlich",[["savingWorkExperienceTpl",""],p,E,u,I,S,g,R,N,z,H,le,ae,$,V,Xe,Ge,Ue,qe,Be,Ke,[1,"d-flex","flex-column","gap-2",3,"formGroup"],[1,"paragraph-base","paragraph-2","text-color-primary","d-flex","flex-column","gap-2"],[1,"d-flex","flex-column","gap-2"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"paragraph-base","paragraph-2","text-color-grayscale-2","mb-2","d-flex","flex-column","gap-2"],[1,"fst-italic","note"],["for","company",1,"form-label","label",3,"control"],["id","company","type","text","aria-label","School","formControlName","company","name","company",1,"field-text"],["class","alert alert-danger label",4,"ngIf"],[1,"mt-2"],["id","hideCompany","name","hideCompany","formControlName","hideCompany","label",i],["for","country",1,"form-label","label",3,"control"],["id","country","name","country","type","text","formControlName","selectedCountry",1,"form-control","field-text",3,"selectItem","ngbTypeahead","inputFormatter","resultFormatter","editable"],["for","city",1,"form-label","label",3,"control"],["id","location","type","text","formControlName","selectedCity",1,"form-control","w-50","field-text",3,"selectItem","change","ngbTypeahead","inputFormatter","resultFormatter"],["for","industry",1,"form-label","label",3,"control"],["id","industry","name","industry","formControlName","selectedIndustry",1,"form-select","field-text",3,"change"],[3,"value",4,"ngFor","ngForOf"],["for","occupation",1,"form-label","label",3,"control"],["formControlName","position","id","occupation","type","text","aria-label","Occupation","name","occupation",1,"field-text"],["for","startDate",1,"form-label","label",3,"control"],[3,"selectedDate","control"],["for","endDate",1,"form-label","label",3,"control"],[3,"selectedDate","control","disabled"],["id","ongoing","name","ongoing","formControlName","ongoing","label",n,3,"click"],["for","description",1,"form-label","label",3,"control"],["formControlName","description","rows","5","id","description","aria-label","Description","name","description","maxlength","2000",1,"form-control","field-text"],[3,"maxLength","control"],[1,"d-flex","justify-content-end"],["text",r,"class","w-fit mt-2",3,"btnType","size","clickAction",4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-between"],[1,"paragraph-base","paragraph-2","d-flex","align-items-center","gap-1"],["icon","buildings"],[1,"d-flex","gap-1"],["tabindex","0",1,"icon-container-dark","pointer","p-1",2,"display","inline",3,"click","keydown"],["icon","pencil-simple"],["icon","trash"],[1,"alert","alert-danger","label"],[3,"value"],["text",r,1,"w-fit","mt-2",3,"clickAction","btnType","size"]];},template:function(n,r){if(n&1){let p=v();a(0,"form",21)(1,"div",22)(2,"span"),f(3,1),o()(),a(4,"div",23),d(5,tn,10,1,"div",24),o(),d(6,rn,1,0,"hr",25),a(7,"div",26)(8,"span"),f(9,2),o(),a(10,"small",27),f(11,3),o()(),a(12,"div")(13,"br-label",28),f(14,4),o(),m(15,"br-input",29),d(16,ln,3,2,"div",30),o(),a(17,"div",31),m(18,"br
1-checkbox",32),o(),a(19,"div")(20,"br-label",33),f(21,5),o(),a(22,"input",34),T("selectItem",function(u){return P(p),O(r.onSelectCountry(u));}),o(),d(23,sn,3,2,"div",30),o(),a(24,"div")(25,"br-label",35),f(26,6),o(),a(27,"input",36),T("selectItem",function(u){return P(p),O(r.onSelectCity(u));})("change",function(){return P(p),O(r.onChangeCity());}),o(),d(28,dn,3,2,"div",30),o(),a(29,"div")(30,"br-label",37),f(31,7),o(),a(32,"select",38),T("change",function(){return P(p),O(r.changeIndustry());}),d(33,En,2,2,"option",39),o(),d(34,mn,3,2,"div",30),o(),a(35,"div")(36,"br-label",40),f(37,8),o(),m(38,"br-input",41),d(39,Pn,3,2,"div",30),o(),a(40,"div")(41,"br-label",42),f(42,9),o(),a(43,"app-br-monthly-calendar",43),T("selectedDate",function(u){return P(p),O(r.setWorkStartDate(u));}),o(),d(44,Tn,3,2,"div",30),o(),a(45,"div")(46,"br-label",44),f(47,10),o(),a(48,"app-br-monthly-calendar",45),T("selectedDate",function(u){return P(p),O(r.setWorkEndDate(u));}),o(),d(49,Nn,4,3,"div",30),o(),a(50,"div",31)(51,"br-checkbox",46),T("click",function(){return P(p),O(r.toggleDeadlineDate());}),o()(),a(52,"div")(53,"div")(54,"br-label",47),f(55,11),o(),m(56,"textarea",48),d(57,hn,3,2,"div",30),m(58,"app-characters-left",49),o()(),a(59,"div")(60,"div",50),d(61,vn,1,2,"br-button",51)(62,Mn,1,0,"ng-template",null,0,Ze),o()()();}if(n&2){let p,E,u,I,S,g,R,N=ee(63);s("formGroup",r.workExperienceForm),_(5),s("ngForOf",r.profile==null?null:r.profile.workExperience),_(),s("ngIf",(r.profile==null||r.profile.workExperience==null?null:r.profile.workExperience.length)>0),_(7),s("control",r.company),_(3),s("ngIf",r.company.invalid&&(r.company.dirty||r.company.touched)),_(4),s("control",r.selectedCountry),_(2),s("ngbTypeahead",r.searchCountry)("inputFormatter",r.formatterCountry)("resultFormatter",r.formatterCountry)("editable",!1),_(),s("ngIf",((p=r.workExperienceForm.get("selectedCountry"))==null?null:p.invalid)&&(((p=r.workExperienceForm.get("selectedCountry"))==null?null:p.dirty)||((p=r.workExperienceForm.get("selectedCountry"))==null?null:p.touched))),_(2),s("control",r.city),_(2),s("ngbTypeahead",r.searchPlace)("inputFormatter",r.formatterPlace)("resultFormatter",r.formatterPlace),_(),s("ngIf",((E=r.workExperienceForm.get("city"))==null?null:E.invalid)&&(((E=r.workExperienceForm.get("city"))==null?null:E.dirty)||((E=r.workExperienceForm.get("city"))==null?null:E.touched))),_(2),s("control",r.selectedIndustry),_(3),s("ngForOf",r.industries),_(),s("ngIf",((u=r.workExperienceForm.get("selectedIndustry"))==null?null:u.invalid)&&(((u=r.workExperienceForm.get("selectedIndustry"))==null?null:u.dirty)||((u=r.workExperienceForm.get("selectedIndustry"))==null?null:u.touched))),_(2),s("control",r.position),_(3),s("ngIf",((I=r.workExperienceForm.get("position"))==null?null:I.invalid)&&(((I=r.workExperienceForm.get("position"))==null?null:I.dirty)||((I=r.workExperienceForm.get("position"))==null?null:I.touched))),_(2),s("control",r.workStartDate),_(2),s("control",r.workStartDate),_(),s("ngIf",((S=r.workExperienceForm.get("workStartDate"))==null?null:S.invalid)&&(((S=r.workExperienceForm.get("workStartDate"))==null?null:S.dirty)||((S=r.workExperienceForm.get("workStartDate"))==null?null:S.touched))),_(2),s("control",r.workEndDate),_(2),s("control",r.workEndDate)("disabled",(g=r.workExperienceForm.get("ongoing"))==null?null:g.value),_(),s("ngIf",((R=r.workExperienceForm.get("workEndDate"))==null?null:R.invalid)&&(((R=r.workExperienceForm.get("workEndDate"))==null?null:R.dirty)||((R=r.workExperienceForm.get("workEndDate"))==null?null:R.touched))),_(5),s("control",r.description),_(3),s("ngIf",r.description.invalid&&(r.description.dirty||r.description.touched)),_(),s("maxLength",2e3)("control",r.description),_(3),s("ngIf",!r.savingWorkExperience)("ngIfElse",N);}},dependencies:[Ee,de,q,Z,te,Ht,Yt,Pe,Zt,ue,B,we,K,me,Oe,fe,ge,Te,ne,at,dt,Ce,ei,We],encapsulation:2});let e=l;return e;})();var hi=(()=>{let l=class l{constructor(i){this.router=i,this.ERoutes=ft;}navigate(){this.router.navigate([this.ERoutes.PORTAL,this.ERoutes.DASHBOARD]);}};l.ɵfac=function(n){return new(n||l)(C(nt));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-profile-submitted"]],standalone:!0,features:[W],decls:4,vars:0,consts:()=>{let i;i="Zum Dashboard";let n;return n=" Wir werden Ihr Profil in K\xFCrze pr\xFCfen.\n",[n,[1,"paragraph-base","paragraph-2"],[1,"mt-4"],["text",i,1,"w-fit",3,"clickAction"]];},template:function(n,r){n&1&&(a(0,"p",1),f(1,0),o(),a(2,"div",2)(3,"br
1-button",3),T("clickAction",function(){return r.navigate();}),o()());},dependencies:[fe],encapsulation:2});let e=l;return e;})();var xn=()=>[de,q,Xt,import("./chunk-KUUJSL2S.js").then(e=>e.SvgIconComponent),import("./chunk-CMIKYLAL.js").then(e=>e.TagComponent),import("./chunk-ZA3OTSPE.js").then(e=>e.WorkExperienceItemComponent),import("./chunk-6HB7LYQ7.js").then(e=>e.EducationItemComponent),import("./chunk-RSRP6IXY.js").then(e=>e.CertificationItemComponent)];function bn(e,l){e&1&&m(0,"img",19);}function wn(e,l){if(e&1&&m(0,"img",53),e&2){let t=c(2);s("src",t.currentProfile==null?null:t.currentProfile.pictureUrl,tt);}}function kn(e,l){if(e&1&&(a(0,"h6",23),A(1),o()),e&2){let t=c(2);_(),h(" ",t.currentProfile==null?null:t.currentProfile.firstname," ");}}function $n(e,l){e&1&&m(0,"span",54);}function Dn(e,l){if(e&1&&(a(0,"h6",23),A(1),o()),e&2){let t=c(2);_(),h(" ",t.currentProfile==null?null:t.currentProfile.lastname," ");}}function Wn(e,l){e&1&&m(0,"span",54);}function Vn(e,l){if(e&1&&(a(0,"span",25),A(1),o()),e&2){let t=c(2);_(),h(" ",t.currentProfile==null?null:t.currentProfile.profileTitle," ");}}function zn(e,l){e&1&&m(0,"span",55);}function Xn(e,l){if(e&1&&(a(0,"span",35),A(1),x(2,"number"),o()),e&2){let t=c(3);_(),h(" ",$t(2,1,t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.dayRate,"","de-DE")," \u20AC ");}}function Gn(e,l){e&1&&(a(0,"span"),f(1,12),o());}function Un(e,l){if(e&1&&d(0,Xn,3,5,"span",56)(1,Gn,2,0,"span",52),e&2){let t=c(2);s("ngIf",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.dayRate),_(),s("ngIf",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.dayRateWhenAsked);}}function qn(e,l){e&1&&m(0,"span",55);}function Bn(e,l){if(e&1&&(a(0,"span",35),f(1,13),o()),e&2){let t=c(2);_(),ve(t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.workExperienceSince),Me(1);}}function Kn(e,l){e&1&&m(0,"span",55);}function jn(e,l){if(e&1&&(a(0,"span"),A(1),o()),e&2){let t=l.$implicit;_(),h(" ",t.languageName," ");}}function Zn(e,l){if(e&1&&d(0,jn,2,1,"span",57),e&2){let t=c(2);s("ngForOf",t.currentProfile==null?null:t.currentProfile.languages);}}function Hn(e,l){e&1&&m(0,"span",55);}function Yn(e,l){if(e&1&&(a(0,"span",35),A(1),o()),e&2){let t=c(3);_(),h(" ",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.city,", ");}}function Qn(e,l){if(e&1&&(a(0,"span",35),A(1),o()),e&2){let t=c(3);_(),h(" ",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.countryName," ");}}function Jn(e,l){if(e&1&&(a(0,"div",38),d(1,Yn,2,1,"span",56)(2,Qn,2,1,"span",56),o()),e&2){let t=c(2);_(),s("ngIf",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.city),_(),s("ngIf",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.countryName);}}function eo(e,l){e&1&&m(0,"span",55);}function to(e,l){if(e&1&&(a(0,"span",35),A(1),o()),e&2){let t=c(2);_(),h(" ",t.currentProfile==null?null:t.currentProfile.email," ");}}function io(e,l){e&1&&m(0,"span",55);}function ro(e,l){if(e&1&&(a(0,"span",35),A(1),o()),e&2){let t=c(2);_(),h(" ",t.currentProfile==null||t.currentProfile.generalInformation==null?null:t.currentProfile.generalInformation.phone," ");}}function no(e,l){e&1&&m(0,"span",55);}function oo(e,l){if(e&1&&m(0,"br-tag",59),e&2){let t=l.$implicit,i=c(3);s("text",t==null||t.industry==null?null:t.industry.name)("type",i.ETagType.TAG_PRIMARY_OUTLINE)("xs",!0);}}function lo(e,l){if(e&1&&(a(0,"div",44),d(1,oo,1,3,"br-tag",58),o()),e&2){let t=c(2);_(),s("ngForOf",t.currentProfile==null?null:t.currentProfile.industries);}}function ao(e,l){e&1&&(a(0,"div",18),m(1,"span",60)(2,"span",61)(3,"span",61),o());}function _o(e,l){if(e&1&&m(0,"br-tag",59),e&2){let t=l.$implicit,i=c(3);s("text",t.name)("type",i.ETagType.TAG_SECONDARY_OUTLINE)("xs",!0);}}function so(e,l){if(e&1&&(a(0,"div",44),d(1,_o,1,3,"br-tag",58),o()),e&2){let t=c(2);_(),s("ngForOf",t.currentProfile==null?null:t.currentProfile.skillOffers);}}
1function co(e,l){e&1&&(a(0,"div",18),m(1,"span",60)(2,"span",61)(3,"span",61),o());}function po(e,l){if(e&1&&m(0,"br-tag",59),e&2){let t=l.$implicit,i=c(3);s("text",t.languageName)("type",i.ETagType.TAG_PRIMARY_OUTLINE)("xs",!0);}}function Eo(e,l){if(e&1&&(a(0,"div",44),d(1,po,1,3,"br-tag",58),o()),e&2){let t=c(2);_(),s("ngForOf",t.currentProfile==null?null:t.currentProfile.languages);}}function fo(e,l){e&1&&(a(0,"div",62),m(1,"span",60)(2,"span",61)(3,"span",61),o());}function uo(e,l){if(e&1&&(a(0,"p",47),A(1),o()),e&2){let t=c(2);_(),h(" ",t.currentProfile==null?null:t.currentProfile.personalSummary," ");}}function mo(e,l){e&1&&(a(0,"div",63),m(1,"span",55)(2,"span",55)(3,"span",55),o());}function Co(e,l){if(e&1&&m(0,"app-work-experience-item",50),e&2){let t=l.$implicit;s("workExperience",t)("editMode",!1)("deleteMode",!1);}}function Io(e,l){if(e&1&&d(0,Co,1,3,"app-work-experience-item",64),e&2){let t=c(2);s("ngForOf",t.currentProfile==null?null:t.currentProfile.workExperience);}}function Po(e,l){e&1&&(a(0,"div",63),m(1,"span",55)(2,"span",55),o());}function Oo(e,l){if(e&1&&m(0,"app-education-item",66),e&2){let t=l.$implicit;s("education",t)("editMode",!1)("deleteMode",!1);}}function Ro(e,l){if(e&1&&(a(0,"div",16),d(1,Oo,1,3,"app-education-item",65),o()),e&2){let t=c(2);_(),s("ngForOf",t.currentProfile==null?null:t.currentProfile.education);}}function To(e,l){e&1&&(a(0,"div",63),m(1,"span",55)(2,"span",55),o());}function go(e,l){if(e&1&&m(0,"app-certification-item",68),e&2){let t=l.$implicit;s("certification",t)("editMode",!1)("deleteMode",!1);}}function So(e,l){if(e&1&&(a(0,"div",16),d(1,go,1,3,"app-certification-item",67),o()),e&2){let t=c(3);_(),s("ngForOf",t.currentProfile==null?null:t.currentProfile.certificates);}}function Ao(e,l){e&1&&(a(0,"div",63),m(1,"span",55)(2,"span",55),o());}function No(e,l){if(e&1&&(a(0,"div")(1,"div",51)(2,"span",49),A(3," Certifications "),o()(),d(4,So,2,1,"div",16)(5,Ao,3,0),o()),e&2){let t=c(2);_(4),y(4,!(t.currentProfile==null||t.currentProfile.certificates==null)&&t.currentProfile.certificates.length?4:5);}}function Fo(e,l){if(e&1&&(a(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18),d(4,bn,1,0,"img",19)(5,wn,1,1),a(6,"div",20)(7,"div",21)(8,"div",22),d(9,kn,2,1,"h6",23)(10,$n,1,0)(11,Dn,2,1,"h6",23)(12,Wn,1,0),o(),a(13,"span",24),d(14,Vn,2,1,"span",25)(15,zn,1,0),o()()()()(),a(16,"div",26)(17,"div",27)(18,"span",28),f(19,0),o()(),a(20,"div",29)(21,"div",30)(22,"div",31),m(23,"br-svg-icon",32),a(24,"div",16)(25,"span",33),f(26,1),o(),d(27,Un,2,2)(28,qn,1,0),o()(),a(29,"div",31),m(30,"br-svg-icon",34),a(31,"div",16)(32,"span",33),f(33,2),o(),d(34,Bn,2,1,"span",35)(35,Kn,1,0),o()(),a(36,"div",31),m(37,"br-svg-icon",36),a(38,"div",16)(39,"span",33),f(40,3),o(),a(41,"div",35),d(42,Zn,1,1,"span")(43,Hn,1,0),o()()()(),a(44,"div",30)(45,"div",31),m(46,"br-svg-icon",37),a(47,"div",16)(48,"span",33),f(49,4),o(),d(50,Jn,3,2,"div",38)(51,eo,1,0),o()(),a(52,"div",31),m(53,"br-svg-icon",39),a(54,"div",16)(55,"span",33),f(56,5),o(),d(57,to,2,1,"span",35)(58,io,1,0),o()(),a(59,"div",31),m(60,"br-svg-icon",40),a(61,"div",16)(62,"span",33),f(63,6),o(),d(64,ro,2,1,"span",35)(65,no,1,0),o()()()()(),a(66,"div",41)(67,"div",42),m(68,"hr"),a(69,"div",27)(70,"span",43),f(71,7),o()(),a(72,"div",44),d(73,lo,2,1,"div",44)(74,ao,4,0),o()(),a(75,"div",42)(76,"span",43),A(77,"Skills"),o(),a(78,"div",44),d(79,so,2,1,"div",44)(80,co,4,0),o()(),a(81,"div",45)(82,"span",43),f(83,8),o(),d(84,Eo,2,1,"div",44)(85,fo,4,0),o()(),a(86,"div")(87,"div",27)(88,"span",46),f(89,9),o()(),d(90,uo,2,1,"p",47)(91,mo,4,0),o(),m(92,"hr"),a(93,"div")(94,"div",48)(95,"span",49),f(96,10),o()(),a(97,"div",16),d(98,Io,1,1,"app-work-experience-item",50)(99,Po,3,0),o()(),a(100,"div")(101,"div",51)(102,"span",49),f(103,11),o()(),d(104,Ro,2,1,"div",16)(105,To,3,0),o(),d(106,No,6,1,"div",52),o()()),e&2){let t=c();_(4),y(4,t.currentProfile!=null&&t.currentProfile.pictureUrl?5:4),_(5),y(9,t.currentProfile!=null&&t.currentProfile.firstname?9:10),_(2),y(11,t.currentProfile!=null&&t.currentProfile.lastname?11:12),_(3),y(14,t.currentProfile!=null&&t.currentProfile.profileTitle?14:15),_(13),y(27,!(t.currentProfile==null||t.currentProfile.generalInformation==null)&&t.currentProfile.generalInformation.dayRate?27:28),_(7),y(34,!(t.currentProfile==null||t.currentProfile.generalInformation==null)&&t.currentProfile.generalInformation.workExperienceSince?34:35),_(8),y(42,t.currentProfile!=null&&t.currentProfile.languages.length?42:43),_(8),y(50,!(t.currentProfile==null||t.currentProfile.generalInformation==null)&&t.currentProfile.generalInformation.city||!(t.currentProfile==null||t.currentProfile.generalInformation==null)&&t.currentProfile.generalInformation.countryName?50:51),_(7),y(57,t.currentProfile!=null&&t.currentProfile.email?57:58),_(7),y(64,!(t.currentProfile==null||t.currentProfile.generalInformation==null)&&t.currentProfile.generalInformation.phone?
164:65),_(9),y(73,!(t.currentProfile==null||t.currentProfile.industries==null)&&t.currentProfile.industries.length?73:74),_(6),y(79,!(t.currentProfile==null||t.currentProfile.skillOffers==null)&&t.currentProfile.skillOffers.length?79:80),_(5),y(84,!(t.currentProfile==null||t.currentProfile.languages==null)&&t.currentProfile.languages.length?84:85),_(6),y(90,t.currentProfile!=null&&t.currentProfile.personalSummary?90:91),_(8),y(98,!(t.currentProfile==null||t.currentProfile.workExperience==null)&&t.currentProfile.workExperience.length?98:99),_(6),y(104,!(t.currentProfile==null||t.currentProfile.education==null)&&t.currentProfile.education.length?104:105),_(2),s("ngIf",t.currentProfile==null||t.currentProfile.certificates==null?null:t.currentProfile.certificates.length);}}function Lo(e,l){e&1&&(a(0,"div",69),m(1,"br-spinner"),o());}var vi=(()=>{let l=class l{constructor(){this.id=0,this.ETagType=$e;}};l.ɵfac=function(n){return new(n||l)();},l.ɵcmp=D({type:l,selectors:[["app-wizard-view-profile"]],inputs:{id:[vt.HasDecoratorInputTransform,"id","id",Dt],currentProfile:"currentProfile"},standalone:!0,features:[U([b,si]),Mt,W],decls:4,vars:0,consts:()=>{let i;i="Profilbild";let n;n="Allgemeine Information";let r;r="Tagessatz";let p;p="Berufserfahrung";let E;E="Sprachen";let u;u="Stadt";let I;I="E-mail";let S;S="Telefon";let g;g="Branchen";let R;R="Sprachen";let N;N="\xDCber mich";let z;z="Berufserfahrung";let H;H="Ausbildung";let le;le="Profilbild";let ae;ae="Auf Anfrage";let $;return $=" "+"\uFFFD0\uFFFD"+" Jahre ",[n,r,p,E,u,I,S,g,R,N,z,H,ae,$,[2e3],[1,"wizard-view-profile"],[1,"d-flex","flex-column"],[1,"wizard-view-profile-header"],[1,"d-flex","gap-1","w-100"],["src","../../../../../assets/images/no-photo.png","alt",i,1,"profile-picture"],[1,"d-flex","flex-column","w-100"],[1,"wizard-view-profile-name-container"],[1,"wizard-view-profile-header-main"],[1,"heading-base","h6","m-0","text-color-grayscale-1"],[1,"w-100"],[1,"paragraph-base","parahgraph-2","text-color-grayscale-2"],[1,"text-align-left"],[1,"d-flex","justify-content-between","align-items-start"],[1,"wizard-view-profile-section-header","label","mb-3"],[1,"wizard-view-profile-general-info"],[1,"d-flex","flex-column","gap-2","w-50"],[1,"d-flex","align-items-start","gap-1"],["icon","money",1,"text-primary"],[1,"label","text-color-grayscale-3"],["icon","brief-case",1,"text-primary"],[1,"subtitle"],["icon","translate",1,"text-primary"],["icon","globe-hemisphere-west",1,"text-primary"],[1,"d-flex","gap-2"],["icon","envelope-simple",1,"text-primary"],["icon","phone",1,"text-primary"],[1,"d-flex","flex-column","gap-4"],[1,"d-flex","flex-column","gap-2"],[1,"label"],[1,"d-flex","gap-2","flex-wrap"],[1,"d-flex","flex-column","gap-2","mb-4"],[1,"label","text-color-grayscale-2"],[1,"paragraph-base","paragraph-2","text-color-grayscale-1"],[1,"d-flex","justify-content-between"],[1,"label","text-color-grayscale-2","mb-2"],[3,"workExperience","editMode","deleteMode"],[1,"d-flex","justify-content-between","pt-4"],[4,"ngIf"],["alt",le,1,"profile-picture",3,"src"],[1,"placeholder","br-placeholder","col-6"],[1,"placeholder","br-placeholder","col-12"],["class","subtitle",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"text","type","xs",4,"ngFor","ngForOf"],[3,"text","type","xs"],[1,"placeholder","br-placeholder","placeholder-glow","col-3"],[1,"placeholder","br-placeholder","col-3"],[1,"d-flex","gap-1"],[1,"d-flex","flex-column","gap-1","w-100","mr-2"],[3,"workExperience","editMode","deleteMode",4,"ngFor","ngForOf"],[3,"education","editMode","deleteMode",4,"ngFor","ngForOf"],[3,"education","editMode","deleteMode"],[3,"certification","editMode","deleteMode",4,"ngFor","ngForOf"],[3,"certification","editMode","deleteMode"],[1,"d-flex","justify-content-center","align-items-center"]];},template:function(n,r){n&1&&(d(0,Fo,107,17)(1,Lo,2,0),xt(2,0,xn,null,1,null,null,14,yt),bt());},dependencies:[Ee,Ce],styles:["[_nghost-%COMP%]{background-color:#fff}.wizard-view-profile[_ngcontent-%COMP%]{padding:1.5rem;border:1px solid #F0F0F2;border-top-left-radius:.875rem;border-bottom-left-radius:.875rem;box-shadow:-25px 25px 20px -23px #dde3e5}.wizard-view-profile-header[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%;margin-bottom:.5rem}@media (max-width: 991.98px){.wizard-view-profile-header[_ngcontent-%COMP%]{flex-direction:column;margin-bottom:1rem}}.wizard-view-profile-header-main[_ngcontent-%COMP%]{display:flex;flex:1;width:100%;gap:.125rem}.wizard-view-profile-section-header[_ngcontent-%COMP%]{font-weight:600}.wizard-view-profile-name-container[_ngcontent-%COMP%]{display:flex!important;flex-direction:column;align-items:center;gap:.5rem;width:100%}.wizard-view-profile-general-info[_ngcontent-%COMP%]{display:flex}@media (max-width: 991.98px){.wizard-view-profile-general-info[_ngcontent-%COMP%]{flex-direction:column;gap:.5rem}}.profile-picture[_ngcontent-%COMP%]{float:left;margin-right:.625rem;border-radius:50%;height:3.75rem;width:3.75rem}"]});let e=l;return e;})();var ho=e=>[e],vo=(e,l)=>({"wizard-btns-container-first-step":e,"wizard-btns-container":l});function Mo(e,l){if(e&1){let t=v();ce(0),a(1,"app-create-profile-headline",14),x(2,"async"),T("subformInitialized",function(n){P(t);let r=c();return O(r.subformInitialized("headline",n));}),o(),pe();}if(e&2){let t=c();_(),s("profile",t.profile)("startingForm",t.headlineForm)("step",k(2,3,t.currentStep$));}}function yo(e,l){if(e&1){let t=v();ce(0),a(1,"app-create-profile-basic-information",14),x(2,"async"),T("subformInitialized",function(n){P(t);let r=c();return O(r.subformInitialized("basicInformation",n));}),o(),pe();}if(e&2){let t=c();_(),s("profile",t.profile)("startingForm",t.basicInformation)("step",k(2,3,t.currentStep$));}}function xo(e,l){if(e&1){let t=v();ce(0),a(1,"app-create-profile-skills-industry",14),x(2,"async"),T("subformInitialized",function(n){P(t);let r=c();return O(r.subformInitialized("skillsIndustry",n));}),o(),pe();}if(e&2){let t=c();_(),s("profile",t.profile)("startingForm",t.skillsIndustry)("step",k(2,3,t.currentStep$));}}function bo(e,l){if(e&1){let t=v();ce(0),a(1,"app-create-profile-about-me",14),x(2,"async"),T("subformInitialized",function(n){P(t);let r=c();return O(r.subformInitialized("summary",n));}),o(),pe();}if(e&2){let t=c();_(),s("profile",t.profile)("startingForm",t.summary)("step",k(2,3,t.currentStep$));}}function wo(e,l){if(e&1){let t=v();ce(0),a(1,"app-create-profile-educations-certifications",14),x(2,"async"),T("subformInitialized",function(n){P(t);let r=c();return O(r.subformInitialized("educationsCertifications",n));}),o(),pe();}if(e&2){let t=c();_(),s("profile",t.profile)("startingForm",t.educationsCertifications)("step",k(2,3,t.currentStep$));}}function ko(e,l){if(e&1){let t=v();ce(0),a(1,"app-create-profile-work-experience",14),x(2,"async"),T("subformInitialized",function(n){P(t);let r=c();return O(r.subformInitialized("workExperience",n));}),o(),pe();}if(e&2){let t=c();_(),s("profile",t.profile)("startingForm",t.workExperience)("step",k(2,3,t.currentStep$));}}function $o(e,l){e&1&&(ce(0),m(1,"app-create-profile-profile-submitted"),pe()
1);}function Do(e,l){if(e&1){let t=v();a(0,"br-button",20),T("clickAction",function(){P(t);let n=c(3);return O(n.onPrevStep());}),o();}if(e&2){let t=c(3);s("btnType",t.EButtonType.BUTTON_SECONDARY);}}function Wo(e,l){if(e&1){let t=v();a(0,"br-button",21),x(1,"async"),T("clickAction",function(){P(t);let n=c(3);return O(n.confirmSubmitToReview());}),o();}if(e&2){let t,i=c(3);s("disabled",!((t=k(1,1,i.currentStep$))!=null&&t.isValid));}}function Vo(e,l){if(e&1){let t=v();a(0,"br-button",22),x(1,"async"),T("clickAction",function(){P(t);let n=c(3);return O(n.onNextStep());}),o();}if(e&2){let t,i=c(3);s("disabled",!((t=k(1,1,i.currentStep$))!=null&&t.isValid));}}function zo(e,l){if(e&1&&(a(0,"div",16),d(1,Do,1,1,"br-button",17)(2,Wo,2,3,"br-button",18)(3,Vo,2,3,"br-button",19),o()),e&2){let t=c().$implicit;s("ngClass",rt(4,vo,t.stepIndex<6,t.stepIndex>1)),_(),s("ngIf",t.stepIndex>1),_(),s("ngIf",t.stepIndex===6),_(),s("ngIf",t.stepIndex<6);}}function Xo(e,l){if(e&1&&(ce(0),d(1,zo,4,7,"div",15),pe()),e&2){let t=l.$implicit;_(),s("ngIf",t.stepIndex<7);}}var ss=(()=>{let l=class l{constructor(i,n,r,p,E,u,I,S,g,R){this.stepsService=i,this.router=n,this.toastr=r,this.profileService=p,this.userService=E,this.formBuilder=u,this.destroyRef=I,this.confirmDialogService=S,this.store=g,this.authenticationService=R,this.profile$=new Ne(null),this.ERoutes=ft,this.EButtonType=xe,this.wizardPage$=new Ne(1),this.submittingProfile=!1;}ngOnInit(){this.loadUserData(),this.stepsService.cleanStepsIsCompleteStatus(),this.currentStep$=this.stepsService.getCurrentStep(),this.profileForm=this.formBuilder.group({headline:null,basicInformation:null,skillsIndustry:null,aboutMe:null}),this.profileService.checkIfMyProfileExists().pipe(F(this.destroyRef)).subscribe(i=>{i.success?i.myProfileExists?this.profileService.getMyProfile().pipe(F(this.destroyRef)).subscribe(n=>{this.profile=n,this.profile$.next(this.profile),this.getUser();}):this.profileService.createProfile({}).subscribe(n=>{n.success?this.profileService.getMyProfile().pipe(F(this.destroyRef)).subscribe(r=>{this.profile=r,this.profile$.next(this.profile),this.getUser();}):this.toastr.error("Fehler beim Erstellen des Profils");}):this.toastr.error("Fehler beim Erstellen des Profils");});}loadUserData(){this.authenticationService.currentUser$.pipe(F(this.destroyRef)).subscribe(i=>{this.store.dispatch(qt({user:i.item}));});}getUser(){this.userService.getCurrentUser().pipe(F(this.destroyRef)).subscribe(i=>{this.profile?.email||(this.profile.email=i.item.email,this.profileForm.get("headline.email")?.setValue(i.item.email)),this.profile$.next(this.profile);}),this.userService.getUserData().pipe(F(this.destroyRef)).subscribe(i=>{this.profile?.firstname||(this.profile.firstname=i.item.firstname,this.profileForm.get("headline.firstname")?.setValue(i.item.firstname)),this.profile?.lastname||(this.profile.lastname=i.item.lastname,this.profileForm.get("headline.lastname")?.setValue(i.item.lastname)),this.profile$.next(this.profile);});}subformInitialized(i,n){this.profileForm.setControl(i,n);}onNextStep(){let i;switch(this.wizardPage$.next(this.stepsService.getCurrentStepIndex()),this.stepsService.getCurrentStepIndex()){case 1:{i=this.profileForm.get("headline");break;}case 2:{i=this.profileForm.get("basicInformation");break;}case 3:{i=this.profileForm.get("skillsIndustry");break;}case 4:{i=this.profileForm.get("aboutMe");break;}}if(i!==void 0&&i?.invalid){i?.markAllAsTouched();return;}this.saveProfile(this.stepsService.getCurrentStepIndex()),this.stepsService.getCurrentStepIndex()===5||this.stepsService.getCurrentStepIndex()===6?this.confirmDialogService.confirm("Best\xE4tigen","Haben Sie alle \xC4nderungen gespeichert und sind Sie sicher, dass Sie mit einem anderen Schritt fortfahren m\xF6chten?",()=>this.stepsService.moveToNextStep(),!0):this.stepsService.isLastStep()?this.onSubmit():this.stepsService.moveToNextStep();}onPrevStep(){this.stepsService.isFirstStep()||this.stepsService.moveToPrevStep();}onSubmit(){this.router.navigate([this.ERoutes.PORTAL,this.ERoutes.DASHBOARD]);}validate(){let i=document.getElementsByClassName("needs-validation")[0];return i.classList.add("was-validated"),i.classList.contains("ng-valid");}saveProfile(i){if(i===2){let n={id:this.profile.id,firstname:this.profileForm?.get("headline.f
1irstname")?.value,lastname:this.profileForm?.get("headline.lastname")?.value,country:this.profileForm?.get("basicInformation.country")?.value,city:this.profileForm?.get("basicInformation.city")?.value,profTitle:this.profileForm?.get("headline.title")?.value,dayRateWhenAsked:this.profileForm?.get("basicInformation.dayRateWhenAsked")?.value,dayRate:this.profileForm?.get("basicInformation.dayRate")?.value,email:this.profileForm?.get("basicInformation.email")?.value,phone:this.profileForm?.get("basicInformation.phone")?.value?.internationalNumber,picture:this.profileForm?.get("headline.picture")?.value};this.profileService.editProfileContactData(n).pipe(F(this.destroyRef)).subscribe(p=>{p.success||this.toastr.error("Fehler beim Speichern der Profilverf\xFCgbarkeit");});let r={id:this.profile.id,workExperienceSince:this.profile.generalInformation.workExperienceSince};this.profileService.editProfileAvailability(r).pipe(F(this.destroyRef)).subscribe(p=>{p.success||this.toastr.error("Fehler beim Speichern der Profilverf\xFCgbarkeit");});}else if(i===4){let n={id:this.profile.id,personalSummary:this.profile.personalSummary};this.profileService.editProfileSummary(n).pipe(F(this.destroyRef)).subscribe(r=>{r.success||this.toastr.error("Fehler beim Bearbeiten der Profilzusammenfassung");});}}confirmSubmitToReview(){this.stepsService.getCurrentStepIndex()===6&&this.confirmDialogService.confirm("Best\xE4tigen","Haben Sie alle \xC4nderungen gespeichert und sind Sie sicher, dass Sie Ihr Profil zur \xDCberpr\xFCfung einreichen m\xF6chten?",()=>this.submitToReview(),!0);}submitToReview(){this.submittingProfile=!0,this.profileService.setUserCompleteProfile().pipe(F(this.destroyRef)).subscribe(i=>{this.submittingProfile=!1,i.success?(this.store.dispatch(Bt({profileCompleted:!0})),this.stepsService.isLastStep()?this.onSubmit():this.stepsService.moveToNextStep()):this.toastr.error("Fehler beim Senden des Profils zur \xDCberpr\xFCfung");});}get headlineForm(){return this.profileForm?.get("headline");}get basicInformation(){return this.profileForm?.get("basicInformation");}get skillsIndustry(){return this.profileForm?.get("skillsIndustry");}get summary(){return this.profileForm?.get("summary");}get educationsCertifications(){return this.profileForm?.get("educationsCertifications");}get workExperience(){return this.profileForm?.get("workExperience");}};l.ɵfac=function(n){return new(n||l)(C(X),C(nt),C(ie),C(b),C(ot),C(j),C(G),C(Se),C(Ut),C(lt));},l.ɵcmp=D({type:l,selectors:[["app-create-profile-form-page"]],standalone:!0,features:[U([b,lt,ot]),W],decls:25,vars:23,consts:()=>{let i;i="Zur\xFCck";let n;n="Zur \xDCberpr\xFCfung vermitteln.";let r;return r="N\xE4chster Schritt",[[1,"wizard"],[1,"navbar"],[1,"logo-container"],[3,"routerLink"],["src","/assets/images/berater.de_full-color.png","alt","logo"],[1,"wizard-content"],[1,"wizard-form-part"],[3,"currentStepIndex"],[3,"formGroup"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngIf"],[1,"wizard-view-part"],[3,"currentProfile"],[3,"subformInitialized","profile","startingForm","step"],["class","wizard-btns-container",3,"ngClass",4,"ngIf"],[1,"wizard-btns-container",3,"ngClass"],["text",i,"class","w-fit",3,"btnType","clickAction",4,"ngIf"],["text",n,"class","w-fit",3,"disabled","clickAction",4,"ngIf"],["text",r,"class","w-fit",3,"disabled","clickAction",4,"ngIf"],["text",i,1,"w-fit",3,"clickAction","btnType"],["text",n,1,"w-fit",3,"clickAction","disabled"],["text",r,1,"w-fit",3,"clickAction","disabled"]];},template:function(n,r){if(n&1&&(a(0,"div",0)(1,"nav",1)(2,"div",2)(3,"a",3),m(4,"img",4),o()()(),a(5,"div",5)(6,"div",6),m(7,"app-create-profile-steps",7),x(8,"async"),a(9,"div",8)(10,"div"),ce(11,9),x(12,"async"),d(13,Mo,3,5,"ng-container",10)(14,yo,3,5,"ng-container",10)(15,xo,3,5,"ng-container",10)(16,bo,3,5,"ng-container",10)(17,wo,3,5,"ng-container",10)(18,ko,3,5,"ng-container",10)(19,$o,2,0,"ng-container",10),pe(),d(20,Xo,2,1,"ng-container",11),x(21,"async"),o()()(),a(22,"div",12),m(23,"app-wizard-view-profile",13),x(24,"async"),o()()()),n&2){let p,E;_(3),s("routerLink",kt(21,ho,"/"+r.ERoutes.HOME)),_(4),s("currentStepIndex",(p=k(8,13,r.currentStep$))==null?null:p.stepIndex),_(2),s("formGroup",r.profileForm),_(2),s("ngSwitch",(E=k(12,15,r.currentStep$))==null?null:E.stepIndex),_(2),s("ngSwitchCase",1),_(),s("ngSwitchCase",2),_(),s("ngSwitchCase",3),_(),s("ngSwitchCase",4),_(),s("ngSwitchCase",5),_(),s("ngSwitchCase",6),_(),s("ngSwitchCase",7),_(),s("ngIf",k(21,17,r.currentStep$)),_(3),s("currentProfile",k(24,19,r.profile$));}},dependencies:[Ee,Wt,q,Vt,zt,ye,Oi,Ri,Si,Ai,Ni,Fi,Li,hi,ke,B,Z,K,fe,vi,Gt],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%}.navbar[_ngcontent-%COMP%]{height:4rem;display:flex;justify-content:center;align-items:center;border-bottom:none;width:100%}.wizard[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}.wizard-content[_ngcontent-%COMP%]{width:90%;max-width:60rem;display:flex;background-color:#fff;border-radius:.75rem;justify-content:space-between;margin-top:5rem}@media (max-width: 767.98px){.wizard-content[_ngcontent-%COMP%]{margin-top:3rem}}.wizard-form-part[_ngcontent-%COMP%]{padding:2.5rem 3.75rem;width:50%}@media (max-width: 767.98px){.wizard-form-part[_ngcontent-%COMP%]{width:100%;padding:1rem 1.5rem}}.wizard-view-part[_ngcontent-%COMP%]{width:50%;padding:2.5rem 0 2.5rem 2rem;overflow-y:auto}@media (max-width: 767.98px){.wizard-view-part[_ngcontent-%COMP%]{display:none;width:0}}.wizard-btns-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between!important;margin-top:1rem}.wizard-btns-container-first-step[_ngcontent-%COMP%]{display:flex;justify-content:end;margin-top:1rem}"]});let e=l;return e;})();export{ss as CreateProfileFormPageComponent};/**i18n:6ff56e1237b5ca15ba2d806f4d3091c6d8ad6faa4340cb54c69cbdda31c6edcb*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.