ehsan-dashboards/dashboards/VPN_chanel/frontend/.next/server/app/page.js

1 line
No EOL
68 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var e={};e.id=931,e.ids=[931],e.modules={2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4412:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>n.a,__next_app__:()=>m,originalPathname:()=>c,pages:()=>x,routeModule:()=>h,tree:()=>o}),s(908),s(1506),s(5866);var l=s(3191),a=s(8716),r=s(7922),n=s.n(r),i=s(5231),d={};for(let e in i)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>i[e]);s.d(t,d);let o=["",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,908)),"/workspace/personal/dashboards/VPN_chanel/frontend/app/page.tsx"]}]},{layout:[()=>Promise.resolve().then(s.bind(s,1506)),"/workspace/personal/dashboards/VPN_chanel/frontend/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(s.t.bind(s,5866,23)),"next/dist/client/components/not-found-error"]}],x=["/workspace/personal/dashboards/VPN_chanel/frontend/app/page.tsx"],c="/page",m={require:s,loadChunk:()=>Promise.resolve()},h=new l.AppPageRouteModule({definition:{kind:a.x.APP_PAGE,page:"/page",pathname:"/",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},3156:()=>{},9062:(e,t,s)=>{Promise.resolve().then(s.bind(s,8743))},6376:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,2994,23)),Promise.resolve().then(s.t.bind(s,6114,23)),Promise.resolve().then(s.t.bind(s,9727,23)),Promise.resolve().then(s.t.bind(s,9671,23)),Promise.resolve().then(s.t.bind(s,1868,23)),Promise.resolve().then(s.t.bind(s,4759,23))},8743:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var l=s(326),a=s(7577);let r=({text:e})=>(0,l.jsxs)("span",{className:"info-tooltip-wrap inline-flex items-center justify-center mr-1.5 align-middle",children:[l.jsx("span",{className:"info-icon-btn",children:"i"}),l.jsx("span",{className:"info-tooltip-content",children:e})]});function n(){let[e,t]=(0,a.useState)("charts"),[s,n]=(0,a.useState)(null),[i,d]=(0,a.useState)([]),[o,x]=(0,a.useState)([]),[c,m]=(0,a.useState)("all"),[h,b]=(0,a.useState)(""),[p,u]=(0,a.useState)(!0),[g,j]=(0,a.useState)(!1),[f,N]=(0,a.useState)(null),[v,w]=(0,a.useState)(!1),[y,D]=(0,a.useState)(null),[k,_]=(0,a.useState)([]),[C,S]=(0,a.useState)("gemini"),[P,$]=(0,a.useState)(!1),V=o.filter(e=>"queued"===e.status||"publishing"===e.status),T=o.filter(e=>"success"===e.status||"published"===e.status),[F,E]=(0,a.useState)(null),[A,O]=(0,a.useState)(""),[q,B]=(0,a.useState)("سرویس اینترنت پرسرعت و پایدار"),[R,G]=(0,a.useState)("سرورهای ابری اروپا"),[I,L]=(0,a.useState)(!1),[M,z]=(0,a.useState)(null),[H,J]=(0,a.useState)(!1),[K,U]=(0,a.useState)(!1),[Q,W]=(0,a.useState)(!1),[X,Y]=(0,a.useState)("smart_random"),[Z,ee]=(0,a.useState)(""),[et,es]=(0,a.useState)(null),[el,ea]=(0,a.useState)(""),[er,en]=(0,a.useState)(null),ei=async()=>{try{u(!0);let[e,t,s]=await Promise.all([fetch("/api/v1/stats"),fetch("/api/v1/drafts?status=pending&limit=30"),fetch("/api/v1/queue")]);e.ok&&n(await e.json()),t.ok&&d(await t.json()),s.ok&&x(await s.json()),await ed(C)}catch(e){console.error("Failed to load data:",e)}finally{u(!1)}},ed=async(e=C)=>{try{let t=await fetch(`/api/v1/banner-pool?category=${e}`);if(t.ok){let e=await t.json();_(e.banners||[])}}catch(e){console.error("Failed to load banner pool:",e)}},eo=async e=>{if(e&&0!==e.length){$(!0);try{for(let t=0;t<e.length;t++){let s=new FormData;s.append("file",e[t]),await fetch(`/api/v1/banner-pool/upload?category=${C}`,{method:"POST",body:s})}await ed(C),D(`${e.length} بنر با موفقیت به استخر ${"gemini"===C?"Gemini":"VPN"} اضافه شد.`)}catch(e){alert("خطا در آپلود بنر به استخر.")}finally{$(!1)}}},ex=async e=>{if(confirm("آیا از حذف این بنر از استخر اطمینان دارید؟"))try{(await fetch(`/api/v1/banner-pool/${C}/${e}`,{method:"DELETE"})).ok&&(await ed(C),D("بنر از استخر حذف شد."))}catch(e){alert("خطا در حذف بنر.")}},ec=async()=>{try{j(!0),D("در حال اسکرپ و استخراج پست‌های جدید از کانال‌های پرطرفدار...");let e=await fetch("/api/v1/pipeline/run-now");if(e.ok){let t=await e.json();D(`عملیات با موفقیت پایان یافت: ${t.new_posts} پست جدید و ${t.drafts_generated} پیش‌نویس هوشمند افزوده شد.`),await ei()}else D("خطا در اجرای فرآیند استخراج.")}catch(e){D("خطا در اتصال به سرور.")}finally{j(!1),setTimeout(()=>D(null),5e3)}},em=async e=>{try{N(e),D("هوش مصنوعی 9Router در حال کیوریشن و تولید بنر اختصاصی...");let s=await fetch(`/api/v1/raw-posts/${e}/create-draft`,{method:"POST"});if(s.ok){let e=await s.json();D("پیش‌نویس با موفقیت تولید شد و به تب استودیو افزوده گردید."),await ei(),t("drafts"),E(e),O(e.current_text)}}catch(e){D("خطا در تولید پیش‌نویس هوشمند.")}finally{N(null),setTimeout(()=>D(null),4e3)}},eh=async(e,t,s,l,a,r)=>{try{let n={action:t?"edit_approve":"approve",text:t,remove_banner:l??!1,banner_image_url:s};a?n.scheduled_time=new Date().toISOString():r&&(n.scheduled_time=new Date(r).toISOString());let i=await fetch(`/api/v1/drafts/${e}/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(i.ok)D("پیش‌نویس تایید و با زمان‌بندی انتخاب‌شده به صف ارسال افزوده شد."),E(null),await ei();else{let e=await i.json().catch(()=>({}));D(`خطا در تایید پیش‌نویس: ${e.detail||i.statusText}`)}}catch(e){D("خطا در تایید پیش‌نویس.")}},eb=async e=>{try{U(!0);let t=new FormData;t.append("file",e);let s=await fetch("/api/v1/upload-banner",{method:"POST",body:t});if(s.ok){let e=await s.json();z(e.banner_url),J(!1),F&&E({...F,banner_image_url:e.banner_url}),D("بنر اختصاصی شما با موفقیت آپلود شد و جایگزین گردید.")}else D("خطا در آپلود بنر. لطفاً یک فایل عکس معتبر انتخاب کنید.")}catch(e){D("خطا در ارتباط با سرور.")}finally{U(!1)}},ep=async e=>{try{(await fetch(`/api/v1/drafts/${e}/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"reject",rejection_reason:"رد توسط ناظر انسانی"})})).ok&&(D("پیش‌نویس رد شد و بازخورد جهت یادگیری مدل ثبت گردید."),E(null),await ei())}catch(e){D("خطا در رد پیش‌نویس.")}},eu=async()=>{try{L(!0);let e=await fetch("/api/v1/generate-banner",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:q,location:R})});if(e.ok){let t=await e.json();F&&E({...F,banner_image_url:t.banner_url}),z(t.banner_url),D("بنر گرافیکی جدید با موفقیت تولید و جایگزین شد.")}}catch(e){D("خطا در تولید بنر گرافیکی.")}finally{L(!1)}},eg=async()=>{try{w(!0);let e=await fetch("/api/v1/pipeline/dispatch-now",{method:"POST"});if(e.ok){let t=await e.json();D(`تعداد ${t.published_count} پست با موفقیت به کانال تلگرام ارسال شد.`),await ei()}else D("خطا در فراخوانی ارسال فوری صف.")}catch(e){D("خطا در ارسال صف تلگرام.")}finally{w(!1),setTimeout(()=>D(null),5e3)}},ej=async e=>{try{w(!0);let t=await fetch(`/api/v1/queue/${e}/send-now`,{method:"POST"});if(t.ok)D("پست با موفقیت به کانال رسمی تلگرام ارسال شد."),await ei();else{let e=await t.json();D(`خطا در ارسال: ${e.detail||"نامشخص"}`)}}catch(e){D("خطا در برقراری ارتباط با سرور ارسال.")}finally{w(!1),setTimeout(()=>D(null),5e3)}},ef=async e=>{try{let t=await fetch(`/api/v1/queue/${e}/randomize`,{method:"POST"});if(t.ok){let e=await t.json();D(`زمان انتشار به صورت تصادفی در بازه ساعت ۱۶ تا ۲۰ تنظیم شد: ${new Date(e.scheduled_time).toLocaleString("fa-IR")}`),await ei()}else D("خطا در رندوم‌سازی زمان انتشار.")}catch{D("خطا در ارتباط با سرور.")}},eN=async(e,t)=>{if(t)try{(await fetch(`/api/v1/queue/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({scheduled_time:new Date(t).toISOString()})})).ok?(D("زمان انتشار پست با موفقیت تغییر یافت."),es(null),await ei()):D("خطا در تغییر زمان انتشار.")}catch{D("خطا در برقراری ارتباط با سرور.")}},ev=async()=>{try{let e=await fetch("/api/v1/queue/rebalance-random",{method:"POST"});if(e.ok){let t=await e.json();D(`تعداد ${t.rebalanced} پست در صف با زمان‌های تصادفی بین ساعت ۱۶ تا ۲۰ عصر روزهای متوالی چیده شدند.`),await ei()}else D("خطا در بازتنظیم تصادفی صف.")}catch{D("خطا در ارتباط با سرور.")}},ew=async e=>{if(confirm("آیا مطمئن هستید که می‌خواهید این پست را از صف حذف کرده و به وضعیت پیش‌نویس بازگردانید؟"))try{(await fetch(`/api/v1/queue/${e}`,{method:"DELETE"})).ok?(D("پست از صف حذف شد و به لیست پیش‌نویس‌ها بازگشت."),await ei()):D("خطا در حذف از صف.")}catch{D("خطا در ارتباط با سرور.")}},[ey,eD]=(0,a.useState)("newest"),ek=("newest"===ey?s?.latest_posts||s?.top_viral_posts||[]:s?.top_viral_posts||[]).filter(e=>{let t="all"===c||e.channel_handle===c,s=!h||e.text.toLowerCase().includes(h.toLowerCase());return t&&s});return(0,l.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-6",children:[y&&(0,l.jsxs)("div",{className:"fixed bottom-6 left-6 z-50 bg-[#0F172A] text-white px-5 py-3 rounded-xl shadow-2xl border border-sky-500/40 flex items-center gap-3",children:[l.jsx("span",{className:"text-sky-400 text-lg",children:"ℹ️"}),l.jsx("span",{className:"text-sm font-medium",children:y})]}),(0,l.jsxs)("header",{className:"bg-white border border-slate-200 rounded-2xl p-5 mb-6 shadow-sm flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-4",children:[l.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-tr from-sky-600 to-cyan-500 text-white flex items-center justify-center font-extrabold text-2xl shadow-md shadow-sky-500/20",children:"⚡️"}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[l.jsx("h1",{className:"text-xl font-bold text-slate-900",children:"رادار جامع تلگرام و کیوریشن محتوای NetVibe VPN"}),l.jsx(r,{text:"مرکز تجمیع، فیلتر، بازآفرینی با هوش مصنوعی 9Router و انتشار خودکار سرورهای V2Ray روی برند مقصد @NetVibe_VPN."})]}),(0,l.jsxs)("p",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1 text-emerald-600 font-semibold",children:[l.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),"وضعیت: اتصال مستقیم 9Router & Traefik"]}),l.jsx("span",{children:"•"}),(0,l.jsxs)("span",{children:["برند مقصد: ",l.jsx("strong",{className:"text-sky-600",children:"@NetVibe_VPN"})]})]})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("button",{onClick:ec,disabled:g,className:"px-4 py-2.5 rounded-xl bg-sky-600 hover:bg-sky-700 text-white text-sm font-semibold shadow-sm transition-all flex items-center gap-2 disabled:opacity-50",children:[l.jsx("span",{children:g?"\uD83D\uDD04":"⚡️"}),l.jsx("span",{children:g?"در حال پایش...":"پایش بلادرنگ کانال‌ها"})]}),(0,l.jsxs)("button",{onClick:eg,disabled:v,className:"px-4 py-2.5 rounded-xl bg-emerald-600 hover:bg-emerald-700 text-white text-sm font-semibold shadow-sm transition-all flex items-center gap-2 disabled:opacity-50",children:[l.jsx("span",{children:"\uD83D\uDE80"}),l.jsx("span",{children:"ارسال فوری صف به تلگرام"})]})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-3 mb-6",children:[(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-500 font-medium mb-1",children:[l.jsx("span",{children:"کانال‌های تحت رصد"}),l.jsx(r,{text:"تعداد کل کانال‌های میلیونی تلگرامی فعال در پایپ‌لاین اسکرپینگ."})]}),l.jsx("div",{className:"text-2xl font-extrabold text-slate-900 tnum",children:s?.total_channels||0}),l.jsx("div",{className:"text-[11px] text-emerald-600 font-semibold mt-1",children:"۱۰۰٪ فعال"})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-500 font-medium mb-1",children:[l.jsx("span",{children:"مخاطب تحت پوشش"}),l.jsx(r,{text:"مجموع شمار اعضای کانال‌های سورس رصدشده در تلگرام بر اساس داده‌های زنده."})]}),(0,l.jsxs)("div",{className:"text-2xl font-extrabold text-sky-600 tnum",children:[((s?.total_subscribers||0)/1e3).toLocaleString("fa-IR"),"K+"]}),l.jsx("div",{className:"text-[11px] text-slate-500 mt-1",children:"جامعه آماری رقبا"})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-500 font-medium mb-1",children:[l.jsx("span",{children:"پست‌های استخراج‌شده"}),l.jsx(r,{text:"تعداد کل پست‌ها و کانفیگ‌های خامی که توسط Agent A استخراج و ذخیره شده است."})]}),l.jsx("div",{className:"text-2xl font-extrabold text-slate-900 tnum",children:s?.total_raw_posts||0}),l.jsx("div",{className:"text-[11px] text-sky-600 mt-1",children:"آماده کیوریشن"})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-500 font-medium mb-1",children:[l.jsx("span",{children:"پیش‌نویس‌های AI"}),l.jsx(r,{text:"پست‌های بازآفرینی‌شده توسط هوش مصنوعی با لحن فارسی صمیمی و بنر گرافیکی."})]}),l.jsx("div",{className:"text-2xl font-extrabold text-purple-600 tnum",children:i.length}),l.jsx("div",{className:"text-[11px] text-purple-600 mt-1",children:"نیاز به بازبینی"})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-500 font-medium mb-1",children:[l.jsx("span",{children:"صف انتشار (Queue)"}),l.jsx(r,{text:"محتواهای تاییدشده که آماده ارسال خودکار به تلگرام هستند."})]}),l.jsx("div",{className:"text-2xl font-extrabold text-amber-600 tnum",children:V.length}),l.jsx("div",{className:"text-[11px] text-amber-600 mt-1",children:"در انتظار ارسال"})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-500 font-medium mb-1",children:[l.jsx("span",{children:"منتشر شده در کانال"}),l.jsx(r,{text:"پست‌هایی که با موفقیت روی کانال @NetVibe_VPN ارسال شده و ثبت شده‌اند."})]}),l.jsx("div",{className:"text-2xl font-extrabold text-emerald-600 tnum",children:T.length}),l.jsx("div",{className:"text-[11px] text-emerald-600 mt-1",children:"با موفقیت ثبت شد"})]})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-2 mb-6 shadow-sm flex items-center gap-2 overflow-x-auto",children:[(0,l.jsxs)("button",{onClick:()=>t("charts"),className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"charts"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"\uD83D\uDCC8"}),l.jsx("span",{children:"نمودارهای تحلیلی و ترافیک"}),l.jsx(r,{text:"تحلیل توزیع ساعات انتشار، پروتکل‌های محبوب و سهم کانال‌ها."})]}),(0,l.jsxs)("button",{onClick:()=>t("viral"),className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"viral"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"\uD83D\uDD25"}),(0,l.jsxs)("span",{children:["پست‌های وایرال و کانفیگ‌های برتر (",s?.top_viral_posts.length||0,")"]}),l.jsx(r,{text:"پست‌های پربازدید رقبا همراه با دکمه تبدیل با هوش مصنوعی و تولید خودکار بنر."})]}),(0,l.jsxs)("button",{onClick:()=>t("drafts"),className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"drafts"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"\uD83C\uDFAF"}),(0,l.jsxs)("span",{children:["استودیو پیش‌نویس‌ها و بنرها (",i.length,")"]}),l.jsx(r,{text:"شبیه‌ساز چت تلگرام، تایید و ویرایش متن‌های هوش مصنوعی و بنرهای گرافیکی."})]}),(0,l.jsxs)("button",{onClick:()=>t("queue"),className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"queue"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"\uD83D\uDE80"}),(0,l.jsxs)("span",{children:["صف انتشار (",V.length,")"]}),l.jsx(r,{text:"پست‌های زمان‌بندی‌شده و در نوبت ارسال خودکار به تلگرام."})]}),(0,l.jsxs)("button",{onClick:()=>t("published"),className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"published"===e?"bg-emerald-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"✅"}),(0,l.jsxs)("span",{children:["منتشر شده در کانال (",T.length,")"]}),l.jsx(r,{text:"آرشیو پست‌های ارسال‌شده به کانال تلگرام با تاریخ، تصویر و شناسه پیام."})]}),(0,l.jsxs)("button",{onClick:()=>{t("banners"),ed(C)},className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"banners"===e?"bg-purple-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"\uD83D\uDDBC️"}),(0,l.jsxs)("span",{children:["مخزن بنرها (",k.length,")"]}),l.jsx(r,{text:"مدیریت استخر بنرهای Gemini و VPN جهت انتخاب هوشمند و رندوم در پست‌ها."})]}),(0,l.jsxs)("button",{onClick:()=>t("channels"),className:`px-4 py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center gap-2 whitespace-nowrap ${"channels"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"}`,children:[l.jsx("span",{children:"\uD83D\uDCE1"}),(0,l.jsxs)("span",{children:["کانال‌های پایش (",s?.channels.length||0,")"]}),l.jsx(r,{text:"فهرست کانال‌های میلیونی تلگرام جهت پایش مداوم کانفیگ و محتوا."})]})]}),"charts"===e&&(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"ساعات اوج انتشار کانفیگ و پست‌ها (Peak Hours)"}),l.jsx(r,{text:"شمار پست‌های منتشرشده در طول شبانه‌روز جهت تعیین بهترین زمان برای انتشار پست در تلگرام."})]}),l.jsx("span",{className:"text-xs bg-sky-50 text-sky-700 px-2.5 py-1 rounded-full font-semibold",children:"۲۴ ساعته"})]}),l.jsx("div",{className:"h-56 flex items-end gap-1.5 pt-6 pb-2 border-b border-slate-100",children:(s?.hourly_distribution||[]).map((e,t)=>{let a=Math.max(...s?.hourly_distribution.map(e=>e.count)||[1],1),r=Math.max(e.count/a*100,6);return(0,l.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1 group relative",children:[(0,l.jsxs)("div",{className:"absolute -top-7 opacity-0 group-hover:opacity-100 transition-opacity bg-slate-900 text-white text-[10px] px-1.5 py-0.5 rounded shadow pointer-events-none whitespace-nowrap z-10 tnum",children:["ساعت ",e.hour,": ",e.count," پست"]}),l.jsx("div",{style:{height:`${r}%`},className:`w-full rounded-t-sm transition-all duration-300 ${e.count>0?"bg-sky-500 hover:bg-sky-600":"bg-slate-100"}`}),t%4==0&&l.jsx("span",{className:"text-[10px] text-slate-400 tnum",children:e.hour.split(":")[0]})]},t)})}),l.jsx("p",{className:"text-xs text-slate-500 mt-3",children:"\uD83D\uDCA1 ساعات اوج اشتراک کانفیگ در کانال‌ها معمولاً در بازه‌های ۱۲:۰۰ الی ۱۴:۰۰ و ۲۰:۰۰ الی ۲۳:۰۰ است."})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"توزیع پروتکل‌های فیلترشکن در پست‌ها"}),l.jsx(r,{text:"درصد سهم کانفیگ‌های استخراج‌شده بر اساس پروتکل VLESS, VMESS, TROJAN, SHADOWSOCKS."})]}),l.jsx("span",{className:"text-xs bg-purple-50 text-purple-700 px-2.5 py-1 rounded-full font-semibold",children:"پروتکل‌ها"})]}),l.jsx("div",{className:"space-y-3 pt-2",children:(s?.protocol_distribution||[]).map((e,t)=>{let a=s?.protocol_distribution.reduce((e,t)=>e+t.count,0)||1,r=Math.round(e.count/a*100),n=["bg-sky-500","bg-purple-500","bg-emerald-500","bg-amber-500","bg-rose-500","bg-slate-400"];return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between text-xs font-semibold text-slate-700 mb-1",children:[l.jsx("span",{children:e.protocol}),(0,l.jsxs)("span",{className:"tnum",children:[e.count," کانفیگ (",r,"٪)"]})]}),l.jsx("div",{className:"w-full bg-slate-100 h-2.5 rounded-full overflow-hidden",children:l.jsx("div",{style:{width:`${r}%`},className:`h-full rounded-full transition-all duration-500 ${n[t%n.length]}`})})]},t)})}),l.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"\uD83D\uDCA1 پروتکل VLESS Reality بالاترین سهم و بیشترین دوام را در شرایط اختلالات اینترنت ثبت کرده است."})]})]}),(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"جدول تحلیلی کانال‌های مرجع و سهم مخاطبان"}),l.jsx(r,{text:"بررسی دقیق تعداد مخاطبان، حوزه تخصصی و وضعیت اتصال زنده هر سورس تلگرام."})]}),l.jsx("span",{className:"text-xs text-slate-500",children:"منبع: تلگرام عمومی t.me/s"})]}),l.jsx("div",{className:"overflow-x-auto",children:(0,l.jsxs)("table",{className:"w-full text-right text-sm",children:[l.jsx("thead",{children:(0,l.jsxs)("tr",{className:"border-b border-slate-200 text-xs text-slate-500 bg-slate-50/50",children:[l.jsx("th",{className:"py-3 px-4 font-bold",children:"کانال و شناسه"}),l.jsx("th",{className:"py-3 px-4 font-bold",children:"حوزه و تخصص"}),l.jsx("th",{className:"py-3 px-4 font-bold",children:"تعداد اعضا (Subscribers)"}),l.jsx("th",{className:"py-3 px-4 font-bold",children:"وضعیت پایش"}),l.jsx("th",{className:"py-3 px-4 font-bold text-center",children:"لینک مستقیم"})]})}),l.jsx("tbody",{className:"divide-y divide-slate-100 font-medium",children:(s?.channels||[]).map((e,t)=>(0,l.jsxs)("tr",{className:"hover:bg-slate-50/60 transition-colors",children:[(0,l.jsxs)("td",{className:"py-3.5 px-4 flex items-center gap-3",children:[l.jsx("span",{className:"w-8 h-8 rounded-lg bg-sky-100 text-sky-700 flex items-center justify-center font-bold text-xs",children:e.handle.slice(0,2).toUpperCase()}),(0,l.jsxs)("div",{children:[l.jsx("div",{className:"font-bold text-slate-900",children:e.title}),(0,l.jsxs)("div",{className:"text-xs text-slate-400",children:["@",e.handle]})]})]}),l.jsx("td",{className:"py-3.5 px-4 text-xs text-slate-600",children:e.niche}),l.jsx("td",{className:"py-3.5 px-4",children:l.jsx("span",{className:"font-bold text-slate-900 tnum",children:e.subscribers>=1e6?`${(e.subscribers/1e6).toFixed(2)}M`:`${(e.subscribers/1e3).toFixed(1)}K`})}),l.jsx("td",{className:"py-3.5 px-4",children:(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-semibold bg-emerald-50 text-emerald-700",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),"پایش زنده"]})}),l.jsx("td",{className:"py-3.5 px-4 text-center",children:l.jsx("a",{href:`https://t.me/${e.handle}`,target:"_blank",rel:"noreferrer",className:"text-xs text-sky-600 hover:text-sky-800 font-semibold underline",children:"مشاهده در تلگرام"})})]},t))})]})})]})]}),"viral"===e&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 w-full md:w-auto",children:[l.jsx("input",{type:"text",placeholder:"جستجو در متن کانفیگ‌ها و پست‌ها...",value:h,onChange:e=>b(e.target.value),className:"px-3.5 py-2 border border-slate-300 rounded-lg text-sm w-full md:w-80 outline-none focus:border-sky-500"}),(0,l.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"px-3 py-2 border border-slate-300 rounded-lg text-sm bg-white outline-none focus:border-sky-500",children:[(0,l.jsxs)("option",{value:"all",children:["همه کانال‌ها (",s?.channels.length,")"]}),(s?.channels||[]).map(e=>(0,l.jsxs)("option",{value:e.handle,children:["@",e.handle]},e.id))]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("div",{className:"flex bg-slate-100 p-1 rounded-lg border border-slate-200 text-xs",children:[l.jsx("button",{onClick:()=>eD("newest"),className:`px-3 py-1.5 rounded-md font-semibold transition-all ${"newest"===ey?"bg-white text-sky-700 shadow-sm":"text-slate-600 hover:text-slate-900"}`,children:"⚡️ جدیدترین‌ها (تازه‌ترین)"}),l.jsx("button",{onClick:()=>eD("views"),className:`px-3 py-1.5 rounded-md font-semibold transition-all ${"views"===ey?"bg-white text-sky-700 shadow-sm":"text-slate-600 hover:text-slate-900"}`,children:"\uD83D\uDD25 بیشترین بازدید"})]}),(0,l.jsxs)("div",{className:"text-xs text-slate-500 mr-2",children:["نمایش ",l.jsx("strong",{className:"text-slate-900 tnum",children:ek.length})," پست"]})]})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:ek.map(e=>(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm flex flex-col justify-between hover:border-sky-300 transition-all",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between pb-3 mb-3 border-b border-slate-100",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-sky-50 text-sky-700 font-bold text-xs",children:["@",e.channel_handle]}),l.jsx("span",{className:"text-xs text-slate-400",children:e.posted_at?new Date(e.posted_at).toLocaleTimeString("fa-IR",{hour:"2-digit",minute:"2-digit"}):""})]}),(0,l.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-bold text-slate-700 tnum",children:[l.jsx("span",{children:"\uD83D\uDC41"}),l.jsx("span",{children:e.views.toLocaleString("fa-IR")})]})]}),l.jsx("p",{className:"text-xs text-slate-800 whitespace-pre-wrap line-clamp-6 leading-relaxed mb-4 dir-rtl",children:e.text||"(فقط رسانه منتشر شده)"})]}),(0,l.jsxs)("div",{className:"pt-3 border-t border-slate-100 flex items-center justify-between",children:[l.jsx("a",{href:e.post_url,target:"_blank",rel:"noreferrer",className:"text-xs text-slate-500 hover:text-sky-600 transition-colors",children:"\uD83D\uDD17 پست اصلی"}),(0,l.jsxs)("button",{onClick:()=>em(e.id),disabled:f===e.id,className:"px-3.5 py-1.5 rounded-lg bg-sky-600 hover:bg-sky-700 text-white text-xs font-semibold transition-all flex items-center gap-1.5 disabled:opacity-50",children:[l.jsx("span",{children:f===e.id?"⏳":"⚡️"}),l.jsx("span",{children:f===e.id?"در حال تبدیل هوشمند...":"تبدیل به پست NetVibe + بنر"})]})]})]},e.id))})]}),"drafts"===e&&(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"bg-sky-50 border border-sky-200 rounded-2xl p-4 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-2xl",children:"\uD83C\uDFAF"}),(0,l.jsxs)("div",{children:[l.jsx("h3",{className:"text-sm font-bold text-sky-900",children:"استودیو بازآفرینی و تایید نهایی پست‌ها"}),l.jsx("p",{className:"text-xs text-sky-700",children:"متن‌ها بر اساس هویت و تعرفه‌های رسمی کانال @NetVibe_VPN آماده و بنرهای نئونی اختصاصی برای آنها طراحی شده است."})]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2 w-full sm:w-auto justify-start sm:justify-end",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 bg-slate-900 border border-slate-700 rounded-xl px-2 py-1",children:[l.jsx("span",{className:"text-[11px] text-purple-300 font-bold",children:"\uD83C\uDFAF زاویه محتوا:"}),(0,l.jsxs)("select",{id:"geminiAngleSelect",defaultValue:"",className:"bg-transparent text-xs text-white outline-none cursor-pointer",title:"زاویه مخاطب هدف",children:[l.jsx("option",{value:"",className:"bg-slate-900 text-white",children:"\uD83C\uDFB2 تنوع تصادفی و هوشمند"}),l.jsx("option",{value:"discount_999k_holo_6gmail",className:"bg-slate-900 text-amber-400 font-bold",children:"\uD83D\uDD25 آفر ۹۹۹.۰۰۰ تومان (۱۸ ماهه + ۶ جیمیل)"}),l.jsx("option",{value:"discount_1200k_robot_6gmail",className:"bg-slate-900 text-yellow-300 font-bold",children:"\uD83D\uDC8E آفر ۱.۲۰۰.۰۰۰ تومان (۱۸ ماهه + ۶ جیمیل)"}),l.jsx("option",{value:"programmers_coders",className:"bg-slate-900 text-white",children:"\uD83D\uDCBB برنامه‌نویسان و کدرها"}),l.jsx("option",{value:"researchers_students",className:"bg-slate-900 text-white",children:"\uD83D\uDCDA دانشجویان و پژوهشگران"}),l.jsx("option",{value:"content_creators_marketers",className:"bg-slate-900 text-white",children:"\uD83D\uDE80 تولیدکنندگان محتوا و ادمین‌ها"}),l.jsx("option",{value:"team_6gmails_agency",className:"bg-slate-900 text-white",children:"\uD83C\uDF10 پکیج ۶ جیمیل (چند سطحی)"}),l.jsx("option",{value:"business_executive_productivity",className:"bg-slate-900 text-white",children:"\uD83D\uDCCA مدیران و بیزینس"}),l.jsx("option",{value:"gemini_vs_chatgpt",className:"bg-slate-900 text-white",children:"⚡️ مقایسه با ChatGPT Plus"})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-1 bg-slate-900 border border-slate-700 rounded-xl px-2 py-1",children:[l.jsx("span",{className:"text-[11px] text-amber-300 font-bold",children:"⏳ مهلت:"}),(0,l.jsxs)("select",{id:"geminiHoursSelect",defaultValue:"48",className:"bg-transparent text-xs text-white outline-none cursor-pointer",title:"مهلت تخفیف ۶۰۰ تومانی",children:[l.jsx("option",{value:"24",className:"bg-slate-900 text-white",children:"۲۴ ساعت (فوری)"}),l.jsx("option",{value:"48",className:"bg-slate-900 text-white",children:"۴۸ ساعت (استاندارد)"}),l.jsx("option",{value:"72",className:"bg-slate-900 text-white",children:"۷۲ ساعت (۳ روز)"}),l.jsx("option",{value:"120",className:"bg-slate-900 text-white",children:"۵ روز (پایان هفته)"})]})]}),(0,l.jsxs)("button",{onClick:async()=>{try{let e=document.getElementById("geminiAngleSelect")?.value||"",t=document.getElementById("geminiHoursSelect")?.value||"48",s=new URLSearchParams;s.set("is_flash_sale","true"),e&&s.set("angle_id",e),s.set("hours_remaining",t),D("در حال تولید پست هدفمند Gemini Pro با بنر اختصاصی..."),(await fetch(`/api/v1/drafts/create-gemini-promo?${s.toString()}`,{method:"POST"})).ok&&(await ei(),D("پیش‌نویس هدفمند Gemini Pro با زمان‌بندی انقضا و بنر اختصاصی با موفقیت افزوده شد."))}catch(e){console.error(e)}},className:"text-xs font-bold bg-gradient-to-r from-purple-600 via-indigo-600 to-purple-700 hover:opacity-95 text-white px-3 py-2 rounded-xl shadow-sm transition-all flex items-center gap-1.5",children:[l.jsx("span",{children:"✦"}),l.jsx("span",{children:"تولید پست Gemini Pro"})]}),(0,l.jsxs)("button",{onClick:async()=>{try{D("در حال تولید پیش‌نویس‌های متنوع با استراتژی‌های بازاریابی مختلف...");let e=await fetch("/api/v1/drafts/generate-marketing-batch",{method:"POST"});if(e.ok){let t=await e.json();await ei(),D(`${t.count||6} پیش‌نویس جدید با زوایای مارکتینگی متنوع افزوده شد.`)}}catch(e){console.error(e)}},className:"text-xs font-bold bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-700 hover:to-teal-700 text-white px-3 py-2 rounded-xl shadow-sm transition-all flex items-center gap-1.5",children:[l.jsx("span",{children:"\uD83D\uDE80"}),l.jsx("span",{children:"تولید دسته مارکتینگ (VPN + Gemini)"})]}),(0,l.jsxs)("span",{className:"text-xs font-bold bg-white text-sky-700 px-3 py-2 rounded-xl border border-sky-200 tnum",children:[i.length," در انتظار"]})]})]}),0===i.length?(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-12 text-center",children:[l.jsx("div",{className:"text-4xl mb-3",children:"☕️"}),l.jsx("h4",{className:"text-base font-bold text-slate-800",children:"پیش‌نویس جدیدی در انتظار نیست"}),l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"برای تولید پیش‌نویس هوشمند، از تب \xabپست‌های وایرال\xbb روی دکمه \xabتبدیل به پست NetVibe\xbb کلیک کنید."})]}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:i.map(e=>(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden shadow-sm flex flex-col justify-between",children:[e.banner_image_url&&(0,l.jsxs)("div",{className:"relative border-b border-slate-200 bg-slate-950 flex flex-col items-center justify-center group",children:[l.jsx("img",{src:e.banner_image_url,alt:"NetVibe Banner",onClick:()=>en(e.banner_image_url||null),className:"w-full max-h-80 object-contain p-2 cursor-pointer transition-transform duration-200 group-hover:scale-[1.01]",title:"جهت مشاهده اندازه واقعی و کامل کلیک کنید"}),(0,l.jsxs)("div",{className:"absolute top-2 left-2 flex items-center gap-1.5",children:[(0,l.jsxs)("button",{onClick:()=>en(e.banner_image_url||null),className:"bg-black/75 hover:bg-black/90 backdrop-blur-md text-white text-[11px] px-2.5 py-1 rounded-lg font-semibold flex items-center gap-1 transition-all shadow-md",children:[l.jsx("span",{children:"\uD83D\uDD0D"}),l.jsx("span",{children:"مشاهده سایز اصلی"})]}),(0,l.jsxs)("button",{onClick:()=>eh(e.id,void 0,null,!0),title:"حذف بنر این پیش‌نویس و تبدیل آن به پست متنی",className:"bg-rose-600/90 hover:bg-rose-700 backdrop-blur-md text-white text-[11px] px-2.5 py-1 rounded-lg font-semibold flex items-center gap-1 transition-all shadow-md border border-rose-500",children:[l.jsx("span",{children:"\uD83D\uDDD1️"}),l.jsx("span",{children:"حذف بنر (متنی)"})]})]})]}),(0,l.jsxs)("div",{className:"p-5 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-slate-400 mb-3 pb-2 border-b border-slate-100",children:[(0,l.jsxs)("span",{children:["کانال مقصد: ",l.jsx("strong",{className:"text-sky-600",children:"@NetVibe_VPN"})]}),l.jsx("span",{className:"tnum",children:new Date(e.created_at).toLocaleTimeString("fa-IR")})]}),l.jsx("div",{className:"bg-slate-50/70 p-4 rounded-xl border border-slate-100 text-xs text-slate-800 whitespace-pre-wrap leading-relaxed font-sans select-all",children:e.current_text})]}),(0,l.jsxs)("div",{className:"p-4 bg-slate-50 border-t border-slate-200 flex items-center justify-between gap-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>{E(e),O(e.current_text),J(!e.banner_image_url),z(e.banner_image_url||null),W(!1)},className:"px-3 py-1.5 rounded-lg border border-slate-300 hover:bg-white text-xs font-semibold text-slate-700 transition-all",children:"✏️ ویرایش متن یا بنر"}),l.jsx("button",{onClick:()=>ep(e.id),className:"px-3 py-1.5 rounded-lg border border-rose-200 text-rose-600 hover:bg-rose-50 text-xs font-semibold transition-all",children:"رد کردن"})]}),(0,l.jsxs)("button",{onClick:()=>eh(e.id,void 0,e.banner_image_url,!1),className:"px-4 py-1.5 rounded-lg bg-emerald-600 hover:bg-emerald-700 text-white text-xs font-bold transition-all shadow-sm flex items-center gap-1.5",children:[l.jsx("span",{children:"✓"}),l.jsx("span",{children:"تایید و انتقال به صف"})]})]})]},e.id))})]}),"queue"===e&&l.jsx("div",{className:"space-y-6",children:(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"صف انتشار خودکار به تلگرام"}),l.jsx(r,{text:"پست‌های تاییدشده که در نوبت ارسال زمان‌بندی‌شده قرار دارند یا آماده ارسال فوری هستند."})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("button",{onClick:ev,disabled:v||0===V.length,className:"px-3.5 py-2 bg-indigo-50 hover:bg-indigo-100 text-indigo-700 border border-indigo-200 text-xs font-bold rounded-xl shadow-sm transition-all flex items-center gap-1.5 disabled:opacity-50",title:"تنظیم خودکار تمام پست‌ها با زمان‌های تصادفی بین ساعت ۱۶ تا ۲۰ عصر روزهای متوالی",children:l.jsx("span",{children:"\uD83C\uDFB2 بازتنظیم تصادفی کل صف (۱۶ تا ۲۰)"})}),l.jsx("button",{onClick:eg,disabled:v||0===V.length,className:"px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white text-xs font-bold rounded-xl shadow-sm transition-all disabled:opacity-50",children:v?"در حال ارسال...":"ارسال فوری موارد آماده"})]})]}),(0,l.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 text-xs text-amber-900 mb-6 flex items-start gap-3",children:[l.jsx("span",{className:"text-lg",children:"\uD83D\uDCA1"}),(0,l.jsxs)("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-bold",children:"نحوه کارکرد صف و زمان‌بندی انتشار:"}),(0,l.jsxs)("p",{children:["۱. پست‌های تاییدشده به صورت خودکار و هوشمند در ساعات اوج بازدید تلگرام (",l.jsx("strong",{children:"بین ساعت ۱۶:۰۰ تا ۲۰:۰۰ عصر به وقت تهران"}),") با زمان‌های رندوم در روزهای متوالی چیده می‌شوند."]}),l.jsx("p",{children:"۲. برای هر پست در صف می‌توانید زمان آن را دستی تغییر دهید، به طور تصادفی بازتنظیم کنید، فوراً ارسال نمایید یا آن را به پیش‌نویس‌ها برگردانید."}),(0,l.jsxs)("p",{children:["۳. ورکر پس‌زمینه سرور هر ۱ دقیقه صف را چک کرده و به محض فرا رسیدن زمان هر پست، آن را خودکار در کانال ",l.jsx("strong",{children:"@NetVibe_VPN"})," منتشر می‌کند."]})]})]}),0===V.length?(0,l.jsxs)("div",{className:"py-12 text-center text-slate-500 text-xs bg-slate-50 border border-dashed border-slate-200 rounded-xl",children:[l.jsx("span",{className:"text-2xl block mb-2",children:"\uD83C\uDF89"}),"صف انتشار در حال حاضر خالی است. تمامی پست‌های تاییدشده در کانال منتشر شده‌اند.",l.jsx("div",{className:"text-slate-400 mt-1",children:"می‌توانید پست‌های ارسال‌شده را در تب \xab✅ منتشر شده در کانال\xbb مشاهده کنید."})]}):l.jsx("div",{className:"space-y-3",children:V.map(e=>(0,l.jsxs)("div",{className:"border border-amber-200 rounded-xl p-4 bg-amber-50/30",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-4",children:[l.jsx("span",{className:"w-8 h-8 rounded-lg bg-amber-100 text-amber-700 flex items-center justify-center font-bold text-xs shrink-0",children:"⏳"}),(0,l.jsxs)("div",{children:[l.jsx("div",{className:"text-xs font-bold text-slate-900 line-clamp-1 max-w-lg",children:e.draft?.current_text?e.draft.current_text.split("\n")[0]:"پست در انتظار انتشار"}),(0,l.jsxs)("div",{className:"text-[11px] text-slate-500 mt-1 flex flex-wrap items-center gap-2",children:[(0,l.jsxs)("span",{children:["موعد ارسال به وقت ایران: ",l.jsx("strong",{className:"text-amber-800 bg-amber-100/70 px-2 py-0.5 rounded font-mono",children:new Date(e.scheduled_time).toLocaleString("fa-IR")})]}),l.jsx("span",{children:"•"}),(0,l.jsxs)("span",{children:["وضعیت: ",l.jsx("span",{className:"font-semibold text-amber-600",children:e.status})]})]})]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("button",{onClick:()=>ef(e.id),className:"text-xs bg-indigo-50 hover:bg-indigo-100 text-indigo-700 border border-indigo-200 font-medium px-2.5 py-1.5 rounded-lg transition-all flex items-center gap-1",title:"تنظیم تصادفی زمان بین ۱۶ تا ۲۰ عصر",children:l.jsx("span",{children:"\uD83C\uDFB2 زمان رندوم"})}),l.jsx("button",{onClick:()=>{es(et===e.id?null:e.id);let t=new Date(e.scheduled_time),s=e=>e<10?"0"+e:e;ea(`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())}T${s(t.getHours())}:${s(t.getMinutes())}`)},className:"text-xs bg-slate-100 hover:bg-slate-200 text-slate-700 font-medium px-2.5 py-1.5 rounded-lg transition-all flex items-center gap-1",children:l.jsx("span",{children:"✏️ تغییر زمان دستی"})}),l.jsx("button",{onClick:()=>ej(e.id),disabled:v,className:"text-xs bg-emerald-600 hover:bg-emerald-700 text-white font-medium px-3 py-1.5 rounded-lg shadow-sm transition-all flex items-center gap-1 disabled:opacity-50",children:l.jsx("span",{children:"\uD83D\uDE80 ارسال همین حالا"})}),l.jsx("button",{onClick:()=>ew(e.id),className:"text-xs bg-rose-50 hover:bg-rose-100 text-rose-600 border border-rose-200 font-medium px-2.5 py-1.5 rounded-lg transition-all",title:"حذف از صف و بازگشت به پیش‌نویس",children:l.jsx("span",{children:"\uD83D\uDDD1️"})})]})]}),et===e.id&&(0,l.jsxs)("div",{className:"mt-3 pt-3 border-t border-amber-200/60 flex flex-wrap items-center gap-3 bg-white p-3 rounded-lg border",children:[l.jsx("span",{className:"text-xs font-bold text-slate-700",children:"انتخاب تاریخ و ساعت جدید به وقت محلی:"}),l.jsx("input",{type:"datetime-local",value:el,onChange:e=>ea(e.target.value),className:"text-xs px-2.5 py-1.5 bg-slate-50 border border-slate-300 rounded font-mono focus:ring-1 focus:ring-sky-500"}),l.jsx("button",{onClick:()=>eN(e.id,el),className:"text-xs bg-emerald-600 hover:bg-emerald-700 text-white px-3 py-1.5 rounded font-bold",children:"✓ ثبت زمان جدید"}),l.jsx("button",{onClick:()=>es(null),className:"text-xs bg-slate-200 hover:bg-slate-300 text-slate-700 px-3 py-1.5 rounded",children:"انصراف"})]})]},e.id))})]})}),"published"===e&&l.jsx("div",{className:"space-y-6",children:(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"آرشیو و لاگ پست‌های منتشرشده در تلگرام"}),l.jsx(r,{text:"گزارش کامل تمام پیام‌ها و بنرهایی که با موفقیت روی کانال @NetVibe_VPN ارسال و ثبت شده است."})]}),(0,l.jsxs)("span",{className:"text-xs bg-emerald-100 text-emerald-800 font-bold px-3 py-1.5 rounded-full tnum flex items-center gap-1.5",children:[l.jsx("span",{children:"✓"}),(0,l.jsxs)("span",{children:[T.length," پست منتشر شده"]})]})]}),0===T.length?l.jsx("div",{className:"py-12 text-center text-slate-400 text-xs bg-slate-50 border border-dashed border-slate-200 rounded-xl",children:"هنوز هیچ پستی در کانال منتشر نشده است."}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:T.map(e=>(0,l.jsxs)("div",{className:"border border-emerald-200 rounded-2xl overflow-hidden bg-white shadow-sm flex flex-col justify-between",children:[e.draft?.banner_image_url&&(0,l.jsxs)("div",{className:"relative border-b border-slate-100 bg-slate-950 flex flex-col items-center justify-center group",children:[l.jsx("img",{src:e.draft.banner_image_url,alt:"Banner",onClick:()=>en(e.draft?.banner_image_url||null),className:"w-full max-h-72 object-contain p-2 cursor-pointer transition-transform duration-200 group-hover:scale-[1.01]",title:"مشاهده اندازه واقعی بنر"}),l.jsx("div",{className:"absolute top-2 left-2",children:(0,l.jsxs)("button",{onClick:()=>en(e.draft?.banner_image_url||null),className:"bg-black/75 hover:bg-black/90 backdrop-blur-md text-white text-[11px] px-2.5 py-1 rounded-lg font-semibold flex items-center gap-1 shadow-md",children:[l.jsx("span",{children:"\uD83D\uDD0D"}),l.jsx("span",{children:"سایز اصلی"})]})}),l.jsx("span",{className:"absolute top-2 right-2 bg-emerald-600/90 text-white text-[10px] font-bold px-2.5 py-1 rounded-lg backdrop-blur-sm shadow-md",children:"با بنر گرافیکی"})]}),(0,l.jsxs)("div",{className:"p-4 flex-1 flex flex-col justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsxs)("span",{className:"text-xs bg-emerald-50 text-emerald-700 font-bold px-2.5 py-1 rounded-lg border border-emerald-200 flex items-center gap-1",children:[l.jsx("span",{children:"✅"}),l.jsx("span",{children:"منتشر شده در کانال"})]}),e.telegram_msg_id&&(0,l.jsxs)("span",{className:"text-xs font-mono text-slate-500 bg-slate-100 px-2 py-0.5 rounded",children:["ID: #",e.telegram_msg_id]})]}),l.jsx("p",{className:"text-xs text-slate-800 font-medium whitespace-pre-wrap line-clamp-4 leading-relaxed bg-slate-50/70 p-3 rounded-xl border border-slate-100 mb-3 font-sans",children:e.draft?.current_text||"متن پیام"})]}),(0,l.jsxs)("div",{className:"pt-2 border-t border-slate-100 flex items-center justify-between text-[11px] text-slate-400",children:[(0,l.jsxs)("span",{children:["زمان انتشار: ",new Date(e.created_at).toLocaleString("fa-IR")]}),e.telegram_msg_id?(0,l.jsxs)("a",{href:`https://t.me/NetVibe_VPN/${e.telegram_msg_id}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-sky-600 hover:text-sky-800 flex items-center gap-1 bg-sky-50 hover:bg-sky-100 px-2.5 py-1 rounded-lg transition-colors",children:[l.jsx("span",{children:"مشاهده در تلگرام"}),l.jsx("span",{children:"↗"})]}):l.jsx("span",{className:"text-slate-400",children:"ثبت مستقیم"})]})]})]},e.id))})]})}),"banners"===e&&l.jsx("div",{className:"space-y-6",children:(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6 pb-4 border-b border-slate-100",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"مخزن بنرهای گرافیکی (Banner Pool)"}),l.jsx(r,{text:"می‌توانید تا ۱۰ یا بیشتر بنر آماده برای Gemini یا VPN در اینجا آپلود کنید. سیستم به صورت چرخشی و هوشمند از میان این بنرها برای تولید پست‌های تلگرام استفاده می‌کند."})]}),l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"بنرهای آپلود شده در این مخزن، هنگام ساخت پست‌های جدید برای کانال به صورت تصادفی/هوشمند انتخاب می‌شوند."})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full sm:w-auto",children:[(0,l.jsxs)("div",{className:"flex rounded-xl bg-slate-100 p-1 border border-slate-200",children:[l.jsx("button",{onClick:()=>{S("gemini"),ed("gemini")},className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all ${"gemini"===C?"bg-purple-600 text-white shadow-sm":"text-slate-600 hover:text-slate-900"}`,children:"✦ بنرهای Gemini Pro"}),l.jsx("button",{onClick:()=>{S("vpn"),ed("vpn")},className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all ${"vpn"===C?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:text-slate-900"}`,children:"\uD83D\uDEE1️ بنرهای VPN"})]}),(0,l.jsxs)("label",{className:"cursor-pointer px-4 py-2 rounded-xl bg-purple-600 hover:bg-purple-700 text-white text-xs font-bold transition-all flex items-center gap-2 shadow-sm",children:[l.jsx("span",{children:P?"⏳ در حال آپلود...":"➕ آپلود بنر جدید (تکی یا گروهی)"}),l.jsx("input",{type:"file",accept:"image/*",multiple:!0,disabled:P,className:"hidden",onChange:e=>eo(e.target.files)})]})]})]}),0===k.length?(0,l.jsxs)("div",{className:"py-16 text-center border-2 border-dashed border-slate-200 rounded-2xl bg-slate-50/50",children:[l.jsx("div",{className:"text-4xl mb-3",children:"\uD83D\uDDBC️"}),(0,l.jsxs)("h4",{className:"text-sm font-bold text-slate-800",children:["مخزن بنرهای ","gemini"===C?"Gemini Pro":"VPN"," در حال حاضر خالی است"]}),l.jsx("p",{className:"text-xs text-slate-500 mt-1 max-w-md mx-auto",children:"می‌توانید چند بنر آماده خود را آپلود کنید تا سیستم برای هر پست به جای بنر تکراری، یکی از این بنرها را قرار دهد."})]}):l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:k.map(e=>(0,l.jsxs)("div",{className:"group relative border border-slate-200 rounded-xl overflow-hidden bg-slate-950 flex flex-col justify-between shadow-sm hover:shadow-md transition-all",children:[(0,l.jsxs)("div",{className:"relative aspect-square w-full overflow-hidden bg-slate-950 flex items-center justify-center cursor-pointer p-1.5",onClick:()=>en(e.url),title:"کلیک برای مشاهده در اندازه اصلی",children:[l.jsx("img",{src:e.url,alt:e.filename,className:"w-full h-full object-contain group-hover:scale-105 transition-transform duration-300"}),(0,l.jsxs)("span",{className:"absolute top-2 left-2 bg-slate-900/80 text-white text-[10px] font-mono px-2 py-0.5 rounded backdrop-blur-sm",children:[e.size_kb," KB"]}),l.jsx("span",{className:"absolute bottom-2 right-2 bg-black/70 text-white text-[10px] px-2 py-0.5 rounded opacity-0 group-hover:opacity-100 transition-opacity",children:"\uD83D\uDD0D زوم"})]}),(0,l.jsxs)("div",{className:"p-3 bg-white border-t border-slate-100 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] font-medium text-slate-600 truncate max-w-[140px]",title:e.filename,children:e.filename}),l.jsx("button",{onClick:()=>ex(e.filename),className:"text-xs text-rose-500 hover:text-rose-700 p-1 rounded hover:bg-rose-50 transition-colors",title:"حذف بنر از مخزن",children:"\uD83D\uDDD1️"})]})]},e.filename))})]})}),"channels"===e&&l.jsx("div",{className:"space-y-6",children:(0,l.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl p-5 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"کانال‌های میلیونی و معتبر تحت پایش"}),l.jsx(r,{text:"فهرست کانال‌های تلگرام که به عنوان سورس اسکرپینگ، تجمیع و بازنویسی کانفیگ‌ها تعیین شده‌اند."})]}),l.jsx("span",{className:"text-xs text-emerald-600 font-bold bg-emerald-50 px-3 py-1 rounded-full",children:"همه فعال"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:(s?.channels||[]).map(e=>(0,l.jsxs)("div",{className:"border border-slate-200 rounded-xl p-4 bg-slate-50/40 hover:border-sky-300 transition-all",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"font-bold text-sm text-slate-900",children:e.title}),l.jsx("span",{className:"text-xs font-extrabold text-sky-600 tnum",children:e.subscribers>=1e6?`${(e.subscribers/1e6).toFixed(2)}M`:`${(e.subscribers/1e3).toFixed(1)}K`})]}),(0,l.jsxs)("div",{className:"text-xs text-slate-400 mb-3",children:["@",e.handle]}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-[11px] text-slate-500 pt-2 border-t border-slate-200/60",children:[(0,l.jsxs)("span",{children:["حوزه: ",e.niche]}),l.jsx("a",{href:`https://t.me/${e.handle}`,target:"_blank",rel:"noreferrer",className:"text-sky-600 font-semibold hover:underline",children:"مشاهده کانال"})]})]},e.id))})]})}),F&&l.jsx("div",{className:"fixed inset-0 z-50 bg-slate-900/60 backdrop-blur-sm flex items-center justify-center p-4 overflow-y-auto",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl max-w-3xl w-full p-6 shadow-2xl border border-slate-200 my-8",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-slate-100",children:[l.jsx("h3",{className:"text-base font-bold text-slate-900",children:"ویرایشگر محتوا و بنر گرافیکی"}),l.jsx("button",{onClick:()=>E(null),className:"text-slate-400 hover:text-slate-600 text-lg font-bold",children:"✕"})]}),(0,l.jsxs)("div",{className:"mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsxs)("label",{className:"text-xs font-bold text-slate-700 flex items-center",children:[l.jsx("span",{children:"وضعیت بنر و تصویر پست"}),l.jsx(r,{text:"می‌توانید پست را بدون تصویر ارسال کنید یا بنر گرافیکی جدید بسازید یا عکس دلخواه خود را از سیستم آپلود نمایید."})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[!H&&(F.banner_image_url||M)&&l.jsx("button",{type:"button",onClick:()=>{J(!0),z(null)},className:"px-2.5 py-1 rounded-lg bg-rose-50 text-rose-600 hover:bg-rose-100 border border-rose-200 text-[11px] font-bold transition-all",children:"\uD83D\uDDD1️ حذف بنر (ارسال متنی بدون عکس)"}),H&&l.jsx("button",{type:"button",onClick:()=>{J(!1),z(F.banner_image_url||null)},className:"px-2.5 py-1 rounded-lg bg-sky-50 text-sky-600 hover:bg-sky-100 border border-sky-200 text-[11px] font-bold transition-all",children:"↺ بازگرداندن بنر"}),(0,l.jsxs)("label",{className:"cursor-pointer px-2.5 py-1 rounded-lg bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-300 text-[11px] font-bold transition-all inline-flex items-center gap-1",children:[(0,l.jsxs)("span",{children:["\uD83D\uDCE4 ",K?"در حال آپلود...":"آپلود عکس از سیستم"]}),l.jsx("input",{type:"file",accept:"image/*",className:"hidden",disabled:K,onChange:e=>{e.target.files&&e.target.files[0]&&eb(e.target.files[0])}})]})]})]}),!H&&(M||F.banner_image_url)?(0,l.jsxs)("div",{className:"relative mb-3 bg-slate-950 border border-slate-800 rounded-2xl overflow-hidden flex flex-col items-center justify-center p-2 group",children:[l.jsx("img",{src:M||F.banner_image_url||"",alt:"Banner preview",onClick:()=>en(M||F.banner_image_url||null),className:"w-full max-h-96 object-contain rounded-xl cursor-pointer transition-transform duration-200 group-hover:scale-[1.01]",title:"جهت مشاهده اندازه واقعی و تمام‌صفحه کلیک کنید"}),(0,l.jsxs)("div",{className:"absolute top-3 left-3 flex items-center gap-2",children:[(0,l.jsxs)("button",{onClick:()=>en(M||F.banner_image_url||null),className:"bg-black/80 hover:bg-black text-white text-xs px-3 py-1.5 rounded-xl font-bold flex items-center gap-1.5 shadow-lg backdrop-blur-md transition-all",children:[l.jsx("span",{children:"\uD83D\uDD0D"}),l.jsx("span",{children:"مشاهده کامل بنر (۱۰۸۰\xd7۱۰۸۰)"})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>{J(!0),z(null)},className:"bg-rose-600 hover:bg-rose-700 text-white text-xs px-3 py-1.5 rounded-xl font-bold flex items-center gap-1.5 shadow-lg backdrop-blur-md transition-all border border-rose-500",children:[l.jsx("span",{children:"\uD83D\uDDD1️"}),l.jsx("span",{children:"حذف بنر (ارسال متنی بدون عکس)"})]})]}),l.jsx("span",{className:"absolute bottom-3 right-3 bg-slate-900/90 text-white text-[11px] px-2.5 py-1 rounded-lg font-mono border border-slate-700",children:M?.includes("upload_")?"عکس آپلودی شما":"بنر هوشمند سیستم"})]}):(0,l.jsxs)("div",{className:"p-4 rounded-xl bg-amber-50 border border-amber-200 text-amber-900 text-xs flex flex-col md:flex-row md:items-center justify-between gap-3 mb-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xl",children:"\uD83D\uDCDD"}),(0,l.jsxs)("div",{children:[l.jsx("span",{className:"font-bold block text-sm",children:"این پست بدون تصویر (فقط متن) منتشر خواهد شد."}),l.jsx("span",{className:"text-[11px] text-amber-700",children:"بنر حذف شد؛ پیام متنی برای کپی سریع کانفیگ و خواندن راحت به تلگرام ارسال می‌شود."})]})]}),l.jsx("div",{className:"flex items-center gap-2",children:(0,l.jsxs)("button",{type:"button",onClick:()=>{J(!1),z(F.banner_image_url||null)},className:"px-3.5 py-1.5 rounded-lg bg-sky-600 hover:bg-sky-700 text-white font-bold text-xs transition-all shadow-sm flex items-center gap-1.5",children:[l.jsx("span",{children:"↺"}),l.jsx("span",{children:"بازگرداندن بنر"})]})})]}),!H&&(0,l.jsxs)("div",{className:"bg-slate-50 p-3.5 rounded-xl border border-slate-200 flex flex-col md:flex-row md:items-center justify-between gap-3",children:[(0,l.jsxs)("div",{className:"flex-1",children:[l.jsx("label",{className:"text-[11px] text-slate-500 font-semibold mb-1 block",children:"عنوان یا لوکیشن روی بنر (اختیاری)"}),l.jsx("input",{type:"text",placeholder:"مثال: سرورهای ابری آلمان و هلند",value:R,onChange:e=>G(e.target.value),className:"w-full px-3 py-1.5 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-sky-500"})]}),(0,l.jsxs)("div",{className:"pt-2 md:pt-4 flex items-center gap-2",children:[(0,l.jsxs)("button",{onClick:eu,disabled:I,className:"px-3.5 py-2 rounded-lg bg-sky-600 hover:bg-sky-700 text-white text-xs font-bold transition-all shadow-sm flex items-center gap-1.5 disabled:opacity-50",children:[l.jsx("span",{children:I?"⏳":"\uD83C\uDFA8"}),l.jsx("span",{children:I?"در حال طراحی بنر...":"تولید مجدد بنر"})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>{J(!0),z(null)},className:"px-3.5 py-2 rounded-lg bg-rose-600 hover:bg-rose-700 text-white text-xs font-bold transition-all shadow-sm flex items-center gap-1.5",children:[l.jsx("span",{children:"\uD83D\uDDD1️"}),l.jsx("span",{children:"حذف بنر"})]})]})]})]}),(0,l.jsxs)("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-xs font-bold text-slate-700 mb-2",children:"متن نهایی پست تلگرام"}),l.jsx("textarea",{rows:8,value:A,onChange:e=>O(e.target.value),className:"w-full p-3.5 border border-slate-300 rounded-xl text-xs leading-relaxed outline-none focus:border-sky-500 font-sans"})]}),(0,l.jsxs)("div",{className:"mb-4 p-4 rounded-xl bg-slate-50 border border-slate-200",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx("span",{className:"text-base",children:"\uD83D\uDCC5"}),(0,l.jsxs)("div",{children:[l.jsx("span",{className:"text-xs font-bold text-slate-800 block",children:"نحوه زمان‌بندی انتشار در کانال:"}),l.jsx("span",{className:"text-[11px] text-slate-500",children:"انتخاب کنید که پست با زمان‌بندی رندوم در ساعات اوج بازدید تلگرام قرار گیرد، یا در تاریخ و ساعت دلخواه شما ارسال شود."})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 mb-3",children:[(0,l.jsxs)("label",{className:`flex items-start gap-2 p-2.5 rounded-lg border cursor-pointer transition-all ${"smart_random"===X?"bg-indigo-50 border-indigo-300 text-indigo-900 ring-1 ring-indigo-400":"bg-white border-slate-200 text-slate-700"}`,children:[l.jsx("input",{type:"radio",name:"scheduleMode",value:"smart_random",checked:"smart_random"===X,onChange:()=>Y("smart_random"),className:"mt-0.5 text-indigo-600 focus:ring-indigo-500"}),(0,l.jsxs)("div",{children:[l.jsx("span",{className:"text-xs font-bold block",children:"\uD83C\uDFB2 زمان‌بندی رندوم هوشمند"}),l.jsx("span",{className:"text-[10px] text-slate-500 block mt-0.5",children:"ارسال تصادفی بین ساعت ۱۶:۰۰ تا ۲۰:۰۰ عصر (ساعات پربازدید تهران)"})]})]}),(0,l.jsxs)("label",{className:`flex items-start gap-2 p-2.5 rounded-lg border cursor-pointer transition-all ${"custom"===X?"bg-sky-50 border-sky-300 text-sky-900 ring-1 ring-sky-400":"bg-white border-slate-200 text-slate-700"}`,children:[l.jsx("input",{type:"radio",name:"scheduleMode",value:"custom",checked:"custom"===X,onChange:()=>Y("custom"),className:"mt-0.5 text-sky-600 focus:ring-sky-500"}),(0,l.jsxs)("div",{children:[l.jsx("span",{className:"text-xs font-bold block",children:"\uD83D\uDD52 انتخاب تاریخ و ساعت دستی"}),l.jsx("span",{className:"text-[10px] text-slate-500 block mt-0.5",children:"تعیین زمان مشخص توسط خود شما"})]})]}),(0,l.jsxs)("label",{className:`flex items-start gap-2 p-2.5 rounded-lg border cursor-pointer transition-all ${"immediate"===X?"bg-emerald-50 border-emerald-300 text-emerald-900 ring-1 ring-emerald-400":"bg-white border-slate-200 text-slate-700"}`,children:[l.jsx("input",{type:"radio",name:"scheduleMode",value:"immediate",checked:"immediate"===X,onChange:()=>Y("immediate"),className:"mt-0.5 text-emerald-600 focus:ring-emerald-500"}),(0,l.jsxs)("div",{children:[l.jsx("span",{className:"text-xs font-bold block",children:"\uD83D\uDE80 ارسال فوری"}),l.jsx("span",{className:"text-[10px] text-slate-500 block mt-0.5",children:"انتشار بدون نوبت و آنی در کانال"})]})]})]}),"custom"===X&&(0,l.jsxs)("div",{className:"pt-3 border-t border-slate-200 flex flex-wrap items-center gap-3",children:[l.jsx("label",{className:"text-xs font-semibold text-slate-700",children:"تاریخ و ساعت انتشار دلخواه (به وقت محلی شما):"}),l.jsx("input",{type:"datetime-local",value:Z,onChange:e=>ee(e.target.value),className:"px-3 py-1.5 text-xs bg-white border border-slate-300 rounded-lg focus:ring-2 focus:ring-sky-500 font-mono"})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-3 pt-3 border-t border-slate-100",children:[l.jsx("button",{onClick:()=>E(null),className:"px-4 py-2 rounded-xl border border-slate-300 text-slate-700 text-xs font-semibold hover:bg-slate-50",children:"انصراف"}),l.jsx("button",{onClick:()=>eh(F.id,A,H?null:M||F.banner_image_url,H,"immediate"===X,"custom"===X?Z:null),className:"px-5 py-2 rounded-xl bg-emerald-600 hover:bg-emerald-700 text-white text-xs font-bold shadow-sm",children:"ذخیره و افزودن به لیست پخش ✓"})]})]})}),er&&l.jsx("div",{className:"fixed inset-0 z-[100] bg-black/90 backdrop-blur-md flex flex-col items-center justify-center p-4",onClick:()=>en(null),children:(0,l.jsxs)("div",{className:"relative max-w-4xl max-h-[90vh] flex flex-col items-center",onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("div",{className:"w-full flex items-center justify-between pb-3 text-white",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-base",children:"\uD83D\uDDBC️"}),l.jsx("span",{className:"text-xs font-bold font-sans",children:"پیش‌نمایش کامل بنر گرافیکی (۱۰۸۰\xd7۱۰۸۰)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("a",{href:er,download:"netvibe_banner.png",target:"_blank",rel:"noopener noreferrer",className:"bg-white/20 hover:bg-white/30 text-white text-xs px-3 py-1.5 rounded-lg transition-colors flex items-center gap-1 font-semibold",children:[l.jsx("span",{children:"⬇️"}),l.jsx("span",{children:"دانلود فایل اصلی"})]}),l.jsx("button",{onClick:()=>en(null),className:"bg-white/20 hover:bg-rose-600 text-white text-xs w-8 h-8 rounded-lg flex items-center justify-center transition-colors font-bold",children:"✕"})]})]}),l.jsx("div",{className:"bg-slate-950 p-2 rounded-2xl border border-slate-800 shadow-2xl overflow-hidden flex items-center justify-center",children:l.jsx("img",{src:er,alt:"Full Banner",className:"max-h-[80vh] max-w-[85vw] object-contain rounded-xl"})})]})})]})}},1506:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r,metadata:()=>a});var l=s(9510);s(7272);let a={title:"رادار تلگرام و کیوریشن محتوای NetVibe VPN",description:"سیستم چندعاملی هوش مصنوعی برای پایش، تحلیل، بازآفرینی و انتشار خودکار محتوای VPN و آزادی اینترنت"};function r({children:e}){return l.jsx("html",{lang:"fa",dir:"rtl",children:l.jsx("body",{className:"min-h-screen bg-[#F8FAFC] text-[#0F172A] flex flex-col font-sans",children:l.jsx("main",{className:"flex-1",children:e})})})}},908:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});let l=(0,s(8570).createProxy)(String.raw`/workspace/personal/dashboards/VPN_chanel/frontend/app/page.tsx#default`)},7272:()=>{}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),l=t.X(0,[819],()=>s(4412));module.exports=l})();