1import{j as e}from"./markdown-DgF9YmM-.js";import{b as i}from"./react-vendor-Z1IwLdtg.js";import{f as l,D as C,h as k,p as v,S as E,G as w,b as y,v as g,a as x,i as L,E as _}from"./index-DM2JlXa9.js";import{P as A}from"./PageHeader-Bckr-mem.js";import{G as S}from"./github-D6LGt5NX.js";import"./motion-vendor-alnVVcP-.js";/** 2 * @license lucide-react v0.546.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const M=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],I=l("graduation-cap",M);/** 7 * @license lucide-react v0.546.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const G=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],T=l("heart",G);/** 12 * @license lucide-react v0.546.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const P=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],H=l("link-2",P);/** 17 * @license lucide-react v0.546.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const $=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],z=l("star",$);/** 22 * @license lucide-react v0.546.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const O=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],R=l("users",O);function D(s){const a=k.LINK.GET_PAGE;return C(()=>v(a,s),{url:a,method:"POST",body:s,ttl:3e3})}function K(s){return v(`${k.LINK.CLICK}/${s}`)}const u=[{key:"learning",name:"å¦ä¹ èµæº",icon:I,dot:"bg-chart-2"},{key:"github",name:"GitHub",icon:S,dot:"bg-chart-3"},{key:"recommend",name:"ç¹å«æ¨è",icon:z,dot:"bg-chart-4"},{key:"friends",name:"大佬ä¼ä¼´",icon:R,dot:"bg-chart-1"}];function q(s){return s?s.trim()[0].toUpperCase():"?"}const N=["from-primary to-primary/60","from-chart-2 to-chart-2/60","from-chart-3 to-chart-3/60","from-chart-4 to-chart-4/60","from-chart-5 to-chart-5/60","from-primary/80 to-chart-5/80"];function U(s){const a=s||"?";let t=0;for(let n=0;n<a.length;n++)t=t*31+a.charCodeAt(n)>>>0;return N[t%N.length]}function V(s){const a=s.linkType;if(a===3)return"github";if(a===4)return"learning";if(a===2)return"recommend";const t=(s.name||"").toLowerCase(),n=(s.url||"").toLowerCase();return n.includes("github.com")||t.includes("github")?"github":t.includes("æç¨")||t.includes("å¦ä¹ ")||t.includes("课ç¨")||n.includes("mooc")||n.includes("edu")||n.includes("course")?"learning":t.includes("æ¨è")||t.includes("ç²¾é")||t.includes("å·¥å ·")||t.includes("ä¼ç§")?"recommend":"friends"}function Y(){const[s,a]=i.useState([]),[t,n]=i.useState("all"),[d,m]=i.useState(!0);i.useEffect(()=>{D({page:{current:1,size:100}}).then(r=>{r&&r.records&&a(r.records)}).catch(console.error).finally(()=>m(!1))},[]);const p=r=>{K(r).catch(console.error)},c=i.useMemo(()=>{const r={};return u.forEach(o=>{r[o.key]=[]}),s.forEach(o=>{const h=V(o);(r[h]||r.friends).push(o)}),r},[s]),f=i.useMemo(()=>t==="all"?s:c[t]||[],[t,c,s]);return e.jsxs("div",{className:"container mx-auto px-4 py-8 xl:px-0",children:[e.jsx(E,{title:"åæ é¾æ¥ - ä¼ä¼´ä¸èµæº",description:"ç¬å°æ«çåæ é¾æ¥éåï¼æ¶å½ä¼è´¨ææ¯å客ãå¦ä¹ èµæºã弿ºé¡¹ç®ä¸å¼åè 社åºã欢è¿å¿åéåçå主ä¸å¼åè äºæ¢åé¾ï¼ä¸èµ·æé¿ã",keywords:"åæ é¾æ¥,ææ¯å客,å¦ä¹ èµæº,弿ºé¡¹ç®,å¼åè 社åº,åé¾äº¤æ¢"}
26),e.jsx(A,{icon:w,title:"åæ
龿¥",subtitle:"æµ·å
åç¥å·±ï¼å¤©æ¶¯è¥æ¯é»ã",stats:[{label:"个åé¾",value:s.length}]}),e.jsxs("div",{className:"mb-8 flex flex-wrap justify-center gap-2",role:"group","aria-label":"åé¾åç±»çé",children:[e.jsx(y,{variant:t==="all"?"default":"ghost",onClick:()=>n("all"),children:"å
¨é¨"}),u.map(r=>{const o=r.icon;return e.jsxs(y,{variant:t===r.key?"default":"ghost",onClick:()=>n(r.key),children:[e.jsx(o,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),r.name,e.jsx("span",{className:"ml-2 rounded-full bg-foreground/10 px-2 py-0.5 text-xs",children:c[r.key]?.length||0})]},r.key)})]}),d?e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:Array.from({length:8}).map((r,o)=>e.jsxs(g,{className:"flex items-center gap-4 p-5",children:[e.jsx(x,{className:"h-14 w-14 shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(x,{className:"h-4 w-2/3"}),e.jsx(x,{className:"h-3 w-full"})]})]},o))}):t==="all"?e.jsx("div",{className:"space-y-12",children:u.map(r=>{const o=c[r.key];if(!o||o.length===0)return null;const h=r.icon;return e.jsxs("section",{className:"space-y-6","aria-label":r.name,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:L("flex h-10 w-10 items-center justify-center rounded-xl bg-muted","text-foreground"),children:e.jsx(h,{className:"h-5 w-5","aria-hidden":"true"})}),e.jsx("h2",{className:"font-heading text-xl font-bold text-foreground md:text-2xl",children:r.name}),e.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:["(",o.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:o.map(j=>e.jsx(b,{link:j,onClick:p},j.id))})]},r.key)})}):f.length===0?e.jsx(_,{icon:H,title:"ææ æ¤ç±»å«ç龿¥",description:"æ¢ä¸ªåç±»ççå§ã"}):e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:f.map(r=>e.jsx(b,{link:r,onClick:p},r.id))}),e.jsx(g,{className:"mt-16 rounded-lg border-border p-8 shadow-card",children:e.jsxs("div",{className:"mx-auto max-w-3xl",children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-2 font-heading text-xl font-bold text-foreground",children:[e.jsx(T,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),"ç³è¯·å龿 ¼å¼"]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-2",children:[e.jsxs("ul",{className:"list-inside list-disc space-y-2 text-sm text-muted-foreground",children:[e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold text-foreground",children:"åç§°:"}),"ç¬å°æ«"]}),e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold text-foreground",children:"龿¥:"}),"https://xiaoxiaofeng.com"]}),e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold text-foreground",children:"头å¾:"}),"https://xiaoxiaofeng.com/logo.png"]}),e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold text-foreground",children:"æè¿°:"}),"ä¸ä¸ªçç±åç«¯ææ¯çç¨åºåç½ç«ã"]})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"rounded-lg border border-border bg-muted/50 p-4",children:[e.jsx("p",{className:"mb-2 text-sm text-foreground",children:"è¦æ±:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-muted-foreground",children:[e.jsx("li",{children:"HTTPS æ¯æ"}),e.jsx("li",{children:"å
容å¥åº·åä¸"}),e.jsx("li",{children:"ç»å¸¸æ´æ°ä¼å
"}),e.jsx("li",{children:"请å
æ·»å æ¬ç«åé¾"})]})]})})]}),e.jsx("p",{className:"mt-6 text-sm text-muted-foreground",children:"å¦æä½ ä¹æ³åæäº¤æ¢åé¾,请å
å¨è´µç«æ·»å 䏿¹æ¬ç«é¾æ¥å,ç¹å»é¡¶é¨çãç³è¯·åé¾ãæåé®ä»¶èç³»æ~"})]})})]})}function b({link:s,onClick:a}){const t=q(s.name),n=!!s.logo,d=U(s.name);return e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",onClick:()=>a(s.id),children:e.jsxs(g,{className:"group flex items-center gap-4 roun
26ded-lg border-border bg-card p-5 shadow-card transition-all hover:-translate-y-1 hover:border-primary/40 hover:shadow-hover",children:[e.jsx("div",{className:L("flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-gradient-to-br shadow-sm",d),children:n?e.jsx("img",{src:s.logo,alt:s.name,loading:"lazy",className:"h-10 w-10 object-contain transition-transform group-hover:scale-110",onError:m=>{m.target.style.display="none"}}):e.jsx("span",{className:"font-mono text-xl font-bold text-white drop-shadow-sm",children:t})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"truncate text-base font-bold text-foreground transition-colors group-hover:text-primary",children:s.name}),e.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:s.description})]}),e.jsx("div",{className:"text-muted-foreground/50 transition-colors group-hover:text-primary",children:e.jsx(w,{className:"h-4 w-4","aria-hidden":"true"})})]})})}export{Y as Links};
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.