tardellirs commited on
Commit
e4cfa78
·
verified ·
1 Parent(s): 4ada44b

Update site

Browse files
assets/{Galaxy-oZTwbQ0K.js → Galaxy-Bhsk97Wo.js} RENAMED
@@ -1 +1 @@
1
- import{d as O,h as Z,g as ye,T as ce,u as r,s as xe,f as U,n as N,a as K,S as he,b as oe,L as ve,c as be,e as ke,A as X}from"./index-Dlh2W4Kh.js";const j=[{label:"Quantized",color:"#7d9dff",of:"Quantized from"},{label:"Fine-tuned",color:"#ff9d4a",of:"Fine-tuned from"},{label:"Adapters",color:"#4ccb8a",of:"Adapter on"},{label:"Merges",color:"#c38dff",of:"Merge built on"}],se="#16161a",le="#ffd21e",ee="#ece9e2",ie=1e3,G=Math.PI*2,Me=Math.PI*(3-Math.sqrt(5)),pe=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function te(n,o){let h=Math.imul(n^2654435769,2246822507)^Math.imul(o+1,3266489909);return h^=h>>>13,h=Math.imul(h,668265263),h^=h>>>16,(h>>>0)/4294967296}const de=(n,o)=>(te(n,o)+te(n,o+11)+te(n,o+23)-1.5)*2,ne=n=>n.split("/").pop()??n;function Ce(n){const{parent:o,rel:h,dl30:p}=n.nodes,d=o.length,i=new Uint8Array(d),C=new Int32Array(d).fill(1),c=new Float64Array(d),u=new Int32Array(d+1);for(let t=1;t<d;t++)i[t]=i[o[t]]+1,u[o[t]+1]++;for(let t=0;t<d;t++)u[t+1]+=u[t];const z=u.slice(0,d),A=new Int32Array(Math.max(0,d-1));for(let t=1;t<d;t++)A[z[o[t]]++]=t;for(let t=0;t<d;t++)c[t]=p[t]||0;for(let t=d-1;t>0;t--)C[o[t]]+=C[t],c[o[t]]+=c[t];const S=new Float32Array(d),y=new Float32Array(d),w=t=>Array.from(A.subarray(u[t],u[t+1])),P=120,x=t=>6.5*Math.sqrt(t+1),E=(t,l,a,s)=>{const f=w(t).sort((b,g)=>c[g]-c[b]),m=[[],[],[],[]];for(const b of f)m[h[b]>=0?h[b]:1].push(b);const v=Math.max(1,f.length),$=m.map(b=>b.length?v<8?1:1+Math.floor(3*b.length/v):0),Y=[0,1,2,3].filter(b=>$[b]).sort((b,g)=>m[g].length-m[b].length),L=[];for(let b=0;b<4;b++)for(const g of Y)b<$[g]&&L.push(g);const F=L.length,T=te(t,99)*G;for(let b=0;b<4;b++){const g=L.flatMap((R,J)=>R===b?[J]:[]);if(!g.length)continue;const H=Math.ceil(m[b].length/g.length);m[b].forEach((R,J)=>{const V=g[J%g.length],Q=Math.sqrt((Math.floor(J/g.length)+.5)/H),re=T+V/F*G+Q*2.5+de(R,1)*.08;let ae=s*(.1+.9*Q)*(1+de(R,2)*.045);const ue=u[R+1]-u[R];ue>=P&&(ae=Math.max(ae,s*.22+x(ue)));const me=de(R,3)*s*(.014+.055*Q);S[R]=l+Math.cos(re)*ae-Math.sin(re)*me,y[R]=a+Math.sin(re)*ae+Math.cos(re)*me})}},k=t=>{const l=w(t),a=x(l.length)/Math.sqrt(l.length+1),s=te(t,5)*G;l.forEach((f,m)=>{const v=a*Math.sqrt(m+1.2),$=s+m*Me;S[f]=S[t]+Math.cos($)*v,y[f]=y[t]+Math.sin($)*v})};E(0,0,0,ie);for(let t=1;t<d;t++){const l=u[t+1]-u[t];l>=P?E(t,S[t],y[t],x(l)):l&&k(t)}const I=new Float32Array(d),q=new Int32Array(d),D=new Float32Array(d);for(let t=0;t<d;t++)I[t]=.55+.42*Math.log10(1+(p[t]||0)),q[t]=t;q.sort((t,l)=>(p[l]||0)-(p[t]||0)),q.forEach((t,l)=>{D[t]=.45*(l/d)});const W=[0,1,2,3].map(t=>Int32Array.from({length:d},(l,a)=>a).filter(l=>l>0&&(h[l]>=0?h[l]:1)===t)),B=Array.from({length:d},(t,l)=>Math.hypot(S[l],y[l])).sort((t,l)=>t-l),_=Math.max(ie*.35,B[Math.floor((d-1)*.995)]??ie),M=16,e=new Map;for(let t=0;t<d;t++){const l=Math.floor(S[t]/M)*100003+Math.floor(y[t]/M),a=e.get(l);a?a.push(t):e.set(l,[t])}return{n:d,x:S,y,size:I,delay:D,sub:C,byRel:W,order:q,extent:_,cell:M,grid:e}}function we(n,o,h,p,d,i,C){var _;const{x:c,y:u,size:z,delay:A}=i;n.globalCompositeOperation="source-over",n.globalAlpha=1,n.fillStyle=se,n.fillRect(0,0,o,h);const S=(0-p.cx)*p.k+o/2,y=(0-p.cy)*p.k+h/2,w=n.createRadialGradient(S,y,0,S,y,Math.max(80,ie*.45*p.k));w.addColorStop(0,"rgba(255,210,30,0.20)"),w.addColorStop(1,"rgba(255,210,30,0)"),n.fillStyle=w,n.fillRect(0,0,o,h);const P=Math.min(3.2,Math.max(1,Math.sqrt(p.k/C.kFit))),x=C.p<1,E=(M,e)=>{let t=c[M],l=u[M];if(x){const a=Math.min(1,Math.max(0,(C.p-A[M])/.55)),s=1-(1-a)**3;if(s<=0)return!1;const f=(1-s)*1.3,m=.12+.88*s,v=Math.cos(f),$=Math.sin(f);[t,l]=[(t*v-l*$)*m,(t*$+l*v)*m]}return e[0]=(t-p.cx)*p.k+o/2,e[1]=(l-p.cy)*p.k+h/2,!0},k=[0,0];n.globalCompositeOperation="lighter";for(let M=0;M<4;M++){if(C.hidden[M])continue;n.fillStyle=j[M].color;const e=new Path2D,t=new Path2D;for(const l of i.byRel[M]){if(!E(l,k))continue;const a=z[l]*P,s=k[0],f=k[1];s<-a||f<-a||s>o+a||f>h+a||(a<1.15?e.rect(s-a,f-a,a*2,a*2):(t.moveTo(s+a,f),t.arc(s,f,a,0,G)))}n.globalAlpha=.5,n.fill(e),n.globalAlpha=.85,n.fill(t)}n.globalAlpha=.9,n.fillStyle="#fff",n.beginPath();for(let M=0,e=0;M<i.n&&e<80;M++){const t=i.order[M];if(t===0||(d.nodes.dl30[t]||0)<2e4)break;const l=d.nodes.rel[t]>=0?d.nodes.rel[t]:1;if(C.hidden[l]||!E(t,k))continue;const a=z[t]*P*.42;n.moveTo(k[0]+a,k[1]),n.arc(k[0],k[1],a,0,G),e++}if(n.fill(),n.globalCompositeOperation="source-over",n.globalAlpha=1,!x)for(const M of[C.sel,C.hover])fe(n,o,h,p,d,i,C.kFit,M,M===C.sel);const I=9+3*Math.sqrt(P);if(E(0,k)&&(n.beginPath(),n.arc(k[0],k[1],I+6,0,G),n.fillStyle="rgba(255,210,30,0.22)",n.fill(),n.beginPath(),n.arc(k[0],k[1],I,0,G),n.fillStyle=le,n.fill(),n.lineWidth=2.5,n.strokeStyle=se,n.stroke()),!C.labels||x)return;const q=Math.min(36,Math.round(8+7*Math.max(0,Math.log2(p.k/C.kFit)))),D=[[k[0]-I-4,k[1]-I-4,I*2+8,I*2+8],[o-64,0,64,150]];n.font="600 12.5px 'Source Sans 3', system-ui, sans-serif",n.textBaseline="middle",n.lineJoin="round";let W=0;const B=new Set;for(let M=0;M<Math.min(i.n,600)&&W<q;M++){const e=i.order[M],t=d.nodes.rel[e]>=0?d.nodes.rel[e]:1;if(e===0||C.hidden[t]||!(d.nodes.dl30[e]>0))continue;E(e,k);const l=z[e]*P,a=ne(d.nodes.id[e]);if(B.has(a))continue;const s=n.measureText(a).width,f=k[0]+l+5,m=k[1]-9;f<4||m<4||f+s>o-4||m+18>h-4||D.some(v=>f<v[0]+v[2]&&f+s>v[0]&&m<v[1]+v[3]&&m+18>v[1])||(D.push([f-2,m,s+4,18]),(_=C.labelHits)==null||_.push([f-2,m,s+4,18,e]),B.add(a),n.lineWidth=3.5,n.strokeStyle=se,n.strokeText(a,f,k[1]),n.fillStyle=ee,n.fillText(a,f,k[1]),W++)}}function fe(n,o,h,p,d,i,C,c,u){if(c<=0)return;const z=Math.min(3.2,Math.max(1,Math.sqrt(p.k/C))),A=w=>(i.x[w]-p.cx)*p.k+o/2,S=w=>(i.y[w]-p.cy)*p.k+h/2;n.beginPath(),n.strokeStyle=le,n.lineWidth=1.6,n.globalAlpha=.85;let y=c;for(n.moveTo(A(y),S(y));y>0;)y=d.nodes.parent[y],n.lineTo(A(y),S(y));n.stroke(),n.globalAlpha=1,n.beginPath(),n.arc(A(c),S(c),i.size[c]*z+5,0,G),n.strokeStyle=u?le:"#fff",n.lineWidth=2,n.stroke()}function ge(n,o,h){return{k:(Math.min(o,h)/2-18)/(n.extent*1.04),cx:0,cy:0}}function Se({g:n,L:o,hidden:h,sel:p,onSel:d,flyTo:i}){const C=X(null),c=X(null),u=X({W:0,H:0,dpr:1,view:{k:1,cx:0,cy:0},kFit:1,p:pe()?1:0,hover:-1,raf:0,labels:[]}),z=X({hidden:h,sel:p});z.current={hidden:h,sel:p};const[A,S]=O(null),y=X(null),w=X(0),P=()=>{var s,f;const e=u.current,t=(s=c.current)==null?void 0:s.getContext("2d");if(!t||!e.W)return;t.setTransform(e.dpr,0,0,e.dpr,0,0),e.labels=[];const l=performance.now();we(t,e.W,e.H,e.view,n,o,{p:e.p,hidden:z.current.hidden,hover:-1,sel:z.current.sel,kFit:e.kFit,labels:!0,labelHits:e.labels});const a=performance.now()-l>22;if(e.p>=1){const m=((f=y.current)==null?void 0:f.img)??document.createElement("canvas");(m.width!==c.current.width||m.height!==c.current.height)&&(m.width=c.current.width,m.height=c.current.height);const v=m.getContext("2d");v.setTransform(1,0,0,1,0,0),v.drawImage(c.current,0,0),y.current={img:m,view:{...e.view},heavy:a}}fe(t,e.W,e.H,e.view,n,o,e.kFit,e.hover,!1)},x=()=>{var m;const e=u.current,t=(m=c.current)==null?void 0:m.getContext("2d"),l=y.current;if(!t||!l)return P();const a=e.view.k/l.view.k;t.setTransform(1,0,0,1,0,0),t.fillStyle=se,t.fillRect(0,0,c.current.width,c.current.height);const s=(e.W/2-e.W/2*a+(l.view.cx-e.view.cx)*e.view.k)*e.dpr,f=(e.H/2-e.H/2*a+(l.view.cy-e.view.cy)*e.view.k)*e.dpr;t.drawImage(l.img,s,f,l.img.width*a,l.img.height*a),t.setTransform(e.dpr,0,0,e.dpr,0,0),a===1&&s===0&&f===0&&fe(t,e.W,e.H,e.view,n,o,e.kFit,e.hover,!1)},E=()=>{const e=u.current;e.raf||(e.raf=requestAnimationFrame(()=>{e.raf=0,P()}))},k=()=>{var t;const e=u.current;if(!((t=y.current)!=null&&t.heavy))return E();e.raf||(e.raf=requestAnimationFrame(()=>{e.raf=0,x()})),clearTimeout(w.current),w.current=window.setTimeout(E,160)},I=()=>{const e=u.current,t=y.current;t&&t.view.k===e.view.k&&t.view.cx===e.view.cx&&t.view.cy===e.view.cy&&e.p>=1?e.raf||(e.raf=requestAnimationFrame(()=>{e.raf=0,x()})):E()},q=(e,t,l=!1)=>{if(pe()){t(1),E();return}const a=performance.now(),s=f=>{var v;const m=Math.min(1,(f-a)/e);t(m),l&&m<1&&((v=y.current)!=null&&v.heavy)?x():P(),m<1&&requestAnimationFrame(s)};requestAnimationFrame(s)};Z(()=>{const e=u.current,t=()=>{const a=C.current.getBoundingClientRect(),s=!e.W;e.W=a.width,e.H=a.height,e.dpr=Math.min(2,devicePixelRatio||1),c.current.width=Math.round(e.W*e.dpr),c.current.height=Math.round(e.H*e.dpr);const f=ge(o,e.W,e.H);s?e.view=f:e.view={...e.view,k:e.view.k*(f.k/e.kFit)},e.kFit=f.k,P()},l=new ResizeObserver(t);return l.observe(C.current),e.p<1&&q(2e3,a=>{e.p=a}),()=>{l.disconnect(),clearTimeout(w.current)}},[o]),Z(E,[h,p]),Z(()=>{if(!i)return;const e=u.current,t={...e.view},l={k:Math.max(t.k,e.kFit*5),cx:o.x[i.i],cy:o.y[i.i]};q(700,a=>{const s=a<.5?4*a**3:1-(-2*a+2)**3/2;e.view={k:t.k*(l.k/t.k)**s,cx:t.cx+(l.cx-t.cx)*s,cy:t.cy+(l.cy-t.cy)*s}},!0)},[i]);const D=(e,t,l)=>{const a=u.current,s=a.view,f=(e-a.W/2)/s.k+s.cx,m=(t-a.H/2)/s.k+s.cy,v=Math.min(a.kFit*80,Math.max(a.kFit*.6,s.k*l));a.view={k:v,cx:f-(e-a.W/2)/v,cy:m-(t-a.H/2)/v},k()},W=(e,t)=>{const l=u.current,a=l.view;for(const g of l.labels)if(e>=g[0]&&e<=g[0]+g[2]&&t>=g[1]&&t<=g[1]+g[3])return g[4];const s=(e-l.W/2)/a.k+a.cx,f=(t-l.H/2)/a.k+a.cy,m=Math.min(3.2,Math.max(1,Math.sqrt(a.k/l.kFit))),v=14/a.k,$=Math.floor((s-v)/o.cell),Y=Math.floor((s+v)/o.cell),L=Math.floor((f-v)/o.cell),F=Math.floor((f+v)/o.cell);let T=-1,b=1/0;for(let g=$;g<=Y;g++)for(let H=L;H<=F;H++)for(const R of o.grid.get(g*100003+H)??[]){const J=n.nodes.rel[R]>=0?n.nodes.rel[R]:1;if(R>0&&z.current.hidden[J])continue;const V=R===0?12:o.size[R]*m,Q=Math.hypot((o.x[R]-s)*a.k,(o.y[R]-f)*a.k);Q<=Math.max(7,V+5)&&Q-1.6*V<b&&(T=R,b=Q-1.6*V)}return T};Z(()=>{const e=c.current,t=u.current,l=new Map;let a=0,s=0;const f=F=>{const T=e.getBoundingClientRect();return{x:F.clientX-T.left,y:F.clientY-T.top}},m=F=>{e.setPointerCapture(F.pointerId),l.set(F.pointerId,f(F)),a=0,s=0},v=F=>{const T=f(F);if(!l.has(F.pointerId)){if(F.pointerType!=="mouse")return;const g=W(T.x,T.y);g!==t.hover&&(t.hover=g,I()),S(g>=0?{i:g,x:T.x,y:T.y}:null),e.style.cursor=g>=0?"pointer":"grab";return}const b=l.get(F.pointerId);if(l.set(F.pointerId,T),l.size===1)a+=Math.abs(T.x-b.x)+Math.abs(T.y-b.y),t.view={...t.view,cx:t.view.cx-(T.x-b.x)/t.view.k,cy:t.view.cy-(T.y-b.y)/t.view.k},t.hover>=0&&(t.hover=-1,S(null)),k();else if(l.size===2){const[g,H]=[...l.values()],R=Math.hypot(g.x-H.x,g.y-H.y);s&&D((g.x+H.x)/2,(g.y+H.y)/2,R/s),s=R,a=99}},$=F=>{const T=l.get(F.pointerId);if(l.delete(F.pointerId),l.size<2&&(s=0),T&&a<6&&l.size===0){const b=W(T.x,T.y);B.current(b>0?b:-1)}},Y=F=>{F.preventDefault();const T=f(F);D(T.x,T.y,Math.exp(-F.deltaY*(F.deltaMode?.05:.0018)))},L=()=>{t.hover>=0&&(t.hover=-1,I()),S(null)};return e.addEventListener("pointerdown",m),e.addEventListener("pointermove",v),e.addEventListener("pointerup",$),e.addEventListener("pointercancel",$),e.addEventListener("pointerleave",L),e.addEventListener("wheel",Y,{passive:!1}),()=>{e.removeEventListener("pointerdown",m),e.removeEventListener("pointermove",v),e.removeEventListener("pointerup",$),e.removeEventListener("pointercancel",$),e.removeEventListener("pointerleave",L),e.removeEventListener("wheel",Y)}},[o]);const B=X(d);B.current=d;const _=e=>{const t=u.current;D(t.W/2,t.H/2,e)},M=()=>{const e=u.current,t={...e.view},l=ge(o,e.W,e.H);q(500,a=>{const s=1-(1-a)**3;e.view={k:t.k+(l.k-t.k)*s,cx:t.cx*(1-s),cy:t.cy*(1-s)}},!0)};return r("div",{class:"g-sky",ref:C,children:[r("canvas",{ref:c,role:"img","aria-label":`A galaxy of ${U(o.n-1)} models built on ${n.root.id}`}),r("div",{class:"g-zoom",children:[r("button",{"aria-label":"Zoom in",onClick:()=>_(1.6),children:"+"}),r("button",{"aria-label":"Zoom out",onClick:()=>_(1/1.6),children:"−"}),r("button",{"aria-label":"Show the whole galaxy",onClick:M,children:"⤢"})]}),A&&A.i!==p&&r("div",{class:"g-tip",style:{left:A.x,top:A.y},children:[r("b",{children:n.nodes.id[A.i]}),r("span",{children:[A.i===0?"the base model":j[n.nodes.rel[A.i]>=0?n.nodes.rel[A.i]:1].label.toLowerCase().replace(/s$/,""),", ",oe(n.nodes.dl30[A.i])," downloads in 30 days"]})]}),r("span",{class:"g-hint",children:"Drag to move, scroll or pinch to zoom"})]})}async function Fe(n,o){await Promise.all(["600 60px 'Fredoka'","500 20px 'IBM Plex Mono'","600 14px 'Source Sans 3'"].map(w=>document.fonts.load(w)));const h=1600,p=900,d=document.createElement("canvas");d.width=h,d.height=p;const i=d.getContext("2d"),C=(p/2-30)/(o.extent*1.02);we(i,h,p,{k:C,cx:-260/C,cy:0},n,o,{p:1,hidden:[!1,!1,!1,!1],hover:-1,sel:-1,kFit:C,labels:!0});const c=i.createLinearGradient(0,0,760,0);c.addColorStop(0,"rgba(22,22,26,0.96)"),c.addColorStop(.75,"rgba(22,22,26,0.75)"),c.addColorStop(1,"rgba(22,22,26,0)"),i.fillStyle=c,i.fillRect(0,0,760,p);const u=(w,P,x,E,k,I=600)=>{if(i.font=E,i.fillStyle=k,i.textBaseline="alphabetic",i.measureText(w).width>I){for(;w.length>3&&i.measureText(w+"…").width>I;)w=w.slice(0,-1);w+="…"}i.fillText(w,P,x)};i.fillStyle=le,i.beginPath(),i.roundRect(64,64,56,56,14),i.fill(),i.beginPath(),i.lineWidth=5,i.strokeStyle="#1b1b1f",i.lineJoin="round",i.lineCap="round",i.moveTo(74,94),i.lineTo(84,94),i.lineTo(90,78),i.lineTo(100,108),i.lineTo(106,94),i.lineTo(112,94),i.stroke(),u("Model Pulse Galaxy",136,104,"600 32px 'Fredoka'",ee);const[z,A]=n.root.id.includes("/")?n.root.id.split("/"):["",n.root.id];u(z?z+"/":"",64,236,"500 24px 'IBM Plex Mono'","#a9a69e"),u(A,62,306,`600 ${A.length>18?52:66}px 'Fredoka'`,le,640),u(U(n.total),64,420,"600 76px 'Fredoka'",ee),u("models built on it",66,460,"500 24px 'IBM Plex Mono'","#a9a69e"),n.root.fam_dl30&&(u(oe(n.root.fam_dl30),64,556,"600 52px 'Fredoka'",ee),u("family downloads in the last 30 days",66,592,"500 22px 'IBM Plex Mono'","#a9a69e"));const S=[0,1,2,3].map(w=>o.byRel[w].length);let y=680;return j.forEach((w,P)=>{S[P]&&(i.fillStyle=w.color,i.beginPath(),i.arc(74,y-8,8,0,G),i.fill(),u(`${w.label} ${U(S[P])}`,94,y,"500 22px 'IBM Plex Mono'",ee),y+=38)}),u("modelpulse.ifsp.dev",64,p-44,"500 20px 'IBM Plex Mono'","#a9a69e"),new Promise(w=>d.toBlob(P=>w(P),"image/png"))}function Te(){const[n,o]=O([]);return Z(()=>{document.title="Model galaxies: every model built on Llama, Qwen, FLUX and more · Model Pulse",ye("/api/galaxies").then(h=>o(h.slice(0,16))).catch(()=>{})},[]),r(he,{children:[r("div",{class:"wrap w-entry g-entry",children:[r("h1",{children:[r(be,{size:72}),"Model Pulse ",r("span",{class:"hl",children:"Galaxy"})]}),r("p",{class:"lede",children:"Pick a base model and see every model built on it, from quantizations and fine-tunes to adapters and merges. The most downloaded shine brightest."}),r("div",{class:"g-search",children:r(ke,{big:!0,placeholder:"A base model, e.g. meta-llama/Llama-3.1-8B",onPick:h=>N({view:"galaxy",model:h})})})]}),n.length>0&&r("section",{class:"wrap g-fams",children:[r("h2",{children:"The biggest galaxies right now"}),r("div",{class:"g-grid",children:n.map((h,p)=>r("a",{class:"g-fam",href:K({view:"galaxy",model:h.id}),onClick:d=>{d.preventDefault(),N({view:"galaxy",model:h.id})},children:[r("i",{class:"g-dot",style:{transform:`rotate(${p*47}deg)`},"aria-hidden":"true"}),r("span",{class:"o",children:[h.id.split("/")[0],"/"]}),r("span",{class:"nm",children:ne(h.id)}),r("span",{class:"c",children:[U(h.fam_members)," models, ",oe(h.fam_dl30)," downloads in 30 days"]})]},h.id))})]})]})}function Pe({model:n}){const[o,h]=O(null),[p,d]=O(null),[i,C]=O([!1,!1,!1,!1]),[c,u]=O(-1),[z,A]=O(null),[S,y]=O(""),[w,P]=O(!1);Z(()=>{n&&(document.title=`${n} galaxy: every model built on it · Model Pulse`,h(null),d(null),u(-1),y(""),ye(`/api/galaxy/${n}`).then(e=>{h(e),document.title=`${e.root.id} galaxy: ${e.total.toLocaleString("en")} models built on it · Model Pulse`}).catch(e=>d(e.message)))},[n]);const x=ce(()=>o?Ce(o):null,[o]),E=ce(()=>o?o.nodes.id.map(e=>e.toLowerCase()):[],[o]),k=ce(()=>{const e=S.trim().toLowerCase();if(!x||e.length<2)return[];const t=[];for(let l=0;l<x.n&&t.length<8;l++)x.order[l]>0&&E[x.order[l]].includes(e)&&t.push(x.order[l]);return t},[S,x,E]);if(!n)return r(Te,{});if(p)return r("div",{class:"wrap err",children:[r("h1",{children:"No galaxy to show"}),r("p",{children:p})]});const I=o==null?void 0:o.root,[q,D]=n.includes("/")?[n.split("/")[0],ne(n)]:["",n],W=e=>{u(e),y(""),e>0&&A({i:e,n:Date.now()})},B=xe({view:"galaxy",model:(I==null?void 0:I.id)??n}),_=I?`${U(o.total)} models are built on ${I.id}. Here is its whole galaxy:`:"",M=o!=null&&o.lineage.length?o.lineage[o.lineage.length-1]:null;return r("div",{class:"galaxy",children:[r("div",{class:"wrap g-head",children:[r("div",{class:"crumbs",children:[r("a",{class:"chip",href:K({view:"galaxy"}),onClick:e=>{e.preventDefault(),N({view:"galaxy"})},children:"All galaxies"}),M&&r("a",{class:"chip chip-hot",href:K({view:"galaxy",model:M}),onClick:e=>{e.preventDefault(),N({view:"galaxy",model:M})},children:["Part of the ",ne(M)," galaxy"]})]}),r("h1",{class:"model-name",children:[q&&r("span",{class:"org",children:[q,"/"]}),r("span",{class:"hl",children:D})]}),r("p",{class:"g-lede",children:o?o.total?r(he,{children:[U(o.total)," models are built on ",D,", directly or through other derivatives. Together with the original they were downloaded ",r("b",{children:oe(I.fam_dl30)})," times in the last 30 days."]}):r(he,{children:["No models on the Hub are built on ",D," yet."]}):"Mapping every model built on it…"})]}),r("div",{class:"wrap",children:[r("div",{class:"g-panel",children:[o&&x&&o.total>0?r(Se,{g:o,L:x,hidden:i,sel:c,onSel:u,flyTo:z}):r("div",{class:"g-sky g-empty",children:o?r("span",{children:"Nothing orbits this model yet."}):r("span",{class:"g-loading",children:"Mapping the galaxy…"})}),o&&c>=0&&x&&r("div",{class:"g-card",children:[r("button",{class:"x","aria-label":"Close",onClick:()=>u(-1),children:"×"}),r("a",{class:"id",href:K({model:o.nodes.id[c]}),onClick:e=>{e.preventDefault(),N({model:o.nodes.id[c]})},children:o.nodes.id[c]}),r("span",{class:"g-rel",children:[r("i",{style:{background:j[o.nodes.rel[c]>=0?o.nodes.rel[c]:1].color}}),j[o.nodes.rel[c]>=0?o.nodes.rel[c]:1].of," ",ne(o.nodes.id[o.nodes.parent[c]])]}),r("span",{class:"n",children:[r("b",{children:U(o.nodes.dl30[c])})," downloads in the last 30 days"]}),x.sub[c]>1&&r("span",{class:"n",children:[r("b",{children:U(x.sub[c]-1)})," models built on it"]}),r("div",{class:"acts",children:[r("a",{class:"btn primary",href:K({model:o.nodes.id[c]}),onClick:e=>{e.preventDefault(),N({model:o.nodes.id[c]})},children:"Download history"}),x.sub[c]>1&&r("a",{class:"btn",href:K({view:"galaxy",model:o.nodes.id[c]}),onClick:e=>{e.preventDefault(),N({view:"galaxy",model:o.nodes.id[c]})},children:"Its own galaxy"})]})]})]}),o&&x&&o.total>0&&r("div",{class:"g-tools",children:[r("div",{class:"g-legend",role:"group","aria-label":"Show or hide kinds of derivatives",children:j.map((e,t)=>x.byRel[t].length>0&&r("button",{"aria-pressed":!i[t],onClick:()=>C(i.map((l,a)=>a===t?!l:l)),children:[r("i",{style:{background:e.color}}),e.label,r("b",{children:U(x.byRel[t].length)})]},e.label))}),r("div",{class:"g-find",children:[r("input",{value:S,onInput:e=>y(e.target.value),placeholder:"Find a model in this galaxy","aria-label":"Find a model in this galaxy",spellcheck:!1,onKeyDown:e=>{e.key==="Enter"&&k.length&&W(k[0]),e.key==="Escape"&&y("")}}),k.length>0&&r("ul",{class:"g-found",children:k.map(e=>r("li",{children:r("button",{onClick:()=>W(e),children:[r("span",{children:o.nodes.id[e]}),r("small",{children:[oe(o.nodes.dl30[e]),"/mo"]})]})},e))})]})]}),o&&x&&o.total>0&&r("div",{class:"g-foot",children:[r("p",{class:"g-read",children:["Each star is a model built on ",D,", and the yellow sun is ",D," itself. Colours show how a model was made, and each kind forms its own spiral arms. Bigger, brighter stars were downloaded more in the last 30 days, and the most used sit closest to the core. The small clusters around a star are the models built on that one. Tap a star to see its numbers.",x.n-1<o.total?` Showing the ${U(x.n-1)} most downloaded.`:""]}),r("div",{class:"w-actions g-actions",children:[r("button",{class:"btn primary",disabled:w,onClick:async()=>{P(!0);try{const e=await Fe(o,x),t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=`${o.root.id.replace("/","_")}-galaxy.png`,t.click(),setTimeout(()=>URL.revokeObjectURL(t.href),2e3)}finally{P(!1)}},children:w?"Drawing…":"Download image"}),r("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://x.com/intent/post?text=${encodeURIComponent(_)}&url=${encodeURIComponent(B)}`,children:"Post on X"}),r("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(B)}`,children:"LinkedIn"}),r("button",{class:"btn",onClick:()=>{var e;return(e=navigator.clipboard)==null?void 0:e.writeText(B)},children:"Copy link"}),r("a",{class:"btn",href:K({model:o.root.id}),onClick:e=>{e.preventDefault(),N({model:o.root.id})},children:[D," download history"]}),r(ve,{})]})]})]})]})}export{Pe as Galaxy};
 
1
+ import{d as O,h as Z,g as ye,T as ce,u as r,s as xe,f as U,n as N,a as K,S as he,b as oe,L as ve,c as be,e as ke,A as X}from"./index-DOgVJS4B.js";const j=[{label:"Quantized",color:"#7d9dff",of:"Quantized from"},{label:"Fine-tuned",color:"#ff9d4a",of:"Fine-tuned from"},{label:"Adapters",color:"#4ccb8a",of:"Adapter on"},{label:"Merges",color:"#c38dff",of:"Merge built on"}],se="#16161a",le="#ffd21e",ee="#ece9e2",ie=1e3,G=Math.PI*2,Me=Math.PI*(3-Math.sqrt(5)),pe=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function te(n,o){let h=Math.imul(n^2654435769,2246822507)^Math.imul(o+1,3266489909);return h^=h>>>13,h=Math.imul(h,668265263),h^=h>>>16,(h>>>0)/4294967296}const de=(n,o)=>(te(n,o)+te(n,o+11)+te(n,o+23)-1.5)*2,ne=n=>n.split("/").pop()??n;function Ce(n){const{parent:o,rel:h,dl30:p}=n.nodes,d=o.length,i=new Uint8Array(d),C=new Int32Array(d).fill(1),c=new Float64Array(d),u=new Int32Array(d+1);for(let t=1;t<d;t++)i[t]=i[o[t]]+1,u[o[t]+1]++;for(let t=0;t<d;t++)u[t+1]+=u[t];const z=u.slice(0,d),A=new Int32Array(Math.max(0,d-1));for(let t=1;t<d;t++)A[z[o[t]]++]=t;for(let t=0;t<d;t++)c[t]=p[t]||0;for(let t=d-1;t>0;t--)C[o[t]]+=C[t],c[o[t]]+=c[t];const S=new Float32Array(d),y=new Float32Array(d),w=t=>Array.from(A.subarray(u[t],u[t+1])),P=120,x=t=>6.5*Math.sqrt(t+1),E=(t,l,a,s)=>{const f=w(t).sort((b,g)=>c[g]-c[b]),m=[[],[],[],[]];for(const b of f)m[h[b]>=0?h[b]:1].push(b);const v=Math.max(1,f.length),$=m.map(b=>b.length?v<8?1:1+Math.floor(3*b.length/v):0),Y=[0,1,2,3].filter(b=>$[b]).sort((b,g)=>m[g].length-m[b].length),L=[];for(let b=0;b<4;b++)for(const g of Y)b<$[g]&&L.push(g);const F=L.length,T=te(t,99)*G;for(let b=0;b<4;b++){const g=L.flatMap((R,J)=>R===b?[J]:[]);if(!g.length)continue;const H=Math.ceil(m[b].length/g.length);m[b].forEach((R,J)=>{const V=g[J%g.length],Q=Math.sqrt((Math.floor(J/g.length)+.5)/H),re=T+V/F*G+Q*2.5+de(R,1)*.08;let ae=s*(.1+.9*Q)*(1+de(R,2)*.045);const ue=u[R+1]-u[R];ue>=P&&(ae=Math.max(ae,s*.22+x(ue)));const me=de(R,3)*s*(.014+.055*Q);S[R]=l+Math.cos(re)*ae-Math.sin(re)*me,y[R]=a+Math.sin(re)*ae+Math.cos(re)*me})}},k=t=>{const l=w(t),a=x(l.length)/Math.sqrt(l.length+1),s=te(t,5)*G;l.forEach((f,m)=>{const v=a*Math.sqrt(m+1.2),$=s+m*Me;S[f]=S[t]+Math.cos($)*v,y[f]=y[t]+Math.sin($)*v})};E(0,0,0,ie);for(let t=1;t<d;t++){const l=u[t+1]-u[t];l>=P?E(t,S[t],y[t],x(l)):l&&k(t)}const I=new Float32Array(d),q=new Int32Array(d),D=new Float32Array(d);for(let t=0;t<d;t++)I[t]=.55+.42*Math.log10(1+(p[t]||0)),q[t]=t;q.sort((t,l)=>(p[l]||0)-(p[t]||0)),q.forEach((t,l)=>{D[t]=.45*(l/d)});const W=[0,1,2,3].map(t=>Int32Array.from({length:d},(l,a)=>a).filter(l=>l>0&&(h[l]>=0?h[l]:1)===t)),B=Array.from({length:d},(t,l)=>Math.hypot(S[l],y[l])).sort((t,l)=>t-l),_=Math.max(ie*.35,B[Math.floor((d-1)*.995)]??ie),M=16,e=new Map;for(let t=0;t<d;t++){const l=Math.floor(S[t]/M)*100003+Math.floor(y[t]/M),a=e.get(l);a?a.push(t):e.set(l,[t])}return{n:d,x:S,y,size:I,delay:D,sub:C,byRel:W,order:q,extent:_,cell:M,grid:e}}function we(n,o,h,p,d,i,C){var _;const{x:c,y:u,size:z,delay:A}=i;n.globalCompositeOperation="source-over",n.globalAlpha=1,n.fillStyle=se,n.fillRect(0,0,o,h);const S=(0-p.cx)*p.k+o/2,y=(0-p.cy)*p.k+h/2,w=n.createRadialGradient(S,y,0,S,y,Math.max(80,ie*.45*p.k));w.addColorStop(0,"rgba(255,210,30,0.20)"),w.addColorStop(1,"rgba(255,210,30,0)"),n.fillStyle=w,n.fillRect(0,0,o,h);const P=Math.min(3.2,Math.max(1,Math.sqrt(p.k/C.kFit))),x=C.p<1,E=(M,e)=>{let t=c[M],l=u[M];if(x){const a=Math.min(1,Math.max(0,(C.p-A[M])/.55)),s=1-(1-a)**3;if(s<=0)return!1;const f=(1-s)*1.3,m=.12+.88*s,v=Math.cos(f),$=Math.sin(f);[t,l]=[(t*v-l*$)*m,(t*$+l*v)*m]}return e[0]=(t-p.cx)*p.k+o/2,e[1]=(l-p.cy)*p.k+h/2,!0},k=[0,0];n.globalCompositeOperation="lighter";for(let M=0;M<4;M++){if(C.hidden[M])continue;n.fillStyle=j[M].color;const e=new Path2D,t=new Path2D;for(const l of i.byRel[M]){if(!E(l,k))continue;const a=z[l]*P,s=k[0],f=k[1];s<-a||f<-a||s>o+a||f>h+a||(a<1.15?e.rect(s-a,f-a,a*2,a*2):(t.moveTo(s+a,f),t.arc(s,f,a,0,G)))}n.globalAlpha=.5,n.fill(e),n.globalAlpha=.85,n.fill(t)}n.globalAlpha=.9,n.fillStyle="#fff",n.beginPath();for(let M=0,e=0;M<i.n&&e<80;M++){const t=i.order[M];if(t===0||(d.nodes.dl30[t]||0)<2e4)break;const l=d.nodes.rel[t]>=0?d.nodes.rel[t]:1;if(C.hidden[l]||!E(t,k))continue;const a=z[t]*P*.42;n.moveTo(k[0]+a,k[1]),n.arc(k[0],k[1],a,0,G),e++}if(n.fill(),n.globalCompositeOperation="source-over",n.globalAlpha=1,!x)for(const M of[C.sel,C.hover])fe(n,o,h,p,d,i,C.kFit,M,M===C.sel);const I=9+3*Math.sqrt(P);if(E(0,k)&&(n.beginPath(),n.arc(k[0],k[1],I+6,0,G),n.fillStyle="rgba(255,210,30,0.22)",n.fill(),n.beginPath(),n.arc(k[0],k[1],I,0,G),n.fillStyle=le,n.fill(),n.lineWidth=2.5,n.strokeStyle=se,n.stroke()),!C.labels||x)return;const q=Math.min(36,Math.round(8+7*Math.max(0,Math.log2(p.k/C.kFit)))),D=[[k[0]-I-4,k[1]-I-4,I*2+8,I*2+8],[o-64,0,64,150]];n.font="600 12.5px 'Source Sans 3', system-ui, sans-serif",n.textBaseline="middle",n.lineJoin="round";let W=0;const B=new Set;for(let M=0;M<Math.min(i.n,600)&&W<q;M++){const e=i.order[M],t=d.nodes.rel[e]>=0?d.nodes.rel[e]:1;if(e===0||C.hidden[t]||!(d.nodes.dl30[e]>0))continue;E(e,k);const l=z[e]*P,a=ne(d.nodes.id[e]);if(B.has(a))continue;const s=n.measureText(a).width,f=k[0]+l+5,m=k[1]-9;f<4||m<4||f+s>o-4||m+18>h-4||D.some(v=>f<v[0]+v[2]&&f+s>v[0]&&m<v[1]+v[3]&&m+18>v[1])||(D.push([f-2,m,s+4,18]),(_=C.labelHits)==null||_.push([f-2,m,s+4,18,e]),B.add(a),n.lineWidth=3.5,n.strokeStyle=se,n.strokeText(a,f,k[1]),n.fillStyle=ee,n.fillText(a,f,k[1]),W++)}}function fe(n,o,h,p,d,i,C,c,u){if(c<=0)return;const z=Math.min(3.2,Math.max(1,Math.sqrt(p.k/C))),A=w=>(i.x[w]-p.cx)*p.k+o/2,S=w=>(i.y[w]-p.cy)*p.k+h/2;n.beginPath(),n.strokeStyle=le,n.lineWidth=1.6,n.globalAlpha=.85;let y=c;for(n.moveTo(A(y),S(y));y>0;)y=d.nodes.parent[y],n.lineTo(A(y),S(y));n.stroke(),n.globalAlpha=1,n.beginPath(),n.arc(A(c),S(c),i.size[c]*z+5,0,G),n.strokeStyle=u?le:"#fff",n.lineWidth=2,n.stroke()}function ge(n,o,h){return{k:(Math.min(o,h)/2-18)/(n.extent*1.04),cx:0,cy:0}}function Se({g:n,L:o,hidden:h,sel:p,onSel:d,flyTo:i}){const C=X(null),c=X(null),u=X({W:0,H:0,dpr:1,view:{k:1,cx:0,cy:0},kFit:1,p:pe()?1:0,hover:-1,raf:0,labels:[]}),z=X({hidden:h,sel:p});z.current={hidden:h,sel:p};const[A,S]=O(null),y=X(null),w=X(0),P=()=>{var s,f;const e=u.current,t=(s=c.current)==null?void 0:s.getContext("2d");if(!t||!e.W)return;t.setTransform(e.dpr,0,0,e.dpr,0,0),e.labels=[];const l=performance.now();we(t,e.W,e.H,e.view,n,o,{p:e.p,hidden:z.current.hidden,hover:-1,sel:z.current.sel,kFit:e.kFit,labels:!0,labelHits:e.labels});const a=performance.now()-l>22;if(e.p>=1){const m=((f=y.current)==null?void 0:f.img)??document.createElement("canvas");(m.width!==c.current.width||m.height!==c.current.height)&&(m.width=c.current.width,m.height=c.current.height);const v=m.getContext("2d");v.setTransform(1,0,0,1,0,0),v.drawImage(c.current,0,0),y.current={img:m,view:{...e.view},heavy:a}}fe(t,e.W,e.H,e.view,n,o,e.kFit,e.hover,!1)},x=()=>{var m;const e=u.current,t=(m=c.current)==null?void 0:m.getContext("2d"),l=y.current;if(!t||!l)return P();const a=e.view.k/l.view.k;t.setTransform(1,0,0,1,0,0),t.fillStyle=se,t.fillRect(0,0,c.current.width,c.current.height);const s=(e.W/2-e.W/2*a+(l.view.cx-e.view.cx)*e.view.k)*e.dpr,f=(e.H/2-e.H/2*a+(l.view.cy-e.view.cy)*e.view.k)*e.dpr;t.drawImage(l.img,s,f,l.img.width*a,l.img.height*a),t.setTransform(e.dpr,0,0,e.dpr,0,0),a===1&&s===0&&f===0&&fe(t,e.W,e.H,e.view,n,o,e.kFit,e.hover,!1)},E=()=>{const e=u.current;e.raf||(e.raf=requestAnimationFrame(()=>{e.raf=0,P()}))},k=()=>{var t;const e=u.current;if(!((t=y.current)!=null&&t.heavy))return E();e.raf||(e.raf=requestAnimationFrame(()=>{e.raf=0,x()})),clearTimeout(w.current),w.current=window.setTimeout(E,160)},I=()=>{const e=u.current,t=y.current;t&&t.view.k===e.view.k&&t.view.cx===e.view.cx&&t.view.cy===e.view.cy&&e.p>=1?e.raf||(e.raf=requestAnimationFrame(()=>{e.raf=0,x()})):E()},q=(e,t,l=!1)=>{if(pe()){t(1),E();return}const a=performance.now(),s=f=>{var v;const m=Math.min(1,(f-a)/e);t(m),l&&m<1&&((v=y.current)!=null&&v.heavy)?x():P(),m<1&&requestAnimationFrame(s)};requestAnimationFrame(s)};Z(()=>{const e=u.current,t=()=>{const a=C.current.getBoundingClientRect(),s=!e.W;e.W=a.width,e.H=a.height,e.dpr=Math.min(2,devicePixelRatio||1),c.current.width=Math.round(e.W*e.dpr),c.current.height=Math.round(e.H*e.dpr);const f=ge(o,e.W,e.H);s?e.view=f:e.view={...e.view,k:e.view.k*(f.k/e.kFit)},e.kFit=f.k,P()},l=new ResizeObserver(t);return l.observe(C.current),e.p<1&&q(2e3,a=>{e.p=a}),()=>{l.disconnect(),clearTimeout(w.current)}},[o]),Z(E,[h,p]),Z(()=>{if(!i)return;const e=u.current,t={...e.view},l={k:Math.max(t.k,e.kFit*5),cx:o.x[i.i],cy:o.y[i.i]};q(700,a=>{const s=a<.5?4*a**3:1-(-2*a+2)**3/2;e.view={k:t.k*(l.k/t.k)**s,cx:t.cx+(l.cx-t.cx)*s,cy:t.cy+(l.cy-t.cy)*s}},!0)},[i]);const D=(e,t,l)=>{const a=u.current,s=a.view,f=(e-a.W/2)/s.k+s.cx,m=(t-a.H/2)/s.k+s.cy,v=Math.min(a.kFit*80,Math.max(a.kFit*.6,s.k*l));a.view={k:v,cx:f-(e-a.W/2)/v,cy:m-(t-a.H/2)/v},k()},W=(e,t)=>{const l=u.current,a=l.view;for(const g of l.labels)if(e>=g[0]&&e<=g[0]+g[2]&&t>=g[1]&&t<=g[1]+g[3])return g[4];const s=(e-l.W/2)/a.k+a.cx,f=(t-l.H/2)/a.k+a.cy,m=Math.min(3.2,Math.max(1,Math.sqrt(a.k/l.kFit))),v=14/a.k,$=Math.floor((s-v)/o.cell),Y=Math.floor((s+v)/o.cell),L=Math.floor((f-v)/o.cell),F=Math.floor((f+v)/o.cell);let T=-1,b=1/0;for(let g=$;g<=Y;g++)for(let H=L;H<=F;H++)for(const R of o.grid.get(g*100003+H)??[]){const J=n.nodes.rel[R]>=0?n.nodes.rel[R]:1;if(R>0&&z.current.hidden[J])continue;const V=R===0?12:o.size[R]*m,Q=Math.hypot((o.x[R]-s)*a.k,(o.y[R]-f)*a.k);Q<=Math.max(7,V+5)&&Q-1.6*V<b&&(T=R,b=Q-1.6*V)}return T};Z(()=>{const e=c.current,t=u.current,l=new Map;let a=0,s=0;const f=F=>{const T=e.getBoundingClientRect();return{x:F.clientX-T.left,y:F.clientY-T.top}},m=F=>{e.setPointerCapture(F.pointerId),l.set(F.pointerId,f(F)),a=0,s=0},v=F=>{const T=f(F);if(!l.has(F.pointerId)){if(F.pointerType!=="mouse")return;const g=W(T.x,T.y);g!==t.hover&&(t.hover=g,I()),S(g>=0?{i:g,x:T.x,y:T.y}:null),e.style.cursor=g>=0?"pointer":"grab";return}const b=l.get(F.pointerId);if(l.set(F.pointerId,T),l.size===1)a+=Math.abs(T.x-b.x)+Math.abs(T.y-b.y),t.view={...t.view,cx:t.view.cx-(T.x-b.x)/t.view.k,cy:t.view.cy-(T.y-b.y)/t.view.k},t.hover>=0&&(t.hover=-1,S(null)),k();else if(l.size===2){const[g,H]=[...l.values()],R=Math.hypot(g.x-H.x,g.y-H.y);s&&D((g.x+H.x)/2,(g.y+H.y)/2,R/s),s=R,a=99}},$=F=>{const T=l.get(F.pointerId);if(l.delete(F.pointerId),l.size<2&&(s=0),T&&a<6&&l.size===0){const b=W(T.x,T.y);B.current(b>0?b:-1)}},Y=F=>{F.preventDefault();const T=f(F);D(T.x,T.y,Math.exp(-F.deltaY*(F.deltaMode?.05:.0018)))},L=()=>{t.hover>=0&&(t.hover=-1,I()),S(null)};return e.addEventListener("pointerdown",m),e.addEventListener("pointermove",v),e.addEventListener("pointerup",$),e.addEventListener("pointercancel",$),e.addEventListener("pointerleave",L),e.addEventListener("wheel",Y,{passive:!1}),()=>{e.removeEventListener("pointerdown",m),e.removeEventListener("pointermove",v),e.removeEventListener("pointerup",$),e.removeEventListener("pointercancel",$),e.removeEventListener("pointerleave",L),e.removeEventListener("wheel",Y)}},[o]);const B=X(d);B.current=d;const _=e=>{const t=u.current;D(t.W/2,t.H/2,e)},M=()=>{const e=u.current,t={...e.view},l=ge(o,e.W,e.H);q(500,a=>{const s=1-(1-a)**3;e.view={k:t.k+(l.k-t.k)*s,cx:t.cx*(1-s),cy:t.cy*(1-s)}},!0)};return r("div",{class:"g-sky",ref:C,children:[r("canvas",{ref:c,role:"img","aria-label":`A galaxy of ${U(o.n-1)} models built on ${n.root.id}`}),r("div",{class:"g-zoom",children:[r("button",{"aria-label":"Zoom in",onClick:()=>_(1.6),children:"+"}),r("button",{"aria-label":"Zoom out",onClick:()=>_(1/1.6),children:"−"}),r("button",{"aria-label":"Show the whole galaxy",onClick:M,children:"⤢"})]}),A&&A.i!==p&&r("div",{class:"g-tip",style:{left:A.x,top:A.y},children:[r("b",{children:n.nodes.id[A.i]}),r("span",{children:[A.i===0?"the base model":j[n.nodes.rel[A.i]>=0?n.nodes.rel[A.i]:1].label.toLowerCase().replace(/s$/,""),", ",oe(n.nodes.dl30[A.i])," downloads in 30 days"]})]}),r("span",{class:"g-hint",children:"Drag to move, scroll or pinch to zoom"})]})}async function Fe(n,o){await Promise.all(["600 60px 'Fredoka'","500 20px 'IBM Plex Mono'","600 14px 'Source Sans 3'"].map(w=>document.fonts.load(w)));const h=1600,p=900,d=document.createElement("canvas");d.width=h,d.height=p;const i=d.getContext("2d"),C=(p/2-30)/(o.extent*1.02);we(i,h,p,{k:C,cx:-260/C,cy:0},n,o,{p:1,hidden:[!1,!1,!1,!1],hover:-1,sel:-1,kFit:C,labels:!0});const c=i.createLinearGradient(0,0,760,0);c.addColorStop(0,"rgba(22,22,26,0.96)"),c.addColorStop(.75,"rgba(22,22,26,0.75)"),c.addColorStop(1,"rgba(22,22,26,0)"),i.fillStyle=c,i.fillRect(0,0,760,p);const u=(w,P,x,E,k,I=600)=>{if(i.font=E,i.fillStyle=k,i.textBaseline="alphabetic",i.measureText(w).width>I){for(;w.length>3&&i.measureText(w+"…").width>I;)w=w.slice(0,-1);w+="…"}i.fillText(w,P,x)};i.fillStyle=le,i.beginPath(),i.roundRect(64,64,56,56,14),i.fill(),i.beginPath(),i.lineWidth=5,i.strokeStyle="#1b1b1f",i.lineJoin="round",i.lineCap="round",i.moveTo(74,94),i.lineTo(84,94),i.lineTo(90,78),i.lineTo(100,108),i.lineTo(106,94),i.lineTo(112,94),i.stroke(),u("Model Pulse Galaxy",136,104,"600 32px 'Fredoka'",ee);const[z,A]=n.root.id.includes("/")?n.root.id.split("/"):["",n.root.id];u(z?z+"/":"",64,236,"500 24px 'IBM Plex Mono'","#a9a69e"),u(A,62,306,`600 ${A.length>18?52:66}px 'Fredoka'`,le,640),u(U(n.total),64,420,"600 76px 'Fredoka'",ee),u("models built on it",66,460,"500 24px 'IBM Plex Mono'","#a9a69e"),n.root.fam_dl30&&(u(oe(n.root.fam_dl30),64,556,"600 52px 'Fredoka'",ee),u("family downloads in the last 30 days",66,592,"500 22px 'IBM Plex Mono'","#a9a69e"));const S=[0,1,2,3].map(w=>o.byRel[w].length);let y=680;return j.forEach((w,P)=>{S[P]&&(i.fillStyle=w.color,i.beginPath(),i.arc(74,y-8,8,0,G),i.fill(),u(`${w.label} ${U(S[P])}`,94,y,"500 22px 'IBM Plex Mono'",ee),y+=38)}),u("modelpulse.ifsp.dev",64,p-44,"500 20px 'IBM Plex Mono'","#a9a69e"),new Promise(w=>d.toBlob(P=>w(P),"image/png"))}function Te(){const[n,o]=O([]);return Z(()=>{document.title="Model galaxies: every model built on Llama, Qwen, FLUX and more · Model Pulse",ye("/api/galaxies").then(h=>o(h.slice(0,16))).catch(()=>{})},[]),r(he,{children:[r("div",{class:"wrap w-entry g-entry",children:[r("h1",{children:[r(be,{size:72}),"Model Pulse ",r("span",{class:"hl",children:"Galaxy"})]}),r("p",{class:"lede",children:"Pick a base model and see every model built on it, from quantizations and fine-tunes to adapters and merges. The most downloaded shine brightest."}),r("div",{class:"g-search",children:r(ke,{big:!0,placeholder:"A base model, e.g. meta-llama/Llama-3.1-8B",onPick:h=>N({view:"galaxy",model:h})})})]}),n.length>0&&r("section",{class:"wrap g-fams",children:[r("h2",{children:"The biggest galaxies right now"}),r("div",{class:"g-grid",children:n.map((h,p)=>r("a",{class:"g-fam",href:K({view:"galaxy",model:h.id}),onClick:d=>{d.preventDefault(),N({view:"galaxy",model:h.id})},children:[r("i",{class:"g-dot",style:{transform:`rotate(${p*47}deg)`},"aria-hidden":"true"}),r("span",{class:"o",children:[h.id.split("/")[0],"/"]}),r("span",{class:"nm",children:ne(h.id)}),r("span",{class:"c",children:[U(h.fam_members)," models, ",oe(h.fam_dl30)," downloads in 30 days"]})]},h.id))})]})]})}function Pe({model:n}){const[o,h]=O(null),[p,d]=O(null),[i,C]=O([!1,!1,!1,!1]),[c,u]=O(-1),[z,A]=O(null),[S,y]=O(""),[w,P]=O(!1);Z(()=>{n&&(document.title=`${n} galaxy: every model built on it · Model Pulse`,h(null),d(null),u(-1),y(""),ye(`/api/galaxy/${n}`).then(e=>{h(e),document.title=`${e.root.id} galaxy: ${e.total.toLocaleString("en")} models built on it · Model Pulse`}).catch(e=>d(e.message)))},[n]);const x=ce(()=>o?Ce(o):null,[o]),E=ce(()=>o?o.nodes.id.map(e=>e.toLowerCase()):[],[o]),k=ce(()=>{const e=S.trim().toLowerCase();if(!x||e.length<2)return[];const t=[];for(let l=0;l<x.n&&t.length<8;l++)x.order[l]>0&&E[x.order[l]].includes(e)&&t.push(x.order[l]);return t},[S,x,E]);if(!n)return r(Te,{});if(p)return r("div",{class:"wrap err",children:[r("h1",{children:"No galaxy to show"}),r("p",{children:p})]});const I=o==null?void 0:o.root,[q,D]=n.includes("/")?[n.split("/")[0],ne(n)]:["",n],W=e=>{u(e),y(""),e>0&&A({i:e,n:Date.now()})},B=xe({view:"galaxy",model:(I==null?void 0:I.id)??n}),_=I?`${U(o.total)} models are built on ${I.id}. Here is its whole galaxy:`:"",M=o!=null&&o.lineage.length?o.lineage[o.lineage.length-1]:null;return r("div",{class:"galaxy",children:[r("div",{class:"wrap g-head",children:[r("div",{class:"crumbs",children:[r("a",{class:"chip",href:K({view:"galaxy"}),onClick:e=>{e.preventDefault(),N({view:"galaxy"})},children:"All galaxies"}),M&&r("a",{class:"chip chip-hot",href:K({view:"galaxy",model:M}),onClick:e=>{e.preventDefault(),N({view:"galaxy",model:M})},children:["Part of the ",ne(M)," galaxy"]})]}),r("h1",{class:"model-name",children:[q&&r("span",{class:"org",children:[q,"/"]}),r("span",{class:"hl",children:D})]}),r("p",{class:"g-lede",children:o?o.total?r(he,{children:[U(o.total)," models are built on ",D,", directly or through other derivatives. Together with the original they were downloaded ",r("b",{children:oe(I.fam_dl30)})," times in the last 30 days."]}):r(he,{children:["No models on the Hub are built on ",D," yet."]}):"Mapping every model built on it…"})]}),r("div",{class:"wrap",children:[r("div",{class:"g-panel",children:[o&&x&&o.total>0?r(Se,{g:o,L:x,hidden:i,sel:c,onSel:u,flyTo:z}):r("div",{class:"g-sky g-empty",children:o?r("span",{children:"Nothing orbits this model yet."}):r("span",{class:"g-loading",children:"Mapping the galaxy…"})}),o&&c>=0&&x&&r("div",{class:"g-card",children:[r("button",{class:"x","aria-label":"Close",onClick:()=>u(-1),children:"×"}),r("a",{class:"id",href:K({model:o.nodes.id[c]}),onClick:e=>{e.preventDefault(),N({model:o.nodes.id[c]})},children:o.nodes.id[c]}),r("span",{class:"g-rel",children:[r("i",{style:{background:j[o.nodes.rel[c]>=0?o.nodes.rel[c]:1].color}}),j[o.nodes.rel[c]>=0?o.nodes.rel[c]:1].of," ",ne(o.nodes.id[o.nodes.parent[c]])]}),r("span",{class:"n",children:[r("b",{children:U(o.nodes.dl30[c])})," downloads in the last 30 days"]}),x.sub[c]>1&&r("span",{class:"n",children:[r("b",{children:U(x.sub[c]-1)})," models built on it"]}),r("div",{class:"acts",children:[r("a",{class:"btn primary",href:K({model:o.nodes.id[c]}),onClick:e=>{e.preventDefault(),N({model:o.nodes.id[c]})},children:"Download history"}),x.sub[c]>1&&r("a",{class:"btn",href:K({view:"galaxy",model:o.nodes.id[c]}),onClick:e=>{e.preventDefault(),N({view:"galaxy",model:o.nodes.id[c]})},children:"Its own galaxy"})]})]})]}),o&&x&&o.total>0&&r("div",{class:"g-tools",children:[r("div",{class:"g-legend",role:"group","aria-label":"Show or hide kinds of derivatives",children:j.map((e,t)=>x.byRel[t].length>0&&r("button",{"aria-pressed":!i[t],onClick:()=>C(i.map((l,a)=>a===t?!l:l)),children:[r("i",{style:{background:e.color}}),e.label,r("b",{children:U(x.byRel[t].length)})]},e.label))}),r("div",{class:"g-find",children:[r("input",{value:S,onInput:e=>y(e.target.value),placeholder:"Find a model in this galaxy","aria-label":"Find a model in this galaxy",spellcheck:!1,onKeyDown:e=>{e.key==="Enter"&&k.length&&W(k[0]),e.key==="Escape"&&y("")}}),k.length>0&&r("ul",{class:"g-found",children:k.map(e=>r("li",{children:r("button",{onClick:()=>W(e),children:[r("span",{children:o.nodes.id[e]}),r("small",{children:[oe(o.nodes.dl30[e]),"/mo"]})]})},e))})]})]}),o&&x&&o.total>0&&r("div",{class:"g-foot",children:[r("p",{class:"g-read",children:["Each star is a model built on ",D,", and the yellow sun is ",D," itself. Colours show how a model was made, and each kind forms its own spiral arms. Bigger, brighter stars were downloaded more in the last 30 days, and the most used sit closest to the core. The small clusters around a star are the models built on that one. Tap a star to see its numbers.",x.n-1<o.total?` Showing the ${U(x.n-1)} most downloaded.`:""]}),r("div",{class:"w-actions g-actions",children:[r("button",{class:"btn primary",disabled:w,onClick:async()=>{P(!0);try{const e=await Fe(o,x),t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=`${o.root.id.replace("/","_")}-galaxy.png`,t.click(),setTimeout(()=>URL.revokeObjectURL(t.href),2e3)}finally{P(!1)}},children:w?"Drawing…":"Download image"}),r("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://x.com/intent/post?text=${encodeURIComponent(_)}&url=${encodeURIComponent(B)}`,children:"Post on X"}),r("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(B)}`,children:"LinkedIn"}),r("button",{class:"btn",onClick:()=>{var e;return(e=navigator.clipboard)==null?void 0:e.writeText(B)},children:"Copy link"}),r("a",{class:"btn",href:K({model:o.root.id}),onClick:e=>{e.preventDefault(),N({model:o.root.id})},children:[D," download history"]}),r(ve,{})]})]})]})]})}export{Pe as Galaxy};
assets/{Report-DmIHgK4d.js → Report-DF9gncAc.js} RENAMED
@@ -1,4 +1,4 @@
1
- var Ae=Object.defineProperty;var ze=(n,e,t)=>e in n?Ae(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var k=(n,e,t)=>ze(n,typeof e!="symbol"?e+"":e,t);import{T as _e,h as Pe,u as Be,n as Le}from"./index-Dlh2W4Kh.js";function J(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var z=J();function me(n){z=n}var v={exec:()=>null};function _(n){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),r=e[s];return r||(r=n(s),e[s]=r),r}}function g(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,l)=>{let o=typeof l=="string"?l:l.source;return o=o.replace(x.caret,"$1"),t=t.replace(r,o),s},getRegex:()=>new RegExp(t,e)};return s}var Ie=((n="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+n)}catch{return!1}})(),x={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_(n=>new RegExp(`^ {0,${n}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_(n=>new RegExp(`^ {0,${n}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:_(n=>new RegExp(`^ {0,${n}}(?:\`\`\`|~~~)`)),headingBeginRegex:_(n=>new RegExp(`^ {0,${n}}#`)),htmlBeginRegex:_(n=>new RegExp(`^ {0,${n}}(?:</?(?:${q})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:_(n=>new RegExp(`^ {0,${n}}>`))},Ce=/^(?:[ \t]*(?:\n|$))+/,Ee=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Qe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,V=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ke=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,be=g(ke).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),He=g(ke).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),K=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,De=/^[^\n]+/,Y=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ze=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Oe=g(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,V).getRegex(),q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ee=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ee).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),we=n=>g(K).replace("hr",Q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",n).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),Ge=we(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ue=we(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ne=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ue).getRegex(),te={blockquote:Ne,code:Ee,def:Ze,fences:Qe,heading:qe,hr:Q,html:Fe,lheading:be,list:Oe,newline:Ce,paragraph:Ge,table:v,text:De},ae=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),je={...te,lheading:He,table:ae,paragraph:g(K).replace("hr",Q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ae).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()},We={...te,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ee).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(K).replace("hr",Q).replace("heading",` *#{1,6} *[^
2
  ]`).replace("lheading",be).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Xe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Je=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xe=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,P=/[\s\p{P}\p{S}]/u,H=/[^\s\p{P}\p{S}]/u,Ke=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,P).getRegex(),Ye=/[\p{Pi}\p{Ps}"']/u,ye=/(?!~)[\p{P}\p{S}]/u,et=/(?!~)[\s\p{P}\p{S}]/u,tt=/(?:[^\s\p{P}\p{S}]|~)/u,nt=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ie?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Se=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,rt=g(Se,"u").replace(/punct/g,T).getRegex(),st=g(Se,"u").replace(/punct/g,ye).getRegex(),at=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,lt=g(at,"u").replace(/openQuote/g,Ye).replace(/punct/g,T).getRegex(),Me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ot=g(Me,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),it=g(Me,"gu").replace(/notPunctSpace/g,tt).replace(/punctSpace/g,et).replace(/punct/g,ye).getRegex(),ht="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",ct=g(ht,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),ut=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),pt="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",dt=g(pt,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),gt=g(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,T).getRegex(),ft="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",mt=g(ft,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),kt=g(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),bt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wt=g(ee).replace("(?:-->|$)","-->").getRegex(),xt=g("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Te=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,O=g(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Te).getRegex(),yt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",O).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),St=g(/^!?\[(label)\]\[(ref)\]/).replace("label",O).replace("ref",Y).getRegex(),Mt=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",Y).getRegex(),le=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Tt=g(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Te).getRegex(),$t=g("reflink|nolink(?!\\()","g").replace("reflink",g(/^!?\[(label)\]\[(ref)\]/).replace("label",Tt).replace("ref",le).getRegex()).replace("nolink",g(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex()).getRegex(),oe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Rt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,vt=g(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Rt).getRegex(),ne={_backpedal:v,anyPunctuation:kt,autolink:bt,blockSkip:nt,br:xe,code:Je,del:v,delLDelim:v,delRDelim:v,emStrongLDelim:rt,emStrongRDelimAst:ot,emStrongRDelimUnd:ut,escape:Xe,link:yt,nolink:Mt,punctuation:Ke,reflink:St,reflinkSearch:$t,tag:xt,text:Ve,url:v},At={...ne,emStrongLDelim:lt,emStrongRDelimAst:ct,emStrongRDelimUnd:dt,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",O).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O).getRegex()},j={...ne,emStrongRDelimAst:it,emStrongLDelim:st,delLDelim:gt,delRDelim:mt,url:g(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",vt).replace("protocol",oe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:g(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",oe).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},zt={...j,br:g(xe).replace("{2,}","*").getRegex(),text:g(j.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},D={normal:te,gfm:je,pedantic:We},C={normal:ne,gfm:j,breaks:zt,pedantic:At},_t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ie=n=>_t[n];function y(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ie)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ie);return n}function Pt(n){return n.replace(x.numericCharacterReference,(e,t,s)=>{let r=t===void 0?Number.parseInt(s,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?"�":String.fromCodePoint(r)})}function he(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function ce(n,e){var l;let t=n.replace(x.findPipe,(o,i,a)=>{let u=!1,h=i;for(;--h>=0&&a[h]==="\\";)u=!u;return u?"|":" |"}),s=t.split(x.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((l=s.at(-1))!=null&&l.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(x.slashPipe,"|");return s}function R(n,e,t){let s=n.length;if(s===0)return"";let r=0;for(;r<s&&n.charAt(s-r-1)===e;)r++;return n.slice(0,s-r)}function ue(n){let e=n.split(`
3
  `),t=e.length-1;for(;t>=0&&x.blankLine.test(e[t]);)t--;return e.length-t<=2?n:e.slice(0,t+1).join(`
4
  `)}function F(n){return n.trim().toLowerCase().toUpperCase().toLowerCase()}function Bt(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])t++;else if(n[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function pe(n,e=0){let t=e,s="";for(let r of n)if(r===" "){let l=4-t%4;s+=" ".repeat(l),t+=l}else s+=r,t++;return s}function de(n,e,t,s,r){let l=e.href,o=e.title||null,i=n[1].replace(r.other.outputLinkReplace,"$1"),a=n[0].charAt(0)==="!";s.state.inLink=!0;let u=s.state.linkEmitted,h=s.state.inRawBlock;s.state.linkEmitted=!1;let d=s.inlineTokens(i),c=s.state.linkEmitted;if(s.state.linkEmitted=u,s.state.inLink=!1,!a){if(c){s.state.inRawBlock=h;return}s.state.linkEmitted=!0}return{type:a?"image":"link",raw:t,href:l,title:o,text:i,tokens:d}}function Lt(n,e,t){let s=n.match(t.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
 
1
+ var Ae=Object.defineProperty;var ze=(n,e,t)=>e in n?Ae(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var k=(n,e,t)=>ze(n,typeof e!="symbol"?e+"":e,t);import{T as _e,h as Pe,u as Be,n as Le}from"./index-DOgVJS4B.js";function J(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var z=J();function me(n){z=n}var v={exec:()=>null};function _(n){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),r=e[s];return r||(r=n(s),e[s]=r),r}}function g(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,l)=>{let o=typeof l=="string"?l:l.source;return o=o.replace(x.caret,"$1"),t=t.replace(r,o),s},getRegex:()=>new RegExp(t,e)};return s}var Ie=((n="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+n)}catch{return!1}})(),x={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_(n=>new RegExp(`^ {0,${n}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_(n=>new RegExp(`^ {0,${n}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:_(n=>new RegExp(`^ {0,${n}}(?:\`\`\`|~~~)`)),headingBeginRegex:_(n=>new RegExp(`^ {0,${n}}#`)),htmlBeginRegex:_(n=>new RegExp(`^ {0,${n}}(?:</?(?:${q})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:_(n=>new RegExp(`^ {0,${n}}>`))},Ce=/^(?:[ \t]*(?:\n|$))+/,Ee=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Qe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,V=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ke=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,be=g(ke).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),He=g(ke).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),K=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,De=/^[^\n]+/,Y=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ze=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Oe=g(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,V).getRegex(),q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ee=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ee).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),we=n=>g(K).replace("hr",Q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",n).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),Ge=we(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ue=we(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ne=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ue).getRegex(),te={blockquote:Ne,code:Ee,def:Ze,fences:Qe,heading:qe,hr:Q,html:Fe,lheading:be,list:Oe,newline:Ce,paragraph:Ge,table:v,text:De},ae=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),je={...te,lheading:He,table:ae,paragraph:g(K).replace("hr",Q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ae).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()},We={...te,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ee).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(K).replace("hr",Q).replace("heading",` *#{1,6} *[^
2
  ]`).replace("lheading",be).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Xe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Je=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xe=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,P=/[\s\p{P}\p{S}]/u,H=/[^\s\p{P}\p{S}]/u,Ke=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,P).getRegex(),Ye=/[\p{Pi}\p{Ps}"']/u,ye=/(?!~)[\p{P}\p{S}]/u,et=/(?!~)[\s\p{P}\p{S}]/u,tt=/(?:[^\s\p{P}\p{S}]|~)/u,nt=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ie?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Se=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,rt=g(Se,"u").replace(/punct/g,T).getRegex(),st=g(Se,"u").replace(/punct/g,ye).getRegex(),at=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,lt=g(at,"u").replace(/openQuote/g,Ye).replace(/punct/g,T).getRegex(),Me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ot=g(Me,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),it=g(Me,"gu").replace(/notPunctSpace/g,tt).replace(/punctSpace/g,et).replace(/punct/g,ye).getRegex(),ht="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",ct=g(ht,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),ut=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),pt="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",dt=g(pt,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),gt=g(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,T).getRegex(),ft="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",mt=g(ft,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,P).replace(/punct/g,T).getRegex(),kt=g(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),bt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wt=g(ee).replace("(?:-->|$)","-->").getRegex(),xt=g("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Te=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,O=g(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Te).getRegex(),yt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",O).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),St=g(/^!?\[(label)\]\[(ref)\]/).replace("label",O).replace("ref",Y).getRegex(),Mt=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",Y).getRegex(),le=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Tt=g(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Te).getRegex(),$t=g("reflink|nolink(?!\\()","g").replace("reflink",g(/^!?\[(label)\]\[(ref)\]/).replace("label",Tt).replace("ref",le).getRegex()).replace("nolink",g(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex()).getRegex(),oe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Rt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,vt=g(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Rt).getRegex(),ne={_backpedal:v,anyPunctuation:kt,autolink:bt,blockSkip:nt,br:xe,code:Je,del:v,delLDelim:v,delRDelim:v,emStrongLDelim:rt,emStrongRDelimAst:ot,emStrongRDelimUnd:ut,escape:Xe,link:yt,nolink:Mt,punctuation:Ke,reflink:St,reflinkSearch:$t,tag:xt,text:Ve,url:v},At={...ne,emStrongLDelim:lt,emStrongRDelimAst:ct,emStrongRDelimUnd:dt,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",O).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O).getRegex()},j={...ne,emStrongRDelimAst:it,emStrongLDelim:st,delLDelim:gt,delRDelim:mt,url:g(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",vt).replace("protocol",oe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:g(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",oe).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},zt={...j,br:g(xe).replace("{2,}","*").getRegex(),text:g(j.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},D={normal:te,gfm:je,pedantic:We},C={normal:ne,gfm:j,breaks:zt,pedantic:At},_t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ie=n=>_t[n];function y(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ie)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ie);return n}function Pt(n){return n.replace(x.numericCharacterReference,(e,t,s)=>{let r=t===void 0?Number.parseInt(s,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?"�":String.fromCodePoint(r)})}function he(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function ce(n,e){var l;let t=n.replace(x.findPipe,(o,i,a)=>{let u=!1,h=i;for(;--h>=0&&a[h]==="\\";)u=!u;return u?"|":" |"}),s=t.split(x.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((l=s.at(-1))!=null&&l.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(x.slashPipe,"|");return s}function R(n,e,t){let s=n.length;if(s===0)return"";let r=0;for(;r<s&&n.charAt(s-r-1)===e;)r++;return n.slice(0,s-r)}function ue(n){let e=n.split(`
3
  `),t=e.length-1;for(;t>=0&&x.blankLine.test(e[t]);)t--;return e.length-t<=2?n:e.slice(0,t+1).join(`
4
  `)}function F(n){return n.trim().toLowerCase().toUpperCase().toLowerCase()}function Bt(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])t++;else if(n[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function pe(n,e=0){let t=e,s="";for(let r of n)if(r===" "){let l=4-t%4;s+=" ".repeat(l),t+=l}else s+=r,t++;return s}function de(n,e,t,s,r){let l=e.href,o=e.title||null,i=n[1].replace(r.other.outputLinkReplace,"$1"),a=n[0].charAt(0)==="!";s.state.inLink=!0;let u=s.state.linkEmitted,h=s.state.inRawBlock;s.state.linkEmitted=!1;let d=s.inlineTokens(i),c=s.state.linkEmitted;if(s.state.linkEmitted=u,s.state.inLink=!1,!a){if(c){s.state.inRawBlock=h;return}s.state.linkEmitted=!0}return{type:a?"image":"link",raw:t,href:l,title:o,text:i,tokens:d}}function Lt(n,e,t){let s=n.match(t.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
assets/{Wrapped-D9zPhJcm.js → Wrapped-8wp8GBuB.js} RENAMED
@@ -1 +1 @@
1
- import{d as $,A as G,h as E,i as K,u as e,c as U,s as J,b as m,f as w,n as A,a as D,L as Q,S as x,j as I,k as X}from"./index-Dlh2W4Kh.js";const Z=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function T({to:n,run:l,format:i=w}){const[a,o]=$(0);return E(()=>{if(!l){o(0);return}if(Z()){o(n);return}let s=0;const t=performance.now(),p=1300,b=F=>{const h=Math.min(1,(F-t)/p);o(n*(1-Math.pow(1-h,3))),h<1&&(s=requestAnimationFrame(b))};return s=requestAnimationFrame(b),()=>cancelAnimationFrame(s)},[n,l]),e(x,{children:i(Math.round(a))})}const ee=n=>{if(n.every_seconds>=1){const l=n.every_seconds;return l<60?`one download every ${l.toFixed(l<10?1:0)} seconds`:l<3600?`one download every ${Math.round(l/60)} minutes`:`one download every ${Math.round(l/3600)} hours`}return n.per_minute>=1e3?`${m(n.per_minute)} downloads every minute`:`${Math.round(n.per_minute)} downloads every minute`},W=n=>n.split("/").slice(1).join("/")||n,S=n=>n.rank<=10?"top 10":n.rank<=100?"top 100":n.rank<=1e3?"top 1,000":n.top_pct==null||n.top_pct>50?null:`top ${n.top_pct<1?n.top_pct.toFixed(1):Math.ceil(n.top_pct)}%`,O=n=>{const l=new Date(n.period.to.slice(0,7)+"-01T00:00:00Z"),i=new Map(n.months.map(a=>[a.month.slice(0,7),a.downloads]));return Array.from({length:12},(a,o)=>{const t=new Date(Date.UTC(l.getUTCFullYear(),l.getUTCMonth()-12+o,1)).toISOString().slice(0,7);return{month:t,downloads:i.get(t)??0}})},B=n=>`${I(n.period.from,{month:"short",year:"numeric"})} – ${I(n.period.to,{month:"short",year:"numeric"})}`;function N({values:n,highlight:l,light:i}){const a=Math.max(...n,1);return e("div",{class:`w-bars${i?" light":""}`,"aria-hidden":"true",children:n.map((o,s)=>e("span",{class:s===l?"hi":"",style:{height:`${Math.max(3,o/a*100)}%`}},s))})}function j(n,l){const i=t=>l===t,a=n.weeks.map(t=>t.downloads),o=n.best_week?n.weeks.findIndex(t=>t.week_of===n.best_week.week_of):-1;return[{key:"intro",tone:"yellow",body:e(x,{children:[e("div",{class:"w-kicker",children:"Model Pulse Wrapped"}),e("div",{class:"w-logo",children:e(U,{size:88})}),e("h2",{class:"w-title",children:[e("span",{class:"w-name",children:n.author}),e("br",{}),"on the Hub"]}),e("p",{class:"w-sub",children:"Your last 12 months, in six cards."}),e("p",{class:"w-mono",children:B(n)})]})},{key:"downloads",tone:"blue",body:e(x,{children:[e("div",{class:"w-kicker",children:"Your models were downloaded"}),e("div",{class:"w-big",children:e(T,{to:n.downloads,run:i(1)})}),e("p",{class:"w-sub",children:["times. That's ",ee(n),"."]}),e(N,{values:O(n).map(t=>t.downloads),light:!0}),e("p",{class:"w-mono",children:"downloads by month"})]})},{key:"top",tone:"paper",body:n.top_model?e(x,{children:[e("div",{class:"w-kicker",children:"Your #1 model this year"}),e("h2",{class:"w-model",children:e("span",{children:W(n.top_model.id)})}),e("div",{class:"w-big sm",children:[e(T,{to:n.top_model.downloads,run:i(2),format:m})," ",e("small",{children:"downloads"})]}),e("p",{class:"w-sub",children:[Math.round(n.top_model.share*100),"% of everything you served",n.top_model.task?`, as ${n.top_model.task.replace(/-/g," ")}`:"","."]}),n.top_models.length>1&&e("ol",{class:"w-list",start:2,children:n.top_models.slice(1,5).map(t=>e("li",{children:[e("span",{children:W(t.id)}),e("b",{children:m(t.downloads)})]},t.id))})]}):e("p",{class:"w-sub",children:"No single model stood out this year."})},{key:"week",tone:"orange",body:n.best_week?e(x,{children:[e("div",{class:"w-kicker",children:"Your biggest week"}),e("h2",{class:"w-title sm",children:["Week of ",I(n.best_week.week_of,{month:"long",day:"numeric",year:"numeric"})]}),e("div",{class:"w-big",children:e(T,{to:n.best_week.downloads,run:i(3)})}),e("p",{class:"w-sub",children:"downloads in seven days."}),e(N,{values:a,highlight:o})]}):e("p",{class:"w-sub",children:"Not enough weeks of data yet."})},{key:"ripple",tone:"green",body:n.ripple.models>0?e(x,{children:[e("div",{class:"w-kicker",children:"Your ripple effect"}),e("div",{class:"w-big",children:e(T,{to:n.ripple.models,run:i(4)})}),e("p",{class:"w-sub",children:["models by other people build on yours. Together they were downloaded ",e("b",{children:m(n.ripple.downloads_30d)})," times last month."]}),n.ripple.top&&e("p",{class:"w-mono",children:["the biggest: ",n.ripple.top.id," (",n.ripple.top.relation,")"]})]}):e(x,{children:[e("div",{class:"w-kicker",children:"Your ripple effect"}),e("h2",{class:"w-title sm",children:"No derivatives yet."}),e("p",{class:"w-sub",children:["When someone quantizes or fine-tunes one of your models, it shows up here. You published ",e("b",{children:n.models_new})," new model",n.models_new===1?"":"s"," this year; one of them could be next."]})]})},{key:"rank",tone:"red",body:e(x,{children:[e("div",{class:"w-kicker",children:["Among ",w(n.authors_ranked)," publishers on the Hub"]}),e("div",{class:"w-big xl",children:["#",e(T,{to:n.rank,run:i(5)})]}),e("p",{class:"w-sub",children:S(n)?n.rank<=1e3?`A ${S(n)} publisher by downloads this year.`:`That's the ${S(n)} by downloads.`:"by downloads this year."}),e("div",{class:"w-chips",children:[e("span",{children:["+",w(n.likes_gained)," likes"]}),e("span",{children:[w(n.models_new)," new models"]}),e("span",{children:[w(n.models_total)," models in total"]})]})]})}]}async function ne(n){await Promise.all(["600 80px 'Fredoka'","500 20px 'IBM Plex Mono'","400 20px 'Source Sans 3'"].map(c=>document.fonts.load(c)));const l=1080,i=1350,a=document.createElement("canvas");a.width=l,a.height=i;const o=a.getContext("2d"),s="#1B1B1F",t="#ECE9E2",p="#FBFAF5",b="#FFD21E",F=(c,u,k,f,v)=>{o.fillStyle=s,o.beginPath(),o.roundRect(c+8,u+8,k,f,26),o.fill(),o.fillStyle=v,o.beginPath(),o.roundRect(c,u,k,f,26),o.fill(),o.lineWidth=4,o.strokeStyle=s,o.stroke()},h=(c,u,k,f,v=s,_)=>{if(o.font=f,o.fillStyle=v,_&&o.measureText(c).width>_){for(;c.length>3&&o.measureText(c+"…").width>_;)c=c.slice(0,-1);c+="…"}o.fillText(c,u,k)};o.fillStyle=t,o.fillRect(0,0,l,i),o.fillStyle=s,o.beginPath(),o.roundRect(68,68,76,76,20),o.fill(),o.fillStyle=b,o.beginPath(),o.roundRect(62,62,72,72,18),o.fill(),o.lineWidth=6,o.strokeStyle=s,o.stroke(),o.beginPath(),o.lineWidth=6,o.lineJoin="round",o.lineCap="round",o.moveTo(74,100),o.lineTo(87,100),o.lineTo(94,81),o.lineTo(106,117),o.lineTo(113,100),o.lineTo(124,100),o.stroke(),h("Model Pulse Wrapped",156,116,"600 44px 'Fredoka'"),h(B(n),62,196,"500 26px 'IBM Plex Mono'","#6E6C66"),o.font="600 92px 'Fredoka'";const C=n.author.length>20?n.author.slice(0,19)+"…":n.author,P=Math.min(l-124,o.measureText(C).width+44);o.fillStyle=b,o.beginPath(),o.roundRect(54,222,P,120,18),o.fill(),h(C,76,314,"600 92px 'Fredoka'",s,l-170),F(62,386,l-124,250,"#3B6FF5"),h("downloads in 12 months",100,446,"500 28px 'IBM Plex Mono'","#fff"),h(w(n.downloads),96,572,"600 118px 'Fredoka'","#fff",l-200);const M=[["#1 model",n.top_model?W(n.top_model.id):"–",n.top_model?`${m(n.top_model.downloads)} downloads`:""],["biggest week",n.best_week?m(n.best_week.downloads):"–",n.best_week?`week of ${I(n.best_week.week_of,{month:"short",day:"numeric"})}`:""],["publisher rank",`#${w(n.rank)}`,S(n)??`of ${m(n.authors_ranked)}`],n.ripple.models>0?["built on yours",w(n.ripple.models),"models by others"]:["published",w(n.models_new),n.models_new===1?"new model this year":"new models this year"]],g=(l-124-32)/2,R=230;M.forEach(([c,u,k],f)=>{const v=62+f%2*(g+32),_=676+Math.floor(f/2)*(R+32);F(v,_,g,R,f===0?b:p),h(c,v+30,_+54,"500 24px 'IBM Plex Mono'","#6E6C66"),h(u,v+28,_+136,`600 ${u.length>14?46:70}px 'Fredoka'`,s,g-56),h(k,v+30,_+190,"400 26px 'Source Sans 3'","#3D3D45",g-60)});const y=O(n).map(c=>c.downloads),r=Math.max(...y,1),d=62,q=1196,V=l-124,L=64,H=6,Y=(V-H*(y.length-1))/Math.max(1,y.length);return y.forEach((c,u)=>{const k=Math.max(4,c/r*L),f=d+u*(Y+H);o.fillStyle=u===y.indexOf(r)?b:p,o.beginPath(),o.roundRect(f,q+L-k,Y,k,4),o.fill(),o.lineWidth=3,o.strokeStyle=s,o.stroke()}),h("modelpulse.ifsp.dev",62,i-40,"500 24px 'IBM Plex Mono'","#6E6C66"),new Promise(c=>a.toBlob(u=>c(u),"image/png"))}function z({initial:n}){const[l,i]=$(n??""),[a,o]=$(null);E(()=>{X.leaderboards().then(o).catch(()=>{})},[]);const s=t=>{const p=t.trim().replace(/^https?:\/\/huggingface\.co\//,"").split("/")[0];p&&A({view:"wrapped",author:p})};return e("div",{class:"wrap w-entry",children:[e("h1",{children:[e(U,{size:72}),"Model Pulse ",e("span",{class:"hl",children:"Wrapped"})]}),e("p",{class:"lede",children:"Your last 12 months on the Hugging Face Hub, in six cards: total downloads, your #1 model, your biggest week, the models built on yours, and where you rank."}),e("form",{class:"w-form",onSubmit:t=>{t.preventDefault(),s(l)},children:[e("div",{class:"search big",children:e("input",{value:l,onInput:t=>i(t.target.value),placeholder:"Username or org, e.g. Qwen","aria-label":"Username or organization",autoFocus:!0,spellcheck:!1})}),e("button",{class:"btn primary",type:"submit",children:"Get my Wrapped"})]}),a&&e("div",{class:"examples",children:[e("span",{class:"muted",children:"or try"}),a.authors_7d.slice(0,10).map(t=>e("a",{class:"chip",href:D({view:"wrapped",author:t.author}),onClick:p=>{p.preventDefault(),s(t.author)},children:t.author},t.author))]})]})}function le({author:n}){const[l,i]=$(null),[a,o]=$(null),[s,t]=$(0),[p,b]=$(!1),F=G(null);E(()=>{document.title=n?`${n}'s last 12 months on Hugging Face · Model Pulse Wrapped`:"Model Pulse Wrapped: your last 12 months on Hugging Face",i(null),o(null),t(0),n&&fetch(`${K}/api/wrapped/${encodeURIComponent(n)}`).then(async r=>{const d=await r.json();if(!r.ok)throw new Error(d.detail||"Something went wrong");return d}).then(i).catch(r=>o(r.message))},[n]);const h=l?j(l,s).length+1:0,C=()=>t(r=>Math.min(h-1,r+1)),P=()=>t(r=>Math.max(0,r-1));if(E(()=>{if(!l)return;const r=d=>{(d.key==="ArrowRight"||d.key===" ")&&(d.preventDefault(),C()),d.key==="ArrowLeft"&&P()};return addEventListener("keydown",r),()=>removeEventListener("keydown",r)},[l,h]),!n)return e(z,{});if(a)return e("div",{class:"wrap w-entry",children:[e("h1",{class:"w-err",children:["No Wrapped for ",n," yet"]}),e("p",{class:"lede",children:a}),e(z,{initial:""})]});if(!l)return e("div",{class:"wrap w-loading",children:[e(U,{size:64}),e("p",{children:["Crunching 12 months of downloads for ",e("b",{children:n}),"…"]})]});const M=j(l,s),g=J({view:"wrapped",author:l.author}),R=`My last 12 months on the Hugging Face Hub: ${m(l.downloads)} downloads${S(l)&&(l.rank<=1e3||(l.top_pct??100)<=10)?`, ${S(l)} of publishers`:""}. Get your Model Pulse Wrapped:`,y=s===M.length;return e("div",{class:"wrap w-page",children:e("div",{class:"w-stage",ref:F,children:[e("div",{class:"w-progress","aria-hidden":"true",children:Array.from({length:h},(r,d)=>e("span",{class:d<s?"done":d===s?"now":""},d))}),y?e("div",{class:"w-card tone-paper w-summary",children:[e("div",{class:"w-kicker",children:B(l)}),e("h2",{class:"w-title sm",children:e("span",{class:"w-name",children:l.author})}),e("div",{class:"w-grid",children:[e("div",{class:"t blue",children:[e("span",{children:"downloads"}),e("b",{children:m(l.downloads)})]}),e("div",{class:"t",children:[e("span",{children:"#1 model"}),e("b",{class:"s",children:l.top_model?W(l.top_model.id):"–"})]}),e("div",{class:"t",children:[e("span",{children:"biggest week"}),e("b",{children:l.best_week?m(l.best_week.downloads):"–"})]}),e("div",{class:"t yellow",children:[e("span",{children:"publisher rank"}),e("b",{children:["#",w(l.rank)]})]}),l.ripple.models>0?e("div",{class:"t",children:[e("span",{children:"built on yours"}),e("b",{children:w(l.ripple.models)})]}):e("div",{class:"t",children:[e("span",{children:"new models"}),e("b",{children:w(l.models_new)})]}),e("div",{class:"t",children:[e("span",{children:"likes gained"}),e("b",{children:["+",m(l.likes_gained)]})]})]}),e("div",{class:"w-actions",children:[e("button",{class:"btn primary",disabled:p,onClick:async()=>{b(!0);try{const r=await ne(l),d=document.createElement("a");d.href=URL.createObjectURL(r),d.download=`${l.author}-model-pulse-wrapped.png`,d.click(),setTimeout(()=>URL.revokeObjectURL(d.href),2e3)}finally{b(!1)}},children:p?"Drawing…":"Download image"}),e("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://x.com/intent/post?text=${encodeURIComponent(R)}&url=${encodeURIComponent(g)}`,children:"Post on X"}),e("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(g)}`,children:"LinkedIn"}),e("button",{class:"btn",onClick:()=>{var r;return(r=navigator.clipboard)==null?void 0:r.writeText(g)},children:"Copy link"})]}),e("div",{class:"w-more",children:[e("a",{href:D({author:l.author}),onClick:r=>{r.preventDefault(),A({author:l.author})},children:["See ",l.author,"'s models"]}),e("a",{href:D({view:"wrapped"}),onClick:r=>{r.preventDefault(),A({view:"wrapped"})},children:"Try another name"})]}),e("div",{class:"w-like",children:e(Q,{})})]},"summary"):e("div",{class:`w-card tone-${M[s].tone}`,"aria-live":"polite",children:[M[s].body,e("button",{class:"w-tap left","aria-label":"Previous card",onClick:P}),e("button",{class:"w-tap right","aria-label":"Next card",onClick:C})]},M[s].key),e("div",{class:"w-nav",children:[e("button",{class:"btn",onClick:P,disabled:s===0,children:"Back"}),e("span",{class:"w-mono",children:[s+1," / ",h]}),e("button",{class:"btn primary",onClick:C,disabled:y,children:s===M.length-1?"Summary":"Next"})]})]})})}export{le as Wrapped};
 
1
+ import{d as $,A as G,h as E,i as K,u as e,c as U,s as J,b as m,f as w,n as A,a as D,L as Q,S as x,j as I,k as X}from"./index-DOgVJS4B.js";const Z=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function T({to:n,run:l,format:i=w}){const[a,o]=$(0);return E(()=>{if(!l){o(0);return}if(Z()){o(n);return}let s=0;const t=performance.now(),p=1300,b=F=>{const h=Math.min(1,(F-t)/p);o(n*(1-Math.pow(1-h,3))),h<1&&(s=requestAnimationFrame(b))};return s=requestAnimationFrame(b),()=>cancelAnimationFrame(s)},[n,l]),e(x,{children:i(Math.round(a))})}const ee=n=>{if(n.every_seconds>=1){const l=n.every_seconds;return l<60?`one download every ${l.toFixed(l<10?1:0)} seconds`:l<3600?`one download every ${Math.round(l/60)} minutes`:`one download every ${Math.round(l/3600)} hours`}return n.per_minute>=1e3?`${m(n.per_minute)} downloads every minute`:`${Math.round(n.per_minute)} downloads every minute`},W=n=>n.split("/").slice(1).join("/")||n,S=n=>n.rank<=10?"top 10":n.rank<=100?"top 100":n.rank<=1e3?"top 1,000":n.top_pct==null||n.top_pct>50?null:`top ${n.top_pct<1?n.top_pct.toFixed(1):Math.ceil(n.top_pct)}%`,O=n=>{const l=new Date(n.period.to.slice(0,7)+"-01T00:00:00Z"),i=new Map(n.months.map(a=>[a.month.slice(0,7),a.downloads]));return Array.from({length:12},(a,o)=>{const t=new Date(Date.UTC(l.getUTCFullYear(),l.getUTCMonth()-12+o,1)).toISOString().slice(0,7);return{month:t,downloads:i.get(t)??0}})},B=n=>`${I(n.period.from,{month:"short",year:"numeric"})} – ${I(n.period.to,{month:"short",year:"numeric"})}`;function N({values:n,highlight:l,light:i}){const a=Math.max(...n,1);return e("div",{class:`w-bars${i?" light":""}`,"aria-hidden":"true",children:n.map((o,s)=>e("span",{class:s===l?"hi":"",style:{height:`${Math.max(3,o/a*100)}%`}},s))})}function j(n,l){const i=t=>l===t,a=n.weeks.map(t=>t.downloads),o=n.best_week?n.weeks.findIndex(t=>t.week_of===n.best_week.week_of):-1;return[{key:"intro",tone:"yellow",body:e(x,{children:[e("div",{class:"w-kicker",children:"Model Pulse Wrapped"}),e("div",{class:"w-logo",children:e(U,{size:88})}),e("h2",{class:"w-title",children:[e("span",{class:"w-name",children:n.author}),e("br",{}),"on the Hub"]}),e("p",{class:"w-sub",children:"Your last 12 months, in six cards."}),e("p",{class:"w-mono",children:B(n)})]})},{key:"downloads",tone:"blue",body:e(x,{children:[e("div",{class:"w-kicker",children:"Your models were downloaded"}),e("div",{class:"w-big",children:e(T,{to:n.downloads,run:i(1)})}),e("p",{class:"w-sub",children:["times. That's ",ee(n),"."]}),e(N,{values:O(n).map(t=>t.downloads),light:!0}),e("p",{class:"w-mono",children:"downloads by month"})]})},{key:"top",tone:"paper",body:n.top_model?e(x,{children:[e("div",{class:"w-kicker",children:"Your #1 model this year"}),e("h2",{class:"w-model",children:e("span",{children:W(n.top_model.id)})}),e("div",{class:"w-big sm",children:[e(T,{to:n.top_model.downloads,run:i(2),format:m})," ",e("small",{children:"downloads"})]}),e("p",{class:"w-sub",children:[Math.round(n.top_model.share*100),"% of everything you served",n.top_model.task?`, as ${n.top_model.task.replace(/-/g," ")}`:"","."]}),n.top_models.length>1&&e("ol",{class:"w-list",start:2,children:n.top_models.slice(1,5).map(t=>e("li",{children:[e("span",{children:W(t.id)}),e("b",{children:m(t.downloads)})]},t.id))})]}):e("p",{class:"w-sub",children:"No single model stood out this year."})},{key:"week",tone:"orange",body:n.best_week?e(x,{children:[e("div",{class:"w-kicker",children:"Your biggest week"}),e("h2",{class:"w-title sm",children:["Week of ",I(n.best_week.week_of,{month:"long",day:"numeric",year:"numeric"})]}),e("div",{class:"w-big",children:e(T,{to:n.best_week.downloads,run:i(3)})}),e("p",{class:"w-sub",children:"downloads in seven days."}),e(N,{values:a,highlight:o})]}):e("p",{class:"w-sub",children:"Not enough weeks of data yet."})},{key:"ripple",tone:"green",body:n.ripple.models>0?e(x,{children:[e("div",{class:"w-kicker",children:"Your ripple effect"}),e("div",{class:"w-big",children:e(T,{to:n.ripple.models,run:i(4)})}),e("p",{class:"w-sub",children:["models by other people build on yours. Together they were downloaded ",e("b",{children:m(n.ripple.downloads_30d)})," times last month."]}),n.ripple.top&&e("p",{class:"w-mono",children:["the biggest: ",n.ripple.top.id," (",n.ripple.top.relation,")"]})]}):e(x,{children:[e("div",{class:"w-kicker",children:"Your ripple effect"}),e("h2",{class:"w-title sm",children:"No derivatives yet."}),e("p",{class:"w-sub",children:["When someone quantizes or fine-tunes one of your models, it shows up here. You published ",e("b",{children:n.models_new})," new model",n.models_new===1?"":"s"," this year; one of them could be next."]})]})},{key:"rank",tone:"red",body:e(x,{children:[e("div",{class:"w-kicker",children:["Among ",w(n.authors_ranked)," publishers on the Hub"]}),e("div",{class:"w-big xl",children:["#",e(T,{to:n.rank,run:i(5)})]}),e("p",{class:"w-sub",children:S(n)?n.rank<=1e3?`A ${S(n)} publisher by downloads this year.`:`That's the ${S(n)} by downloads.`:"by downloads this year."}),e("div",{class:"w-chips",children:[e("span",{children:["+",w(n.likes_gained)," likes"]}),e("span",{children:[w(n.models_new)," new models"]}),e("span",{children:[w(n.models_total)," models in total"]})]})]})}]}async function ne(n){await Promise.all(["600 80px 'Fredoka'","500 20px 'IBM Plex Mono'","400 20px 'Source Sans 3'"].map(c=>document.fonts.load(c)));const l=1080,i=1350,a=document.createElement("canvas");a.width=l,a.height=i;const o=a.getContext("2d"),s="#1B1B1F",t="#ECE9E2",p="#FBFAF5",b="#FFD21E",F=(c,u,k,f,v)=>{o.fillStyle=s,o.beginPath(),o.roundRect(c+8,u+8,k,f,26),o.fill(),o.fillStyle=v,o.beginPath(),o.roundRect(c,u,k,f,26),o.fill(),o.lineWidth=4,o.strokeStyle=s,o.stroke()},h=(c,u,k,f,v=s,_)=>{if(o.font=f,o.fillStyle=v,_&&o.measureText(c).width>_){for(;c.length>3&&o.measureText(c+"…").width>_;)c=c.slice(0,-1);c+="…"}o.fillText(c,u,k)};o.fillStyle=t,o.fillRect(0,0,l,i),o.fillStyle=s,o.beginPath(),o.roundRect(68,68,76,76,20),o.fill(),o.fillStyle=b,o.beginPath(),o.roundRect(62,62,72,72,18),o.fill(),o.lineWidth=6,o.strokeStyle=s,o.stroke(),o.beginPath(),o.lineWidth=6,o.lineJoin="round",o.lineCap="round",o.moveTo(74,100),o.lineTo(87,100),o.lineTo(94,81),o.lineTo(106,117),o.lineTo(113,100),o.lineTo(124,100),o.stroke(),h("Model Pulse Wrapped",156,116,"600 44px 'Fredoka'"),h(B(n),62,196,"500 26px 'IBM Plex Mono'","#6E6C66"),o.font="600 92px 'Fredoka'";const C=n.author.length>20?n.author.slice(0,19)+"…":n.author,P=Math.min(l-124,o.measureText(C).width+44);o.fillStyle=b,o.beginPath(),o.roundRect(54,222,P,120,18),o.fill(),h(C,76,314,"600 92px 'Fredoka'",s,l-170),F(62,386,l-124,250,"#3B6FF5"),h("downloads in 12 months",100,446,"500 28px 'IBM Plex Mono'","#fff"),h(w(n.downloads),96,572,"600 118px 'Fredoka'","#fff",l-200);const M=[["#1 model",n.top_model?W(n.top_model.id):"–",n.top_model?`${m(n.top_model.downloads)} downloads`:""],["biggest week",n.best_week?m(n.best_week.downloads):"–",n.best_week?`week of ${I(n.best_week.week_of,{month:"short",day:"numeric"})}`:""],["publisher rank",`#${w(n.rank)}`,S(n)??`of ${m(n.authors_ranked)}`],n.ripple.models>0?["built on yours",w(n.ripple.models),"models by others"]:["published",w(n.models_new),n.models_new===1?"new model this year":"new models this year"]],g=(l-124-32)/2,R=230;M.forEach(([c,u,k],f)=>{const v=62+f%2*(g+32),_=676+Math.floor(f/2)*(R+32);F(v,_,g,R,f===0?b:p),h(c,v+30,_+54,"500 24px 'IBM Plex Mono'","#6E6C66"),h(u,v+28,_+136,`600 ${u.length>14?46:70}px 'Fredoka'`,s,g-56),h(k,v+30,_+190,"400 26px 'Source Sans 3'","#3D3D45",g-60)});const y=O(n).map(c=>c.downloads),r=Math.max(...y,1),d=62,q=1196,V=l-124,L=64,H=6,Y=(V-H*(y.length-1))/Math.max(1,y.length);return y.forEach((c,u)=>{const k=Math.max(4,c/r*L),f=d+u*(Y+H);o.fillStyle=u===y.indexOf(r)?b:p,o.beginPath(),o.roundRect(f,q+L-k,Y,k,4),o.fill(),o.lineWidth=3,o.strokeStyle=s,o.stroke()}),h("modelpulse.ifsp.dev",62,i-40,"500 24px 'IBM Plex Mono'","#6E6C66"),new Promise(c=>a.toBlob(u=>c(u),"image/png"))}function z({initial:n}){const[l,i]=$(n??""),[a,o]=$(null);E(()=>{X.leaderboards().then(o).catch(()=>{})},[]);const s=t=>{const p=t.trim().replace(/^https?:\/\/huggingface\.co\//,"").split("/")[0];p&&A({view:"wrapped",author:p})};return e("div",{class:"wrap w-entry",children:[e("h1",{children:[e(U,{size:72}),"Model Pulse ",e("span",{class:"hl",children:"Wrapped"})]}),e("p",{class:"lede",children:"Your last 12 months on the Hugging Face Hub, in six cards: total downloads, your #1 model, your biggest week, the models built on yours, and where you rank."}),e("form",{class:"w-form",onSubmit:t=>{t.preventDefault(),s(l)},children:[e("div",{class:"search big",children:e("input",{value:l,onInput:t=>i(t.target.value),placeholder:"Username or org, e.g. Qwen","aria-label":"Username or organization",autoFocus:!0,spellcheck:!1})}),e("button",{class:"btn primary",type:"submit",children:"Get my Wrapped"})]}),a&&e("div",{class:"examples",children:[e("span",{class:"muted",children:"or try"}),a.authors_7d.slice(0,10).map(t=>e("a",{class:"chip",href:D({view:"wrapped",author:t.author}),onClick:p=>{p.preventDefault(),s(t.author)},children:t.author},t.author))]})]})}function le({author:n}){const[l,i]=$(null),[a,o]=$(null),[s,t]=$(0),[p,b]=$(!1),F=G(null);E(()=>{document.title=n?`${n}'s last 12 months on Hugging Face · Model Pulse Wrapped`:"Model Pulse Wrapped: your last 12 months on Hugging Face",i(null),o(null),t(0),n&&fetch(`${K}/api/wrapped/${encodeURIComponent(n)}`).then(async r=>{const d=await r.json();if(!r.ok)throw new Error(d.detail||"Something went wrong");return d}).then(i).catch(r=>o(r.message))},[n]);const h=l?j(l,s).length+1:0,C=()=>t(r=>Math.min(h-1,r+1)),P=()=>t(r=>Math.max(0,r-1));if(E(()=>{if(!l)return;const r=d=>{(d.key==="ArrowRight"||d.key===" ")&&(d.preventDefault(),C()),d.key==="ArrowLeft"&&P()};return addEventListener("keydown",r),()=>removeEventListener("keydown",r)},[l,h]),!n)return e(z,{});if(a)return e("div",{class:"wrap w-entry",children:[e("h1",{class:"w-err",children:["No Wrapped for ",n," yet"]}),e("p",{class:"lede",children:a}),e(z,{initial:""})]});if(!l)return e("div",{class:"wrap w-loading",children:[e(U,{size:64}),e("p",{children:["Crunching 12 months of downloads for ",e("b",{children:n}),"…"]})]});const M=j(l,s),g=J({view:"wrapped",author:l.author}),R=`My last 12 months on the Hugging Face Hub: ${m(l.downloads)} downloads${S(l)&&(l.rank<=1e3||(l.top_pct??100)<=10)?`, ${S(l)} of publishers`:""}. Get your Model Pulse Wrapped:`,y=s===M.length;return e("div",{class:"wrap w-page",children:e("div",{class:"w-stage",ref:F,children:[e("div",{class:"w-progress","aria-hidden":"true",children:Array.from({length:h},(r,d)=>e("span",{class:d<s?"done":d===s?"now":""},d))}),y?e("div",{class:"w-card tone-paper w-summary",children:[e("div",{class:"w-kicker",children:B(l)}),e("h2",{class:"w-title sm",children:e("span",{class:"w-name",children:l.author})}),e("div",{class:"w-grid",children:[e("div",{class:"t blue",children:[e("span",{children:"downloads"}),e("b",{children:m(l.downloads)})]}),e("div",{class:"t",children:[e("span",{children:"#1 model"}),e("b",{class:"s",children:l.top_model?W(l.top_model.id):"–"})]}),e("div",{class:"t",children:[e("span",{children:"biggest week"}),e("b",{children:l.best_week?m(l.best_week.downloads):"–"})]}),e("div",{class:"t yellow",children:[e("span",{children:"publisher rank"}),e("b",{children:["#",w(l.rank)]})]}),l.ripple.models>0?e("div",{class:"t",children:[e("span",{children:"built on yours"}),e("b",{children:w(l.ripple.models)})]}):e("div",{class:"t",children:[e("span",{children:"new models"}),e("b",{children:w(l.models_new)})]}),e("div",{class:"t",children:[e("span",{children:"likes gained"}),e("b",{children:["+",m(l.likes_gained)]})]})]}),e("div",{class:"w-actions",children:[e("button",{class:"btn primary",disabled:p,onClick:async()=>{b(!0);try{const r=await ne(l),d=document.createElement("a");d.href=URL.createObjectURL(r),d.download=`${l.author}-model-pulse-wrapped.png`,d.click(),setTimeout(()=>URL.revokeObjectURL(d.href),2e3)}finally{b(!1)}},children:p?"Drawing…":"Download image"}),e("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://x.com/intent/post?text=${encodeURIComponent(R)}&url=${encodeURIComponent(g)}`,children:"Post on X"}),e("a",{class:"btn",target:"_blank",rel:"noopener",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(g)}`,children:"LinkedIn"}),e("button",{class:"btn",onClick:()=>{var r;return(r=navigator.clipboard)==null?void 0:r.writeText(g)},children:"Copy link"})]}),e("div",{class:"w-more",children:[e("a",{href:D({author:l.author}),onClick:r=>{r.preventDefault(),A({author:l.author})},children:["See ",l.author,"'s models"]}),e("a",{href:D({view:"wrapped"}),onClick:r=>{r.preventDefault(),A({view:"wrapped"})},children:"Try another name"})]}),e("div",{class:"w-like",children:e(Q,{})})]},"summary"):e("div",{class:`w-card tone-${M[s].tone}`,"aria-live":"polite",children:[M[s].body,e("button",{class:"w-tap left","aria-label":"Previous card",onClick:P}),e("button",{class:"w-tap right","aria-label":"Next card",onClick:C})]},M[s].key),e("div",{class:"w-nav",children:[e("button",{class:"btn",onClick:P,disabled:s===0,children:"Back"}),e("span",{class:"w-mono",children:[s+1," / ",h]}),e("button",{class:"btn primary",onClick:C,disabled:y,children:s===M.length-1?"Summary":"Next"})]})]})})}export{le as Wrapped};
assets/{index-Dlh2W4Kh.js → index-DOgVJS4B.js} RENAMED
The diff for this file is too large to render. See raw diff
 
index.html CHANGED
@@ -9,7 +9,7 @@
9
  <!-- the server sends a plain-HTML version of each page for search engines; with JavaScript the app replaces it -->
10
  <script>document.documentElement.classList.add("js")</script>
11
  <style>.js #app > .ssr { display: none }</style>
12
- <script type="module" crossorigin src="/assets/index-Dlh2W4Kh.js"></script>
13
  <link rel="stylesheet" crossorigin href="/assets/index-D_rFYWpt.css">
14
  </head>
15
  <body>
 
9
  <!-- the server sends a plain-HTML version of each page for search engines; with JavaScript the app replaces it -->
10
  <script>document.documentElement.classList.add("js")</script>
11
  <style>.js #app > .ssr { display: none }</style>
12
+ <script type="module" crossorigin src="/assets/index-DOgVJS4B.js"></script>
13
  <link rel="stylesheet" crossorigin href="/assets/index-D_rFYWpt.css">
14
  </head>
15
  <body>