1import{j as e,H as S,K as R,a3 as I,T as j,F as P,Y as L}from"./@mantine/core-BsuyGRmn.js";import{a as m}from"./@fortawesome/react-fontawesome-Q95xsvRU.js";import{H as D}from"./react-helmet-W-rTQQ_K.js";import{a as B,F as p}from"./useAuth-B3U38Toc.js";import{u as T,T as f}from"./Layout-COZxOmPx.js";import{u as E,g as O,f as z}from"./index-BXxawDeI.js";import{u as $}from"./useUpdateBudgetIntelligenceRules-C5BCk4CP.js";import{u as M}from"./react-redux-C2oRzRTn.js";import{a as V}from"./@mantine/hooks-IS52lrnY.js";import"./@fortawesome/fontawesome-svg-core-Bd9IJ3Is.js";import"./axios-Dq7h7Pqt.js";import"./jwt-decode-VWaDGczM.js";import"./@mantine/notifications-D81ifgRg.js";import"./uuid-C6aID195.js";import"./@mantine/nprogress-BKTGC6wU.js";import"./react-map-gl-B8evJ9t6.js";import"./@mantine/dates-DCjyq250.js";import"./CliccLoading-BIZ7uXG6.js";import"./index-BgEFPwAa.js";import"./classnames-LvzHWtTh.js";import"./@mantine/modals-CctoBpiQ.js";import"./recharts-CXDcTiwM.js";import"./@reduxjs/toolkit-D9V3FL2I.js";import"./react-google-recaptcha-BdypntWe.js";import"./index-BzlYLPuD.js";import"./otplib-CoFanVlL.js";import"./@mantine/form-CLRSQrww.js";import"./@mantine/dropzone-DK67f5Zt.js";import"./tailwind-merge-BvL7hA86.js";import"./redux-state-sync-DkTXdEDC.js";import"./nuqs-BO_aV-UD.js";import"./gleap-BfvSeOpF.js";import"./useUpdateAccountTargetRoas-Bz7Eey14.js";import"./useUpdateAccountMonthlyBudget-1o01bAlc.js";const G=({accountUuid:t=null,view:a=""}={})=>{const[s,l]=m.useState([]),[r,n]=m.useState(!0),[o,g]=m.useState(null),h=async(b,u,x=!0)=>{var c;try{x&&n(!0),g(null);const d=await B.get("/budgetIntelligence/runs",{params:{accountUuid:b,view:u}});(c=d==null?void 0:d.data)!=null&&c.success&&Array.isArray(d.data.budgetIntelligenceRuns)?l(d.data.budgetIntelligenceRuns):g("Failed to load budget intelligence runs")}catch(d){g(d.message)}finally{n(!1)}},i=()=>{h(t,a,!1)};return m.useEffect(()=>{h(t,a)},[t,a]),{budgetIntelligenceRuns:s,loading:r,error:o,refresh:i}};function N(t){return t==null?null:Number(t).toLocaleString()}function H(t){if(!t)return"â";const a=new Date(t);if(isNaN(a.getTime()))return"â";const s=new Date;if(a.getFullYear()===s.getFullYear()&&a.getMonth()===s.getMonth()&&a.getDate()===s.getDate())return"Today";const r=Date.now()-a.getTime(),n=Math.floor(r/864e5);return n<7?`${n}d ago`:a.toLocaleDateString(void 0,{day:"2-digit",month:"short"})}const v={conservative:{label:"Conservative",color:"#34C759",bg:"rgba(52,199,89,0.10)",icon:"shield-check"},balanced:{label:"Balanced",color:"#007AFF",bg:"rgba(0,122,255,0.10)",icon:"scale-balanced"},aggressive:{label:"Aggressive",color:"#FF9500",bg:"rgba(255,149,0,0.10)",icon:"bolt"},custom:{label:"Custom",color:"#8B5CF6",bg:"rgba(139,92,246,0.10)",icon:"sliders"}};function k({rules:t}){if(!t)return null;const a=t.profile??"balanced",s=v[a]??v.balanced;return e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold leading-none whitespace-nowrap",style:{color:s.color,background:s.bg,border:`1px solid ${s.color}33`},title:`Rules profile: ${s.label}`,children:[e.jsx(p,{icon:s.icon,size:9,noMargin:!0}),s.label]})}const U={"Performing well":{short:"Performing",color:"#41d29d",bg:"rgba(16,185,129,0.10)",border:"rgba(16,185,129,0.30)"},"Ready to scale up":{short:"Scaling",color:"#41d29d",bg:"rgba(16,185,129,0.15)",border:"rgba(16,185,129,0.40)"},"Fine-tuning":{short:"Optimizing",color:"#8B5CF6",bg:"rgba(139,92,246,0.10)",border:"rgba(139,92,246,0.30)"},"Almost ready":{short:"Approaching",color:"#63a4f5",bg:"rgba(59,130,246,0.10)",border:"rgba(59,130,246,0.30)"},"Still learning":{short:"Learning",color:"#f9c044",bg:"rgba(245,158,11,0.10)",border:"rgba(245,158,11,0.30)"},"No conversions yet":{short:"Stalled",color:"#f57473",bg:"rgba(239,68,68,0.10)",border:"rgba(239,68,68,0.30)"},"Spending too much per conversion":{short:"Underperforming",color:"#f57473",bg:"rgba(220,38,38,0.10)",border:"rgba(220,38,38,0.30)"},Paused:{short:"Paused",color:"#94A3B8",bg:"rgba(148,163,184,0.10)",border:"rgba(148,163,184,0.30)"},Performing:{short:"Performing",color:"#41d29d",bg:"rgba(16,185,129,0.10)",border:"rgba(16,185,129,0.30)"},"Ready to Scale":{short:"Scaling",color:"#41d29d",bg:"rgba(16,185,129,0.15)",border:"rgba(16,185,129,0.40)"},Optimizing:{short:"Optimizing",color:"#8B5CF6",bg:"rgba(139,92,246,0.10)",border:"rgba(139,92,246,0.30)"},"Approaching Viability":{short:"Approaching",color:"#63a4f5",bg:"rgba(59,130,246,0.10)",border:"rgba(59,130,246,0.30)"},"Data Gathering":{short:"Learning",color:"#f9c044",bg:"rgba(245,158,11,0.10)",border:"rgba(245,158,11,0.30)"},Stalled:{short:"Stalled",color:"#f57473",bg:"rgba(239,68,68,0.10)",border:"rgba(239,68,68,0.30
1)"},Underperforming:{short:"Underperforming",color:"#f57473",bg:"rgba(220,38,38,0.10)",border:"rgba(220,38,38,0.30)"}},_=t=>U[t]??{short:t,color:"#6b7280",bg:"rgba(107,114,128,0.10)",border:"rgba(107,114,128,0.25)"};function F(t){var s;const a={};for(const[l,r]of Object.entries(t)){const n=_(l),o=n.short;a[o]={cfg:n,count:(((s=a[o])==null?void 0:s.count)??0)+r}}return a}function Y({data:t}){if(!t||!Object.keys(t).length)return null;const a=F(t);return e.jsx("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:Object.entries(a).map(([s,{cfg:l,count:r}])=>e.jsx(j,{label:`${s}: ${r}`,withArrow:!0,position:"top",fz:"xs",children:e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-bold tabular-nums leading-none cursor-default",style:{color:l.color,background:l.bg,border:`1px solid ${l.border}`},children:r})},s))})}const y={REVIEW:{color:"#FF3B30",bg:"rgba(255,59,48,0.10)",border:"rgba(255,59,48,0.25)",label:"Review",actionable:!0},SCALE:{color:"#34C759",bg:"rgba(52,199,89,0.12)",border:"rgba(52,199,89,0.30)",label:"Scale",actionable:!0},CHANGE:{color:"#FF9500",bg:"rgba(255,149,0,0.12)",border:"rgba(255,149,0,0.25)",label:"Change",actionable:!0},REDUCE:{color:"#FF6B6B",bg:"rgba(255,107,107,0.10)",border:"rgba(255,107,107,0.25)",label:"Reduce",actionable:!0},PAUSE:{color:"#FF3B30",bg:"rgba(255,59,48,0.10)",border:"rgba(255,59,48,0.25)",label:"Pause",actionable:!0},CONSIDER:{color:"#AF52DE",bg:"rgba(175,82,222,0.10)",border:"rgba(175,82,222,0.25)",label:"Consider",actionable:!1},HOLD:{color:"#8E8E93",bg:"rgba(142,142,147,0.10)",border:"rgba(142,142,147,0.20)",label:"Hold",actionable:!1},NONE:{color:"#AEAEB2",bg:"rgba(174,174,178,0.08)",border:"rgba(174,174,178,0.15)",label:"Paused",actionable:!1}};function w(){return e.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",style:{width:34,height:34},children:e.jsx("img",{src:"/images/app/g-ads-logo.png",alt:"Google Ads",className:"mx-auto h-auto",style:{width:18}})})}function C({pct:t}){if(t==null)return e.jsx("span",{className:"text-xs light:text-gray-400 dark:text-gray-600",children:"â"});const a=t>105?"#f57473":t>=80?"#41d29d":"#f9c044",s=t>105?"Over":t>=80?"On track":"Under";return e.jsxs("div",{className:"flex flex-col items-end gap-0.5",children:[e.jsx("div",{className:"w-26 h-1.5 rounded-full light:bg-gray-100 dark:bg-[#3a383b] overflow-hidden flex-shrink-0",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${t}%`,backgroundColor:a}})}),e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[e.jsxs("span",{className:"text-[10px] font-bold leading-none",style:{color:a},children:[Math.round(t),"%"]}),e.jsx("span",{className:"text-[10px]",style:{color:a},children:s})]})]})}const W=["Underperforming","Stalled","Learning","Approaching","Performing"];function q({data:t}){if(!t||!Object.keys(t).length)return null;const a=F(t),s=W.map(r=>({key:r,...a[r]})).filter(r=>r.count>0),l=s.reduce((r,n)=>r+n.count,0);return l?e.jsxs("div",{className:"flex flex-col items-end gap-0.5 min-w-[80px]",children:[e.jsx("div",{className:"w-36 h-1.5 rounded-full light:bg-gray-100 dark:bg-[#3a383b] overflow-hidden flex gap-px",children:s.map(({key:r,cfg:n,count:o})=>e.jsx(j,{label:`${r}: ${o}`,withArrow:!0,position:"top",fz:"xs",children:e.jsx("div",{className:"h-full cursor-default first:rounded-l-full last:rounded-r-full",style:{width:`${o/l*100}%`,backgroundColor:n.color}})},r))}),e.jsxs("span",{className:"text-[10px] font-medium light:text-gray-500 dark:text-neutral-400 mt-1",children:[l," Campaign",l!==1?"s":""]})]}):null}function A({recsByVerdict:t}){const a=Object.entries(t??{}).filter(([s,l])=>{var r;return l>0&&(((r=y[s])==null?void 0:r.actionable)??!1)}).sort(([s],[l])=>{const r=["REVIEW","PAUSE","SCALE","CHANGE","REDUCE"];return r.indexOf(s)-r.indexOf(l)});return a.length?e.jsx("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:a.map(([s,l])=>{const r=y[s]??y.HOLD;return e.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wide whitespace-nowrap light:text-gray-600 dark:text-gray-300 light:bg-white dark:bg-[#2e2d2f] light:border-gray-300 dark:border-[#3a383b] border",children:[e.jsx("span",{className:"tabular-nums opacity-80",children:l}),e.jsx("span",{className:"opacity-80",children:r.label})]},s)})}):null}function J({search:t,setSearch:a}){return e.jsx("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3 min-w-0
1w-full px-4 py-3 border-b light:border-gray-200 dark:border-[#3a383b] light:bg-white dark:bg-[#2e2d2f]",children:e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0 w-full",children:[e.jsxs("span",{className:"hidden sm:inline-flex items-center gap-2",children:[e.jsx(p,{icon:"chart-pie",size:15,noMargin:!0,className:"text-primary shrink-0"}),e.jsx(S,{size:"md",fw:700,className:"light:text-gray-800 dark:text-white whitespace-nowrap",children:"Accounts"})]}),e.jsx(R,{orientation:"vertical",style:{height:18,alignSelf:"center"},className:"hidden sm:block"}),e.jsx(I,{placeholder:"Search accountsâ¦",value:t,onChange:s=>a(s.target.value),size:"sm",style:{width:220},leftSection:e.jsx(p,{icon:"search",size:13,noMargin:!0,className:"opacity-40"})})]})})}function K(){const t="text-xs font-medium uppercase tracking-wider light:text-gray-500 dark:text-neutral-400";return e.jsxs("div",{className:"hidden md:flex items-center gap-3 px-4 py-2.5 border-b light:bg-white dark:bg-[#2e2d2f] light:border-gray-200 dark:border-[#3a383b]",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("span",{className:t,children:"Account"})}),e.jsx("div",{className:`flex-shrink-0 w-[130px] text-right ${t}`,children:"Campaign Health"}),e.jsx("div",{className:`flex-shrink-0 w-[160px] text-right ${t}`,children:"Spend · Budget"}),e.jsx("div",{className:`flex-shrink-0 w-[126px] text-right ${t}`,children:"Pacing"}),e.jsx("div",{className:`flex-shrink-0 w-[150px] text-right hidden lg:block ${t}`,children:"CPA · Conv"}),e.jsx("div",{className:`flex-shrink-0 w-[140px] text-right ${t}`,children:"Recommendations"}),e.jsx("div",{className:"flex-shrink-0 w-5"})]})}function Q({run:t,onClick:a,openRules:s}){const l=O(t.currencyCode),r=l.displayVal(t.totalCost),n=l.displayVal(t.totalDailyBudget),o=t.totalDailyBudget!=null?l.displayVal(t.totalDailyBudget*30):null,g=t.accountCpa!=null?l.displayVal(t.accountCpa):null,h=t.targetCpa!=null?l.displayVal(t.targetCpa):null,i=N(t.totalConversions),b=N(t.totalClicks),u=t.accountCpa!=null&&t.targetCpa!=null?t.accountCpa<=t.targetCpa?"#41d29d":"#f57473":void 0,x=H(t.runCreated),c=t.recNeedsAction??t.recPending??t.recCount??0;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{onClick:a,className:"md:hidden px-3 py-3 cursor-pointer border-b transition-colors light:border-gray-200 dark:border-[#3a383b] light:bg-white dark:bg-[#2e2d2f] light:hover:bg-gray-50 dark:hover:bg-[#272529]",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{name:t.accountName}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-bold light:text-gray-900 dark:text-white truncate",children:t.accountName}),e.jsxs("div",{className:"mt-0.5 flex items-center gap-1 flex-wrap",children:[e.jsx(Y,{data:t.campaignsByLifecycle}),e.jsx(k,{rules:t.rules}),e.jsxs("span",{className:"text-[10px] light:text-gray-400 dark:text-gray-500",children:["· ",x]})]})]}),c>0?e.jsxs("span",{className:"inline-flex items-center gap-1 flex-shrink-0 text-[10px] font-bold tabular-nums",style:{color:"#FF9500"},children:[c," ",e.jsx("span",{className:"font-semibold uppercase tracking-wide",children:"Pending"})]}):e.jsxs("span",{className:"inline-flex uppercase items-center gap-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold flex-shrink-0",style:{color:"#34C759",background:"rgba(52,199,89,0.10)",border:"1px solid rgba(52,199,89,0.25)"},children:[e.jsx(p,{icon:"circle-check",size:9,noMargin:!0}),"No actions"]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[r&&e.jsx("span",{className:"text-xs font-semibold light:text-gray-700 dark:text-gray-200",children:r}),t.budgetPacingPct!=null&&e.jsx(C,{pct:t.budgetPacingPct}),e.jsx(A,{recsByVerdict:t.recsByVerdict})]})]}),e.jsxs("div",{onClick:a,className:"hidden md:flex items-center gap-3 px-4 py-3.5 cursor-pointer border-b transition-colors light:border-gray-200 dark:border-[#3a383b] light:bg-white dark:bg-[#2e2d2f] light:hover:bg-gray-50 dark:hover:bg-[#272529]",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-3",children:[e.jsx(w,{name:t.accountName}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-sm font-bold light:text-gray-900 dark:text-white truncate flex items-center gap-1",children:[t.accountName,e.jsx(j,{label:"Edit Account Rules",withArrow:!0,children:e.jsx(P,{variant:"subtle",color:"gray",size:"sm",onClick:d=>{d.stopPropagation(),s(t==null?void 0:t.accountUuid,t==null?void 0:t.rules)},children:e.jsx(p,{icon:"cog",button:!0,noMargin:!0,size:12})})})]}),e.jsxs("div",{className:"text-[11px] text-gray-500 flex items-center gap-1",children:[z(t.accountGoogleId),e.jsx(k,{rules:t.rules}),e.jsxs("span",{className:"text-[10px] light:text-gray-400 dark:text-gray-500",children:["· ",x]})]})]})]}),e.jsx("div",{className:"w-[100px] flex-shrink-0 flex justify-end",children:e.jsx(q,{data:t.campaignsByLifecycle})}),e.jsx("div",{className:"flex-shrink-0 w-[160px] flex flex-col items-end gap-0.5",children:r?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm font-bold light:text-gray-900 dark:text-white",children:r}),o&&e.jsxs("span",{className:"text-[10px] light:text-gray-400 dark:text-gray-500 text-end",children:["of ",o,"/mo",n&&e.jsxs(e.Fragment,{children:[" · ",n,"/d"]})]})]}):e.jsx("span",{className:"text-xs light:text-gray-400 dark:text-gray-600",children:"â"})}),e.jsx("div",{className:"flex-shrink-0 w-[124px] flex justify-end",children:e.jsx(C,{pct:t.budgetPacingPct})}),e.jsx("div",{className:"flex-shrink-0 w-[150px] hidden lg:flex flex-col items-end gap-0.5",children:g?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm font-bold leading-none",style:{color:u},children:g}),e.jsx("span",{className:"text-[9px] light:text-gray-400 dark:text-gray-500",children:h?`target ${h}`:"avg CPA"}),i&&e.jsxs("span",{className:"text-[10px] light:text-gray-500 dark:text-gray-400",children:[i," conv",b?` · ${b} clk`:""]})]}):i?e.jsxs("span",{className:"text-xs light:text-gray-600 dark:text-gray-400",children:[i," conv"]}):e.jsx("span",{className:"text-xs light:text-gray-400 dark:text-gray-600",children:"â"})}),e.jsxs("div",{className:"flex-shrink-0 w-[140px] flex flex-col items-end gap-1.5",children:[c>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[10px] font-bold tabular-nums opacity-60",children:c}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide opacity-60",children:"Pending"})]}),e.jsx(A,{recsByVerdict:t.recsByVerdict})]}):e.jsxs("span",{className:"inline-flex uppercase items-center gap-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold",style:{color:"#34C759",background:"rgba(52,199,89,0.10)",border:"1px solid rgba(52,199,89,0.25)"},children:[e.jsx(p,{icon:"circle-check",size:9,noMargin:!0}),"No actions"]}),t.recApplied>0&&e.jsxs("span",{className:"text-[9px] tabular-nums",style:{color:"#34C759"},children:[t.recApplied," applied"]})]}),e.jsx("div",{className:"flex-shrink-0 w-5 flex justify-center",children:e.jsx(p,{icon:"chevron-right",noMargin:!0,size:9,className:"light:text-gray-400 dark:text-gray-500"})})]})]})}function X(){return e.jsx("div",{className:"rounded-3xl border overflow-hidden light:border-gray-200 dark:border-[#3a383b]",children:[...Array(3)].map((t,a)=>e.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b light:border-gray-200 dark:border-[#3a383b] light:bg-white dark:bg-[#2e2d2f] animate-pulse",children:[e.jsx("div",{className:"w-[34px] h-[34px] rounded-full light:bg-gray-200 dark:bg-[#3a383b]"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-3 w-40 rounded light:bg-gray-200 dark:bg-[#3a383b]"}),e.jsx("div",{className:"h-2 w-24 rounded light:bg-gray-100 dark:bg-[#333133]"})]}),e.jsx("div",{className:"w-16 h-3 rounded light:bg-gray-100 dark:bg-[#333133]"}),e.jsx("div",{className:"w-12 h-3 rounded light:bg-gray-100 dark:bg-[#333133]"})]},a))})}function Z(){return e.jsx("div",{className:"rounded-3xl border overflow-hidden light:border-gray-200 dark:border-[#3a383b] light:bg-white dark:bg-[#2e2d2f]",children:e.jsxs("div",{className:"px-6 py-16 flex flex-col items-center gap-3 text-center",children:[e.jsx(p,{icon:"chart-pie",size:28,noMargin:!0,className:"light:text-gray-300 dark:text-[#3a383b]"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium light:text-gray-600 dark:text-gray-400",children:"No budget intelligence runs yet"}),e.jsx("div",{className:"text-xs light:text-gray-400 dark:text-gray-600 mt-1",children:"Runs will appear here once accounts have been analysed"})]})]})})}function ee({data:t=[],loading:a=!1,openRules:s}={}){const l=E(),[r,n]=m.useState("");
1if(a)return e.jsx(X,{});if(!t.length)return e.jsx(Z,{});const o=r.trim().toLowerCase(),g=o?t.filter(i=>{var b,u;return((b=i.accountName)==null?void 0:b.toLowerCase().includes(o))||((u=i.accountGoogleId)==null?void 0:u.toLowerCase().includes(o))}):t,h=i=>{l(`/optimization/budget-intelligence/${i.runUuid}`)};return e.jsxs("div",{className:"rounded-3xl border overflow-hidden light:border-gray-200 dark:border-[#3a383b] light:bg-white dark:bg-[#2e2d2f]",children:[e.jsx(J,{search:r,setSearch:n}),e.jsx(K,{}),g.map(i=>e.jsx(Q,{run:i,onClick:()=>h(i),openRules:s},i.accountUuid)),g.length===0&&e.jsxs("div",{className:"px-6 py-10 text-center text-sm light:text-gray-400 dark:text-gray-500",children:["No accounts match â",r,"â"]})]})}f.translate("Dashboard"),f.translate("Recent Changes"),f.translate("Autopilot");const De=()=>{E(),T({view:"select"});const[t,a]=m.useState(""),[s,l]=m.useState({manageTeams:!1,viewTeams:!1,deleteTeams:!1}),r=M(x=>{var c,d;return(d=(c=x.agency)==null?void 0:c.data)==null?void 0:d.id}),n=m.useMemo(()=>{try{const x="".replace(/;$/,"").trim();if(!x)return!0;const c=JSON.parse(x);return!Array.isArray(c)||!c.length?!0:r!=null&&c.includes(r)}catch{return!0}},[r]);L(),V();const o=()=>{B.access(["teams.manage","teams.view","teams.delete"]).then(([x,c,d])=>{l({manageTeams:x,viewTeams:c,deleteTeams:d})})},{budgetIntelligenceRuns:g,loading:h,refresh:i}=G({accountUuid:null,view:"dashboard"}),{openRules:b,RulesPanel:u}=$({refreshComponent:i});return m.useEffect(()=>{console.log("Budget intelligence runs",g)},[g]),m.useEffect(()=>{o()},[]),e.jsxs(e.Fragment,{children:[e.jsx(D,{children:e.jsx("title",{children:"Budget Intelligence"})}),e.jsx("main",{className:"container mx-auto",children:e.jsxs("div",{className:"relative isolate overflow-hidden",children:[e.jsx("header",{className:"pb-4 pt-2 sm:pt-6 sm:pb-6",children:e.jsxs("div",{className:"mx-auto flex flex-wrap items-center gap-6 px-4 sm:flex-nowrap sm:px-6 lg:px-8",children:[e.jsx("h1",{className:"text-2xl font-medium leading-7 light:text-gray-900",children:f.translate("Budget Intelligence")}),e.jsx("div",{className:"order-last flex w-full items-center sm:order-none sm:w-auto sm:border-l sm:border-gray-200 dark:sm:border-[#3a383b] sm:pl-6",children:e.jsxs("span",{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full text-[11px] font-medium tracking-wide\r 2 light:bg-gradient-to-r light:from-cyan-50 light:to-teal-50/60 light:border light:border-cyan-200/80 light:text-cyan-800\r 3 dark:bg-gradient-to-r dark:from-[#1a2e2f] dark:to-[#162424] dark:border dark:border-[#2BEBE4]/25 dark:text-[#a8f0ed]\r 4 select-none shadow-sm`,children:[e.jsx(p,{icon:"microchip-ai",size:11,noMargin:!0,className:"opacity-60 flex-shrink-0"}),"Budget allocation, bidding strategy & AI commercial analysis â powered by Google Ads live data"]})})]})}),n?e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-8","data-tutorial":"rule-studio-overview",children:e.jsx("div",{className:"space-y-8",children:e.jsx("div",{children:e.jsx(ee,{data:g,loading:h,openRules:b,refreshData:i})})})}):e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-8",children:e.jsx("div",{className:"light:bg-white dark:bg-neutral-800 rounded-3xl border light:border-gray-200 dark:border-neutral-700 p-12",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-6",children:e.jsx("svg",{className:"mx-auto h-16 w-16 text-gray-400 dark:text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),e.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"Coming Soon"}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-md mx-auto",children:["Budget Intelligence is currently in development and will be available to select agencies soon. If you are interested in early access, please reach out to us at ",e.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:underline",children:"[email protected]"}),"."]})]})})})]})}),e.jsx(u,{})]})};export{De as default};
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.