1import{n as w,o as x,j as e,Z as h,c as p,r as c,z as I,h as k,l as C,B as u,as as P,b as B,a2 as n,bP as F,ac as $,q as T,I as b,U as z,b9 as U,ba as q,b8 as H,p as E,bb as K,aC as X,aE as _,ae as G,G as M,S as Q,ao as V,a$ as Z}from"./index-DEP-8r-f.js";import{P as J}from"./progress-nmllkmM0.js";import{E as W,a as Y,b as ee,c as ae,d as se,e as te}from"./empty-Cv3nav21.js";import{D as re}from"./DashboardPageHeader-Chsk_871.js";import{P as de}from"./PageHeroSection-UzAXlQ9F.js";import{P as oe}from"./pause-D8vAzg2I.js";import{P as ne}from"./play-DZgAJus9.js";import{S as le}from"./square-Cuo0Hh0w.js";import{f as D}from"./formatDistanceToNow-BgVuba46.js";import{D as ie}from"./DeployEarlyOppBotDialog-sU5j4WGk.js";import{I as ce}from"./info-pJhz6vuf.js";import"./separator-DgXe1QpA.js";import"./en-US-B3KlocRr.js";import"./getRoundingMethod-bs9IRxKl.js";import"./endOfDay-IoaCjCHC.js";import"./endOfMonth-DkWY1ISC.js";import"./label-C5k2AAYT.js";import"./select---s7CPLZ.js";import"./index-BPLdpX-e.js";import"./link-y0LOVV7z.js";function pe(a,t){return a instanceof z?a.data.message:t}function A(a){return a>0?"text-chart-2":a<0?"text-destructive":"text-muted-foreground"}function f(a){return`${a<0?"-":""}$${Math.abs(a).toLocaleString(void 0,{maximumFractionDigits:2})}`}function ue({botId:a}){const t=w(x.earlyOpp.listPositions,{botId:a});return t===void 0?e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:62:11","data-hercules-name":"p",className:"text-xs text-muted-foreground px-1 py-2",children:"Loading positionsâ¦"}):t.length===0?e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:66:6","data-hercules-name":"p",className:"text-xs text-muted-foreground px-1 py-2",children:"No positions yet. The bot enters only when an eligible coin has a fresh signal."}):e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:73:4","data-hercules-name":"div",className:"space-y-2",children:t.map(s=>e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:75:8","data-hercules-name":"div",className:"flex items-center justify-between gap-3 rounded-lg border border-border/50 bg-background/40 px-3 py-2",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:79:10","data-hercules-name":"div",className:"min-w-0",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:80:12","data-hercules-name":"div",className:"flex items-center gap-1.5",children:[e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:81:14","data-hercules-name":"span",className:"text-xs font-semibold",children:s.pair}),e.jsx(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:82:14","data-hercules-name":"Badge",className:n("border-0 text-[9px] px-1.5 py-0",s.status==="open"?"bg-chart-2/15 text-chart-2":"bg-muted text-muted-foreground"),children:s.status}),s.tp1Done&&e.jsxs(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:93:16","data-hercules-name":"Badge",className:"border-0 bg-primary/10 text-primary text-[9px] px-1.5 py-0",children:["TP",s.tp2Done?"2":"1"]})]}),e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:98:12","data-hercules-name":"div",className:"text-[10px] text-muted-foreground mt-0.5",children:s.status==="open"?e.jsxs(e.Fragment,{children:[s.tranchesFilled,"/3 tranches · avg ",s.avgEntry>0?s.avgEntry.toPrecision(4):"â"," ·"," ",f(s.investedUsd)," in"]}):e.jsx(e.Fragment,{children:s.closeReason??"Closed"})})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:109:10","data-hercules-name":"div",className:"text-right shrink-0",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:110:12","data-hercules-name":"div",className:n("text-xs font-semibold tabular-nums",A(s.realizedPnl)),children:f(s.realizedPnl)}),e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:113:12","data-hercules-name":"div",className:"text-[10px] text-muted-foreground",children:(()=>{try{const d=s.status==="closed"&&s.closedAt?s.closedAt:s.openedAt;return D(new Date(d),{addSuffix:!0})}catch{return""}})()})]})]},s._id))})}const he={both:"New listings + small caps",new_listing:"New listings",small_cap_explorer:"Small caps"};function me({bot:a}){const[t,s]=c.useState(!1),d=I(x.earlyOpp.setEarlyOppBotStatus),[l,y]=c.useState(!1),o=async i=>{y(!0);try{await d({botId:a._id,status:i}),b.success(i==="running"?"Bot resumed":i==="paused"?"Bot paused":"Bot stopped")}catch(v){b.error(pe(v,"Could not update the bot"))}finally{y(!1)}};return e.jsx(k,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:171:4","data-hercules-name":"Card",className:"border border-border/60",children:e.jsxs(C,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:172:6","data-hercules-name":"CardContent",className:"p-4 space-y-3",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:173:8","data-hercules-name":"div",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:174:10","data-hercules-name":"div",className:"min-w-0",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:175:12","data-hercules-name":"div",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:176:14","data-hercules-name":"span",className:"text-sm font-semibold truncate",children:a.name}),e.jsxs(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:177:14","data-hercules-name":"Badge",className:n("border-0 gap-1 text-[10px]",a.mode==="demo"?"bg-sky-500/15 text-sky-600 dark:text-sky-400":"bg-chart-4/15 text-chart-4"),children:[a.mode==="demo"?e.jsx(P,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:185:39","data-hercules-name":"FlaskConical",className:"h-2.5 w-2.5"}):e.jsx(B,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:185:82","data-hercules-name":"ShieldAlert",className:"h-2.5 w-2.5"}),a.mode==="demo"?"Demo":"Live"]}),e.jsx(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:188:14","data-hercules-name":"Badge",className:n("border-0 text-[10px]",a.status==="running"?"bg-chart-2/15 text-chart-2":a.status==="paused"?"bg-amber-500/15 text-amber-600 dar
1k:text-amber-400":"bg-muted text-muted-foreground"),children:a.status}),a.inCooldown&&e.jsxs(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:201:16","data-hercules-name":"Badge",className:"border-0 bg-muted text-muted-foreground gap-1 text-[10px]",children:[e.jsx(F,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:202:18","data-hercules-name":"Timer",className:"h-2.5 w-2.5"})," cooldown"]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:206:12","data-hercules-name":"div",className:"text-[11px] text-muted-foreground mt-1",children:[he[a.source]," · ",a.accountLabel," · cap $",Math.round(a.perCoinCapUsd),"/coin · budget $",Math.round(a.totalBudgetUsd)]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:210:10","data-hercules-name":"div",className:"text-right shrink-0",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:211:12","data-hercules-name":"div",className:n("text-sm font-bold tabular-nums",A(a.realizedPnl)),children:f(a.realizedPnl)}),e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:214:12","data-hercules-name":"div",className:"text-[10px] text-muted-foreground",children:"realized"})]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:218:8","data-hercules-name":"div",className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:219:10","data-hercules-name":"span",children:[a.openPositions," open"]}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:220:10","data-hercules-name":"span",children:"·"}),e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:221:10","data-hercules-name":"span",children:[f(a.investedUsd)," deployed"]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:224:8","data-hercules-name":"div",className:"flex items-center justify-between gap-2",children:[e.jsxs("button",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:225:10","data-hercules-name":"button",onClick:()=>s(i=>!i),className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground cursor-pointer",children:[t?e.jsx($,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:229:24","data-hercules-name":"ChevronDown",className:"h-3.5 w-3.5"}):e.jsx(T,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:229:66","data-hercules-name":"ChevronRight",className:"h-3.5 w-3.5"}),"Positions"]}),e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:232:10","data-hercules-name":"div",className:"flex items-center gap-1.5",children:a.status!=="stopped"&&e.jsxs(e.Fragment,{children:[a.status==="running"?e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:236:18","data-hercules-name":"Button",size:"sm",variant:"secondary",className:"h-7 gap-1 text-xs cursor-pointer",disabled:l,onClick:()=>o("paused"),children:[e.jsx(oe,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:237:20","data-hercules-name":"Pause",className:"h-3 w-3"})," Pause"]}):e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:240:18","data-hercules-name":"Button",size:"sm",variant:"secondary",className:"h-7 gap-1 text-xs cursor-pointer",disabled:l,onClick:()=>o("running"),children:[e.jsx(ne,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:241:20","data-hercules-name":"Play",className:"h-3 w-3"})," Resume"]}),e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:244:16","data-hercules-name":"Button",size:"sm",variant:"secondary",className:"h-7 gap-1 text-xs text-destructive cursor-pointer",disabled:l,onClick:()=>o("stopped"),children:[e.jsx(le,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:245:18","data-hercules-name":"Square",className:"h-3 w-3"})," Stop"]})]})})]}),t&&e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:253:10","data-hercules-name":"div",className:"pt-1 border-t border-border/50",children:e.jsx(ue,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:254:12","data-hercules-name":"PositionsList",botId:a._id})})]})})}function xe({onDeploy:a}){const t=w(x.earlyOpp.listEarlyOppBots,{});return e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:266:4","data-hercules-name":"div",className:"space-y-3",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:267:6","data-hercules-name":"div",className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:268:8","data-hercules-name":"div",children:[e.jsxs("h2",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:269:10","data-hercules-name":"h2",className:"text-sm font-semibold flex items-center gap-1.5",children:[e.jsx(h,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:270:12","data-hercules-name":"Rocket",className:"h-4 w-4 text-primary"})," My Early Opportunity Bots"]}),e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:272:10","data-hercules-name":"p",className:"text-[11px] text-muted-foreground",children:"Staged entry, staged profit-taking, and an emergency exit router â demo first."})]}),e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:276:8","data-hercules-name":"Button",size:"sm",onClick:a,className:"gap-1.5 shrink-0 cursor-pointer",children:[e.jsx(h,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:277:10","data-hercules-name":"Rocket",className:"h-3.5 w-3.5"})," Deploy bot"]})]}),t===void 0?e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:282:8","data-hercules-name":"p",className:"text-xs text-muted-foreground",children:"Loading your botsâ¦"}):t.length===0?e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:284:8","data-hercules-name":"div",className:"rounded-lg border border-dashed border-border/70 p-4 text-center",children:e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:285:10","data-hercules-name":"p",className:"text-xs text-muted-foreground",children:"No Early Opportunity bots yet. Deploy one in demo to prove it before going live."})}):e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:290:8","data-hercules-name":"div",className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:t.map(s=>e.jsx(me,{"data-hercules-id":"src/pages/dashboard/early-opportunity/_components/EarlyOppBotsSection.tsx:292:12","data-hercules-name":"BotCard",bot:s},s._id))})]})}const ye={eligible:{label:"Eligible",className:"bg-chart-2/15 text-chart-2 border-0",icon:M},shadow:{label:"Shadow (demo)",className:"bg-sky-500/15 text-sky-600 dark:text-sky-400 border-0",icon:P},observing:{label:"Observing",className:"bg-amber-500/15 text-amber-600 dar
1k:text-amber-400 border-0",icon:G},blocked:{label:"Blocked",className:"bg-destructive/15 text-destructive border-0",icon:B}},ge={large:"Large",mid:"Mid",small:"Small Cap",micro:"Micro Cap"};function be(a){return a<=0?"â":a>=1e3?a.toLocaleString(void 0,{maximumFractionDigits:0}):a>=1?a.toFixed(3):a>=.01?a.toFixed(5):a.toPrecision(3)}function fe(a){return a===null?null:a<60?`${a}m`:a<1440?`${Math.floor(a/60)}h`:`${Math.floor(a/1440)}d`}function ve(a,t=!1){const s=t?a<=35:a>=70,d=t?a>=65:a<50;return s?"text-chart-2":d?"text-destructive":"text-amber-600 dark:text-amber-400"}function g({label:a,value:t,invert:s}){return e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:130:4","data-hercules-name":"div",className:"flex flex-col items-center rounded-md bg-background/60 px-2 py-1 min-w-[50px]",children:[e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:131:6","data-hercules-name":"span",className:n("text-sm font-bold tabular-nums",ve(t,s)),children:t}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:134:6","data-hercules-name":"span",className:"text-[9px] text-muted-foreground uppercase tracking-wide",children:a})]})}function je({coin:a}){const t=ye[a.mode],s=t.icon,d=fe(a.listingAgeMinutes),l=a.requiredObservationMin?Math.min(100,Math.round(a.observedMin/a.requiredObservationMin*100)):100;return e.jsx(k,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:148:4","data-hercules-name":"Card",className:"border border-border/60 h-full",children:e.jsxs(C,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:149:6","data-hercules-name":"CardContent",className:"p-4 space-y-3",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:151:8","data-hercules-name":"div",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:152:10","data-hercules-name":"div",className:"flex items-center gap-2.5 min-w-0",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:153:12","data-hercules-name":"div",className:"flex h-9 w-9 items-center justify-center rounded-md bg-muted text-[11px] font-bold shrink-0",children:a.baseCcy.slice(0,4)}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:156:12","data-hercules-name":"div",className:"min-w-0",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:157:14","data-hercules-name":"div",className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:158:16","data-hercules-name":"span",className:"text-sm font-semibold",children:a.pair}),a.source==="new_listing"&&e.jsxs(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:160:18","data-hercules-name":"Badge",className:"bg-primary/10 text-primary border-0 text-[9px] px-1.5 py-0 gap-0.5",children:[e.jsx(Q,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:161:20","data-hercules-name":"Sparkles",className:"h-2.5 w-2.5"})," New listing"]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:165:14","data-hercules-name":"div",className:"flex items-center gap-2 text-[11px] text-muted-foreground mt-0.5",children:[e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:166:16","data-hercules-name":"span",children:["$",be(a.price)]}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:167:16","data-hercules-name":"span",children:"·"}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:168:16","data-hercules-name":"span",children:ge[a.capTier]}),d&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:171:20","data-hercules-name":"span",children:"·"}),e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:172:20","data-hercules-name":"span",children:["Listed ",d," ago"]})]})]})]})]}),e.jsxs(u,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:178:10","data-hercules-name":"Badge",className:n("gap-1 shrink-0",t.className),children:[e.jsx(s,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:179:12","data-hercules-name":"ModeIcon",className:"h-3 w-3"}),t.label]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:185:8","data-hercules-name":"div",className:"flex items-center gap-1.5",children:[e.jsx(g,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:186:10","data-hercules-name":"ScorePill",label:"Reliab",value:a.reliabilityScore}),e.jsx(g,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:187:10","data-hercules-name":"ScorePill",label:"Opp",value:a.opportunityScore}),e.jsx(g,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:188:10","data-hercules-name":"ScorePill",label:"Manip",value:a.manipulationScore,invert:!0}),e.jsx(g,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:189:10","data-hercules-name":"ScorePill",label:"Exit",value:a.exitSafetyScore})]}),a.observationCleared?e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:209:10","data-hercules-name":"div",className:"flex items-center justify-between rounded-lg border border-border/50 bg-background/40 p-2.5 text-[11px]",children:[e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:210:12","data-hercules-name":"span",className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(M,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:211:14","data-hercules-name":"CheckCircle2",className:"h-3 w-3 text-chart-2"})," Observation cleared"]}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:213:12","data-hercules-name":"span",className:n("font-medium",a.signalFresh?"text-chart-2":"text-muted-foreground"),children:a.signalFresh?"Signal fresh":`Signal ${a.signalAgeMin}m old`})]}):e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:194:10","data-hercules-name":"div",className:"space-y-1.5 rounded-lg border border-amber-500/20 bg-amber-500/5 p-2.5",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:195:12","data-hercules-name":"div",className:"flex items-center justify-between text-[11px]",children:[e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:196:14","data-hercules-name":"span",className:"flex items-center gap-1 text-amber-600 dar
1k:text-amber-400 font-medium",children:[e.jsx(V,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:197:16","data-hercules-name":"Clock",className:"h-3 w-3"})," Observation window"]}),e.jsxs("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:199:14","data-hercules-name":"span",className:"tabular-nums text-muted-foreground",children:[a.observedMin,"/",a.requiredObservationMin," min"]})]}),e.jsx(J,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:203:12","data-hercules-name":"Progress",value:l,className:"h-1.5"}),e.jsxs("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:204:12","data-hercules-name":"p",className:"text-[10px] text-muted-foreground",children:["~",a.observationRemainingMin," min until the mandatory watch clears."]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:225:8","data-hercules-name":"div",className:"grid grid-cols-3 gap-2 text-center",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:226:10","data-hercules-name":"div",className:"rounded-lg bg-muted/50 p-2",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:227:12","data-hercules-name":"div",className:"text-[10px] text-muted-foreground",children:"Spread"}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:228:12","data-hercules-name":"div",className:"text-xs font-semibold tabular-nums",children:[a.spreadPct,"%"]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:230:10","data-hercules-name":"div",className:"rounded-lg bg-muted/50 p-2",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:231:12","data-hercules-name":"div",className:"text-[10px] text-muted-foreground",children:"24h Vol"}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:232:12","data-hercules-name":"div",className:"text-xs font-semibold tabular-nums",children:["$",Math.round(a.volCcy24h/1e3).toLocaleString(),"k"]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:236:10","data-hercules-name":"div",className:"rounded-lg bg-muted/50 p-2",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:237:12","data-hercules-name":"div",className:"text-[10px] text-muted-foreground",children:"Max position"}),e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:238:12","data-hercules-name":"div",className:"text-xs font-semibold tabular-nums",children:a.maxAllocationUsd>0?`$${Math.round(a.maxAllocationUsd).toLocaleString()}`:"â"})]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:247:8","data-hercules-name":"div",className:"rounded-lg border border-dashed border-border/70 p-2.5 space-y-1.5",children:[e.jsxs("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:248:10","data-hercules-name":"p",className:"text-[11px] text-foreground/90 leading-relaxed flex gap-1.5",children:[e.jsx(ce,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:249:12","data-hercules-name":"Info",className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:250:12","data-hercules-name":"span",children:a.explanation})]}),e.jsxs("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:252:10","data-hercules-name":"p",className:"text-[10px] text-muted-foreground leading-relaxed flex gap-1.5",children:[e.jsx(Z,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:253:12","data-hercules-name":"Lock",className:"h-3 w-3 shrink-0 mt-0.5"}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:254:12","data-hercules-name":"span",children:a.unlockHint})]})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:258:8","data-hercules-name":"div",className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:259:10","data-hercules-name":"span",children:a.instrumentState!=="live"?a.instrumentState:"live"}),e.jsx("span",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:260:10","data-hercules-name":"span",children:(()=>{try{return`updated ${D(new Date(a.updatedAt))} ago`}catch{return"just now"}})()})]})]})})}function Ne(){const a=w(x.coinIntelligence.listEarlyOpportunities,{}),t=X(x.coinIntelligenceEngine.refreshCoinIntelligenceNow),[s,d]=c.useState(!1),[l,y]=c.useState("all"),o=c.useMemo(()=>a??[],[a]),i=c.useMemo(()=>l==="all"?o:o.filter(r=>r.source===l),[o,l]),[v,j]=c.useState(!1),N=c.useMemo(()=>{const r=o.filter(m=>m.mode==="eligible").length,S=o.filter(m=>m.mode==="observing").length,R=o.filter(m=>m.source==="new_listing").length;return{eligible:r,observing:S,newListings:R}},[o]),O=async()=>{d(!0);try{const r=await t({});b.success(`Scanned ${r.scored} of ${r.candidates} coins`)}catch(r){b.error(r instanceof Error?r.message:"Could not refresh the scan.")}finally{d(!1)}},L=[{id:"all",label:"All"},{id:"new_listing",label:"New listings"},{id:"small_cap_explorer",label:"Small caps"}];return e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:316:4","data-hercules-name":"div",className:"flex flex-col min-h-screen",children:[e.jsx(re,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:317:6","data-hercules-name":"DashboardPageHeader",title:"Small-Cap Explorer",description:"Early-opportunity discovery for new listings and small-cap coins â with a mandatory observation window before any live trade"}),e.jsx(de,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:322:6","data-hercules-name":"PageHeroSection",icon:e.jsx(h,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:323:14","data-hercules-name":"Rocket",className:"h-5 w-5 sm:h-6 sm:w-6"}),eyebrow:"Myra Early Opportunity",title:"Small-Cap Explorer",description:"The riskiest, fastest-moving coins on OKX â brand-new listings and active small caps. Every candidate must clear a mandatory observation window and an eligibility gate before a single dollar can be risked. Deploy the Early Opportunity bot in demo first, then go live.",live:!0,action:e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:329:10","data-hercules-name":"Button",onClick:()=>j(!0),className:"gap-2 cursor-pointer",children:[e.jsx(h,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:330:12","data-hercules-name":"Rocket",className:"h-4 w-4"}),"Deploy bot"]}),stats:[{label:"Eligible",value:String(N.eligible),tone:"positive"},{label:"Observing",value:String(N.observing),tone:"primary"},{label:"New listings",value:String(N.newListings),tone:"default"}]}),e.jsxs("main",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:341:6","data-hercules-name":"main",className:"flex-1 p-4 sm:p-6 space-y-5",children:[e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:343:8","data-hercules-name":"div",className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/5 p-3",children:[e.jsx(B,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:344:10","data-hercules-name":"ShieldAlert",className:"h-4 w-4 text-amber-600 dar
1k:text-amber-400 shrink-0 mt-0.5"}),e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:345:10","data-hercules-name":"p",className:"text-xs text-muted-foreground leading-relaxed",children:"New listings and small caps are highly volatile and can be thinly traded or manipulated. The Early Opportunity engine watches each coin first, uses much lower risk limits, and will never place a blind market order on a thin coin. Only trade with money you can afford to lose."})]}),e.jsx(xe,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:354:8","data-hercules-name":"EarlyOppBotsSection",onDeploy:()=>j(!0)}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:357:8","data-hercules-name":"div",className:"pt-1",children:[e.jsx("h2",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:358:10","data-hercules-name":"h2",className:"text-sm font-semibold",children:"Discovery queue"}),e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:359:10","data-hercules-name":"p",className:"text-[11px] text-muted-foreground",children:"Coins the engine is watching, with their live-trade readiness."})]}),e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:365:8","data-hercules-name":"div",className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:366:10","data-hercules-name":"div",className:"flex items-center gap-2 flex-wrap",children:L.map(r=>e.jsx("button",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:368:14","data-hercules-name":"button",onClick:()=>y(r.id),className:n("rounded-full border px-3 py-1 text-xs font-medium cursor-pointer transition-colors",l===r.id?"border-primary bg-primary text-primary-foreground":"border-border bg-secondary text-muted-foreground hover:text-foreground"),children:r.label},r.id))}),e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:382:10","data-hercules-name":"Button",onClick:O,disabled:s,className:"gap-2 shrink-0 cursor-pointer",children:[e.jsx(_,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:383:12","data-hercules-name":"RefreshCw",className:n("h-4 w-4",s&&"animate-spin")}),s?"Scanning...":"Scan now"]})]}),a===void 0?e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:389:10","data-hercules-name":"div",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((r,S)=>e.jsx(E,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:391:14","data-hercules-name":"Skeleton",className:"h-72 w-full rounded-xl"},S))}):i.length===0?e.jsxs(W,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:395:10","data-hercules-name":"Empty",children:[e.jsxs(Y,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:396:12","data-hercules-name":"EmptyHeader",children:[e.jsx(ee,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:397:14","data-hercules-name":"EmptyMedia",variant:"icon",children:e.jsx(h,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:398:16","data-hercules-name":"Rocket"})}),e.jsx(ae,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:400:14","data-hercules-name":"EmptyTitle",children:"No early opportunities yet"}),e.jsx(se,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:401:14","data-hercules-name":"EmptyDescription",children:"The explorer surfaces new listings and active small caps as the engine screens the OKX market. It runs automatically every 15 minutes while a crypto bot is active, or you can scan now."})]}),e.jsx(te,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:407:12","data-hercules-name":"EmptyContent",children:e.jsxs(p,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:408:14","data-hercules-name":"Button",size:"sm",onClick:O,disabled:s,className:"gap-2 cursor-pointer",children:[e.jsx(_,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:409:16","data-hercules-name":"RefreshCw",className:n("h-4 w-4",s&&"animate-spin")}),"Scan the market"]})})]}):e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:415:10","data-hercules-name":"div",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map(r=>e.jsx(je,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:417:14","data-hercules-name":"OpportunityCard",coin:r},r.instId))})]}),e.jsx(ie,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:423:6","data-hercules-name":"DeployEarlyOppBotDialog",open:v,onOpenChange:j})]})}function qe(){return e.jsxs(e.Fragment,{children:[e.jsx(U,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:431:6","data-hercules-name":"Unauthenticated",children:e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:432:8","data-hercules-name":"div",className:"flex flex-col items-center justify-center min-h-screen gap-4 p-6 text-center",children:[e.jsx(h,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:433:10","data-hercules-name":"Rocket",className:"h-10 w-10 text-primary"}),e.jsx("h1",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:434:10","data-hercules-name":"h1",className:"text-xl font-semibold",children:"Sign in to view the Small-Cap Explorer"}),e.jsx("p",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:435:10","data-hercules-name":"p",className:"text-sm text-muted-foreground max-w-md",children:"Discover new listings and small-cap opportunities with a mandatory observation window and strict eligibility checks before any live trade."}),e.jsx(q,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:439:10","data-hercules-name":"SignInButton"})]})}),e.jsx(H,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:442:6","data-hercules-name":"AuthLoading",children:e.jsxs("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:443:8","data-hercules-name":"div",className:"p-6 space-y-4",children:[e.jsx(E,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:444:10","data-hercules-name":"Skeleton",className:"h-24 w-full"}),e.jsx("div",{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:445:10","data-hercules-name":"div",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((a,t)=>e.jsx(E,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:447:14","data-hercules-name":"Skeleton",className:"h-72 w-full rounded-xl"},t))})]})}),e.jsx(K,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:452:6","data-hercules-name":"Authenticated",children:e.jsx(Ne,{"data-hercules-id":"src/pages/dashboard/early-opportunity/page.tsx:453:8","data-hercules-name":"EarlyOpportunityInner"})})]})}export{qe 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.