PageSourceSearch

https://tr.vava.cars/chunk-OB2IAPSI.js

js vava.cars collected 2026-10-07 08:23:46 UTC 17,245 bytes, 1 lines download raw bytes

1import{a as ee,b as te}from"./chunk-6IYA2PNW.js";import{a as He}from"./chunk-BDULHJO6.js";import{b as ke}from"./chunk-MGMRNW4E.js";import"./chunk-HIVQ6PSO.js";import"./chunk-R4NZTXWL.js";import"./chunk-WLGTYKDZ.js";import"./chunk-3IEOKETJ.js";import"./chunk-SCIQFTIH.js";import"./chunk-3PPG3Z7A.js";import"./chunk-BCMZKZCW.js";import"./chunk-CGQ5EDVL.js";import{n as $e,p as W}from"./chunk-AYOUWP34.js";import{a as Ve,d as Be,e as Re,g as q,k as Y,r as Ue,s as je,u as Le}from"./chunk-MUQZNVUP.js";import"./chunk-Q7B5NWHO.js";import"./chunk-4HQJ3NKY.js";import"./chunk-C24AG7SQ.js";import"./chunk-HCXVREHZ.js";import"./chunk-WUEWRIAV.js";import"./chunk-33S5KQ5C.js";import"./chunk-SQ3RDEBM.js";import"./chunk-NYQE5AXP.js";import"./chunk-UZNDGU2Z.js";import"./chunk-KVT3OPON.js";import"./chunk-SBVBU5Q5.js";import"./chunk-BC23MMDC.js";import"./chunk-ZAX7ETH6.js";import"./chunk-63R7DJHA.js";import"./chunk-MV5ZRZA7.js";import"./chunk-TUU7LT6S.js";import{a as Me}from"./chunk-242X2FV7.js";import"./chunk-4SXTRAE2.js";import"./chunk-2IZT475I.js";import"./chunk-A7GKGJBJ.js";import"./chunk-N47XCLTH.js";import"./chunk-NDAOXHYR.js";import"./chunk-NUYGW733.js";import"./chunk-FPZHQ23V.js";import"./chunk-T7J7QSRH.js";import"./chunk-4LYIKTX5.js";import{a as Pe}from"./chunk-MFFJE6MK.js";import{$b as Ee,Sa as Fe,Sb as h,Tb as H,Xa as G,cf as Te,dc as Ae,ld as De}from"./chunk-SRDWMU6F.js";import"./chunk-VPWWSG6A.js";import{a as Ie}from"./chunk-YWE2DEGF.js";import"./chunk-M5UZ3FRU.js";import{c as D,e as T}from"./chunk-6W3WIZQP.js";import"./chunk-7V3PSFPC.js";import"./chunk-TNOZY3JM.js";import{n as ye,r as we}from"./chunk-7VAAVEYI.js";import{$c as L,Aa as de,Cd as o,D as N,Dc as S,Dd as l,E as ae,F as oe,Fc as he,Ga as K,Gb as B,Gc as ve,Hb as R,Hc as _e,Hd as xe,Ic as u,Jc as p,Kc as f,Nb as s,Oc as I,P as Z,Ra as C,Sa as b,Sb as U,T as E,Tc as F,Ub as ge,Uc as g,X as le,Za as me,ab as O,ad as $,ba as J,bc as A,bd as k,da as se,ea as x,fc as fe,ga as pe,gd as y,hb as ue,hc as v,hd as Q,id as Ce,qa as ce,ra as z,td as be,v as ne,va as X,vc as d,w as re,x as V,xc as j,zd as Se}from"./chunk-4O3NM6QG.js";import"./chunk-4ZYARHXF.js";import{a as P,b as M}from"./chunk-PGWVXC2P.js";var r=function(i){return i.FrontDriverCorner="front-left",i.FrontPassengerCorner="front-right",i.RearDriverCorner="rear-left",i.RearPassengerCorner="rear-right",i.Interior="front-left-cabin",i.InstrumentalCluster="dashboard",i.RightFrontWheel="right-front-wheel",i.RightRearWheel="right-rear-wheel",i.LeftFrontWheel="left-front-wheel",i.LeftRearWheel="left-rear-wheel",i}(r||{});function Qe(i,m){i&1&&(u(0,"div",0)(1,"div",1),f(2,"vava-icon",2)(3,"div",3),o(4,"translate"),p()()),i&2&&(s(3),d("innerHTML",l(4,1,"errors.imageEvaluationFailed"),B))}function Ge(i,m){i&1&&(u(0,"div",4),f(1,"span",7),o(2,"translate"),f(3,"span",8),o(4,"translate"),p()),i&2&&(s(),d("innerHTML",l(2,2,"car-inspector.messages.dragDropFiles"),B),s(2),d("innerHTML",l(4,4,"car-inspector.messages.dragDropAcceptedFormats"),B))}function Ne(i,m){i&1&&(u(0,"div",5)(1,"div",1),f(2,"vava-icon",9)(3,"div",3),o(4,"translate"),p()()),i&2&&(s(3),d("innerHTML",l(4,1,"errors.imageUploadFailed"),B))}function Ze(i,m){if(i&1&&(u(0,"div",6)(1,"div",10)(2,"div",11)(3,"span",12),y(4,"Uploading photo"),p(),u(5,"span",13),y(6,"please wait ..."),p()()(),f(7,"vava-progress-bar",14),p()),i&2){let e=g(2);s(7),d("color","alternative")("size",1)("percentage",e.picture.progress)}}function Je(i,m){if(i&1&&v(0,Ge,5,6,"div",4)(1,Ne,5,3,"div",5)(2,Ze,8,3,"div",6),i&2){let e,n=g();S((e=n.picture.status)===n.uploadStatus.Idle?0:e===n.uploadStatus.Error?1:e===n.uploadStatus.Uploading?2:-1)}}var We=(()=>{class i{constructor(){this.rejected=!1,this.uploadStatus=h}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=A({type:i,selectors:[["vc-file-angle-detail"]],inputs:{picture:"picture",rejected:"rejected"},decls:2,vars:1,consts:[[1,"flex","flex-col","gap-2.5","p-4","justify-center","bg-additional-100","border-additional-300","border-1","rounded-b-md"],[1,"flex","flex-row","items-start","justify-around","gap-2"],["icon","exclamation-triangle","size","sm",1,"text-additional-600"],[1,"text-sm","break-words","font-semibold",3,"innerHTML"],[1,"flex","flex-col","gap-2.5","p-5","justify-center","items-center","text-center"],[1,"flex","flex-col","gap-2.5","p-4","justify-center","bg-additional-100","border-1","border-additional-300","rounded-b-md"],[1,"flex","flex-col","bg-monochrome-100","border","border-1","border-monochrome-300","rounded-b-md"],[1,"font-bold","text-base",3,"innerHTML"],[1,"text-xs","text-monochrome-500",3,"innerHTML"],["
1icon","exclamation-triangle","size","sm",1,"text-additional-500"],[1,"flex","flex-row","justify-between","my-3","px-4"],[1,"flex","flex-col"],[1,"text-primary","font-primary","font-semibold"],[1,"text-black","font-primary","text-sm"],["testId","file-angle-detail-progress-bar",1,"flex",3,"color","size","percentage"]],template:function(n,t){n&1&&v(0,Qe,5,3,"div",0)(1,Je,3,1),n&2&&S(t.rejected&&t.picture.base64===""?0:1)},dependencies:[De,Fe,T,D],encapsulation:2,changeDetection:0})}}return i})();var Xe=["dropZone"],Ye=(i,m,e,n,t)=>({"bg-accent-50 border-error":i,"bg-primary-50 border-dashed":m,"bg-monochrome-100 border-solid":e,"bg-primary-10":n,"border-0":t});function et(i,m){if(i&1&&(u(0,"div",2)(1,"div",9),y(2),p(),f(3,"vava-button",10),o(4,"translate"),p()),i&2){let e=g();s(2),Q(e.title),s(),d("text",l(4,2,"actions.change"))}}function tt(i,m){if(i&1&&(u(0,"div",3),y(1),p()),i&2){let e=g();s(),Ce(" ",e.title," ")}}function it(i,m){if(i&1&&f(0,"img",11),i&2){let e=g(2);d("src",e.angle.picture==null?null:e.angle.picture.base64,R)}}function nt(i,m){if(i&1&&f(0,"img",6),i&2){let e=g(2);d("src",e.angle.picture==null?null:e.angle.picture.base64,R)}}function rt(i,m){if(i&1&&v(0,it,1,1,"img",11)(1,nt,1,1,"img",6),i&2){let e=g();S((e.angle.picture==null?null:e.angle.picture.status)!==e.uploadStatus.Uploaded?0:1)}}function at(i,m){if(i&1&&f(0,"img",6),i&2){let e=g();d("src",e.angle.picture==null?null:e.angle.picture.url,R)}}function ot(i,m){if(i&1&&f(0,"img",7),i&2){let e=g();d("src",e.angle.placeholder==null?null:e.angle.placeholder.imagePath,R)}}var ze=(()=>{class i{constructor(){this.title="",this.angle={},this.fileDropped=new O,this.isDragging=!1,this.uploadStatus=h}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.isDragging=!0}onDragLeave(e){this.isDragging=!1}onDrop(e){e.preventDefault(),e.stopPropagation();let n=e.dataTransfer?.files;n&&n.length>0&&this.fileDropped.emit(n[0]),this.isDragging=!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=A({type:i,selectors:[["vc-file-angle"]],viewQuery:function(n,t){if(n&1&&L(Xe,5),n&2){let a;$(a=k())&&(t.dropZone=a.first)}},inputs:{title:"title",angle:"angle"},outputs:{fileDropped:"fileDropped"},decls:10,vars:17,consts:[["dropZone",""],[1,"w-full","md:w-[23rem]","h-[20rem]","border","border-primary","flex","flex-col","align-end","rounded-md",3,"dragover","dragleave","drop","ngClass"],[1,"w-full","flex","items-center","justify-between","px-6","py-4"],[1,"w-full","flex","font-bold","text-xl","px-6","py-4","items-center"],[1,"flex","flex-col","items-center","cursor-pointer","grow"],[1,"flex","w-[20rem]","object-cover"],[1,"w-full","h-[12rem]","object-cover","rounded-lg",3,"src"],[1,"w-full","h-[9.25rem]","object-contain","justify-center",3,"src"],[3,"rejected","picture"],[1,"font-bold","text-xl"],["variant","stroked",3,"text"],[1,"w-full","h-[9.25rem]","blur-sm","object-cover","rounded-lg",3,"src"]],template:function(n,t){if(n&1){let a=I();u(0,"div",1,0),F("dragover",function(w){return C(a),b(t.onDragOver(w))})("dragleave",function(w){return C(a),b(t.onDragLeave(w))})("drop",function(w){return C(a),b(t.onDrop(w))}),v(2,et,5,4,"div",2)(3,tt,2,1,"div",3),u(4,"div",4)(5,"div",5),v(6,rt,2,1)(7,at,1,1,"img",6)(8,ot,1,1,"img",7),p()(),f(9,"vc-file-angle-detail",8),p()}n&2&&(d("ngClass",Se(11,Ye,t.angle.picture&&t.angle.picture.status===t.uploadStatus.Error,t.isDragging,t.angle.picture&&t.angle.picture.status===t.uploadStatus.Uploaded&&!t.angle.hasError,t.angle.picture&&t.angle.picture.status!==t.uploadStatus.Uploaded&&!t.angle.hasError,t.angle.picture&&t.angle.picture.status===t.uploadStatus.Uploaded)),s(2),S(t.angle.picture&&t.angle.picture.status===t.uploadStatus.Uploaded?2:3),s(2),j("justify-center",(t.angle.picture==null?null:t.angle.picture.status)===t.uploadStatus.Idle)("justify-end",(t.angle.picture==null?null:t.angle.picture.status)!==t.uploadStatus.Idle)("mb-4",(t.angle.picture==null?null:t.angle.picture.status)!==t.uploadStatus.Idle),s(2),S((t.angle.picture==null?null:t.angle.picture.base64)!==""?6:(t.angle.picture==null?null:t.angle.picture.status)===t.uploadStatus.Uploaded?7:8),s(3),d("rejected",t.angle.rejected)("picture",t.angle.picture))},dependencies:[ye,G,We,T,D],encapsulation:2,changeDetection:0})}}return i})();var Ke={[r.FrontDriverCorner]:{translationKey:`car-inspector.angles.${r.FrontDriverCorner}`,imagePath:"/assets/images/inspection/vehicle-placeholders/front-driver-corner.webp"},[r.FrontPassengerCorner]:{translationKey:`car-inspector.angles.${r.FrontPassengerCorner}`,imagePath:"/assets/images/inspection/vehicle-placeholders/front-passenger-corner.webp"},[r.RearDriverCorner]:{translationKey:`car-inspector.angles.${r.RearDriverCorner}`,imagePath:"/assets/images/inspection/vehicle-placeholders/rear-driver-corner.webp"},[r.RearPassengerCorner]:{translationKey:`car-inspector.angles.${r.RearPassengerCorner}`,imagePath:"/assets/images/inspection/vehicle-placeholders/rear-passenger-corner.webp"},[r.Interior]:{translationKey:`car-inspector.angles.${r.Interior}`,imagePath:"/assets/images/inspection/vehicle-placeholders/interior.webp"},[r.InstrumentalCluster]:{translationKey:`car-inspector.angles.${r.InstrumentalCluster}`,imagePath:"/assets/images/inspection/vehicle-placeholders/instrumental-cluster.webp"},[r.RightFrontWheel]:{translationKey:`car-inspector.angles.${r.RightFrontWheel}`,imagePath:"/assets/images/inspection/vehicle-placeholders/right-front-wheel.webp"},[r.RightRearWheel]:{translationKey:`car-inspector.angles.${r.RightRearWheel}`,imagePath:"/assets/images/inspection/vehicle-placeholders/right-rear-wheel.webp"},[r.LeftFrontWheel]:{translationKey:`car-inspector.angles.${r.LeftFrontWheel}`,imagePath:"/assets/images/inspection/vehicle-placeholders/left-front-wheel.webp"},[r.LeftRearWheel]:{translationKey:`car-inspector.angles.${r.LeftRearWheel}`,imagePath:"/assets/images/inspection/vehicle-placeholders/left-rear-wheel.webp"}};var _=Pe({name:"car-angles"},Ve(),je()),lt=Object.keys(r).map(i=>({id:r[i],name:"",angleId:0,hasError:!1,picture:{base64:"",url:"",id:0,uniqueId:"",status:h.Idle},placeholder:Ke[r[i]]}));_.update(Be(lt));var Oe=(()=>{class i{getActiveId(){return _.query(Le)}getAllEntities(){return _.query(Re())}updateAngle(e,n,t,a){let c=t.documents[0]||{};_.update(q(e,w=>M(P({},w),{name:n,angleId:t.id,picture:{id:c.documentId,url:c.documentPath,base64:"",uniqueId:"",status:c.documentPath?h.Uploaded:h.Idle},rejected:!c.documentPath&&a===$e.RequiresAction})))}getFormDataToSend(){return this.getAllEntities().map(e=>({id:e.angleId,documents:[{documentId:e.picture.id,documentPath:e.picture.url}]}))}setActiveId(e){_.update(Ue(e))}
1setPicture(e,n){_.update(q(e,t=>M(P({},t),{picture:n})))}updatePicture(e,n){_.update(q(e,t=>M(P({},t),{picture:n})))}setError(e,n){_.update(q(e,t=>M(P({},t),{hasError:n})))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=de({token:i,factory:i.\u0275fac,providedIn:"any"})}}return i})();var pt=["fileUploadModal"],ct=["vehicleImagesContainer"];function dt(i,m){if(i&1){let e=I();u(0,"vava-confirm-modal",11),o(1,"translate"),o(2,"translate"),F("acceptModal",function(){C(e);let t=g();return b(t.errorAcquiringImage$.next(!1))}),p()}i&2&&d("errorMessage",l(1,2,"errors.imageAcquiringFailed"))("acceptButtonText",l(2,4,"actions.close"))}function mt(i,m){}function ut(i,m){if(i&1){let e=I();u(0,"vc-file-angle",12),o(1,"translate"),F("click",function(){let t=C(e).$implicit,a=g();return b(a.handleUpload(t.id))})("fileDropped",function(t){let a=C(e).$implicit,c=g();return b(c.handleFileDrop(a.id,t))}),p()}if(i&2){let e=m.$implicit;d("angle",e)("title",l(1,2,"titles.v0images."+e.name))}}function gt(i,m){if(i&1){let e=I();u(0,"div",10)(1,"vava-button",7),o(2,"async"),o(3,"async"),o(4,"translate"),o(5,"async"),F("click",function(){C(e);let t=g();return b(t.proceed())}),p()()}if(i&2){let e=g();s(),j("w-full",l(2,5,e.isMobile$)),d("fullWidth",l(3,7,e.isMobile$))("text",l(4,9,"actions.proceed"))("disabled",!l(5,11,e.canProceed()))}}var di=(()=>{class i extends Te{constructor(e,n,t,a){super(),this.isMobileBreakpoint$=e,this.carAngleService=n,this.imageSelectorService=t,this.inspectionService=a,this.confirmationComponent=He,this.destroyRef=K(me),this.uniqueIdService=K(ee),this.scrollTrackerService=K(te),this.isMobile$=this.isMobileBreakpoint$.pipe(ce(!1),J()),this.angles$=_.pipe(Y()),this.errorAcquiringImage$=new O(!1),this.isButtonPassed=ue(!1),this.inspectionService.activeGroup$.pipe(Z(c=>!!c&&!!c.checkpoints&&c.checkpoints.length>0&&c.code===W.VEHICLIMGS),J(),x()).subscribe(c=>this.hydrateForm(c))}ngOnInit(){ae({error:this.inspectionService.error$,loading:this.inspectionService.isLoading$}).pipe(x(),Z(({error:e,loading:n})=>!e.active&&!n),z(()=>this.inspectionService.hydrateInspection(W.VEHICLIMGS)),X(()=>this.inspectionService.configureTramerLimit().pipe(x()).subscribe()),E(e=>V(()=>e)),se(()=>this.inspectionService.setIsLoading(!1))).subscribe(),this.scrollTrackerService.track(this.carPartContainer.nativeElement).pipe(Ie(this.destroyRef)).subscribe(e=>this.isButtonPassed.set(e))}canProceed(){return _.pipe(Y(),N(e=>e.filter(n=>!n.picture.url||n.picture.id===0||n.picture.status!==h.Uploaded)),z(e=>re(e.length<1)))}proceed(){this.skipComponentDeactivation(),this.inspectionService.proceedInspection(W.VEHICLIMGS,{code:W.VEHICLIMGS,checkpoints:this.carAngleService.getFormDataToSend()}).pipe(x(),E(e=>V(()=>e))).subscribe()}handleFileDrop(e,n){this.carAngleService.setActiveId(e),this.imageSelectorService.compressImage(n).pipe(x(),z(t=>this.upload(t,e,this.uniqueIdService.getUniqueId())),E(t=>this.handleError(t))).subscribe()}handleUpload(e){this.carAngleService.setActiveId(e),this.imageSelectorService.handleSelect(!1,!1,{target:this.fileUploadModal,title:"Select picture"}).pipe(x(),le(n=>ne(n)),oe(n=>this.upload(n,e,this.uniqueIdService.getUniqueId())),E(n=>this.handleError(n))).subscribe()}handleError(e){return e.message===H.FailedUpload&&this.carAngleService.setError(this.carAngleService.getActiveId(),!0),e.message!==H.FailedUpload&&e.message!==H.CloseDialog&&this.errorAcquiringImage$.next(!0),V(()=>e)}hydrateForm(e){this.inspectionService.status$.pipe(x()).subscribe(n=>{Object.keys(r).forEach(t=>{let a=e?.checkpoints?.find(c=>c.name?.en?.toLocaleLowerCase().split(" ").join("-")===r[t]);a&&this.carAngleService.updateAngle(r[t],t,a,n)})})}upload(e,n,t){return this.carAngleService.setError(n,!1),this.carAngleService.updatePicture(n,{base64:e,uniqueId:t,status:h.Uploading}),this.inspectionService.uploadFile(e,t).pipe(E(()=>(this.carAngleService.updatePicture(n,{uniqueId:t,base64:e,status:h.Error}),V(()=>new Error(H.FailedUpload)))),X(a=>this.carAngleService.updatePicture(n,a)),pe(),N(a=>this.carAngleService.updatePicture(n,a)))}static{this.\u0275fac=function(n){return new(n||i)(U(Me),U(Oe),U(Ae),U(ke))}}static{this.\u0275cmp=A({type:i,selectors:[["vc-vehicle-images"]],viewQuery:function(n,t){if(n&1&&(L(pt,5,ge),L(ct,7)),n&2){let a;$(a=k())&&(t.fileUploadModal=a.first),$(a=k())&&(t.carPartContainer=a.first)}},features:[be([ee,te]),fe],decls:22,vars:24,consts:[["fileUploadModal",""],["vehicleImagesContainer",""],[3,"errorMessage","acceptButtonText"],[1,"flex","flex-col","gap-6"],[1,"py-4","pl-8","pr-4","flex","flex-col","gap-4","sm:gap-0","
1sm:flex-row","bg-secondary-50","rounded-lg","w-full","items-center","justify-between"],[1,"font-bold"],[1,"flex","flex-col","sm:flex-row","items-center","gap-4","w-full","sm:w-auto"],[3,"click","fullWidth","text","disabled"],[1,"flex","flex-col","w-full","md:flex-wrap","md:flex-row","gap-4"],[3,"angle","title"],[1,"sticky","bottom-0","w-full","pb-4","pt-8","px-4","bg-white","z-10","shadow-sm"],[3,"acceptModal","errorMessage","acceptButtonText"],[3,"click","fileDropped","angle","title"]],template:function(n,t){if(n&1){let a=I();v(0,dt,3,6,"vava-confirm-modal",2),o(1,"async"),v(2,mt,0,0,"ng-template",null,0,xe),u(4,"div",3)(5,"div",4)(6,"span",5),y(7),o(8,"translate"),p(),u(9,"div",6)(10,"vava-button",7),o(11,"async"),o(12,"async"),o(13,"translate"),o(14,"async"),F("click",function(){return C(a),b(t.proceed())}),p()()(),u(15,"div",8,1),ve(17,ut,2,4,"vc-file-angle",9,he),o(19,"async"),p()(),v(20,gt,6,13,"div",10),o(21,"async")}n&2&&(S(l(1,8,t.errorAcquiringImage$)?0:-1),s(7),Q(l(8,10,"titles.vehicleImagesBanner")),s(3),j("w-full",l(11,12,t.isMobile$)),d("fullWidth",l(12,14,t.isMobile$))("text",l(13,16,"actions.proceed"))("disabled",!l(14,18,t.canProceed())),s(7),_e(l(19,20,t.angles$)),s(3),S(l(21,22,t.isMobile$)&&t.isButtonPassed()?20:-1))},dependencies:[we,T,D,G,ze,Ee],encapsulation:2,changeDetection:0})}}return i})();export{di as VehicleImagesComponent};

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.