PageSourceSearch

https://aktywa.netlify.app/assets/Analitycy-Bexj5HjG.js

js aktywa.netlify.app collected 2026-10-03 10:26:10 UTC 8,559 bytes, 1 lines download raw bytes

1import{a as M,r as l,j as e,c as g}from"./index-CaWDYMXN.js";import{P}from"./PageHeader-B4EuBES5.js";import{C as w,a as v}from"./card-BCAOyHS8.js";import{B as L}from"./button-CS4yFmc0.js";import{S as D}from"./skeleton-DJUlJUcT.js";import{u as $,a as E,M as f}from"./analystTrack-D24ydFsS.js";import{U as O}from"./users-Cz3onSxy.js";import{L as T}from"./loader-circle-zaoxP4mL.js";import{R as F}from"./refresh-cw-C-qW632C.js";import"./chevron-right-C7t6jCS5.js";import"./useQuery-B5oAOMdn.js";import"./useMutation-P0ptm2N2.js";import"./edgeInvokeError-CwXYQxsh.js";const I="[email protected]",z=(a,h=0)=>a==null||!Number.isFinite(a)?"—":`${(a*100).toFixed(h)}%`,C=a=>a==null||!Number.isFinite(a)?"—":`${a>0?"+":""}${(a*100).toFixed(0)}%`,U=a=>a==null?"text-on-surface-variant":a>=.6?"text-tertiary":a<.5?"text-error":"";function te(){const{user:a}=M(),h=((a==null?void 0:a.email)??"").toLowerCase()===I,{rows:i,isLoading:j,error:c,computedAt:N}=$(),y=E(),[o,_]=l.useState("dom"),[u,S]=l.useState(f),[x,A]=l.useState("hit_rate"),[k,R]=l.useState(""),m=l.useMemo(()=>{const t=k.trim().toLowerCase();return i.filter(s=>s.scope===o&&s.n>=u&&(!t||s.name.toLowerCase().includes(t)||s.house.toLowerCase().includes(t))).sort((s,p)=>(p[x]??-1/0)-(s[x]??-1/0)||p.n-s.n)},[i,o,u,x,k]),d=l.useMemo(()=>{const t=i.filter(n=>n.scope==="dom"),s=t.reduce((n,r)=>n+r.n,0),p=t.reduce((n,r)=>n+(r.hits??0),0),b=t.reduce((n,r)=>n+(r.hit_rate==null?0:Math.round((r.hits??0)/(r.hit_rate||1))),0);return{houses:t.length,analysts:i.filter(n=>n.scope==="analityk").length,n:s,hitRate:b>0?p/b:null}},[i]);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(P,{breadcrumb:["Rynki","Analitycy"],title:"Analitycy",subtitle:"Skuteczność domów maklerskich i analityków liczona z ich własnych rekomendacji"}),e.jsx(w,{children:e.jsxs(v,{className:"p-4 text-sm text-on-surface-variant flex gap-2",children:[e.jsx(O,{className:"h-4 w-4 shrink-0 mt-0.5 text-primary"}),e.jsxs("span",{children:["Dla każdej rekomendacji sprzed co najmniej roku sprawdzamy kurs 12 miesięcy po publikacji: ",e.jsx("strong",{children:"trafienie"})," = zwrot w kierunku rekomendacji (cel powyżej ceny = byczo, poniżej = niedźwiedzio), ",e.jsx("strong",{children:"śr. zwrot"})," = średnia tych zwrotów, ",e.jsx("strong",{children:"cel osiągnięty"})," = kurs dotknął celu w ciągu roku. To nasza miara, nie dostawcy: tylko spółki z naszego uniwersum (duże spółki z USA) i tylko rekomendacje, które zebrał FMP. Poniżej ",f," ocenionych rekomendacji wyniku nie pokazujemy. Dlatego najnowsze oceny dotyczą rekomendacji sprzed ponad roku: tę z października 2025 ocenimy w październiku 2026. Skuteczność powyżej 50% to punkt wyjścia; lekcja: większą wagę mają rekomendacje świeże i od analityków o wyższej skuteczności."]})]})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[e.jsx("div",{className:"flex gap-1",children:["dom","analityk"].map(t=>e.jsx("button",{type:"button",onClick:()=>_(t),className:g("rounded-md px-2.5 py-1 border",o===t?"bg-primary text-on-primary border-primary":"border-outline-variant/40 text-on-surface-variant hover:bg-surface-container"),children:t==="dom"?"Domy maklerskie":"Analitycy"},t))}),e.jsxs("label",{className:"inline-flex items-center gap-1.5 text-on-surface-variant",children:["min. rekomendacji",e.jsx("input",{type:"number",min:5,max:500,value:u,onChange:t=>S(Math.max(5,Number(t.target.value)||f)),className:"h-7 w-16 rounded-md border border-outline-variant/40 bg-surface px-2 text-xs tabular-nums"})]}),e.jsxs("label",{className:"inline-flex items-center gap-1.5 text-on-surface-variant",children:["sortuj",e.jsxs("select",{value:x,onChange:t=>A(t.target.value),className:"h-7 rounded-md border border-outline-variant/40 bg-surface px-2 text-xs",children:[e.jsx("option",{value:"hit_rate",children:"trafienia"}),e.jsx("option",{value:"avg_ret",children:"śr. zwrot"}),e.jsx("option",{value:"target_rate",children:"cel osiągnięty"}),e.jsx("option",{value:"n",children:"liczba rekomendacji"})]})]}),e.jsx("input",{value:k,onChange:t=>R(t.target.value),placeholder:"szukaj domu / nazwiska",className:"h-7 w-44 rounded-md border border-outline-variant/40 bg-surface px-2 text-xs"}),e.jsxs("span",{className:"text-on-surface-variant ml-auto",children:[d.houses," domów · ",d.analysts," analityków · ",d.n," ocenionych rekomendacji",d.hitRate!=null?` · trafienia ogółem ${z(d.hitRate)}`:"",N?` · policzone ${new Date(N).toLocaleDateString("pl-PL")}`:""]}),h&&e.jsxs(L,{size:"sm",variant:"outline",className:"h-7 text-xs",disabled:y.isPending,onClick:()=>y.mutate({limit:40,rebuild:!0}),title:"Jeden przebieg: 40 spółek z zaległymi ocenami i przebudowa rankingu; cron robi to sam w nocy",children:[y.isPending?e.jsx(T,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(F,{className:"h-3.5 w-3.5"})," ",e.jsx("span",{className:"ml-1",children:"Przelicz"})]})]}),j&&e.jsx(D,{className:"h-64 w-full rounded-xl"}),c&&e.jsxs("p",{className:"text-sm text-error",children:["Nie udało się wczytać rankingu: ",c instanceof Error?c.message:String(c)]}),!j&&!c&&i.length===0&&e.jsx(w,{children:e.jsx(v,{className:"p-6 text-sm text-on-surface-variant",children:'Ranking jeszcze pusty — cron analyst-track ocenia rekomendacje w nocy (0–6 UTC). Właściciel może uruchomić przebieg przyciskiem „Przelicz".'})}),m.length>0&&e.jsxs(w,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs sm:text-[13px]",children:[e.jsx("thead",{className:"text-on-surface-variant bg-surface-container-low/30",children:e.jsxs("tr",{className:"label-caps",children:[e.jsx("th",{className:"text-left font-medium py-2 px-3",children:"#"}),e.jsx("th",{className:"text-left font-medium py-2 px-3",children:o==="dom"?"Dom maklerski":"Analityk"}),o==="analityk"&&e.jsx("th",{className:"text-left font-medium py-2 px-3",children:"Dom"}),e.jsx("th",{className:"text-right font-medium py-2 px-3",title:"Ocenione rekomendacje (rok po publikacji)",children:"Rek."}),e.jsx("th",{className:"text-right font-medium py-2 px-3",title:"Zwrot 12 mies. w kierunku rekomendacji",children:"Trafienia"}),e.jsx("th",{className:"text-right font-medium py-2 px-3",title:"Średni zwrot 12 mies. po publikacji",children:"Śr. zwrot"}),e.jsx("th",{className:"text-right font-medium py-2 px-3",title:"Mediana zwrotu 12 mies.",children:"Mediana"}),e.jsx("th",{className:"text-right font-medium py-2 px-3",title:"Kurs dotknął celu w ciągu roku",children:"Cel osiągnięty"}),e.jsx("th",{className:"text-right font-medium py-2 px-3",children:"Spółek"}),e.jsx("th",{className:"text-right font-medium py-2 px-3",title:"Data publikacji najnowszej OCENIONEJ rekomendacji. Ocena wymaga roku i 15 dni od publikacji, więc ta data jest zawsze sprzed ponad roku.",children:"Ostatnia ocen."})]})}),e.jsx("tbody",{children:m.slice(0,300).map((t,s)=>e.jsxs("tr",{className:"border-t border-outline-variant/30 hover:bg-surface-container-low/40",children:[e.jsx("td",{className:"py-1.5 px-3 tabular-nums text-on-surface-variant",children:s+1}),e.jsx("td",{className:"py-1.5 px-3 font-medium",children:t.name}),o==="analityk"&&e.jsx("td",{className:"py-1.5 px-3 text-on-surface-variant",children:t.house||"—"}),e.jsx("td",{className:"py-1.5 px-3 text-right tabular-nums",children:t.n}),e.jsxs("td",{className:g("py-1.5 px-3 text-right tabular-nums font-semibold",U(t.hit_rate)),children:[z(t.hit_rate),t.hits!=null?e.jsxs("span",{className:"text-on-surface-variant font-normal",children:[" (",t.hits,")"]}):null]}),e.jsx("td",{className:g("py-1.5 px-3 text-right tabular-nums",t.avg_ret!=null&&(t.avg_ret>=.1?"text-tertiary":t.avg_ret<0?"text-error":"")),children:C(t.avg_ret)}),e.jsx("td",{className:"py-1.5 px-3 text-right tabular-nums",children:C(t.median_ret)}),e.jsx("td",{className:"py-1.5 px-3 text-right tabular-nums",children:z(t.target_rate)}),e.jsx("td",{className:"py-1.5 px-3 text-right tabular-nums",children:t.symbols}),e.jsx("td",{className:"py-1.5 px-3 text-right tabular-nums text-on-surface-variant whitespace-nowrap",children:t.last_date??"—"})]},`${t.scope}|${t.name}|${t.house}`))})]})}),m.length>300&&e.jsxs("p",{className:"px-3 py-2 text-[11px] text-on-surface-variant",children:["Pokazano 300 z ",m.length," — zawęź wyszukiwaniem."]})]}),!j&&i.length>0&&m.length===0&&e.jsxs("p",{className:"text-sm text-on-surface-variant",children:["Nikt nie ma jeszcze ",u," ocenionych rekomendacji w tym widoku — obniż próg albo poczekaj na kolejne noce."]})]})}export{te as default};

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