1import{a as me}from"./chunk-6Y7HRAOR.js";import"./chunk-OLLNPAQS.js";import{a as g}from"./chunk-FDYFDUR3.js";import{b as F}from"./chunk-65RTA2NZ.js";import{j as oe,l as ae,n as se,q as ce}from"./chunk-A3364LFD.js";import{a as pe}from"./chunk-4O4ZC76I.js";import{c as z,e as w,g as $,h as J,i as K,j as Q,l as _,n as W,p as X,q as Y,u as Z}from"./chunk-GF52ZLA4.js";import"./chunk-KCQQPDMT.js";import{a as de}from"./chunk-RMKGZ6CF.js";import"./chunk-I737S6QE.js";import{a as q,b as G,d as ie,e as ne}from"./chunk-7OK4HWXF.js";import{$ as le}from"./chunk-3TGTSPZJ.js";import{a as ee,b as te}from"./chunk-MNYHBXZY.js";import{b as re}from"./chunk-7UKIXG2M.js";import{i as N}from"./chunk-XVV3EBMI.js";import{$b as j,Ab as A,Bb as T,Db as U,Ea as v,Eb as D,Fa as b,Fb as n,Gb as r,Hb as M,Lb as V,Ob as C,Pc as H,Qb as O,Za as k,ab as i,ac as s,bb as y,bc as E,cc as h,jc as B,kb as I,mc as m,nc as u,rb as P,vb as f,wa as L}from"./chunk-Y7SJDQ4B.js";var S=class{constructor(){this.subject=new _(""),this.date=new _(null),this.email=new _(""),this.description=new _(""),this.browser=new _(""),this.applicationVersion=new _(""),this.files=new Q({files:new _(null)})}};var o=function(t){return t.LoginAndRegister="LoginAndRegister",t.RegisterEditEO="RegisterEditEO",t.RegisterEditF="RegisterEditF",t.RegisterEditM="RegisterEditM",t.RegisterEditMP="RegisterEditMP",t.UnitIdentifierRequest="UnitIdentifierRequest",t.AggregatedIdentifierRequest="AggregatedIdentifierRequest",t.RequestsForCode="RequestsForCode",t.Users="Users",t.Api="Api",t.OtherSubject="OtherSubject",t}(o||{});var ue=[new g([o.LoginAndRegister],o.LoginAndRegister),new g([o.RegisterEditEO],o.RegisterEditEO),new g([o.RegisterEditF],o.RegisterEditF),new g([o.RegisterEditM],o.RegisterEditM),new g([o.RegisterEditMP],o.RegisterEditMP),new g([o.UnitIdentifierRequest],o.UnitIdentifierRequest),new g([o.AggregatedIdentifierRequest],o.AggregatedIdentifierRequest),new g([o.RequestsForCode],o.RequestsForCode),new g([o.Users],o.Users),new g([o.Api],o.Api),new g([o.OtherSubject],o.OtherSubject)];var R=class{constructor(d,c){this.subject=F(c?.subject?.value),this.date=F(c?.date?.value?.toDateString()),this.userEmail=F(c?.email?.value),this.description=F(c?.description?.value),this.browser=F(c?.browser?.value),this.cultureInfo=d,this.applicationVersion=F(c?.applicationVersion?.value),this.files=c?.files?.get("files")?.value??null}};function fe(t,d){t&1&&(n(0,"mat-icon"),s(1,"description"),r())}function he(t,d){t&1&&(n(0,"mat-icon"),s(1,"image"),r())}function _e(t,d){if(t&1){let c=V();n(0,"div",29)(1,"div",30),P(2,fe,2,0,"mat-icon")(3,he,2,0,"mat-icon"),r(),n(4,"div",31),s(5),r(),n(6,"mat-icon",32),C("click",function(){let a=v(c).$implicit,e=O(2);return b(e.removeFile(a))}),s(7,"delete"),r()()}if(t&2){let c=d.$implicit,l=O(2);i(2),A(l.imageFormats.includes(c.type)?3:2),i(3),h(" ",c.name," ")}}function xe(t,d){if(t&1&&U(0,_e,8,2,"div",29,T),t&2){let c=O();D(c.files())}}var Ye=(()=>{let d=class d{constructor(l,a,e){this.route=l,this.transLocoService=a,this.facadeService=e,this.version$=this.facadeService.version$,this.requestForm=new K(new S),this.defaultImageUrl="assets/img/help/logo_idissuer_help.png",this.englishImageUrl="assets/img/help/logo_idissuer_help_en.png",this.imgUrl=I(this.defaultImageUrl),this.files=I([]),this.maxFiles=3,this.maxSizeMB=5,this.allowedFormats=["image/png","image/jpeg","image/gif","application/pdf","text/csv","text/plain"],this.imageFormats=["image/png","image/jpeg","image/gif"],this.SubjectOptions=ue,this.Errors=se,this.LANGUAGE_IMAGE_PATH=ne,this.LANGUAGES_NAMES=ie,this.BrowserOptions=[{value:"Google Chrome",name:"Google Chrome"},{value:"Microsoft Edge",name:"Microsoft Edge"},{value:"Mozilla Firefox",name:"Mozilla Firefox"},{value:"Other",name:"Other"}],this.setValidations()}ngOnInit(){this.facadeService.getVersion(),this.version$.pipe().subscribe(l=>{l&&this.requestForm.controls.applicationVersion.setValue(l.version)})}onFileChange(l){let a=l.target.files;if(!(a.length>this.maxFiles)){for(let e=0;e<a.length;e++){let p=a[e];if(p.size/1024/1024>this.maxSizeMB||!this.allowedFormats.includes(p.type))return;this.files.update(x=>(x.push(p),x))}this.requestForm.controls.files.patchValue({files:this.files()})}}setValidations(){this.requestForm.controls.subject.setValidators([w.required]),this.requestForm.controls.date.setValidators([w.required]),this.requestForm.controls.email.setValidators([w.email,w.required]),this.requestForm.controls.description.setValidators([w.required]),this.requestForm.controls.browser.setValidators([w.required])}get activeLanguage(){return this.transLocoService.getActiveLang()}toggleLanguage(){if(this.isDefaultLanguageSelected()){this.transLocoService.setActiveLang(q.en),this.imgUrl.set(this.englishImageUrl);return}this.transLocoService.setActiveLang(q.pl),this.imgUrl.set(this.defaultImageUrl)}isDefaultLanguageSelected(){return this.activeLanguage!==q.en}navigateToHelp(){this.route.navigate([re.Help])}sendRequest(){let l=this.isDefaultLanguageSelected()?G.pl:G.en,a=new R(l,this.requestForm.controls);a.subject=this.transLocoService.translate(a.subject??""),this.facadeService.postRequestForm(a)}removeFile(l){this.files.update(a=>(a=a.filter(e=>e!==l),a)),this.requestForm.controls.files.patchValue({files:this.files()})}};d.\u0275fac=function(a){return new(a||d)(y(N),y(ee),y(de))},d.\u0275cmp=L({type:d,selectors:[["app-help-request"]],standalone:!0,features:[B],decls:63,vars:61,consts:[["parentForm","ngForm"],[1,"help-request-box"],[1,"top-bar"],[1,"nav-box"],[1,"logo-box"],[3,"click","
1src"],[1,"translate-box"],[1,"language-button"],["type","button",1,"language-selector",3,"click"],["alt","","height","25","width","25",1,"language-image",3,"ngSrc"],[1,"language-name"],[1,"form-box"],[1,"title"],[1,"form",3,"formGroup"],[3,"control","formGroupDirective","readonly","label"],[3,"control","formGroupDirective","options","label"],[3,"inputType","control","formGroupDirective","label"],[3,"control","formGroupDirective","inputType","description","label"],[1,"primary-label"],[1,"issuer-input",3,"formControl"],[1,"description"],[1,"attachment-box"],["type","file","id","fileInput","multiple","",1,"file-input",3,"change"],["for","fileInput",1,"file-button"],[1,"input-description"],[1,"file-box"],[1,"buttons-row"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button","mat-button","",1,"btn","btn-primary",3,"click","disabled"],[1,"file-card"],[1,"photo"],[1,"label"],[1,"delete-icon",3,"click"]],template:function(a,e){if(a&1){let p=V();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"img",5),C("click",function(){return v(p),b(e.navigateToHelp())}),r()(),n(5,"div",6)(6,"div",7)(7,"button",8),C("click",function(){return v(p),b(e.toggleLanguage())}),M(8,"img",9),n(9,"span",10),s(10),r()()()()()(),n(11,"div",11)(12,"div",12),s(13),m(14,"transloco"),r(),n(15,"form",13,0),M(17,"app-issuer-input",14)(18,"app-issuer-select-input",15)(19,"app-issuer-input",16)(20,"app-issuer-input",17),n(21,"app-form-field")(22,"label",18),s(23),m(24,"transloco"),r(),M(25,"textarea",19),n(26,"app-field-description")(27,"div",20),s(28),m(29,"transloco"),r()()(),M(30,"app-issuer-select-input",15),n(31,"div",21)(32,"label",18),s(33),m(34,"transloco"),r(),n(35,"input",22),C("change",function(ge){return v(p),b(e.onFileChange(ge))}),r(),n(36,"label",23),s(37),m(38,"transloco"),n(39,"mat-icon"),s(40,"add"),r()(),n(41,"app-field-description")(42,"p",24),s(43),m(44,"transloco"),r(),n(45,"p",24),s(46),m(47,"transloco"),r(),n(48,"p",24),s(49),m(50,"transloco"),r(),n(51,"p",24),s(52),m(53,"transloco"),r()()(),n(54,"div",25),P(55,xe,2,0),r(),n(56,"div",26)(57,"button",27),C("click",function(){return v(p),b(e.navigateToHelp())}),s(58),m(59,"transloco"),r(),n(60,"button",28),C("click",function(){return v(p),b(e.sendRequest())}),s(61),m(62,"transloco"),r()()()()()}if(a&2){let p=j(16);i(4),f("src",e.imgUrl(),k),i(4),f("ngSrc",e.LANGUAGE_IMAGE_PATH[e.activeLanguage]),i(2),E(e.LANGUAGES_NAMES[e.activeLanguage]),i(3),h(" ",u(14,39,"help.request_title")," "),i(2),f("formGroup",e.requestForm),i(2),f("control",e.requestForm.controls.applicationVersion)("formGroupDirective",p)("readonly",!0)("label","help.application_version"),i(),f("control",e.requestForm.controls.subject)("formGroupDirective",p)("options",e.SubjectOptions)("label","help.subject"),i(),f("inputType","date")("control",e.requestForm.controls.date)("formGroupDirective",p)("label","help.datetime"),i(),f("control",e.requestForm.controls.email)("formGroupDirective",p)("inputType","email")("description","help.email_description")("label","help.request_email"),i(3),E(u(24,41,"help.description")),i(2),f("formControl",e.requestForm.controls.description),i(3),h(" ",u(29,43,"help.description_description")," "),i(2),f("control",e.requestForm.controls.browser)("formGroupDirective",p)("options",e.BrowserOptions)("label","help.web_version"),i(3),E(u(34,45,"help.attachments")),i(4),h(" ",u(38,47,"shared.add")," "),i(6),h(" ",u(44,49,"help.attachments_description1")," "),i(3),h(" ",u(47,51,"help.attachments_description2")," "),i(3),h(" ",u(50,53,"help.file_size")," "),i(3),h(" ",u(53,55,"help.file_format")," "),i(3),A(e.files().length>0?55:-1),i(3),E(u(59,57,"shared.cancel")),i(2),f("disabled",e.requestForm.invalid),i(),h("",u(62,59,"shared.send")," ")}},dependencies:[H,Z,W,z,$,J,X,Y,ce,me,ae,oe,te,le,pe],styles:[".top-bar[_ngcontent-%COMP%]{width:100%;height:105px;background-color:#fff;display:flex;flex-direction:row}.top-bar[_ngcontent-%COMP%] .nav-box[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:80%;margin:auto;align-items:center}.top-bar[_ngcontent-%COMP%] .logo-box[_ngcontent-%COMP%]{width:100%}
1.top-bar[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer}.top-bar[_ngcontent-%COMP%] .translate-box[_ngcontent-%COMP%]{width:100%}.language-button[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:flex-end}.language-button[_ngcontent-%COMP%] .language-selector[_ngcontent-%COMP%]{height:30px;display:flex;flex-direction:row;gap:5px;align-items:center;padding:20px;border:0;border-radius:20px;background:#f8f8f8;color:#485868;cursor:pointer}.form-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:80%;margin:2rem auto auto}.form-box[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:18px;font-weight:700}.form-box[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{margin-top:2rem}.form-box[_ngcontent-%COMP%] .buttons-row[_ngcontent-%COMP%]{margin:1rem 0;display:flex;flex-direction:row;gap:25px}.form-box[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:325px;height:100px}.input-description[_ngcontent-%COMP%]{margin:1px;width:100%;display:flex;flex-wrap:wrap}.attachment-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.file-input[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:0;height:0;opacity:0;cursor:pointer}.file-button[_ngcontent-%COMP%]{display:flex;justify-content:space-around;padding:10px 20px;background-color:#485868;color:#fff;border:#485868 1px solid;border-radius:5px;width:200px;font-size:16px;cursor:pointer;align-items:center}.file-button[_ngcontent-%COMP%]:hover{background-color:#f1f1f1;color:#485868}.file-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;height:200px;border-radius:25px;border:#485868 1px solid;align-items:center;width:115px;box-shadow:#b3aeaee6 1px 1px 1px 1px;position:relative;color:#485868}.delete-icon[_ngcontent-%COMP%]{position:absolute;display:flex;top:0;right:0;color:#fff;visibility:hidden;z-index:10;flex-direction:row;align-items:center;font-size:24px;background-color:#ec1f1fed;justify-content:center;width:100%;height:100%;border-radius:17px}.file-card[_ngcontent-%COMP%]:hover .delete-icon[_ngcontent-%COMP%]{visibility:visible;cursor:pointer}.file-box[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:25px;width:100%;margin-top:1.5rem}.photo[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;padding:10px;height:100px;margin-top:7px}.photo[_ngcontent-%COMP%] .mat-icon{font-size:48px;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.label[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;padding:15px 5px;overflow-wrap:anywhere;border-top:#485868 1px solid} .mat-mdc-button{background:#485868!important;color:#fff!important;height:50px!important} .mat-mdc-button:hover{background:#7a8da0!important} .mat-mdc-button[disabled], .mat-mdc-button.mat-mdc-button-disabled[_ngcontent-%COMP%]{background-color:#9b838357!important} .mat-datepicker-toggle{position:relative}"]});let t=d;return t})();export{Ye as HelpRequestComponent};
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.