PageSourceSearch

https://www.smartltc.ai/static/js/7048.3521c218.chunk.js

js smartltc.ai collected 2026-10-05 15:06:01 UTC 21,623 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[7048],{77048:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Y});var o=r(9950),n=r(87863),i=r(65128),s=r(65957),l=r(82056),a=r(87094),c=r(41988),d=r(46004),x=r(33994),p=r(59334),h=r(49433),y=r(18411),g=r(9313),u=r(31598),f=r(36620),j=r(79378),m=r(8715),F=r(87848),A=r(31990),b=r(16344),v=r(60974),S=r(97973),E=r(46302),w=r(28429),B=r(81095),z=r(80294),k=r(93245),R=r(60158),C=r(44813),D=r(16335),P=r(85706),I=r(67360),W=r(54203),M=r(72528),L=r(25102),Q=r(2847),N=r(56473),K=r(24652),T=r(71872),_=r(89379),H=r(21601),O=r(98571);const G=new class{async getNrcItems(e){return O.z.withErrorHandling((async()=>{try{console.log("\u76f4\u63a5\u4eceSQLite\u83b7\u53d6NRC\u9879\u76ee\u6570\u636e\uff08\u4e0d\u4f7f\u7528\u7f13\u5b58\uff09");const t=Date.now(),r="/finance/".concat(e,"/nrc?_t=").concat(t),o=await H.A.get(r),n=Array.isArray(o)?o:[];return console.log("\u2705 \u4eceSQLite\u83b7\u53d6\u5230\u9879\u76ee ".concat(e," \u7684 ").concat(n.length," \u4e2aNRC\u9879\u76ee\uff0c\u5305\u542b\u6700\u65b0\u6570\u636e")),n}catch(t){return console.error("Error fetching NRC items from SQLite:",t),[]}}),"\u83b7\u53d6NRC\u9879\u76ee\u5931\u8d25")}async getTransactions(){return O.z.withErrorHandling((async()=>{try{console.log("\u76f4\u63a5\u4eceSQLite\u83b7\u53d6\u8d22\u52a1\u4ea4\u6613\u6570\u636e\uff08\u4e0d\u4f7f\u7528\u7f13\u5b58\uff09");const e=Date.now(),t="/finance/transactions?_t=".concat(e),r=await H.A.get(t),o=Array.isArray(r)?r:[];return console.log("\u2705 \u4eceSQLite\u83b7\u53d6\u5230 ".concat(o.length," \u4e2a\u4ea4\u6613\uff0c\u5305\u542b\u6700\u65b0\u6570\u636e")),o}catch(e){return console.error("Error fetching transactions from SQLite:",e),[]}}),"\u83b7\u53d6\u8d22\u52a1\u4ea4\u6613\u5931\u8d25")}async createNrcItem(e,t){return O.z.withErrorHandling((async()=>{try{return await H.A.post("/finance/".concat(e,"/nrc"),t)}catch(r){console.error("Error creating NRC item via API:",r);return(0,_.A)((0,_.A)({},t),{},{id:Date.now().toString()})}}),"\u521b\u5efaNRC\u9879\u76ee\u5931\u8d25")}async createTransaction(e){return O.z.withErrorHandling((async()=>{try{return await H.A.post("/finance/transactions",e)}catch(t){if(console.error("Error creating transaction via API:",t),t instanceof Error)throw t;throw new Error("Failed to create transaction")}}),"\u521b\u5efa\u8d22\u52a1\u4ea4\u6613\u5931\u8d25")}async getMrcItems(e){return O.z.withErrorHandling((async()=>{try{console.log("\u76f4\u63a5\u4eceSQLite\u83b7\u53d6MRC\u9879\u76ee\u6570\u636e\uff08\u4e0d\u4f7f\u7528\u7f13\u5b58\uff09");const t=Date.now(),r="/finance/".concat(e,"/mrc?_t=").concat(t),o=await H.A.get(r),n=Array.isArray(o)?o:[];return console.log("\u2705 \u4eceSQLite\u83b7\u53d6\u5230\u9879\u76ee ".concat(e," \u7684 ").concat(n.length," \u4e2aMRC\u9879\u76ee\uff0c\u5305\u542b\u6700\u65b0\u6570\u636e")),n}catch(t){return console.error("Error fetching MRC items from SQLite:",t),[]}}),"\u83b7\u53d6MRC\u9879\u76ee\u5931\u8d25")}async getFinanceStats(){return O.z.withErrorHandling((async()=>{try{console.log("\u76f4\u63a5\u4eceSQLite\u83b7\u53d6\u8d22\u52a1\u7edf\u8ba1\u6570\u636e\uff08\u4e0d\u4f7f\u7528\u7f13\u5b58\uff09");const e=Date.now(),t="/finance/stats?_t=".concat(e),r=await H.A.get(t);return console.log("\u2705 \u4eceSQLite\u83b7\u53d6\u5230\u8d22\u52a1\u7edf\u8ba1\u6570\u636e\uff0c\u5305\u542b\u6700\u65b0\u6570\u636e"),r}catch(e){return console.error("Error fetching finance stats from SQLite:",e),{totalIncome:0,totalExpense:0,netProfit:0,pendingAmount:0}}}),"\u83b7\u53d6\u8d22\u52a1\u7edf\u8ba1\u5931\u8d25")}async createMrcItem(e,t){return O.z.withErrorHandling((async()=>{try{return await H.A.post("/finance/".concat(e,"/mrc"),t)}catch(r){console.error("Error creating MRC item via API:",r);return(0,_.A)((0,_.A)({},t),{},{id:Date.now().toString()})}}),"\u521b\u5efaMRC\u9879\u76ee\u5931\u8d25")}async deleteTransaction(e){return O.z.withErrorHandling((async()=>{try{await H.A.delete("/finance/transactions/".concat(e))}catch(t){throw console.error("Error deleting transaction via API:",t),t}}),"\u5220\u9664\u8d22\u52a1\u4ea4\u6613\u5931\u8d25")}async getInvoices(e){return O.z.withErrorHandling((async()=>{try{console.log("\u76f4\u63a5\u4eceSQLite\u83b7\u53d6\u9879\u76ee\u53d1\u7968\u6570\u636e\uff08\u4e0d\u4f7f\u7528\u7f13\u5b58\uff09");const t=Date.now(),r="/finance/invoices/".concat(e,"?_t=").concat(t),o=await H.A.get(r),n=Array.isArray(o)?o:[];return console.log("\u2705 \u4eceSQLite\u83b7\u53d6\u5230\u9879\u76ee ".concat(e," \u7684 ").concat(n.length," \u5f20\u53d1\u7968\uff0c\u5305\u542b\u6700\u65b0\u6570\u636e")),n}catch(t){return console.error("Error fetching invoices from SQLite:",t),[]}}),"\u83b7\u53d6\u53d1\u7968\u5931\u8d25")}async createInvoice(e){return O.z.withErrorHandling((async()=>{try{return await H.A.post("/finance/invoices",e)}catch(t){if(console.error("Error creating invoice via API:",t),t instanceof Error)throw t;throw new Error("Failed to create invoice")}}),"\u521b\u5efa\u53d1\u7968\u5931\u8d25")}
1async getFinancialSummary(e){const t=await this.getInvoices(e),r=t.reduce(((e,t)=>e+t.amount),0),o=t.filter((e=>"Paid"===e.status)).reduce(((e,t)=>e+t.amount),0);return{totalValue:r,receivedValue:o,pendingValue:t.filter((e=>"Pending"===e.status)).reduce(((e,t)=>e+t.amount),0),upcomingValue:t.filter((e=>"Upcoming"===e.status)).reduce(((e,t)=>e+t.amount),0),receivedPercentage:r>0?Math.round(o/r*100):0}}};var V=r(44414);const{Text:U}=n.A,{TabPane:q}=i.A,Y=()=>{const e=(0,w.Zp)(),[t,r]=(0,o.useState)(!0),[n,_]=(0,o.useState)([]),[H,O]=(0,o.useState)([]),[Y,Z]=(0,o.useState)(null),[J,X]=(0,o.useState)("monthly"),$=[{id:"new_opportunity",label:"New Opportunity",icon:(0,V.jsx)(p.A,{}),path:"/opportunity/create",type:"default",enabled:!0},{id:"new_client",label:"New Client",icon:(0,V.jsx)(h.A,{}),path:"/client/create",type:"default",enabled:!0},{id:"add_payment",label:"Add Payment",icon:(0,V.jsx)(y.A,{}),path:"/finance",type:"default",enabled:!0},{id:"upload_contract",label:"Upload Contract",icon:(0,V.jsx)(g.A,{style:{fontSize:"16px",color:"#FF7A00"}}),path:"/opportunity",type:"default",enabled:!1},{id:"view_reports",label:"View Reports",icon:(0,V.jsx)(u.A,{}),path:"/reports",type:"default",enabled:!1}].filter((e=>e.enabled));(0,o.useEffect)((()=>{ee()}),[]);const ee=async()=>{try{r(!0);const[e,t,o]=await Promise.all([K.A.getAllProjects(),T.A.getAllClients(),G.getFinanceStats()]);_(e||[]),O(t||[]),Z(o||{totalIncome:0,totalExpense:0,netProfit:0})}catch(e){console.error("Failed to load dashboard data:",e),s.Ay.error("Failed to load dashboard data")}finally{r(!1)}},te=n.filter((e=>"in_progress"===e.status)).length,re=n.length,oe=H.length,ne=n.reduce(((e,t)=>e+("string"===typeof t.revenue?parseFloat(t.revenue)||0:t.revenue||0)),0),ie=(null===Y||void 0===Y?void 0:Y.netProfit)||0,se=n.filter((e=>"planning"===e.status)).length,le=[{stage:"Proposal",count:n.filter((e=>"planning"===e.status)).length},{stage:"Contract",count:n.filter((e=>"on_hold"===e.status)).length},{stage:"Execution",count:n.filter((e=>"in_progress"===e.status)).length},{stage:"Completed",count:n.filter((e=>"completed"===e.status)).length}],ae=H.reduce(((e,t)=>{const r=t.tier||"Unknown";return e[r]=(e[r]||0)+1,e}),{}),ce=Object.entries(ae).map((e=>{let[t,r]=e;return{name:t,value:r}})),de=(e=>{if(0===ne)return[];const t=new Date,r=ne/12,o=((null===Y||void 0===Y?void 0:Y.totalExpense)||0)/12;return"daily"===e?Array.from({length:30},((e,n)=>{const i=new Date(t);i.setDate(i.getDate()-(29-n));const s=r/30,l=o/30;return{time:i.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric"}),revenue:Math.round(s/1e3),cost:Math.round(l/1e3),profit:Math.round((s-l)/1e3),date:i.getTime()}})):"quarterly"===e?Array.from({length:8},((e,n)=>{const i=Math.floor(t.getMonth()/3),s=(i-(7-n)+32)%4,l=t.getFullYear()-Math.floor((7-n-i)/4),a=3*r,c=3*o;return{time:"".concat(["Q1","Q2","Q3","Q4"][s]," ").concat(l),revenue:Math.round(a/1e3),cost:Math.round(c/1e3),profit:Math.round((a-c)/1e3)}})):Array.from({length:12},((e,n)=>{const i=new Date(t);return i.setMonth(i.getMonth()-(11-n)),{time:i.toLocaleDateString("en-GB",{month:"2-digit",year:"numeric"}),revenue:Math.round(r/1e3),cost:Math.round(o/1e3),profit:Math.round((r-o)/1e3)}}))})(J),xe=["rgba(255, 122, 0, 0.8)","rgba(16, 185, 129, 0.8)","rgba(59, 130, 246, 0.8)","rgba(245, 158, 11, 0.8)","rgba(156, 163, 175, 0.8)"],pe=n.filter((e=>"on_hold"===e.status)).length,he=n.filter((e=>(e.revenue||0)>1e4)).length,ye=n.filter((e=>"in_progress"===e.status)).length,ge=H.filter((e=>["VIP","SVIP"].includes(e.tier))),ue=[{title:"Active Projects",value:"".concat(te,"/").concat(re),color:"#3B82F6",icon:(0,V.jsx)(f.A,{style:{fontSize:"20px",color:"#3B82F6"}})},{title:"Active Clients",value:"".concat(oe," Clients"),color:"#10B981",icon:(0,V.jsx)(j.A,{style:{fontSize:"20px",color:"#10B981"}})},{title:"Total Revenue",value:"\u20ac".concat((ne/1e3).toFixed(0),"K"),color:"#FF7A00",icon:(0,V.jsx)(y.A,{style:{fontSize:"20px",color:"#FF7A00"}})},{title:"Net Profit",value:"\u20ac".concat((ie/1e3).toFixed(0),"K"),color:"#10B981",icon:(0,V.jsx)(m.A,{style:{fontSize:"20px",color:"#10B981"}})},{title:"New Opportunities",value:se.toString(),color:"#4B5563",icon:(0,V.jsx)(F.A,{style:{fontSize:"20px",color:"#4B5563"}})}];return(0,V.jsxs)("div",{style:{padding:"24px",backgroundColor:"#F9FAFB",minHeight:"100vh"},children:[(0,V.jsx)("div",{style:{display:"flex",gap:"12px",marginBottom:"32px",flexWrap:"wrap"},children:ue.map(((e,t)=>
1(0,V.jsx)("div",{style:{flex:"1 1 calc(20% - 10px)",minWidth:"200px"},children:(0,V.jsxs)(l.A,{style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB",height:"100px",width:"100%"},bodyStyle:{padding:"16px"},children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px"},children:[e.icon,(0,V.jsx)(U,{type:"secondary",style:{marginLeft:"8px",fontSize:"14px"},children:e.title})]}),(0,V.jsx)(U,{style:{fontSize:"20px",fontWeight:"600",color:e.color},children:e.value})]})},t)))}),(0,V.jsxs)(a.A,{gutter:[24,24],style:{marginBottom:"24px"},children:[(0,V.jsx)(c.A,{xs:24,md:12,children:(0,V.jsx)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(f.A,{style:{marginRight:"8px",color:"#3B82F6"}}),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\ud83d\udcc1 Project Focus"})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB",height:"200px"},bodyStyle:{padding:"16px"},children:(0,V.jsxs)(d.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(A.A,{style:{color:"#F59E0B",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 ",(0,V.jsx)("strong",{children:pe})," Delayed Projects \u23f0"]})]}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(F.A,{style:{color:"#FF7A00",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 ",(0,V.jsx)("strong",{children:he})," High Value Projects \u2b50"]})]}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(b.A,{style:{color:"#10B981",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 ",(0,V.jsx)("strong",{children:ye})," Projects in Execution Phase \ud83d\udd27"]})]})]})})}),(0,V.jsx)(c.A,{xs:24,md:12,children:(0,V.jsx)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(v.A,{style:{marginRight:"8px",color:"#10B981"}}),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\ud83d\udc65 Customer Focus"})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB",height:"200px"},bodyStyle:{padding:"16px"},children:(0,V.jsxs)(d.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[ge.slice(0,3).map(((e,t)=>(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(j.A,{style:{color:"Enterprise"===e.tier?"#FF7A00":"#3B82F6",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 ",e.company," (",e.tier,") \u2013 ",["\u23f0 Pending Visit","\u2714\ufe0f 90% Paid","\ud83d\udcc4 Contract Pending"][t]||"\u2714\ufe0f Active"]})]},e.id))),0===ge.length&&(0,V.jsx)(U,{type:"secondary",style:{fontSize:"14px"},children:"No VIP clients available"})]})})})]}),(0,V.jsxs)(a.A,{gutter:[24,24],children:[(0,V.jsx)(c.A,{xs:24,md:12,children:(0,V.jsx)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(y.A,{style:{marginRight:"8px",color:"#FF7A00"}}),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\ud83d\udcb5 Finance Overview"})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB",height:"200px"},bodyStyle:{padding:"16px"},children:(0,V.jsxs)(d.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(y.A,{style:{color:"#10B981",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 This Month: Revenue \u20ac",(ne/12/1e3).toFixed(0),"K | Net Profit \u20ac",(ie/12/1e3).toFixed(0),"K"]})]}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(S.A,{style:{color:"#EF4444",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 Overdue Invoices: ",(null===Y||void 0===Y?void 0:Y.pendingAmount)>0?"\u20ac".concat((Y.pendingAmount/1e3).toFixed(1),"K"):"None"]})]}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(E.A,{style:{color:"#10B981",marginRight:"8px"}}),(0,V.jsxs)(U,{style:{fontSize:"14px",color:"#4B5563"},children:["\u2022 Profit Margin: ",ne>0?(ie/ne*100).toFixed(1):"0","%"]})]})]})})}),(0,V.jsx)(c.A,{xs:24,md:12,children:(0,V.jsx)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(F.A,{style:{marginRight:"8px",color:"#4B5563"}}),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\u26a1 Quick Actions"})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB",height:"200px"},bodyStyle:{padding:"16px"},children:(0,V.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(120px, 1fr))",gap:"8px"},children:$.map((t=>(0,V.jsx)(x.Ay,{icon:t.icon,size:"small",style:{height:"32px",borderRadius:"4px",fontSize:"12px"},onClick:()=>e(t.path),children:t.label},t.id)))})})})]}),(0,V.jsxs)(a.A,{gutter:[24,24],style:{marginTop:"24px"},children:[(0,V.jsx)(c.A,{xs:24,md:12,children:(0,V.jsx)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(u.A,{style:{marginRight:"8px",color:"#3B82F6"}}),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\ud83d\udcca Project Stage Distribution"})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB"},bodyStyle:{padding:"16px"},children:(0,V.jsx)(B.u,{width:"100%",height:240,children:(0,V.jsxs)(z.E,{data:le,children:[(0,V.jsx)(k.d,{strokeDasharray:"3 3",stroke:"#E5E7EB"}),(0,V.jsx)(R.W,{dataKey:"stage",tick:{fontSize:12,fill:"#4B5563"}}),(0,V.jsx)(C.h,{tick:{fontSize:12,fill:"#4B5563"}}),(0,V.jsx)(D.m,{contentStyle:{backgroundColor:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:"4px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}}),(0,V.jsx)(P.y,{dataKey:"count",fill:"#FF7A00",barSize:40})]})})})}),(0,V.jsx)(c.A,{xs:24,md:12,children:(0,V.jsx)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(j.A,{style:{marginRight:"8px",color:"#10B981"}}),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\ud83d\udcc8 Client Level Distribution"})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB"},bodyStyle:{padding:"16px"},children:(0,V.jsx)(B.u,{width:"100%",height:240,children:(0,V.jsxs)(I.r,{children:[(0,V.jsx)(W.F,{data:ce,cx:"50%",cy:"50%",labelLine:!0,label:e=>{let{name:t,percent:r,value:o}=e;return"".concat(t,": ").concat(o," (").concat((100*r).toFixed(0),"%)")},outerRadius:80,innerRadius:30,fill:"#8884d8",dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:ce.map(((e,t)=>(0,V.jsx)(M.f,{fill:xe[t%xe.length]},"cell-".concat(t))))}),(0,V.jsx)(D.m,{formatter:(e,t)=>["".concat(e," clients"),t],contentStyle:{backgroundColor:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:"4px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",fontSize:"12px"}}),(0,V.jsx)(L.s,{verticalAlign:"bottom",height:36,wrapperStyle:{fontSize:"12px",color:"#4B5563",paddingTop:"10px"},formatter:(e,t)=>{var r;return"".concat(e," (").concat((null===(r=t.payload)||void 0===r?void 0:r.value)||0,")")}})]})})})})]}),(0,V.jsx)(a.A,{gutter:[24,24],style:{marginTop:"24px"},children:(0,V.jsx)(c.A,{span:24,children:(0,V.jsxs)(l.A,{title:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,V.jsx)(y.A,{style:{marginRight:"8px",color:"#FF7A00"}}
1),(0,V.jsx)("span",{style:{fontSize:"16px",fontWeight:"500",color:"#1F2023"},children:"\ud83d\udcb0 Monthly Revenue & Cost Trend"})]}),(0,V.jsxs)(i.A,{activeKey:J,onChange:X,size:"small",style:{marginBottom:0},children:[(0,V.jsx)(q,{tab:"Daily"},"daily"),(0,V.jsx)(q,{tab:"Monthly"},"monthly"),(0,V.jsx)(q,{tab:"Quarterly"},"quarterly")]})]}),style:{borderRadius:"8px",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",border:"1px solid #E5E7EB"},bodyStyle:{padding:"16px",backgroundColor:"#FAFAFA"},children:[(0,V.jsxs)("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:"16px",padding:"12px",backgroundColor:"#FFFFFF",borderRadius:"6px",border:"1px solid #E5E7EB"},children:[(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)(U,{type:"secondary",style:{fontSize:"12px",display:"block"},children:"Total Revenue"}),(0,V.jsxs)(U,{style:{fontSize:"16px",fontWeight:"600",color:"#10B981"},children:["\u20ac",de.reduce(((e,t)=>e+t.revenue),0),"K"]})]}),(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)(U,{type:"secondary",style:{fontSize:"12px",display:"block"},children:"Total Cost"}),(0,V.jsxs)(U,{style:{fontSize:"16px",fontWeight:"600",color:"#EF4444"},children:["\u20ac",de.reduce(((e,t)=>e+t.cost),0),"K"]})]}),(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)(U,{type:"secondary",style:{fontSize:"12px",display:"block"},children:"Net Profit"}),(0,V.jsxs)(U,{style:{fontSize:"16px",fontWeight:"600",color:"#3B82F6"},children:["\u20ac",de.reduce(((e,t)=>
1e+t.profit),0),"K"]})]}),(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)(U,{type:"secondary",style:{fontSize:"12px",display:"block"},children:"Profit Margin"}),(0,V.jsxs)(U,{style:{fontSize:"16px",fontWeight:"600",color:"#FF7A00"},children:[(de.reduce(((e,t)=>e+t.profit),0)/de.reduce(((e,t)=>e+t.revenue),0)*100).toFixed(1),"%"]})]})]}),(0,V.jsx)(B.u,{width:"100%",height:320,children:(0,V.jsxs)(Q.b,{data:de,margin:{top:20,right:30,left:20,bottom:5},children:[(0,V.jsxs)("defs",{children:[(0,V.jsxs)("linearGradient",{id:"revenueGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,V.jsx)("stop",{offset:"5%",stopColor:"#10B981",stopOpacity:.3}),(0,V.jsx)("stop",{offset:"95%",stopColor:"#10B981",stopOpacity:.05})]}),(0,V.jsxs)("linearGradient",{id:"costGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,V.jsx)("stop",{offset:"5%",stopColor:"#EF4444",stopOpacity:.3}),(0,V.jsx)("stop",{offset:"95%",stopColor:"#EF4444",stopOpacity:.05})]}),(0,V.jsxs)("linearGradient",{id:"profitGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,V.jsx)("stop",{offset:"5%",stopColor:"#3B82F6",stopOpacity:.3}),(0,V.jsx)("stop",{offset:"95%",stopColor:"#3B82F6",stopOpacity:.05})]})]}),(0,V.jsx)(k.d,{strokeDasharray:"1 1",stroke:"#E5E7EB",strokeOpacity:.5,horizontal:!0,vertical:!1}),(0,V.jsx)(R.W,{dataKey:"time",tick:{fontSize:11,fill:"#6B7280"},axisLine:{stroke:"#D1D5DB",strokeWidth:1},tickLine:{stroke:"#D1D5DB",strokeWidth:1},interval:"daily"===J?4:0}),(0,V.jsx)(C.h,{tick:{fontSize:11,fill:"#6B7280"},axisLine:{stroke:"#D1D5DB",strokeWidth:1},tickLine:{stroke:"#D1D5DB",strokeWidth:1},domain:["dataMin - 2","dataMax + 2"]}),(0,V.jsx)(D.m,{formatter:(e,t)=>["\u20ac".concat(e,"K"),"revenue"===t?"Revenue":"cost"===t?"Cost":"Profit"],labelStyle:{color:"#374151",fontWeight:"500"},contentStyle:{backgroundColor:"#FFFFFF",border:"1px solid #D1D5DB",borderRadius:"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",fontSize:"12px"}}),(0,V.jsx)(L.s,{wrapperStyle:{color:"#6B7280",fontSize:"12px",paddingTop:"16px"}}),(0,V.jsx)(N.N,{type:"monotone",dataKey:"revenue",stroke:"#10B981",strokeWidth:2.5,name:"Revenue",dot:{fill:"#10B981",strokeWidth:2,r:3},activeDot:{r:5,fill:"#10B981",strokeWidth:2,stroke:"#FFFFFF"},fill:"url(#revenueGradient)"}),(0,V.jsx)(N.N,{type:"monotone",dataKey:"cost",stroke:"#EF4444",strokeWidth:2.5,name:"Cost",strokeDasharray:"0",dot:{fill:"#EF4444",strokeWidth:2,r:3},activeDot:{r:5,fill:"#EF4444",strokeWidth:2,stroke:"#FFFFFF"},fill:"url(#costGradient)"}),(0,V.jsx)(N.N,{type:"monotone",dataKey:"profit",stroke:"#3B82F6",strokeWidth:2,name:"Profit",strokeDasharray:"5 5",dot:{fill:"#3B82F6",strokeWidth:2,r:2},activeDot:{r:4,fill:"#3B82F6",strokeWidth:2,stroke:"#FFFFFF"}})]})})]})})})]})}}}]);

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.