PageSourceSearch

https://bishijie.io/_next/static/chunks/102v3il9-w4pc.js

js bishijie.io collected 2026-10-02 15:10:49 UTC 17,242 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95858,57983,e=>{"use strict";var t=e.i(9735),r=e.i(7744);e.s(["LoadMoreTrigger",0,function({hasMore:e,loading:n,onLoadMore:s}){let l=(0,r.useRef)(null),a=(0,r.useRef)(n),i=(0,r.useRef)(s),[o,d]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{a.current=n,i.current=s}),(0,r.useEffect)(()=>{if(!o)return;let t=l.current;if(!t||!e)return;let r=new IntersectionObserver(([e])=>{e.isIntersecting&&!a.current&&i.current()},{rootMargin:"200px"});return r.observe(t),()=>r.disconnect()},[o,e]),e)?(0,t.jsx)("div",{ref:l,className:"flex justify-center py-4",children:o?n&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"加载中..."}):(0,t.jsx)("button",{type:"button",onClick:()=>{n||(d(!0),s())},disabled:n,className:"rounded-md border border-border/60 bg-card px-4 py-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",children:n?"加载中...":"加载更多"})}):null}],95858),e.s(["PendingBanner",0,function({count:e,label:r="条新消息",onFlush:n}){return 0===e?null:(0,t.jsx)("div",{className:"fixed left-1/2 top-20 z-50 -translate-x-1/2",children:(0,t.jsxs)("button",{onClick:n,className:"rounded-full bg-[var(--brand-primary)] px-5 py-2 text-sm font-medium text-white shadow-lg transition-all hover:bg-[var(--brand-primary-hover)] hover:shadow-xl",children:[e," ",r]})})}],57983)},46288,23517,e=>{"use strict";var t=e.i(7744);e.s(["useDashboard",0,function(e){let[r,n]=(0,t.useState)(e??null),[s,l]=(0,t.useState)(!e),[a,i]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=null;async function t(){try{let e=await fetch("/api/dashboard",{cache:"no-store"});if(!e.ok)throw Error(`HTTP ${e.status}`);n(await e.json()),i(null)}catch(e){i(e instanceof Error?e.message:"加载失败")}finally{l(!1)}}return t(),e=setInterval(t,3e4),()=>{e&&clearInterval(e)}},[]),{data:r,loading:s,error:a}}],46288),e.s(["colorCls",0,function(e){return null==e?"":e>=0?"text-emerald-600":"text-red-600"},"fmtFundingRate",0,function(e){return null==e?"—":(100*e).toFixed(4)+"%"},"fmtLargeNum",0,function(e){if(null==e)return"—";let t=Math.abs(e);return t>=1e12?(e/1e12).toFixed(2)+"T":t>=1e9?(e/1e9).toFixed(2)+"B":t>=1e6?(e/1e6).toFixed(1)+"M":t>=1e3?(e/1e3).toFixed(1)+"K":e.toFixed(2)},"fmtPct",0,function(e){return null==e?"—":(e>0?"+":"")+e.toFixed(2)+"%"},"fmtPrice",0,function(e){if(null==e)return"—";let t=Math.abs(e);return t>=1e3?e.toLocaleString("en-US",{maximumFractionDigits:0}):t>=1?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},"fmtRatio",0,function(e){return null==e?"—":e.toFixed(e>=10?1:2)},"getTd",0,function(e){var t,r,n;let s;if(!e||!e.direction)return{label:"",count:"—",side:"none",level:"none",perfected:!1,tip:""};let l="up"===e.direction?"↑":"↓",a="down"===e.direction?"buy":"sell",i=e.count,o=(t=e.direction,r=i,n=e.perfected,s="up"===t,r>=13?s?"很可能反转下跌":"很可能反转上涨":r>=10?s?"涨势过度延伸":"跌势过度延伸":9===r?n?s?"见顶概率较大":"见底概率较大":s?"可能见顶":"可能见底":r>=7?"接近转折点":"计数中");return i>=13?{label:l,count:String(i),side:a,level:"signal",perfected:!0,tip:o}:9===i?{label:l,count:e.perfected?"9!":"9",side:a,level:"setup",perfected:e.perfected,tip:o}:{label:l,count:String(i),side:a,level:"setup",perfected:!1,tip:o}},"sentimentColor",0,function(e){return e<=24?"#e74c3c":e<=44?"#e67e22":e<=55?"#95a5a6":e<=74?"#7cb342":"#27ae60"},"sentimentLabel",0,function(e){return e<=24?"极度恐惧":e<=44?"恐惧":e<=55?"中性":e<=74?"贪婪":"极度贪婪"}],23517)},988,e=>{"use strict";var t=e.i(9735),r=e.i(7744),n=e.i(95858),s=e.i(57983);let l=Math.floor(Date.now()/1e3),a=new Set,i=null;function o(e){return a.add(e),i||(i=setInterval(()=>{for(let e of(l=Math.floor(Date.now()/1e3),a))e()},1e3)),()=>{a.delete(e),0===a.size&&i&&(clearInterval(i),i=null)}}function d(){return l}function c(){return 0}function u({news:e,isNew:n}){let s,l=(0,r.useRef)(null),a=(0,r.useSyncExternalStore)(o,d,c);(0,r.useEffect)(()=>
1{if(n&&l.current){l.current.classList.add("flash-news-flash");let e=setTimeout(()=>{l.current?.classList.remove("flash-news-flash")},1800);return()=>clearTimeout(e)}},[n]);let i=e.grade>=5;return(0,t.jsxs)("div",{ref:l,className:`rounded-lg bg-card px-4 py-3.5 card-surface ${i?"ring-1 ring-amber-300/40":""}`,children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",suppressHydrationWarning:!0,children:(s=a-e.timestamp)<60?`${Math.max(0,s)}秒前`:s<3600?`${Math.floor(s/60)}分钟前`:s<86400?`${Math.floor(s/3600)}小时前`:`${Math.floor(s/86400)}天前`}),i&&(0,t.jsx)("span",{className:"inline-block rounded-sm bg-red-100 px-1.5 py-0.5 text-[10px] font-semibold leading-none text-red-600 dark:bg-red-900/30 dark:text-red-400",children:"重要"})]}),e.title&&(0,t.jsx)("h3",{className:`leading-relaxed ${i?"text-[15px] font-semibold":"text-sm font-medium"}`,children:e.link&&function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e.link)?(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer nofollow",className:"text-foreground decoration-muted-foreground/40 underline-offset-2 hover:underline",children:e.title}):e.title}),e.content&&e.content!==e.title&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-3 text-[13px] leading-relaxed text-muted-foreground",children:e.content})]})}e.s(["FlashNewsList",0,function({initialData:e}){let{items:l,loading:a,hasMore:i,loadMore:o,newIds:d,pendingCount:c,flushPending:m}=function(e){let[t,n]=(0,r.useState)(e?.items??[]),[s,l]=(0,r.useState)(e?.total??0),[a,i]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),[c,u]=(0,r.useState)(new Set),[m,x]=(0,r.useState)([]),f=(0,r.useRef)(new Set(e?.items.map(e=>e.id)??[])),h=(0,r.useRef)(e?.items.length??0),g=(0,r.useRef)(!0),p=(0,r.useRef)(m);p.current=m;let b=(0,r.useRef)(e),j=(0,r.useCallback)(e=>{n(t=>[...e,...t]),h.current+=e.length,u(new Set(e.map(e=>e.id))),setTimeout(()=>u(new Set),1500),x([])},[]);(0,r.useEffect)(()=>{function e(){let e=window.scrollY<100;g.current=e,e&&p.current.length>0&&j(p.current)}return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[j]),(0,r.useEffect)(()=>{let e=null;async function t(){try{let e=await fetch("/api/flashnews/recent?limit=30&offset=0",{cache:"no-store"});if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),r=t.items.filter(e=>!f.current.has(e.id));for(let e of t.items)f.current.add(e.id);r.length>0&&(g.current?j(r):x(e=>[...r,...e])),l(t.total),d(null)}catch(e){d(e instanceof Error?e.message:"加载失败")}}return async function(){if(b.current)await t();else{i(!0);try{let e=await fetch("/api/flashnews/recent?limit=30&offset=0",{cache:"no-store"});if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();for(let e of t.items)f.current.add(e.id);n(t.items),l(t.total),h.current=t.items.length}catch(e){d(e instanceof Error?e.message:"加载失败")}finally{i(!1)}}e=setInterval(t,6e4)}(),()=>{e&&clearInterval(e)}},[j]);let v=(0,r.useCallback)(()=>{0!==m.length&&(j(m),window.scrollTo({top:0,behavior:"smooth"}))},[m,j]),N=(0,r.useCallback)(async()=>{if(!a){i(!0);try{let e=await fetch(`/api/flashnews/recent?limit=30&offset=${h.current}`,{cache:"no-store"});if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),r=t.items.filter(e=>!f.current.has(e.id));for(let e of r)f.current.add(e.id);n(e=>[...e,...r]),l(t.total),h.current+=t.items.length}catch(e){d(e instanceof Error?e.message:"加载失败")}finally{i(!1)}}},[a]),w=t.length<s;return{items:t,loading:a,error:o,hasMore:w,loadMore:N,newIds:c,pendingCount:m.length,flushPending:v}}(e);return(0,t.jsxs)("div",{children:[(0,t.jsx)(s.PendingBanner,{count:c,label:"条新快讯",onFlush:m}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:0===l.length&&a?(0,t.jsx)("div",{className:"rounded-lg bg-card px-4 py-16 text-center text-sm text-muted-foreground card-surface",children:"加载中..."}):0===l.length?(0,t.jsx)("div",{className:"rounded-lg bg-card px-4 py-16 text-center text-sm text-muted-foreground card-surface",children:"暂无快讯"}):l.map(e=>(0,t.jsx)(u,{news:e,isNew:d.has(e.id)},e.id))}),(0,t.jsx)(n.LoadMoreTrigger,{hasMore:i,loading:a,onLoadMore:o})]})}],988)},81481,e=>{"use strict";var t=e.i(9735),r=e.i(7744),n=e.i(46288),s=e.i(23517),l=e.i(46798);
1let a=[{name:"Onlist - AI API Market",href:"https://onlist.io/",tagline:"最大的 AI API 中转站市场"},{name:"AnyAI",href:"https://anyai.network/",tagline:"AI 自动决策 · 一键交易 CEX 与 DEX"}];function i(){return 0===a.length?null:(0,t.jsxs)("div",{className:"rounded-lg bg-card p-3.5 card-surface",children:[(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"推荐工具"})}),(0,t.jsx)("ul",{className:"space-y-1.5",children:a.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"group block rounded-md border border-border/40 px-3 py-2 transition-colors hover:border-border hover:bg-accent/60",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-foreground",children:e.name}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground/70 transition-colors group-hover:text-muted-foreground",children:"↗"})]}),(0,t.jsx)("p",{className:"mt-0.5 text-[11px] leading-snug text-muted-foreground",children:e.tagline})]})},e.href))})]})}let o=["btc","eth","bnb","sol"];function d({name:e,coin:r}){let n=null!=r.premium.cb;return(0,t.jsxs)("div",{className:"space-y-3 p-3.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"text-xl font-bold tracking-tight text-foreground",children:(0,s.fmtPrice)(r.price)})]}),(0,t.jsx)("span",{className:`mt-0.5 rounded-md px-2 py-0.5 text-xs font-semibold ${r.change_24h>=0?"bg-emerald-50 text-emerald-600 dark:bg-emerald-950/30 dark:text-emerald-400":"bg-red-50 text-red-600 dark:bg-red-950/30 dark:text-red-400"}`,children:(0,s.fmtPct)(r.change_24h)})]}),(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)(c,{label:"Binance",value:(0,s.fmtPrice)(r.premium.b
1n),tag:n&&r.premium.bn>r.premium.cb?"▲":void 0}),(0,t.jsx)(c,{label:"Coinbase",value:n?(0,s.fmtPrice)(r.premium.cb):"—",tag:n&&r.premium.cb>=r.premium.bn?"▲":void 0,muted:!n}),(0,t.jsx)(c,{label:"CB 溢价",value:null!=r.premium.diff?`${r.premium.diff>=0?"+":""}${(0,s.fmtPrice)(r.premium.diff)} (${(0,s.fmtPct)(r.premium.pct)})`:"—",valueCls:null!=r.premium.diff?(0,s.colorCls)(r.premium.diff):"",muted:null==r.premium.diff})]}),(0,t.jsx)("hr",{className:"border-border/40"}),(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)(u,{label:"资金费率",value:(0,s.fmtFundingRate)(r.funding_rate),cls:(0,s.colorCls)(r.funding_rate)}),(0,t.jsx)(u,{label:"持仓量",value:(0,s.fmtLargeNum)(r.open_interest)}),(0,t.jsx)(u,{label:"多空比",value:(0,s.fmtRatio)(r.ls_ratio)}),(0,t.jsx)(u,{label:"大户多空比",value:(0,s.fmtRatio)(r.top_ls_ratio)}),(0,t.jsx)(u,{label:"主动买卖比",value:(0,s.fmtRatio)(r.taker_buy_sell)}),(0,t.jsx)(u,{label:"24h 成交量",value:(0,s.fmtLargeNum)(r.volume_24h)})]}),(0,t.jsx)("hr",{className:"border-border/40"}),(0,t.jsx)(x,{coin:r})]})}function c({label:e,value:r,tag:n,valueCls:s,muted:l}){return(0,t.jsxs)("div",{className:"flex h-5 items-center",children:[(0,t.jsx)("span",{className:"w-16 shrink-0 text-muted-foreground",children:e}),(0,t.jsx)("span",{className:`flex-1 text-right font-medium ${l?"text-muted-foreground/40":s||"text-foreground"}`,children:r}),(0,t.jsx)("span",{className:`w-4 text-center text-emerald-600 ${n?"visible":"invisible"}`,children:n||"▲"})]})}function u({label:e,value:r,cls:n}){return(0,t.jsxs)("div",{className:"flex items-center justify-between py-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e}),(0,t.jsx)("span",{className:`font-semibold ${n||"text-foreground"}`,children:r})]})}function m({label:e,value:r,sub:n,subCls:s}){return(0,t.jsxs)("div",{className:"rounded-lg bg-card px-3 py-2.5 card-surface",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e}),(0,t.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"text-sm font-bold text-foreground",children:r}),n&&(0,t.jsx)("span",{className:`text-[10px] font-medium ${s||""}`,children:n})]})]})}function x({coin:e}){return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1 flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"TD序列"}),(0,t.jsxs)(l.Tooltip,{children:[(0,t.jsx)(l.TooltipTrigger,{className:"cursor-help text-[10px] text-muted-foreground/60",children:"ⓘ"}),(0,t.jsx)(l.TooltipContent,{children:"TD序列是趋势反转指标。计数到 9 表示趋势可能耗尽,9! 表示信号更强,13 以上是最强反转信号。"})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-1.5 text-xs",children:["1h","4h","1d"].map(r=>{let n=(0,s.getTd)(e.td[r]);return(0,t.jsx)(f,{timeframe:r.toUpperCase(),td:n},r)})})]})}function f({timeframe:e,td:r}){let n="signal"===r.level,s="countdown"===r.level,l="buy"===r.side,a="none"===r.level,i=a?"text-muted-foreground/40":l?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400";return(0,t.jsxs)("div",{className:`flex flex-col items-center rounded-md border px-2 py-1.5 ${a?"border-border/50":l?n?"border-red-400 dark:border-red-600":"border-red-300/60 dark:border-red-700/40":n?"border-emerald-400 dark:border-emerald-600":"border-emerald-300/60 dark:border-emerald-700/40"} ${n?"bg-muted/50":""}`,children:[(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e}),(0,t.jsxs)("div",{className:"flex items-baseline gap-0.5",children:[r.label&&(0,t.jsx)("span",{className:`text-[10px] ${i}`,children:r.label}),(0,t.jsx)("span",{className:`text-sm font-bold tabular-nums ${i} ${r.perfected&&s?"animate-pulse":""}`,children:r.count})]}),r.tip&&(0,t.jsx)("span",{className:`text-[9px] leading-tight opacity-70 ${i}`,children:r.tip})]})}e.s(["SidebarDashboard",0,function({initialData:e}){let{data:l,loading:a,error:c}=(0,n.useDashboard)(e),[u,x]=(0,r.useState)("btc");return a&&!l?(0,t.jsx)("div",{className:"rounded-lg bg-card py-10 text-center text-xs text-muted-foreground card-surface",children:"加载中..."}):c&&!l?(0,t.jsxs)("div",{className:"rounded-lg bg-card py-10 text-center text-xs text-red-600 card-surface",children:["加载失败: ",c]}):l?(0,t.jsxs)("div",{className:"space-y-3",children:[l.stale&&(0,t.jsx)("div",{className:"rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-700 dark:border-amber-700/40 dark:bg-amber-950/20 dark:text-amber-400",children:"数据可能延迟"}),(0,t.jsxs)("div",{className:"rounded-lg bg-card px-4 py-3.5 card-surface",children:[(0,t.jsxs)("div",{className:"mb-2.5 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"市场情绪"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-2xl font-bold leading-none",style:{color:(0,s.sentimentColor)(l.sentiment.value)},children:l.sentiment.value}),(0,t.jsx)("span",{className:"text-xs font-semibold",style:{color:(0,s.sentimentColor)(l.sentiment.value)},children:(0,s.sentimentLabel)(l.sentiment.value)})]})]}),(0,t.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:(0,t.jsx)("div",{className:"h-full rounded-full transition-[width] duration-500",style:{width:`${l.sentiment.value}%`,backgroundColor:(0,s.sentimentColor)(l.sentiment.value)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)(m,{label:"总市值",value:(0,s.fmtLargeNum)(l.global.total_market_cap),sub:(0,s.fmtPct)(l.global.market_cap_change_24h),subCls:(0,s.colorCls)(l.global.market_cap_change_24h)}),(0,t.jsx)(m,{label:"24h 成交量",value:(0,s.fmtLargeNum)(l.global.total_volume_24h)}),(0,t.jsx)(m,{label:"BTC 占比",value:`${l.global.btc_dominance.toFixed(1)}%`}),(0,t.jsx)(m,{label:"ETH 占比",value:`${l.global.eth_dominance.toFixed(1)}%`})]}),(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg bg-card card-surface",children:[(0,t.jsx)("div",{className:"flex border-b border-border/50",children:o.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>x(e),className:`flex-1 py-2.5 text-xs font-semibold transition-colors ${u===e?"bg-accent text-foreground shadow-[inset_0_-2px_0_0_theme(--color-emerald-500)]":"text-muted-foreground hover:text-foreground"}`,children:e.toUpperCase()},e))}),(0,t.jsx)(d,{name:u.toUpperCase(),coin:l[u]})]}),(0,t.jsx)(i,{})]}):null}],81481)}]);

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.