PageSourceSearch

https://ckb-academy-progress.vercel.app/_next/static/chunks/app/forks/page-f739e78df40e3212.js

js ckb-academy-progress.vercel.app collected 2026-10-03 05:16:25 UTC 8,973 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{282:function(e,t,a){Promise.resolve().then(a.bind(a,9769))},9769:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return p}});var s=a(7437),r=a(2265),n=a(7648),l=a(9868),i=a(464);function o(e){return"".concat(e.slice(0,12),"…").concat(e.slice(-6))}function d(e){let t=Date.now()-e;return t<6e4?"just now":t<36e5?"".concat(Math.floor(t/6e4),"m ago"):t<864e5?"".concat(Math.floor(t/36e5),"h ago"):new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function c(e){let{node:t,depth:a}=e;return(0,s.jsxs)("div",{style:{marginLeft:24*a,position:"relative"},children:[a>0&&(0,s.jsx)("div",{style:{position:"absolute",left:-16,top:14,width:12,height:2,background:"var(--border)"}}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",marginBottom:"6px",background:t.isFork?"rgba(124,111,255,0.06)":null===t.parentTxHash?"rgba(0,212,170,0.06)":"var(--bg-elevated)",border:"1px solid ".concat(t.isFork?"rgba(124,111,255,0.2)":null===t.parentTxHash?"rgba(0,212,170,0.2)":"var(--border)"),borderRadius:"var(--r-md)",flexWrap:"wrap"},children:[(0,s.jsx)("div",{style:{width:"10px",height:"10px",borderRadius:"50%",flexShrink:0,background:t.isFork?"var(--accent)":null===t.parentTxHash?"var(--primary)":"var(--text-muted)",boxShadow:null===t.parentTxHash?"0 0 6px var(--primary-glow)":"none"}}),(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.78rem",color:"var(--text-secondary)",wordBreak:"break-all"},children:o(t.txHash)}),(0,s.jsxs)("div",{style:{fontSize:"0.7rem",color:"var(--text-muted)"},children:["depth: ",t.depth," \xb7 checksum: 0x",(t.checksum>>>0).toString(16).padStart(8,"0"),t.timestamp&&" \xb7 ".concat(d(t.timestamp))]})]}),null===t.parentTxHash&&(0,s.jsx)("span",{style:{fontSize:"0.65rem",fontWeight:700,padding:"1px 7px",background:"rgba(0,212,170,0.12)",color:"var(--primary)",border:"1px solid rgba(0,212,170,0.2)",borderRadius:"var(--r-full)"},children:"GENESIS"}),t.isFork&&(0,s.jsx)("span",{style:{fontSize:"0.65rem",fontWeight:700,padding:"1px 7px",background:"rgba(124,111,255,0.12)",color:"var(--accent)",border:"1px solid rgba(124,111,255,0.2)",borderRadius:"var(--r-full)"},children:"FORK"}),(0,s.jsx)(n.default,{href:"/post/".concat(t.txHash),className:"btn btn-ghost btn-sm",style:{fontSize:"0.72rem",padding:"3px 8px"},children:"View →"})]}),t.children.map((e,t)=>(0,s.jsx)(c,{node:e,depth:a+1},"".concat(e.txHash,"-").concat(t)))]})}function x(e){let{original:t,branches:a,index:l}=e,[x,p]=(0,r.useState)(!1),h=(0,i.Km)(t);return(0,s.jsxs)("div",{className:"card anim-fade-up",style:{animationDelay:"".concat(80*l,"ms"),marginBottom:"20px"},children:[(0,s.jsxs)("div",{style:{display:"flex",gap:"14px",alignItems:"flex-start",marginBottom:"16px",flexWrap:"wrap"},children:[(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"6px",flexWrap:"wrap"},children:[(0,s.jsx)("span",{className:"badge badge-publish",style:{fontSize:"0.65rem"},children:"ORIGIN"}),(0,s.jsx)(n.default,{href:"/post/".concat(t.txHash),style:{fontWeight:700,fontSize:"1rem",color:"var(--text-primary)",textDecoration:"none"},children:t.metadata.title})]}),(0,s.jsxs)("div",{style:{fontSize:"0.78rem",color:"var(--text-muted)",display:"flex",gap:"10px",flexWrap:"wrap"},children:[(0,s.jsxs)("span",{children:["by ",t.metadata.author.slice(0,12),"…"]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:d(t.metadata.created_at)}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsxs)("span",{children:[a.length," fork branch",1!==a.length?"es":""]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsxs)("span",{children:["v",t.backlinks.length+1]})]})]}),(0,s.jsx)("button",{className:"btn btn-secondary btn-sm",onClick:()=>p(e=>!e),id:"tree-toggle-".concat(t.txHash.slice(2,8)),children:x?"\uD83D\uDCC2 Hide Tree":"\uD83C\uDF3F Show Version Tree"})]}),(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:x?"16px":"0"},children:a.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"10px 14px",background:"rgba(124,111,255,0.05)",border:"1px solid rgba(124,111,255,0.15)",borderRadius:"var(--r-md)",flexWrap:"wrap"},children:[(0,s.jsxs)("span",{style:{color:"var(--accent)",fontWeight:700,fontSize:"0.8rem"}
1,children:["\uD83C\uDF3F Branch ",t+1]}),(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsx)("div",{style:{fontWeight:600,fontSize:"0.88rem",marginBottom:"2px"},children:e.metadata.title}),(0,s.jsxs)("div",{style:{fontSize:"0.73rem",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:[o(e.txHash)," \xb7 ",d(e.metadata.created_at)]})]}),(0,s.jsxs)("div",{style:{display:"flex",gap:"6px"},children:[(0,s.jsxs)("span",{className:"badge badge-append",style:{fontSize:"0.65rem"},children:["v",e.backlinks.length+1]}),(0,s.jsx)(n.default,{href:"/post/".concat(e.txHash),className:"btn btn-ghost btn-sm",style:{fontSize:"0.75rem"},children:"View →"})]})]},e.txHash))}),x&&(0,s.jsxs)("div",{style:{borderTop:"1px solid var(--border)",paddingTop:"16px",marginTop:"4px"},children:[(0,s.jsx)("div",{style:{fontSize:"0.78rem",color:"var(--text-muted)",marginBottom:"12px",fontWeight:600},children:"\uD83D\uDCD0 VERSION TREE — Genesis to Latest"}),(0,s.jsx)(c,{node:h,depth:0})]})]})}function p(){let{posts:e,loadAllPosts:t,globalLoading:a}=(0,l.o)(),[o,d]=(0,r.useState)(new Map),[p,h]=(0,r.useState)(new Map);(0,r.useEffect)(()=>{t()},[t]),(0,r.useEffect)(()=>{if(e.length>0){d((0,i.HU)(e));let t=new Map;for(let a of e)t.set(a.txHash,a);h(t)}},[e]);let m=Array.from(o.entries()).filter(e=>{let[t]=e;return p.has(t)}).map(e=>{let[t,a]=e;return{original:p.get(t),branches:a}});return(0,s.jsxs)("div",{className:"page-content",style:{maxWidth:"1100px"},children:[(0,s.jsxs)("div",{style:{marginBottom:"32px"},className:"anim-fade-up",children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:"14px",flexWrap:"wrap",marginBottom:"10px"},children:[(0,s.jsxs)("div",{style:{flex:1},children:[(0,s.jsx)("h1",{className:"heading-xl",style:{marginBottom:"8px"},children:"\uD83C\uDF74 Fork Explorer"}),(0,s.jsx)("p",{style:{color:"var(--text-secondary)",fontSize:"0.9rem",lineHeight:1.6},children:"All forked posts across the CKBFS network — grouped by original post with full branch trees. Forking creates a new TYPE_ID cell that inherits the complete version history as CellDeps."})]}),(0,s.jsx)(n.default,{href:"/dashboard",className:"btn btn-secondary btn-sm",children:"← Dashboard"})]}),(0,s.jsxs)("div",{className:"protocol-bar",children:[(0,s.jsxs)("div",{className:"pbar-item",children:[(0,s.jsx)("div",{className:"pbar-dot",style:{background:"var(--primary)"}}),(0,s.jsxs)("span",{children:[e.length," posts indexed"]})]}),(0,s.jsxs)("div",{className:"pbar-item",children:[(0,s.jsx)("div",{className:"pbar-dot",style:{background:"var(--accent)"}}),(0,s.jsxs)("span",{children:[m.length," fork group",1!==m.length?"s":""," detected"]})]}),(0,s.jsxs)("div",{className:"pbar-item",children:[(0,s.jsx)("div",{className:"pbar-dot",style:{background:"var(--warning)"}}),(0,s.jsxs)("span",{children:[Array.from(o.values()).flat().length," branch",1!==Array.from(o.values()).flat().length?"es":""," total"]})]})]})]}),a?(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[1,2,3].map(e=>(0,s.jsx)("div",{className:"skeleton",style:{height:"200px"}},e))}):0===m.length?(0,s.jsxs)("div",{className:"empty-state card",children:[(0,s.jsx)("div",{className:"empty-icon",children:"\uD83C\uDF31"}),(0,s.jsx)("div",{className:"empty-title",children:"No forks detected yet"}),(0,s.jsx)("div",{className:"empty-sub",children:"When posts are forked on CKBFS, they share backlink ancestry with the original post. Fork any post to start a new branch inheriting the full version history."}),(0,s.jsxs)("div",{style:{display:"flex",gap:"10px",justifyContent:"center",flexWrap:"wrap"},children:[(0,s.jsx)(n.default,{href:"/",className:"btn btn-primary",children:"Browse Feed"}),(0,s.jsx)(n.default,{href:"/write",className:"btn btn-secondary",children:"Write New Post"})]}),e.length>0&&(0,s.jsxs)("div",{style:{marginTop:"32px",width:"100%",textAlign:"left"},children:[(0,s.jsx)("h3",{className:"heading-sm",style:{marginBottom:"14px",color:"var(--text-secondary)"},children:"\uD83C\uDF3F All Posts (Genesis Nodes)"}),(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.map(e=>{let t=(0,i.Km)(e);return(0,s.jsx)("div",{children:(0,s.jsx)(c,{node:t,depth:0})},e.txHash)})})]})]}):(0,s.jsx)("div",{children:m.map((e,t)=>{let{original:a,branches:r}=e;return(0,s.jsx)(x,{original:a,branches:r,index:t},a.txHash)})})]})}}},function(e){e.O(0,[150,201,648,902,971,117,744],function(){return e(e.s=282)}),_N_E=e.O()}]);

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.