PageSourceSearch

https://app.citizencode.net/4724.d42d1d15ab3fc586.js

js citizencode.net collected 2026-10-02 05:20:13 UTC 16,533 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcitizen_code=self.webpackChunkcitizen_code||[]).push([[4724],{34724(ee,T,r){r.d(T,{FeedbackComponent:()=>H});var a=r(89417),p=r(12809),_=r(38132),m=r(73955),x=r(84572),M=r(96697),e=r(73664),c=r(2615),b=r(47674);function E(i,s){if(1&i&&(e.j41(0,"span",5),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.JRh(t.errorMsg)}}function w(i,s){if(1&i){const t=e.RV6();e.j41(0,"span",2),e.EFF(1),e.k0s(),e.j41(2,"button",3),e.bIt("click",function(){const o=c.eBV(t).openFileSelector;return c.Njj(o())}),e.j41(3,"span"),e.EFF(4),e.k0s()(),e.j41(5,"span",4),e.EFF(6),e.k0s(),e.nVh(7,E,2,1,"span",5)}if(2&i){const t=e.XpG();e.R7$(),e.JRh(t.title),e.R7$(3),e.SpI(" ",t.btnLabel),e.R7$(2),e.JRh(t.description),e.R7$(),e.vxM(""!==t.errorMsg?7:-1)}}let R=(()=>{class i{constructor(){this.title="",this.btnLabel="",this.description="",this.extensionAllowed=".png, .jpg, .jpeg",this.formatAllowed=["image/jpg","image/png","image/jpeg"],this.errorMsg="",this.file=new e.bkB,this.error=new e.bkB}fileDropped(t){for(const n of t)n.fileEntry.isFile?n.fileEntry.file(l=>{this.fileAddEvent(l)}):this.error.emit(f.errorDuringDropFile)}fileAddEvent(t){this.isSizeTooBig(t)||(t&&this.validateFileType(t)?this.file.emit(t):this.error.emit(f.formatNotAllowed))}isSizeTooBig(t){return t.size>+(this.maxSizeFile+"000000")&&(this.error.emit(f.fileIsTooBig),!0)}validateFileType(t){return!!t&&this.formatAllowed.includes(t.type)}fileOver(t){}fileLeave(t){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-upload-file-generic"]],inputs:{title:"title",btnLabel:"btnLabel",description:"description",maxSizeFile:"maxSizeFile",extensionAllowed:"extensionAllowed",formatAllowed:"formatAllowed",errorMsg:"errorMsg"},outputs:{file:"file",error:"error"},standalone:!1,decls:2,vars:1,consts:[[3,"onFileDrop","onFileOver","onFileLeave","accept"],["ngx-file-drop-content-tmp",""],[1,"title"],["mat-raised-button","","mat-primary","","type","button","aria-label","select a file","data-e2e","upload-file-generic-open-file-selector","aria-label","add file",1,"add-file-button","mat-raised-button",3,"click"],[1,"description"],[1,"error"]],template:function(n,o){1&n&&(e.j41(0,"ngx-file-drop",0),e.bIt("onFileDrop",function(d){return o.fileDropped(d)})("onFileOver",function(d){return o.fileOver(d)})("onFileLeave",function(d){return o.fileLeave(d)}),e.DNE(1,w,8,4,"ng-template",1),e.k0s()),2&n&&e.Y8G("accept",o.extensionAllowed)},dependencies:[b.M$,b.vL],encapsulation:2})}}return i})();var f=function(i){return i.formatNotAllowed="formatNotAllowed",i.fileIsTooBig="fileIsTooBig",i.errorDuringDropFile="errorDuringDropFile",i}(f||{}),u=r(32591),j=r(88719),F=r(96183);const v=function(){try{var i="Unknown";return-1!==window.navigator.userAgent.indexOf("Windows NT 10.0")&&(i="Windows 10"),-1!==window.navigator.userAgent.indexOf("Windows NT 6.3")&&(i="Windows 8.1"),-1!==window.navigator.userAgent.indexOf("Windows NT 6.2")&&(i="Windows 8"),-1!==window.navigator.userAgent.indexOf("Windows NT 6.1")&&(i="Windows 7"),-1!==window.navigator.userAgent.indexOf("Windows NT 6.0")&&(i="Windows Vista"),-1!==window.navigator.userAgent.indexOf("Windows NT 5.1")&&(i="Windows XP"),-1!==window.navigator.userAgent.indexOf("Windows NT 5.0")&&(i="Windows 2000"),-1!==window.navigator.userAgent.indexOf("Mac")&&(i="Mac/iOS"),-1!==window.navigator.userAgent.indexOf("X11")&&(i="UNIX"),-1!==window.navigator.userAgent.indexOf("Linux")&&(i="Linux"),i}catch{return""}},k=function(){try{const i=navigator.userAgent;let s,t=i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(t[1])?(s=/\brv[ :]+(\d+)/g.exec(i)||[],"IE "+(s[1]||"")):"Chrome"===t[1]&&(s=i.match(/\b(OPR|Edge)\/(\d+)/),null!=s)?s.slice(1).join(" ").replace("OPR","Opera"):(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(s=i.match(/version\/(\d+)/i))&&t.splice(1,1,s[1]),t.join(" "))}catch{return""}};var y=r(36802),D=r(88834),I=r(99213),C=r(82765),S=r(33746),$=r(71228),B=r(68531),U=r(39304),A=r(83243),O=r(3654),V=r(830),G=r(29330);let L=(()=>{class i{constructor(t){this.http=t,this._urlFileUpload=p.db+"api/file-upload"}uploadFile(t,n){const o=new FormData;return o.append("file",t),this.http.post(this._urlFileUpload,o,{headers:{"access-token":n}})}static{this.\u0275fac=function(n){return new(n||i)(c.KVO(G.Qq))}}static{this.\u0275prov=c.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var g=r(64727),X=r(23029);
1function J(i,s){if(1&i&&(e.j41(0,"mat-option",7),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i){const t=s.$implicit;e.Y8G("value",t.id),e.R7$(),e.SpI(" ",e.bMT(2,2,t.label)," ")}}function W(i,s){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"mat-icon",15),e.bIt("click",function(){c.eBV(t);const o=e.XpG(2);return c.Njj(o.removeFile(o.f.name))}),e.k0s()()}if(2&i){const t=s.$implicit;e.R7$(2),e.JRh(t.name)}}function z(i,s){1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,"generic.too_many_files")))}function N(i,s){if(1&i){const t=e.RV6();e.j41(0,"mat-checkbox",10),e.nI1(1,"translate"),e.bIt("change",function(o){c.eBV(t);const l=e.XpG();return c.Njj(l.changeDataAutoDetectForBug(o.checked))}),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"mat-form-field")(5,"mat-label"),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.nrm(8,"input",11),e.j41(9,"mat-error"),e.EFF(10),e.nI1(11,"translate"),e.k0s()(),e.j41(12,"mat-form-field")(13,"mat-label"),e.EFF(14),e.nI1(15,"translate"),e.k0s(),e.nrm(16,"input",12),e.j41(17,"mat-error"),e.EFF(18),e.nI1(19,"translate"),e.k0s()(),e.j41(20,"app-upload-file-generic",13),e.nI1(21,"translate"),e.nI1(22,"translate"),e.nI1(23,"translate"),e.bIt("file",function(o){c.eBV(t);const l=e.XpG();return c.Njj(l.uploadFileEvent(o))})("error",function(o){c.eBV(t);const l=e.XpG();return c.Njj(l.fileError(o))}),e.k0s(),e.Z7z(24,W,4,1,"div",null,e.Vm6),e.nVh(26,z,3,3,"mat-error"),e.j41(27,"mat-form-field")(28,"mat-label"),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.j41(31,"textarea",14),e.EFF(32,"                "),e.k0s(),e.j41(33,"mat-error"),e.EFF(34),e.nI1(35,"translate"),e.k0s()()}if(2&i){const t=e.XpG();e.jOp("aria-label",e.mNQ(e.bMT(1,15,"account-management.is_bug_computer"))),e.R7$(2),e.SpI("",e.bMT(3,17,"account-management.bug_on_your_computer")," "),e.R7$(4),e.JRh(e.bMT(7,19,"account-management.bug_navigator")),e.R7$(4),e.JRh(e.bMT(11,21,"generic.navigator_required")),e.R7$(4),e.JRh(e.bMT(15,23,"account-management.bug_os")),e.R7$(4),e.JRh(e.bMT(19,25,"generic.os_required")),e.R7$(2),e.Y8G("errorMsg",t.fileErrorMsg)("title",e.bMT(21,27,"account-management.upload_file_title"))("btnLabel",e.bMT(22,29,"account-management.upload_file_btn_label"))("description",e.bMT(23,31,"account-management.upload_description"))("maxSizeFile",t.maxFileSize),e.R7$(4),e.Dyx(t.files),e.R7$(2),e.vxM(t.tooManyFilesError?26:-1),e.R7$(3),e.JRh(e.bMT(30,33,"account-management.bug_description")),e.R7$(5),e.SpI(" ",e.bMT(35,35,"generic.description_required"))}}function P(i,s){1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,"generic.message.sended")))}function Y(i,s){1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,"generic.message.not_send")))}let H=(()=>{class i{constructor(t,n,o,l,d,Q,Z,K){this.authenticationService=t,this.octopusConnectService=n,this.router=o,this.translateService=l,this.profileService=d,this.accountManagementProviderService=Q,this.uploadFileService=Z,this.dialog=K,this.isMessageSend=!1,this.messageSendError=!1,this.bugDetailInfo=!1,this.files=[],this.tooManyFilesError=!1,this.fileErrorMsg="",this.feedbackForm=new a.J3({email:new a.hs("",[a.k0.required,a.k0.email]),category:new a.hs("",[a.k0.required]),content:new a.hs("",[a.k0.required])}),this.categoryList=[],this.assetbrand=p.wk,this.octopusConnectService.loadCollection("feedback").subscribe(q=>{q.entities.forEach(h=>{this.categoryList.push({id:h.id,label:h.get("label"),content:h.get("description")})})})}ngOnInit(){this.setUserMailToContactIfExist()}setUserMailToContactIfExist(){this.authenticationService.userData&&this.authenticationService.userData.get("email")&&this.feedbackForm.patchValue({email:this.authenticationService.userData.get("email")})}changeCategory(t){this.profileService.settings.feedbackUseInputFieldForBug&&t.value===this.profileService.settings.idSubjectToOpenBugInputs?(this.bugDetailInfo=!0,this.addBugControls(),this.setContextInfos()):(this.removeBugControls(),this.bugDetailInfo=!1),!this.profileService.settings.feedbackUseInputFieldForBug&&this.categoryList.filter(n=>n.id===t.value)[0].content&&this.translateService.get(this.categoryList.filter(n=>n.id===t.value)[0].content).subscribe(n=>{this.feedbackForm.patchValue({content:n})})}removeBugControls(){try{this.bugDetailInfo=!1,this.feedbackForm.removeControl("description"),this.feedbackForm.removeControl("navigator"),this.feedbackForm.removeControl("os"),this.feedbackForm.removeControl("bugcomputer")}catch(t){console.error(t)}}addBugControls(){const t=new a.hs("");this.feedbackForm.addControl("description",t);const n=new a.hs("");this.feedbackForm.addControl("navigator",n);const o=new a.hs("");this.feedbackForm.addControl("os",o);const l=new a.hs(!0);this.feedbackForm.addControl("bugcomputer",l)}setContextInfos(){""!==v()&&this.feedbackForm.patchValue({os:v()}),""!==k()&&this.feedbackForm.patchValue({navigator:k()})}deleteContextInfos(){this.feedbackForm.patchValue({os:""}),this.feedbackForm.patchValue({navigator:""})}onSubmit(){this.sendData(),this.resetForm(),this.resetFormStatus(),this.setUserMailToContactIfExist()}resetFormStatus(){this.feedbackForm.reset(),Object.keys(this.feedbackForm.controls).forEac
1h(t=>{this.feedbackForm.get(t)?.setErrors(null)})}resetForm(){this.feedbackForm.reset(),this.feedbackForm.controls.email.setErrors(null),this.feedbackForm.controls.content.setErrors(null),this.feedbackForm.controls.category.setErrors(null),this.feedbackForm.controls.os&&this.feedbackForm.controls.os.setErrors(null),this.feedbackForm.controls.description&&this.feedbackForm.controls.description.setErrors(null),this.feedbackForm.controls.navigator&&this.feedbackForm.controls.navigator.setErrors(null),this.removeBugControls()}sendData(){const t={email:this.feedbackForm.value.email,category:this.feedbackForm.value.category,content:this.feedbackForm.value.content,language:this.translateService.currentLang};if(this.isbugWithInputCase()){t.content=t.content+" browser : "+this.feedbackForm.value.navigator+" OS: "+this.feedbackForm.value.os+" bug: "+this.feedbackForm.value.description;try{if(this.feedbackForm.value.bugcomputer){const n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=" resolution : "+screen.width+" x "+screen.height;t.content=t.content+l+" browser width : "+n+" browser height : "+o,t.content=t.content+" browser zoom : "+Math.round(100*window.devicePixelRatio)}}catch(n){console.error("error getting width and height"+n)}}this.isbugWithInputCase()&&this.files.length>0?(t.idsFiles=[],this.uploadFiles().subscribe(n=>{n.forEach(o=>{o.data.length&&o.data[0].length&&t.idsFiles.push(+o.data[0][0].id)}),this.files=[],this.sendEmail(t)})):this.sendEmail(t)}isbugWithInputCase(){return this.profileService.settings.feedbackUseInputFieldForBug&&this.feedbackForm.value.category===this.profileService.settings.idSubjectToOpenBugInputs}sendEmail(t){this.octopusConnectService.createEntity("form-project",t).subscribe({next:()=>{this.isMessageSend=!0,this.profileService.settings.feedbackUseInputFieldForBug?this.openPopUpSuccess():setTimeout(()=>{this.isMessageSend=!1,this.router.navigate(["../"])},3e3)},error:n=>{console.error(n),this.messageSendError=!0,setTimeout(()=>{this.isMessageSend=!1},2e3)}})}openPopUpSuccess(){const t=new u.ru;t.data={titleDialog:"generic.email_sent_title",bodyDialog:"generic.email_sent"},this.translateService.get(t.data.bodyDialog).subscribe(n=>t.data.bodyDialog=n),this.translateService.get(t.data.titleDialog).subscribe(n=>t.data.titleDialog=n),this.dialog.open(j.r,t)}uploadFileEvent(t){this.fileErrorMsg="",this.files.length<+this.profileService.settings.feedbackMaxFileToSend?this.files.push(t):this.tooManyFilesError=!0}fileError(t){try{switch(t){case f.fileIsTooBig:this.errorMsgToSend("generic.file_too_big");break;case f.errorDuringDropFile:this.errorMsgToSend("generic.file_drop_error");break;case f.formatNotAllowed:this.errorMsgToSend("generic.file_format_not_allowed");break;default:this.errorMsgToSend("generic.unknow_error")}}catch{this.fileErrorMsg="an error occured"}}errorMsgToSend(t){this.translateService.get(t).subscribe(n=>{this.fileErrorMsg=n})}removeFile(t){const n=this.files.findIndex(o=>o.name===t);this.files.splice(n,1),this.tooManyFilesError=!1}uploadFiles(){const t=[];return this.files.forEach(n=>{t.push(this.uploadFileService.uploadFile(n,this.accountManagementProviderService.userAccessToken))}),(0,x.z)(t).pipe((0,M.s)(1))}changeDataAutoDetectForBug(t){t?this.setContextInfos():this.deleteContextInfos()}get maxFileSize(){return this.profileService.settings.feedbackMaxFileSize}get feedbackUseInputFieldForBug(){return this.profileService.settings.feedbackUseInputFieldForBug}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(B.kX),e.rXU(U.z_),e.rXU(A.Ix),e.rXU(m.c$),e.rXU(O.p),e.rXU(V.$7),e.rXU(L),e.rXU(u.bZ))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-contact"]],decls:40,vars:34,consts:[[1,"contact__section"],[1,"contact__header"],[1,"contact__header-image",3,"src"],["aria-describedby","required-field-guideline",1,"contact__form",3,"ngSubmit","formGroup"],["id","required-field-guideline",1,"contact__required-field-guideline"],["matInput","","type","text","formControlName","email"],["name","category","formControlName","category",3,"selectionChange"],[3,"value"],["matInput","","formControlName","content"],["type","submit",1,"contact__submit-button",3,"disabled"],["name","is-bug-computer","formControlName","bugcomputer",3,"change","aria-label"],["matInput","","type","text","formControlName","navigator","required",""],["matInput","","type","text","formControlName","os","required",""],[3,"file","error","errorMsg","title","btnLabel","description","maxSizeFile"],["matInput","","formControlName","description","required",""],["svgIcon","cross",3,"click"]],template:function(n,o){1&n&&(e.j41(0,"section",0)(1,"header",1),e.nrm(2,"img",2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"form",3),e.bIt("ngSubmit",function(){return o.onSubmit()}),e.j41(5,"div",4),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.j41(8,"mat-form-field")(9,"mat-label"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.nrm(12,"input",5),e.j41(13,"mat-error"),e.EFF(14),e.nI1(15,"translate"),e.k0s()(),e.j41(16,"mat-form-field")(17,"mat-label"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"mat-select",6),e.bIt("selectionChange",function(d){return o.changeCategory(d)}),e.Z7z(21,J,3,4,"mat-option",7,e.fX1),e.k0s(),e.j41(23,"mat-error"),e.EFF(24),e.nI1(25,"translate"),e.k0s()(),e.nVh(26,N,36,37),e.j41(27,"mat-form-field")(28,"mat-label"),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.nrm(31,"textarea",8),e.j41(32,"mat-error"),e.EFF(33),e.nI1(34,"translate"),e.k0s()(),e.j41(35,"button",9),e.EFF(36),e.nI1(37,"translate"),e.k0s(),e.nVh(38,P,3,3,"span"),e.nVh(39,Y,3,3,"mat-error"),e.k0s()()),2&n&&(e.R7$(2),e.Y8G("src",e.VkB("assets/",o.assetbrand,"/images/logos/feedback.png"),e.B4B),e.BMQ("alt",e.bMT(3,16,"accessibility.contact_img")),e.R7$(2),e.Y8G("formGroup",o.feedbackForm),e.R7$(2),e.SpI(" ",e.bMT(7,18,"generic.required_field")," "),e.R7$(4),e.JRh(e.bMT(11,20,"account-management.email")),e.R7$(4),e.JRh(e.bMT(15,22,"generic.email_error")),e.R7$(4),e.JRh(e.bMT(19,24,"error_reporting.subject_label")),e.R7$(3),e.Dyx(o.categoryList),e.R7$(3),e.SpI(" ",e.bMT(25,26,"generic.field.required")," "),e.R7$(2),e.vxM(o.bugDetailInfo&&o.feedbackUseInputFieldForBug?26:-1),e.R7$(3),e.JRh(e.bMT(30,28,"messaging.message")),e.R7$(4),e.JRh(e.bMT(34,30,"generic.field.required")),e.R7$(2),e.Y8G("disabled",!o.feedbackForm.valid),e.R7$(),e.SpI(" ",e.bMT(37,32,"account-management.send_feedback")," "),e.R7$(2),e.vxM(o.isMessageSend?38:-1),e.R7$(),e.vxM(o.messageSendError?39:-1))},dependencies:[a.X1,a.qT,a.me,a.BC,a.cb,a.YS,a.j4,a.JD,$.R,g.rl,g.nJ,g.TL,S.fS,S.fg,F.
1Ve,F.VO,X.wT,C.g7,C.So,I.m_,I.An,D.Hl,u.hM,m.h,_.iI,y.A,R,m.D9],encapsulation:2})}}return i})()}}]);

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.