1 line
No EOL
67 KiB
JavaScript
1 line
No EOL
67 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{4317:function(e,t,s){Promise.resolve().then(s.bind(s,7340))},7340:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return r}});var l=s(7437),a=s(2265);let n=e=>{let{text:t}=e;return(0,l.jsxs)("span",{className:"info-tooltip-wrap inline-flex items-center justify-center mr-1.5 align-middle",children:[(0,l.jsx)("span",{className:"info-icon-btn",children:"i"}),(0,l.jsx)("span",{className:"info-tooltip-content",children:t})]})};function r(){let[e,t]=(0,a.useState)("charts"),[s,r]=(0,a.useState)(null),[i,d]=(0,a.useState)([]),[o,c]=(0,a.useState)([]),[x,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,V]=(0,a.useState)(!1),T=o.filter(e=>"queued"===e.status||"publishing"===e.status),E=o.filter(e=>"success"===e.status||"published"===e.status),[F,O]=(0,a.useState)(null),[A,B]=(0,a.useState)(""),[I,L]=(0,a.useState)("سرویس اینترنت پرسرعت و پایدار"),[R,q]=(0,a.useState)("سرورهای ابری اروپا"),[M,G]=(0,a.useState)(!1),[z,H]=(0,a.useState)(null),[J,K]=(0,a.useState)(!1),[U,Q]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(!1),[X,Z]=(0,a.useState)("smart_random"),[$,ee]=(0,a.useState)(""),[et,es]=(0,a.useState)(null),[el,ea]=(0,a.useState)(""),[en,er]=(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&&r(await e.json()),t.ok&&d(await t.json()),s.ok&&c(await s.json()),await ed(C)}catch(e){console.error("Failed to load data:",e)}finally{u(!1)}},ed=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;try{let t=await fetch("/api/v1/banner-pool?category=".concat(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){V(!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=".concat(C),{method:"POST",body:s})}await ed(C),D("".concat(e.length," بنر با موفقیت به استخر ").concat("gemini"===C?"Gemini":"VPN"," اضافه شد."))}catch(e){alert("خطا در آپلود بنر به استخر.")}finally{V(!1)}}},ec=async e=>{if(confirm("آیا از حذف این بنر از استخر اطمینان دارید؟"))try{(await fetch("/api/v1/banner-pool/".concat(C,"/").concat(e),{method:"DELETE"})).ok&&(await ed(C),D("بنر از استخر حذف شد."))}catch(e){alert("خطا در حذف بنر.")}};(0,a.useEffect)(()=>{ei()},[]);let ex=async()=>{try{j(!0),D("در حال اسکرپ و استخراج پستهای جدید از کانالهای پرطرفدار...");let e=await fetch("/api/v1/pipeline/run-now");if(e.ok){let t=await e.json();D("عملیات با موفقیت پایان یافت: ".concat(t.new_posts," پست جدید و ").concat(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/".concat(e,"/create-draft"),{method:"POST"});if(s.ok){let e=await s.json();D("پیشنویس با موفقیت تولید شد و به تب استودیو افزوده گردید."),await ei(),t("drafts"),O(e),B(e.current_text)}}catch(e){D("خطا در تولید پیشنویس هوشمند.")}finally{N(null),setTimeout(()=>D(null),4e3)}},eh=async(e,t,s,l,a,n)=>{try{let r={action:t?"edit_approve":"approve",text:t,remove_banner:null!=l&&l,banner_image_url:s};a?r.scheduled_time=new Date().toISOString():n&&(r.scheduled_time=new Date(n).toISOString());let i=await fetch("/api/v1/drafts/".concat(e,"/action"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.ok)D("پیشنویس تایید و با زمانبندی انتخابشده به صف ارسال افزوده شد."),O(null),await ei();else{let e=await i.json().catch(()=>({}));D("خطا در تایید پیشنویس: ".concat(e.detail||i.statusText))}}catch(e){D("خطا در تایید پیشنویس.")}},eb=async e=>{try{Q(!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();H(e.banner_url),K(!1),F&&O({...F,banner_image_url:e.banner_url}),D("بنر اختصاصی شما با موفقیت آپلود شد و جایگزین گردید.")}else D("خطا در آپلود بنر. لطفاً یک فایل عکس معتبر انتخاب کنید.")}catch(e){D("خطا در ارتباط با سرور.")}finally{Q(!1)}},ep=async e=>{try{(await fetch("/api/v1/drafts/".concat(e,"/action"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"reject",rejection_reason:"رد توسط ناظر انسانی"})})).ok&&(D("پیشنویس رد شد و بازخورد جهت یادگیری مدل ثبت گردید."),O(null),await ei())}catch(e){D("خطا در رد پیشنویس.")}},eu=async()=>{try{G(!0);let e=await fetch("/api/v1/generate-banner",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:I,location:R})});if(e.ok){let t=await e.json();F&&O({...F,banner_image_url:t.banner_url}),H(t.banner_url),D("بنر گرافیکی جدید با موفقیت تولید و جایگزین شد.")}}catch(e){D("خطا در تولید بنر گرافیکی.")}finally{G(!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("تعداد ".concat(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/".concat(e,"/send-now"),{method:"POST"});if(t.ok)D("پست با موفقیت به کانال رسمی تلگرام ارسال شد."),await ei();else{let e=await t.json();D("خطا در ارسال: ".concat(e.detail||"نامشخص"))}}catch(e){D("خطا در برقراری ارتباط با سرور ارسال.")}finally{w(!1),setTimeout(()=>D(null),5e3)}},ef=async e=>{try{let t=await fetch("/api/v1/queue/".concat(e,"/randomize"),{method:"POST"});if(t.ok){let e=await t.json();D("زمان انتشار به صورت تصادفی در بازه ساعت ۱۶ تا ۲۰ تنظیم شد: ".concat(new Date(e.scheduled_time).toLocaleString("fa-IR"))),await ei()}else D("خطا در رندومسازی زمان انتشار.")}catch(e){D("خطا در ارتباط با سرور.")}},eN=async(e,t)=>{if(t)try{(await fetch("/api/v1/queue/".concat(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(e){D("خطا در برقراری ارتباط با سرور.")}},ev=async()=>{try{let e=await fetch("/api/v1/queue/rebalance-random",{method:"POST"});if(e.ok){let t=await e.json();D("تعداد ".concat(t.rebalanced," پست در صف با زمانهای تصادفی بین ساعت ۱۶ تا ۲۰ عصر روزهای متوالی چیده شدند.")),await ei()}else D("خطا در بازتنظیم تصادفی صف.")}catch(e){D("خطا در ارتباط با سرور.")}},ew=async e=>{if(confirm("آیا مطمئن هستید که میخواهید این پست را از صف حذف کرده و به وضعیت پیشنویس بازگردانید؟"))try{(await fetch("/api/v1/queue/".concat(e),{method:"DELETE"})).ok?(D("پست از صف حذف شد و به لیست پیشنویسها بازگشت."),await ei()):D("خطا در حذف از صف.")}catch(e){D("خطا در ارتباط با سرور.")}},[ey,eD]=(0,a.useState)("newest"),ek=("newest"===ey?(null==s?void 0:s.latest_posts)||(null==s?void 0:s.top_viral_posts)||[]:(null==s?void 0:s.top_viral_posts)||[]).filter(e=>{let t="all"===x||e.channel_handle===x,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:[(0,l.jsx)("span",{className:"text-sky-400 text-lg",children:"ℹ️"}),(0,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:[(0,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:[(0,l.jsx)("h1",{className:"text-xl font-bold text-slate-900",children:"رادار جامع تلگرام و کیوریشن محتوای NetVibe VPN"}),(0,l.jsx)(n,{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:[(0,l.jsx)("span",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),"وضعیت: اتصال مستقیم 9Router & Traefik"]}),(0,l.jsx)("span",{children:"•"}),(0,l.jsxs)("span",{children:["برند مقصد: ",(0,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:ex,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:[(0,l.jsx)("span",{children:g?"\uD83D\uDD04":"⚡️"}),(0,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:[(0,l.jsx)("span",{children:"\uD83D\uDE80"}),(0,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:[(0,l.jsx)("span",{children:"کانالهای تحت رصد"}),(0,l.jsx)(n,{text:"تعداد کل کانالهای میلیونی تلگرامی فعال در پایپلاین اسکرپینگ."})]}),(0,l.jsx)("div",{className:"text-2xl font-extrabold text-slate-900 tnum",children:(null==s?void 0:s.total_channels)||0}),(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:[(0,l.jsx)("span",{children:"مخاطب تحت پوشش"}),(0,l.jsx)(n,{text:"مجموع شمار اعضای کانالهای سورس رصدشده در تلگرام بر اساس دادههای زنده."})]}),(0,l.jsxs)("div",{className:"text-2xl font-extrabold text-sky-600 tnum",children:[(((null==s?void 0:s.total_subscribers)||0)/1e3).toLocaleString("fa-IR"),"K+"]}),(0,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:[(0,l.jsx)("span",{children:"پستهای استخراجشده"}),(0,l.jsx)(n,{text:"تعداد کل پستها و کانفیگهای خامی که توسط Agent A استخراج و ذخیره شده است."})]}),(0,l.jsx)("div",{className:"text-2xl font-extrabold text-slate-900 tnum",children:(null==s?void 0:s.total_raw_posts)||0}),(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:[(0,l.jsx)("span",{children:"پیشنویسهای AI"}),(0,l.jsx)(n,{text:"پستهای بازآفرینیشده توسط هوش مصنوعی با لحن فارسی صمیمی و بنر گرافیکی."})]}),(0,l.jsx)("div",{className:"text-2xl font-extrabold text-purple-600 tnum",children:i.length}),(0,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:[(0,l.jsx)("span",{children:"صف انتشار (Queue)"}),(0,l.jsx)(n,{text:"محتواهای تاییدشده که آماده ارسال خودکار به تلگرام هستند."})]}),(0,l.jsx)("div",{className:"text-2xl font-extrabold text-amber-600 tnum",children:T.length}),(0,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:[(0,l.jsx)("span",{children:"منتشر شده در کانال"}),(0,l.jsx)(n,{text:"پستهایی که با موفقیت روی کانال @NetVibe_VPN ارسال شده و ثبت شدهاند."})]}),(0,l.jsx)("div",{className:"text-2xl font-extrabold text-emerald-600 tnum",children:E.length}),(0,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 ".concat("charts"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"\uD83D\uDCC8"}),(0,l.jsx)("span",{children:"نمودارهای تحلیلی و ترافیک"}),(0,l.jsx)(n,{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 ".concat("viral"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"\uD83D\uDD25"}),(0,l.jsxs)("span",{children:["پستهای وایرال و کانفیگهای برتر (",(null==s?void 0:s.top_viral_posts.length)||0,")"]}),(0,l.jsx)(n,{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 ".concat("drafts"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"\uD83C\uDFAF"}),(0,l.jsxs)("span",{children:["استودیو پیشنویسها و بنرها (",i.length,")"]}),(0,l.jsx)(n,{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 ".concat("queue"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"\uD83D\uDE80"}),(0,l.jsxs)("span",{children:["صف انتشار (",T.length,")"]}),(0,l.jsx)(n,{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 ".concat("published"===e?"bg-emerald-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"✅"}),(0,l.jsxs)("span",{children:["منتشر شده در کانال (",E.length,")"]}),(0,l.jsx)(n,{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 ".concat("banners"===e?"bg-purple-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"\uD83D\uDDBC️"}),(0,l.jsxs)("span",{children:["مخزن بنرها (",k.length,")"]}),(0,l.jsx)(n,{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 ".concat("channels"===e?"bg-sky-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),children:[(0,l.jsx)("span",{children:"\uD83D\uDCE1"}),(0,l.jsxs)("span",{children:["کانالهای پایش (",(null==s?void 0:s.channels.length)||0,")"]}),(0,l.jsx)(n,{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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"ساعات اوج انتشار کانفیگ و پستها (Peak Hours)"}),(0,l.jsx)(n,{text:"شمار پستهای منتشرشده در طول شبانهروز جهت تعیین بهترین زمان برای انتشار پست در تلگرام."})]}),(0,l.jsx)("span",{className:"text-xs bg-sky-50 text-sky-700 px-2.5 py-1 rounded-full font-semibold",children:"۲۴ ساعته"})]}),(0,l.jsx)("div",{className:"h-56 flex items-end gap-1.5 pt-6 pb-2 border-b border-slate-100",children:((null==s?void 0:s.hourly_distribution)||[]).map((e,t)=>{let a=Math.max(...(null==s?void 0:s.hourly_distribution.map(e=>e.count))||[1],1),n=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," پست"]}),(0,l.jsx)("div",{style:{height:"".concat(n,"%")},className:"w-full rounded-t-sm transition-all duration-300 ".concat(e.count>0?"bg-sky-500 hover:bg-sky-600":"bg-slate-100")}),t%4==0&&(0,l.jsx)("span",{className:"text-[10px] text-slate-400 tnum",children:e.hour.split(":")[0]})]},t)})}),(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"توزیع پروتکلهای فیلترشکن در پستها"}),(0,l.jsx)(n,{text:"درصد سهم کانفیگهای استخراجشده بر اساس پروتکل VLESS, VMESS, TROJAN, SHADOWSOCKS."})]}),(0,l.jsx)("span",{className:"text-xs bg-purple-50 text-purple-700 px-2.5 py-1 rounded-full font-semibold",children:"پروتکلها"})]}),(0,l.jsx)("div",{className:"space-y-3 pt-2",children:((null==s?void 0:s.protocol_distribution)||[]).map((e,t)=>{let a=(null==s?void 0:s.protocol_distribution.reduce((e,t)=>e+t.count,0))||1,n=Math.round(e.count/a*100),r=["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:[(0,l.jsx)("span",{children:e.protocol}),(0,l.jsxs)("span",{className:"tnum",children:[e.count," کانفیگ (",n,"٪)"]})]}),(0,l.jsx)("div",{className:"w-full bg-slate-100 h-2.5 rounded-full overflow-hidden",children:(0,l.jsx)("div",{style:{width:"".concat(n,"%")},className:"h-full rounded-full transition-all duration-500 ".concat(r[t%r.length])})})]},t)})}),(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"جدول تحلیلی کانالهای مرجع و سهم مخاطبان"}),(0,l.jsx)(n,{text:"بررسی دقیق تعداد مخاطبان، حوزه تخصصی و وضعیت اتصال زنده هر سورس تلگرام."})]}),(0,l.jsx)("span",{className:"text-xs text-slate-500",children:"منبع: تلگرام عمومی t.me/s"})]}),(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)("table",{className:"w-full text-right text-sm",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"border-b border-slate-200 text-xs text-slate-500 bg-slate-50/50",children:[(0,l.jsx)("th",{className:"py-3 px-4 font-bold",children:"کانال و شناسه"}),(0,l.jsx)("th",{className:"py-3 px-4 font-bold",children:"حوزه و تخصص"}),(0,l.jsx)("th",{className:"py-3 px-4 font-bold",children:"تعداد اعضا (Subscribers)"}),(0,l.jsx)("th",{className:"py-3 px-4 font-bold",children:"وضعیت پایش"}),(0,l.jsx)("th",{className:"py-3 px-4 font-bold text-center",children:"لینک مستقیم"})]})}),(0,l.jsx)("tbody",{className:"divide-y divide-slate-100 font-medium",children:((null==s?void 0: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:[(0,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:[(0,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]})]})]}),(0,l.jsx)("td",{className:"py-3.5 px-4 text-xs text-slate-600",children:e.niche}),(0,l.jsx)("td",{className:"py-3.5 px-4",children:(0,l.jsx)("span",{className:"font-bold text-slate-900 tnum",children:e.subscribers>=1e6?"".concat((e.subscribers/1e6).toFixed(2),"M"):"".concat((e.subscribers/1e3).toFixed(1),"K")})}),(0,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:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),"پایش زنده"]})}),(0,l.jsx)("td",{className:"py-3.5 px-4 text-center",children:(0,l.jsx)("a",{href:"https://t.me/".concat(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:[(0,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:x,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:["همه کانالها (",null==s?void 0:s.channels.length,")"]}),((null==s?void 0: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:[(0,l.jsx)("button",{onClick:()=>eD("newest"),className:"px-3 py-1.5 rounded-md font-semibold transition-all ".concat("newest"===ey?"bg-white text-sky-700 shadow-sm":"text-slate-600 hover:text-slate-900"),children:"⚡️ جدیدترینها (تازهترین)"}),(0,l.jsx)("button",{onClick:()=>eD("views"),className:"px-3 py-1.5 rounded-md font-semibold transition-all ".concat("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:["نمایش ",(0,l.jsx)("strong",{className:"text-slate-900 tnum",children:ek.length})," پست"]})]})]}),(0,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]}),(0,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:[(0,l.jsx)("span",{children:"\uD83D\uDC41"}),(0,l.jsx)("span",{children:e.views.toLocaleString("fa-IR")})]})]}),(0,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:[(0,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:[(0,l.jsx)("span",{children:f===e.id?"⏳":"⚡️"}),(0,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:[(0,l.jsx)("span",{className:"text-2xl",children:"\uD83C\uDFAF"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-bold text-sky-900",children:"استودیو بازآفرینی و تایید نهایی پستها"}),(0,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:[(0,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:[(0,l.jsx)("option",{value:"",className:"bg-slate-900 text-white",children:"\uD83C\uDFB2 تنوع تصادفی و هوشمند"}),(0,l.jsx)("option",{value:"discount_999k_holo_6gmail",className:"bg-slate-900 text-amber-400 font-bold",children:"\uD83D\uDD25 آفر ۹۹۹.۰۰۰ تومان (۱۸ ماهه + ۶ جیمیل)"}),(0,l.jsx)("option",{value:"discount_1200k_robot_6gmail",className:"bg-slate-900 text-yellow-300 font-bold",children:"\uD83D\uDC8E آفر ۱.۲۰۰.۰۰۰ تومان (۱۸ ماهه + ۶ جیمیل)"}),(0,l.jsx)("option",{value:"programmers_coders",className:"bg-slate-900 text-white",children:"\uD83D\uDCBB برنامهنویسان و کدرها"}),(0,l.jsx)("option",{value:"researchers_students",className:"bg-slate-900 text-white",children:"\uD83D\uDCDA دانشجویان و پژوهشگران"}),(0,l.jsx)("option",{value:"content_creators_marketers",className:"bg-slate-900 text-white",children:"\uD83D\uDE80 تولیدکنندگان محتوا و ادمینها"}),(0,l.jsx)("option",{value:"team_6gmails_agency",className:"bg-slate-900 text-white",children:"\uD83C\uDF10 پکیج ۶ جیمیل (چند سطحی)"}),(0,l.jsx)("option",{value:"business_executive_productivity",className:"bg-slate-900 text-white",children:"\uD83D\uDCCA مدیران و بیزینس"}),(0,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:[(0,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:[(0,l.jsx)("option",{value:"24",className:"bg-slate-900 text-white",children:"۲۴ ساعت (فوری)"}),(0,l.jsx)("option",{value:"48",className:"bg-slate-900 text-white",children:"۴۸ ساعت (استاندارد)"}),(0,l.jsx)("option",{value:"72",className:"bg-slate-900 text-white",children:"۷۲ ساعت (۳ روز)"}),(0,l.jsx)("option",{value:"120",className:"bg-slate-900 text-white",children:"۵ روز (پایان هفته)"})]})]}),(0,l.jsxs)("button",{onClick:async()=>{try{var e,t;let s=(null===(e=document.getElementById("geminiAngleSelect"))||void 0===e?void 0:e.value)||"",l=(null===(t=document.getElementById("geminiHoursSelect"))||void 0===t?void 0:t.value)||"48",a=new URLSearchParams;a.set("is_flash_sale","true"),s&&a.set("angle_id",s),a.set("hours_remaining",l),D("در حال تولید پست هدفمند Gemini Pro با بنر اختصاصی..."),(await fetch("/api/v1/drafts/create-gemini-promo?".concat(a.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:[(0,l.jsx)("span",{children:"✦"}),(0,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("".concat(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:[(0,l.jsx)("span",{children:"\uD83D\uDE80"}),(0,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:[(0,l.jsx)("div",{className:"text-4xl mb-3",children:"☕️"}),(0,l.jsx)("h4",{className:"text-base font-bold text-slate-800",children:"پیشنویس جدیدی در انتظار نیست"}),(0,l.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:"برای تولید پیشنویس هوشمند، از تب \xabپستهای وایرال\xbb روی دکمه \xabتبدیل به پست NetVibe\xbb کلیک کنید."})]}):(0,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:[(0,l.jsx)("img",{src:e.banner_image_url,alt:"NetVibe Banner",onClick:()=>er(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:()=>er(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:[(0,l.jsx)("span",{children:"\uD83D\uDD0D"}),(0,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:[(0,l.jsx)("span",{children:"\uD83D\uDDD1️"}),(0,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:["کانال مقصد: ",(0,l.jsx)("strong",{className:"text-sky-600",children:"@NetVibe_VPN"})]}),(0,l.jsx)("span",{className:"tnum",children:new Date(e.created_at).toLocaleTimeString("fa-IR")})]}),(0,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:[(0,l.jsx)("button",{onClick:()=>{O(e),B(e.current_text),K(!e.banner_image_url),H(e.banner_image_url||null),Y(!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:"✏️ ویرایش متن یا بنر"}),(0,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:[(0,l.jsx)("span",{children:"✓"}),(0,l.jsx)("span",{children:"تایید و انتقال به صف"})]})]})]},e.id))})]}),"queue"===e&&(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"صف انتشار خودکار به تلگرام"}),(0,l.jsx)(n,{text:"پستهای تاییدشده که در نوبت ارسال زمانبندیشده قرار دارند یا آماده ارسال فوری هستند."})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)("button",{onClick:ev,disabled:v||0===T.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:(0,l.jsx)("span",{children:"\uD83C\uDFB2 بازتنظیم تصادفی کل صف (۱۶ تا ۲۰)"})}),(0,l.jsx)("button",{onClick:eg,disabled:v||0===T.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:[(0,l.jsx)("span",{className:"text-lg",children:"\uD83D\uDCA1"}),(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"font-bold",children:"نحوه کارکرد صف و زمانبندی انتشار:"}),(0,l.jsxs)("p",{children:["۱. پستهای تاییدشده به صورت خودکار و هوشمند در ساعات اوج بازدید تلگرام (",(0,l.jsx)("strong",{children:"بین ساعت ۱۶:۰۰ تا ۲۰:۰۰ عصر به وقت تهران"}),") با زمانهای رندوم در روزهای متوالی چیده میشوند."]}),(0,l.jsx)("p",{children:"۲. برای هر پست در صف میتوانید زمان آن را دستی تغییر دهید، به طور تصادفی بازتنظیم کنید، فوراً ارسال نمایید یا آن را به پیشنویسها برگردانید."}),(0,l.jsxs)("p",{children:["۳. ورکر پسزمینه سرور هر ۱ دقیقه صف را چک کرده و به محض فرا رسیدن زمان هر پست، آن را خودکار در کانال ",(0,l.jsx)("strong",{children:"@NetVibe_VPN"})," منتشر میکند."]})]})]}),0===T.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:[(0,l.jsx)("span",{className:"text-2xl block mb-2",children:"\uD83C\uDF89"}),"صف انتشار در حال حاضر خالی است. تمامی پستهای تاییدشده در کانال منتشر شدهاند.",(0,l.jsx)("div",{className:"text-slate-400 mt-1",children:"میتوانید پستهای ارسالشده را در تب \xab✅ منتشر شده در کانال\xbb مشاهده کنید."})]}):(0,l.jsx)("div",{className:"space-y-3",children:T.map(e=>{var t;return(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:[(0,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:[(0,l.jsx)("div",{className:"text-xs font-bold text-slate-900 line-clamp-1 max-w-lg",children:(null===(t=e.draft)||void 0===t?void 0:t.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:["موعد ارسال به وقت ایران: ",(0,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")})]}),(0,l.jsx)("span",{children:"•"}),(0,l.jsxs)("span",{children:["وضعیت: ",(0,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:[(0,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:(0,l.jsx)("span",{children:"\uD83C\uDFB2 زمان رندوم"})}),(0,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("".concat(t.getFullYear(),"-").concat(s(t.getMonth()+1),"-").concat(s(t.getDate()),"T").concat(s(t.getHours()),":").concat(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:(0,l.jsx)("span",{children:"✏️ تغییر زمان دستی"})}),(0,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:(0,l.jsx)("span",{children:"\uD83D\uDE80 ارسال همین حالا"})}),(0,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:(0,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:[(0,l.jsx)("span",{className:"text-xs font-bold text-slate-700",children:"انتخاب تاریخ و ساعت جدید به وقت محلی:"}),(0,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"}),(0,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:"✓ ثبت زمان جدید"}),(0,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&&(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"آرشیو و لاگ پستهای منتشرشده در تلگرام"}),(0,l.jsx)(n,{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:[(0,l.jsx)("span",{children:"✓"}),(0,l.jsxs)("span",{children:[E.length," پست منتشر شده"]})]})]}),0===E.length?(0,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:"هنوز هیچ پستی در کانال منتشر نشده است."}):(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:E.map(e=>{var t,s;return(0,l.jsxs)("div",{className:"border border-emerald-200 rounded-2xl overflow-hidden bg-white shadow-sm flex flex-col justify-between",children:[(null===(t=e.draft)||void 0===t?void 0:t.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:[(0,l.jsx)("img",{src:e.draft.banner_image_url,alt:"Banner",onClick:()=>{var t;return er((null===(t=e.draft)||void 0===t?void 0:t.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:"مشاهده اندازه واقعی بنر"}),(0,l.jsx)("div",{className:"absolute top-2 left-2",children:(0,l.jsxs)("button",{onClick:()=>{var t;return er((null===(t=e.draft)||void 0===t?void 0:t.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:[(0,l.jsx)("span",{children:"\uD83D\uDD0D"}),(0,l.jsx)("span",{children:"سایز اصلی"})]})}),(0,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:[(0,l.jsx)("span",{children:"✅"}),(0,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]})]}),(0,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:(null===(s=e.draft)||void 0===s?void 0:s.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/".concat(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:[(0,l.jsx)("span",{children:"مشاهده در تلگرام"}),(0,l.jsx)("span",{children:"↗"})]}):(0,l.jsx)("span",{className:"text-slate-400",children:"ثبت مستقیم"})]})]})]},e.id)})})]})}),"banners"===e&&(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"مخزن بنرهای گرافیکی (Banner Pool)"}),(0,l.jsx)(n,{text:"میتوانید تا ۱۰ یا بیشتر بنر آماده برای Gemini یا VPN در اینجا آپلود کنید. سیستم به صورت چرخشی و هوشمند از میان این بنرها برای تولید پستهای تلگرام استفاده میکند."})]}),(0,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:[(0,l.jsx)("button",{onClick:()=>{S("gemini"),ed("gemini")},className:"px-3 py-1.5 rounded-lg text-xs font-bold transition-all ".concat("gemini"===C?"bg-purple-600 text-white shadow-sm":"text-slate-600 hover:text-slate-900"),children:"✦ بنرهای Gemini Pro"}),(0,l.jsx)("button",{onClick:()=>{S("vpn"),ed("vpn")},className:"px-3 py-1.5 rounded-lg text-xs font-bold transition-all ".concat("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:[(0,l.jsx)("span",{children:P?"⏳ در حال آپلود...":"➕ آپلود بنر جدید (تکی یا گروهی)"}),(0,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:[(0,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"," در حال حاضر خالی است"]}),(0,l.jsx)("p",{className:"text-xs text-slate-500 mt-1 max-w-md mx-auto",children:"میتوانید چند بنر آماده خود را آپلود کنید تا سیستم برای هر پست به جای بنر تکراری، یکی از این بنرها را قرار دهد."})]}):(0,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:()=>er(e.url),title:"کلیک برای مشاهده در اندازه اصلی",children:[(0,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"]}),(0,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:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-slate-600 truncate max-w-[140px]",title:e.filename,children:e.filename}),(0,l.jsx)("button",{onClick:()=>ec(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&&(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"کانالهای میلیونی و معتبر تحت پایش"}),(0,l.jsx)(n,{text:"فهرست کانالهای تلگرام که به عنوان سورس اسکرپینگ، تجمیع و بازنویسی کانفیگها تعیین شدهاند."})]}),(0,l.jsx)("span",{className:"text-xs text-emerald-600 font-bold bg-emerald-50 px-3 py-1 rounded-full",children:"همه فعال"})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:((null==s?void 0: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:[(0,l.jsx)("div",{className:"font-bold text-sm text-slate-900",children:e.title}),(0,l.jsx)("span",{className:"text-xs font-extrabold text-sky-600 tnum",children:e.subscribers>=1e6?"".concat((e.subscribers/1e6).toFixed(2),"M"):"".concat((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]}),(0,l.jsx)("a",{href:"https://t.me/".concat(e.handle),target:"_blank",rel:"noreferrer",className:"text-sky-600 font-semibold hover:underline",children:"مشاهده کانال"})]})]},e.id))})]})}),F&&(0,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:[(0,l.jsx)("h3",{className:"text-base font-bold text-slate-900",children:"ویرایشگر محتوا و بنر گرافیکی"}),(0,l.jsx)("button",{onClick:()=>O(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:[(0,l.jsx)("span",{children:"وضعیت بنر و تصویر پست"}),(0,l.jsx)(n,{text:"میتوانید پست را بدون تصویر ارسال کنید یا بنر گرافیکی جدید بسازید یا عکس دلخواه خود را از سیستم آپلود نمایید."})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[!J&&(F.banner_image_url||z)&&(0,l.jsx)("button",{type:"button",onClick:()=>{K(!0),H(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️ حذف بنر (ارسال متنی بدون عکس)"}),J&&(0,l.jsx)("button",{type:"button",onClick:()=>{K(!1),H(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 ",U?"در حال آپلود...":"آپلود عکس از سیستم"]}),(0,l.jsx)("input",{type:"file",accept:"image/*",className:"hidden",disabled:U,onChange:e=>{e.target.files&&e.target.files[0]&&eb(e.target.files[0])}})]})]})]}),!J&&(z||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:[(0,l.jsx)("img",{src:z||F.banner_image_url||"",alt:"Banner preview",onClick:()=>er(z||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:()=>er(z||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:[(0,l.jsx)("span",{children:"\uD83D\uDD0D"}),(0,l.jsx)("span",{children:"مشاهده کامل بنر (۱۰۸۰\xd7۱۰۸۰)"})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>{K(!0),H(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:[(0,l.jsx)("span",{children:"\uD83D\uDDD1️"}),(0,l.jsx)("span",{children:"حذف بنر (ارسال متنی بدون عکس)"})]})]}),(0,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:(null==z?void 0:z.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:[(0,l.jsx)("span",{className:"text-xl",children:"\uD83D\uDCDD"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-bold block text-sm",children:"این پست بدون تصویر (فقط متن) منتشر خواهد شد."}),(0,l.jsx)("span",{className:"text-[11px] text-amber-700",children:"بنر حذف شد؛ پیام متنی برای کپی سریع کانفیگ و خواندن راحت به تلگرام ارسال میشود."})]})]}),(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsxs)("button",{type:"button",onClick:()=>{K(!1),H(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:[(0,l.jsx)("span",{children:"↺"}),(0,l.jsx)("span",{children:"بازگرداندن بنر"})]})})]}),!J&&(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:[(0,l.jsx)("label",{className:"text-[11px] text-slate-500 font-semibold mb-1 block",children:"عنوان یا لوکیشن روی بنر (اختیاری)"}),(0,l.jsx)("input",{type:"text",placeholder:"مثال: سرورهای ابری آلمان و هلند",value:R,onChange:e=>q(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:M,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:[(0,l.jsx)("span",{children:M?"⏳":"\uD83C\uDFA8"}),(0,l.jsx)("span",{children:M?"در حال طراحی بنر...":"تولید مجدد بنر"})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>{K(!0),H(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:[(0,l.jsx)("span",{children:"\uD83D\uDDD1️"}),(0,l.jsx)("span",{children:"حذف بنر"})]})]})]})]}),(0,l.jsxs)("div",{className:"mb-4",children:[(0,l.jsx)("label",{className:"block text-xs font-bold text-slate-700 mb-2",children:"متن نهایی پست تلگرام"}),(0,l.jsx)("textarea",{rows:8,value:A,onChange:e=>B(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:[(0,l.jsx)("span",{className:"text-base",children:"\uD83D\uDCC5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-xs font-bold text-slate-800 block",children:"نحوه زمانبندی انتشار در کانال:"}),(0,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 ".concat("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:[(0,l.jsx)("input",{type:"radio",name:"scheduleMode",value:"smart_random",checked:"smart_random"===X,onChange:()=>Z("smart_random"),className:"mt-0.5 text-indigo-600 focus:ring-indigo-500"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-xs font-bold block",children:"\uD83C\uDFB2 زمانبندی رندوم هوشمند"}),(0,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 ".concat("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:[(0,l.jsx)("input",{type:"radio",name:"scheduleMode",value:"custom",checked:"custom"===X,onChange:()=>Z("custom"),className:"mt-0.5 text-sky-600 focus:ring-sky-500"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-xs font-bold block",children:"\uD83D\uDD52 انتخاب تاریخ و ساعت دستی"}),(0,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 ".concat("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:[(0,l.jsx)("input",{type:"radio",name:"scheduleMode",value:"immediate",checked:"immediate"===X,onChange:()=>Z("immediate"),className:"mt-0.5 text-emerald-600 focus:ring-emerald-500"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-xs font-bold block",children:"\uD83D\uDE80 ارسال فوری"}),(0,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:[(0,l.jsx)("label",{className:"text-xs font-semibold text-slate-700",children:"تاریخ و ساعت انتشار دلخواه (به وقت محلی شما):"}),(0,l.jsx)("input",{type:"datetime-local",value:$,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:[(0,l.jsx)("button",{onClick:()=>O(null),className:"px-4 py-2 rounded-xl border border-slate-300 text-slate-700 text-xs font-semibold hover:bg-slate-50",children:"انصراف"}),(0,l.jsx)("button",{onClick:()=>eh(F.id,A,J?null:z||F.banner_image_url,J,"immediate"===X,"custom"===X?$:null),className:"px-5 py-2 rounded-xl bg-emerald-600 hover:bg-emerald-700 text-white text-xs font-bold shadow-sm",children:"ذخیره و افزودن به لیست پخش ✓"})]})]})}),en&&(0,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:()=>er(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:[(0,l.jsx)("span",{className:"text-base",children:"\uD83D\uDDBC️"}),(0,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:en,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:[(0,l.jsx)("span",{children:"⬇️"}),(0,l.jsx)("span",{children:"دانلود فایل اصلی"})]}),(0,l.jsx)("button",{onClick:()=>er(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:"✕"})]})]}),(0,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:(0,l.jsx)("img",{src:en,alt:"Full Banner",className:"max-h-[80vh] max-w-[85vw] object-contain rounded-xl"})})]})})]})}}},function(e){e.O(0,[971,117,744],function(){return e(e.s=4317)}),_N_E=e.O()}]); |