1import{j as t}from"./vendor-react-BROQBj2b.js";import{D as n}from"./DashboardLayout--SVpaqf1.js";import{t as i}from"./index-Bd_6cr_J.js";import{u as h,v as f,B as j,a as A,w as H,T as N,f as d,g as k}from"./vendor-icons-9EzDAflf.js";import"./vendor-data-D6FifPC8.js";const u=c=>c?new Date(c).toLocaleString("ar-IQ",{dateStyle:"medium",timeStyle:"short"}):"ÙÙ
ÙÙØ´ØºÙ٠بعد";function C(){const c=i.useUtils(),a=i.automation.dashboard.useQuery(),r=i.automation.markOpportunityReviewed.useMutation({onSuccess:()=>c.automation.dashboard.invalidate()});if(a.isLoading)return t.jsx(n,{"data-loc":"client/src/pages/AutomationHub.tsx:12",children:t.jsx("div",{"data-loc":"client/src/pages/AutomationHub.tsx:12",className:"p-8 text-center text-ink-soft",children:"جار٠تØÙ
ÙÙ ÙÙØØ© اÙÙ
تابعةâ¦"})});if(a.isError||!a.data)return t.jsx(n,{"data-loc":"client/src/pages/AutomationHub.tsx:13",children:t.jsx("div",{"data-loc":"client/src/pages/AutomationHub.tsx:13",className:"m-6 border-r-4 border-clay bg-sand p-6 text-ink",children:"ÙØ°Ù Ø§ÙØµÙØØ© Ù
خصصة ÙØµØ§ØØ¨ اÙÙ
ÙÙØ¹ ÙÙ
راجعة اÙÙ
تابعة ÙØ§ÙÙØ±Øµ."})});const{configs:m,checks:e,opportunities:l,visits:o}=a.data,p=l.filter(s=>s.status==="new"),x=e.filter(s=>s.status!=="ok"),b=s=>({linkedin:"LinkedIn",search:"Ù
ØØ±Ù Ø¨ØØ«",social:"Ø´Ø¨ÙØ© اجتÙ
Ø§Ø¹ÙØ©",other_referral:"Ø¥ØØ§ÙØ© عاÙ
Ø©",direct_or_unknown:"Ù
باشر Ø£Ù ØºÙØ± Ù
تاØ"})[s||""]||"Ù
صدر ØºÙØ± Ù
تاØ",g=s=>({browser:"Ù
ØªØµÙØ عاد٠Ù
ØØªÙ
Ù",crawler_or_automated:"زØÙ Ø£Ù Ù
عاÙÙØ© Ø¢ÙÙØ© Ù
ØØªÙ
ÙØ©",unknown:"ØºÙØ± Ù
ØØ¯Ø¯"})[s||""]||"ØºÙØ± Ù
ØØ¯Ø¯";return t.jsx(n,{"data-loc":"client/src/pages/AutomationHub.tsx:22",children:t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:22",dir:"rtl",className:"mx-auto max-w-6xl space-y-8 pb-12",children:[t.jsxs("header",{"data-loc":"client/src/pages/AutomationHub.tsx:23",className:"flex flex-col gap-5 border-b border-ink/10 pb-7 sm:flex-row sm:items-end sm:justify-between",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:23",children:[t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:23",className:"archive-label",children:"Ù
تابعة ذÙÙØ© Ù
جدÙÙØ©"}),t.jsx("h1",{"data-loc":"client/src/pages/AutomationHub.tsx:23",className:"mt-3 text-3xl font-black text-ink sm:text-4xl",children:"Ù
Ø±Ø§ÙØ¨Ø© اÙÙ
ÙÙØ¹ ÙÙØ±Øµ اÙÙ
راجعة"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:23",className:"mt-3 max-w-3xl leading-7 text-ink-soft",children:"تسجÙÙ ÙØ°Ù اÙÙÙØØ© ØØ§ÙØ© اÙÙ
ÙÙØ¹ ÙØ§ÙÙØ±Øµ Ø§ÙØªÙ Ø¹ÙØ«Ø± عÙÙÙØ§. ÙØ§ ÙÙØ´Ø¦ اÙÙØ¸Ø§Ù
ØØ³Ø§Ø¨Ø§ØªØ ÙÙØ§ ÙØ±Ø³Ù Ø³ÙØ±Ø© Ø°Ø§ØªÙØ©Ø ÙÙØ§ ÙØ±Ø§Ø³Ù Ø£Ù Ø¬ÙØ© Ù
٠دÙÙ Ù
ÙØ§ÙÙØªÙ Ø§ÙØµØ±ÙØØ©."})]}),t.jsxs("button",{"data-loc":"client/src/pages/AutomationHub.tsx:23",onClick:()=>a.refetch(),className:"inline-flex items-center justify-center gap-2 border border-ink/20 bg-paper px-4 py-3 text-sm font-extrabold text-archive-blue transition hover:border-archive-blue",children:[t.jsx(h,{"data-loc":"client/src/pages/AutomationHub.tsx:23",className:"h-4 w-4"})," ØªØØ¯ÙØ«"]})]}),t.jsxs("section",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[t.jsxs("article",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"border border-ink/15 bg-paper p-6",children:[t.jsx(f,{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"h-7 w-7 text-archive-blue"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-5 text-sm font-bold text-ink-soft",children:"Ù
ÙØ§Ù
اÙÙ
تابعة"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-1 text-3xl font-black text-ink",children:m.length}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-2 text-sm leading-6 text-ink-soft",children:"Ù
ÙØ§Ù
Ù
Ø³Ø¬ÙØ©Ø تÙÙØ¹Ù٠بعد ÙØ´Ø± ÙÙØ§Ø· Ø§ÙØªØ´ØºÙÙ ÙØ¥Ùشاء Ø§ÙØ¬Ø¯ÙÙØ©."})]}),t.jsxs("article",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"border border-ink/15 bg-paper p-6",children:[t.jsx(j,{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"h-7 w-7 text-archive-blue"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-5 text-sm font-bold text-ink-soft",children:"ÙØ±Øµ Ø¬Ø¯ÙØ¯Ø© ÙÙÙ
راجعة"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-1 text-3xl font-black text-ink",children:p.length}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-2 text-sm leading-6 text-ink-soft",children:"ÙØªØ§Ø¦Ø¬ عاÙ
Ø© ÙÙØ·Ø ÙÙØ³Øª ØªÙØ¯ÙÙ
ات Ø£Ù Ø¹Ø±ÙØ¶Ø§Ù Ù
Ø¤ÙØ¯Ø©."})]}),t.jsxs("article",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"border border-ink/15 bg-paper p-6",children:[t.jsx(A,{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"h-7 w-7 text-archive-blue"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-5 text-sm font-bold text-ink-soft",children:"إشارات Ø²ÙØ§Ø±Ø© ØØ¯Ùثة"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-1 text-3xl font-black text-ink",children:o.length}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-2 text-sm leading-6 text-ink-soft",children:"Ù
ؤشرات Ù
جÙ
عة ÙØ§ ØªÙØ´Ù ÙÙÙØ© Ø§ÙØ²Ø§Ø¦Ø±."})]}),t.jsxs("article",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"border border-ink/15 bg-paper p-6",children:[t.jsx(H,{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"h-7 w-7 text-archive-blue"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-5 text-sm font-bold text-ink-soft",children:"آخر ÙØÙØµ اÙÙ
ÙÙØ¹"}),t.jsxs("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-1 text-3xl font-black text-ink",children:[e.length-x.length,"/",e.length||0]}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:25",className:"mt-2 text-sm leading-6 text-ink-soft",children:"اÙÙ
سارات Ø§ÙØªÙ أعادت ÙØªÙجة سÙÙÙ
Ø© ضÙ
٠آخر سج٠Ù
تاØ."})]})]}),t.jsxs("section",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"border border-ink/15 bg-paper",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"flex items-center justify-between border-b border-ink/10 p-6",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:27",children:[t.jsx("h2",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"text-xl font-black",children:"ØµØØ© اÙÙ
ÙÙØ¹"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"mt-1 text-sm text-ink-soft",children:"ÙØØµ ØªØ´Ø®ÙØµÙ ÙÙÙ
سارات Ø§ÙØ¹Ø§Ù
Ø©Ø ÙØ§ ÙØ¬Ø±Ù تعدÙÙ Ù
ØØªÙ٠اÙÙ
ÙÙØ¹ تÙÙØ§Ø¦ÙاÙ."})]}),x.length>0?t.jsx(N,{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"h-6 w-6 text-clay"}):t.jsx(d,{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"h-6 w-6 text-archive-blue"})]}),t.jsx("div",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"divide-y divide-ink/10",children:e.length===0?t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"p-6 text-sm text-ink-soft",children:"ÙØ§ ØªÙØ¬Ø¯ ÙØÙØµ Ù
Ø³Ø¬ÙØ© بعد."}):e.slice(0,12).map(s=>t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"grid gap-2 p-5 sm:grid-cols-[1fr_auto_auto]",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:27",children:[t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"font-bold text-ink",dir:"ltr",children:s.route}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"mt-1 text-sm text-ink-soft",children:s.detail||"ÙØ§ ØªÙØ¬Ø¯ Ù
ÙØ§ØØ¸Ø§Øª"})]}),t.jsx("span",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:`w-fit px-2 py-1 text-xs font-bold ${s.status==="ok"?"bg-archive-blue/10 text-archive-blue":"bg-clay/10 text-clay"}`,children:s.status==="ok"?"سÙÙÙ
":s.status==="degraded"?"ÙØØªØ§Ø¬ Ù
تابعة":"تعذر اÙÙØØµ"}),t.jsx("span",{"data-loc":"client/src/pages/AutomationHub.tsx:27",className:"text-xs text-ink-soft",children:u(s.checkedAt)})]},s.id))})]}),t.jsxs("section",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"border border-ink/15 bg-paper",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"border-b border-ink/10 p-6",children:[t.jsx("h2",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"text-xl font-black",children:"Ù
ؤشرات Ø§ÙØ²Ùارات Ø§ÙØ¹Ø§Ù
Ø©"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"mt-1 text-sm text-ink-soft",children:"ØªÙØ¶Ø اÙÙ
صدر Ø§ÙØ¹Ø§Ù
ÙØ§ÙتصÙÙÙ Ø§ÙØªÙÙÙ Ø¹ÙØ¯ تÙÙØ±ÙÙ
ا. ÙØ§ تØÙظ اسÙ
Ø§Ù Ø£Ù Ø¨Ø±ÙØ¯Ø§Ù أ٠عÙÙØ§Ù IP Ø£Ù Ø±Ø§Ø¨Ø·Ø§Ù ÙØ§Ù
ÙØ§Ù ÙÙØ²Ø§Ø¦Ø±."})]}),t.jsx("div",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"divide-y divide-ink/10",children:o.length===0?t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"p-6 text-sm text-ink-soft",children:"ÙØ§ ØªÙØ¬Ø¯ إشارات Ø²ÙØ§Ø±Ø© بعد."}):o.slice(0,12).map(s=>t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"grid gap-2 p-5 sm:grid-cols-[1fr_auto_auto]",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:29",children:[t.jsxs("p",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"font-bold text-ink",children:[b(s.trafficSource)," â ",g(s.visitorKind)]}),t.jsxs("p",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"mt-1 text-sm text-ink-soft",children:[s.countryCode?`Ø§ÙØ¯ÙÙØ© Ø§ÙØªÙØ±ÙØ¨ÙØ©: ${s.countryCode}`:"Ø§ÙØ¯ÙÙØ©: ØºÙØ± Ù
ØªØ§ØØ©"," · ",s.browser||"Ù
ØªØµÙØ ØºÙØ± Ù
ØØ¯Ø¯"," · ",t.jsx("span",{"data-loc":"client/src/pages/AutomationHub.tsx:29",dir:"ltr",children:s.path})]}),s.technicalAgent&&t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"mt-1 text-xs font-bold text-archive-blue",children:s.technicalAgent})]}),t.jsx("span",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"w-fit bg-archive-blue/10 px-2 py-1 text-xs font-bold text-archive-blue",children:s.language||"ÙØºØ© ØºÙØ± Ù
ØªØ§ØØ©"}),t.jsx("span",{"data-loc":"client/src/pages/AutomationHub.tsx:29",className:"text-xs text-ink-soft",children:u(s.createdAt)})]},s.id))})]}),t.jsxs("section",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"border border-ink/15 bg-paper",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"border-b border-ink/10 p-6",children:[t.jsx("h2",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"text-xl font-black",children:"ÙØ±Øµ Ø§ÙØ¹Ù
Ù ÙØ§ÙتعاÙÙ"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"mt-1 text-sm text-ink-soft",children:"ÙØ±Ø² استرشاد٠ÙÙÙ Ø§ÙØªØ®ØµØµ ÙØ§ÙÙ
ÙÙØ¹Ø راجع Ù٠رابط ÙÙ
ØªØ·ÙØ¨Ø§ØªÙ ÙØ¨Ù اتخاذ Ø£Ù ÙØ±Ø§Ø±."})]}),t.jsx("div",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"divide-y divide-ink/10",children:l.length===0?t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"p-6 text-sm text-ink-soft",children:"Ø³ØªØ¸ÙØ± ÙÙØ§ اÙÙØ±Øµ Ø§ÙØ¬Ø¯Ùدة Ø§ÙØªÙ ÙØ¬Ù
Ø¹ÙØ§ Ø§ÙØ¨Ùت بعد Ø£Ù٠تشغÙÙ Ù
جدÙÙ."}):l.map(s=>t.jsx("article",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"p-6",children:t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:31",children:[t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"flex flex-wrap gap-2",children:[t.jsxs("span",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:`px-2 py-1 text-xs font-bold ${s.fit==="strong"?"bg-archive-blue/10 text-archive-blue":s.fit==="conditional"?"bg-sand text-clay":"bg-ink/5 text-ink-soft"}`,children:[s.fit==="strong"?"Ù
Ø·Ø§Ø¨ÙØ© ÙÙÙØ©":s.fit==="conditional"?"Ù
Ø·Ø§Ø¨ÙØ© Ù
Ø´Ø±ÙØ·Ø©":"Ù
Ø·Ø§Ø¨ÙØ© ضعÙÙØ©"," â ",s.matchScore,"/100"]}),t.jsx("span",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"px-2 py-1 text-xs font-bold text-ink-soft",children:s.source})]}),t.jsx("h3",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"mt-3 text-lg font-black text-ink",children:s.title}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"mt-1 text-sm text-ink-soft",children:[s.organization,s.location].filter(
1Boolean).join(" â ")||"Ø§ÙØ¬ÙØ© أ٠اÙÙ
ÙÙØ¹ ØºÙØ± Ù
ØØ¯Ø¯ Ù٠اÙÙØªÙجة"}),t.jsx("p",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"mt-3 max-w-3xl text-sm leading-7 text-ink-soft",children:s.matchReason})]}),t.jsxs("div",{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"flex flex-wrap gap-2",children:[t.jsxs("a",{"data-loc":"client/src/pages/AutomationHub.tsx:31",href:s.sourceUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 border border-ink/20 px-3 py-2 text-sm font-bold text-archive-blue",children:[t.jsx(k,{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"h-4 w-4"})," Ø§ÙØ±Ø§Ø¨Ø· Ø§ÙØ±Ø³Ù
Ù"]}),s.status==="new"&&t.jsxs("button",{"data-loc":"client/src/pages/AutomationHub.tsx:31",disabled:r.isPending,onClick:()=>r.mutate({id:s.id}),className:"inline-flex items-center gap-2 bg-ink px-3 py-2 text-sm font-bold text-paper",children:[t.jsx(d,{"data-loc":"client/src/pages/AutomationHub.tsx:31",className:"h-4 w-4"})," تÙ
ÙØª اÙÙ
راجعة"]})]})]})},s.id))})]})]})})}export{C 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.