1"use strict";(self.webpackChunkgrab_tea_admin=self.webpackChunkgrab_tea_admin||[]).push([[2451],{2451:(Ge,R,s)=>{s.r(R),s.d(R,{GeneralComponent:()=>Oe});var y=s(177),e=s(4438),f=s(9417),P=s(6600),_=s(3740),k=s(5351),M=s(1806),W=s(33),b=s(2510),C=s(1780),O=s(4626),B=s(1413),E=s(6977),A=s(7468),p=s(7673),h=s(9437),K=s(6975),N=s(5143),S=s(2571),z=s(4069),x=s(176),U=s(6149),J=s(2793),Y=s(1873),X=s(2755),V=s(8203),D=s(8516),v=s(3561);const Q=["rangePicker"],Z=(n,i)=>i.id,H=(n,i)=>i.productId,q=(n,i)=>i.name,ee=n=>({name:n}),te=()=>[1,2,3,4],w=n=>({n}),T=()=>[1,2,3,4,5],ne=n=>({count:n});function oe(n,i){if(1&n&&(e.j41(0,"span",38),e.nrm(1,"lucide-icon",39),e.EFF(2),e.k0s()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",t.rangeLabel,"")}}function re(n,i){if(1&n){const t=e.RV6();e.j41(0,"span",41),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.openCustomPicker())}),e.EFF(1),e.nI1(2,"translate"),e.nrm(3,"lucide-icon",42),e.k0s()}if(2&n){const t=e.XpG().item,r=e.XpG();e.R7$(),e.SpI(" ",e.bMT(2,2,t.label)," "),e.R7$(2),e.Y8G("name","ar"===r.lang?"chevron-left":"chevron-right")}}function ae(n,i){if(1&n&&(e.EFF(0),e.nI1(1,"translate")),2&n){const t=e.XpG().item;e.SpI(" ",e.bMT(1,1,t.label)," ")}}function ie(n,i){1&n&&e.DNE(0,re,4,4,"span",40)(1,ae,2,3),2&n&&e.vxM(0,"custom"===i.item.key?0:1)}function se(n,i){1&n&&(e.j41(0,"div",43),e.nrm(1,"loading",44)(2,"loading",44),e.k0s()),2&n&&(e.R7$(),e.Y8G("width",120)("height",16),e.R7$(),e.Y8G("width",72)("height",32))}function le(n,i){1&n&&e.Z7z(0,se,3,4,"div",43,e.fX1),2&n&&e.Dyx(e.lJ4(0,te))}function ce(n,i){if(1&n&&(e.nrm(0,"gt-kpi-card",45)(1,"gt-kpi-card",46)(2,"gt-kpi-card",47),e.nI1(3,"number"),e.nrm(4,"gt-kpi-card",48),e.nI1(5,"number")),2&n){const t=e.XpG();e.Y8G("sublabelParams",e.eq3(16,w,t.rangeDays))("value",t.counts.orders)("delta",t.deltas.orders),e.R7$(),e.Y8G("sublabelParams",e.eq3(18,w,t.rangeDays))("value",t.counts.employees)("delta",t.deltas.employees),e.R7$(),e.Y8G("value",e.i5U(3,10,t.counts.admins,"2.0-0")),e.R7$(2),e.Y8G("sublabelParams",e.eq3(20,w,t.rangeDays))("value",e.i5U(5,13,t.counts.hosters,"2.0-0"))("delta",t.deltas.hosters)}}function de(n,i){1&n&&e.nrm(0,"loading",31),2&n&&e.Y8G("height",250)}function _e(n,i){1&n&&e.nrm(0,"gt-empty-state",49)}function ge(n,i){if(1&n&&(e.j41(0,"div",50),e.nrm(1,"apx-chart",51),e.k0s(),e.j41(2,"div",52)(3,"span",53),e.nrm(4,"i",54),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"span",53),e.nrm(8,"i",55),e.EFF(9),e.nI1(10,"translate"),e.k0s()(),e.j41(11,"div",56)(12,"div",57)(13,"span",58),e.nrm(14,"lucide-icon",59),e.k0s(),e.j41(15,"div")(16,"p",60),e.EFF(17),e.nI1(18,"translate"),e.k0s(),e.j41(19,"p",61),e.EFF(20),e.nI1(21,"number"),e.k0s()()(),e.j41(22,"div",57)(23,"span",58),e.nrm(24,"lucide-icon",62),e.k0s(),e.j41(25,"div")(26,"p",60),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"p",61),e.EFF(30),e.nI1(31,"number"),e.k0s()()()()),2&n){const t=e.XpG();e.R7$(),e.Y8G("series",t.chart.series)("chart",t.chart.chart)("colors",t.chart.colors)("stroke",t.chart.stroke)("fill",t.chart.fill)("markers",t.chart.markers)("dataLabels",t.chart.dataLabels)("grid",t.chart.grid)("xaxis",t.chart.xaxis)("yaxis",t.chart.yaxis)("legend",t.chart.legend)("tooltip",t.chart.tooltip),e.R7$(4),e.JRh(e.bMT(6,18,"orders")),e.R7$(4),e.JRh(e.bMT(10,20,"employees")),e.R7$(8),e.JRh(e.bMT(18,22,"total_orders")),e.R7$(3),e.JRh(e.bMT(21,24,t.ordersInRange)),e.R7$(7),e.JRh(e.bMT(28,26,"active_employees")),e.R7$(3),e.JRh(e.bMT(31,28,t.activeEmployees))}}function me(n,i){1&n&&(e.j41(0,"div",63),e.nrm(1,"loading",44),e.j41(2,"div",64),e.nrm(3,"loading",44)(4,"loading",44),e.k0s()()),2&n&&(e.R7$(),e.Y8G("width",36)("height",36),e.R7$(2),e.Y8G("width",140)("height",14),e.R7$(),e.Y8G("width",200)("height",12))}function pe(n,i){1&n&&(e.j41(0,"div",33),e.Z7z(1,me,5,6,"div",63,e.fX1),e.k0s()),2&n&&(e.R7$(),e.Dyx(e.lJ4(0,T)))}function he(n,i){1&n&&e.nrm(0,"gt-empty-state",65)}function ve(n,i){if(1&n&&(e.j41(0,"li",67)(1,"span"),e.nrm(2,"lucide-icon",68),e.k0s(),e.j41(3,"div",64)(4,"p",69),e.EFF(5),e.k0s(),e.j41(6,"p",70),e.EFF(7),e.k0s()(),e.j41(8,"span",71),e.EFF(9),e.k0s()()),2&n){const t=i.$implicit;e.AVh("overview-activity__item--link",t.link),e.Y8G("routerLink",t.link),e.R7$(),e.ZvI("overview-activity__tile overview-activity__tile--",t.tone,""),e.R7$(),e.Y8G("name",t.icon),e.R7$(3),e.JRh(t.title),e.R7$(2),e.JRh(t.description),e.R7$(2),e.JRh(t.when)}}function ue(n,i){if(1&n&&(e.j41(0,"ul",33),e.Z7z(1,ve,10,10,"li",66,Z),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Dyx(t.activity)}}function ye(n,i){1&n&&(e.j41(0,"div",72),e.nrm(1,"loading",44)(2,"loading",73)(3,"loading",44),e.k0s()),2&n&&(e.R7$(),e.Y8G("width",90)("height",12),e.R7$(),e.Y8G("height",8),e.R7$(),e.Y8G("width",28)("height",12))}function fe(n,i){1&n&&(e.j41(0,"div",35),e.Z7z(1,ye,4,5,"div",72,e.fX1),e.k0s()),2&n&&(e.R7$(),e.Dyx(e.lJ4(0,T)))}function Me(n,i){1&n&&e.nrm(0,"gt-empty-state",74)}function be(n,i){if(1&n&&(e.j41(0,"div",72)(1,"span",75),e.EFF(2),e.k0s(),e.nrm(3,"gt-progress",76),e.j41(4,"span",77),e.EFF(5),e.nI1(6,"number"),e.k0s()()),2&n){const t=i.$implicit;e.R7$(2),e.JRh(t.name),e.R7$(),e.Y8G("value",t.percent),e.R7$(2),e.JRh(e.bMT(6,3,t.count))}}function Ee(n,i){if(1&n&&(e.j41(0,"div",35),e.Z7z(1,be,7,5,"div",72,H),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Dyx(t.products)}}function xe(n,i){1&n&&(e.j41(0,"div",37),e.nrm(1,"loading",44)(2,"loading",44),e.k0s()),2&n&&(e.R7$(),e.Y8G("width",96)("height",96),e.R7$(),e.Y8G("width",96)("height",96))}function Ce(n,i){1&n&&e.nrm(0,"gt-empty-state",78)}function we(n,i){if(1&n&&(e.j41(0,"div",79)(1,"gt-ring",80),e.EFF(2),e.k0s(),e.j41(3,"p",81),e.EFF(4),e.k0s(),e.j41(5,"p",82),e.EFF(6),e.nI1(7,"translate"),e.k0s()()),2&n){const t=i.$implicit,r=i.$index,o=e.XpG(2);e.R7$(),e.Y8G("value",t.percent)("size",96)("thickness",10)("tone",o.hosterTones[r%o.hosterTones.length]),e.R7$(),e.SpI("",t.percent,"%"),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(e.i5U(7,7,"orders_count",e.eq3(10,ne,t.count)))}}function Re(n,i){if(1&n&&(e.j41(0,"div",37),e.Z7z(1,we,8,12,"div",79,q),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Dyx(t.hosters)}}const Pe={order_placed:{icon:"clipboard-list",tone:"primary"},order_completed:{icon:"circle-check",tone:"success"}
1,order_cancelled:{icon:"triangle-alert",tone:"danger"},employee_added:{icon:"user-plus",tone:"info"},admin_role_updated:{icon:"shield",tone:"accent"},hoster_connected:{icon:"hand-platter",tone:"success"},low_stock:{icon:"package",tone:"warning"}},ke=["employee_added","admin_role_updated","hoster_connected"];let Oe=(()=>{class n{constructor(){this.dashboard=(0,e.WQX)(Y.I),this.ordersService=(0,e.WQX)(X.B),this.userProfile=(0,e.WQX)(z.c),this.features=(0,e.WQX)(U.u),this.inventoryEnabled=!0,this.translate=(0,e.WQX)(C.c$),this.datePipe=(0,e.WQX)(y.vh),this.dialog=(0,e.WQX)(k.bZ),this.downloader=(0,e.WQX)(J.y),this.destroy$=new B.B,this.lang=localStorage.getItem("language")||"ar",this.locale="ar"===this.lang?"ar-AE":"en",this.greetingKey="good_morning",this.firstName="",this.rangeOptions=[{key:"last7",label:"last_7_days"},{key:"last30",label:"last_30_days"},{key:"thisMonth",label:"this_month"},{key:"custom",label:"custom_range"}],this.rangeKey="last7",this.selectedKey="last7",this.range=this.computeRange("last7"),this.rangeLabel="",this.rangeOptionLabel="last_7_days",this.today=new Date,this.customStart=null,this.customEnd=null,this.countsLoading=!0,this.counts={orders:0,employees:0,admins:0,hosters:0},this.deltas={orders:null,employees:null,hosters:null},this.rangeDays=7,this.rangeLoading=!0,this.rangeError=!1,this.ordersInRange=0,this.activeEmployees=0,this.products=[],this.activityLoading=!0,this.activity=[],this.hosters=[],this.hosterTones=["primary","accent","success"],this.chart=null}ngOnInit(){this.setGreeting(),this.features.inventoryEnabled$.pipe((0,E.Q)(this.destroy$)).subscribe(t=>this.inventoryEnabled=t),this.userProfile.userProfile.pipe((0,E.Q)(this.destroy$)).subscribe(t=>{this.firstName=String("ar"===this.lang&&t?.arFullName||t?.engFullName||t?.fullName||"").trim().split(/\s+/)[0]??""}),this.loadActivity(),this.applyRange("last7")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onRangeSelect(t){this.selectedKey=t,"custom"!==t&&this.applyRange(t)}openCustomPicker(){setTimeout(()=>this.rangePicker?.open())}onCustomClosed(){if(this.customStart&&this.customEnd){const o=this.datePipe.transform(this.customStart,"yyyy-MM-dd"),a=this.datePipe.transform(this.customEnd,"yyyy-MM-dd");if("custom"===this.rangeKey&&o===this.range.from&&a===this.range.to)return;return void this.applyRange("custom",{from:o,to:a})}const t="custom"===this.rangeKey?new Date(this.range.from+"T00:00:00"):null,r="custom"===this.rangeKey?new Date(this.range.to+"T00:00:00"):null;this.customStart=t,this.customEnd=r,this.rangeStart&&(this.rangeStart.value=t),this.rangeEnd&&(this.rangeEnd.value=r),this.selectedKey=this.rangeKey}applyRange(t,r){this.rangeKey=t,this.selectedKey=t,this.range="custom"===t&&r?r:this.computeRange(t),this.rangeLabel=this.formatRangeLabel(this.range),this.rangeOptionLabel=this.rangeOptions.find(o=>o.key===t)?.label??"last_7_days",this.rangeDays=this.enumerateDays(this.range).length,this.loadRange()}chooseExport(t){this.dialog.open(N.W,{panelClass:"export-version-dialog-panel",data:{fileType:t}}).afterClosed().subscribe(r=>{r&&this.ordersService.exportFileWith(t,"detailed"===r,{FromDate:this.range.from,ToDate:this.range.to}).subscribe({next:o=>this.downloader.saveResponse(o,`orders-${this.range.from}-${this.range.to}.${1===t?"xlsx":"pdf"}`),error:()=>this.downloader.notifyError()})})}loadRange(){this.rangeLoading=!0,this.countsLoading=!0,this.rangeError=!1;const t=this.range;(0,A.p)({home:this.dashboard.getHomeCounts(t).pipe((0,h.W)(()=>(0,p.of)(null))),timeline:this.dashboard.getActivityTimeline(t).pipe((0,h.W)(()=>(0,p.of)(null))),products:this.dashboard.getTopProducts(t).pipe((0,h.W)(()=>(0,p.of)([]))),hosters:this.dashboard.getOrdersByHoster(t).pipe((0,h.W)(()=>(0,p.of)([])))}).pipe((0,E.Q)(this.destroy$)).subscribe(({home:r,timeline:o,products:a,hosters:l})=>{if(t!==this.range)return;this.applyCounts(r);const c=o??[];this.rangeError=null===o,this.ordersInRange=r?.countOrder??c.reduce((g,m)=>g+Number(m.orders??0),0),this.activeEmployees=r?.countEmployees??c.reduce((g,m)=>Math.max(g,Number(m.activeEmployees??0)),0),this.chart=this.buildChart(c,t),this.products=this.buildProducts(a),this.hosters=this.buildHosters(l),this.rangeLoading=!1})}loadActivity(){this.activityLoading=!0,this.dashboard.getRecentActivity(6).pipe((0,h.W)(()=>(0,p.of)({results:[],rowCount:0})),(0,E.Q)(this.destroy$)).subscribe(({results:t})=>{this.activity=t.map(r=>this.toActivityItem(r)),this.activityLoading=!1})}applyCounts(t){this.counts={orders:Number(t?.countOrder??0),employees:Number(t?.countEmployees??0),admins:Number(t?.countAdmin??0),hosters:Number(t?.countHoster??0)};const r=t?.previous??null;this.deltas={orders:this.deltaOf(this.counts.orders,r?.countOrder),employees:this.deltaOf(this.counts.employees,r?.countEmployees),hosters:this.deltaOf(this.counts.hosters,r?.countHoster)},this.countsLoading=!1}deltaOf(t,r){return null==r||0===r?null:Math.round((t-r)/r*100)}toActivityItem(t){const r=Pe[t.type]??{icon:"bell",tone:"primary"};let o=null;return"order"===t.entityType&&null!=t.entityId?o=["/dashboard/orders",t.entityId]:"inventoryItem"===t.entityType&&null!=t.entityId&&this.inventoryEnabled?o=["/inventory/items",t.entityId]:"user"===t.entityType&&(o=["/members"]),{id:t.id,title:t.title,de
1scription:t.description,icon:r.icon,tone:r.tone,when:this.formatWhen(this.parseApiDate(t.occurredAt,ke.includes(t.type))),link:o}}buildProducts(t){const r=[...t??[]].map(a=>({name:a.productName,count:Number(a.orderQuantity??a.totalNumOrder??0),productId:a.productId})).sort((a,l)=>l.count-a.count).slice(0,5),o=r[0]?.count||1;return r.map(a=>({...a,percent:Math.round(a.count/o*100)}))}buildHosters(t){const r=[...t??[]].map(a=>({name:a.fullName,count:Number(a.totalNumOrder??0)})).sort((a,l)=>l.count-a.count),o=r.reduce((a,l)=>a+l.count,0)||1;return r.slice(0,3).map(a=>({...a,percent:Math.round(a.count/o*100)}))}buildChart(t,r){const o=this.enumerateDays(r),a=new Map(t.map(d=>[String(d.day).slice(0,10),d])),l=new Map,c=new Map;a.forEach((d,L)=>{l.set(L,Number(d.orders??0)),c.set(L,Number(d.activeEmployees??0))});const g=o.map(d=>this.datePipe.transform(d,o.length>10?"d MMM":"EEE d",void 0,this.locale)??""),m=o.map(d=>l.get(this.datePipe.transform(d,"yyyy-MM-dd"))??0),F=o.map(d=>c.get(this.datePipe.transform(d,"yyyy-MM-dd"))??0),u=getComputedStyle(document.documentElement),I=u.getPropertyValue("--gt-color-primary").trim()||"#2b3f6c",$=u.getPropertyValue("--gt-color-accent").trim()||"#fe863a",De=u.getPropertyValue("--gt-color-text-muted").trim()||"#6b7789",Te=u.getPropertyValue("--gt-color-border").trim()||"#e2e7ef",Fe=u.getPropertyValue("--gt-font-family").trim()||"Poppins, sans-serif",G=this.translate.instant("orders"),j=this.translate.instant("employees"),Ie=(0,x.b)(Math.max(...m,0)),$e=(0,x.b)(Math.max(...F,0));return{series:[{name:G,data:m},{name:j,data:F}],chart:{type:"area",height:250,toolbar:{show:!1},zoom:{enabled:!1},fontFamily:Fe,animations:{speed:400}},colors:[I,$],stroke:{curve:"straight",width:[2,2]},fill:{type:["gradient","solid"],gradient:{shadeIntensity:1,opacityFrom:.18,opacityTo:0,stops:[0,100]},opacity:[1,0]},markers:{size:4,strokeWidth:2,hover:{size:6}},dataLabels:{enabled:!1},grid:{borderColor:Te,strokeDashArray:0,xaxis:{lines:{show:!1}},padding:{left:8,right:8}},xaxis:{categories:g,axisBorder:{show:!1},axisTicks:{show:!1},labels:{style:{colors:De,fontSize:"11px"}}},yaxis:[{seriesName:G,labels:{style:{colors:I,fontSize:"11px"},formatter:d=>String(Math.round(d))},min:0,max:Ie,tickAmount:x.S},{seriesName:j,opposite:!0,labels:{style:{colors:$,fontSize:"11px"},formatter:d=>String(Math.round(d))},min:0,max:$e,tickAmount:x.S}],legend:{show:!1},tooltip:{shared:!0,intersect:!1,theme:"light"}}}setGreeting(){const t=(new Date).getHours();this.greetingKey=t<12?"good_morning":t<17?"good_afternoon":"good_evening"}computeRange(t){const r=new Date,o=new Date;return o.setDate("last7"===t?r.getDate()-6:"last30"===t?r.getDate()-29:1),{from:this.datePipe.transform(o,"yyyy-MM-dd"),to:this.datePipe.transform(r,"yyyy-MM-dd")}}enumerateDays(t){const r=[],o=new Date(t.from+"T00:00:00"),a=new Date(t.to+"T00:00:00");for(;o<=a;)r.push(new Date(o)),o.setDate(o.getDate()+1);return r}formatRangeLabel(t){const r=new Date(t.from+"T00:00:00"),o=new Date(t.to+"T00:00:00"),a=r.getFullYear()===o.getFullYear(),l=this.locale.startsWith("ar");return`${this.datePipe.transform(r,a?l?"d MMM":"MMM d":l?"d MMM y":"MMM d, y",void 0,this.locale)} \u2013 ${this.datePipe.transform(o,l?"d MMM y":"MMM d, y",void 0,this.locale)}`}parseApiDate(t,r){const o=/(?:Z|[+-]\d{2}:?\d{2})$/i.test(t);return new Date(r&&!o?t+"Z":t)}formatWhen(t){const r=new Date,o=l=>this.datePipe.transform(l,"yyyy-MM-dd");if(o(t)===o(r))return this.datePipe.transform(t,"h:mm a",void 0,this.locale)??"";const a=new Date(r);return a.setDate(r.getDate()-1),o(t)===o(a)?this.translate.instant("yesterday"):this.datePipe.transform(t,this.locale.startsWith("ar")?"d MMM":"MMM d",void 0,this.locale)??""}static{this.\u0275fac=function(r){return new(r||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["general"]],viewQuery:function(r,o){if(1&r&&(e.GBs(Q,5),e.GBs(_.xR,5),e.GBs(_.IG,5)),2&r){let a;e.mGM(a=e.lsd())&&(o.rangePicker=a.first),e.mGM(a=e.lsd())&&(o.rangeStart=a.first),e.mGM(a=e.lsd())&&(o.rangeEnd=a.first)}},standalone:!0,features:[e.Jv_([y.vh,(0,P.aw)(),{provide:P.Ju,useFactory:K.y}]),e.aNF],decls:106,vars:71,consts:[["rangePicker",""],["exportMenu","matMenu"],[1,"gt-breadcrumb"],["routerLink","/dashboard"],["name","chevron-right",3,"strokeWidth"],[1,"gt-page-header"],[1,"gt-page-header__title"],[1,"gt-page-header__subtitle"],[1,"gt-page-header__actions"],[1,"overview-range-wrap"],["bindValue","key","appendTo","body",1,"overview-range",3,"ngModelChange","items","clearable","searchable","ngModel"],["ng-label-tmp",""],["ng-option-tmp",""],["aria-hidden","true",1,"overview-range__anchor",3,"rangePicker","max"],["matStartDate","","tabindex","-1","readonly","",3,"ngModelChange","ngModel"],["matEndDate","","tabindex","-1","readonly","",3,"ngModelChange","ngModel"],[3,"closed","restoreFocus"],["type","button","gtButton","secondary",3,"matMenuTriggerFor"],["name","download"],["name","chevron-down",1,"gt-icon-sm"],[1,"gt-menu"],["mat-menu-item","",3,"click"],[1,"gt-menu__item"],["name","file-text"],[1,"gt-stack"],[1,"gt-grid-4"],[1,"gt-grid-main"],[1,"gt-card"],[1,"gt-card__header"],[1,"gt-card__title"],[1,"gt-card__subtitle"],[2,"width","100%",3,"height"],["routerLink","/dashboard/orders",1,"gt-card__link"],[1,"overview-activity"],["routerLink","/dashboard/products",1,"gt-card__link"],[1,"overview-products"],["routerLink","/dashboard/hoster",1,"gt-card__link"],[1,"overview-hosters"],[1,"overview-range__label"],["name","calendar"],[1,"overview-range__custom"],[1,"overview-range__custom",3,"click"],[1,"gt-icon-sm",3,"name"],[1,"gt-kpi","overview-kpi-skeleton"],[3,"width","height"],["icon","clipboard-list","tone","primary","label","total_orders","sublabel","vs_prior_days",3,"sublabelParams","value","delta"],["icon","users","tone","primary","label","active_employees","sublabel","vs_prior_days",3,"sublabelParams","value","delta"],["icon","users","tone","accent","label","total_admins","sublabel","with_full_access",3,"value"],["icon","hand-platter","tone","success","label","active_hosters","sublabel","vs_prior_days",3,"sublabelParams","value","delta"],["inline","","tone","danger","icon","triangle-alert","title","couldnt_load_section","text","try_again_later"],["dir","ltr"],[3,"series","chart","colors","stroke","fill","markers","dataLabels","grid","xaxis","yaxis","legend","tooltip"],[1,"overview-legend"],[1,"overview-legend__item"],[1,"overview-legend__dot","overview-legend__dot--orders"],[1,"overview-legend__dot","overview-legend__dot--employees"],[1,"overview-totals"],[1,"overview-totals__item"],[1,"overview-totals__tile"],["name","clipboard-list"],[1,"overview-totals__label"],[1,"overview-totals__value"],["name","users"],[1,"overview-activity__item"],[1,"overview-activity__text"],["inline","","tone","neutral","icon","inbox","title","no_recent_activity","text","activity_appears_here"],[1,"overview-activity__item",3,"overview-activity__item--link","routerLink"],[1,"overview-activity__item",3,"routerLink"],[3,"name"],[1,"overview-activity__title"],[1,"overview-activity__desc"],[1,"overview-activity__when"],[1,"overview-products__row"],[2,"flex","1",3,"height"],["inline","","tone","neutral","icon","coffee","title","no_orders_in_period","text","try_a_wider_range"],[1,"overview-products__name"],["tone","primary",1,"overview-products__bar",3,"value"],[1,"overview-products__count"],["inline","","tone","neutral","icon","id-card","title","no_orders_in_period","text","try_a_wider_range"],[1,"overview-hosters__item"],[3,"value","size","thickness","tone"],[1,"overview-hosters__name"],[1,"overview-hosters__count"]],template:function(r,o){if(1&r){const a=e.RV6();
1e.j41(0,"ol",2)(1,"li")(2,"a",3),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nrm(5,"lucide-icon",4),e.k0s(),e.j41(6,"li")(7,"span"),e.EFF(8),e.nI1(9,"translate"),e.k0s()()(),e.j41(10,"div",5)(11,"div")(12,"h1",6),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"p",7),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.j41(18,"div",8)(19,"div",9)(20,"ng-select",10),e.bIt("ngModelChange",function(c){return e.eBV(a),e.Njj(o.onRangeSelect(c))}),e.DNE(21,oe,3,1,"ng-template",11)(22,ie,2,1,"ng-template",12),e.k0s(),e.j41(23,"mat-date-range-input",13)(24,"input",14),e.mxI("ngModelChange",function(c){return e.eBV(a),e.DH7(o.customStart,c)||(o.customStart=c),e.Njj(c)}),e.k0s(),e.j41(25,"input",15),e.mxI("ngModelChange",function(c){return e.eBV(a),e.DH7(o.customEnd,c)||(o.customEnd=c),e.Njj(c)}),e.k0s()(),e.j41(26,"mat-date-range-picker",16,0),e.bIt("closed",function(){return e.eBV(a),e.Njj(o.onCustomClosed())}),e.k0s()(),e.j41(28,"button",17),e.nrm(29,"lucide-icon",18),e.EFF(30),e.nI1(31,"translate"),e.nrm(32,"lucide-icon",19),e.k0s(),e.j41(33,"mat-menu",20,1)(35,"button",21),e.bIt("click",function(){return e.eBV(a),e.Njj(o.chooseExport(1))}),e.j41(36,"span",22),e.nrm(37,"lucide-icon",23),e.j41(38,"span"),e.EFF(39),e.nI1(40,"translate"),e.k0s()()(),e.j41(41,"button",21),e.bIt("click",function(){return e.eBV(a),e.Njj(o.chooseExport(2))}),e.j41(42,"span",22),e.nrm(43,"lucide-icon",23),e.j41(44,"span"),e.EFF(45),e.nI1(46,"translate"),e.k0s()()()()()(),e.j41(47,"div",24)(48,"div",25),e.DNE(49,le,2,1)(50,ce,6,22),e.k0s(),e.j41(51,"div",26)(52,"section",27)(53,"div",28)(54,"div")(55,"h3",29),e.EFF(56),e.nI1(57,"translate"),e.k0s(),e.j41(58,"p",30),e.EFF(59),e.nI1(60,"translate"),e.k0s()()(),e.DNE(61,de,1,1,"loading",31)(62,_e,1,0)(63,ge,32,30),e.k0s(),e.j41(64,"section",27)(65,"div",28)(66,"h3",29),e.EFF(67),e.nI1(68,"translate"),e.k0s(),e.j41(69,"a",32),e.EFF(70),e.nI1(71,"translate"),e.k0s()(),e.DNE(72,pe,3,1,"div",33)(73,he,1,0)(74,ue,3,0),e.k0s()(),e.j41(75,"div",26)(76,"section",27)(77,"div",28)(78,"div")(79,"h3",29),e.EFF(80),e.nI1(81,"translate"),e.k0s(),e.j41(82,"p",30),e.EFF(83),e.nI1(84,"translate"),e.k0s()(),e.j41(85,"a",34),e.EFF(86),e.nI1(87,"translate"),e.k0s()(),e.DNE(88,fe,3,1,"div",35)(89,Me,1,0)(90,Ee,3,0),e.k0s(),e.j41(91,"section",27)(92,"div",28)(93,"div")(94,"h3",29),e.EFF(95),e.nI1(96,"translate"),e.k0s(),e.j41(97,"p",30),e.EFF(98),e.nI1(99,"translate"),e.k0s()(),e.j41(100,"a",36),e.EFF(101),e.nI1(102,"translate"),e.k0s()(),e.DNE(103,xe,3,4,"div",37)(104,Ce,1,0)(105,Re,3,0),e.k0s()()()}if(2&r){const a=e.sdS(27),l=e.sdS(34);e.R7$(3),e.JRh(e.bMT(4,34,"dashboard")),e.R7$(2),e.Y8G("strokeWidth",2),e.R7$(3),e.JRh(e.bMT(9,36,"overview")),e.R7$(5),e.JRh(e.i5U(14,38,o.greetingKey,e.eq3(69,ee,o.firstName))),e.R7$(3),e.JRh(e.bMT(17,41,"overview_subtitle")),e.R7$(4),e.Y8G("items",o.rangeOptions)("clearable",!1)("searchable",!1)("ngModel",o.selectedKey),e.R7$(3),e.Y8G("rangePicker",a)("max",o.today),e.R7$(),e.R50("ngModel",o.customStart),e.R7$(),e.R50("ngModel",o.customEnd),e.R7$(),e.Y8G("restoreFocus",!1),e.R7$(2),e.Y8G("matMenuTriggerFor",l),e.R7$(2),e.SpI(" ",e.bMT(31,43,"export")," "),e.R7$(9),e.JRh(e.bMT(40,45,"excel")),e.R7$(6),e.JRh(e.bMT(46,47,"pdf")),e.R7$(4),e.vxM(49,o.countsLoading?49:50),e.R7$(7),e.JRh(e.bMT(57,49,"activity_overview")),e.R7$(3),e.Lme("",e.bMT(60,51,"orders_vs_employees")," \xb7 ",o.rangeLabel,""),e.R7$(2),e.vxM(61,o.rangeLoading?61:o.rangeError?62:63),e.R7$(6),e.JRh(e.bMT(68,53,"recent_activity")),e.R7$(3),e.JRh(e.bMT(71,55,"view_all")),e.R7$(2),e.vxM(72,o.activityLoading?72:o.activity.length?74:73),e.R7$(8),e.JRh(e.bMT(81,57,"top_ordered_products")),e.R7$(3),e.JRh(e.bMT(84,59,o.rangeOptionLabel)),e.R7$(3),e.JRh(e.bMT(87,61,"view_all")),e.R7$(2),e.vxM(88,o.rangeLoading?88:o.products.length?90:89),e.R7$(7),e.JRh(e.bMT(96,63,"orders_by_hoster")),e.R7$(3),e.JRh(e.bMT(99,65,"distribution")),e.R7$(3),e.JRh(e.bMT(102,67,"view_all")),e.R7$(2),e.vxM(103,o.rangeLoading?103:o.hosters.length?105:104)}},dependencies:[y.MD,y.QX,f.YN,f.me,f.BC,f.vS,W.Wk,C.h,C.D9,O.J,O.Q,b.MQ,b.vr,b.Uq,b.ZZ,M.Cn,M.kk,V.ig,M.fb,M.Cp,k.hM,_.X6,_.el,_.xR,_.IG,_.SG,S.q,D.flO,D.WGl,v.lr,v.ry,v.sN,v.zt,v.xN],styles:["[_nghost-%COMP%]{display:block}.overview-range-wrap[_ngcontent-%COMP%]{position:relative}.overview-range[_ngcontent-%COMP%]{min-width:220px}.overview-range__anchor[_ngcontent-%COMP%]{position:absolute;inset-inline:0;bottom:0;height:0;overflow:hidden;opacity:0;pointer-events:none}.overview-range__custom[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:space-between;width:100%;color:var(--gt-color-primary)}.overview-range__custom[_ngcontent-%COMP%] lucide-icon[_ngcontent-%COMP%]{color:var(--gt-color-text-muted)}.overview-range[_ngcontent-%COMP%] .ng-select-container{cursor:pointer}.overview-range__label[_ngcontent-%COMP%]{--gt-icon-size: 16px;display:inline-flex;align-items:center;gap:8px;color:var(--gt-color-text);
1font-weight:var(--gt-font-weight-medium)}.overview-range__label[_ngcontent-%COMP%] lucide-icon[_ngcontent-%COMP%]{color:var(--gt-color-text-muted)} .mat-datepicker-content{border-radius:var(--gt-radius-md)!important;box-shadow:var(--gt-elevation-3)!important;border:1px solid var(--gt-color-border)}.overview-kpi-skeleton[_ngcontent-%COMP%]{gap:var(--gt-space-3);justify-content:center}.overview-legend[_ngcontent-%COMP%]{display:flex;gap:var(--gt-space-5);margin-top:var(--gt-space-2);font-size:var(--gt-text-small-size);color:var(--gt-color-text-secondary)}.overview-legend__item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.overview-legend__dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%}.overview-legend__dot--orders[_ngcontent-%COMP%]{background:var(--gt-color-primary)}.overview-legend__dot--employees[_ngcontent-%COMP%]{background:var(--gt-color-accent)}.overview-totals[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gt-space-4);margin-top:var(--gt-space-4);padding:var(--gt-space-4);border-radius:var(--gt-radius-md);background:var(--gt-color-bg)}.overview-totals__item[_ngcontent-%COMP%]{--gt-icon-size: 18px;display:flex;align-items:center;gap:var(--gt-space-3)}.overview-totals__tile[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--gt-control-radius);background:var(--gt-color-surface);color:var(--gt-color-primary)}.overview-totals__label[_ngcontent-%COMP%]{margin:0;font-size:var(--gt-text-caption-size);color:var(--gt-color-text-muted)}.overview-totals__value[_ngcontent-%COMP%]{margin:0;font-size:var(--gt-text-metric-size);font-weight:var(--gt-text-metric-weight);line-height:var(--gt-text-metric-line);color:var(--gt-color-text)}.overview-activity[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--gt-space-4);margin:0;padding:0;list-style:none}.overview-activity__item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:var(--gt-space-3)}.overview-activity__tile[_ngcontent-%COMP%]{--gt-icon-size: 16px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--gt-control-radius);background:var(--gt-color-primary-soft);color:var(--gt-color-primary)}.overview-activity__tile--accent[_ngcontent-%COMP%]{background:var(--gt-color-accent-soft);color:var(--gt-amber-600)}.overview-activity__tile--success[_ngcontent-%COMP%]{background:var(--gt-color-success-soft);color:var(--gt-color-success)}.overview-activity__tile--danger[_ngcontent-%COMP%]{background:var(--gt-color-danger-soft);color:var(--gt-color-danger)}.overview-activity__tile--warning[_ngcontent-%COMP%]{background:var(--gt-color-warning-soft);color:var(--gt-amber-700)}.overview-activity__tile--info[_ngcontent-%COMP%]{background:var(--gt-color-info-soft);color:var(--gt-color-info)}.overview-activity__text[_ngcontent-%COMP%]{flex:1;min-width:0}.overview-activity__title[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:var(--gt-font-weight-medium);color:var(--gt-color-text)}.overview-activity__desc[_ngcontent-%COMP%]{margin:2px 0 0;font-size:var(--gt-text-small-size);color:var(--gt-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-activity__when[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--gt-text-caption-size);color:var(--gt-color-text-subtle);white-space:nowrap}.overview-products[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--gt-space-3)}.overview-products__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--gt-space-3)}.overview-products__name[_ngcontent-%COMP%]{width:120px;flex-shrink:0;font-size:var(--gt-text-small-size);color:var(--gt-color-text-secondary);text-align:end;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-products__bar[_ngcontent-%COMP%]{flex:1}.overview-products__bar[_ngcontent-%COMP%] .gt-progress{height:10px}.overview-products__count[_ngcontent-%COMP%]{width:36px;flex-shrink:0;font-size:var(--gt-text-small-medium-size);
1font-weight:var(--gt-font-weight-semibold);color:var(--gt-color-text);font-variant-numeric:tabular-nums}.overview-hosters[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:var(--gt-space-8);flex-wrap:wrap;padding-top:var(--gt-space-2)}.overview-hosters__item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;width:110px;text-align:center}.overview-hosters__name[_ngcontent-%COMP%]{margin:var(--gt-space-2) 0 0;max-width:100%;font-size:var(--gt-text-body-medium-size);font-weight:var(--gt-font-weight-semibold);color:var(--gt-color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-hosters__count[_ngcontent-%COMP%]{margin:0;font-size:var(--gt-text-caption-size);color:var(--gt-color-text-muted)}.overview-activity__item--link[_ngcontent-%COMP%]{cursor:pointer;border-radius:var(--gt-radius-md);transition:background .15s ease}.overview-activity__item--link[_ngcontent-%COMP%]:hover{background:var(--gt-color-surface-muted)}"]})}}return n})()}}]);
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.