1import{r as c,j as e}from"./vendor-react-DbFVZiS9.js";import{u as I}from"./vendor-query-qQWDno7u.js";import{c as oe,L as T,P as ee,b as te,f as se,t as U,A as re,d as L,p as D,u as ce,g as w,v as he,l as de,h as O,i as pe,j as _,B as ue,k as me,m as ge,S as M,T as xe,n as ae,o as fe}from"./index-B9etCNLl.js";import{S as je}from"./ShareButtons-iH7dSbFw.js";import{u as p,i as y}from"./vendor-i18n-k0TTF2pe.js";/** 2 * @license lucide-react v0.503.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 be=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],we=oe("arrow-left-right",be);function ne({showHelp:s=!0}){const{t}=p(),a=c.useMemo(()=>Ce(),[]),[n,r]=c.useState(a.leftRepo),[i,o]=c.useState(a.leftRef),[l,u]=c.useState(a.rightRepo),[g,v]=c.useState(a.rightRef),[N,h]=c.useState(null),[S,A]=c.useState(null),[b,C]=c.useState("idle"),[z,P]=c.useState(""),[m,B]=c.useState(null),[k,$]=c.useState(null),d=c.useRef(0),j=async()=>{const x=d.current+1;d.current=x;const f={leftRepo:n.trim(),leftRef:i.trim(),rightRepo:l.trim(),rightRef:g.trim()};U("compare_run",{mode:"repos",leftProvider:D(f.leftRepo),rightProvider:D(f.rightRepo)}),C("running"),P("");try{const[F,ie]=await Promise.all([E(f.leftRepo,f.leftRef),E(f.rightRepo,f.rightRef)]);if(x!==d.current)return;h(F),A(ie),B(K(f.leftRepo,f.rightRepo,f.leftRef,f.rightRef)),C("completed")}catch(F){if(x!==d.current)return;P(F instanceof Error?F.message:t("error.requestFailed")),C("failed")}};return e.jsxs("div",{className:"compare-panel",children:[s?e.jsx("p",{className:"compare-help",children:t("compare.help")}):null,e.jsxs("form",{className:"compare-form",onSubmit:x=>{x.preventDefault(),j()},children:[e.jsx(W,{label:t("compare.leftRepo"),repo:n,refName:i,setRepo:r,setRef:o}),e.jsx("button",{type:"button",className:"copybtn compare-swap","aria-label":t("compare.swapAria"),title:t("compare.swapAria"),onClick:()=>{r(l),u(n),o(g),v(i)},children:e.jsx(we,{size:16,"aria-hidden":"true"})}),e.jsx(W,{label:t("compare.rightRepo"),repo:l,refName:g,setRepo:u,setRef:v}),e.jsxs("button",{className:"btn compare-run",disabled:b==="running",children:[b==="running"?e.jsx(T,{className:"spin",size:15}):e.jsx(ee,{size:15}),t("compare.run")]})]}),e.jsxs("div",{className:"compare-share-row",children:[e.jsx("code",{children:m??t("compare.resultPending")}),e.jsxs("button",{className:"copybtn",type:"button",disabled:!m,onClick:()=>{m&&ye(m).then(x=>$(x?"copied":"failed"))},children:[e.jsx(te,{size:14}),t(k==="copied"?"reportCta.copied":k==="failed"?"reportCta.copyFailedShort":"compare.copyUrl")]})]}),b==="running"?e.jsxs("div",{className:"compare-status",role:"status",children:[e.jsx(T,{className:"spin",size:13,"aria-hidden":"true"})," ",t("compare.running")]}):null,b==="failed"?e.jsxs("div",{className:"compare-error",children:[e.jsx("span",{children:z}),e.jsx("button",{type:"button",className:"copybtn retry-btn",onClick:()=>void j(),children:t("error.retry")})]}):null,m&&m!==K(n,l,i,g)?e.jsx("p",{className:"draft-notice",role:"status",children:t("compare.draftChanged")}):null,N&&S&&m?e.jsx(le,{left:N,right:S,shareUrl:m,sharePlacement:"compare"}):null]})}async function ye(s){const t=await se(s);return t&&U(re.shareClicked,{share_type:"compare_url"}),t}function W({label:s,repo:t,refName:a,setRepo:n,setRef:r}){const{t:i}=p();return e.jsxs("fieldset",{className:"compare-field",children:[e.jsx("legend",{children:s}),e.jsxs("label",{children:[e.jsx("span",{children:i("compare.repoUrl")}),e.jsx("input",{value:t,onChange:o=>n(o.target.value),placeholder:"https://github.com/owner/repo"})]}),e.jsxs("label",{children:[e.jsx("span",{children:i("compare.ref")}),e.jsx("input",{value:a,onChange:o=>r(o.target.value),placeholder:i("compare.refPlaceholder")})]})]})}function Ne({showHelp:s=!0}){const{t}=p(),[a,n]=c.useState(null),r=c.useMemo(()=>Se(),[]),[i,o]=c.useState(r.repo),[l,u]=c.useState(r.base),[g,v]=c.useState(r.head),[N,h]=c.useState(null),[S,A]=c.useState(null),[b,C]=c.useState("idle"),[z,P]=c.useState(""),[m,B]=c.useState(null),k=c.useRef(0),$=async()=>{const d=k.current+1;k.current=d;const j={repo:i.trim(),base:l.trim(),head:g.trim()};U("compare_run",{mode:"diff",provider:D(j.repo)}),C("running"),P("");try{const[x,f]=await Promise.all([E(j.repo,j.base),E(j.repo,j.head)]);if(d!==k.current)return;h(x),A(f),B(Q(j.repo,j.base,j.head)),C("completed")}
6catch(x){if(d!==k.current)return;C("failed"),P(x instanceof Error?x.message:t("error.requestFailed"))}};return e.jsxs("div",{className:"compare-panel diff-panel",children:[s?e.jsx("p",{className:"compare-help",children:t("diff.help")}):null,e.jsxs("form",{className:"compare-form diff-form",onSubmit:d=>{d.preventDefault(),$()},children:[e.jsxs("fieldset",{className:"compare-field",children:[e.jsx("legend",{children:t("diff.repo")}),e.jsxs("label",{children:[e.jsx("span",{children:t("compare.repoUrl")}),e.jsx("input",{value:i,onChange:d=>o(d.target.value),placeholder:"https://github.com/owner/repo"})]})]}),e.jsxs("fieldset",{className:"compare-field",children:[e.jsx("legend",{children:t("diff.refs")}),e.jsxs("label",{children:[e.jsx("span",{children:t("diff.base")}),e.jsx("input",{value:l,onChange:d=>u(d.target.value),placeholder:t("diff.base")})]}),e.jsxs("label",{children:[e.jsx("span",{children:t("diff.head")}),e.jsx("input",{value:g,onChange:d=>v(d.target.value),placeholder:t("diff.head")})]})]}),e.jsxs("button",{className:"btn compare-run",disabled:b==="running",children:[b==="running"?e.jsx(T,{className:"spin",size:15}):e.jsx(ee,{size:15}),t("diff.run")]})]}),e.jsxs("div",{className:"compare-share-row",children:[e.jsx("code",{children:m??t("diff.resultPending")}),e.jsxs("button",{className:"copybtn",type:"button",disabled:!m,onClick:()=>{m&&se(m).then(d=>{d&&U(re.shareClicked,{share_type:"diff_url"}),n(d?"copied":"failed")})},children:[e.jsx(te,{size:14}),t(a==="copied"?"reportCta.copied":a==="failed"?"reportCta.copyFailedShort":"compare.copyUrl")]})]}),b==="running"?e.jsxs("div",{className:"compare-status",role:"status",children:[e.jsx(T,{className:"spin",size:13,"aria-hidden":"true"})," ",t("compare.running")]}):null,b==="failed"?e.jsxs("div",{className:"compare-error",children:[e.jsx("span",{children:z}),e.jsx("button",{type:"button",className:"copybtn retry-btn",onClick:()=>void $(),children:t("error.retry")})]}):null,m&&m!==Q(i,l,g)?e.jsx("p",{className:"draft-notice",role:"status",children:t("compare.draftChanged")}):null,N&&S&&m?e.jsx(le,{left:N,right:S,shareUrl:m,sharePlacement:"diff"}):null]})}function le({left:s,right:t,shareUrl:a,sharePlacement:n}){var v,N;const{t:r}=p(),i=ce(),o=((v=s.languages[0])==null?void 0:v.name)??r("charts.noData"),l=((N=t.languages[0])==null?void 0:N.name)??r("charts.noData"),u=[{label:r("summary.files"),left:s.total.files,right:t.total.files},{label:r("summary.lines"),left:s.total.lines,right:t.total.lines},{label:r("summary.code"),left:s.total.code,right:t.total.code},{label:r("summary.comments"),left:s.total.comments,right:t.total.comments},{label:r("summary.blanks"),left:s.total.blanks,right:t.total.blanks},{label:r("compare.languages"),left:s.languages.length,right:t.languages.length}],g=ve(s,t).slice(0,8);return e.jsxs("div",{className:"compare-results",children:[e.jsxs("div",{className:"compare-head",children:[e.jsxs("div",{children:[e.jsxs("span",{children:[s.repository.owner,"/",s.repository.name]}),e.jsxs("small",{children:[s.refName||r("compare.defaultRef")," · ",s.commitSha.slice(0,12)]}),e.jsx("strong",{children:o})]}),e.jsxs("div",{children:[e.jsxs("span",{children:[t.repository.owner,"/",t.repository.name]}),e.jsxs("small",{children:[t.refName||r("compare.defaultRef")," · ",t.commitSha.slice(0,12)]}),e.jsx("strong",{children:l})]})]}),e.jsx("div",{className:"compare-table-wrap",children:e.jsxs("table",{className:"compare-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:r("compare.metric")}),e.jsx("th",{children:r("compare.left")}),e.jsx("th",{children:r("compare.right")}),e.jsxs("th",{children:[r("compare.delta")," = ",r("compare.right")," â ",r("compare.left")]})]})}),e.jsx("tbody",{children:u.map(h=>e.jsxs("tr",{children:[e.jsx("td",{children:h.label}),e.jsx("td",{children:w(h.left)}),e.jsx("td",{children:w(h.right)}),e.jsx("td",{className:h.right-h.left>=0?"pos":"neg",children:J(h.right-h.left)})]},h.label))})]})}),e.jsxs("div",{className:"compare-language-grid",children:[g.length===0?e.jsx("p",{className:"compare-help",children:r("compare.noSharedLanguages")}):null,g.map(h=>e.jsxs("div",{className:"compare-lang",children:[e.jsx("span",{className:"key-sw",style:{background:he(de(h.name),i)}}),e.jsx("strong",{children:h.name}),e.jsx("span",{children:w(h.left)}),e.jsx("span",{children:w(h.right)}),e.jsx("em",{className:h.delta>=0?"pos":"neg",children:J(h.delta)})]},h.name))]}
6),e.jsx(je,{url:a,text:r("share.compareText",{left:`${s.repository.owner}/${s.repository.name}`,right:`${t.repository.owner}/${t.repository.name}`}),placement:n})]})}async function E(s,t){var n;const a=await pe({repoUrl:s,refName:t,forceRefresh:!1});if(a.kind==="cached")return a.report;for(let r=0;r<14;r+=1){await Re(1500);const i=await _(`/api/jobs/${a.jobId}?wait=20`);if(i.status==="failed")throw new Error(((n=i.error)==null?void 0:n.message)??y.t("compare.analysisFailed"));if(i.status==="completed"&&i.reportId)return _(`/api/reports/${i.reportId}`)}throw new Error(y.t("compare.analysisTimedOut"))}function Re(s){return new Promise(t=>window.setTimeout(t,s))}function ve(s,t){return[...new Set([...s.languages.map(n=>n.name),...t.languages.map(n=>n.name)])].map(n=>{var o,l;const r=((o=s.languages.find(u=>u.name===n))==null?void 0:o.stats.code)??0,i=((l=t.languages.find(u=>u.name===n))==null?void 0:l.stats.code)??0;return{name:n,left:r,right:i,delta:i-r}}).sort((n,r)=>Math.max(r.left,r.right)-Math.max(n.left,n.right))}function J(s){return s===0?"0":`${s>0?"+":"-"}${w(Math.abs(s))}`}function Ce(){if(window.location.pathname.startsWith("/compare/")){const t=ke();return{leftRepo:(t==null?void 0:t.left)||L,leftRef:(t==null?void 0:t.leftRef)||"",rightRepo:(t==null?void 0:t.right)||"https://github.com/tokio-rs/axum",rightRef:(t==null?void 0:t.rightRef)||""}}if(window.location.pathname!=="/compare")return{leftRepo:L,leftRef:"",rightRepo:"https://github.com/tokio-rs/axum",rightRef:""};const s=new URLSearchParams(window.location.search);return{leftRepo:s.get("left")||L,leftRef:s.get("leftRef")??"",rightRepo:s.get("right")||"https://github.com/tokio-rs/axum",rightRef:s.get("rightRef")||""}}function ke(){const s=document.getElementById("octocounts-compare-prefill");if(!(s!=null&&s.textContent))return null;try{return JSON.parse(s.textContent)}catch{return null}}function Se(){if(window.location.pathname!=="/diff")return{repo:L,base:O,head:"main"};const s=new URLSearchParams(window.location.search);return{repo:s.get("repo")||L,base:s.get("base")||O,head:s.get("head")||"main"}}function K(s,t,a,n){const r=new URLSearchParams({left:s.trim(),right:t.trim()});return a.trim()&&r.set("leftRef",a.trim()),n.trim()&&r.set("rightRef",n.trim()),`${window.location.origin}/compare?${r.toString()}`}function Q(s,t,a){const n=new URLSearchParams({repo:s.trim(),base:t.trim(),head:a.trim()});return`${window.location.origin}/diff?${n.toString()}`}function q({cards:s}){const{t}=p();return s.length===0?e.jsx("p",{className:"growth-empty",children:t("growth.empty")}):e.jsx("div",{className:"growth-repo-grid",children:s.map(a=>e.jsxs("a",{className:"growth-repo-card",href:a.href,children:[e.jsx("strong",{children:a.title}),e.jsx("span",{children:a.line}),a.footer?e.jsx("em",{children:a.footer}):null]},a.key))})}function V(s){return s.map(t=>({key:`${t.provider}:${t.owner}/${t.repo}`,title:`${t.owner}/${t.repo}`,line:`${t.topLanguage??y.t("growth.repoCard.mixed")} · ${w(t.total.code)} ${y.t("growth.repoCard.code")}`,href:t.publicPath}))}function Pe(s){return s.map(t=>{var a;return{key:`${t.provider}:${t.owner}/${t.repo}`,title:t.repoFullName,line:`${((a=t.topLanguage)==null?void 0:a.name)??y.t("growth.repoCard.mixed")} · ${w(t.total.code)} ${y.t("growth.repoCard.code")}`,href:t.publicPath}})}function Le(s){return s.map(t=>({key:t.fullName,title:t.fullName,line:`#${t.rank} · ${t.language??y.t("growth.repoCard.mixed")} â ${t.description||y.t("growth.repoCard.trendingFallback")}`,footer:y.t("growth.repoCard.starsToday",{count:t.starsToday,total:w(t.totalStars)}),href:t.publicPath}))}function R({children:s}){const{t}=p();return c.useEffect(()=>{},[]),e.jsxs(e.Fragment,{children:[e.jsx("a",{className:"skip-link",href:"#main",children:t("common.skipToContent")}),e.jsxs("main",{id:"main",className:"page growth-page",children:[e.jsx(xe,{}),s,e.jsxs("footer",{children:[e.jsx("span",{children:t("growth.footerTagline")}),e.jsxs("span",{children:[e.jsx("a",{href:"/stats",children:t("growth.nav.stats.label")})," · ",e.jsx("a",{href:"/recent",children:t("growth.nav.recent.label")})," · ",e.jsx("a",{href:"/popular",children:t("growth.nav.popular.label")})," · ",e.jsx("a",{href:"/trending",children:t("growth.nav.trending.label")})," · ",e.jsx("a",{href:"/hall-of-monoliths",children:t("growth.nav.hall.label")})," · ",e.jsx("a",{href:"/extension",children:t("footer.extension")})," · ",e.jsx("a",{href:"/badges",children:t("footer.badges")})," · ",e.jsx("a",{href:"/privacy",children:t("footer.privacy")})]})]})]})]})}function _e(){const{t:s}=p(),t=I({queryKey:["growth-stats"],queryFn:fe}),a=t.data;return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero","aria-label":s("growth.stats.ariaLabel"),children:[e.jsx("span",{className:"chart-tag",children:s("growth.stats.kicker")}),e.jsx("h1",{children:s("growth.stats.title")}),e.jsx("p",{children:s("growth.stats.subtitle")})]}),t.isLoading?e.jsx(G,{}):null,t.isError?e.jsx(H,{onRetry:()=>void t.refetch()}):null,a?e.jsx(Te,{stats:a}):null]})}function Te({stats:s}){const{t}=p(),a=[{label:t("growth.metrics.reportsGenerated"),value:s.totals.reportsGenerated},{label:t("growth.metrics.repositoriesAnalyzed"),value:s.totals.repositoriesAnalyzed},{label:t("growth.metrics.linesCounted"),value:s.totals.linesCounted},{label:t("growth.metrics.languagesDetected"),value:s.totals.languagesDetected}],n=[{label:t("growth.metrics.reportsToday"),value:s.windows.reportsToday},{label:t("growth.metrics.reports7d"),value:s.windows.reports7d},{label:t("growth.metrics.reports30d"),value:s.windows.reports30d},{label:t("growth.metrics.newRepos30d"),value:s.windows.repositories30d}];return e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"growth-metrics","aria-label":t("growth.metrics.totalsAri
6a"),children:a.map(r=>e.jsx(X,{label:r.label,value:r.value},r.label))}),e.jsx("section",{className:"growth-metrics compact","aria-label":t("growth.metrics.windowsAria"),children:n.map(r=>e.jsx(X,{label:r.label,value:r.value},r.label))}),e.jsxs("section",{className:"growth-grid",children:[e.jsx(Y,{title:t("growth.panels.sources.title"),subtitle:t("growth.panels.sources.subtitle"),children:e.jsx(Z,{rows:s.sources.map(r=>({label:Ee(r.source),value:r.reports}))})}),e.jsx(Y,{title:t("growth.panels.languages.title"),subtitle:t("growth.panels.languages.subtitle"),children:e.jsx(Z,{rows:s.languages.map(r=>({label:r.language,value:r.code}))})})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:t("growth.sections.largest.title")}),e.jsx("span",{className:"sub",children:t("growth.sections.largest.subtitle")})]}),e.jsx(q,{cards:V(s.topRepositories)})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:t("growth.sections.recent.title")}),e.jsx("span",{className:"sub",children:t("growth.sections.recent.subtitle")})]}),e.jsx(q,{cards:V(s.recentRepositories)})]})]})}function Ie({kind:s}){var u;const{t}=p(),a=s==="monoliths"?"/api/seo/monoliths":`/api/seo/${s}`,n=Number(new URLSearchParams(window.location.search).get("page")),r=Number.isInteger(n)&&n>0?n:1,i=I({queryKey:["seo-list",s,r],queryFn:()=>_(`${a}?limit=36&page=${r}`)}),o=qe(s,t),l=(((u=i.data)==null?void 0:u.reports.length)??36)===36;return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero list-hero","aria-label":o.title,children:[e.jsx("span",{className:"chart-tag",children:o.kicker}),e.jsx("h1",{children:o.title}),e.jsx("p",{children:o.subtitle})]}),i.isLoading?e.jsx(G,{}):null,i.isError?e.jsx(H,{onRetry:()=>void i.refetch()}):null,i.data?e.jsx(q,{cards:Pe(i.data.reports)}):null,e.jsxs("nav",{className:"list-pagination","aria-label":t("growth.pagination.ariaLabel"),children:[r>1?e.jsx("a",{className:"copybtn",href:`?page=${r-1}`,children:t("growth.pagination.previous")}):e.jsx("span",{}),e.jsx("span",{children:t("growth.pagination.page",{page:r})}),l?e.jsx("a",{className:"copybtn",href:`?page=${r+1}`,children:t("growth.pagination.next")}):e.jsx("span",{})]})]})}function Ge(){const{t:s}=p(),t=I({queryKey:["github-trending","daily"],queryFn:async()=>{const a=await fetch("/github-trending.json");if(!a.ok)throw new Error(`Trending snapshot returned ${a.status}`);return a.json()},staleTime:3600*1e3});return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero list-hero","aria-label":s("growth.pages.trending.title"),children:[e.jsx("span",{className:"chart-tag",children:s("growth.pages.trending.kicker")}),e.jsx("h1",{children:s("growth.pages.trending.title")}),e.jsx("p",{children:s("growth.pages.trending.subtitle")}),t.data?e.jsxs("p",{className:"sub",children:[s("growth.pages.trending.updated",{date:t.data.date})," · ",e.jsx("a",{href:t.data.source,target:"_blank",rel:"noreferrer",children:"GitHub Trending"})]}):null]}),t.isLoading?e.jsx(G,{}):null,t.isError?e.jsx(H,{onRetry:()=>void t.refetch()}):null,t.data?e.jsx(q,{cards:Le(t.data.repositories)}):null]})}function $e(){const{t:s}=p();return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero tool-hero","aria-label":s("compare.title"),children:[e.jsx("span",{className:"chart-tag",children:s("compare.subtitle")}),e.jsx("h1",{children:s("compare.title")}),e.jsx("p",{children:s("compare.help")})]}),e.jsx(ne,{showHelp:!1})]})}function Fe(){const s=document.getElementById("octocounts-compare-data");if(!(s!=null&&s.textContent))return null;try{const t=JSON.parse(s.textContent);return t&&typeof t.slug=="string"&&typeof t.heading=="string"?t:null}catch{return null}}function He(){const{t:s}=p(),t=c.useMemo(Fe,[]);if(!t)return e.jsx($e,{});const a=t.state==="unavailable"?s("curatedCompare.unavailable"):s("curatedCompare.missing");return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero tool-hero","aria-label":t.heading,children:[e.jsx("span",{className:"chart-tag",children:s("compare.subtitle")}),e.jsx("h1",{children:t.heading}),e.jsx("p",{children:t.state==="ready"?t.definitionText:a})]}),t.state==="ready"?e.jsx(Ue,{model:t}):null,e.jsxs("section",{className:"curated-compare-tool","aria-label":s("compare.title"),children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:s("compare.title")}),e.jsx("span",{className:"sub",children:s("compare.help")})]}),e.jsx(ne,{showHelp:!1})]})]})}function Ue({model:s}){var i,o;const{t}=p();if(!s.left||!s.right||!s.rows)return null;const a=s.methodologyText??"",[n,r]=a.split("See the counting methodology");return e.jsxs("section",{className:"curated-compare-body","aria-label":t("curatedCompare.resultsAria"),children:[s.summaryText?e.jsx("p",{children:s.summaryText}):null,e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:t("compare.metric")}),e.jsx("th",{children:e.jsx("a",{href:s.left.publicPath,children:s.left.repoFullName})}),e.jsx("th",{children:e.jsx("a",{href:s.right.publicPath,children:s.right.repoFullName})})]})}),e.jsx("tbody",{children:s.rows.map(l=>e.jsxs("tr",{children:[e.jsx("td",{children:l.label}),e.jsx("td",{children:l.left}),e.jsx("td",{children:l.right})]},l.label))})]}),s.languageMixText?e.jsx("p",{children:s.languageMixText}):null,s.editorial?e.jsxs("section",{"aria-label":t("curatedCompare.aboutAria"),children:[e.jsx("h2",{children:t("curatedCompare.aboutTitle")}),e.jsx("p",{children:s.editorial.scope}
6),s.editorial.insights.map(l=>e.jsx("p",{children:l},l)),e.jsx("p",{children:e.jsx("em",{children:s.editorial.caution})}),e.jsxs("p",{children:[t("curatedCompare.sourcesLabel")," ",s.editorial.sources.map((l,u)=>e.jsxs("span",{children:[u>0?" · ":"",e.jsx("a",{href:l.url,rel:"noreferrer",children:l.label})]},l.url))," ",t("curatedCompare.verified",{date:s.editorial.verifiedAt})]})]}):null,a?e.jsxs("p",{children:[n,"See the ",e.jsx("a",{href:"/docs/methodology",children:"counting methodology"}),r]}):null,e.jsx("p",{children:t("curatedCompare.nextSteps")}),e.jsxs("ul",{children:[e.jsx("li",{children:e.jsx("a",{href:s.left.publicPath,children:t("curatedCompare.slocReport",{repo:s.left.repoFullName})})}),e.jsx("li",{children:e.jsx("a",{href:s.right.publicPath,children:t("curatedCompare.slocReport",{repo:s.right.repoFullName})})}),e.jsx("li",{children:e.jsx("a",{href:s.interactiveHref,children:t("curatedCompare.interactive",{left:s.left.repoFullName,right:s.right.repoFullName})})})]}),s.disclaimerText?e.jsx("p",{children:s.disclaimerText}):null,(i=s.faq)!=null&&i.length?e.jsxs("div",{className:"how",children:[e.jsx("h2",{children:t("curatedCompare.faqTitle")}),s.faq.map(l=>e.jsxs("div",{className:"step",children:[e.jsx("h3",{children:l.question}),l.answer.split(/\n\n+/).map((u,g)=>e.jsx("p",{children:u},g))]},l.question))]}):null,(o=s.relatedLinks)!=null&&o.length?e.jsx("nav",{"aria-label":t("curatedCompare.relatedAria"),children:e.jsx("ul",{children:s.relatedLinks.map(l=>e.jsx("li",{children:e.jsx("a",{href:l.href,children:l.label})},l.href))})}):null]})}function Oe(){const{t:s}=p();return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero tool-hero","aria-label":s("extensionLanding.heroTitle"),children:[e.jsx("span",{className:"chart-tag",children:s("growth.nav.stats.kicker")}),e.jsx("h1",{children:s("extensionLanding.heroTitle")}),e.jsx("p",{children:s("extensionLanding.heroIntro")})]}),e.jsxs("section",{"aria-label":"Install OctoCounts",children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:s("extensionLanding.installTitle")}),e.jsx("span",{className:"sub",children:s("extensionLanding.installSubtitle")})]}),e.jsxs("div",{className:"hero-paths",children:[e.jsx(M,{store:"chrome",placement:"extension_page",className:"btn install-btn hero-install-primary",size:15,children:s("hero.addToChrome")}),e.jsx(M,{store:"edge",placement:"extension_page",className:"copybtn install-btn secondary-install",size:14,children:s("hero.installEdge")}),e.jsx(M,{store:"firefox",placement:"extension_page",className:"copybtn install-btn secondary-install",size:14,children:s("hero.installFirefox")})]})]}),e.jsxs("section",{"aria-label":"How the extension works",children:[e.jsx("div",{className:"section-h",children:e.jsx("h2",{children:s("extensionLanding.stepsTitle")})}),e.jsxs("ol",{children:[e.jsx("li",{children:s("extensionLanding.step1")}),e.jsx("li",{children:s("extensionLanding.step2")}),e.jsx("li",{children:s("extensionLanding.step3")})]}),e.jsx("h2",{children:s("extensionLanding.permissionsTitle")}),e.jsx("p",{children:s("extensionLanding.permissions")}),e.jsx("h2",{children:s("extensionLanding.scopeTitle")}),e.jsx("p",{children:s("extensionLanding.scope")})]})]})}function We(){const{t:s}=p();return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero tool-hero","aria-label":s("diff.title"),children:[e.jsx("span",{className:"chart-tag",children:s("diff.subtitle")}),e.jsx("h1",{children:s("diff.title")}),e.jsx("p",{children:s("diff.help")})]}),e.jsx(Ne,{showHelp:!1})]})}function Je(){const{t:s}=p(),[t,a]=c.useState(()=>new URLSearchParams(window.location.search).get("repo")??""),[n,r]=c.useState(()=>new URLSearchParams(window.location.search).get("ref")??""),i=s("badgesPage.faq",{returnObjects:!0});return e.jsxs(R,{children:[e.jsxs("section",{className:"growth-hero tool-hero","aria-label":s("badgesPage.title"),children:[e.jsx("span",{className:"chart-tag",children:s("badgesPage.kicker")}),e.jsx("h1",{children:s("badgesPage.title")}),e.jsx("p",{children:s("badgesPage.subtitle")})]}),e.jsxs("form",{className:"badge-target",onSubmit:o=>o.preventDefault(),children:[e.jsxs("label",{children:[e.jsx("span",{children:s("badgesPage.repoLabel")}),e.jsx("input",{value:t,onChange:o=>a(o.target.value),placeholder:"https://github.com/owner/repo","aria-label":s("badgesPage.repoAria")})]}),e.jsxs("label",{children:[e.jsx("span",{children:s("badgesPage.refLabel")}),e.jsx("input",{value:n,onChange:o=>r(o.target.value),placeholder:s("badgesPage.refPlaceholder"),"aria-label":s("badgesPage.refAria")})]})]}),e.jsxs("div",{className:"tool-workspace",children:[e.jsx("section",{"aria-label":s("badgeBuilder.title"),children:e.jsx(ue,{repoUrl:t,refName:n,report:null})}),e.jsxs("section",{"aria-label":s("embedBuilder.title"),children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:s("embedBuilder.title")}),e.jsx("span",{className:"sub",children:s("embedBuilder.subtitle")})]}),e.jsx(me,{repoUrl:t,report:null})]})]}),e.jsx(ge,{}),e.jsxs("section",{"aria-label":s("badgesPage.faqTitle"),children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:s("badgesPage.faqTitle")}),e.jsx("span",{className:"sub",children:s("badgesPage.faqSubtitle")})]}),e.jsx("div",{className:"how",children:i.map((o,l)=>e.jsxs("div",{className:"step",children:[e.jsx("h3",{children:o.question}),e.jsx("p",{children:o.answer})]},l))})]})]})}function X({label:s,value:t}){return e.jsxs("div",{className:"growth-metric",children:[e.jsx("span",{children:s}),e.jsx("strong",{children:ae(t)}),e.jsx("em",{children:w(t)})]})}function Y({title:s,subtitle:t,children:a}){return e.jsxs("div",{className:"growth-panel",children:[e.jsxs("div",{className:"section-h",children:[e.jsx("h2",{children:s}),e.jsx("span",{className:"sub",children:t})]}),a]})}function Z({rows:s}){const{t}=p(),a=Math.max(...s.map(n=>n.value),1);return e.jsx("div",{className:"ranked-bars",children:s.length?s.map(n=>e.jsxs("div",{className:"ranked-row",children:[e.jsx("span",{children:n.label}),e.jsx("i",{children:e.jsx("b",{style:{width:`${Math.max(4,n.value/a*100)}%`}})}),e.jsx("em",{children:ae(n.value)})]},n.label)):e.jsx("p",{className:"growth-empty",children:t("growth.empty")})})}function G(){const{t:s}=p();return e.jsxs("section",{className:"growth-state",children:[e.jsx(T,{className:"spin",size:18})," ",s("growth.loading")]})}function H({onRetry:s}){const{t}=p();return e.jsxs("section",{className:"growth-state",children:[t("growth.error"),s?e.jsx("button",{type:"button",className:"copybtn retry-btn",onClick:s,children:t("error.retry")}):null]})}function Ee(s){return{github_action:"GitHub Action",cli:"CLI",mcp:"MCP",api:"API",extension:"Extension",seed:"Seed",github_trending:"GitHub Trending",web:"Web",unknown:"Unknown"}[s]??s}function qe(s,t){return s==="popular"?{kicker:t("growth.pages.popular.kicker"),title:t("growth.pages.popular.title"),subtitle:t("growth.pages.popular.subtitle")}:s==="monoliths"?{kicker:t("growth.pages.hall.kicker"),title:t("growth.pages.hall.title"),subtitle:t("growth.pages.hall.subtitle")}:{kicker:t("growth.pages.recent.kicker"),title:t("growth.pages.recent.title"),subtitle:t("growth.pages.recent.subtitle")}}export{Je as BadgesPage,$e as ComparePage,He as CuratedComparePage,We as DiffPage,Oe as ExtensionPage,Ie as ReportListPage,_e as StatsPage,Ge as TrendingPage};
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.