1import{a as $}from"./chunk-QHZ2UFTQ.js";import"./chunk-5NLF37MD.js";import"./chunk-VRKJBTE4.js";import"./chunk-ZT7BF6R4.js";import"./chunk-GNOMKHH2.js";import"./chunk-MIYW5325.js";import"./chunk-FJFH4XCE.js";import"./chunk-T52FVTMS.js";import"./chunk-4I6Y24VE.js";import"./chunk-VHBEXHUY.js";import"./chunk-IXNXTOPZ.js";import"./chunk-GGY6QDTV.js";import"./chunk-3WQEZLC2.js";import"./chunk-DB7AUQFG.js";import"./chunk-GLFTJW2T.js";import"./chunk-BHLMCFFK.js";import"./chunk-NP4PC25X.js";import"./chunk-D6IOGJMO.js";import"./chunk-MKJMCBBH.js";import"./chunk-KKDZHWJ2.js";import"./chunk-RS4X3CMD.js";import"./chunk-7DHSGR33.js";import"./chunk-4KDBBJRG.js";import{k as F}from"./chunk-3SEIXLDK.js";import{b as B,c as j,d as Y}from"./chunk-UIEAU6S2.js";import{x as A}from"./chunk-H3Y6JSWE.js";import{Hb as V,Kb as b,Mb as C,Nb as P,Nc as D,Ob as T,Pb as v,Qb as y,Sb as i,Tb as r,Ub as d,Uc as g,Vc as w,bc as H,db as t,gc as I,ic as m,kd as L,mb as u,oa as f,pa as x,qa as h,ra as k,sb as O,tc as S,uc as E,vc as _,wc as s,xc as M,yc as c}from"./chunk-AHLRJ2EW.js";import"./chunk-AMJ4GB2S.js";import"./chunk-OXDKANHF.js";import"./chunk-WGJEEJGF.js";import"./chunk-6ACFICIG.js";import"./chunk-K7BHMZHH.js";import"./chunk-FE7444LI.js";import"./chunk-XUHYVR5R.js";var U=()=>[1,2,3,4],z=(o,l)=>l.id;function G(o,l){o&1&&(i(0,"div",8),d(1,"div",9)(2,"div",10)(3,"div",11),r())}function R(o,l){o&1&&(i(0,"div",4)(1,"div",6),d(2,"div",7),r(),v(3,G,4,0,"div",8,T),r()),o&2&&(t(3),y(D(0,U)))}function q(o,l){if(o&1&&(i(0,"div",39),h(),i(1,"svg",40),d(2,"path",41),r(),k(),i(3,"span",42),s(4),r()()),o&2){let e=l.$implicit;t(4),M(e)}}function J(o,l){if(o&1&&(i(0,"div",38),v(1,q,5,1,"div",39,P),r()),o&2){let e=m().$implicit;t(),y(e.insights)}}function K(o,l){if(o&1){let e=H();i(0,"div",28),I("click",function(){let a=f(e).$implicit,p=m(2);return x(p.toggleSystem(a.id))})("keydown.enter",function(){let a=f(e).$implicit,p=m(2);return x(p.toggleSystem(a.id))})("keydown.space",function(a){let p=f(e).$implicit,N=m(2);return a.preventDefault(),x(N.toggleSystem(p.id))}),i(1,"div",29)(2,"div",30),s(3),r(),i(4,"div",19)(5,"p",31),s(6),r(),i(7,"span",32),s(8),r()(),i(9,"div",33)(10,"div",34),d(11,"div",35),r()(),h(),i(12,"svg",36),d(13,"path",37),r()(),b(14,J,3,0,"div",38),r()}if(o&2){let e=l.$implicit,n=m(2);E("system-card--expanded",n.expandedSystem===e.id),V("aria-expanded",n.expandedSystem===e.id)("aria-label",e.name),t(2),_(n.statusScoreColor(e.status)),t(),c(" ",e.score," "),t(3),M(e.name),t(),_(n.statusColor(e.status)),t(),c(" ",n.statusLabel(e.status)," "),t(3),_(n.statusScoreColor(e.status)),S("width",e.score,"%"),t(),E("chevron--open",n.expandedSystem===e.id),t(2),C(n.expandedSystem===e.id?14:-1)}}function Q(o,l){if(o&1&&(i(0,"div",12)(1,"div",13)(2,"div",14),h(),i(3,"svg",15),d(4,"circle",16)(5,"circle",17),r(),k(),i(6,"span",18),s(7),r()(),i(8,"div",19)(9,"div",20)(10,"span",21),s(11),g(12,"translate"),r()(),i(13,"span",22),s(14),r(),i(15,"p",23),s(16),r()()()(),i(17,"div",24)(18,"h2",25),s(19),g(20,"translate"),r(),v(21,K,15,18,"div",26,z),r(),i(23,"p",27),s(24),g(25,"translate"),r()),o&2){let e=m();t(5),_(e.scoreColor(e.report.overallScore)),S("stroke-dasharray",e.scoreArc(e.report.overallScore)+" 999"),t(),_(e.scoreColor(e.report.overallScore)),t(),c(" ",e.report.overallScore," "),t(4),c(" ",w(12,14,"V2.DEMO.VEHICLE_HEALTH.SCORE_LABEL")," "),t(2),_(e.safetyClass(e.report.safetyStatus)),t(),c(" ",e.safetyLabel(e.report.safetyStatus)," "),t(2),c(" ",e.report.summary," "),t(3),c(" ",w(20,16,"V2.DEMO.VEHICLE_HEALTH.SYSTEMS_LABEL")," "),t(2),y(e.report.systems),t(3),c(" ",w(25,18,"V2.DEMO.DISCLAIMER")," ")}}var W="assets/demo/vehicle-health/report.json",ie=(()=>{class o{constructor(e,n,a){this.http=e,this.cdr=n,this.translate=a,this.report=null,this.loading=!0,this.expandedSystem=null}ngOnInit(){this.http.get(W).subscribe({next:e=>{this.report=e,this.loading=!1,this.cdr.markForCheck()},error:()=>{this.loading=!1,this.cdr.markForCheck()}})}toggleSystem(e){this.expandedSystem=this.expandedSystem===e?null:e,this.cdr.markForCheck()}scoreColor(e){return e>=70?"score--good":e>=40?"score--amber":"score--red"}statusScoreColor(e){return e==="good"?"score--good":e==="amber"?"score--amber":"score--red"}statusColor(e){return e==="good"?"status--good":e==="amber"?"status--amber":"status--red"}statusLabel(e){let n={good:"V2.DEMO.VEHICLE_HEALTH.STATUS_GOOD",amber:"V2.DEMO.VEHICLE_HEALTH.STATUS_ATTENTION",red:"V2.DEMO.VEHICLE_HEALTH.STATUS_CRITICAL"};return this.translate.instant(n[e]??n.red)}safetyLabel(e){let n={safe_to_drive:"V2.DEMO.VEHICLE_HEALTH.SAFETY_SAFE",drive_with_caution:"V2.DEMO.VEHICLE_HEALTH.SAFETY_CAUTION",inspection_required:"V2.DEMO.VEHICLE_HEALTH.SAFETY_INSPECTION",do_not_drive:"V2.DEMO.VEHICLE_HEALTH.SAFETY_DO_NOT_DRIVE"};return n[e]?this.translate.instant(n[e]):e}safetyClass(e){return e==="safe_to_drive"?"safety--safe":e==="drive_with_caution"?"safety--caution":"safety--danger"}scoreArc(e){let a=2*Math.PI*36,p=e/100*(220/360);return String(Math.round(p*a*10)/10)}static{this.\u0275fac=function(n){return new(n||o)(u(F),u(L),u(B))}}static{this.\u0275cmp=O({type:o,selectors:[["app-v2-vehicle-health-demo"]],decls:11,vars:10,consts:[[1,"demo-page","tw-pb-8"],[1,"tw-flex","tw-items-center","tw-justify-between","tw-gap-3","tw-mb-6","tw-px-1"],[1,"tw-text-[9px]","tw-font-bold","tw-text-mech-text-muted","tw-uppercase","tw-tracking-widest"],[1,"demo-badge"],[1,"tw-gri
1d","tw-grid-cols-1","tw-gap-4"],["feature","vehicle-health","requiredTier","DIY"],[1,"tw-bg-mech-surface","tw-border-2","tw-border-mech-border","tw-rounded-[24px]","tw-p-8","tw-flex","tw-justify-center"],[1,"shimmer-block","tw-w-28","tw-h-28","tw-rounded-full"],[1,"tw-bg-mech-surface","tw-border-2","tw-border-mech-border","tw-rounded-[20px]","tw-p-5"],[1,"shimmer-line","tw-h-4","tw-rounded-full","tw-w-2/3","tw-mb-3"],[1,"shimmer-line","tw-h-2.5","tw-rounded-full","tw-w-full","tw-mb-2"],[1,"shimmer-line","tw-h-2.5","tw-rounded-full","tw-w-5/6"],[1,"tw-bg-mech-surface","tw-border-2","tw-border-mech-border","tw-rounded-[24px]","tw-p-6","tw-mb-4"],[1,"tw-flex","tw-items-center","tw-gap-5"],[1,"score-ring-wrap"],["viewBox","0 0 88 88","aria-hidden","true",1,"score-ring"],["cx","44","cy","44","r","36",1,"score-ring__track"],["cx","44","cy","44","r","36",1,"score-ring__fill"],[1,"score-ring__label"],[1,"tw-flex-1","tw-min-w-0"],[1,"tw-flex","tw-items-center","tw-gap-2","tw-mb-1"],[1,"tw-text-lg","tw-font-extrabold","tw-text-mech-text"],[1,"safety-pill"],[1,"tw-text-xs","tw-text-mech-text-secondary","tw-mt-2","tw-leading-relaxed","tw-line-clamp-3"],[1,"tw-space-y-3"],[1,"tw-text-sm","tw-font-bold","tw-text-mech-text-muted","tw-uppercase","tw-tracking-wider","tw-px-1"],["role","button","tabindex","0",1,"system-card","tw-bg-mech-surface","tw-border-2","tw-border-mech-border","tw-rounded-[20px]","tw-overflow-hidden","tw-cursor-pointer",3,"system-card--expanded"],[1,"tw-text-[10px]","tw-text-mech-text-faint","tw-text-center","tw-mt-6","tw-px-4","tw-leading-relaxed"],["role","button","tabindex","0",1,"system-card","tw-bg-mech-surface","tw-border-2","tw-border-mech-border","tw-rounded-[20px]","tw-overflow-hidden","tw-cursor-pointer",3,"click","keydown.enter","keydown.space"],[1,"tw-flex","tw-items-center","tw-gap-4","tw-p-4"],[1,"score-badge"],[1,"tw-text-sm","tw-font-bold","tw-text-mech-text","tw-truncate"],[1,"tw-text-[11px]","tw-font-semibold"],[1,"score-bar-wrap","tw-hidden","sm:tw-block"],[1,"score-bar__track"],[1,"score-bar__fill"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",1,"tw-w-4","tw-h-4","tw-text-mech-text-faint","tw-flex-shrink-0","chevron"],["stroke-linecap","round","stroke-linejoin","round","d","M19.5 8.25l-7.5 7.5-7.5-7.5"],[1,"insights-panel"],[1,"insight-row"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",1,"tw-w-3.5","tw-h-3.5","tw-flex-shrink-0","tw-text-mech-text-faint","tw-mt-0.5"],["stroke-linecap","round","stroke-linejoin","round","d","M8.25 4.5l7.5 7.5-7.5 7.5"],[1,"tw-text-xs","tw-text-mech-text-secondary","tw-leading-relaxed"]],template:function(n,a){n&1&&(i(0,"div",0)(1,"div",1)(2,"span",2),s(3),g(4,"translate"),r(),i(5,"span",3),s(6),g(7,"translate"),r()(),b(8,R,5,1,"div",4),b(9,Q,26,20),d(10,"app-demo-upsell-bar",5),r()),n&2&&(E("demo-has-upsell",!0),t(3),c(" ",w(4,6,"V2.DEMO.VEHICLE_LABEL")," "),t(3),M(w(7,8,"V2.DEMO.BADGE")),t(2),C(a.loading?8:-1),t(),C(!a.loading&&a.report?9:-1))},dependencies:[A,Y,$,j],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;font-family:Inter,ui-sans-serif,system-ui,sans-serif}.demo-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 10px;border-radius:999px;background:#22c55e1f;color:var(--color-success-text);font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;flex-shrink:0}.score-ring-wrap[_ngcontent-%COMP%]{position:relative;width:88px;height:88px;flex-shrink:0}.score-ring[_ngcontent-%COMP%]{width:88px;height:88px;transform:rotate(-110deg)}.score-ring__track[_ngcontent-%COMP%]{fill:none;stroke:var(--color-border, #27272a);stroke-width:8;stroke-linecap:round}.score-ring__fill[_ngcontent-%COMP%]{fill:none;stroke-width:8;stroke-linecap:round;transition:stroke-dasharray .6s ease}.score-ring__fill.score--good[_ngcontent-%COMP%]{stroke:#0dae30}.score-ring__fill.score--amber[_ngcontent-%COMP%]{stroke:#f59e0b}.score-ring__fill.score--red[_ngcontent-%COMP%]{stroke:#e50f2e}.score-ring__label[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;letter-spacing:-.03em}.score-ring__label.score--good[_ngcontent-%COMP%]{color:#0dae30}.score-ring__label.score--amber[_ngcontent-%COMP%]{color:#f59e0b}.score-ring__label.score--red[_ngcontent-%COMP%]{color:#e50f2e}.safety-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.04em}.safety-pill.safety--safe[_ngcontent-%COMP%]{background:#0dae301f;color:var(--color-success-text)}.safety-pill.safety--caution[_ngcontent-%COMP%]{background:#f59e0b1f;color:var(--color-warning-text)}.safety-pill.safety--danger[_ngcontent-%COMP%]{background:#e50f2e1f;color:var(--color-danger-text)}.score-badge[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:800;flex-shrink:0}.score-badge.score--good[_ngcontent-%COMP%]{background:#0dae301f;color:var(--color-success-text)}.score-badge.score--amber[_ngcontent-%COMP%]{background:#f59e0b1f;color:var(--color-warning-text)}.score-badge.score--red[_ngcontent-%COMP%]{background:#e50f2e1f;color:var(--color-danger-text)}.status--good[_ngcontent-%COMP%]{color:#0dae30}.status--amber[_ngcontent-%COMP%]{color:#b45309}.status--red[_ngcontent-%COMP%]{color:#e50f2e}.score-bar-wrap[_ngcontent-%COMP%]{width:80px}.score-bar__track[_ngcontent-%COMP%]{height:6px;border-radius:999px;background:var(--color-border, #27272a);overflow:hidden}
1.score-bar__fill[_ngcontent-%COMP%]{height:100%;border-radius:999px;transition:width .4s ease}.score-bar__fill.score--good[_ngcontent-%COMP%]{background:#0dae30}.score-bar__fill.score--amber[_ngcontent-%COMP%]{background:#f59e0b}.score-bar__fill.score--red[_ngcontent-%COMP%]{background:#e50f2e}.system-card[_ngcontent-%COMP%]{transition:border-color .15s ease,box-shadow .2s ease}.system-card[_ngcontent-%COMP%]:hover{border-color:var(--color-primary, #f27d26);box-shadow:0 4px 16px #f27d2614}.chevron[_ngcontent-%COMP%]{transition:transform .2s ease}.chevron--open[_ngcontent-%COMP%]{transform:rotate(180deg)}.insights-panel[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, #27272a);padding:12px 16px;display:flex;flex-direction:column;gap:8px;animation:_ngcontent-%COMP%_demo-slide-down .18s ease-out}.insight-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px}@keyframes _ngcontent-%COMP%_demo-slide-down{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.shimmer-block[_ngcontent-%COMP%], .shimmer-line[_ngcontent-%COMP%]{background:linear-gradient(90deg,var(--color-border, #27272a) 25%,var(--color-surface-2, #1f1f26) 50%,var(--color-border, #27272a) 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_demo-shimmer 1.6s ease-in-out infinite}@keyframes _ngcontent-%COMP%_demo-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.demo-page.demo-has-upsell[_ngcontent-%COMP%]{padding-bottom:72px}'],changeDetection:0})}}return o})();export{ie as V2VehicleHealthDemoComponent};
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.