PageSourceSearch

https://fonoloji.com/_next/static/chunks/1446.8caf8c2a322b8bfe.js

js fonoloji.com collected 2026-10-02 01:30:18 UTC 11,825 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1446],{21446:function(e,a,t){t.r(a),t.d(a,{IgPosts:function(){return k}});var s=t(83890),i=t(67520),n=t(20269),l=t(39488),r=t(86154),c=t(32450),d=t(25870),m=t(50422),o=t(58496),u=t(19083),p=t(78698);let x={"01":{name:"S\xf6zl\xfck Terimi",cat:"Eğitim"},"02":{name:"Kavram A\xe7ıklaması",cat:"Eğitim"},"03":{name:"Mum Formasyonu",cat:"Eğitim"},"04":{name:"İnfografik Karşılaştırma",cat:"Eğitim"},"05":{name:"Fon Spotlight",cat:"Veri"},"06":{name:"Hisse Spotlight",cat:"Veri"},"07":{name:"Karşılaştırma",cat:"Veri"},"08":{name:"Top 10 Fon",cat:"Veri"},"09":{name:"Sekt\xf6r Performansı",cat:"Veri"},10:{name:"KAP A\xe7ıklaması",cat:"Haber"},11:{name:"Finansal Rapor",cat:"Haber"},12:{name:"Analist Raporu",cat:"Haber"},13:{name:"Piyasa B\xfclteni",cat:"Haber"},14:{name:"Tema Fonları",cat:"Tema"},15:{name:"Yeni Listelenen",cat:"Tema"},16:{name:"D\xfcnya Piyasaları",cat:"Tema"},17:{name:"Quiz Kartı (AI)",cat:"Etkileşim"},18:{name:"Bilgi mi, Mit mi? (AI)",cat:"Etkileşim"},19:{name:"1.000 ₺ Senaryo",cat:"Hesaplayıcı"},20:{name:"DCA Sim\xfclat\xf6r",cat:"Hesaplayıcı"},21:{name:"Faiz Senaryosu",cat:"Hesaplayıcı"},22:{name:"Vadeli vs Fon",cat:"Hesaplayıcı"},23:{name:"Halka Arz Takvimi",cat:"Takvim"},24:{name:"Temett\xfc Takvimi",cat:"Takvim"},25:{name:"Y\xf6netim Şirketleri",cat:"Takvim"},26:{name:"Tarihte Bug\xfcn",cat:"Tarih"},27:{name:"Fon Evrimi",cat:"Tarih"},28:{name:"Sezonsal Trend",cat:"Tarih"},29:{name:"Yatırım S\xf6z\xfc",cat:"İlham"},30:{name:"Yatırımcı Profili",cat:"İlham"},31:{name:"Bu Hatayı Yapma",cat:"İlham"},32:{name:"Mini S\xf6zl\xfck (4)",cat:"İlham"}},h={"01":"static","02":"static","03":"static","04":"mock","05":"live","06":"live","07":"live","08":"live","09":"mock",10:"live",11:"mock",12:"live",13:"live",14:"live",15:"live",16:"live",17:"live",18:"live",19:"live",20:"live",21:"mock",22:"live",23:"mock",24:"mock",25:"live",26:"static",27:"live",28:"mock",29:"static",30:"static",31:"static",32:"static"},g={"05":"fund-or-manager","06":"stock",11:"stock",12:"stock",14:"theme",19:"fund",20:"fund",27:"fund"};function k(){let[e,a]=o.useState([]),[t,k]=o.useState(null),[v,b]=o.useState({}),[j,y]=o.useState({}),[N,C]=o.useState({}),[T,w]=o.useState([]),[A,S]=o.useState("Hepsi"),z=o.useCallback(()=>{fetch("/admin-api/ig-post/scheduled",{credentials:"include"}).then(e=>e.json()).then(e=>w(e.items??[])).catch(()=>w([]))},[]);o.useEffect(()=>{fetch("/admin-api/ig-post/list",{credentials:"include"}).then(e=>e.json()).then(e=>a(e.items??[])).catch(()=>a([])),fetch("/admin-api/ig-post/suggest",{credentials:"include"}).then(e=>e.json()).then(e=>k(e)).catch(()=>k(null)),z();let e=setInterval(z,3e4);return()=>clearInterval(e)},[z]);let I=async(e,a)=>{b(t=>({...t,[e]:{kind:"loading",action:a}}));try{let t=g[e],s=j[e]?.trim(),i={postId:e,action:a};"fund"===t&&s?i.fundCode=s.toUpperCase():"stock"===t&&s?i.ticker=s.toUpperCase():"theme"===t&&s?i.theme=s:"fund-or-manager"===t&&s&&(/^[A-Z0-9]{2,5}$/.test(s.toUpperCase())?i.fundCode=s.toUpperCase():i.manager=s);let n=await fetch("/admin-api/ig-post/preview",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(i)}),l=await n.json();if(!n.ok||!l.ok){b(a=>({...a,[e]:{kind:"error",message:l.error??`HTTP ${n.status}`}}));return}if(l.igError){b(a=>({...a,[e]:{kind:"error",message:`IG: ${l.igError}`}}));return}b(t=>({...t,[e]:{kind:"ok",action:a,caption:l.captionDraft??"",missingCount:l.missingPlaceholders?.length??0,igMediaId:l.igMediaId}})),setTimeout(()=>b(a=>({...a,[e]:{kind:"idle"}})),8e3)}catch(a){b(t=>({...t,[e]:{kind:"error",message:a instanceof Error?a.message:String(a)}}))}},$=async e=>{let a=N[e]?.trim();if(!a){alert("Tarih + saat se\xe7 (TR saati)");return}let t=g[e],s=j[e]?.trim(),i={postId:e,scheduledAt:a};"fund"===t&&s?i.fundCode=s.toUpperCase():"stock"===t&&s?i.ticker=s.toUpperCase():"theme"===t&&s?i.theme=s:"fund-or-manager"===t&&s&&(/^[A-Z0-9]{2,5}$/.test(s.toUpperCase())?i.fundCode=s.toUpperCase():i.manager=s);let n=await fetch("/admin-api/ig-post/schedule",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(i)}),l=await n.json();if(!l.ok){alert(`Hata: ${l.error??n.status}`);return}C(a=>({...a,[e]:""})),z()},E=async e=>{confirm("Bu zamanlanmış post iptal edilsin mi?")&&(await fetch(`/admin-api/ig-post/scheduled/${e}`,{method:"DELETE",credentials:"include"})).ok&&z()},D=o.useMemo(()=>{let e=new Set(["Hepsi"]);
1return Object.values(x).forEach(a=>e.add(a.cat)),Array.from(e)},[]),H=new Set(["10"]),F=e.filter(e=>!H.has(e.id)&&("Hepsi"===A||x[e.id]?.cat===A));return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-4",children:[(0,s.jsx)("h2",{className:"a-h2",children:"IG Post At\xf6lyesi"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"32 şablon \xb7 DEV bot Telegram'a \xf6nizleme + caption taslağı (IG'a otomatik gitmez)"})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:D.map(e=>(0,s.jsx)("button",{onClick:()=>S(e),className:`rounded-full px-3 py-1 text-xs font-medium transition ${A===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/70"}`,children:e},e))}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2 lg:grid-cols-3",children:F.map(e=>{let a=x[e.id],m=v[e.id]??{kind:"idle"},o=h[e.id]??"static",k=g[e.id];return(0,s.jsxs)("div",{className:"rounded-lg border bg-card p-3 shadow-sm",children:[(0,s.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-semibold",children:e.id}),(0,s.jsx)("h3",{className:"a-h3 truncate",children:a?.name??e.slug})]}),(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,s.jsx)(p.C,{variant:"outline",className:"text-[10px]",children:a?.cat??"—"}),"live"===o&&(0,s.jsx)(p.C,{className:"bg-green-500/15 text-green-700 dark:text-green-400 text-[10px]",children:"\uD83D\uDFE2 Live"}),"mock"===o&&(0,s.jsx)(p.C,{className:"bg-amber-500/20 text-amber-700 dark:text-amber-400 text-[10px] font-bold",children:"⚠ MOCK"}),"static"===o&&(0,s.jsx)(p.C,{className:"bg-slate-500/15 text-slate-700 dark:text-slate-300 text-[10px]",children:"\uD83D\uDCDA statik"})]})]})}),k&&(0,s.jsx)("div",{className:"mt-2.5",children:(0,s.jsx)(f,{type:k,value:j[e.id]??"",onChange:a=>y(t=>({...t,[e.id]:a})),suggest:t})}),(0,s.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,s.jsxs)(u.z,{size:"sm",variant:"outline",disabled:"loading"===m.kind,onClick:()=>I(e.id,"preview"),className:"h-8",title:"DEV bot Telegram'a \xf6nizleme g\xf6nder",children:["loading"===m.kind&&"preview"===m.action?(0,s.jsx)(i.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(n.Z,{className:"h-3.5 w-3.5"}),"\xd6nizle"]}),(0,s.jsxs)(u.z,{size:"sm",disabled:"loading"===m.kind,onClick:()=>{confirm("mock"===o?`⚠ DİKKAT: Bu şablon MOCK veri kullanıyor (rakamlar ger\xe7ek değil).
2
3${a?.name??e.slug} h\xe2l\xe2 @fonoloji_ Instagram'a yayınlansın mı?`:`${a?.name??e.slug} → @fonoloji_ Instagram feed?`)&&I(e.id,"publish")},className:"h-8",title:"mock"===o?"MOCK — rakamlar uydurma, dikkat!":"IG feed post + DEV bot \xf6nizleme",variant:"mock"===o?"outline":"default",children:["loading"===m.kind&&"publish"===m.action?(0,s.jsx)(i.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l.Z,{className:"h-3.5 w-3.5"}),"IG'a Yayınla"]}),(0,s.jsxs)("div",{className:"ml-auto text-[11px]",children:["ok"===m.kind&&(0,s.jsxs)("span",{className:"flex items-center gap-1 text-green-600",children:[(0,s.jsx)(r.Z,{className:"h-3.5 w-3.5"}),"publish"===m.action&&m.igMediaId?"IG yayında":"Telegram",m.missingCount>0?` \xb7 ⚠ ${m.missingCount}`:""]}),"error"===m.kind&&(0,s.jsxs)("span",{className:"flex items-center gap-1 text-red-600",title:m.message,children:[(0,s.jsx)(c.Z,{className:"h-3.5 w-3.5"}),"Hata"]})]})]}),"error"===m.kind&&(0,s.jsx)("p",{className:"mt-2 truncate rounded bg-red-50 px-2 py-1 text-[11px] text-red-700 dark:bg-red-950 dark:text-red-300",children:m.message}),(0,s.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[(0,s.jsx)(d.Z,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,s.jsx)("input",{type:"datetime-local",value:N[e.id]??"",onChange:a=>C(t=>({...t,[e.id]:a.target.value})),className:"flex-1 rounded border bg-background px-2 py-1 text-[11px]",step:"60"}),(0,s.jsx)(u.z,{size:"sm",variant:"outline",className:"h-7 text-[11px]",disabled:!N[e.id],onClick:()=>$(e.id),title:"TR saatiyle zamanla — IG'a otomatik g\xf6nderilir",children:"Zamanla"})]})]},e.id)})}),T.length>0&&(0,s.jsxs)("div",{className:"mt-8 rounded-lg border bg-card p-4 shadow-sm",children:[(0,s.jsxs)("h3",{className:"a-
3h3 mb-3 flex items-center gap-2",children:[(0,s.jsx)(d.Z,{className:"h-4 w-4"}),"Zamanlanmış Postlar (",T.filter(e=>"pending"===e.status).length," bekliyor)"]}),(0,s.jsx)("div",{className:"space-y-1.5",children:T.map(e=>{let a=x[e.postId],t=Object.entries(e.overrides).map(([e,a])=>`${e}=${a}`).join(" \xb7 ");return(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded border-l-4 px-3 py-2 text-sm",style:{borderLeftColor:"pending"===e.status?"#A78BFA":"sent"===e.status?"#10B981":"failed"===e.status?"#EF4444":"#94A3B8"},children:[(0,s.jsx)("code",{className:"text-xs font-bold",children:e.postId}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"truncate",children:[a?.name??e.postId,t&&(0,s.jsxs)("span",{className:"ml-2 text-xs a-muted",children:["[",t,"]"]})]}),(0,s.jsxs)("div",{className:"text-xs a-muted",children:["\uD83D\uDD50 ",e.scheduledTrLabel,"sent"===e.status&&e.igMediaId&&` \xb7 IG ✓ ${e.igMediaId}`,"failed"===e.status&&e.error&&` \xb7 ✗ ${e.error.slice(0,50)}`,"cancelled"===e.status&&" \xb7 iptal"]})]}),(0,s.jsx)(p.C,{variant:"pending"===e.status?"secondary":"outline",className:"text-[10px]",children:"pending"===e.status?"bekliyor":"sent"===e.status?"✓ g\xf6nderildi":"failed"===e.status?"✗ başarısız":"iptal"}),"pending"===e.status&&(0,s.jsx)(u.z,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:()=>E(e.id),title:"İptal et",children:(0,s.jsx)(m.Z,{className:"h-3.5 w-3.5 text-red-600"})})]},e.id)})})]})]})}function f({type:e,value:a,onChange:t,suggest:i}){let n=null===i?[]:"fund"===e?i.funds.slice(0,20).map(e=>({value:e.code,label:`${e.code} \xb7 ${e.name.slice(0,35)}`})):"fund-or-manager"===e?[...i.funds.slice(0,15).map(e=>({value:e.code,label:`${e.code} \xb7 ${e.name.slice(0,30)}`})),...(i.managers??[]).map(e=>({value:e,label:`🏢 ${e}`}))]:"stock"===e?i.stocks.slice(0,20).map(e=>({value:e.ticker,label:`${e.ticker}${e.name&&e.name!==e.ticker?" \xb7 "+e.name.slice(0,25):""}`})):i.themes.map(e=>({value:e,label:e}));return(0,s.jsxs)("div",{children:[(0,s.jsx)("input",{type:"text",value:a,onChange:e=>t(e.target.value),placeholder:"fund"===e?"Fon kodu (\xf6rn. AFA) — boş = otomatik":"fund-or-manager"===e?"Fon kodu (AFA) ya da şemsiye (Ak Portf\xf6y) — boş = otomatik":"stock"===e?"Hisse ticker (\xf6rn. THYAO) — boş = otomatik":"Tema (\xf6rn. Teknoloji) — boş = otomatik",list:`opts-${e}`,className:"w-full rounded border bg-background px-2.5 py-1.5 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,s.jsx)("datalist",{id:`opts-${e}`,children:n.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]})}},25870:function(e,a,t){t.d(a,{Z:function(){return s}});let s=(0,t(13856).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.