(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,659633,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(618115),r=e.i(136562),s=e.i(553214),a=e.i(912147),i=e.i(326e3),o=e.i(954217),c=e.i(481914),d=e.i(199168),u=e.i(988590);e.i(707060);var m=e.i(387086),h=e.i(196991),p=e.i(862389),f=e.i(252830),g=e.i(16043),x=e.i(298975),b=e.i(287314),j=e.i(444731),y=e.i(269200);let v=[[(0,m.b)("Today"),"day"],[(0,m.b)("This Week"),"week"],[(0,m.b)("This Month"),"month"]];function _(e){let l,a,m=(0,n.c)(36),[j,_]=(0,g.useState)("day"),N=(0,d.M)(),T=(0,d.o)();m[0]!==e.rankMap||m[1]!==j?(l=e.rankMap[j]??[],m[0]=e.rankMap,m[1]=j,m[2]=l):l=m[2];let I=l;if(m[3]!==I||m[4]!==T||m[5]!==N||m[6]!==e.className||m[7]!==j){let n,l,d,g,M,C,A,L,P,R,O,D,V,E,z,F,H=v.find(e=>{let[,t]=e;return t===j})?.[0];m[9]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.f)("transition-opacity grid grid-cols-1 md:grid-cols-2 gap-5 md:gap-16"),l={[c.g]:""},m[9]=n,m[10]=l):(n=m[9],l=m[10]),m[11]!==I?(d=I.slice(0,5).map(S),m[11]=I,m[12]=d):d=m[12],m[13]!==d?(g=(0,t.jsx)("div",{className:"flex flex-col gap-y-5",children:d}),m[13]=d,m[14]=g):g=m[14],m[15]!==I?(M=I.slice(5,10).map(w),m[15]=I,m[16]=M):M=m[16],m[17]!==M?(C=(0,t.jsx)("div",{className:"flex flex-col gap-y-5",children:M}),m[17]=M,m[18]=C):C=m[18],m[19]!==g||m[20]!==C?(A=(0,t.jsxs)("div",{className:n,...l,children:[g,C]}),m[19]=g,m[20]=C,m[21]=A):A=m[21];let U=A;m[22]!==e.className?(L=(0,r.f)("flex flex-col gap-10",e.className),m[22]=e.className,m[23]=L):L=m[23],m[24]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsx)(h.T,{children:"Top Apps"}),m[24]=P):P=m[24],m[25]===Symbol.for("react.memo_cache_sentinel")?(R=e=>{(0,u.q)(e,y.W)&&_(e)},m[25]=R):R=m[25],m[26]===Symbol.for("react.memo_cache_sentinel")?(O=(0,t.jsx)(i.SelectTrigger,{className:"w-36",children:(0,t.jsx)(i.SelectValue,{})}),m[26]=O):O=m[26],m[27]!==N?(D=v.map(e=>{let[n,l]=e;return(0,t.jsx)(i.SelectItem,{value:l,children:N(n)},l)}),m[27]=N,m[28]=D):D=m[28],m[29]!==D?(V=(0,t.jsx)(i.SelectContent,{children:D}),m[29]=D,m[30]=V):V=m[30],m[31]!==j||m[32]!==V?(E=(0,t.jsx)(x.E,{icon:f.f,title:P,anchorId:"apps",hideSubtitleOnMobile:!0,renderSubtitle:k,controls:(0,t.jsxs)(i.Select,{value:j,onValueChange:R,size:"compact",children:[O,V]})}),m[31]=j,m[32]=V,m[33]=E):E=m[33],m[34]===Symbol.for("react.memo_cache_sentinel")?(z=(0,t.jsx)(p.f,{}),m[34]=z):z=m[34],m[35]===Symbol.for("react.memo_cache_sentinel")?(F=(0,t.jsx)(s.M,{variant:"info",icon:z,action:(0,t.jsx)(o.TextLink,{href:"/apps",className:"whitespace-nowrap text-info-text hover:text-info-text",target:"_blank",rel:"noopener noreferrer",children:(0,t.jsx)(h.T,{children:"Browse apps"})}),children:(0,t.jsx)(h.T,{children:"Browse the new Apps & Agents directory to explore by category, discover trending tools, and see detailed usage stats."})}),m[35]=F):F=m[35],a=(0,t.jsxs)("div",{className:L,children:[E,F,0===I.length?U:(0,t.jsx)(b.f,{sectionId:"apps",title:T("Top apps on OpenRouter"),filters:void 0===H?void 0:[N(H)],children:U})]}),m[3]=I,m[4]=T,m[5]=N,m[6]=e.className,m[7]=j,m[8]=a}else a=m[8];return a}function k(e){return(0,t.jsx)(h.T,{children:(0,t.jsxs)("p",{className:e,children:["Explore apps and agents"," ",(0,t.jsx)(a.f,{href:"/docs/api_reference/overview#headers",target:"_blank",rel:"noopener noreferrer",children:"opting into usage tracking"})," ","by category"]})})}function w(e,n){return(0,t.jsx)(j.f,{appAnalytics:e,rank:n+5+1},e.app?.id??e.app_id)}function S(e,n){return(0,t.jsx)(j.f,{appAnalytics:e,rank:n+1},e.app?.id??e.app_id)}var N=e.i(411240),T=e.i(953871);e.s(["AppRankings",0,function(){let e,r,s=(0,n.c)(4);s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,N.h)(),s[0]=e):e=s[0];let{data:a}=(0,l.f)(e);if(!a){let e;return s[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(T.r,{}),s[1]=e):e=s[1],e}return s[2]!==a?(r=(0,t.jsx)(_,{rankMap:a}),s[2]=a,s[3]=r):r=s[3],r}],659633)},321549,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(618115),r=e.i(19773),s=e.i(16043),a=e.i(740436),i=e.i(382526),o=e.i(610586),c=e.i(354090),d=e.i(136562),u=e.i(912147),m=e.i(328262),h=e.i(954217),p=e.i(960773),f=e.i(199168);e.i(707060);var g=e.i(196991),x=e.i(153746),b=e.i(387086);let j={[a.V.Intelligence]:(0,b.b)("Artificial Analysis Intelligence Index"),[a.V.Coding]:(0,b.b)("Artificial Analysis Coding Index"),[a.V.Agentic]:(0,b.b)("Artificial Analysis Agentic Index"),[a.e.DACodeCategories]:(0,b.b)("Design Arena Code Categories ELO"),[a.e.DAUIComponent]:(0,b.b)("Design Arena UI Component ELO"),[a.e.DAGameDev]:(0,b.b)("Design Arena Game Dev ELO"),[a.e.DADataViz]:(0,b.b)("Design Arena Data Viz ELO"),[a.e.DA3D]:(0,b.b)("Design Arena 3D ELO"),[a.e.DAImage]:(0,b.b)("Design Arena Image ELO"),[a.e.DAVideo]:(0,b.b)("Design Arena Video ELO"),[a.e.DASvg]:(0,b.b)("Design Arena SVG ELO"),[a.l.GpqaDiamond]:(0,b.b)("GPQA Diamond accuracy"),[a.l.Tau2Airline]:(0,b.b)("τ²-Bench Airline accuracy"),[a.l.VgiBench]:(0,b.b)("VGI-Bench accuracy"),[a.F.ValsIndex]:(0,b.b)("Vals Index")},y={[a.V.Intelligence]:"https://artificialanalysis.ai/evaluations/artificial-analysis-intelligence-index",[a.V.Coding]:"https://artificialanalysis.ai/models/capabilities/coding",[a.V.Agentic]:"https://artificialanalysis.ai/models/capabilities/agentic"};var v=e.i(864747),_=e.i(774294),k=e.i(298975);function w(e){let l,r,s,o,c,u,m,f,x,b=(0,n.c)(19),{category:j,valsIndexVersion:y}=e,v=(0,p.Q)();return b[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(k.y,{icon:i.f,anchorId:"benchmarks",children:(0,t.jsx)(g.T,{children:"Benchmarks"})}),b[0]=l):l=b[0],b[1]!==j?(r=!(0,a.S)(j)&&"hidden md:block",b[1]=j,b[2]=r):r=b[2],b[3]!==r?(s=(0,d.f)("text-xs font-medium text-muted-foreground",r),b[3]=r,b[4]=s):s=b[4],b[5]!==j||b[6]!==y?(o=(0,t.jsx)(S,{category:j,valsIndexVersion:y}),b[5]=j,b[6]=y,b[7]=o):o=b[7],b[8]!==s||b[9]!==o?(c=(0,t.jsx)("p",{className:s,children:o}),b[8]=s,b[9]=o,b[10]=c):c=b[10],b[11]!==v?(u=()=>{v.capture("click_rankings_benchmarks_link",{destination:"/benchmarks",source:"rankings_benchmarks_section"})},b[11]=v,b[12]=u):u=b[12],b[13]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(g.T,{children:"View all benchmarks"}),b[13]=m):m=b[13],b[14]!==u?(f=(0,t.jsx)(h.TextLink,{href:"/benchmarks",weight:"medium",onClick:u,children:m}),b[14]=u,b[15]=f):f=b[15],b[16]!==c||b[17]!==f?(x=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[l,(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2",children:[c,f]})]}),b[16]=c,b[17]=f,b[18]=x):x=b[18],x}function S(e){let l,r,s,i,c=(0,n.c)(32),{category:d,valsIndexVersion:p}=e,b=(0,f.M)();if((0,a.S)(d)){let e;return c[0]!==p?(e=(0,t.jsx)(N,{version:p}),c[0]=p,c[1]=e):e=c[1],e}if((0,a.f)(d)){let e,n,l,r;return c[2]!==d||c[3]!==b?(e=o.h.find(e=>e.type===d)?.label??b(j[d]),c[2]=d,c[3]=b,c[4]=e):e=c[4],c[5]!==e?(n=(0,t.jsx)(x.d,{children:e}),c[5]=e,c[6]=n):n=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)(m.InfoTooltip,{hitArea:"padded",icon:_.y,side:_.R,children:["Data sourced from"," ",(0,t.jsx)(u.f,{href:"https://www.designarena.ai",target:"_blank",rel:"noopener noreferrer",children:"Design Arena"})," ","by The Intelligence Company"]}),c[7]=l):l=c[7],c[8]!==n?(r=(0,t.jsxs)(g.T,{children:["Top models on OpenRouter by Design Arena"," ",n," ",l]}),c[8]=n,c[9]=r):r=c[9],r}if((0,a.k)(d)){let e,n,l,r,s,a=j[d];return c[10]!==b||c[11]!==a?(e=b(a),c[10]=b,c[11]=a,c[12]=e):e=c[12],c[13]!==e?(n=(0,t.jsx)(x.d,{children:e}),c[13]=e,c[14]=n):n=c[14],c[15]!==d?(l=(0,v.x)(d),c[15]=d,c[16]=l):l=c[16],c[17]!==l.href?(r=(0,t.jsxs)(m.InfoTooltip,{hitArea:"padded",icon:_.y,side:_.R,children:["Median accuracy across providers, measured by OpenRouter. See the"," ",(0,t.jsx)(h.TextLink,{href:l.href,children:"full leaderboard"})]}),c[17]=l.href,c[18]=r):r=c[18],c[19]!==n||c[20]!==r?(s=(0,t.jsxs)(g.T,{children:["Top models on OpenRouter by ",n," ",r]}),c[19]=n,c[20]=r,c[21]=s):s=c[21],s}let k=j[d];c[22]!==b||c[23]!==k?(l=b(k),c[22]=b,c[23]=k,c[24]=l):l=c[24],c[25]!==l?(r=(0,t.jsx)(x.d,{children:l}),c[25]=l,c[26]=r):r=c[26];let w=y[d];return c[27]!==w?(s=(0,t.jsxs)(m.InfoTooltip,{hitArea:"padded",icon:_.y,side:_.R,children:["Data sourced from"," ",(0,t.jsx)(u.f,{href:w,target:"_blank",rel:"noopener noreferrer",children:"Artificial Analysis"})]}),c[27]=w,c[28]=s):s=c[28],c[29]!==r||c[30]!==s?(i=(0,t.jsxs)(g.T,{children:["Top models on OpenRouter by ",r," ",s]}),c[29]=r,c[30]=s,c[31]=i):i=c[31],i}function N(e){let l,r,s,a=(0,n.c)(6),{version:i}=e,o=(0,f.o)();return a[0]!==o||a[1]!==i?(l=null===i?o("Top models on OpenRouter by Vals Index"):o("Top models on OpenRouter by Vals Index v{version}",{version:i}),a[0]=o,a[1]=i,a[2]=l):l=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(m.InfoTooltip,{hitArea:"padded",icon:_.y,side:_.R,children:(0,t.jsxs)(g.T,{children:["Scores sourced from"," ",(0,t.jsx)(u.f,{href:c.f,target:"_blank",rel:"noopener noreferrer",children:"Vals AI"}),". Only models scored on this version of the Vals Index are ranked."]})}),a[3]=r):r=a[3],a[4]!==l?(s=(0,t.jsxs)(t.Fragment,{children:[l," ",r]}),a[4]=l,a[5]=s):s=a[5],s}var T=e.i(359903),I=e.i(297272),M=e.i(297510),C=e.i(293747),A=e.i(770292),L=e.i(139697),P=e.i(799963),R=e.i(647402),O=e.i(894868),D=e.i(475615),V=e.i(261499),E=e.i(624112),z=e.i(326e3),F=e.i(623304),H=e.i(850195),U=e.i(165757),B=e.i(195362),q=e.i(336810),$=e.i(778915),K=e.i(895966),W=e.i(138257),G=e.i(797521),Y=e.i(988590),Z=e.i(288265),Q=e.i(919035);let J=[{type:a.V.Intelligence,label:(0,b.b)("Intelligence Index Score")},{type:a.V.Coding,label:(0,b.b)("Coding Index Score")},{type:a.V.Agentic,label:(0,b.b)("Agentic Index Score")}];function X(e){let l,r,s,i,c,d,u,m,h,p,f,g,x,b=(0,n.c)(31),{category:y,daCategoryKeys:v,valsIndex:_,visibleORBenchmarks:k,onCategoryChange:w}=e,S=(0,Z.f)(),N=(0,Q.f)();b[0]!==v?(l=o.h.filter(e=>v.includes(e.daKey)),b[0]=v,b[1]=l):l=b[1];let T=l;return b[2]!==w?(r=e=>{((0,Y.q)(e,a.V)||(0,Y.q)(e,a.e)||(0,Y.q)(e,a.l)||(0,Y.q)(e,a.F))&&w(e)},b[2]=w,b[3]=r):r=b[3],b[4]!==S?(s=S("Filter by benchmark category"),b[4]=S,b[5]=s):s=b[5],b[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(z.SelectValue,{}),b[6]=i):i=b[6],b[7]!==s?(c=(0,t.jsx)(z.SelectTrigger,{className:"w-full md:w-60","aria-label":s,children:i}),b[7]=s,b[8]=c):c=b[8],b[9]!==k?(d=k.length>0&&(0,t.jsxs)(z.SelectGroup,{children:[(0,t.jsx)(z.SelectLabel,{children:"OpenRouter"}),k.map(et)]}),b[9]=k,b[10]=d):d=b[10],b[11]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(z.SelectLabel,{children:"Artificial Analysis"}),b[11]=u):u=b[11],b[12]!==N?(m=J.map(e=>(0,t.jsx)(z.SelectItem,{value:e.type,children:N(e.label)},e.type)),b[12]=N,b[13]=m):m=b[13],b[14]!==m?(h=(0,t.jsxs)(z.SelectGroup,{children:[u,m]}),b[14]=m,b[15]=h):h=b[15],b[16]!==T?(p=T.length>0&&(0,t.jsxs)(z.SelectGroup,{children:[(0,t.jsx)(z.SelectLabel,{children:"Design Arena"}),T.map(ee)]}),b[16]=T,b[17]=p):p=b[17],b[18]!==N||b[19]!==_?(f=void 0!==_&&_.models.length>0&&(0,t.jsxs)(z.SelectGroup,{children:[(0,t.jsx)(z.SelectLabel,{children:"Vals AI"}),(0,t.jsx)(z.SelectItem,{value:a.F.ValsIndex,children:N(j[a.F.ValsIndex])})]}),b[18]=N,b[19]=_,b[20]=f):f=b[20],b[21]!==p||b[22]!==f||b[23]!==d||b[24]!==h?(g=(0,t.jsxs)(z.SelectContent,{children:[d,h,p,f]}),b[21]=p,b[22]=f,b[23]=d,b[24]=h,b[25]=g):g=b[25],b[26]!==y||b[27]!==g||b[28]!==r||b[29]!==c?(x=(0,t.jsxs)(z.Select,{value:y,onValueChange:r,size:"compact",children:[c,g]}),b[26]=y,b[27]=g,b[28]=r,b[29]=c,b[30]=x):x=b[30],x}function ee(e){return(0,t.jsx)(z.SelectItem,{value:e.type,children:e.label},e.type)}function et(e){return(0,t.jsx)(z.SelectItem,{value:e.type,children:e.name},e.type)}var en=e.i(479208),el=e.i(953584),er=e.i(279496);function es(e){let l,r,s,a,i=(0,n.c)(29),{category:o,models:c,pinnedModels:d,chartPointById:u,colorMap:m,getModelDisplayName:p,onRemove:f,onClearAll:x}=e,b=(0,Z.f)(),y=(0,Q.f)(),{getModelInfoByVariantSlug:v}=(0,$.D)();if(0===d.length)return null;if(i[0]!==o||i[1]!==u||i[2]!==m||i[3]!==p||i[4]!==v||i[5]!==b||i[6]!==y||i[7]!==c||i[8]!==f||i[9]!==d){let e;i[11]!==o||i[12]!==u||i[13]!==m||i[14]!==p||i[15]!==v||i[16]!==b||i[17]!==y||i[18]!==c||i[19]!==f?(e=e=>{let n=c.findIndex(t=>t.uid===e.uid)+1,l=p(e),r=`/${v(e.permaslug)?.slug??e.permaslug}`,s=u.get(e.uid),a=s?m.get(s.model_author):void 0;return(0,t.jsxs)("div",{className:"inline-flex min-h-8 min-w-0 items-center gap-1.5 rounded-md border border-border bg-selected-bg py-1 pl-2.5 pr-1",children:[(0,t.jsx)(h.TextLink,{href:r,size:"body",weight:"medium",className:"min-w-0 max-w-44 truncate",title:l,target:"_blank",rel:"noopener noreferrer",children:l}),(0,t.jsxs)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",title:b("Rank {rank} of {total} on the {category}",{rank:n,total:c.length,category:y(j[o])}),children:["#",n]}),a&&(0,t.jsx)("span",{role:"img","aria-label":b("{displayName} series color",{displayName:l}),title:b("Series color"),className:"size-1.5 shrink-0 rounded-full bg-(--series-color)",style:{"--series-color":a}}),(0,t.jsx)(L.Button,{shape:"pill",variant:"ghost",tone:"subdued",size:"icon-2xs",glyph:"sm","aria-label":b("Remove {displayName}",{displayName:l}),className:"ml-0.5 shrink-0",onClick:()=>f(e,n),children:(0,t.jsx)(er.f,{"aria-hidden":"true",className:"size-3.5"})})]},e.uid)},i[11]=o,i[12]=u,i[13]=m,i[14]=p,i[15]=v,i[16]=b,i[17]=y,i[18]=c,i[19]=f,i[20]=e):e=i[20],l=d.map(e),i[0]=o,i[1]=u,i[2]=m,i[3]=p,i[4]=v,i[5]=b,i[6]=y,i[7]=c,i[8]=f,i[9]=d,i[10]=l}else l=i[10];return i[21]!==l?(r=(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:l}),i[21]=l,i[22]=r):r=i[22],i[23]!==x||i[24]!==d.length?(s=d.length>1&&(0,t.jsx)(L.Button,{variant:"ghost",tone:"subdued",size:"sm",density:"compact",className:"shrink-0",onClick:x,children:(0,t.jsx)(g.T,{children:"Clear all"})}),i[23]=x,i[24]=d.length,i[25]=s):s=i[25],i[26]!==r||i[27]!==s?(a=(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[r,s]}),i[26]=r,i[27]=s,i[28]=a):a=i[28],a}var ea=e.i(180007),ei=e.i(287314),eo=e.i(953871);let ec=Object.freeze([]),ed=Object.freeze([]);function eu(e){return{uid:e.da_model_id,permaslug:e.permaslug,openrouter_slug:e.openrouter_id,heuristic_openrouter_slug:null,aa_name:e.display_name,score:e.score}}function em(e){return{uid:e.permaslug,permaslug:e.permaslug,openrouter_slug:null,heuristic_openrouter_slug:null,aa_name:e.vals_model_label,score:e.score}}var eh=e.i(790608),ep=e.i(140691),ef=e.i(477229);let eg="per_1m_tokens",ex="list_input",eb="per_100_requests",ej=[eg,ex,eb],ey=Object.freeze([]);function ev(e){return e&&(0,ep.I)(e).gt(0)?(0,ep.I)(e).times(1e6).toNumber():0}function e_(e){return{id:e.id,price:e.price_input,score:e.p50_throughput}}function ek(e){return e.id}function ew(e){return[e.id,e]}function eS(e){return e.score}function eN(e){return e.uid}var eT=e.i(265273);let eI=Object.freeze([]);function eM(e,{locale:t,isPercentScore:n}){return(n?(0,M.I)(e,{locale:t,preset:"native-fixed-1"}):(0,I.B)(e,{locale:t,fractionDigits:1}))??"—"}function eC(e){let l,r,s,a,i=(0,n.c)(7),{value:o,onChange:c}=e;return i[0]!==c||i[1]!==o?(l=(0,t.jsx)(F.Z,{id:"show-pareto",size:"sm",checked:o,onCheckedChange:c}),i[0]=c,i[1]=o,i[2]=l):l=i[2],i[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(D.f,{htmlFor:"show-pareto",variant:"field",className:"cursor-pointer",children:(0,t.jsx)(g.T,{children:"Show Pareto"})}),i[3]=r):r=i[3],i[4]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(m.InfoTooltip,{hitArea:"padded",icon:_.y,side:_.R,align:"end",children:(0,t.jsxs)(g.T,{children:["The ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Pareto frontier"})," traces the best score you can get at each price. Models on the line are the best deals; anything below is overpriced for the score it earns."]})}),i[4]=s):s=i[4],i[5]!==l?(a=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l,r,s]}),i[5]=l,i[6]=a):a=i[6],a}function eA(e){let l,r,s,a,i,o,c,d,u=(0,n.c)(19),{point:m,daModel:h,locale:p}=e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("span",{className:"font-medium",children:"ELO"}),u[0]=l):l=u[0],u[1]!==p||u[2]!==m.p50_throughput?(r=(0,I.B)(m.p50_throughput,{locale:p,fractionDigits:1})??"—",u[1]=p,u[2]=m.p50_throughput,u[3]=r):r=u[3],u[4]!==r?(s=(0,t.jsx)(g.T,{children:(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l,":"," ",(0,t.jsx)(x.d,{children:r})]})}),u[4]=r,u[5]=s):s=u[5],u[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("span",{className:"font-medium",children:"Win Rate"}),u[6]=a):a=u[6],u[7]!==h.win_rate||u[8]!==p?(i=(0,M.I)(h.win_rate,{locale:p,preset:"native-fixed-1"})??"—",u[7]=h.win_rate,u[8]=p,u[9]=i):i=u[9],u[10]!==i?(o=(0,t.jsx)(g.T,{children:(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[a,":"," ",(0,t.jsx)(x.d,{children:i})]})}),u[10]=i,u[11]=o):o=u[11],u[12]!==h.avg_generation_time_ms||u[13]!==p?(c=null!==h.avg_generation_time_ms&&(0,t.jsx)(g.T,{children:(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-medium",children:"Avg Generation Time"}),":"," ",(0,t.jsx)(x.d,{children:(0,I.B)(h.avg_generation_time_ms/1e3,{locale:p,fractionDigits:1})??"—"}),"s"]})}),u[12]=h.avg_generation_time_ms,u[13]=p,u[14]=c):c=u[14],u[15]!==s||u[16]!==o||u[17]!==c?(d=(0,t.jsxs)(t.Fragment,{children:[s,o,c]}),u[15]=s,u[16]=o,u[17]=c,u[18]=d):d=u[18],d}function eL(e){let l,r,s,a,i=(0,n.c)(21),{point:o,category:c,daModel:d,isPercentScore:u,priceView:m,weightedInputPrices:h}=e,p=(0,W.useLocale)(),f=(0,Z.f)(),g=(0,Q.f)();i[0]!==f||i[1]!==p||i[2]!==o||i[3]!==m||i[4]!==h?(l=function({gt:e,locale:t},{point:n,priceView:l,weightedInputPrices:r}){switch(l){case eb:return e("{price}/100 requests",{price:(0,C.f)(n.price_input,{locale:t,preset:"native-fixed-4"})??"—"});case ex:return e("{price}/M input (list price)",{price:(0,C.f)(n.price_input,{locale:t,preset:"native-fixed-2"})??"—"});case eg:{let l=r[n.label];return e(void 0!==l&&l>0?"{price}/M weighted avg input":"{price}/M input tokens",{price:(0,C.f)(n.price_input,{locale:t,preset:"native-fixed-2"})??"—"})}default:return l}}({gt:f,locale:p},{point:o,priceView:m,weightedInputPrices:h}),i[0]=f,i[1]=p,i[2]=o,i[3]=m,i[4]=h,i[5]=l):l=i[5];let x=l;return i[6]!==c||i[7]!==d||i[8]!==f||i[9]!==u||i[10]!==p||i[11]!==g||i[12]!==o?(r=d?(0,t.jsx)(eA,{point:o,daModel:d,locale:p}):(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?f("Accuracy"):g(j[c]),":"," ",eM(o.p50_throughput,{locale:p,isPercentScore:u})]}),i[6]=c,i[7]=d,i[8]=f,i[9]=u,i[10]=p,i[11]=g,i[12]=o,i[13]=r):r=i[13],i[14]!==x?(s=(0,t.jsx)("p",{className:"text-xs text-faint mt-1",children:x}),i[14]=x,i[15]=s):s=i[15],i[16]!==o.display_name||i[17]!==o.model_author||i[18]!==r||i[19]!==s?(a=(0,t.jsxs)(ea.f,{name:o.display_name,author:o.model_author,children:[r,s]}),i[16]=o.display_name,i[17]=o.model_author,i[18]=r,i[19]=s,i[20]=a):a=i[20],a}function eP(e){let l,r,s,a,i,o,c,u,m,p,f,b,j,y,v,_,k,w,S,N,T=(0,n.c)(64),{model:I,rank:M,color:C,isHighlighted:L,isPareto:P,isPercentScore:R,onMouseEnter:D,onMouseLeave:E}=e,z=(0,W.useLocale)(),{getModelInfoByVariantSlug:F}=(0,$.D)();T[0]!==F||T[1]!==I.permaslug?(l=F(I.permaslug),T[0]=F,T[1]=I.permaslug,T[2]=l):l=T[2];let H=l;T[3]!==I.permaslug||T[4]!==H?.author?(r=H?.author??(0,A.x)(I.permaslug),T[3]=I.permaslug,T[4]=H?.author,T[5]=r):r=T[5];let U=r,K=H?.slug??I.permaslug;T[6]!==I.aa_name||T[7]!==I.permaslug||T[8]!==H?.short_name?(s=I.aa_name||H?.short_name||(0,A.b)(I.permaslug),T[6]=I.aa_name,T[7]=I.permaslug,T[8]=H?.short_name,T[9]=s):s=T[9];let G=s;T[10]!==U||T[11]!==K||T[12]!==G?(a={shortName:G,author:U,href:K},T[10]=U,T[11]=K,T[12]=G,T[13]=a):a=T[13];let{shortName:Y,author:Z,href:Q}=a;T[14]!==L||T[15]!==P?(i=(0,d.f)("cursor-default px-3 py-1",V.m,(0,q.I)(L),P&&"rounded-md bg-foreground/[0.04] dark:bg-foreground/[0.06]"),T[14]=L,T[15]=P,T[16]=i):i=T[16],T[17]!==M?(o=(0,t.jsxs)(B.r,{children:[M,"."]}),T[17]=M,T[18]=o):o=T[18];let J=H?.author_icon_uri;T[19]!==Z||T[20]!==I.permaslug||T[21]!==J?(c=(0,t.jsx)(O.f,{frame:!0,author:Z,permaslug:I.permaslug,iconUri:J,className:"size-6 shrink-0"}),T[19]=Z,T[20]=I.permaslug,T[21]=J,T[22]=c):c=T[22];let X=`/${Q}`;T[23]!==Y||T[24]!==X?(u=(0,t.jsx)(h.TextLink,{href:X,size:"body",weight:"medium",className:"block truncate",target:"_blank",rel:"noopener noreferrer",children:Y}),T[23]=Y,T[24]=X,T[25]=u):u=T[25];let ee=`/${Z}`;return T[26]!==Z?(m=(0,t.jsx)(x.d,{children:Z}),T[26]=Z,T[27]=m):m=T[27],T[28]!==ee||T[29]!==m?(p=(0,t.jsx)(g.T,{children:(0,t.jsxs)("div",{className:"text-muted-foreground flex gap-1 text-xs",children:["by"," ",(0,t.jsx)(h.TextLink,{href:ee,target:"_blank",rel:"noopener noreferrer",children:m})]})}),T[28]=ee,T[29]=m,T[30]=p):p=T[30],T[31]!==u||T[32]!==p?(f=(0,t.jsxs)(B.T,{children:[u,p]}),T[31]=u,T[32]=p,T[33]=f):f=T[33],T[34]!==f||T[35]!==c?(b=(0,t.jsxs)(B.B,{children:[c,f]}),T[34]=f,T[35]=c,T[36]=b):b=T[36],T[37]!==L?(j=(0,q.I)(L),T[37]=L,T[38]=j):j=T[38],T[39]!==C||T[40]!==j?(y=(0,t.jsx)(B.v,{color:C,className:j}),T[39]=C,T[40]=j,T[41]=y):y=T[41],T[42]!==L?(v=(0,d.f)("text-sm text-muted-foreground",V.m,(0,q.I)(L)),T[42]=L,T[43]=v):v=T[43],T[44]!==R||T[45]!==z||T[46]!==I.score?(_=eM(I.score,{locale:z,isPercentScore:R}),T[44]=R,T[45]=z,T[46]=I.score,T[47]=_):_=T[47],T[48]!==_?(k=(0,t.jsx)("div",{className:"font-medium",children:_}),T[48]=_,T[49]=k):k=T[49],T[50]!==v||T[51]!==k?(w=(0,t.jsx)("div",{className:v,children:k}),T[50]=v,T[51]=k,T[52]=w):w=T[52],T[53]!==y||T[54]!==w?(S=(0,t.jsxs)(B.R,{children:[y,w]}),T[53]=y,T[54]=w,T[55]=S):S=T[55],T[56]!==D||T[57]!==E||T[58]!==Y||T[59]!==b||T[60]!==S||T[61]!==i||T[62]!==o?(N=(0,t.jsxs)(B.F,{role:"button",tabIndex:0,className:i,onMouseEnter:D,onMouseLeave:E,"aria-label":Y,children:[o,b,S]}),T[56]=D,T[57]=E,T[58]=Y,T[59]=b,T[60]=S,T[61]=i,T[62]=o,T[63]=N):N=T[63],N}function eR(e){let l,r,i,c,u,m,h,f,x,b,y,v,_,k,w,S,N,T,I,M,C,P,O,D,V,E,F,B,G,J,ee,et,er=(0,n.c)(183),{data:ea,daData:ep,daCategoryKeys:eM,valsIndex:eA,orModels:eR,loadError:eB,visibleORBenchmarks:eq,weightedInputPrices:e$,costPerRequest:eK,category:eW,onCategoryChange:eG}=e,eY=void 0===eB?null:eB,eZ=void 0===eq?eI:eq,eQ=(0,W.useLocale)(),eJ=(0,Z.f)(),eX=(0,Q.f)(),e0=(0,p.Q)(),[,e1]=(0,s.useTransition)(),[e2,e3]=(0,s.useState)(null);er[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],er[0]=l):l=er[0];let[e5,e4]=(0,s.useState)(l),[e6,e9]=(0,s.useState)(null),[e7,e8]=(0,s.useState)(eg),[te,tt]=(0,s.useState)(!1),tn=null!==eY;er[1]!==eW||er[2]!==ep||er[3]!==ea||er[4]!==eR||er[5]!==tn||er[6]!==eA||er[7]!==eZ?(r={category:eW,data:ea,daData:ep,valsIndex:eA,orModels:eR,hasLoadError:tn,visibleORBenchmarks:eZ},er[1]=eW,er[2]=ep,er[3]=ea,er[4]=eR,er[5]=tn,er[6]=eA,er[7]=eZ,er[8]=r):r=er[8];let{isDA:tl,isOR:tr,isVals:ts,isORLoading:ta,isDALoading:ti,hasNoRows:to,models:tc,daModels:td}=function(e){let t,l,r,s,i,c,d,u=(0,n.c)(23),{category:m,data:h,daData:p,valsIndex:f,orModels:g,hasLoadError:x,visibleORBenchmarks:b}=e;u[0]!==m?(t=(0,a.f)(m),u[0]=m,u[1]=t):t=u[1];let j=t;u[2]!==m?(l=(0,a.k)(m),u[2]=m,u[3]=l):l=u[3];let y=l;u[4]!==m?(r=(0,a.S)(m),u[4]=m,u[5]=r):r=u[5];let v=r,_=j||y||v?null:m,k=(0,a.f)(m)?m:null;u[6]!==m||u[7]!==y||u[8]!==b?(s=y&&b.some(e=>e.type===m),u[6]=m,u[7]=y,u[8]=b,u[9]=s):s=u[9];let w=s,S=k&&p?p[d=o.h.find(e=>e.type===k),d?.daKey??"models-codecategories"]??ed:ed;e:{if(y){i=g??ec;break e}if(k){let e;u[10]!==S?(e=S.map(eu),u[10]=S,u[11]=e):e=u[11],i=e;break e}if(v){let e;u[12]!==f?(e=f?f.models.map(em):ec,u[12]=f,u[13]=e):e=u[13],i=e;break e}i=_&&h?h[_]:ec}let N=i,T=j&&void 0!==p&&0===S.length,I=!x&&void 0!==g&&0===g.length,M=y&&(!w||I),C=v&&0===N.length,A=y&&void 0===g,L=j&&void 0===p&&!x,P=T||M||C;return u[14]!==S||u[15]!==j||u[16]!==y||u[17]!==v||u[18]!==N||u[19]!==A||u[20]!==L||u[21]!==P?(c={isDA:j,isOR:y,isVals:v,isORLoading:A,isDALoading:L,hasNoRows:P,models:N,daModels:S},u[14]=S,u[15]=j,u[16]=y,u[17]=v,u[18]=N,u[19]=A,u[20]=L,u[21]=P,u[22]=c):c=u[22],c}(r);er[9]!==tc?(i=tc.map(eE),er[9]=tc,er[10]=i):i=er[10];let tu=i,tm=(0,K.f)(tu),{getModelInfoByVariantSlug:th}=tm;er[11]!==to||er[12]!==eG?(c=()=>{to&&e1(()=>{eG(a.V.Intelligence)})},u=[to,eG,e1],er[11]=to,er[12]=eG,er[13]=c,er[14]=u):(c=er[13],u=er[14]),(0,s.useEffect)(c,u),er[15]!==eK||er[16]!==th||er[17]!==te||er[18]!==tc||er[19]!==e5||er[20]!==e7||er[21]!==e$?(m={models:tc,pinnedModelIds:e5,getModelInfoByVariantSlug:th,weightedInputPrices:e$,costPerRequest:eK,priceView:e7,isShowPareto:te},er[15]=eK,er[16]=th,er[17]=te,er[18]=tc,er[19]=e5,er[20]=e7,er[21]=e$,er[22]=m):m=er[22];let{topModels:tp,pinnedModels:tf,colorMap:tg,chartScatterData:tx,chartPointById:tb,scatterIds:tj,hasCostPerRequestData:ty,effectivePriceView:tv,enrichedModels:t_,paretoIds:tk,paretoPath:tw}=function(e){let t,l,r,s,a,i,o,c,d,u,m,h,p,f=(0,n.c)(67),{models:g,pinnedModelIds:x,getModelInfoByVariantSlug:b,weightedInputPrices:j,costPerRequest:y,priceView:v,isShowPareto:_}=e;f[0]!==g?(t=g.slice(0,20),f[0]=g,f[1]=t):t=f[1];let k=t;e:{let e;if(0===x.length){l=ey;break e}if(f[2]!==g||f[3]!==x){let t;f[5]!==g?(t=e=>{let t=g.find(t=>t.uid===e);return t?[t]:[]},f[5]=g,f[6]=t):t=f[6],e=x.flatMap(t),f[2]=g,f[3]=x,f[4]=e}else e=f[4];l=e}let w=l;f[7]!==k?(r=new Set(k.map(eN)),f[7]=k,f[8]=r):r=f[8];let S=r;if(f[9]!==w||f[10]!==S||f[11]!==k){let e;f[13]!==S?(e=e=>!S.has(e.uid),f[13]=S,f[14]=e):e=f[14],s=[...k,...w.filter(e)],f[9]=w,f[10]=S,f[11]=k,f[12]=s}else s=f[12];let N=s;t:{let e,t,n;if(0===N.length){let e;f[15]===Symbol.for("react.memo_cache_sentinel")?(e=[],f[15]=e):e=f[15],a=e;break t}if(f[16]!==k){let n=k.map(eS);e=n.length>0?Math.min(...n):0,t=n.length>0?Math.max(...n):1,f[16]=k,f[17]=e,f[18]=t}else e=f[17],t=f[18];let l=t-e||1;f[19]!==y||f[20]!==b||f[21]!==e||f[22]!==N||f[23]!==l||f[24]!==j?(n=N.flatMap(t=>{let n=b(t.permaslug),r=n?.author??(0,A.x)(t.permaslug),s=t.aa_name||n?.short_name||(0,A.b)(t.permaslug),a=Math.min(1,Math.max(0,(t.score-e)/l)),i=ev(n?.endpoint?.pricing?.prompt);return!(i<=0)||t.permaslug in j||t.permaslug in y?[{id:t.uid,label:t.permaslug,display_name:s,model_author:r,provider_name:"",request_count:.4+.6*a,price_input:i,price_output:ev(n?.endpoint?.pricing?.completion),p50_latency:0,p75_latency:0,p90_latency:0,p99_latency:0,p50_throughput:t.score,p75_throughput:0,p90_throughput:0,p99_throughput:0}]:[]}),f[19]=y,f[20]=b,f[21]=e,f[22]=N,f[23]=l,f[24]=j,f[25]=n):n=f[25],a=n}let T=a;if(f[26]!==T)i=(0,ef.f)(T.map(e=>e.model_author).filter(Boolean)),f[26]=T,f[27]=i;else i=f[27];let I=i,M=T.some(e=>{let t=y[e.label];return void 0!==t&&t>0}),C=v!==eb||M?v:eg;f[28]!==y||f[29]!==C||f[30]!==T||f[31]!==j?(o=T.flatMap(e=>{let t=function(e,{priceView:t,weightedInputPrices:n,costPerRequest:l}){switch(t){case eb:return l[e.label]??0;case ex:return e.price_input;case eg:{let t=n[e.label];return t&&t>0?t:e.price_input}default:return t}}(e,{priceView:C,weightedInputPrices:j,costPerRequest:y});return t>0?[{...e,price_input:t}]:[]}),f[28]=y,f[29]=C,f[30]=T,f[31]=j,f[32]=o):o=f[32];let L=o;f[33]!==L?(c=new Map(L.map(ew)),f[33]=L,f[34]=c):c=f[34];let P=c;f[35]!==L?(d=new Set(L.map(ek)),f[35]=L,f[36]=d):d=f[36];let R=d;if(f[37]!==I||f[38]!==b||f[39]!==g){let e;f[41]!==I||f[42]!==b?(e=e=>{let t=b(e.permaslug)?.author??(0,A.x)(e.permaslug);return{...e,color:I.get(t)??q.F.Slate400}},f[41]=I,f[42]=b,f[43]=e):e=f[43],u=g.map(e),f[37]=I,f[38]=b,f[39]=g,f[40]=u}else u=f[40];let O=u;n:{let e;if(!_||0===L.length){m=void 0;break n}f[44]!==L?(e=(0,eh.f)(L.map(e_)),f[44]=L,f[45]=e):e=f[45],m=e}let D=m;l:{let e;if(!D){h=void 0;break l}if(f[46]!==P||f[47]!==I||f[48]!==b||f[49]!==D.path){let t;f[51]!==P||f[52]!==I||f[53]!==b?(t=e=>{let t=P.get(e.id);if(!t)return[];let n=b(t.label)?.author??(0,A.x)(t.label);return[{...t,color:I.get(n)??q.F.Slate400,xValue:t.price_input,yValue:t.p50_throughput}]},f[51]=P,f[52]=I,f[53]=b,f[54]=t):t=f[54],e=D.path.flatMap(t),f[46]=P,f[47]=I,f[48]=b,f[49]=D.path,f[50]=e}else e=f[50];h=e}let V=h,E=D?.ids;return f[55]!==P||f[56]!==L||f[57]!==I||f[58]!==C||f[59]!==O||f[60]!==M||f[61]!==V||f[62]!==w||f[63]!==R||f[64]!==E||f[65]!==k?(p={topModels:k,pinnedModels:w,colorMap:I,chartScatterData:L,chartPointById:P,scatterIds:R,hasCostPerRequestData:M,effectivePriceView:C,enrichedModels:O,paretoIds:E,paretoPath:V},f[55]=P,f[56]=L,f[57]=I,f[58]=C,f[59]=O,f[60]=M,f[61]=V,f[62]=w,f[63]=R,f[64]=E,f[65]=k,f[66]=p):p=f[66],p}(m);er[23]!==tc?(h=()=>{let e=new Set(tc.map(eV));e4(t=>{let n=t.filter(t=>e.has(t));return n.length===t.length?t:n})},f=[tc],er[23]=tc,er[24]=h,er[25]=f):(h=er[24],f=er[25]),(0,s.useEffect)(h,f),er[26]!==td?(x=new Map(td.map(eD)),er[26]=td,er[27]=x):x=er[27];let tS=x;er[28]!==th?(b=e=>e.aa_name||th(e.permaslug)?.short_name||(0,A.b)(e.permaslug),er[28]=th,er[29]=b):b=er[29];let tN=b;er[30]!==tf?(y=new Set(tf.map(eO)),er[30]=tf,er[31]=y):y=er[31];let tT=y;if(er[32]!==tN||er[33]!==tf){let e;er[35]!==tN?(e=e=>[e.uid,tN(e)],er[35]=tN,er[36]=e):e=er[36],v=new Map(tf.map(e)),er[32]=tN,er[33]=tf,er[34]=v}else v=er[34];let tI=v;if(er[37]!==tm||er[38]!==eW||er[39]!==tb||er[40]!==tx||er[41]!==tg||er[42]!==eM||er[43]!==tS||er[44]!==tv||er[45]!==t_||er[46]!==e6||er[47]!==tN||er[48]!==eJ||er[49]!==ty||er[50]!==tT||er[51]!==tI||er[52]!==e2||er[53]!==tl||er[54]!==ti||er[55]!==tr||er[56]!==ta||er[57]!==te||er[58]!==ts||er[59]!==eY||er[60]!==eQ||er[61]!==eX||er[62]!==tc||er[63]!==eG||er[64]!==tk||er[65]!==tw||er[66]!==e5||er[67]!==tf||er[68]!==e0||er[69]!==tj||er[70]!==eA||er[71]!==eZ||er[72]!==e$){let e,n,l,r=e6===eW?t_.slice(0,20):t_.slice(0,10),s=Math.ceil(r.length/2);er[86]!==eW||er[87]!==tS||er[88]!==tv||er[89]!==tl||er[90]!==ts||er[91]!==e$?(e=e=>(0,t.jsx)(eL,{point:e,category:eW,daModel:tl?tS.get(e.id):void 0,isPercentScore:ts,priceView:tv,weightedInputPrices:e$}),er[86]=eW,er[87]=tS,er[88]=tv,er[89]=tl,er[90]=ts,er[91]=e$,er[92]=e):e=er[92];let a=e;_=$.C,V=tm,er[93]===Symbol.for("react.memo_cache_sentinel")?(O=(0,d.f)("flex flex-col gap-6"),er[93]=O):O=er[93],er[94]!==eW||er[95]!==eM||er[96]!==tv||er[97]!==ty||er[98]!==ti||er[99]!==ta||er[100]!==te||er[101]!==eY||er[102]!==tc.length||er[103]!==eG||er[104]!==e0||er[105]!==eA||er[106]!==eZ?(D=(tc.length>0||ta||ti||null!==eY)&&(0,t.jsx)("div",{className:"flex flex-col gap-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row",children:[(0,t.jsxs)(z.Select,{value:tv,onValueChange:e=>{(0,Y.q)(e,ej)&&(e8(e),e0.capture("click_benchmark_price_view",{price_view:e}))},size:"compact",children:[(0,t.jsx)(z.SelectTrigger,{className:"w-full md:w-60",children:(0,t.jsx)(z.SelectValue,{})}),(0,t.jsxs)(z.SelectContent,{children:[(0,t.jsx)(z.SelectItem,{value:eg,children:(0,t.jsx)(g.T,{children:"Weighted Avg Input Price"})}),(0,t.jsx)(z.SelectItem,{value:ex,children:(0,t.jsx)(g.T,{children:"Input List Price"})}),ty?(0,t.jsx)(z.SelectItem,{value:eb,children:(0,t.jsx)(g.T,{children:"Avg Price Per 100 Requests"})}):null]})]}),(0,t.jsx)(X,{category:eW,daCategoryKeys:eM,valsIndex:eA,visibleORBenchmarks:eZ,onCategoryChange:e=>{e9(null),e4([]),e0.capture("click_benchmark_category",{category:e}),e1(()=>{eG(e)})}})]}),(0,t.jsx)(eC,{value:te,onChange:e=>{tt(e),e0.capture("toggle_benchmark_pareto",{category:eW,enabled:e})}})]})}),er[94]=eW,er[95]=eM,er[96]=tv,er[97]=ty,er[98]=ti,er[99]=ta,er[100]=te,er[101]=eY,er[102]=tc.length,er[103]=eG,er[104]=e0,er[105]=eA,er[106]=eZ,er[107]=D):D=er[107],I="flex flex-col gap-6",er[108]!==ti||er[109]!==ta?(M=(ta||ti)&&(0,t.jsx)("div",{className:"rounded-md border border-border bg-card p-4",children:(0,t.jsx)(eo.H,{decorative:!0})}),er[108]=ti,er[109]=ta,er[110]=M):M=er[110],er[111]!==eW||er[112]!==eY||er[113]!==e0?(C=null!==eY&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-md border border-border bg-card p-4 py-8",children:[(0,t.jsx)(g.T,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center",children:"This benchmark could not be loaded."})}),(0,t.jsx)(L.Button,{variant:"outline",size:"sm",onClick:()=>{e0.capture("click_benchmark_retry_load",{category:eW}),eY.retry()},children:(0,t.jsx)(g.T,{children:"Retry"})})]}),er[111]=eW,er[112]=eY,er[113]=e0,er[114]=C):C=er[114],er[115]!==eW||er[116]!==tb||er[117]!==tx||er[118]!==tg||er[119]!==tv||er[120]!==tN||er[121]!==eJ||er[122]!==tT||er[123]!==tI||er[124]!==e2||er[125]!==tl||er[126]!==tr||er[127]!==te||er[128]!==ts||er[129]!==eQ||er[130]!==eX||er[131]!==tc||er[132]!==tk||er[133]!==tw||er[134]!==e5||er[135]!==tf||er[136]!==e0||er[137]!==a?(P=tc.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-4 rounded-md border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsx)(g.T,{children:(0,t.jsxs)("span",{className:"text-micro font-semibold tracking-[0.12em] text-muted-foreground",children:["TOP 20 PLOTTED ",(0,t.jsx)(R.f,{})," SEARCH TO PIN UP TO 5"]})}),(0,t.jsx)(eF,{models:tc,pinnedModelIds:e5,getModelDisplayName:tN,onToggle:e=>{let t=tc.findIndex(t=>t.uid===e.uid)+1;if(e5.includes(e.uid)){e4(t=>t.filter(t=>t!==e.uid)),e0.capture("click_benchmark_clear_pinned_model",{category:eW,model_permaslug:e.permaslug,rank:t,pinned_count:e5.length-1,source:"combobox_toggle"});return}e5.length>=5||(e4(t=>[...t,e.uid]),e0.capture("click_benchmark_pin_model",{category:eW,model_permaslug:e.permaslug,rank:t,pinned_count:e5.length+1}))}})]}),(0,t.jsx)(es,{category:eW,models:tc,pinnedModels:tf,chartPointById:tb,colorMap:tg,getModelDisplayName:tN,onRemove:(e,t)=>{e4(t=>t.filter(t=>t!==e.uid)),e0.capture("click_benchmark_clear_pinned_model",{category:eW,model_permaslug:e.permaslug,rank:t,pinned_count:e5.length-1,source:"chip_remove"})},onClearAll:()=>{tf.forEach((e,t)=>{let n=tc.findIndex(t=>t.uid===e.uid)+1;e0.capture("click_benchmark_clear_pinned_model",{category:eW,model_permaslug:e.permaslug,rank:n,pinned_count:e5.length-t-1,source:"clear_all"})}),e4([])}}),0===tx.length&&(0,t.jsx)(g.T,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No models with pricing data for the selected metric"})}),tx.length>0&&(0,t.jsx)(ei.f,{sectionId:"benchmarks",title:eX(j[eW]),filters:[eU(eJ,tv),...te?[eJ("Pareto frontier")]:[]],meta:{source:function(e,{isDA:t,isOR:n,isVals:l}){return e(t?"Source: Design Arena":l?"Source: Vals AI":n?"Source: OpenRouter":"Source: Artificial Analysis")}(eJ,{isDA:tl,isOR:tr,isVals:ts})},children:(0,t.jsx)(el.f,{fallback:(0,t.jsx)(eo.H,{decorative:!0}),children:(0,t.jsx)(en.W,{data:tx,xMetric:U.C.PriceInput,yMetric:U.C.P50Throughput,scaleType:"linear",colorMap:tg,colorBy:"author",hoveredId:e2,setHoveredId:e3,xTickFormatter:ez.bind(void 0,eQ),yTickFormatter:eH.bind(void 0,eQ),renderTooltip:a,yDomainPadding:.15,markShape:H.B.Circle,xAxisLabel:eU(eJ,tv),yAxisLabel:function(e,{isDA:t,isAccuracy:n}){return e(t?"ELO Score":n?"Accuracy (%)":"Index Score")}(eJ,{isDA:tl,isAccuracy:tr||ts}),paretoIds:tk,paretoPath:tw,paretoLegendLabel:eJ("Pareto frontier"),highlightedIds:tT,highlightedPointLabels:tI})})})]}),er[115]=eW,er[116]=tb,er[117]=tx,er[118]=tg,er[119]=tv,er[120]=tN,er[121]=eJ,er[122]=tT,er[123]=tI,er[124]=e2,er[125]=tl,er[126]=tr,er[127]=te,er[128]=ts,er[129]=eQ,er[130]=eX,er[131]=tc,er[132]=tk,er[133]=tw,er[134]=e5,er[135]=tf,er[136]=e0,er[137]=a,er[138]=P):P=er[138],T="flex flex-col gap-5",er[139]===Symbol.for("react.memo_cache_sentinel")?(S=(0,d.f)("grid grid-cols-1 md:grid-cols-2 gap-5 md:gap-20"),er[139]=S):S=er[139],er[140]!==eW||er[141]!==e2||er[142]!==ts||er[143]!==tk||er[144]!==tj?(n=(e,n)=>(0,t.jsx)(eP,{model:e,rank:n+1,color:e.color,isHighlighted:null===e2?void 0:e2===e.uid,isPareto:tk?.has(e.uid),isPercentScore:ts,onMouseEnter:()=>tj.has(e.uid)&&e3(e.uid),onMouseLeave:()=>e3(null)},`${eW}-${e.uid}`),er[140]=eW,er[141]=e2,er[142]=ts,er[143]=tk,er[144]=tj,er[145]=n):n=er[145],N=(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-y-5 overflow-x-clip",children:r.slice(0,s).map(n)}),k="flex min-w-0 flex-col gap-y-5 overflow-x-clip",er[146]!==eW||er[147]!==s||er[148]!==e2||er[149]!==ts||er[150]!==tk||er[151]!==tj?(l=(e,n)=>(0,t.jsx)(eP,{model:e,rank:n+s+1,color:e.color,isHighlighted:null===e2?void 0:e2===e.uid,isPareto:tk?.has(e.uid),isPercentScore:ts,onMouseEnter:()=>tj.has(e.uid)&&e3(e.uid),onMouseLeave:()=>e3(null)},`${eW}-${e.uid}`),er[146]=eW,er[147]=s,er[148]=e2,er[149]=ts,er[150]=tk,er[151]=tj,er[152]=l):l=er[152],w=r.slice(s).map(l),er[37]=tm,er[38]=eW,er[39]=tb,er[40]=tx,er[41]=tg,er[42]=eM,er[43]=tS,er[44]=tv,er[45]=t_,er[46]=e6,er[47]=tN,er[48]=eJ,er[49]=ty,er[50]=tT,er[51]=tI,er[52]=e2,er[53]=tl,er[54]=ti,er[55]=tr,er[56]=ta,er[57]=te,er[58]=ts,er[59]=eY,er[60]=eQ,er[61]=eX,er[62]=tc,er[63]=eG,er[64]=tk,er[65]=tw,er[66]=e5,er[67]=tf,er[68]=e0,er[69]=tj,er[70]=eA,er[71]=eZ,er[72]=e$,er[73]=_,er[74]=k,er[75]=w,er[76]=S,er[77]=N,er[78]=T,er[79]=I,er[80]=M,er[81]=C,er[82]=P,er[83]=O,er[84]=D,er[85]=V}else _=er[73],k=er[74],w=er[75],S=er[76],N=er[77],T=er[78],I=er[79],M=er[80],C=er[81],P=er[82],O=er[83],D=er[84],V=er[85];return er[153]!==k||er[154]!==w?(E=(0,t.jsx)("div",{className:k,children:w}),er[153]=k,er[154]=w,er[155]=E):E=er[155],er[156]!==S||er[157]!==N||er[158]!==E?(F=(0,t.jsxs)("div",{className:S,children:[N,E]}),er[156]=S,er[157]=N,er[158]=E,er[159]=F):F=er[159],er[160]!==eW||er[161]!==e6||er[162]!==e0||er[163]!==tp?(B=e6!==eW&&tp.length>10&&(0,t.jsx)(eT.f,{onClick:()=>{e9(eW),e0.capture("click_benchmark_show_more",{category:eW})}}),er[160]=eW,er[161]=e6,er[162]=e0,er[163]=tp,er[164]=B):B=er[164],er[165]!==T||er[166]!==F||er[167]!==B?(G=(0,t.jsxs)("div",{className:T,children:[F,B]}),er[165]=T,er[166]=F,er[167]=B,er[168]=G):G=er[168],er[169]!==I||er[170]!==M||er[171]!==C||er[172]!==P||er[173]!==G?(J=(0,t.jsxs)("div",{className:I,children:[M,C,P,G]}),er[169]=I,er[170]=M,er[171]=C,er[172]=P,er[173]=G,er[174]=J):J=er[174],er[175]!==O||er[176]!==D||er[177]!==J?(ee=(0,t.jsxs)("div",{className:O,children:[D,J]}),er[175]=O,er[176]=D,er[177]=J,er[178]=ee):ee=er[178],er[179]!==_||er[180]!==V||er[181]!==ee?(et=(0,t.jsx)(_,{lookup:V,children:ee}),er[179]=_,er[180]=V,er[181]=ee,er[182]=et):et=er[182],et}function eO(e){return e.uid}function eD(e){return[e.da_model_id,e]}function eV(e){return e.uid}function eE(e){return e.permaslug}function ez(e,t){if(t<=0)return"";let n=Math.max(.01,Math.round(100*t)/100);return`${(0,C.f)(n,{locale:e,preset:"native-fixed-2"})??"—"}`}function eF(e){let l,r,a,i,o,c,u,m,h,p,f,b,j,y=(0,n.c)(40),{models:v,pinnedModelIds:_,getModelDisplayName:k,onToggle:w}=e,S=(0,G.f)(),[N,I]=(0,s.useState)(!1),M=(0,Z.f)();y[0]!==_?(l=new Set(_),y[0]=_,y[1]=l):l=y[1];let C=l;if(y[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(L.Button,{variant:"outline",size:"sm",align:"start"}),y[2]=r):r=y[2],y[3]!==M||y[4]!==_.length?(a=M("Find a model to pin, {pinned} of {max} pinned",{pinned:_.length,max:5}),y[3]=M,y[4]=_.length,y[5]=a):a=y[5],y[6]!==M||y[7]!==_.length?(i=_.length>0?M("Add a model ({pinned}/{max})",{pinned:_.length,max:5}):M("Find a model…"),y[6]=M,y[7]=_.length,y[8]=i):i=y[8],y[9]!==i?(o=(0,t.jsx)("span",{className:"truncate text-muted-foreground",children:i}),y[9]=i,y[10]=o):o=y[10],y[11]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(T.f,{className:"ml-auto size-4 shrink-0"}),y[11]=c):c=y[11],y[12]!==a||y[13]!==o?(u=(0,t.jsxs)(E.J,{render:r,className:"w-full md:w-56","aria-label":a,children:[o,c]}),y[12]=a,y[13]=o,y[14]=u):u=y[14],y[15]!==M?(m=M("Search all models…"),y[15]=M,y[16]=m):m=y[16],y[17]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)(g.T,{children:"No ranked models found."}),y[17]=h):h=y[17],y[18]!==S||y[19]!==_.length?(p=5===_.length?(0,t.jsx)(g.T,{children:(0,t.jsxs)("div",{className:"border-t border-border px-3 py-2 text-xs text-muted-foreground",children:[(0,t.jsx)(x.d,{children:S.number(5,{preset:"integer"})})," is the limit — remove one to add another."]})}):void 0,y[18]=S,y[19]=_.length,y[20]=p):p=y[20],y[21]!==k||y[22]!==v||y[23]!==w||y[24]!==C||y[25]!==_.length){let e;y[27]!==k||y[28]!==w||y[29]!==C||y[30]!==_.length?(e=(e,n)=>{let l=C.has(e.uid),r=!l&&_.length>=5;return(0,t.jsx)(P.X,{indicator:"checkbox",isSelected:l,value:`${k(e)} ${e.permaslug}`,disabled:r,trailing:(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["#",n+1]}),onSelect:()=>{r||w(e)},className:(0,d.f)(r&&"cursor-not-allowed opacity-50"),children:k(e)},e.uid)},y[27]=k,y[28]=w,y[29]=C,y[30]=_.length,y[31]=e):e=y[31],f=v.map(e),y[21]=k,y[22]=v,y[23]=w,y[24]=C,y[25]=_.length,y[26]=f}else f=y[26];return y[32]!==p||y[33]!==f||y[34]!==m?(b=(0,t.jsx)(E.T,{align:"end",className:"w-(--anchor-width) p-0 md:w-72",children:(0,t.jsx)(P.i,{searchPlaceholder:m,emptyLabel:h,footer:p,children:f})}),y[32]=p,y[33]=f,y[34]=m,y[35]=b):b=y[35],y[36]!==N||y[37]!==b||y[38]!==u?(j=(0,t.jsxs)(E.V,{open:N,onOpenChange:I,children:[u,b]}),y[36]=N,y[37]=b,y[38]=u,y[39]=j):j=y[39],j}function eH(e,t){return(0,I.B)(t,{locale:e,fractionDigits:0})??"—"}function eU(e,t){switch(t){case eb:return e("$/100 requests");case ex:return e("$/1M tokens (list input price)");case eg:return e("$/1M tokens (weighted avg input)");default:return t}}var eB=e.i(411240),eq=e.i(246978);let e$=a.V.Intelligence;function eK(){}function eW(){let e,l,s,i=(0,n.c)(6);i[0]===Symbol.for("react.memo_cache_sentinel")?(e=eq.f.benchmark.withDefault(e$),i[0]=e):e=i[0];let[o,c]=(0,r.o)(a.d,e);i[1]!==c?(l=e=>{c(e,{scroll:!1})},i[1]=c,i[2]=l):l=i[2];let d=l;return i[3]!==o||i[4]!==d?(s=(0,t.jsx)(eG,{category:o,onCategoryChange:d}),i[3]=o,i[4]=d,i[5]=s):s=i[5],s}function eG(e){var r,s,i,o;let c,d,u,m,h,p,f,g,x,b,j,y=(0,n.c)(28),{category:_,onCategoryChange:k}=e;y[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,eB.x)(),y[0]=c):c=y[0];let{data:S}=(0,l.f)(c),N=(0,a.k)(_)?_:null;y[1]!==N?(d=(0,eB.V)(N),y[1]=N,y[2]=d):d=y[2];let T=(0,l.f)(d);y[3]!==_?(u=(0,a.f)(_),m=l.f,h=(0,eB.W)(u),y[3]=_,y[4]=u,y[5]=m,y[6]=h):(u=y[4],m=y[5],h=y[6]);let I=m(h);y[7]!==N||y[8]!==T?(r=N,s=T,p=null===r?[]:s.isPending?void 0:s.data??[],y[7]=N,y[8]=T,y[9]=p):p=y[9];let M=p,C=u?I:null;y[10]!==T||y[11]!==C?(i=T,o=C,f=i.isError?i.refetch:o?.isError?o.refetch:void 0,y[10]=T,y[11]=C,y[12]=f):f=y[12];let A=f;y[13]!==A?(g=A?{retry:()=>void A()}:null,y[13]=A,y[14]=g):g=y[14];let L=g,P=S?.valsIndex?.benchmark_version??null;return y[15]!==_||y[16]!==P?(x=(0,t.jsx)(w,{category:_,valsIndexVersion:P}),y[15]=_,y[16]=P,y[17]=x):x=y[17],y[18]!==_||y[19]!==I||y[20]!==S||y[21]!==L||y[22]!==k||y[23]!==M?(b=S?(0,t.jsx)(eR,{data:S.aaData,daData:I.data,daCategoryKeys:S.daCategoryKeys,valsIndex:S.valsIndex,orModels:M,loadError:L,visibleORBenchmarks:v.a,weightedInputPrices:S.weightedInputPrices,costPerRequest:S.costPerRequest,category:_,onCategoryChange:k}):(0,t.jsx)(eo.I,{showHeader:!1}),y[18]=_,y[19]=I,y[20]=S,y[21]=L,y[22]=k,y[23]=M,y[24]=b):b=y[24],y[25]!==x||y[26]!==b?(j=(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[x,b]}),y[25]=x,y[26]=b,y[27]=j):j=y[27],j}e.s(["BenchmarkRankings",0,function(){let e,l=(0,n.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(eG,{category:e$,onCategoryChange:eK}),children:(0,t.jsx)(eW,{})}),l[0]=e):e=l[0],e}],321549)},185279,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(199168),r=e.i(19773),s=e.i(16043),a=e.i(20537),i=e.i(143128),o=e.i(960773);e.i(707060);var c=e.i(387086),d=e.i(196991),u=e.i(269200),m=e.i(845386),h=e.i(298975),p=e.i(953871),f=e.i(246978);let g="context-length",x={"1K":(0,c.b)("< 1K tokens"),"10K":(0,c.b)("1K - 10K tokens"),"100K":(0,c.b)("10K - 100K tokens"),"1M":(0,c.b)("100K - 1M tokens"),"10M":(0,c.b)("1M - 10M tokens"),"100M":(0,c.b)("10M - 100M tokens"),"1B":(0,c.b)("100M - 1B tokens"),"10B":(0,c.b)("> 1B tokens")};function b(e){let l,r,a,i=(0,n.c)(7),{optionsMenu:o}=e,c=!!o;return i[0]!==c?(l=(0,t.jsx)(p.b,{selectClassName:"w-full md:w-52",showOptionsMenu:c}),i[0]=c,i[1]=l):l=i[1],i[2]!==o?(r=(0,t.jsx)(j,{optionsMenu:o}),i[2]=o,i[3]=r):r=i[3],i[4]!==l||i[5]!==r?(a=(0,t.jsx)(s.Suspense,{fallback:l,children:r}),i[4]=l,i[5]=r,i[6]=a):a=i[6],a}function j(e){let a,c,p,b,j,y,v,_,k=(0,n.c)(18),{optionsMenu:w}=e,S=(0,o.Q)(),N=(0,l.o)(),T=(0,l.M)();k[0]===Symbol.for("react.memo_cache_sentinel")?(a=f.f.contextLength.withDefault(u.F).withOptions({history:"push",scroll:!1}),k[0]=a):a=k[0];let[I,M]=(0,r.o)("context-length",a),[,C]=(0,s.useTransition)();k[1]!==S||k[2]!==M?(c=e=>{S.capture("change_rankings_context_length",{value:e}),C(()=>{M(e)})},k[1]=S,k[2]=M,k[3]=c):c=k[3];let A=c;return k[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(h.y,{icon:i.f,anchorId:g,children:(0,t.jsx)(d.T,{children:"Context Length"})}),k[4]=p):p=k[4],k[5]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(m.J,{children:(0,t.jsx)(d.T,{children:"Requests by prompt & completion length on OpenRouter"})}),k[5]=b):b=k[5],k[6]!==T?(j=u.K.map(e=>({value:e,label:T(x[e])})),k[6]=T,k[7]=j):j=k[7],k[8]!==N?(y=N("Filter by context length"),k[8]=N,k[9]=y):y=k[9],k[10]!==I||k[11]!==A||k[12]!==j||k[13]!==y?(v=(0,t.jsx)(m.Y,{value:I,options:j,onValueChange:A,label:y,className:"w-full md:w-52"}),k[10]=I,k[11]=A,k[12]=j,k[13]=y,k[14]=v):v=k[14],k[15]!==w||k[16]!==v?(_=(0,t.jsx)(m.U,{title:p,description:b,control:v,optionsMenu:w}),k[15]=w,k[16]=v,k[17]=_):_=k[17],_}var y=e.i(389795);let v="model-rankings-context-length-chart";function _(e){let s,a,i,o,c,d,m,h,p=(0,n.c)(21),{showPercentage:b}=e,j=(0,l.o)(),_=(0,l.M)();p[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.f.contextLength.withDefault(u.F),p[0]=s):s=p[0];let[k]=(0,r.o)("context-length",s);p[1]!==k?(a={bucket:k},p[1]=k,p[2]=a):a=p[2],p[3]!==j?(i=j("Context length"),p[3]=j,p[4]=i):i=p[4];let w=x[k];return p[5]!==_||p[6]!==w?(o=_(w),p[5]=_,p[6]=w,p[7]=o):o=p[7],p[8]!==j||p[9]!==b?(c=j(b?"Percentage":"Absolute"),p[8]=j,p[9]=b,p[10]=c):c=p[10],p[11]!==o||p[12]!==c?(d=[o,c],p[11]=o,p[12]=c,p[13]=d):d=p[13],p[14]!==i||p[15]!==d?(m={sectionId:g,title:i,filters:d},p[14]=i,p[15]=d,p[16]=m):m=p[16],p[17]!==b||p[18]!==a||p[19]!==m?(h=(0,t.jsx)(y.f,{endpoint:"/api/frontend/v1/rankings/context-length",searchParams:a,testId:v,showPercentage:b,isPercentage:!1,share:m}),p[17]=b,p[18]=a,p[19]=m,p[20]=h):h=p[20],h}e.s(["ContextLengthRankingsChart",0,function(){let e,l,r,i,o=(0,n.c)(8),[c,d]=(0,s.useState)(!1);return o[0]!==c?(e=(0,t.jsx)(b,{optionsMenu:(0,t.jsx)(a.f,{checked:c,onCheckedChange:d,dataTestId:v})}),o[0]=c,o[1]=e):e=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(p.Z,{}),o[2]=l):l=o[2],o[3]!==c?(r=(0,t.jsx)(s.Suspense,{fallback:l,children:(0,t.jsx)(_,{showPercentage:c})}),o[3]=c,o[4]=r):r=o[4],o[5]!==e||o[6]!==r?(i=(0,t.jsxs)(t.Fragment,{children:[e,r]}),o[5]=e,o[6]=r,o[7]=i):i=o[7],i}],185279)},82123,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(199168),r=e.i(618115),s=e.i(16043),a=e.i(988590),i=e.i(269200),o=e.i(943889);function c(){let e=new URLSearchParams(window.location.search).get("context-length");return(0,a.q)(e,i.K)?e:i.F}function d(){return i.F}var u=e.i(119635),m=e.i(586816),h=e.i(975901);function p(e){let l,r,s,a,i,o,c,d=(0,n.c)(25),{summary:p,bucket:f,locale:g,gt:x,m:b}=e,{leader:j}=p;return void 0===j?null:(d[0]!==b?(l=b(u.Y),d[0]=b,d[1]=l):l=d[1],d[2]!==f||d[3]!==x||d[4]!==j.label||d[5]!==j.requests||d[6]!==g||d[7]!==p.weekStart?(r=x("Summary of the context-length chart above for the {bucket} context window in the week beginning {weekStart}. {leader} leads with {requests} requests.",{bucket:f,weekStart:(0,m.f)(g,p.weekStart),leader:j.label,requests:j.requests}),d[2]=f,d[3]=x,d[4]=j.label,d[5]=j.requests,d[6]=g,d[7]=p.weekStart,d[8]=r):r=d[8],d[9]!==b?(s=b(u.Q),d[9]=b,d[10]=s):s=d[10],d[11]!==b?(a=b(u.f),d[11]=b,d[12]=a):a=d[12],d[13]!==b?(i=b(u.l),d[13]=b,d[14]=i):i=d[14],d[15]!==b?(o=b(u.j),d[15]=b,d[16]=o):o=d[16],d[17]!==p.rows||d[18]!==l||d[19]!==r||d[20]!==s||d[21]!==a||d[22]!==i||d[23]!==o?(c=(0,t.jsx)(h.X,{heading:l,description:r,caption:s,rankHeading:a,labelHeading:i,valueHeading:o,rows:p.rows}),d[17]=p.rows,d[18]=l,d[19]=r,d[20]=s,d[21]=a,d[22]=i,d[23]=o,d[24]=c):c=d[24],c)}var f=e.i(411240);function g(e){let s,a,i=(0,n.c)(9),{locale:o,bucket:c}=e;i[0]!==c||i[1]!==o?(s=(0,f.N)(c,o),i[0]=c,i[1]=o,i[2]=s):s=i[2];let d=s,{data:u}=(0,r.f)(d),m=(0,l.o)(),h=(0,l.M)();return void 0===u||void 0===u.leader||0===u.rows.length?null:(i[3]!==c||i[4]!==m||i[5]!==o||i[6]!==h||i[7]!==u?(a=(0,t.jsx)(p,{summary:u,bucket:c,locale:o,gt:m,m:h}),i[3]=c,i[4]=m,i[5]=o,i[6]=h,i[7]=u,i[8]=a):a=i[8],a)}e.s(["ContextLengthSummarySwap",0,function(e){let l,r=(0,n.c)(5),{locale:a,children:u}=e,m=(0,s.useSyncExternalStore)(o.f,c,d);if(m===i.F){let e;return r[0]!==u?(e=(0,t.jsx)(t.Fragment,{children:u}),r[0]=u,r[1]=e):e=r[1],e}return r[2]!==m||r[3]!==a?(l=(0,t.jsx)(g,{locale:a,bucket:m}),r[2]=m,r[3]=a,r[4]=l):l=r[4],l}],82123)},299110,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(199168),r=e.i(546368),s=e.i(19773),a=e.i(16043),i=e.i(20537),o=e.i(710968);let c=a.forwardRef(function({title:e,titleId:t,...n},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802"}))});var d=e.i(297510),u=e.i(960773),m=e.i(138257),h=e.i(988590);e.i(707060);var p=e.i(300326),f=e.i(387086),g=e.i(196991),x=e.i(153746),b=e.i(845386),j=e.i(298975),y=e.i(953871),v=e.i(246978);let _={natural:{icon:c,title:(0,f.b)("Languages"),selectLabel:(0,f.b)("Filter by natural language"),hashAnchor:"natural-languages",choices:[...r.r].toSorted()},programming:{icon:o.f,title:(0,f.b)("Programming"),selectLabel:(0,f.b)("Filter by programming language"),hashAnchor:"programming-languages",choices:r.z}};function k(e){let l,r,s,i=(0,n.c)(7),o=!!e.optionsMenu;return i[0]!==o?(l=(0,t.jsx)(y.b,{selectClassName:"w-full md:w-36",showOptionsMenu:o}),i[0]=o,i[1]=l):l=i[1],i[2]!==e?(r=(0,t.jsx)(w,{...e,optionsMenu:e.optionsMenu}),i[2]=e,i[3]=r):r=i[3],i[4]!==l||i[5]!==r?(s=(0,t.jsx)(a.Suspense,{fallback:l,children:r}),i[4]=l,i[5]=r,i[6]=s):s=i[6],s}function w(e){let i,o,c,d,m,f,x,y,k,w,T,I,M,C=(0,n.c)(34),A=(0,u.Q)();C[0]===Symbol.for("react.memo_cache_sentinel")?(i=v.f.naturalLanguage.withDefault(r.R.English).withOptions({history:"push",scroll:!1}),C[0]=i):i=C[0];let[L,P]=(0,s.o)("natural-language",i);C[1]===Symbol.for("react.memo_cache_sentinel")?(o=v.f.programmingLanguage.withDefault(r.W.Python).withOptions({history:"push",scroll:!1}),C[1]=o):o=C[1];let[R,O]=(0,s.o)("programming-language",o),[,D]=(0,a.useTransition)(),V=_[e.type],E=(0,l.M)(),z="natural"===e.type?L:R;C[2]!==A||C[3]!==e.type||C[4]!==P||C[5]!==O?(c=t=>{switch(e.type){case"natural":if(!(0,h.q)(t,r.R))return;A.capture("change_rankings_language",{language_type:"natural",value:t}),D(()=>{P(t)});break;case"programming":if(!(0,h.q)(t,r.W))return;A.capture("change_rankings_language",{language_type:"programming",value:t}),D(()=>{O(t)})}},C[2]=A,C[3]=e.type,C[4]=P,C[5]=O,C[6]=c):c=C[6];let F=c,H=V.icon,U=V.hashAnchor;return C[7]!==V.title||C[8]!==E?(d=E(V.title),C[7]=V.title,C[8]=E,C[9]=d):d=C[9],C[10]!==V.hashAnchor||C[11]!==V.icon||C[12]!==d?(m=(0,t.jsx)(j.y,{icon:H,anchorId:U,children:d}),C[10]=V.hashAnchor,C[11]=V.icon,C[12]=d,C[13]=m):m=C[13],C[14]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(N,{}),C[14]=f):f=C[14],C[15]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(t.Fragment,{children:"Compare models by natural language on OpenRouter"}),y=(0,t.jsx)(t.Fragment,{children:"Compare models by programming language on OpenRouter"}),C[15]=x,C[16]=y):(x=C[15],y=C[16]),C[17]!==e.type?(k=(0,t.jsx)(b.J,{tooltip:f,children:(0,t.jsx)(g.T,{children:(0,t.jsx)(p.f,{branch:e.type,natural:x,programming:y})})}),C[17]=e.type,C[18]=k):k=C[18],C[19]!==V.choices?(w=V.choices.map(S),C[19]=V.choices,C[20]=w):w=C[20],C[21]!==V.selectLabel||C[22]!==E?(T=E(V.selectLabel),C[21]=V.selectLabel,C[22]=E,C[23]=T):T=C[23],C[24]!==F||C[25]!==z||C[26]!==w||C[27]!==T?(I=(0,t.jsx)(b.Y,{value:z,options:w,onValueChange:F,label:T,className:"w-full md:w-36"}),C[24]=F,C[25]=z,C[26]=w,C[27]=T,C[28]=I):I=C[28],C[29]!==e.optionsMenu||C[30]!==k||C[31]!==I||C[32]!==m?(M=(0,t.jsx)(b.U,{title:m,description:k,control:I,optionsMenu:e.optionsMenu}),C[29]=e.optionsMenu,C[30]=k,C[31]=I,C[32]=m,C[33]=M):M=C[33],M}function S(e){return{value:e,label:e}}function N(){let e,l,s=(0,n.c)(4),a=(0,m.useLocale)();return s[0]!==a?(e=(0,d.$)(r.H,{locale:a,preset:"fee"})??"—",s[0]=a,s[1]=e):e=s[1],s[2]!==e?(l=(0,t.jsxs)(g.T,{children:["Calculations are approximate, with a representative"," ",(0,t.jsx)(x.d,{children:e})," ","sample of all prompts classified."]}),s[2]=e,s[3]=l):l=s[3],l}var T=e.i(389795);let I={natural:{endpoint:"/api/frontend/v1/rankings/natural-language",testId:"model-rankings-natural-languages-chart"},programming:{endpoint:"/api/frontend/v1/rankings/programming-language",testId:"model-rankings-programming-languages-chart"}};function M(e){let a,i,o,c,d,u,m,h,p=(0,n.c)(23),{type:f,showPercentage:g}=e;p[0]===Symbol.for("react.memo_cache_sentinel")?(a=v.f.naturalLanguage.withDefault(r.R.English),p[0]=a):a=p[0];let[x]=(0,s.o)("natural-language",a);p[1]===Symbol.for("react.memo_cache_sentinel")?(i=v.f.programmingLanguage.withDefault(r.W.Python),p[1]=i):i=p[1];let[b]=(0,s.o)("programming-language",i),j=(0,l.o)(),y=(0,l.M)(),k=I[f],w="natural"===f?x:b,S=k.endpoint;p[2]!==w?(o={tag:w},p[2]=w,p[3]=o):o=p[3];let N=k.testId,M=_[f],C=_[f];return p[4]!==y||p[5]!==C.title?(c=y(C.title),p[4]=y,p[5]=C.title,p[6]=c):c=p[6],p[7]!==j||p[8]!==g?(d=j(g?"Percentage":"Absolute"),p[7]=j,p[8]=g,p[9]=d):d=p[9],p[10]!==d||p[11]!==w?(u=[w,d],p[10]=d,p[11]=w,p[12]=u):u=p[12],p[13]!==u||p[14]!==M.hashAnchor||p[15]!==c?(m={sectionId:M.hashAnchor,title:c,filters:u},p[13]=u,p[14]=M.hashAnchor,p[15]=c,p[16]=m):m=p[16],p[17]!==k.endpoint||p[18]!==k.testId||p[19]!==g||p[20]!==m||p[21]!==o?(h=(0,t.jsx)(T.f,{endpoint:S,searchParams:o,testId:N,showPercentage:g,share:m}),p[17]=k.endpoint,p[18]=k.testId,p[19]=g,p[20]=m,p[21]=o,p[22]=h):h=p[22],h}e.s(["LanguageRankingsChart",0,function(e){let l,r,s,o,c,d=(0,n.c)(13),{type:u}=e,[m,h]=(0,a.useState)(!0),p=I[u];return d[0]!==m||d[1]!==p.testId?(l=(0,t.jsx)(i.f,{checked:m,onCheckedChange:h,dataTestId:p.testId}),d[0]=m,d[1]=p.testId,d[2]=l):l=d[2],d[3]!==l||d[4]!==u?(r=(0,t.jsx)(k,{type:u,optionsMenu:l}),d[3]=l,d[4]=u,d[5]=r):r=d[5],d[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(y.Z,{}),d[6]=s):s=d[6],d[7]!==m||d[8]!==u?(o=(0,t.jsx)(a.Suspense,{fallback:s,children:(0,t.jsx)(M,{type:u,showPercentage:m})}),d[7]=m,d[8]=u,d[9]=o):o=d[9],d[10]!==r||d[11]!==o?(c=(0,t.jsxs)(t.Fragment,{children:[r,o]}),d[10]=r,d[11]=o,d[12]=c):c=d[12],c}],299110)},559106,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(199168),r=e.i(618115);e.i(707060);var s=e.i(196991),a=e.i(165460),i=e.i(16043),o=e.i(20537),c=e.i(479208),d=e.i(953584),u=e.i(411240),m=e.i(619179),h=e.i(138336),p=e.i(298975),f=e.i(287314),g=e.i(953871);let x="open-closed-share-chart";function b(e){let s,a,i,o,d,p,b=(0,n.c)(18),{showPercentage:j}=e,y=(0,l.o)();b[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,u.f)("/api/frontend/v1/rankings/open-closed"),b[0]=s):s=b[0];let{data:v,isError:_,refetch:k}=(0,r.f)(s);if(!v){let e;return b[1]!==_||b[2]!==k?(e=_?(0,t.jsx)(h.o,{onRetry:()=>void k()}):(0,t.jsx)(g.d,{}),b[1]=_,b[2]=k,b[3]=e):e=b[3],e}return b[4]!==y?(a=y("Open / closed"),b[4]=y,b[5]=a):a=b[5],b[6]!==y||b[7]!==j?(i=y(j?"Share of tokens":"Tokens"),b[6]=y,b[7]=j,b[8]=i):i=b[8],b[9]!==i?(o=[i],b[9]=i,b[10]=o):o=b[10],b[11]!==v||b[12]!==j?(d=(0,t.jsx)(c.Y,{data:v,showPercentage:j,dataTestId:x}),b[11]=v,b[12]=j,b[13]=d):d=b[13],b[14]!==a||b[15]!==o||b[16]!==d?(p=(0,t.jsx)(f.f,{sectionId:m.b,title:a,filters:o,children:d}),b[14]=a,b[15]=o,b[16]=d,b[17]=p):p=b[17],p}e.s(["OpenClosedShareChart",0,function(){let e,l,r,c,u,h,f=(0,n.c)(10),[j,y]=(0,i.useState)(!0);return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(s.T,{children:"Open / Closed"}),f[0]=e):e=f[0],f[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(s.T,{children:"Share of tokens processed by open-weight vs. closed-weight models on OpenRouter, by week. Stealth models are excluded."}),f[1]=l):l=f[1],f[2]!==j?(r=(0,t.jsx)(p.E,{icon:a.f,title:e,anchorId:m.b,hideSubtitleOnMobile:!0,subtitle:l,controls:(0,t.jsx)(o.f,{checked:j,onCheckedChange:y,dataTestId:x})}),f[2]=j,f[3]=r):r=f[3],f[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(g.d,{}),f[4]=c):c=f[4],f[5]!==j?(u=(0,t.jsx)(d.f,{fallback:c,children:(0,t.jsx)(b,{showPercentage:j})}),f[5]=j,f[6]=u):u=f[6],f[7]!==r||f[8]!==u?(h=(0,t.jsxs)(t.Fragment,{children:[r,u]}),f[7]=r,f[8]=u,f[9]=h):h=f[9],h}])},203499,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(618115),r=e.i(479208),s=e.i(953584),a=e.i(411240),i=e.i(953871);function o(){let e,s,o=(0,n.c)(4);o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.b)(),o[0]=e):e=o[0];let{data:c}=(0,l.f)(e);if(!c){let e;return o[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(i.x,{}),o[1]=e):e=o[1],e}return o[2]!==c?(s=(0,t.jsx)(r.v,{data:c}),o[2]=c,o[3]=s):s=o[3],s}e.s(["PerformanceChart",0,function(){let e,l=(0,n.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(s.f,{fallback:(0,t.jsx)(i.x,{}),children:(0,t.jsx)(o,{})}),l[0]=e):e=l[0],e}])},389795,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(618115),r=e.i(479208),s=e.i(953584),a=e.i(411240),i=e.i(287314),o=e.i(953871);function c(e){let s,c,d,u,m,h,p=(0,n.c)(21),{endpoint:f,searchParams:g,testId:x,showPercentage:b,showLegendPercentage:j,isPercentage:y,otherModelsHref:v,shouldTrimZeroOnlyRangeEdges:_,share:k}=e;p[0]!==f||p[1]!==g||p[2]!==_?(s=(0,a.f)(f,g,_),p[0]=f,p[1]=g,p[2]=_,p[3]=s):s=p[3];let{data:w}=(0,l.f)(s);if(!w){let e;return p[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(o.Z,{}),p[4]=e):e=p[4],e}p[5]!==j?(c=void 0===j?{}:{showLegendPercentage:j},p[5]=j,p[6]=c):c=p[6],p[7]!==y?(d=void 0===y?{}:{isPercentage:y},p[7]=y,p[8]=d):d=p[8],p[9]!==v?(u=void 0===v?{}:{otherModelsHref:v},p[9]=v,p[10]=u):u=p[10],p[11]!==w||p[12]!==b||p[13]!==c||p[14]!==d||p[15]!==u||p[16]!==x?(m=(0,t.jsx)(r.k,{data:w,testId:x,showPercentage:b,...c,...d,...u,useRichTooltip:!0,shouldNavigateOnClick:!0,shortenModelNames:!0}),p[11]=w,p[12]=b,p[13]=c,p[14]=d,p[15]=u,p[16]=x,p[17]=m):m=p[17];let S=m;return p[18]!==S||p[19]!==k?(h=void 0===k?S:(0,t.jsx)(i.f,{...k,children:S}),p[18]=S,p[19]=k,p[20]=h):h=p[20],h}e.s(["f",0,function(e){let l,r,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(o.Z,{}),a[0]=l):l=a[0],a[1]!==e?(r=(0,t.jsx)(s.f,{fallback:l,children:(0,t.jsx)(c,{...e})}),a[1]=e,a[2]=r):r=a[2],r}])},398897,e=>{"use strict";var t=e.i(659350),n=e.i(663456);e.i(430022);let l="single",r="short",s="core",a="long",i=[l,r,s,a],o=[s,a,r,l];function c(e){for(let t of o){let n=e.points.find(e=>e.bucket===t);if(n)return n.medianUsd}return 0}var d=e.i(136562),u=e.i(139697),m=e.i(987457),h=e.i(328262),p=e.i(829622),f=e.i(326e3),g=e.i(670168),x=e.i(737980),b=e.i(960773),j=e.i(199168),y=e.i(797521),v=e.i(988590),_=e.i(618115);e.i(707060);var k=e.i(196991),w=e.i(153746),S=e.i(428655),N=e.i(16043),T=e.i(953584),I=e.i(411240),M=e.i(774294),C=e.i(619179),A=e.i(298975),L=e.i(287314),P=e.i(387086);let R="w-7 shrink-0",O="min-w-0 flex-1 md:w-56 md:flex-none",D="relative order-last h-6 min-w-0 basis-full pl-7 md:order-none md:mr-10 md:h-full md:flex-1 md:basis-auto md:pl-0",V={[l]:(0,P.b)("1 turn"),[r]:(0,P.b)("2–9 turns"),[s]:(0,P.b)("10–49 turns"),[a]:(0,P.b)("50+ turns")},E={[l]:"var(--chart-session-length-single)",[r]:"var(--chart-session-length-short)",[s]:"var(--chart-session-length-core)",[a]:"var(--chart-session-length-long)"},z={HighestToLowest:"highest-to-lowest",LowestToHighest:"lowest-to-highest"},F=z.LowestToHighest;var H=e.i(293747);let U={linearUsd:.01,maxUsd:10,ticks:[0,.01,.1,1,10]};function B(e,t){if(e<=0)return 4;if(et=>{t?B.current.set(e,t):B.current.delete(e)},M[1]=r):r=M[1];let ee=r;if(M[2]!==L?(a=()=>{let e=U.current;if(!e)return;let t=null,n=()=>{null!==t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=e.getBoundingClientRect().width,n=L.flatMap(e=>{let n=B.current.get(e.bucket);return n?[{bucket:e.bucket,center:e.percent/100*t,width:n.getBoundingClientRect().width}]:[]});X(function({containerWidth:e,labels:t}){if(e<=0||0===t.length)return new Set;let n=new Map(t.map(e=>[e.bucket,e])),l=new Set;for(let e of Z){let t=n.get(e);t&&([...l].some(e=>{let l=n.get(e);return!!l&&function(e,t){let n=e.center-e.width/2,l=e.center+e.width/2,r=t.center-t.width/2;return n{l.disconnect(),null!==t&&cancelAnimationFrame(t)}},i=[L],M[2]=L,M[3]=a,M[4]=i):(a=M[3],i=M[4]),(0,N.useLayoutEffect)(a,i),M[5]!==L){let e=L.map(J);o=Math.min(...e),c=Math.max(...e),M[5]=L,M[6]=o,M[7]=c}else o=M[6],c=M[7];let et=c;M[8]!==A||M[9]!==z?(u=()=>z?.(A),M[8]=A,M[9]=z,M[10]=u):u=M[10],M[11]!==z?(m=()=>z?.(null),M[11]=z,M[12]=m):m=M[12],M[13]!==A||M[14]!==z?(h=()=>z?.(A),M[13]=A,M[14]=z,M[15]=h):h=M[15],M[16]!==z?(p=()=>z?.(null),M[16]=z,M[17]=p):p=M[17],M[18]===Symbol.for("react.memo_cache_sentinel")?(f=(0,d.f)(R,"text-xs tabular-nums text-muted-foreground"),M[18]=f):f=M[18],M[19]!==C?(g=(0,t.jsx)("span",{className:f,children:C}),M[19]=C,M[20]=g):g=M[20],M[21]===Symbol.for("react.memo_cache_sentinel")?(x=(0,d.f)(O,"flex min-w-0 items-center gap-2 pr-2"),M[21]=x):x=M[21];let en=P.author??"unknown";if(M[22]!==P.iconUri||M[23]!==P.permaslug||M[24]!==en?(b=(0,t.jsx)(K.f,{frame:!0,author:en,permaslug:P.permaslug,iconUri:P.iconUri,className:"size-4 shrink-0"}),M[22]=P.iconUri,M[23]=P.permaslug,M[24]=en,M[25]=b):b=M[25],M[26]!==P.href||M[27]!==P.shortName?(j=(0,t.jsx)(W.TextLink,{href:P.href,size:"body",weight:"medium",className:"truncate",target:"_blank",rel:"noopener noreferrer",children:P.shortName}),M[26]=P.href,M[27]=P.shortName,M[28]=j):j=M[28],M[29]!==b||M[30]!==j?(y=(0,t.jsxs)("div",{className:x,children:[b,j]}),M[29]=b,M[30]=j,M[31]=y):y=M[31],M[32]!==F||M[33]!==L||M[34]!==Q){let e;M[36]!==F||M[37]!==Q?(e=e=>{let n=q(F,e.medianUsd),l=Q?.has(e.bucket)??!1;return(0,t.jsx)("span",{ref:ee(e.bucket),className:(0,d.f)("absolute top-1/2 left-(--point-left) -translate-x-1/2 -translate-y-1/2 whitespace-nowrap text-micro text-(--bucket-color) tabular-nums",null===Q&&"invisible",!l&&"invisible"),"data-allow-inline-style":!0,style:{"--bucket-color":E[e.bucket],"--point-left":`${e.percent}%`},children:n},e.bucket)},M[36]=F,M[37]=Q,M[38]=e):e=M[38],v=L.map(e),M[32]=F,M[33]=L,M[34]=Q,M[35]=v}else v=M[35];if(M[39]!==v?(_=(0,t.jsx)("div",{className:"relative h-4",children:v}),M[39]=v,M[40]=_):_=M[40],M[41]!==L.length||M[42]!==et||M[43]!==o?(k=L.length>1&&(0,t.jsx)("div",{className:"absolute top-1/2 h-px left-(--range-start) w-(--range-width) -translate-y-1/2 bg-muted-foreground/50","data-allow-inline-style":!0,style:{"--range-start":`${o}%`,"--range-width":`${et-o}%`},"aria-hidden":!0}),M[41]=L.length,M[42]=et,M[43]=o,M[44]=k):k=M[44],M[45]!==F||M[46]!==H||M[47]!==L){let e;M[49]!==F||M[50]!==H?(e=e=>{let n=q(F,e.medianUsd);return(0,t.jsxs)("div",{className:"absolute top-1/2 z-10 left-(--point-left) -translate-x-1/2 -translate-y-1/2","data-allow-inline-style":!0,style:{"--point-left":`${e.percent}%`},children:[(0,t.jsx)(G.Tooltip,{content:`${H(V[e.bucket])}: ${n}`,side:"top",children:(0,t.jsx)("span",{className:"block size-1.75 rounded-full bg-(--bucket-color)","data-allow-inline-style":!0,style:{"--bucket-color":E[e.bucket]},"aria-hidden":!0})}),(0,t.jsxs)("span",{className:"sr-only",children:[H(V[e.bucket]),": ",n]})]},e.bucket)},M[49]=F,M[50]=H,M[51]=e):e=M[51],w=L.map(e),M[45]=F,M[46]=H,M[47]=L,M[48]=w}else w=M[48];return M[52]!==k||M[53]!==w?(S=(0,t.jsxs)("div",{className:"relative h-2",children:[k,w]}),M[52]=k,M[53]=w,M[54]=S):S=M[54],M[55]!==_||M[56]!==S?(T=(0,t.jsx)("div",{ref:U,className:D,children:(0,t.jsx)("div",{className:"flex h-full items-center",children:(0,t.jsxs)("div",{className:"h-6 w-full",children:[_,S]})})}),M[55]=_,M[56]=S,M[57]=T):T=M[57],M[58]!==g||M[59]!==y||M[60]!==T||M[61]!==u||M[62]!==m||M[63]!==h||M[64]!==p?(I=(0,t.jsxs)("li",{onFocus:u,onBlur:m,className:"group relative flex flex-wrap items-center border-t border-border py-2 first:border-t-0 hover:bg-muted/40 md:h-10 md:flex-nowrap md:py-0",onMouseEnter:h,onMouseLeave:p,children:[g,y,T]}),M[58]=g,M[59]=y,M[60]=T,M[61]=u,M[62]=m,M[63]=h,M[64]=p,M[65]=I):I=M[65],I});function J(e){return e.percent}function X(e){let l,r,s,a,o,c,u,m,h,p,f,g,x,b,j,y,v,_,w=(0,n.c)(64),{models:S,scale:N,resolveModel:T,windowRef:I,onHoverModel:M,isScrollable:C}=e,A=void 0===C||C,L=(0,$.useLocale)();if(w[0]!==A||w[1]!==L||w[2]!==S||w[3]!==T||w[4]!==N||w[5]!==I){let e,n,x,b,j,y,v=N.ticks.filter(ee);if(w[18]!==S||w[19]!==T||w[20]!==N){let t;w[22]!==T||w[23]!==N?(t=e=>({model:e.model,resolved:T(e.model),points:i.flatMap(t=>{let n=e.points.find(e=>e.bucket===t);return n?[{bucket:t,medianUsd:n.medianUsd,percent:B(n.medianUsd,N)}]:[]})}),w[22]=T,w[23]=N,w[24]=t):t=w[24],e=S.map(t),w[18]=S,w[19]=T,w[20]=N,w[21]=e}else e=w[21];l=e,g=I,r=!0;let _=A&&"scrollbar-hide lg:h-140 lg:overflow-y-auto";w[25]!==_?(s=(0,d.f)("relative",_),w[25]=_,w[26]=s):s=w[26];let M=A&&"z-30 lg:sticky lg:top-0";w[27]!==M?(n=(0,d.f)("flex h-8 items-center border-b border-border bg-background px-4",M),w[27]=M,w[28]=n):n=w[28],w[29]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)("span",{className:R}),b=(0,t.jsx)("span",{className:(0,d.f)(O,"hidden text-xs font-medium text-muted-foreground md:block"),children:(0,t.jsx)(k.T,{children:"Model"})}),w[29]=x,w[30]=b):(x=w[29],b=w[30]),w[31]!==L||w[32]!==N?(j=e=>(0,t.jsx)("span",{className:"absolute top-1/2 left-(--tick-left) -translate-x-1/2 -translate-y-1/2 text-micro font-semibold tabular-nums text-muted-foreground","data-allow-inline-style":!0,style:{"--tick-left":`${B(e,N)}%`},children:(0,H.f)(e,{locale:L,preset:"session-tick"})??"—"},e),w[31]=L,w[32]=N,w[33]=j):j=w[33],a=(0,t.jsxs)("div",{className:n,children:[x,b,(0,t.jsx)("div",{className:"relative h-full min-w-0 flex-1 md:mr-10",children:v.map(j)})]}),f="relative px-4 pb-2",u="pointer-events-none absolute inset-0 z-0 hidden px-4 md:flex",m=!0,w[34]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)("span",{className:R}),p=(0,t.jsx)("span",{className:O}),w[34]=h,w[35]=p):(h=w[34],p=w[35]),o=D,w[36]!==N?(y=e=>(0,t.jsx)("div",{className:"absolute inset-y-0 left-(--tick-left) w-px -translate-x-1/2 bg-foreground/20","data-allow-inline-style":!0,style:{"--tick-left":`${B(e,N)}%`}},e),w[36]=N,w[37]=y):y=w[37],c=v.map(y),w[0]=A,w[1]=L,w[2]=S,w[3]=T,w[4]=N,w[5]=I,w[6]=l,w[7]=r,w[8]=s,w[9]=a,w[10]=o,w[11]=c,w[12]=u,w[13]=m,w[14]=h,w[15]=p,w[16]=f,w[17]=g}else l=w[6],r=w[7],s=w[8],a=w[9],o=w[10],c=w[11],u=w[12],m=w[13],h=w[14],p=w[15],f=w[16],g=w[17];if(w[38]!==o||w[39]!==c?(x=(0,t.jsx)("div",{className:o,children:c}),w[38]=o,w[39]=c,w[40]=x):x=w[40],w[41]!==x||w[42]!==u||w[43]!==m||w[44]!==h||w[45]!==p?(b=(0,t.jsxs)("div",{className:u,"aria-hidden":m,children:[h,p,x]}),w[41]=x,w[42]=u,w[43]=m,w[44]=h,w[45]=p,w[46]=b):b=w[46],w[47]!==M||w[48]!==l){let e;w[50]!==M?(e=(e,n)=>(0,t.jsx)(Q,{rank:n+1,model:e.model,points:e.points,resolved:e.resolved,onHoverModel:M},e.model),w[50]=M,w[51]=e):e=w[51],j=l.map(e),w[47]=M,w[48]=l,w[49]=j}else j=w[49];return w[52]!==j?(y=(0,t.jsx)("ol",{children:j}),w[52]=j,w[53]=y):y=w[53],w[54]!==b||w[55]!==y||w[56]!==f?(v=(0,t.jsxs)("div",{className:f,children:[b,y]}),w[54]=b,w[55]=y,w[56]=f,w[57]=v):v=w[57],w[58]!==r||w[59]!==s||w[60]!==a||w[61]!==v||w[62]!==g?(_=(0,t.jsxs)("div",{ref:g,"data-chart-share-surface":r,className:s,children:[a,v]}),w[58]=r,w[59]=s,w[60]=a,w[61]=v,w[62]=g,w[63]=_):_=w[63],_}function ee(e){return e>0}var et=e.i(427150),en=e.i(477229);function el(e){var l,r;let s,a,i,o,u,m,h,p,f,g,x,b,j,y,v,_,k=(0,n.c)(40),{models:w,scale:S,windowRef:T,resolveAuthor:I,hoveredModel:M,className:C}=e,A=(0,N.useRef)(null),[L,P]=(0,N.useState)(null),R=(0,N.useRef)(!1);k[0]!==w||k[1]!==I?(l=w,r=I,s=(0,en.f)(l.flatMap(e=>r(e.model)??[])),a=new Map(l.map(e=>{let t=r(e.model),n=void 0===t?void 0:s.get(t);return[e.model,n??"var(--muted-foreground)"]})),k[0]=w,k[1]=I,k[2]=a):a=k[2];let O=a;k[3]!==T?(i=()=>{let e=T.current,t=A.current;if(!e||!t)return;let n=null,l=()=>{null===n&&(n=requestAnimationFrame(()=>{n=null;let l=t.clientHeight;if(0===e.scrollHeight||0===l)return;let r={topPx:Math.round(e.scrollTop/e.scrollHeight*l),heightPx:Math.round(Math.max(e.clientHeight/e.scrollHeight*l,30))};P(e=>e&&e.topPx===r.topPx&&e.heightPx===r.heightPx?e:r)}))};l(),e.addEventListener("scroll",l,{passive:!0});let r=new ResizeObserver(l);return r.observe(e),r.observe(t),()=>{e.removeEventListener("scroll",l),r.disconnect(),null!==n&&cancelAnimationFrame(n)}},k[3]=T,k[4]=i):i=k[4],k[5]!==w.length||k[6]!==T?(o=[T,w.length],k[5]=w.length,k[6]=T,k[7]=o):o=k[7],(0,N.useEffect)(i,o),k[8]!==T?(u=()=>{let e=A.current,t=T.current;if(!e||!t)return;let n=e=>{var n,l;let r=t.scrollHeight-t.clientHeight;(e.deltaY>0?t.scrollTop0)&&(e.preventDefault(),t.scrollTop=t.scrollTop+e.deltaY*(n=e,l=t,n.deltaMode===WheelEvent.DOM_DELTA_PAGE?l.clientHeight:n.deltaMode===WheelEvent.DOM_DELTA_LINE?16:1))};return e.addEventListener("wheel",n,{passive:!1}),()=>{e.removeEventListener("wheel",n)}},m=[T],k[8]=T,k[9]=u,k[10]=m):(u=k[9],m=k[10]),(0,N.useEffect)(u,m),k[11]!==T?(h=(e,t)=>{let n=T.current;if(!n)return;let l=t.getBoundingClientRect(),r=Math.max(n.clientHeight/n.scrollHeight*l.height,30),s=l.height-r;s<=0||(n.scrollTop=Math.min(Math.max((e-l.top-r/2)/s,0),1)*(n.scrollHeight-n.clientHeight))},k[11]=T,k[12]=h):h=k[12];let D=h;if(k[13]!==C?(p=(0,d.f)("relative h-140 cursor-pointer touch-none select-none","rounded-md bg-muted/60",C),k[13]=C,k[14]=p):p=k[14],k[15]!==D?(f=e=>{R.current=!0,e.currentTarget.setPointerCapture(e.pointerId),D(e.clientY,e.currentTarget)},g=e=>{R.current&&D(e.clientY,e.currentTarget)},k[15]=D,k[16]=f,k[17]=g):(f=k[16],g=k[17]),k[18]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{R.current=!1},b=()=>{R.current=!1},k[18]=x,k[19]=b):(x=k[18],b=k[19]),k[20]!==O||k[21]!==M||k[22]!==w||k[23]!==S){let e;k[25]!==O||k[26]!==M||k[27]!==w.length||k[28]!==S?(e=(e,n)=>{let l=M===e.model,r=(0,et.f)(M)&&!l;return(0,t.jsx)("span",{className:(0,d.f)("absolute top-(--dash-top) left-(--dash-left) -translate-x-1/2 -translate-y-1/2 rounded-full bg-(--dash-color) transition-all duration-100",l?"h-1 w-2.5 ring-2 ring-primary/50":"h-0.5 w-1.5",r&&"opacity-40"),"data-allow-inline-style":!0,style:{"--dash-top":`${(n+.5)/w.length*100}%`,"--dash-left":`${B(c(e),S)}%`,"--dash-color":O.get(e.model)}},e.model)},k[25]=O,k[26]=M,k[27]=w.length,k[28]=S,k[29]=e):e=k[29],j=w.map(e),k[20]=O,k[21]=M,k[22]=w,k[23]=S,k[24]=j}else j=k[24];return k[30]!==j?(y=(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-2 inset-y-1",children:j}),k[30]=j,k[31]=y):y=k[31],k[32]!==L?(v=L&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0.5 top-(--viewport-top) h-(--viewport-height) rounded-md border-[1.5px] border-primary/70 bg-primary/10","data-allow-inline-style":!0,style:{"--viewport-top":`${L.topPx}px`,"--viewport-height":`${L.heightPx}px`}}),k[32]=L,k[33]=v):v=k[33],k[34]!==y||k[35]!==v||k[36]!==p||k[37]!==f||k[38]!==g?(_=(0,t.jsxs)("div",{ref:A,className:p,onPointerDown:f,onPointerMove:g,onPointerUp:x,onPointerCancel:b,"aria-hidden":!0,children:[y,v]}),k[34]=y,k[35]=v,k[36]=p,k[37]=f,k[38]=g,k[39]=_):_=k[39],_}var er=e.i(139599);function es(e){let l,r,s,a,o,m,h,p,f,g,v,S,T,M,A,P,R,O,D,F,H=(0,n.c)(62),{sort:B,onAppIdChange:q}=e,$=(0,y.f)(),K=(0,j.o)(),W=(0,j.M)(),G=(0,b.Q)();H[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,I.o)(),H[0]=l):l=H[0];let{data:Y,isLoading:Z}=(0,_.f)(l),[Q,J]=(0,N.useState)(null);H[1]!==Y?.harnesses?(r=Y?.harnesses??[],H[1]=Y?.harnesses,H[2]=r):r=H[2];let ee=r;H[3]!==ee||H[4]!==Q?(s=ee.find(e=>e.appId===Q)??ee[0]??null,H[3]=ee,H[4]=Q,H[5]=s):s=H[5];let et=s;H[6]!==Y?.harnesses?(a=Y?.harnesses??[],H[6]=Y?.harnesses,H[7]=a):a=H[7],H[8]!==a?(o=a.flatMap(ei),H[8]=a,H[9]=o):o=H[9];let en=o,es=(0,er.f)(en);H[10]!==es?(m=e=>es(e).author,H[10]=es,H[11]=m):m=H[11];let eo=m;H[12]!==et?.models?(h=et?.models??[],H[12]=et?.models,H[13]=h):h=H[13],H[14]!==B||H[15]!==h?(p=function(e,t){var n;return(n=e.filter(({model:e,points:t})=>"multi-model"!==e&&new Set(t.map(({bucket:e})=>e)).size>=3),n.toSorted((e,n)=>{let l=c(n)-c(e);switch(t){case z.HighestToLowest:return l;case z.LowestToHighest:return-l;default:return t}})).slice(0,50)}(h,B),H[14]=B,H[15]=h,H[16]=p):p=H[16];let ed=p;H[17]!==ed?(f=function(e){let t=e.flatMap(e=>e.points.map(e=>e.medianUsd)).filter(e=>e>0);if(0===t.length)return U;let n=Math.min(...t),l=Math.max(Math.max(...t),10*n),r=[0];for(let e=10**Math.ceil(Math.log10(n));e<=1.0001*l;e*=10)r.push(e);return{linearUsd:n,maxUsd:l,ticks:r}}(ed),H[17]=ed,H[18]=f):f=H[18];let eu=f,em=(0,N.useRef)(null),[eh,ep]=(0,N.useState)(null),[ef,eg]=(0,N.useState)(!1);H[19]!==ed||H[20]!==ef?(g=ef?ed:ed.slice(0,10),H[19]=ed,H[20]=ef,H[21]=g):g=H[21];let ex=g,eb=ed.length-ex.length,ej=et?.appId??null,ey=ed.length>0;if(H[22]!==ej||H[23]!==ey||H[24]!==q?(v=()=>{q(null!==ej&&ey?ej:null)},S=[ej,ey,q],H[22]=ej,H[23]=ey,H[24]=q,H[25]=v,H[26]=S):(v=H[25],S=H[26]),(0,N.useEffect)(v,S),H[27]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{em.current?.scrollTo({top:0})},H[27]=T):T=H[27],H[28]!==B?(M=[B],H[28]=B,H[29]=M):M=H[29],(0,N.useEffect)(T,M),!et){let e;return H[30]!==Z?(e=(0,t.jsx)(ec,{isLoading:Z}),H[30]=Z,H[31]=e):e=H[31],e}H[32]!==K?(A=K("Harness"),H[32]=K,H[33]=A):A=H[33];let ev=String(et.appId);return H[34]!==ee?(P=ee.map(ea),H[34]=ee,H[35]=P):P=H[35],H[36]!==G?(R=e=>{let t=Number(e);J(t),eg(!1),em.current?.scrollTo({top:0}),G.capture("click_session_cost_harness",{app_id:t})},H[36]=G,H[37]=R):R=H[37],H[38]!==A||H[39]!==ev||H[40]!==P||H[41]!==R?(O=(0,t.jsx)(x.f,{ariaLabel:A,activeTab:ev,tabs:P,onTabChange:R}),H[38]=A,H[39]=ev,H[40]=P,H[41]=R,H[42]=O):O=H[42],H[43]!==ed||H[44]!==$||H[45]!==K||H[46]!==et.appId||H[47]!==et.label||H[48]!==eb||H[49]!==eh||H[50]!==ef||H[51]!==Z||H[52]!==W||H[53]!==G||H[54]!==eo||H[55]!==es||H[56]!==eu||H[57]!==ex?(D=0===ed.length?(0,t.jsx)(ec,{isLoading:Z}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,d.f)("flex justify-end text-xs text-muted-foreground",ef&&"lg:pr-20"),children:(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-x-2.5 gap-y-1 min-[375px]:flex-nowrap md:gap-x-4",children:i.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap md:gap-1.5",children:[(0,t.jsx)("span",{className:"size-2 rounded-full bg-(--swatch-color)",style:{"--swatch-color":E[e]},"aria-hidden":!0}),W(V[e])]},e))})}),(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(L.f,{sectionId:C.M,title:K("Cost per session"),filters:[K("Sessions on {harness}",{harness:et.label})],children:(0,t.jsx)(X,{models:ex,scale:eu,resolveModel:es,windowRef:em,onHoverModel:ep,isScrollable:ef})}),eb>0&&(0,t.jsx)("div",{className:"flex justify-center pt-2",children:(0,t.jsx)(u.Button,{variant:"ghost",tone:"subdued",onClick:()=>{eg(!0),G.capture("click_session_cost_show_more",{app_id:et.appId,visible_count:ed.length})},children:(0,t.jsxs)(k.T,{children:["Show ",(0,t.jsx)(w.d,{children:$.number(eb,{preset:"integer"})})," more"]})})})]}),ef&&(0,t.jsx)("div",{className:"hidden w-16 shrink-0 lg:block",children:(0,t.jsx)(el,{models:ed,scale:eu,windowRef:em,resolveAuthor:eo,hoveredModel:eh})})]})]}),H[43]=ed,H[44]=$,H[45]=K,H[46]=et.appId,H[47]=et.label,H[48]=eb,H[49]=eh,H[50]=ef,H[51]=Z,H[52]=W,H[53]=G,H[54]=eo,H[55]=es,H[56]=eu,H[57]=ex,H[58]=D):D=H[58],H[59]!==O||H[60]!==D?(F=(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[O,D]}),H[59]=O,H[60]=D,H[61]=F):F=H[61],F}function ea(e){return{id:String(e.appId),label:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[e.icon&&(0,t.jsx)("span",{"aria-hidden":"true",children:(0,t.jsx)(m.f,{variant:"app",className:"size-4 shrink-0",children:(0,t.jsx)(p.RemoteFavicon,{className:(0,d.f)("size-full",e.icon.className),faviconFor:e.icon.url,curatedIconAppId:e.icon.hasCuratedFaviconUrl?e.appId:void 0,size:64})})}),(0,t.jsx)("span",{children:e.label})]})}}function ei(e){return e.models.map(eo)}function eo(e){return e.model}function ec(e){let l,r=(0,n.c)(2),{isLoading:s}=e;if(s){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(eu,{}),r[0]=e):e=r[0],e}return r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,t.jsx)(k.T,{children:"Not enough agent sessions yet to report cost per session."})}),r[1]=l):l=r[1],l}let ed=Array.from({length:12},(e,t)=>t);function eu(){let e,l,r=(0,n.c)(2);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(g.l,{className:"h-8 w-72"}),r[0]=e):e=r[0],r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(k.T,{children:(0,t.jsxs)("div",{"aria-label":"Loading cost per session rankings",className:"flex flex-col gap-4",role:"status",children:[e,(0,t.jsx)(w.d,{children:ed.map(em)})]})}),r[1]=l):l=r[1],l}function em(e){return(0,t.jsx)(g.l,{className:"h-lh w-full"},e)}function eh(){let e,l,r,s=(0,n.c)(3);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(k.T,{children:"Cost per session"}),s[0]=e):e=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(k.T,{children:"What one coding-agent session typically costs (paid usage), by session length"}),s[1]=l):l=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(A.E,{icon:S.f,title:e,anchorId:C.M,hideSubtitleOnMobile:!0,subtitle:(0,t.jsxs)(t.Fragment,{children:[l," ",(0,t.jsx)(h.InfoTooltip,{hitArea:"padded",icon:M.y,side:M.R,children:(0,t.jsx)(k.T,{children:"Median spend per session over the last 30 days, on a log scale. A session is attributed to a model when that model served at least 80% of its tokens."})})]})}),s[2]=r):r=s[2],r}e.s(["SessionCostSection",0,function(){let e,l,r,s,a,i,o=(0,n.c)(13),c=(0,b.Q)(),[d,u]=(0,N.useState)(F),[m,h]=(0,N.useState)(null);return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(eh,{}),o[0]=e):e=o[0],o[1]!==m||o[2]!==c||o[3]!==d?(l=null!==m&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 md:shrink-0",children:(0,t.jsxs)(f.Select,{value:d,onValueChange:e=>{(0,v.q)(e,z)&&(u(e),c.capture("click_session_cost_sort",{app_id:m,sort:e}))},size:"compact",children:[(0,t.jsx)(f.SelectTrigger,{className:"w-auto",children:(0,t.jsx)(f.SelectValue,{})}),(0,t.jsxs)(f.SelectContent,{align:"end",children:[(0,t.jsx)(f.SelectItem,{value:z.LowestToHighest,children:(0,t.jsx)(k.T,{children:"Lowest → Highest Cost"})}),(0,t.jsx)(f.SelectItem,{value:z.HighestToLowest,children:(0,t.jsx)(k.T,{children:"Highest → Lowest Cost"})})]})]})}),o[1]=m,o[2]=c,o[3]=d,o[4]=l):l=o[4],o[5]!==l?(r=(0,t.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-start md:justify-between md:gap-4",children:[e,l]}),o[5]=l,o[6]=r):r=o[6],o[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(eu,{}),o[7]=s):s=o[7],o[8]!==d?(a=(0,t.jsx)(T.f,{fallback:s,children:(0,t.jsx)(es,{sort:d,onAppIdChange:h})}),o[8]=d,o[9]=a):a=o[9],o[10]!==r||o[11]!==a?(i=(0,t.jsxs)("div",{className:"flex flex-col gap-5","data-testid":"model-rankings-session-cost",children:[r,a]}),o[10]=r,o[11]=a,o[12]=i):i=o[12],i}],398897)},842551,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(328262),r=e.i(670168),s=e.i(535072),a=e.i(138257),i=e.i(199168),o=e.i(618115);e.i(707060);var c=e.i(196991),d=e.i(153746),u=e.i(380991),m=e.i(16043),h=e.i(953584),p=e.i(411240),f=e.i(774294),g=e.i(298975),x=e.i(287314),b=e.i(387086);let j={Spend:"spend",Tokens:"tokens"},y=j.Spend,v={[j.Spend]:(0,b.b)("Share of spend"),[j.Tokens]:(0,b.b)("Share of tokens")};var _=e.i(20376),k=e.i(166672),w=e.i(136562),S=e.i(522396),N=e.i(326e3),T=e.i(647402),I=e.i(894868),M=e.i(651745),C=e.i(202686);function A(e){let l,r,s=(0,n.c)(11),{macroCategories:a,tasks:i,selectedTag:o,onSelectTask:c,resolveLeader:d,metricNoun:u,aspectRatio:m}=e,h=void 0===m?2.8:m;if(s[0]!==h||s[1]!==a||s[2]!==u||s[3]!==d||s[4]!==i){let e=new Map(i.map(L)),n=(0,k.D)(i);l=(0,C.L)({macroCategories:a,tasks:i,width:M.d,height:M.d/h}).map(l=>{let r=(0,_.z)(l.tag),s=e.get(l.tag),a=s?d(s.model):void 0;return{key:l.tag,x:l.x,y:l.y,width:l.width,height:l.height,label:r,background:(0,_.v)(l.macroCategory,n.get(l.tag)??1),leaderAuthor:a?.author,leaderPermaslug:a?.permaslug,leaderIconUri:a?.iconUri,tooltip:a?(0,t.jsx)(P,{label:r,leader:a,leaderShare:s?.share,metricNoun:u}):null}}),s[0]=h,s[1]=a,s[2]=u,s[3]=d,s[4]=i,s[5]=l}else l=s[5];let p=l;return s[6]!==h||s[7]!==c||s[8]!==o||s[9]!==p?(r=(0,t.jsx)(M.c,{tiles:p,aspectRatio:h,selectedKey:o,onSelect:c}),s[6]=h,s[7]=c,s[8]=o,s[9]=p,s[10]=r):r=s[10],r}function L(e){return[e.tag,e.models[0]]}function P(e){let l,r,s,i,o,u,m=(0,n.c)(19),{label:h,leader:p,leaderShare:f,metricNoun:g}=e,x=(0,a.useLocale)();return m[0]!==h?(l=(0,t.jsx)("span",{className:"font-medium text-popover-foreground",children:h}),m[0]=h,m[1]=l):l=m[1],m[2]!==p.author||m[3]!==p.iconUri||m[4]!==p.permaslug?(r=void 0!==p.author&&(0,t.jsx)(I.f,{frame:!0,author:p.author,permaslug:p.permaslug,iconUri:p.iconUri,className:"size-3.5 shrink-0"}),m[2]=p.author,m[3]=p.iconUri,m[4]=p.permaslug,m[5]=r):r=m[5],m[6]!==p.shortName?(s=(0,t.jsx)("span",{children:p.shortName}),m[6]=p.shortName,m[7]=s):s=m[7],m[8]!==f||m[9]!==x||m[10]!==g?(i=void 0!==f&&(0,t.jsxs)("span",{children:[(0,t.jsx)(T.f,{})," ",(0,t.jsxs)(c.T,{children:[(0,t.jsx)(d.d,{children:(0,_.V)(x,f)})," of task ",(0,t.jsx)(d.d,{children:g})]})]}),m[8]=f,m[9]=x,m[10]=g,m[11]=i):i=m[11],m[12]!==r||m[13]!==s||m[14]!==i?(o=(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[r,s,i]}),m[12]=r,m[13]=s,m[14]=i,m[15]=o):o=m[15],m[16]!==l||m[17]!==o?(u=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[l,o]}),m[16]=l,m[17]=o,m[18]=u):u=m[18],u}function R(e){let l,r,a,i,o,c,d,u,m,h,p,f=(0,n.c)(48),{macroCategories:g,tasks:x,selectedTag:b,onSelectTask:j,resolveLeader:y,metricNoun:v}=e,_=(0,s.o)("(min-width: 668px)");f[0]!==g||f[1]!==b||f[2]!==x?(l=x.find(e=>e.tag===b)?.macroCategory??g[0]?.key,f[0]=g,f[1]=b,f[2]=x,f[3]=l):l=f[3];let k=l;if(_){let e;return f[4]!==g||f[5]!==v||f[6]!==j||f[7]!==y||f[8]!==b||f[9]!==x?(e=(0,t.jsx)(A,{macroCategories:g,tasks:x,selectedTag:b,onSelectTask:j,resolveLeader:y,metricNoun:v}),f[4]=g,f[5]=v,f[6]=j,f[7]=y,f[8]=b,f[9]=x,f[10]=e):e=f[10],e}f[11]!==k||f[12]!==g?(r=g.find(e=>e.key===k)??g[0],f[11]=k,f[12]=g,f[13]=r):r=f[13];let w=r;if(!w)return null;if(f[14]!==w.key||f[15]!==b||f[16]!==x){let e;f[19]!==w.key?(e=e=>e.macroCategory===w.key,f[19]=w.key,f[20]=e):e=f[20],i=(a=x.filter(e)).find(e=>e.tag===b)??a[0],f[14]=w.key,f[15]=b,f[16]=x,f[17]=a,f[18]=i}else a=f[17],i=f[18];let T=i,I=w.key;return f[21]!==g||f[22]!==j||f[23]!==x?(o=e=>{let t=g.find(t=>t.key===e);if(!t)return;let[n]=x.filter(e=>e.macroCategory===t.key);n&&j(n.tag)},f[21]=g,f[22]=j,f[23]=x,f[24]=o):o=f[24],f[25]!==g?(c=g.toSorted(E).map(V),f[25]=g,f[26]=c):c=f[26],f[27]!==w.key||f[28]!==o||f[29]!==c?(d=(0,t.jsx)(S.c,{value:I,onValueChange:o,className:"w-full",children:c}),f[27]=w.key,f[28]=o,f[29]=c,f[30]=d):d=f[30],f[31]!==w?(u=[w],f[31]=w,f[32]=u):u=f[32],f[33]!==v||f[34]!==j||f[35]!==a||f[36]!==y||f[37]!==b||f[38]!==u?(m=(0,t.jsx)(A,{macroCategories:u,tasks:a,selectedTag:b,onSelectTask:j,resolveLeader:y,metricNoun:v,aspectRatio:1.4}),f[33]=v,f[34]=j,f[35]=a,f[36]=y,f[37]=b,f[38]=u,f[39]=m):m=f[39],f[40]!==T||f[41]!==j||f[42]!==a?(h=T&&(0,t.jsxs)(N.Select,{value:T.tag,onValueChange:e=>j(e),size:"compact",children:[(0,t.jsx)(N.SelectTrigger,{className:"w-full",children:(0,t.jsx)(N.SelectValue,{children:D})}),(0,t.jsx)(N.SelectContent,{children:a.map(O)})]}),f[40]=T,f[41]=j,f[42]=a,f[43]=h):h=f[43],f[44]!==h||f[45]!==d||f[46]!==m?(p=(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d,m,h]}),f[44]=h,f[45]=d,f[46]=m,f[47]=p):p=f[47],p}function O(e){return(0,t.jsx)(N.SelectItem,{value:e.tag,children:(0,_.z)(e.tag)},e.tag)}function D(e){return(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,t.jsx)(c.T,{children:"Task"})," "]}),null===e?null:(0,_.z)(e)]})}function V(e){return(0,t.jsxs)(S.Y,{value:e.key,className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:(0,w.f)("size-2.5 shrink-0 rounded-sm",_.U[e.key])}),(0,t.jsx)("span",{className:"truncate",children:e.label})]},e.key)}function E(e,t){return t.spendShare-e.spendShare}var z=e.i(598418);function F(e){let l,r,s=(0,n.c)(7),{macroCategories:i}=e,o=(0,a.useLocale)();if(s[0]!==o||s[1]!==i){let e;s[3]!==o?(e=e=>(0,t.jsxs)("li",{className:"flex items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:(0,w.f)("size-2.5 shrink-0 rounded-sm",_.U[e.key])}),(0,t.jsx)("span",{className:"text-muted-foreground",children:e.label}),(0,t.jsx)("span",{className:"tabular-nums text-foreground",children:(0,_.V)(o,e.spendShare)})]},e.key),s[3]=o,s[4]=e):e=s[4],l=i.toSorted(H).map(e),s[0]=o,s[1]=i,s[2]=l}else l=s[2];return s[5]!==l?(r=(0,t.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:l}),s[5]=l,s[6]=r):r=s[6],r}function H(e,t){return t.spendShare-e.spendShare}var U=e.i(988590),B=e.i(919035);let q=[j.Spend,j.Tokens];function $(e){let l,r,s,a,i,o=(0,n.c)(11),{value:c,onChange:d}=e,u=(0,B.f)();return o[0]!==d?(l=e=>{(0,U.q)(e,j)&&d(e)},o[0]=d,o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(N.SelectTrigger,{className:"w-full md:w-36",children:(0,t.jsx)(N.SelectValue,{})}),o[2]=r):r=o[2],o[3]!==u?(s=q.map(e=>(0,t.jsx)(N.SelectItem,{value:e,children:u(v[e])},e)),o[3]=u,o[4]=s):s=o[4],o[5]!==s?(a=(0,t.jsx)(N.SelectContent,{align:"end",children:s}),o[5]=s,o[6]=a):a=o[6],o[7]!==l||o[8]!==a||o[9]!==c?(i=(0,t.jsxs)(N.Select,{value:c,onValueChange:l,size:"compact",children:[r,a]}),o[7]=l,o[8]=a,o[9]=c,o[10]=i):i=o[10],i}var K=e.i(139599),W=e.i(865981);function G(e){var l,r;let c,d,u,h,f,g,b,j,y,w,S,N,T,I,M,C,A,L,P,O=(0,n.c)(67),{metric:D}=e,V=(0,a.useLocale)(),E=(0,i.o)(),H=(0,i.M)(),U=(0,W.f)(D),B=v[D];O[0]!==H||O[1]!==B?(c=H(B),O[0]=H,O[1]=B,O[2]=c):c=O[2];let q=c,[$,G]=(0,m.useState)("");O[3]!==D?(d=(0,p.e)(D),O[3]=D,O[4]=d):d=O[4];let{data:Z,isLoading:J}=(0,o.f)(d);O[5]!==Z?.tasks?(u=Z?.tasks??[],O[5]=Z?.tasks,O[6]=u):u=O[6],O[7]!==u?(h=u.flatMap(Y),O[7]=u,O[8]=h):h=O[8];let X=h,ee=(0,K.f)(X);e:{let e;if(!Z||!$){f=null;break e}O[9]!==Z.tasks||O[10]!==$?(e=Z.tasks.find(e=>e.tag===$)??null,O[9]=Z.tasks,O[10]=$,O[11]=e):e=O[11],f=e}let et=f;O[12]!==Z?(g=Z?(0,k.b)(Z.tasks,Z.macroCategories):null,O[12]=Z,O[13]=g):g=O[13];let en=g;t:{let e,t,n,l;if(!en||0===en.tasks.length){b=null;break t}if(O[14]!==en.macroCategories?([e,...t]=en.macroCategories,O[14]=en.macroCategories,O[15]=e,O[16]=t):(e=O[15],t=O[16]),!e){b=en.tasks[0]??null;break t}if(O[17]!==e||O[18]!==t){for(let l of(n=e,t))l.spendShare>n.spendShare&&(n=l);O[17]=e,O[18]=t,O[19]=n}else n=O[19];if(O[20]!==n||O[21]!==en.tasks){let e;O[23]!==n?(e=e=>e.macroCategory===n.key,O[23]=n,O[24]=e):e=O[24],l=en.tasks.find(e),O[20]=n,O[21]=en.tasks,O[22]=l}else l=O[22];b=l??en.tasks[0]??null}let el=b,er=et??el,es=(0,s.o)("(min-width: 668px)");O[25]!==er?.macroCategory||O[26]!==en?.macroCategories?(j=en?.macroCategories.find(e=>e.key===er?.macroCategory),O[25]=er?.macroCategory,O[26]=en?.macroCategories,O[27]=j):j=O[27];let ea=j;O[28]!==E||O[29]!==V||O[30]!==U?(y=e=>E("{share} of all {noun}",{share:(0,_.V)(V,e),noun:U}),O[28]=E,O[29]=V,O[30]=U,O[31]=y):y=O[31],O[32]!==er||O[33]!==y?(l=er,r=y,w=l?{title:(0,_.z)(l.tag),subtitle:r(l.spendShareOfTotal),models:l.models}:{title:"",subtitle:"",models:[]},O[32]=er,O[33]=y,O[34]=w):w=O[34];let ei=w;if(!en||0===en.tasks.length){let e;return O[35]!==J?(e=(0,t.jsx)(Q,{isLoading:J}),O[35]=J,O[36]=e):e=O[36],e}O[37]!==E?(S=E("Top models by task"),O[37]=E,O[38]=S):S=O[38],O[39]!==ea||O[40]!==es||O[41]!==q?(N=es||!ea?[q]:[q,ea.label],O[39]=ea,O[40]=es,O[41]=q,O[42]=N):N=O[42];let eo=er?.tag??null;return O[43]===Symbol.for("react.memo_cache_sentinel")?(T=e=>G(e),O[43]=T):T=O[43],O[44]!==ee?(I=e=>ee(e),O[44]=ee,O[45]=I):I=O[45],O[46]!==U||O[47]!==eo||O[48]!==I||O[49]!==en.macroCategories||O[50]!==en.tasks?(M=(0,t.jsx)(R,{macroCategories:en.macroCategories,tasks:en.tasks,selectedTag:eo,onSelectTask:T,resolveLeader:I,metricNoun:U}),O[46]=U,O[47]=eo,O[48]=I,O[49]=en.macroCategories,O[50]=en.tasks,O[51]=M):M=O[51],O[52]!==S||O[53]!==N||O[54]!==M?(C=(0,t.jsx)(x.f,{sectionId:"task-spend",title:S,filters:N,children:M}),O[52]=S,O[53]=N,O[54]=M,O[55]=C):C=O[55],O[56]!==en.macroCategories?(A=(0,t.jsx)("div",{className:"hidden min-[668px]:block",children:(0,t.jsx)(F,{macroCategories:en.macroCategories})}),O[56]=en.macroCategories,O[57]=A):A=O[57],O[58]!==ei.models||O[59]!==ei.subtitle||O[60]!==ei.title||O[61]!==ee?(L=(0,t.jsx)(z.f,{title:ei.title,subtitle:ei.subtitle,models:ei.models,resolveModel:ee}),O[58]=ei.models,O[59]=ei.subtitle,O[60]=ei.title,O[61]=ee,O[62]=L):L=O[62],O[63]!==C||O[64]!==A||O[65]!==L?(P=(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[C,A,L]}),O[63]=C,O[64]=A,O[65]=L,O[66]=P):P=O[66],P}function Y(e){return e.models.map(Z)}function Z(e){return e.model}function Q(e){let l,r=(0,n.c)(2),{isLoading:s}=e;if(s){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(X,{}),r[0]=e):e=r[0],e}return r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,t.jsx)(c.T,{children:"Not enough classified usage yet to rank tasks."})}),r[1]=l):l=r[1],l}let J=Array.from({length:10},(e,t)=>t);function X(){let e,l,s,a,i=(0,n.c)(4);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(r.l,{className:"aspect-video max-h-96 w-full min-[668px]:aspect-12/5"}),i[0]=e):e=i[0],i[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)("div",{className:"hidden flex-wrap items-center gap-x-4 gap-y-1 text-xs min-[668px]:flex",children:[(0,t.jsx)(r.l,{className:"h-lh w-24"}),(0,t.jsx)(r.l,{className:"h-lh w-24"}),(0,t.jsx)(r.l,{className:"h-lh w-24"}),(0,t.jsx)(r.l,{className:"h-lh w-24"})]}),i[1]=l):l=i[1],i[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(r.l,{className:"h-lh w-44"}),i[2]=s):s=i[2],i[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(c.T,{children:(0,t.jsxs)("div",{"aria-label":"Loading task rankings",className:"flex flex-col gap-6",role:"status",children:[e,l,(0,t.jsxs)("div",{className:"flex flex-col gap-4 text-xs",children:[s,(0,t.jsx)("div",{className:"grid grid-cols-1 gap-x-10 gap-y-3 md:grid-cols-2",children:(0,t.jsx)(d.d,{children:J.map(ee)})})]})]})}),i[3]=a):a=i[3],a}function ee(e){return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(r.l,{className:"h-lh w-3/4"}),(0,t.jsx)(r.l,{className:"h-lh w-1/2"})]},e)}function et(e){let r,s,a,o,d,m=(0,n.c)(12),{metric:h}=e,p=(0,i.o)(),x=(0,W.f)(void 0===h?y:h);return m[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(c.T,{children:"Top models by task"}),m[0]=r):r=m[0],m[1]!==p||m[2]!==x?(s=p("Each task’s leading models, ranked by share of {noun} on OpenRouter",{noun:x}),m[1]=p,m[2]=x,m[3]=s):s=m[3],m[4]!==p||m[5]!==x?(a=p("Tasks are inferred by a classifier on a representative sample of prompts. Percentages show share of sample-corrected {noun}; deltas compare to the prior window.",{noun:x}),m[4]=p,m[5]=x,m[6]=a):a=m[6],m[7]!==a?(o=(0,t.jsx)(l.InfoTooltip,{hitArea:"padded",icon:f.y,side:f.R,children:a}),m[7]=a,m[8]=o):o=m[8],m[9]!==s||m[10]!==o?(d=(0,t.jsx)(g.E,{icon:u.f,title:r,anchorId:"task-spend",hideSubtitleOnMobile:!0,subtitle:(0,t.jsxs)(t.Fragment,{children:[s," ",o]})}),m[9]=s,m[10]=o,m[11]=d):d=m[11],d}e.s(["TaskSpendSection",0,function(){let e,l,r,s,a=(0,n.c)(8),[i,o]=(0,m.useState)(y);return a[0]!==i?(e=(0,t.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between md:gap-3",children:[(0,t.jsx)(et,{metric:i}),(0,t.jsx)($,{value:i,onChange:o})]}),a[0]=i,a[1]=e):e=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(X,{}),a[2]=l):l=a[2],a[3]!==i?(r=(0,t.jsx)(h.f,{fallback:l,children:(0,t.jsx)(G,{metric:i})}),a[3]=i,a[4]=r):r=a[4],a[5]!==e||a[6]!==r?(s=(0,t.jsxs)("div",{className:"flex flex-col gap-5","data-testid":"model-rankings-task-spend",children:[e,r]}),a[5]=e,a[6]=r,a[7]=s):s=a[7],s}],842551)},930164,e=>{"use strict";var t=e.i(659350),n=e.i(663456),l=e.i(199168),r=e.i(569019),s=e.i(153716),a=e.i(928130),i=e.i(336819),o=e.i(16043),c=e.i(20537),d=e.i(389795),u=e.i(298975);let m={images:s.f,"image-output":a.f,"rerank-documents":r.f,tools:i.f};e.s(["UsageRankingsChart",0,function(e){let r,s,a,i,h,p,f,g,x,b,j=(0,n.c)(38),{config:y}=e,v=(0,l.M)(),_=(0,l.o)(),[k,w]=(0,o.useState)(y.defaultShowPercentage??!0),S=y.shouldMirrorLegendPercentageWithChart?k:void 0,N=m[y.anchorId];j[0]!==y.title||j[1]!==v?(r=v(y.title),j[0]=y.title,j[1]=v,j[2]=r):r=j[2];let T=y.anchorId;j[3]!==y.subtitle||j[4]!==v?(s=v(y.subtitle),j[3]=y.subtitle,j[4]=v,j[5]=s):s=j[5],j[6]!==y.testId||j[7]!==k?(a=(0,t.jsx)(c.f,{checked:k,onCheckedChange:w,dataTestId:y.testId}),j[6]=y.testId,j[7]=k,j[8]=a):a=j[8],j[9]!==y.anchorId||j[10]!==N||j[11]!==r||j[12]!==s||j[13]!==a?(i=(0,t.jsx)(u.E,{icon:N,title:r,anchorId:T,subtitle:s,hideSubtitleOnMobile:!0,controls:a}),j[9]=y.anchorId,j[10]=N,j[11]=r,j[12]=s,j[13]=a,j[14]=i):i=j[14];let I=y.endpoint,M=y.testId,C=y.otherModelsHref,A=y.shouldTrimZeroOnlyRangeEdges,L=y.anchorId;return j[15]!==y.title||j[16]!==v?(h=v(y.title),j[15]=y.title,j[16]=v,j[17]=h):h=j[17],j[18]!==_||j[19]!==k?(p=_(k?"Percentage":"Absolute"),j[18]=_,j[19]=k,j[20]=p):p=j[20],j[21]!==p?(f=[p],j[21]=p,j[22]=f):f=j[22],j[23]!==y.anchorId||j[24]!==h||j[25]!==f?(g={sectionId:L,title:h,filters:f},j[23]=y.anchorId,j[24]=h,j[25]=f,j[26]=g):g=j[26],j[27]!==y.endpoint||j[28]!==y.otherModelsHref||j[29]!==y.shouldTrimZeroOnlyRangeEdges||j[30]!==y.testId||j[31]!==k||j[32]!==S||j[33]!==g?(x=(0,t.jsx)(d.f,{endpoint:I,testId:M,showPercentage:k,showLegendPercentage:S,otherModelsHref:C,shouldTrimZeroOnlyRangeEdges:A,share:g}),j[27]=y.endpoint,j[28]=y.otherModelsHref,j[29]=y.shouldTrimZeroOnlyRangeEdges,j[30]=y.testId,j[31]=k,j[32]=S,j[33]=g,j[34]=x):x=j[34],j[35]!==x||j[36]!==i?(b=(0,t.jsxs)(t.Fragment,{children:[i,x]}),j[35]=x,j[36]=i,j[37]=b):b=j[37],b}])}]); //# sourceMappingURL=3crxsxuw1wliq.js.map