1import{a as p,b as D}from"./chunk-O5SSAARF.js";import"./chunk-2P4JFRBE.js";import{a as j,b as K}from"./chunk-B74PVDQR.js";import{e as R,f as Z}from"./chunk-BQIL5I57.js";import{a as B,c as I}from"./chunk-SKBWDFI7.js";import{h as L}from"./chunk-HN5LDCIN.js";import"./chunk-ELRWA3VR.js";import"./chunk-6JXCKV3I.js";import"./chunk-YZB36ZEK.js";import"./chunk-JJCU5L2Y.js";import"./chunk-Q2T7O7RU.js";import{a as M,b as k}from"./chunk-XARSS6BT.js";import"./chunk-6INWRZYZ.js";import"./chunk-QNDFDNVO.js";import"./chunk-MMUJKWCA.js";import{e as b,f as z}from"./chunk-MIVTPLLS.js";import{a as u}from"./chunk-P2U6ME4N.js";import"./chunk-NCCDN55D.js";import"./chunk-RYPOWAVO.js";import"./chunk-ZTUFLSLO.js";import"./chunk-TLTQCCO6.js";import"./chunk-2UGB323M.js";import"./chunk-EIEYT4OA.js";import"./chunk-CMTHOT2H.js";import"./chunk-IV43SIEW.js";import{Db as v,Ic as d,Jc as x,Kc as y,Lc as w,Wb as S,Yb as h,Zc as A,_b as C,_c as F,bc as T,cc as E,dc as o,ec as c,ed as s,fc as r,fd as m,gc as _,lb as n,od as g,pa as O,tc as f,wd as G}from"./chunk-UAB36AYV.js";import"./chunk-D4ZM5DW5.js";var W={[p.OK]:"green",[p.WARN]:"gold",[p.RED]:"red",[p.NO_PLAN]:"none"},$={[p.OK]:"green",[p.WARN]:"orange",[p.RED]:"red",[p.NO_PLAN]:"default"};function Q(e,t){if(e&1&&(c(0,"div",5),d(1),s(2,"translate"),r()),e&2){let a=f();n(),w(" ",m(2,2,a.i18n.sales_dashboard.target)," ",a.cell().target," ")}}var q=(()=>{let t=class t{constructor(){this.i18n=u,this.cell=G.required(),this.label=g(()=>u.sales_dashboard.metrics[this.cell().key]),this.zoneLabel=g(()=>u.sales_dashboard.zones[this.cell().zone]),this.accent=g(()=>W[this.cell().zone]),this.tagColor=g(()=>$[this.cell().zone])}};t.\u0275fac=function(l){return new(l||t)},t.\u0275cmp=v({type:t,selectors:[["math-sales-metric-card"]],inputs:{cell:[1,"cell"]},decls:11,vars:11,consts:[[1,"kpi-cell"],["nz-flex","","nzAlign","center",1,"kpi-top",3,"nzGap"],[1,"kpi-label"],[3,"nzColor"],[1,"kpi-value"],[1,"kpi-plan"]],template:function(l,i){l&1&&(c(0,"div",0)(1,"div",1)(2,"span",2),d(3),s(4,"translate"),r(),c(5,"nz-tag",3),d(6),s(7,"translate"),r()(),c(8,"div",4),d(9),r(),h(10,Q,3,4,"div",5),r()),l&2&&(S("data-accent",i.accent()),n(),o("nzGap",8),n(2),x(m(4,7,i.label())),n(2),o("nzColor",i.tagColor()),n(),x(m(7,9,i.zoneLabel())),n(3),x(i.cell().actual),n(),C(i.cell().target!==null?10:-1))},dependencies:[z,K,j,k,M,b],styles:['.kpi-cell[_ngcontent-%COMP%]{position:relative;background:var(--math-surface);border:1px solid var(--math-border);border-radius:8px;padding:16px 18px;display:flex;flex-direction:column;gap:10px;min-width:0;overflow:hidden;height:100%}.kpi-cell[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0 0 auto;height:3px}.kpi-cell[data-accent=green][_ngcontent-%COMP%]{background:linear-gradient(180deg,var(--math-green-1) 0%,var(--math-surface) 70%)}.kpi-cell[data-accent=green][_ngcontent-%COMP%]:before{background:var(--math-green-7)}.kpi-cell[data-accent=green][_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:var(--math-green-7)}.kpi-cell[data-accent=gold][_ngcontent-%COMP%]{background:linear-gradient(180deg,var(--math-gold-1) 0%,var(--math-surface) 70%)}.kpi-cell[data-accent=gold][_ngcontent-%COMP%]:before{background:var(--math-gold-7)}.kpi-cell[data-accent=gold][_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:var(--math-gold-7)}.kpi-cell[data-accent=red][_ngcontent-%COMP%]{background:linear-gradient(180deg,var(--math-red-1) 0%,var(--math-surface) 70%)}.kpi-cell[data-accent=red][_ngcontent-%COMP%]:before{background:var(--math-red-7)}.kpi-cell[data-accent=red][_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:var(--math-red-7)}.kpi-top[_ngcontent-%COMP%]{flex-wrap:wrap}.kpi-label[_ngcontent-%COMP%]{flex:1;font-size:12px;font-weight:600;color:var(--math-text-secondary)}.kpi-value[_ngcontent-%COMP%]{font-size:34px;line-height:1;font-weight:700;letter-spacing:-.02em;word-break:break-word}.kpi-plan[_ngcontent-%COMP%]{font-size:12px;color:var(--math-text-secondary);font-variant-numeric:tabular-nums}'],changeDetection:0});let e=t;return e})();var U=()=>({rows:6}),X=(e,t)=>t.key;function Y(e,t){if(e&1&&d(0),e&2){let a=f();y(", ",a.firstName())}}function ee(e,t){e&1&&_(0,"nz-skeleton",4),e&2&&o("nzActive",!0)("nzParagraph",F(2,U))}function te(e,t){if(e&1&&(_(0,"nz-empty",5),s(1,"translate")),e&2){let a=f();o("nzNotFoundContent",m(1,1,a.i18n.sales_dashboard.load_error))}}function ne(e,t){if(e&1&&_(0,"math-sales-metric-card",7),e&2){let a=t.$implicit;o("cell",a)}}function ie(e,t){e&1&&(c(0,"div",6),T(1,ne,1,1,"math-sales-metric-card",7,X),r()),e&2&&(n(),E(t.metrics))}function ae(e,t){if(e&1&&(_(0,"nz-empty",5),s(1,"translate")),e&2){let a=f();o("nzNotFoundContent",m(1,1,a.i18n.sales_dashboard.no_data))}}var Se=(()=>{let t=class t{constructor(){this.i18n=u,this.facade=O(D),this.authService=O(L),this.firstName=g(()=>this.authService.user?.firstName??"")}ngOnInit(){this.facade.loadOwn()}};t.\u0275fac=function(l){return new(l||t)},t.\u0275cmp=v({type:t,selectors:[["math-sales-dashboard"]],features:[A([D])],decls:12,vars:7,consts:[["nz-flex","","nzVertical","",1,"sales-dashboard",3,"nzGap"],["nz-flex","","nzAlign","center",1,"greetings-header",3,"nzGap"],[1,"greetings-title"],[1,"greetings-emoji"],[3,"nzActive","nzParagraph"],[3,"nzNotFoundContent"],[1,"sales-dashboard__grid"],[3,"cell"]],template:function(l,i){if(l&1&&(c(0,"div",0)(1,"div",1)(2,"span",2),d(3),s(4,"translate"),h(5,Y,1,1),c(6,"span",3),d(7,"\u{1F44B}"),r()()(),h(8,ee,1,3,"nz-skeleton",4)(9,te,2,3,"nz-empty",5)(10,ie,3,0,"div",6)(11,ae,2,3,"nz-empty",5),r()
1),l&2){let P;o("nzGap",20),n(),o("nzGap",12),n(2),y(" ",m(4,5,i.i18n.sales_dashboard.greeting)),n(2),C(i.firstName()?5:-1),n(3),C(i.facade.isLoading()?8:i.facade.hasError()?9:(P=i.facade.ownRow())?10:11,P)}},dependencies:[z,Z,R,k,M,I,B,q,b],styles:[".greetings-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600}.greetings-emoji[_ngcontent-%COMP%]{margin-left:8px;font-size:20px}.sales-dashboard__grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}"],changeDetection:0});let e=t;return e})();export{Se as SalesDashboardComponent};
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.