1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22726],{22726:function(e,s,a){a.r(s),a.d(s,{default:function(){return V}});var t=a(57437),r=a(2265),i=a(79820),n=a(12381),l=a(40279),d=a(75060),c=a(69174),o=a(17168),x=a(15291),m=a(23675),u=a(74291),h=a(7204),f=a(31593),j=a(20265),p=a(15051),v=a(76858),g=a(99397),N=a(92735),y=a(95805),b=a(95252),w=a(58896),_=a(42208),C=a(46221),k=a(25846),R=a(66901),Z=a(63639),S=a(70525),P=a(64972),z=a(74394),O=a(17684),T=a(48736),I=a(98728),M=a(50091),D=a(61341),A=a(69064),Q=a(71837);function V(){var e,s,a,V,$,Y;let[E,L]=(0,r.useState)("overview"),[B,F]=(0,r.useState)(null),[q,G]=(0,r.useState)(null),[W,K]=(0,r.useState)([]),[J,H]=(0,r.useState)(null),[U,X]=(0,r.useState)([]),[ee,es]=(0,r.useState)(null),[ea,et]=(0,r.useState)(!1),[er,ei]=(0,r.useState)(!1),[en,el]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(!1),[eo,ex]=(0,r.useState)(!1);(0,r.useEffect)(()=>{em();let e=setInterval(eu,3e4);return()=>clearInterval(e)},[]);let em=async()=>{et(!0);try{let[e]=await Promise.all([Q.api.get("/api/v1/analytics/realtime")]);G(e.data),eh(),ef(),ej(),ep()}catch(e){console.error("Failed to fetch analytics data:",e)}finally{et(!1)}},eu=async()=>{try{let e=await Q.api.get("/api/v1/analytics/realtime");G(e.data)}catch(e){console.error("Failed to fetch realtime data:",e)}},eh=()=>{K([{type:"revenue",predictions:{point_estimate:285e3,lower_bound:242250,upper_bound:327750},confidence:82,scenarios:{optimistic:{value:370500,probability:20},realistic:{value:285e3,probability:60},pessimistic:{value:199500,probability:20}}},{type:"churn",predictions:{total_at_risk:15,potential_revenue_loss:75e3,average_churn_probability:35},confidence:75,scenarios:{}},{type:"conversion",predictions:{predicted_rate:3.8,predicted_conversions:380,improvement_potential:24,revenue_impact:57e3},confidence:78,scenarios:{}}])},ef=()=>{H({roi:320,netProfit:125e3,paybackPeriod:2.5,channels:{email:{roi:450,spend:15e3,revenue:67500},social:{roi:280,spend:2e4,revenue:56e3},search:{roi:350,spend:25e3,revenue:87500},display:{roi:150,spend:18e3,revenue:27e3}}})},ej=()=>{X([{id:"1",name:"Revenue Per Visitor",current_value:2.45,trend:{direction:"increasing",change_percentage:12.5},unit:"$"},{id:"2",name:"Customer Engagement Score",current_value:72,trend:{direction:"increasing",change_percentage:8.3},unit:"points"},{id:"3",name:"Lead Velocity Rate",current_value:45,trend:{direction:"decreasing",change_percentage:-5.2},unit:"leads/week"}])},ep=()=>{es({id:"1",name:"Data-Driven Attribution",type:"data_driven",weights:{email:35,social:25,search:20,direct:15,referral:5}})},ev=async e=>{try{await Q.api.post("/api/v1/analytics/dashboards",e),A.default.success("Custom dashboard created successfully"),ei(!1)}catch(e){A.default.error("Failed to create dashboard")}},eg=async e=>{try{await Q.api.post("/api/v1/analytics/predictions",e),A.default.success("Prediction analysis created"),el(!1)}catch(e){A.default.error("Failed to create prediction")}},eN=async e=>{try{await Q.api.post("/api/v1/analytics/roi",e),A.default.success("ROI calculation completed"),ec(!1)}catch(e){A.default.error("Failed to calculate ROI")}},ey=async e=>{try{await Q.api.post("/api/v1/analytics/metrics",e),A.default.success("Custom metric created"),ex(!1)}catch(e){A.default.error("Failed to create metric")}},eb=e=>{let{title:s,value:a,unit:r,change:n,icon:l,color:d}=e;return(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{className:"pb-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(i.ll,{className:"text-sm font-medium text-muted-foreground",children:s}),(0,t.jsx)(l,{className:"h-4 w-4 ".concat(d)})]})}),(0,t.jsxs)(i.aY,{children:[(0,t.jsxs)("div",{className:"text-2xl font-bold",children:[a,r]}),(0,t.jsxs)("p",{className:"text-xs flex items-center mt-1 ".concat(n>0?"text-green-600":n<0?"text-red-600":"text-gray-600"),children:[n>0?(0,t.jsx)(j.Z,{className:"h-3 w-3 mr-1"}):n<0?(0,t.jsx)(p.Z,{className:"h-3 w-3 mr-1"}):(0,t.jsx)(v.Z,{className:"h-3 w-3 mr-1"}),Math.abs(n),"% from last period"]})]})]})};return(0,t.jsxs)("div",{className:"container mx-auto p-3 sm:p-4 md:p-6 space-y-4 sm:sp
1ace-y-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl sm:text-2xl md:text-3xl font-bold",children:"Advanced Analytics"}),(0,t.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground truncate",children:"Predictive insights and custom dashboards powered by AI"})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(u.Vq,{open:er,onOpenChange:ei,children:[(0,t.jsx)(u.hg,{asChild:!0,children:(0,t.jsxs)(n.z,{variant:"outline",children:[(0,t.jsx)(g.Z,{className:"h-4 w-4 mr-2"}),"Custom Dashboard"]})}),(0,t.jsxs)(u.cZ,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh]",children:[(0,t.jsxs)(u.fK,{children:[(0,t.jsx)(u.$N,{children:"Create Custom Dashboard"}),(0,t.jsx)(u.Be,{children:"Build a personalized analytics dashboard"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Dashboard Name"}),(0,t.jsx)(l.I,{placeholder:"Marketing Performance Dashboard"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Description"}),(0,t.jsx)(m.g,{placeholder:"Track marketing campaign performance and ROI"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Dashboard Type"}),(0,t.jsxs)(x.Ph,{children:[(0,t.jsx)(x.i4,{children:(0,t.jsx)(x.ki,{placeholder:"Select type"})}),(0,t.jsxs)(x.Bw,{children:[(0,t.jsx)(x.Ql,{value:"overview",children:"Overview Dashboard"}),(0,t.jsx)(x.Ql,{value:"marketing",children:"Marketing Dashboard"}),(0,t.jsx)(x.Ql,{value:"sales",children:"Sales Dashboard"}),(0,t.jsx)(x.Ql,{value:"customer",children:"Customer Dashboard"}),(0,t.jsx)(x.Ql,{value:"financial",children:"Financial Dashboard"})]})]})]}),(0,t.jsx)(n.z,{onClick:()=>ev({name:"Custom Dashboard",type:"overview",widgets:[]}),className:"w-full",children:"Create Dashboard"})]})]})]}),(0,t.jsxs)(n.z,{children:[(0,t.jsx)(N.Z,{className:"h-4 w-4 mr-2"}),"Export Report"]})]})]}),q&&(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,t.jsx)(eb,{title:"Active Users",value:q.metrics.active_users,change:(null===(e=q.trends.users)||void 0===e?void 0:e.change)||0,icon:y.Z,color:"text-blue-500"}),(0,t.jsx)(eb,{title:"Current Revenue",value:"$".concat(null===(s=q.metrics.current_revenue)||void 0===s?void 0:s.toLocaleString()),change:(null===(a=q.trends.revenue)||void 0===a?void 0:a.change)||0,icon:b.Z,color:"text-green-500"}),(0,t.jsx)(eb,{title:"Conversion Rate",value:null===(V=q.metrics.conversion_rate)||void 0===V?void 0:V.toFixed(1),unit:"%",change:(null===($=q.trends.conversions)||void 0===$?void 0:$.change)||0,icon:w.Z,color:"text-orange-500"}),(0,t.jsx)(eb,{title:"Page Views",value:null===(Y=q.metrics.page_views)||void 0===Y?void 0:Y.toLocaleString(),change:5.2,icon:_.Z,color:"text-purple-500"})]}),(0,t.jsxs)(o.Tabs,{value:E,onValueChange:L,children:[(0,t.jsxs)(o.TabsList,{className:"grid w-full grid-cols-6",children:[(0,t.jsx)(o.TabsTrigger,{value:"overview",children:"Overview"}),(0,t.jsx)(o.TabsTrigger,{value:"predictions",children:"Predictions"}),(0,t.jsx)(o.TabsTrigger,{value:"roi",children:"ROI Analysis"}),(0,t.jsx)(o.TabsTrigger,{value:"attribution",children:"Attribution"}),(0,t.jsx)(o.TabsTrigger,{value:"metrics",children:"Custom Metrics"}),(0,t.jsx)(o.TabsTrigger,{value:"reports",children:"Reports"})]}),(0,t.jsx)(o.TabsContent,{value:"overview",className:"space-y-6",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsxs)(i.ll,{className:"flex items-center gap-2",children:[(0,t.jsx)(C.Z,{className:"h-5 w-5"}),"Performance Overview"]})}),(0,t.jsxs)(i.aY,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-green-600",children:"94.2%"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Goal Achievement"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-blue-600",children:"$2.4M"}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total Revenue"})]})]}),(0,t.jsx)(h.E,{value:94,className:"h-2"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"â 18% increase from last quarter"})]})]}),(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsxs)(i.ll,{className:"flex items-center gap-2",children:[(0,t.jsx)(k.Z,{className:"h-5 w-5"}),"AI Insights"]})}),(0,t.jsx)(i.aY,{children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(R.Z,{className:"h-4 w-4 text-green-500 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Revenue Acceleration"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Email campaigns showing 45% higher conversion rates"})]})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(Z.Z,{className:"h-4 w-4 text-orange-500 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Optimization Opportunity"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Mobile conversion rate 20% below desktop"})]})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(S.Z,{className:"h-4 w-4 text-blue-500 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Growth Pattern"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Customer lifetime value increasing 12% monthly"})]})]})]})})]}),(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsx)(i.ll,{children:"Channel Performance"})}),(0,t.jsx)(i.aY,{children:(0,t.jsx)("div",{className:"space-y-3",children:[{channel:"Email Marketing",revenue:125e3,roi:450,color:"bg-green-500"},{channel:"Search Ads",revenue:87500,roi:350,color:"bg-blue-500"},{channel:"Social Media",revenue:56e3,roi:280,color:"bg-purple-500"},{channel:"Display Ads",revenue:27e3,roi:150,color:"bg-orange-500"}].map(e=>(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full ".concat(e.color)}),(0,t.jsx)("span",{className:"text-sm",children:e.channel})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsxs)("div",{className:"text-sm font-medium",children:["$",e.revenue.toLocaleStr
1ing()]}),(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:[e.roi,"% ROI"]})]})]},e.channel))})})]}),(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsx)(i.ll,{children:"Customer Segments"})}),(0,t.jsx)(i.aY,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-bold",children:"42%"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Enterprise"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-bold",children:"35%"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Mid-Market"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-bold",children:"23%"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"SMB"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{children:"High-Value Customers"}),(0,t.jsx)("span",{className:"font-medium",children:"$3,500 avg LTV"})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{children:"Growth Rate"}),(0,t.jsx)("span",{className:"font-medium text-green-600",children:"+28%"})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{children:"Retention Rate"}),(0,t.jsx)("span",{className:"font-medium",children:"94.5%"})]})]})]})})]})]})}),(0,t.jsxs)(o.TabsContent,{value:"predictions",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Predictive Analytics"}),(0,t.jsxs)(u.Vq,{open:en,onOpenChange:el,children:[(0,t.jsx)(u.hg,{asChild:!0,children:(0,t.jsxs)(n.z,{children:[(0,t.jsx)(P.Z,{className:"h-4 w-4 mr-2"}),"New Prediction"]})}),(0,t.jsxs)(u.cZ,{children:[(0,t.jsxs)(u.fK,{children:[(0,t.jsx)(u.$N,{children:"Create Prediction Analysis"}),(0,t.jsx)(u.Be,{children:"Generate AI-powered predictions"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Prediction Type"}),(0,t.jsxs)(x.Ph,{children:[(0,t.jsx)(x.i4,{children:(0,t.jsx)(x.ki,{placeholder:"Select prediction type"})}),(0,t.jsxs)(x.Bw,{children:[(0,t.jsx)(x.Ql,{value:"revenue",children:"Revenue Forecast"}),(0,t.jsx)(x.Ql,{value:"churn",children:"Churn Prediction"}),(0,t.jsx)(x.Ql,{value:"conversion",children:"Conversion Rates"}),(0,t.jsx)(x.Ql,{value:"demand",children:"Demand Forecast"}),(0,t.jsx)(x.Ql,{value:"ltv",children:"Customer Lifetime Value"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Time Frame"}),(0,t.jsxs)(x.Ph,{children:[(0,t.jsx)(x.i4,{children:(0,t.jsx)(x.ki,{placeholder:"Select timeframe"})}),(0,t.jsxs)(x.Bw,{children:[(0,t.jsx)(x.Ql,{value:"next_30_days",children:"Next 30 Days"}),(0,t.jsx)(x.Ql,{value:"next_quarter",children:"Next Quarter"}),(0,t.jsx)(x.Ql,{value:"next_6_months",children:"Next 6 Months"}),(0,t.jsx)(x.Ql,{value:"next_year",children:"Next Year"})]})]})]}),(0,t.jsx)(n.z,{onClick:()=>eg({prediction_type:"revenue",timeframe:"next_30_days"}),className:"w-full",children:"Generate Prediction"})]})]})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:W.map((e,s)=>{var a,r,n,l,d,o,x,m,u,h,f;return(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsxs)(i.ll,{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"capitalize",children:[e.type," Forecast"]}),(0,t.jsxs)(c.C,{variant:"outline",children:[e.confidence,"% Confidence"]})]})}),(0,t.jsxs)(i.aY,{className:"space-y-4",children:["revenue"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-2xl font-bold text-green-600",children:["$",null===(a=e.predictions.point_estimate)||void 0===a?void 0:a.toLocaleString()]}),(0,t.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Range: $",null===(r=e.predictions.lower_bound)||void 0===r?void 0:r.toLocaleStr
1ing()," - $",null===(n=e.predictions.upper_bound)||void 0===n?void 0:n.toLocaleString()]}),(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Optimistic"}),(0,t.jsxs)("span",{className:"font-medium",children:["$",null===(d=e.scenarios.optimistic)||void 0===d?void 0:null===(l=d.value)||void 0===l?void 0:l.toLocaleString()]})]}),(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Realistic"}),(0,t.jsxs)("span",{className:"font-medium",children:["$",null===(x=e.scenarios.realistic)||void 0===x?void 0:null===(o=x.value)||void 0===o?void 0:o.toLocaleString()]})]}),(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Pessimistic"}),(0,t.jsxs)("span",{className:"font-medium",children:["$",null===(u=e.scenarios.pessimistic)||void 0===u?void 0:null===(m=u.value)||void 0===m?void 0:m.toLocaleString()]})]})]})]}),"churn"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-red-600",children:e.predictions.total_at_risk}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Customers at Risk"}),(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Potential Revenue Loss"}),(0,t.jsxs)("span",{className:"font-medium text-red-600",children:["$",null===(h=e.predictions.potential_revenue_loss)||void 0===h?void 0:h.toLocaleString()]})]}),(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Avg Churn Probability"}),(0,t.jsxs)("span",{className:"font-medium",children:[e.predictions.average_churn_probability,"%"]})]})]})]}),"conversion"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-2xl font-bold text-blue-600",children:[e.predictions.predicted_rate,"%"]}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Predicted Conversion Rate"}),(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Predicted Conversions"}),(0,t.jsx)("span",{className:"font-medium",children:e.predictions.predicted_conversions})]}),(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Revenue Impact"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:["$",null===(f=e.predictions.revenue_impact)||void 0===f?void 0:f.toLocaleString()]})]}),(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{children:"Improvement Potential"}),(0,t.jsxs)("span",{className:"font-medium",children:[e.predictions.improvement_potential,"%"]})]})]})]})]})]},s)})})]}),(0,t.jsxs)(o.TabsContent,{value:"roi",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"ROI Analysis"}),(0,t.jsxs)(u.Vq,{open:ed,onOpenChange:ec,children:[(0,t.jsx)(u.hg,{asChild:!0,children:(0,t.jsxs)(n.z,{children:[(0,t.jsx)(b.Z,{className:"h-4 w-4 mr-2"}),"Calculate ROI"]})}),(0,t.jsxs)(u.cZ,{children:[(0,t.jsxs)(u.fK,{children:[(0,t.jsx)(u.$N,{children:"ROI Calculator"}),(0,t.jsx)(u.Be,{children:"Calculate return on investment for campaigns"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Initiative Name"}),(0,t.jsx)(l.I,{placeholder:"Q4 Marketing Campaign"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Investment Amount ($)"}),(0,t.jsx)(l.I,{type:"number",placeholder:"50000"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Revenue Generated ($)"}),(0,t.jsx)(l.I,{type:"number",placeholder:"160000"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Time Period"}),(0,t.jsxs)(x.Ph,{children:[(0,t.jsx)(x.i4,{children:(0,t.jsx)(x.ki,{placeholder:"Select timeframe"})}),(0,t.jsxs)(x.Bw,{children:[(0,t.jsx)(x.Ql,{value:"1_month",children:"1 Month"}),(0,t.jsx)(x.Ql,{value:"3_months",children:"3 Months"}),(0,t.jsx)(x.Ql,{value:"6_months",children:"6 Months"}),(0,t.jsx)(x.Ql,{value:"1_year",children:"1 Year"})]})]})]}),(0,t.jsx)(n.z,{onClick:()=>eN({initiative:"Marketing Campaign",investment:5e4,returns:16e4,timeframe:"3_months"}),className:"w-full",children:"Calculate ROI"})]})]})]})]}),J&&(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsx)(i.ll,{children:"Overall ROI Performance"})}),(0,t.jsxs)(i.aY,{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"text-4xl font-bold text-green-600",children:[J.roi,"%"]}),(0,t.jsx)("div",{className:"text-muted-foreground",children:"Return on Investment"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"text-2xl font-bold",children:["$",J.netProfit.toLocaleStr
1ing()]}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Net Profit"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"text-2xl font-bold",children:[J.paybackPeriod," mo"]}),(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"Payback Period"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{children:"Industry Benchmark"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"200%"})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{children:"Your Performance"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[J.roi,"%"]})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{children:"Performance vs Benchmark"}),(0,t.jsxs)("span",{className:"font-medium",children:["+",J.roi-200,"%"]})]})]})]})]}),(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsx)(i.ll,{children:"Channel ROI Breakdown"})}),(0,t.jsx)(i.aY,{children:(0,t.jsx)("div",{className:"space-y-4",children:Object.entries(J.channels).map(e=>{let[s,a]=e;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"capitalize text-sm font-medium",children:s.replace("_"," ")}),(0,t.jsxs)(c.C,{variant:"outline",children:[a.roi,"% ROI"]})]}),(0,t.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{children:["Spend: $",a.spend.toLocaleString()]}),(0,t.jsxs)("span",{children:["Revenue: $",a.revenue.toLocaleString()]})]}),(0,t.jsx)(h.E,{value:Math.min(a.roi/500*100,100),className:"h-2"})]},s)})})})]})]})]}),(0,t.jsxs)(o.TabsContent,{value:"attribution",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Attribution Modeling"}),(0,t.jsxs)(n.z,{children:[(0,t.jsx)(z.Z,{className:"h-4 w-4 mr-2"}),"Create Model"]})]}),ee&&(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)(i.Zb,{children:[(0,t.jsxs)(i.Ol,{children:[(0,t.jsx)(i.ll,{children:ee.name}),(0,t.jsxs)(i.SZ,{children:["Model Type: ",ee.type.replace("_"," ")]})]}),(0,t.jsx)(i.aY,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:"Channel Attribution"}),Object.entries(ee.weights).map(e=>{let[s,a]=e;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{className:"capitalize",children:s}),(0,t.jsxs)("span",{className:"font-medium",children:[a,"%"]})]}),(0,t.jsx)(h.E,{value:a,className:"h-2"})]},s)})]})})]}),(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsx)(i.ll,{children:"Customer Journey Analysis"})}),(0,t.jsxs)(i.aY,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:"Top Conversion Paths"}),(0,t.jsx)("div",{className:"space-y-2",children:["Social Media â Email â Direct","Search â Website â Email","Display â Social â Direct","Email â Website â Direct"].map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center text-sm",children:[(0,t.jsx)("span",{children:e}),(0,t.jsxs)(c.C,{variant:"outline",children:[Math.floor(20*Math.random()+5),"%"]})]},s))})]}),(0,t.jsx)(f.Z,{}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:"Journey Insights"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-bold",children:"4.2"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Avg Touchpoints"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-bold",children:"18 days"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Avg Journey"})]})]})]})]})]})]})]}),(0,t.jsxs)(o.TabsContent,{value:"metrics",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Custom Metrics"}),(0,t.jsxs)(u.Vq,{open:eo,onOpenChange:ex,children:[(0,t.jsx)(u.hg,{asChild:!0,children:(0,t.jsxs)(n.z,{children:[(0,t.jsx)(g.Z,{className:"h-4 w-4 mr-2"}),"Create Metric"]})}),(0,t.jsxs)(u.cZ,{children:[(0,t.jsxs)(u.fK,{children:[(0,t.jsx)(u.$N,{
1children:"Custom Metric Builder"}),(0,t.jsx)(u.Be,{children:"Create a custom business metric"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Metric Name"}),(0,t.jsx)(l.I,{placeholder:"Revenue Per Visitor"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Description"}),(0,t.jsx)(m.g,{placeholder:"Average revenue generated per website visitor"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Formula"}),(0,t.jsx)(l.I,{placeholder:"total_revenue / total_visitors"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d._,{children:"Unit"}),(0,t.jsxs)(x.Ph,{children:[(0,t.jsx)(x.i4,{children:(0,t.jsx)(x.ki,{placeholder:"Select unit"})}),(0,t.jsxs)(x.Bw,{children:[(0,t.jsx)(x.Ql,{value:"currency",children:"Currency ($)"}),(0,t.jsx)(x.Ql,{value:"percentage",children:"Percentage (%)"}),(0,t.jsx)(x.Ql,{value:"number",children:"Number"}),(0,t.jsx)(x.Ql,{value:"ratio",children:"Ratio"})]})]})]}),(0,t.jsx)(n.z,{onClick:()=>ey({name:"Custom Metric",formula:"total_revenue / total_visitors",unit:"currency"}),className:"w-full",children:"Create Metric"})]})]})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:U.map(e=>(0,t.jsxs)(i.Zb,{children:[(0,t.jsx)(i.Ol,{children:(0,t.jsxs)(i.ll,{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-base",children:e.name}),(0,t.jsx)(n.z,{variant:"ghost",size:"sm",children:(0,t.jsx)(O.Z,{className:"h-4 w-4"})})]})}),(0,t.jsx)(i.aY,{children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsxs)("div",{className:"text-3xl font-bold",children:[e.current_value,e.unit&&(0,t.jsx)("span",{className:"text-lg",children:e.unit})]})}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm",children:["increasing"===e.trend.direction?(0,t.jsx)(j.Z,{className:"h-4 w-4 text-green-600"}):"decreasing"===e.trend.direction?(0,t.jsx)(p.Z,{className:"h-4 w-4 text-red-600"}):(0,t.jsx)(v.Z,{className:"h-4 w-4 text-gray-600"}),(0,t.jsxs)("span",{className:"font-medium ".concat("increasing"===e.trend.direction?"text-green-600":"decreasing"===e.trend.direction?"text-red-600":"text-gray-600"),children:[Math.abs(e.trend.change_percentage),"%"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"from last period"})]}),(0,t.jsxs)("div",{className:"pt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,t.jsx)("span",{children:"Performance"}),(0,t.jsx)("span",{children:"Target"})]}),(0,t.jsx)(h.E,{value:Math.min(e.current_value/(1.2*e.current_value)*100,100),className:"h-2"})]})]})})]},e.id))})]}),(0,t.jsxs)(o.TabsContent,{value:"reports",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Automated Reports"}),(0,t.jsxs)(n.z,{children:[(0,t.jsx)(T.Z,{className:"h-4 w-4 mr-2"}),"Create Report"]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)(i.Zb,{children:[(0,t.jsxs)(i.Ol,{children:[(0,t.jsx)(i.ll,{children:"Scheduled Reports"}),(0,t.jsx)(i.SZ,{children:"Automated analytics reports"})]}),(0,t.jsx)(i.aY,{children:(0,t.jsx)("div",{className:"space-y-4",children:[{name:"Weekly Performance Report",frequency:"Weekly",recipients:5,status:"active"},{name:"Monthly Executive Summary",frequency:"Monthly",recipients:3,status:"active"},{name:"Quarterly ROI Analysis",frequency:"Quarterly",recipients:8,status:"scheduled"}].map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-3 border rounded-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium text-sm",children:e.name}),(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:[e.frequency," ⢠",e.recipients," recipients"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.C,{variant:"active"===e.status?"default":"secondary",children:e.status}),(0,t.jsx)(n.z,{variant:"ghost",size:"sm",children:(0,t.jsx)(I.Z,{className:"h-4 w-4"})})]})]},s))})})]}),(0,t.jsxs)(i.Zb,{children:[(0,t.jsxs)(i.Ol,{children:[(0,t.jsx)(i.ll,{children:"Export Options"}
1),(0,t.jsx)(i.SZ,{children:"Download analytics data"})]}),(0,t.jsxs)(i.aY,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)(n.z,{variant:"outline",className:"justify-start",children:[(0,t.jsx)(T.Z,{className:"h-4 w-4 mr-2"}),"PDF Report"]}),(0,t.jsxs)(n.z,{variant:"outline",className:"justify-start",children:[(0,t.jsx)(M.Z,{className:"h-4 w-4 mr-2"}),"Excel Export"]}),(0,t.jsxs)(n.z,{variant:"outline",className:"justify-start",children:[(0,t.jsx)(D.Z,{className:"h-4 w-4 mr-2"}),"CSV Data"]}),(0,t.jsxs)(n.z,{variant:"outline",className:"justify-start",children:[(0,t.jsx)(z.Z,{className:"h-4 w-4 mr-2"}),"API Export"]})]}),(0,t.jsx)(f.Z,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium mb-2",children:"Quick Insights"}),(0,t.jsxs)("div",{className:"space-y-2 text-xs",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"Last Export"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"2 days ago"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"Data Points"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"15,234 records"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"File Size"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"2.4 MB"})]})]})]})]})]})]})]})]})]})}},69174:function(e,s,a){a.d(s,{C:function(){return l}});var t=a(57437);a(2265);var r=a(90535),i=a(93448);let n=(0,r.j)("inline-flex items-center rounded-[4px] border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:s,variant:a,...r}=e;return(0,t.jsx)("div",{className:(0,i.cn)(n({variant:a}),s),...r})}},12381:function(e,s,a){a.d(s,{d:function(){return d},z:function(){return c}});var t=a(57437),r=a(2265),i=a(37053),n=a(90535),l=a(93448);let d=(0,n.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[4px] text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-[4px] px-3 text-xs",lg:"h-10 rounded-[4px] px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=r.forwardRef((e,s)=>{let{className:a,variant:r,size:n,asChild:c=!1,...o}=e,x=c?i.g7:"button";return(0,t.jsx)(x,{className:(0,l.cn)(d({variant:r,size:n,className:a})),ref:s,...o})});c.displayName="Button"},79820:function(e,s,a){a.d(s,{Ol:function(){return l},SZ:function(){return c},Zb:function(){return n},aY:function(){return o},eW:function(){return x},ll:function(){return d}});var t=a(57437),r=a(2265),i=a(93448);let n=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,i.cn)("rounded-[4px] border bg-card text-card-foreground shadow",a),...r})});n.displayName="Card";let l=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",a),...r})});l.displayName="CardHeader";let d=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,i.cn)("font-display font-semibold leading-none tracking-tight",a),...r})});
1d.displayName="CardTitle";let c=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,i.cn)("text-sm text-muted-foreground",a),...r})});c.displayName="CardDescription";let o=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,i.cn)("p-6 pt-0",a),...r})});o.displayName="CardContent";let x=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,i.cn)("flex items-center p-6 pt-0",a),...r})});x.displayName="CardFooter"},74291:function(e,s,a){a.d(s,{$N:function(){return f},Be:function(){return j},Vq:function(){return d},cN:function(){return h},cZ:function(){return m},fK:function(){return u},hg:function(){return c}});var t=a(57437),r=a(2265),i=a(49027),n=a(93448),l=a(20653);let d=i.fC,c=i.xz,o=i.h_;i.x8;let x=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.aV,{ref:s,className:(0,n.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...r})});x.displayName=i.aV.displayName;let m=r.forwardRef((e,s)=>{let{className:a,children:r,overlayClassName:d,...c}=e;return(0,t.jsxs)(o,{children:[(0,t.jsx)(x,{className:d}),(0,t.jsxs)(i.VY,{ref:s,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200","w-[calc(100%-1rem)] xs:w-[calc(100%-2rem)] sm:w-full max-w-lg","p-4 sm:p-6","max-h-[90vh] sm:max-h-[85vh]","rounded-lg sm:rounded-lg","flex flex-col","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",a),...c,children:[r,(0,t.jsxs)(i.x8,{className:"absolute right-3 top-3 sm:right-4 sm:top-4 z-50 rounded-full opacity-70 ring-offset-background transition-all hover:opacity-100 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground bg-white dark:bg-gray-900 shadow-md border border-gray-200 dark:border-gray-700 p-1.5",children:[(0,t.jsx)(l.Pxu,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});m.displayName=i.VY.displayName;let u=e=>{let{className:s,...a}=e;return(0,t.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-1.5 text-center sm:text-left flex-shrink-0",s),...a})};u.displayName="DialogHeader";let h=e=>{let{className:s,...a}=e;return(0,t.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 flex-shrink-0 mt-4",s),...a})};h.displayName="DialogFooter";let f=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.Dx,{ref:s,className:(0,n.cn)("font-display text-lg font-semibold leading-none tracking-tight",a),...r})});f.displayName=i.Dx.displayName;let j=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.dk,{ref:s,className:(0,n.cn)("text-sm text-muted-foreground",a),...r})});j.displayName=i.dk.displayName},40279:function(e,s,a){a.d(s,{I:function(){return n}});var t=a(57437),r=a(2265),i=a(93448);let n=r.forwardRef((e,s)=>{let{className:a,type:r,error:n,...l}=e;return(0,t.jsx)("input",{type:r,"aria-invalid":n?"true":void 0,className:(0,i.cn)("flex h-9 w-full rounded-[4px] border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n&&"border-red-500 focus-visible:ring-red-500",a),ref:s,...l})});n.displayName="Input"},75060:function(e,s,a){a.d(s,{_:function(){return c}});var t=a(57437),r=a(2265),i=a(6394),n=a(90535),l=a(93448);let d=(0,n.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.f,{ref:s,className:(0,l.cn)(d(),a),...r})});c.displayName=i.f.displayName},7204:function(e,s,a){a.d(s,{E:function(){return l}});var t=a(57437),r=a(2265),i=a(60610),n=a(93448);let l=r.forwardRef((e,s)=>{let{className:a,value:r,...l}=e;return(0,t.jsx)(i.fC,{ref:s,className:(0,n.cn)("relative h-4 w-full overflow-hidden rounded-[4px] bg-gray-100 dark:bg-gray-800",a),...l,children:(0,t.jsx)(i.z$,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(r||0),"%)")}})})});l.displayName=i.fC.displayName},15291:function(e,s,a){a.d(s,{Bw:function(){return u},DI:function(){return o},Ph:function(){return c},Ql:function(){return f},i4:function(){return m},ki:function(){return x},n5:function(){return h}});var t=a(57437),r=a(2265),i=a(56873),n=a(40875),l=a(30401),d=a(93448);let c=i.fC,o=i.ZA,x=i.B4,m=r.forwardRef((e,s)=>{let{className:a,children:r,...l}=e;return(0,t.jsxs)(i.xz,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-[4px] border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 dark:text-gray-100 px-3 py-2 text-sm r
1ing-offset-white dark:ring-offset-gray-950 placeholder:text-gray-500 dark:placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-950 dark:focus:ring-gray-300 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...l,children:[r,(0,t.jsx)(i.JO,{asChild:!0,children:(0,t.jsx)(n.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=i.xz.displayName;let u=r.forwardRef((e,s)=>{let{className:a,children:r,position:n="popper",...l}=e;return(0,t.jsx)(i.h_,{children:(0,t.jsx)(i.VY,{ref:s,className:(0,d.cn)("relative z-50 min-w-[8rem] overflow-hidden rounded-[4px] border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-950 dark:text-gray-100 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:n,...l,children:(0,t.jsx)(i.l_,{className:(0,d.cn)("p-1 max-h-[300px] overflow-y-auto","popper"===n&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:r})})})});u.displayName=i.VY.displayName;let h=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.__,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...r})});h.displayName=i.__.displayName;let f=r.forwardRef((e,s)=>{let{className:a,children:r,...n}=e;return(0,t.jsxs)(i.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-gray-100 dark:focus:bg-gray-700 focus:text-gray-900 dark:focus:text-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...n,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(i.wU,{children:(0,t.jsx)(l.Z,{className:"h-4 w-4"})})}),(0,t.jsx)(i.eT,{children:r})]})});f.displayName=i.ck.displayName,r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-gray-100 dark:bg-gray-700",a),...r})}).displayName=i.Z0.displayName},31593:function(e,s,a){a.d(s,{Z:function(){return l}});var t=a(57437),r=a(2265),i=a(55156),n=a(93448);let l=r.forwardRef((e,s)=>{let{className:a,orientation:r="horizontal",decorative:l=!0,...d}=e;return(0,t.jsx)(i.f,{ref:s,decorative:l,orientation:r,className:(0,n.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",a),...d})});l.displayName=i.f.displayName},17168:function(e,s,a){a.d(s,{Tabs:function(){return l},TabsContent:function(){return o},TabsList:function(){return d},TabsTrigger:function(){return c}});var t=a(57437),r=a(2265),i=a(20271),n=a(93448);let l=i.fC,d=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.aV,{ref:s,className:(0,n.cn)("inline-flex h-10 items-center justify-center rounded-[4px] bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",a),...r})});d.displayName=i.aV.displayName;let c=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.xz,{ref:s,className:(0,n.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white dark:ring-offset-gray-950 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 dark:focus-visible:ring-gray-300 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-900 data-[state=active]:text-gray-950 dark:data-[state=active]:text-gray-100 data-[state=active]:shadow-sm",a),...r})});c.displayName=i.xz.displayName;let o=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(i.VY,{ref:s,className:(0,n.cn)("mt-2 ring-offset-white dark:ring-offset-gray-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 dark:focus-visible:ring-gray-300 focus-visible:ring-offset-2",a),...r})});o.displayName=i.VY.displayName},23675:function(e,s,a){a.d(s,{g:function(){return n}});var t=a(57437),r=a(2265),i=a(93448);let n=r.forwardRef((e,s)=>{let{className:a,error:r,...n}=e;return(0,t.jsx)("textarea",{"aria-invalid":r?"true":void 0,className:(0,i.cn)("flex min-h-[80px] w-full rounded-[4px] border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r&&"border-red-500 focus-visible:ring-red-500",a),ref:s,...n})});n.displayName="Textarea"},93448:function(e,s,a){a.d(s,{cn:function(){return i}});var t=a(61994),r=a(53335);function i(){for(var e=arguments.length,s=Array(e),a=0;a<e;a++)s[a]=arguments[a];return(0,r.m6)((0,t.W)(s))}}}]);
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.