!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a08d90-235f-7043-8ce6-2cac6ee26065")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,858735,e=>{"use strict";var t=e.i(222666),n=e.i(553215),i=e.i(452473),l=e.i(712621);e.i(742593);var r=e.i(571236),a=e.i(394333),o=e.i(379684),s=e.i(980351),c=e.i(252358),d=e.i(779100),u=e.i(635528),m=e.i(784510),p=e.i(706527),g=e.i(238032),f=e.i(586404),h=e.i(619147),x=e.i(749509),b=e.i(270401),v=e.i(505962);let y=b.forwardRef(function({title:e,titleId:t,...n},i){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))});var j=e.i(557225);e.i(358390);var N=e.i(963);function _(e,t){let n=decodeURIComponent(e),i=decodeURIComponent(t);return ni)}function k(e){let t=e.indexOf("/");return{makerSegment:e.slice(0,t),slugSegment:e.slice(t+1)}}function S(e){return{title:e.title,description:e.description,models:e.models.map(e=>({author:e.author,authorIconUri:e.author_icon_uri??null,shortName:e.short_name,variantSlug:(0,p.getModelVariantSlug)(e)}))}}Object.values(N.OutputModality).filter(e=>e!==N.OutputModality.Text);var w=e.i(360951),M=e.i(665155),C=e.i(558200),P=e.i(687421),I=e.i(763392),L=e.i(970654),A=e.i(311520),R=e.i(845961),T=e.i(759024),$=e.i(668832),D=e.i(738286),z=e.i(79247),V=e.i(151960),O=e.i(626824),F=e.i(8842),E=e.i(450740);let B=(0,O.createQueryKeys)("compare",{catalogEndpoint:e=>[e]});var q=e.i(808811),G=e.i(888887);function H(e,t){if(!t)return e;let n=`${t} `;return e.toLowerCase().startsWith(n.toLowerCase())?e.slice(n.length):e}function U(e){let n,l,r,a=(0,v.c)(5),{value:o,onChange:s}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(n={key:"table",label:"Table"},a[0]=n):n=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=[n,{key:"graph",label:"Graph"}],a[1]=l):l=a[1],a[2]!==s||a[3]!==o?(r=(0,t.jsx)("div",{className:"inline-flex items-center rounded-md border border-border p-0.5 text-xs",children:l.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>s(e.key),"aria-pressed":o===e.key,className:(0,i.cn)("cursor-pointer rounded-sm px-2 py-0.5 font-medium transition-colors",o===e.key?"bg-foreground/[0.07] text-foreground":"text-muted-foreground hover:text-foreground"),children:e.label},e.key))}),a[2]=s,a[3]=o,a[4]=r):r=a[4],r}function K(e){let n,l,r,a,s,c,d,u,p=(0,v.c)(20),{providers:g,className:f,variant:h}=e,x=void 0===h?"pill":h,{getProviderInfo:b}=(0,m.useGlobal)(),y=g.length,j=`${y} ${1===y?"provider":"providers"}`;if(p[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("span",{}),p[0]=n):n=p[0],p[1]!==f||p[2]!==x?(l=(0,i.cn)((0,q.pillVariantClass)(x),f),p[1]=f,p[2]=x,p[3]=l):l=p[3],p[4]!==j?(r=(0,t.jsx)("span",{className:"min-w-0 truncate tabular-nums",children:j}),p[4]=j,p[5]=r):r=p[5],p[6]!==l||p[7]!==r?(a=(0,t.jsx)(A.HoverCardTrigger,{render:n,className:l,children:r}),p[6]=l,p[7]=r,p[8]=a):a=p[8],p[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("div",{className:"px-2 pb-1 pt-0.5 text-xs font-semibold text-muted-foreground",children:"Available providers"}),p[9]=s):s=p[9],p[10]!==b||p[11]!==g){let e;p[13]!==b?(e=e=>{let n=b(e),i=n?.name?P.providerSlugMap[n.name]:null,l=n?.displayName??e,r=(0,t.jsxs)(t.Fragment,{children:[n?.icon&&n.name&&(0,t.jsx)(R.ProviderIcon,{frame:!0,providerName:n.name,providerIcon:n.icon,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:l}),i&&(0,t.jsx)(w.ArrowTopRightOnSquareIcon,{className:"size-3.5 shrink-0 text-muted-foreground transition-colors group-hover/prov:text-foreground"})]});return i?(0,t.jsx)(o.TextLink,{href:`/provider/${i}`,target:"_blank",rel:"noreferrer",className:"group/prov flex items-center gap-2 rounded-md px-2 py-1.5 text-sm no-underline hover:bg-muted",children:r},e):(0,t.jsx)("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm",children:r},e)},p[13]=b,p[14]=e):e=p[14],c=g.map(e),p[10]=b,p[11]=g,p[12]=c}else c=p[12];return p[15]!==c?(d=(0,t.jsx)(A.HoverCardContent,{className:"w-56 p-2",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[s,c]})}),p[15]=c,p[16]=d):d=p[16],p[17]!==a||p[18]!==d?(u=(0,t.jsxs)(A.HoverCard,{children:[a,d]}),p[17]=a,p[18]=d,p[19]=u):u=p[19],u}function W(e){let n,l,r,a,o,s,c,d,u,m,f,h,x,b,y,N=(0,v.c)(41),{model:_,onModelChange:k,onRemove:S,isLoading:w,disabledModelSlugs:C,viewTransitionName:P}=e;if(w){let e;return N[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex h-[60px] items-center justify-center",children:(0,t.jsx)($.LoadingDots,{})}),N[0]=e):e=N[0],e}N[1]!==_.author||N[2]!==_.author_display_name||N[3]!==_.short_name?(n=H((0,g.formatModelName)(_.short_name,{keepNote:!0}),_.author_display_name??_.author),N[1]=_.author,N[2]=_.author_display_name,N[3]=_.short_name,N[4]=n):n=N[4];let I=n;N[5]!==P?(l=P?{viewTransitionName:P}:void 0,N[5]=P,N[6]=l):l=N[6],N[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.cn)("group/card relative h-[60px] overflow-hidden rounded-lg border border-border bg-background text-sm transition-all duration-200 ease-out hover:border-foreground/20 hover:bg-foreground/[0.03]"),N[7]=r):r=N[7];let L=_.author;return N[8]!==_?(a=(0,p.getModelVariantPermaslug)(_),N[8]=_,N[9]=a):a=N[9],N[10]!==_.author||N[11]!==_.author_icon_uri||N[12]!==a?(o=(0,t.jsx)("span",{className:"inline-flex size-6 shrink-0 items-center justify-center self-center",children:(0,t.jsx)(j.AuthorIcon,{frame:!0,author:L,permaslug:a,iconUri:_.author_icon_uri,className:"size-6"})}),N[10]=_.author,N[11]=_.author_icon_uri,N[12]=a,N[13]=o):o=N[13],N[14]!==_.short_name?(s=(0,g.formatModelName)(_.short_name,{keepNote:!0}),N[14]=_.short_name,N[15]=s):s=N[15],N[16]!==I||N[17]!==s?(c=(0,t.jsx)("span",{className:"min-w-0 truncate text-sm font-semibold tracking-tight",title:s,children:I}),N[16]=I,N[17]=s,N[18]=c):c=N[18],N[19]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(M.ChevronDownIcon,{className:"size-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/card:text-foreground"}),N[19]=d):d=N[19],N[20]!==c?(u=(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 self-center",children:[c,d]}),N[20]=c,N[21]=u):u=N[21],N[22]!==u||N[23]!==o?(m=(0,t.jsxs)("button",{type:"button","aria-label":"Change model",className:"flex h-[60px] w-full min-w-0 cursor-pointer items-center gap-2 px-2.5 pr-16 text-left",children:[o,u]}),N[22]=u,N[23]=o,N[24]=m):m=N[24],N[25]!==C||N[26]!==_||N[27]!==k||N[28]!==m?(f=(0,t.jsx)(G.ModelSelect,{selected:_,onDone:k,disabledModelSlugs:C,children:m}),N[25]=C,N[26]=_,N[27]=k,N[28]=m,N[29]=f):f=N[29],N[30]!==_?(h=(0,t.jsx)(Y,{model:_}),N[30]=_,N[31]=h):h=N[31],N[32]!==S?(x=S&&(0,t.jsx)(ee,{onRemove:S}),N[32]=S,N[33]=x):x=N[33],N[34]!==h||N[35]!==x?(b=(0,t.jsxs)("div",{className:"absolute right-1.5 top-1/2 z-10 flex -translate-y-1/2 items-center gap-0.5",children:[h,x]}),N[34]=h,N[35]=x,N[36]=b):b=N[36],N[37]!==f||N[38]!==b||N[39]!==l?(y=(0,t.jsxs)("div",{style:l,className:r,children:[f,b]}),N[37]=f,N[38]=b,N[39]=l,N[40]=y):y=N[40],y}function Q(e){let n,i,l,r,a,o,s,c,d,u,m,f,h,x,b,y,N,_,k,S,w=(0,v.c)(48),{model:C,onModelChange:P,onRemove:I,disabledModelSlugs:L}=e;if(w[0]!==L||w[1]!==C||w[2]!==P){let e,x=(0,g.formatModelName)(C.short_name,{keepNote:!0});a="relative rounded-lg border border-border bg-background",n=G.ModelSelect,h=C,l=P,r=L,d="button",u="Change model",m="flex w-full min-w-0 cursor-pointer items-center gap-2.5 p-2.5 pr-10 text-left";let b=C.author;w[16]!==C?(e=(0,p.getModelVariantPermaslug)(C),w[16]=C,w[17]=e):e=w[17],w[18]!==C.author||w[19]!==C.author_icon_uri||w[20]!==e?(f=(0,t.jsx)("span",{className:"inline-flex size-9 shrink-0 items-center justify-center self-center",children:(0,t.jsx)(j.AuthorIcon,{frame:!0,author:b,permaslug:e,iconUri:C.author_icon_uri,className:"size-9"})}),w[18]=C.author,w[19]=C.author_icon_uri,w[20]=e,w[21]=f):f=w[21],c="flex min-w-0 flex-1 items-center gap-1.5 self-center",i="min-w-0 flex-1 truncate text-sm font-semibold text-foreground",o=x,s=H(x,C.author_display_name??C.author),w[0]=L,w[1]=C,w[2]=P,w[3]=n,w[4]=i,w[5]=l,w[6]=r,w[7]=a,w[8]=o,w[9]=s,w[10]=c,w[11]=d,w[12]=u,w[13]=m,w[14]=f,w[15]=h}else n=w[3],i=w[4],l=w[5],r=w[6],a=w[7],o=w[8],s=w[9],c=w[10],d=w[11],u=w[12],m=w[13],f=w[14],h=w[15];return w[22]!==i||w[23]!==o||w[24]!==s?(x=(0,t.jsx)("span",{className:i,title:o,children:s}),w[22]=i,w[23]=o,w[24]=s,w[25]=x):x=w[25],w[26]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(M.ChevronDownIcon,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),w[26]=b):b=w[26],w[27]!==x||w[28]!==c?(y=(0,t.jsxs)("span",{className:c,children:[x,b]}),w[27]=x,w[28]=c,w[29]=y):y=w[29],w[30]!==y||w[31]!==d||w[32]!==u||w[33]!==m||w[34]!==f?(N=(0,t.jsxs)("button",{type:d,"aria-label":u,className:m,children:[f,y]}),w[30]=y,w[31]=d,w[32]=u,w[33]=m,w[34]=f,w[35]=N):N=w[35],w[36]!==n||w[37]!==l||w[38]!==r||w[39]!==N||w[40]!==h?(_=(0,t.jsx)(n,{selected:h,onDone:l,disabledModelSlugs:r,children:N}),w[36]=n,w[37]=l,w[38]=r,w[39]=N,w[40]=h,w[41]=_):_=w[41],w[42]!==I?(k=I&&(0,t.jsx)("div",{className:"absolute right-1.5 top-1/2 z-10 -translate-y-1/2",children:(0,t.jsx)(ee,{onRemove:I})}),w[42]=I,w[43]=k):k=w[43],w[44]!==a||w[45]!==_||w[46]!==k?(S=(0,t.jsxs)("div",{className:a,children:[_,k]}),w[44]=a,w[45]=_,w[46]=k,w[47]=S):S=w[47],S}function Y(e){let n,i,l,r,a,s=(0,v.c)(10),{model:c}=e;s[0]!==c.description?(n=c.description&&(0,t.jsx)(T.InfoTooltip,{side:"bottom",align:"end",contentClassName:"w-80 max-h-96 overflow-y-auto",children:(0,t.jsx)(I.MarkdownContainer,{className:"text-xs text-muted-foreground",children:c.description})}),s[0]=c.description,s[1]=n):n=s[1],s[2]!==c?(i=(0,p.getModelVariantSlug)(c),s[2]=c,s[3]=i):i=s[3];let d=`/${i}`;return s[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(w.ArrowTopRightOnSquareIcon,{className:"size-3.5"}),s[4]=l):l=s[4],s[5]!==d?(r=(0,t.jsx)(o.TextLink,{href:d,target:"_blank",rel:"noreferrer","aria-label":"Go to model details",title:"Go to model (opens in new tab)",className:"flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground no-underline hover:bg-foreground/[0.06] hover:text-foreground",children:l}),s[5]=d,s[6]=r):r=s[6],s[7]!==n||s[8]!==r?(a=(0,t.jsxs)("span",{role:"presentation",className:"flex shrink-0 items-center gap-0.5",onPointerDown:J,onClick:X,onKeyDown:Z,children:[n,r]}),s[7]=n,s[8]=r,s[9]=a):a=s[9],a}function Z(e){return e.stopPropagation()}function X(e){return e.stopPropagation()}function J(e){return e.stopPropagation()}function ee(e){let n,i,l,r=(0,v.c)(5),{onRemove:a}=e;return r[0]!==a?(n=e=>{e.stopPropagation(),a()},r[0]=a,r[1]=n):n=r[1],r[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(C.XMarkIcon,{className:"size-3.5"}),r[2]=i):i=r[2],r[3]!==n?(l=(0,t.jsx)("button",{type:"button",onClick:n,onPointerDown:et,"aria-label":"Remove model",className:"flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground",children:i}),r[3]=n,r[4]=l):l=r[4],l}function et(e){e.stopPropagation()}function en({model:e,onModelChange:n,onUserSelection:l,endpointData:r}){var a;let{availableProviders:o,providerInfoMap:s,isLoading:c}=r,[{selectedProvider:d,selectionNonce:u},m]=(0,b.useState)({selectedProvider:null,selectionNonce:0}),p=(0,b.useRef)(null),g=(0,b.useRef)(null),f=p.current===d&&g.current===u?null:d,{data:h}=(0,z.useQuery)((a=f?{permaslug:e.permaslug,provider:f,variant:e.endpoint?.variant}:null,(0,F.queryOptions)({queryKey:B.catalogEndpoint(a),queryFn:null===a?E.skipToken:({signal:e})=>(0,V.fetchAPIQuery)("/api/frontend/v1/catalog/endpoint",{searchParams:{permaslug:a.permaslug,provider:a.provider,variant:a.variant},signal:e})})));if((0,b.useEffect)(()=>{h&&d&&g.current!==u&&d!==e.endpoint?.provider_info.name&&(p.current=d,g.current=u,n({...e,endpoint:h}))},[e,n,h,d,u]),c)return(0,t.jsx)(L.Badge,{children:(0,t.jsx)($.LoadingDots,{})});let x=o.length<2,v=0===o.length;return(0,t.jsxs)(D.Select,{disabled:x,value:e.endpoint?.provider_info.name,onValueChange:e=>{l(),p.current=null,g.current=null,m(t=>({selectedProvider:e,selectionNonce:t.selectionNonce+1}))},size:"compact",children:[(0,t.jsx)(D.SelectTrigger,{className:(0,i.cn)("w-full min-w-0",x&&"border-transparent disabled:cursor-default disabled:bg-muted/60"),children:(0,t.jsx)(D.SelectValue,{placeholder:v?"No provider":"Change provider",children:e.endpoint&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(R.ProviderIcon,{frame:!0,providerName:e.endpoint.provider_info.name,providerIcon:e.endpoint.provider_info.icon,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:e.endpoint.provider_info.displayName})]})})}),(0,t.jsx)(D.SelectContent,{className:"z-[80]",children:o.map(e=>{let n=s.get(e);return n?(0,t.jsx)(D.SelectItem,{value:e,children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(R.ProviderIcon,{frame:!0,providerName:e,providerIcon:n.icon,className:"mr-2 size-5"}),n?.displayName??e]})},e):null})})]})}function ei(e){let n,l,r=(0,v.c)(6),{models:a}=e;if(r[0]!==a){let e;r[2]!==a.length?(e=(e,n)=>(0,t.jsxs)(b.Fragment,{children:[(0,t.jsx)("span",{className:(0,i.cn)("block size-7 shrink-0 transition-[margin] duration-300 ease-out",0!==n&&"-ml-2 group-hover/preset:ml-0"),children:(0,t.jsx)(j.AuthorIcon,{author:e.author,iconUri:e.authorIconUri,className:"size-7 shrink-0"})}),n_(t(e),t(n)))}function er(e){let l,r,a,s,d,u,m,p,f,h,x,b,y,j=(0,v.c)(30),{preset:N,onPick:S}=e,w=(0,c.usePosthogClient)();if(j[0]!==N.description||j[1]!==N.models){let e;e=[...(d=(r=el(N.models,eo)).map(ea)).map(k)].sort((e,t)=>_(`${e.makerSegment}/${e.slugSegment}`,`${t.makerSegment}/${t.slugSegment}`)),l=`/compare/${e.map(({makerSegment:e,slugSegment:t})=>`${e}/${t}`).join("/")}`,s=N.description,a=r.map(e=>(0,g.formatModelName)(e.shortName,{keepNote:!0})).join(" · "),j[0]=N.description,j[1]=N.models,j[2]=l,j[3]=r,j[4]=a,j[5]=s,j[6]=d}else l=j[2],r=j[3],a=j[4],s=j[5],d=j[6];let M=a;j[7]!==S||j[8]!==w||j[9]!==N.title||j[10]!==d?(u=e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button||(w.capture(n.PostHogEvent.CompareClickPreset,{preset_title:N.title,model_slugs:d}),S&&(e.preventDefault(),S()))},j[7]=S,j[8]=w,j[9]=N.title,j[10]=d,j[11]=u):u=j[11];let C=u;return j[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.cn)("group/preset flex h-full flex-col gap-2 rounded-lg p-3","border border-border bg-foreground/[0.02] no-underline transition-colors","hover:border-border hover:bg-foreground/[0.04]"),j[12]=m):m=j[12],j[13]!==r?(p=(0,t.jsx)("div",{className:"flex items-start gap-3",children:(0,t.jsx)(ei,{models:r})}),j[13]=r,j[14]=p):p=j[14],j[15]!==N.title?(f=(0,t.jsx)("h4",{className:"text-sm font-semibold tracking-tight text-foreground",children:N.title}),j[15]=N.title,j[16]=f):f=j[16],j[17]!==s?(h=s&&(0,t.jsx)("p",{className:"text-xs leading-snug text-muted-foreground",children:s}),j[17]=s,j[18]=h):h=j[18],j[19]!==f||j[20]!==h?(x=(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[f,h]}),j[19]=f,j[20]=h,j[21]=x):x=j[21],j[22]!==M?(b=(0,t.jsx)("div",{"data-slot":"compare-preset-models",className:"mt-auto truncate border-t border-border pt-2 text-xs leading-snug text-muted-foreground",title:M,children:M}),j[22]=M,j[23]=b):b=j[23],j[24]!==C||j[25]!==l||j[26]!==p||j[27]!==x||j[28]!==b?(y=(0,t.jsxs)(o.TextLink,{href:l,onClick:C,className:m,children:[p,x,b]}),j[24]=C,j[25]=l,j[26]=p,j[27]=x,j[28]=b,j[29]=y):y=j[29],y}function ea(e){return e.variantSlug}function eo(e){return e.variantSlug}function es(e){let n,l,r,a,o,s,c=(0,v.c)(21),{onPick:d,onClear:u,ariaLabel:m,disabledModelSlugs:p,viewTransitionName:g,selected:f}=e;if(f){let e,n;return c[0]!==d?(e=e=>{e&&d(e)},c[0]=d,c[1]=e):e=c[1],c[2]!==p||c[3]!==u||c[4]!==f||c[5]!==e||c[6]!==g?(n=(0,t.jsx)(W,{model:f,onModelChange:e,onRemove:u,disabledModelSlugs:p,viewTransitionName:g}),c[2]=p,c[3]=u,c[4]=f,c[5]=e,c[6]=g,c[7]=n):n=c[7],n}let h=g?`${g}-trigger`:void 0;return c[8]!==g?(n=g?{viewTransitionName:g}:void 0,c[8]=g,c[9]=n):n=c[9],c[10]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.cn)("group/slot cursor-pointer overflow-hidden transition-all duration-200 ease-out","flex h-[60px] w-full flex-row items-center justify-center gap-2 rounded-lg","border border-dashed border-border bg-foreground/[0.02] text-muted-foreground","hover:border-primary hover:bg-foreground/[0.04] hover:text-primary"),r=(0,t.jsx)("span",{className:(0,i.cn)("flex size-6 items-center justify-center rounded-full","bg-foreground/[0.04] ring-1 ring-border","transition-colors group-hover/slot:ring-primary/40"),children:(0,t.jsx)(y,{className:"size-3.5"})}),a=(0,t.jsx)("span",{className:"text-sm font-medium",children:"Select a model"}),c[10]=l,c[11]=r,c[12]=a):(l=c[10],r=c[11],a=c[12]),c[13]!==m||c[14]!==h||c[15]!==n?(o=(0,t.jsxs)("button",{id:h,type:"button","aria-label":m,style:n,className:l,children:[r,a]}),c[13]=m,c[14]=h,c[15]=n,c[16]=o):o=c[16],c[17]!==p||c[18]!==d||c[19]!==o?(s=(0,t.jsx)(G.ModelSelect,{isDialog:!0,onDone:d,disabledModelSlugs:p,children:o}),c[17]=p,c[18]=d,c[19]=o,c[20]=s):s=c[20],s}function ec(e){let n,i,l,r,a,o,s,c,d,u,m,g,f,h=(0,v.c)(42),{comparePresets:x,initialResolvedPresets:b,shouldUseLivePresets:y,picks:j,onPickSlot:N,onClearSlot:_,onPickPreset:k}=e;if(h[0]!==x||h[1]!==b||h[2]!==k||h[3]!==j[0]||h[4]!==j[1]||h[5]!==y){let e,o,s=x.map(S),c=0===b.length?s:[...b,...y?s.filter(e=>!b.some(t=>t.title===e.title)):[]];h[11]!==j[1]?(e=j[1]?[(0,p.getModelVariantSlug)(j[1])]:void 0,h[11]=j[1],h[12]=e):e=h[12],n=e,h[13]!==j[0]?(o=j[0]?[(0,p.getModelVariantSlug)(j[0])]:void 0,h[13]=j[0],h[14]=o):o=h[14],i=o,l="flex flex-col gap-6 md:gap-8",h[15]===Symbol.for("react.memo_cache_sentinel")?(r={viewTransitionName:"compare-empty-shell"},h[15]=r):r=h[15],a=c.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:c.slice(0,4).map(e=>{let n=y&&x.find(t=>t.title===e.title&&t.models.length===e.models.length&&t.models.every((t,n)=>(0,p.getModelVariantSlug)(t)===e.models[n]?.variantSlug));return(0,t.jsx)(er,{preset:e,onPick:n?()=>k(el(n.models,p.getModelVariantSlug)):void 0},e.title)})}),h[0]=x,h[1]=b,h[2]=k,h[3]=j[0],h[4]=j[1],h[5]=y,h[6]=n,h[7]=i,h[8]=l,h[9]=r,h[10]=a}else n=h[6],i=h[7],l=h[8],r=h[9],a=h[10];return h[16]!==N?(o=e=>N(0,e),h[16]=N,h[17]=o):o=h[17],h[18]!==_?(s=()=>_(0),h[18]=_,h[19]=s):s=h[19],h[20]!==n||h[21]!==j[0]||h[22]!==o||h[23]!==s?(c=(0,t.jsx)(es,{ariaLabel:"Add first model to compare",onPick:o,onClear:s,selected:j[0],disabledModelSlugs:n,viewTransitionName:"compare-slot-0"}),h[20]=n,h[21]=j[0],h[22]=o,h[23]=s,h[24]=c):c=h[24],h[25]!==N?(d=e=>N(1,e),h[25]=N,h[26]=d):d=h[26],h[27]!==_?(u=()=>_(1),h[27]=_,h[28]=u):u=h[28],h[29]!==i||h[30]!==j[1]||h[31]!==d||h[32]!==u?(m=(0,t.jsx)(es,{ariaLabel:"Add second model to compare",onPick:d,onClear:u,selected:j[1],disabledModelSlugs:i,viewTransitionName:"compare-slot-1"}),h[29]=i,h[30]=j[1],h[31]=d,h[32]=u,h[33]=m):m=h[33],h[34]!==c||h[35]!==m?(g=(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[c,m]}),h[34]=c,h[35]=m,h[36]=g):g=h[36],h[37]!==l||h[38]!==g||h[39]!==r||h[40]!==a?(f=(0,t.jsxs)("div",{className:l,style:r,children:[a,g]}),h[37]=l,h[38]=g,h[39]=r,h[40]=a,h[41]=f):f=h[41],f}var ed=e.i(543092),eu=e.i(268097),em=e.i(704355),ep=e.i(62380);function eg(e,t,n){if(!t||!n)return;let i=`${decodeURIComponent(t)}/${decodeURIComponent(n)}`;return e.find(e=>(0,p.getModelVariantSlug)(e)===i)}function ef(e){return{makerId:eh(e.makerId),slug:eh(e.slug),compareMakerId:eh(e.compareMakerId),compareSlug:eh(e.compareSlug),compareMakerId2:eh(e.compareMakerId2),compareSlug2:eh(e.compareSlug2),compareMakerId3:eh(e.compareMakerId3),compareSlug3:eh(e.compareSlug3),compareMakerId4:eh(e.compareMakerId4),compareSlug4:eh(e.compareSlug4)}}function eh(e){return void 0===e?void 0:decodeURIComponent(e)}function ex(...e){let[t,...n]=e;if(!t)return"/compare";let i=`/compare/${(0,p.getModelVariantSlug)(t)}`;for(let e of n)e&&(i+=`/${(0,p.getModelVariantSlug)(e)}`);return i}let eb=[["[maker-id]","[slug]"],["[compare-maker-id]","[compare-slug]"],["[compare-maker-id-2]","[compare-slug-2]"],["[compare-maker-id-3]","[compare-slug-3]"],["[compare-maker-id-4]","[compare-slug-4]"]];function ev(e){return[e.makerId,e.slug,e.compareMakerId,e.compareSlug,e.compareMakerId2,e.compareSlug2,e.compareMakerId3,e.compareSlug3,e.compareMakerId4,e.compareSlug4].map(e=>e??"").join("|")}let ey=eb.length;function ej(e){return eN(e.filter(e=>void 0!==e).map(p.getModelVariantSlug))}function eN(e){return Array.from({length:ey},(t,n)=>e[n]).flatMap(e_).join("|")}function e_(e){if(void 0===e)return["",""];let t=e.indexOf("/");return -1===t?[e,""]:[e.slice(0,t),e.slice(t+1)]}em.SUPPORTED_LOCALES;var ek=e.i(581603),eS=e.i(616384),ew=e.i(917961);let eM={Image:N.OutputModality.Image,Speech:N.OutputModality.TTS,Text:N.OutputModality.Text,Video:N.OutputModality.Video},eC=["max-output-tokens","quantization","tool-use","caching","throughput","latency","visualize-performance"],eP={[eM.Text]:{hideRows:new Set},[eM.Image]:{hideRows:new Set(eC)},[eM.Speech]:{hideRows:new Set(eC)},[eM.Video]:{hideRows:new Set(eC)}};function eI(e){return 0===e.length?eM.Text:e.every(e=>e.output_modalities.includes(N.OutputModality.Image))?eM.Image:e.every(e=>e.output_modalities.includes(N.OutputModality.Video))?eM.Video:e.every(e=>e.output_modalities.includes(N.OutputModality.TTS))?eM.Speech:eM.Text}function eL(e,t){return eI(e)===t&&e.every(e=>!e.output_modalities.includes(N.OutputModality.Text))}function eA(e){return eL(e,eM.Image)}function eR(e){return eL(e,eM.Video)}function eT(e){return eL(e,eM.Speech)}let e$=["throughput","latency","visualize-performance"];var eD=e.i(370066),ez=e.i(690387);function eV(e,t){let n=eF(e,t.contextLength);return n?`${t.name}, from ${t.authorName}, has a ${n}-token context window and is ${eq(e,t)} on OpenRouter.`:`${t.name}, from ${t.authorName}, is ${eq(e,t)} on OpenRouter.`}function eO(e,t){let n=eF(e,t.contextLength);return n?`${n} tokens`:"Not published"}function eF(e,t){return!Number.isFinite(t)||t<=0?null:(0,eD.formatNumber)(t,{locale:e,preset:"integer"})??"—"}function eE(e,t){let n=t.endpoint?.display_pricing??[];if((0,ez.isModelFree)(t.endpoint,n))return{kind:"free"};let i=(0,ez.deriveEndpointInlinePricing)(e,t.endpoint,n);if(!i)return{kind:"varies"};let l="custom"===i.kind?(0,ez.joinPriceAndUnit)(i.priceOnly,i.unit):`${(0,ez.joinPriceAndUnit)(`${i.inputPrice}`,i.inputUnit)} input, ${(0,ez.joinPriceAndUnit)(`${i.outputPrice}`,i.outputUnit)} output`;return l.startsWith("from ")?{kind:"from",text:l}:{kind:"fixed",text:l}}function eB(e,t){let n=eE(e,t);switch(n.kind){case"free":return"Free";case"varies":return"Pricing varies by provider";case"from":case"fixed":return n.text;default:return n}}function eq(e,t){let n=eE(e,t);switch(n.kind){case"free":return"free to use";case"varies":return"priced by the provider serving it";case"from":return`priced ${n.text}`;case"fixed":return`priced at ${n.text}`;default:return n}}var eG=e.i(435954),eH=e.i(913998),eU=e.i(648156),eK=e.i(288027),eW=e.i(193975),eQ=e.i(190557),eY=e.i(30023),eZ=e.i(746751),eX=e.i(505987),eJ=e.i(969949),e0=e.i(890136),e1=e.i(218812),e2=e.i(334471),e3=e.i(353287),e5=e.i(913767),e4=e.i(12266);let e8=new Set(["Input Price","Output Price","Cache Read"]),e6=new Set(["Text Input"]);function e7(e){let t=new Set,n=e.find(e=>"Input Price"===e.sku_label);return e.flatMap(e=>{if(e.kind===e4.DisplayPricingKind.Schedule||e8.has(e.sku_label)||e6.has(e.sku_label)&&void 0!==n&&(0,eK.bn)(n.price).eq(e.price)&&n.displayMultiplier===e.displayMultiplier&&n.unitLabel===e.unitLabel)return[];let i=e.sku_label.trim().toLowerCase();return t.has(i)?[]:(t.add(i),[{...e,key:i}])})}function e9(e,t){return(0,f.isDefinedAndNotNull)(e)&&te(e,t)}function te(e,t){let n=t.length>0&&t.every(e=>e===N.OutputModality.Image||e===N.OutputModality.Video);return null==e||!(0,eK.bn)(e).isZero()||!n}function tt(e){let t=e.tiers?.filter(e=>(0,eK.bn)(e.price).gt(0))??[];if(0===t.length)return e;let n=[e,...t].toSorted((e,t)=>(0,eK.bn)(e.price).lt(t.price)?-1:+!!(0,eK.bn)(e.price).gt(t.price))[0];return n?{...e,price:n.price}:e}function tn(e){return e.startsWith("/")?e:`/ ${e}`}var ti=e.i(62327),tl=e.i(968835),tr=e.i(392653),ta=e.i(130206),to=e.i(61291),ts=e.i(988855),tc=e.i(974558);function td({slug:e,displayName:t,s:n}){return{aa_id:e,aa_slug:e,aa_name:t,permaslug:e,openrouter_slug:e,heuristic_openrouter_slug:e,benchmark_data:{model_type:tl.ModelType.Llm,evaluations:{artificial_analysis_intelligence_index:n.intelligence,artificial_analysis_coding_index:n.coding,artificial_analysis_agentic_index:n.agentic}},last_updated_at:173e10,percentiles:{intelligence_percentile:n.intelligencePct,coding_percentile:n.codingPct,agentic_percentile:n.agenticPct}}}td({slug:"anthropic/claude-sonnet-4.5",displayName:"Claude Sonnet 4.5",s:{intelligence:72,coding:78,agentic:70,intelligencePct:92,codingPct:96,agenticPct:90}}),td({slug:"openai/gpt-5",displayName:"GPT-5",s:{intelligence:75,coding:74,agentic:73,intelligencePct:95,codingPct:91,agenticPct:94}}),td({slug:"openai/gpt-5",displayName:"GPT-5 (Thinking)",s:{intelligence:82,coding:81,agentic:80,intelligencePct:98,codingPct:97,agenticPct:97}}),td({slug:"google/gemini-2.5-pro",displayName:"Gemini 2.5 Pro",s:{intelligence:68,coding:65,agentic:60,intelligencePct:86,codingPct:79,agenticPct:70}}),td({slug:"google/gemini-2.5-pro",displayName:"Gemini 2.5 Pro (Deep Think)",s:{intelligence:77,coding:73,agentic:71,intelligencePct:95,codingPct:90,agenticPct:89}}),td({slug:"openai/gpt-4o-mini",displayName:"GPT-4o mini",s:{intelligence:50,coding:48,agentic:42,intelligencePct:55,codingPct:50,agenticPct:45}}),td({slug:"anthropic/claude-haiku-4.5",displayName:"Claude Haiku 4.5",s:{intelligence:60,coding:64,agentic:58,intelligencePct:75,codingPct:80,agenticPct:72}}),td({slug:"google/gemini-2.5-flash-lite",displayName:"Gemini 2.5 Flash Lite",s:{intelligence:45,coding:42,agentic:38,intelligencePct:48,codingPct:42,agenticPct:38}}),td({slug:"anthropic/claude-opus-4.7",displayName:"Claude Opus 4.7",s:{intelligence:80,coding:84,agentic:79,intelligencePct:97,codingPct:99,agenticPct:96}}),td({slug:"anthropic/claude-opus-4.7",displayName:"Claude Opus 4.7 (Extended Thinking)",s:{intelligence:86,coding:89,agentic:85,intelligencePct:99,codingPct:99,agenticPct:98}}),td({slug:"anthropic/claude-opus-4",displayName:"Claude Opus 4",s:{intelligence:73,coding:79,agentic:72,intelligencePct:93,codingPct:95,agenticPct:91}}),td({slug:"anthropic/claude-opus-4",displayName:"Claude Opus 4 (Extended Thinking)",s:{intelligence:81,coding:85,agentic:80,intelligencePct:97,codingPct:98,agenticPct:96}}),td({slug:"openai/gpt-5.5",displayName:"GPT-5.5",s:{intelligence:79,coding:80,agentic:78,intelligencePct:96,codingPct:96,agenticPct:95}}),td({slug:"openai/gpt-5.5",displayName:"GPT-5.5 (Thinking)",s:{intelligence:85,coding:87,agentic:84,intelligencePct:99,codingPct:99,agenticPct:99}}),td({slug:"x-ai/grok-4.20",displayName:"Grok 4.20",s:{intelligence:71,coding:67,agentic:65,intelligencePct:89,codingPct:85,agenticPct:81}}),td({slug:"deepseek/deepseek-chat-v3.1",displayName:"DeepSeek v3.1",s:{intelligence:70,coding:68,agentic:62,intelligencePct:88,codingPct:86,agenticPct:76}}),td({slug:"meta-llama/llama-3.3-70b-instruct",displayName:"Llama 3.3 70B",s:{intelligence:58,coding:56,agentic:52,intelligencePct:70,codingPct:66,agenticPct:58}}),td({slug:"qwen/qwen3-coder",displayName:"Qwen3 Coder",s:{intelligence:62,coding:75,agentic:58,intelligencePct:78,codingPct:93,agenticPct:70}}),td({slug:"mistralai/mistral-large-2",displayName:"Mistral Large 2",s:{intelligence:54,coding:52,agentic:48,intelligencePct:62,codingPct:60,agenticPct:52}}),td({slug:"moonshotai/kimi-k2",displayName:"Kimi K2",s:{intelligence:66,coding:64,agentic:60,intelligencePct:82,codingPct:78,agenticPct:74}});let tu=["3d","codecategories","dataviz","gamedev","image","svg","uicomponent","logo","slides"];function tm({modelId:e,displayName:t,category:n,elo:i,percentile:l}){return{da_model_id:e,display_name:t,provider:"openrouter",openrouter_id:e,permaslug:e,arena:"models",category:n,elo:i,win_rate:l/100,avg_generation_time_ms:1500,last_updated_at:173e10,elo_percentile:l,first_place:null,second_place:null,third_place:null,fourth_place:null,total_tournaments:null}}function tp({modelId:e,displayName:t,scores:n}){return tu.flatMap(i=>{let l=n[i];if(!l)return[];let[r,a]=l;return[tm({modelId:e,displayName:t,category:i,elo:r,percentile:a})]})}tp({modelId:"anthropic/claude-sonnet-4.5",displayName:"Claude Sonnet 4.5",scores:{"3d":[1315,89],codecategories:[1338,95],dataviz:[1273,82],gamedev:[1352,97],image:[1247,83],svg:[1246,84],uicomponent:[1359,97],logo:[1293,94],slides:[1338,97]}}),tp({modelId:"openai/gpt-5",displayName:"GPT-5",scores:{"3d":[1283,78],codecategories:[1315,92],dataviz:[1272,81],gamedev:[1362,99],image:[1192,60],svg:[1218,70],uicomponent:[1308,87],logo:[1381,98],slides:[1308,92]}}),tp({modelId:"google/gemini-2.5-pro",displayName:"Gemini 2.5 Pro",scores:{"3d":[1172,46],codecategories:[1212,54],dataviz:[1296,89],gamedev:[1189,45],image:[1198,65],svg:[1232,75],uicomponent:[1207,49],logo:[1188,50],slides:[1218,54]}}),tp({modelId:"openai/gpt-4o-mini",displayName:"GPT-4o mini",scores:{"3d":[1165,42],codecategories:[1198,50],dataviz:[1182,48],gamedev:[1170,40],image:[1140,35],svg:[1175,44],uicomponent:[1195,47],logo:[1180,45],slides:[1190,49]}}),tp({modelId:"anthropic/claude-haiku-4.5",displayName:"Claude Haiku 4.5",scores:{"3d":[1240,72],codecategories:[1268,80],dataviz:[1255,76],gamedev:[1248,75],image:[1230,70],svg:[1252,78],uicomponent:[1278,82],logo:[1262,79],slides:[1265,81]}}),tp({modelId:"google/gemini-2.5-flash-lite",displayName:"Gemini 2.5 Flash Lite",scores:{"3d":[1135,32],codecategories:[1158,38],dataviz:[1148,36],gamedev:[1142,34],image:[1162,40],svg:[1155,37],uicomponent:[1145,35],logo:[1150,36],slides:[1160,39]}}),tp({modelId:"anthropic/claude-opus-4.7",displayName:"Claude Opus 4.7",scores:{"3d":[1342,94],codecategories:[1368,98],dataviz:[1305,90],gamedev:[1378,99],image:[1268,88],svg:[1278,90],uicomponent:[1395,99],logo:[1320,96],slides:[1365,98]}}),[...tp({modelId:"openai/gpt-5.5",displayName:"GPT-5.5",scores:{"3d":[1310,87],codecategories:[1342,96],dataviz:[1298,88],gamedev:[1385,99],image:[1218,72],svg:[1248,82],uicomponent:[1338,94],logo:[1402,99],slides:[1335,96]}}),...tp({modelId:"openai/gpt-5.5",displayName:"GPT-5.5 (Thinking)",scores:{"3d":[1352,93],codecategories:[1388,99],dataviz:[1335,94],gamedev:[1418,99],image:[1258,82],svg:[1295,91],uicomponent:[1382,98],logo:[1442,99],slides:[1378,99]}})],tp({modelId:"x-ai/grok-4.20",displayName:"Grok 4.20",scores:{"3d":[1280,82],codecategories:[1325,92],dataviz:[1268,80],gamedev:[1310,90],image:[1232,75],svg:[1252,82],uicomponent:[1295,88],logo:[1338,96],slides:[1288,85]}}),tp({modelId:"deepseek/deepseek-chat-v3.1",displayName:"DeepSeek v3.1",scores:{"3d":[1255,78],codecategories:[1318,90],dataviz:[1252,76],gamedev:[1278,82],image:[1198,62],svg:[1228,72],uicomponent:[1262,78],logo:[1282,84],slides:[1265,80]}}),tp({modelId:"meta-llama/llama-3.3-70b-instruct",displayName:"Llama 3.3 70B",scores:{"3d":[1188,58],codecategories:[1242,72],dataviz:[1198,62],gamedev:[1218,68],image:[1152,45],svg:[1175,52],uicomponent:[1212,65],logo:[1218,66],slides:[1198,60]}}),tp({modelId:"qwen/qwen3-coder",displayName:"Qwen3 Coder",scores:{"3d":[1218,66],codecategories:[1352,96],dataviz:[1265,80],gamedev:[1245,72],image:[1175,50],svg:[1235,75],uicomponent:[1278,82],logo:[1242,72],slides:[1232,72]}}),tp({modelId:"mistralai/mistral-large-2",displayName:"Mistral Large 2",scores:{"3d":[1145,42],codecategories:[1208,62],dataviz:[1162,48],gamedev:[1188,55],image:[1118,35],svg:[1138,40],uicomponent:[1172,52],logo:[1192,58],slides:[1162,48]}}),tp({modelId:"moonshotai/kimi-k2",displayName:"Kimi K2",scores:{"3d":[1232,72],codecategories:[1278,82],dataviz:[1228,70],gamedev:[1262,78],image:[1188,58],svg:[1208,65],uicomponent:[1252,76],logo:[1262,78],slides:[1228,72]}}),tm({modelId:"sourceful/riverflow-v2.5-pro",displayName:"Riverflow V2.5 Pro",category:"graphicdesign",elo:1471,percentile:93}),tm({modelId:"sourceful/riverflow-v2.5-pro",displayName:"Riverflow V2.5 Pro",category:"image",elo:1406,percentile:93}),tm({modelId:"sourceful/riverflow-v2.5-pro",displayName:"Riverflow V2.5 Pro",category:"imagetoimage",elo:1373,percentile:88}),tm({modelId:"sourceful/riverflow-v2.5-pro",displayName:"Riverflow V2.5 Pro",category:"logo",elo:1308,percentile:93});var tg=e.i(626524);function tf(e,t){let n,i,l,r,a=(0,v.c)(10);a[0]!==e?(n=(0,tg.artificialAnalysisBenchmarksOptions)(e),a[0]=e,a[1]=n):n=a[1];let{data:o,isLoading:s}=(0,z.useQuery)(n);a[2]!==o?(i=o??[],a[2]=o,a[3]=i):i=a[3];let c=i,d=t??e;a[4]!==d||a[5]!==c.length?(l=[],a[4]=d,a[5]=c.length,a[6]=l):l=a[6];let u=l,m=0===c.length&&u.length>0?u:c,p=!s&&void 0!==o;return a[7]!==m||a[8]!==p?(r={benchmarkList:m,isAALoaded:p},a[7]=m,a[8]=p,a[9]=r):r=a[9],r}function th(e,t){let n,i,l,r,a=(0,v.c)(10);a[0]!==e?(n=(0,tg.designArenaBenchmarksOptions)(e),a[0]=e,a[1]=n):n=a[1];let{data:o,isLoading:s}=(0,z.useQuery)(n);a[2]!==o?.records?(i=o?.records??[],a[2]=o?.records,a[3]=i):i=a[3];let c=i,d=t??e;a[4]!==d||a[5]!==c.length?(l=[],a[4]=d,a[5]=c.length,a[6]=l):l=a[6];let u=l,m=0===c.length&&u.length>0?u:c,p=!s&&void 0!==o;return a[7]!==m||a[8]!==p?(r={daRecordList:m,isDALoaded:p},a[7]=m,a[8]=p,a[9]=r):r=a[9],r}let tx={green:"text-positive",orange:"text-warning",red:"text-negative"};function tb(e){let n,l,r,a=(0,v.c)(8),{percentile:o}=e,s=(0,d.useLocale)(),c=tx[(0,tr.getColorFromScore)(o/100)];return a[0]!==c?(n=(0,i.cn)("text-xs",c),a[0]=c,a[1]=n):n=a[1],a[2]!==s||a[3]!==o?(l=(0,to.formatPercentPoints)(o,{locale:s,preset:"native-unrounded"})??"—",a[2]=s,a[3]=o,a[4]=l):l=a[4],a[5]!==n||a[6]!==l?(r=(0,t.jsx)("span",{className:n,children:l}),a[5]=n,a[6]=l,a[7]=r):r=a[7],r}var tv=e.i(109917);function ty(e){let n,l,r,a,o=(0,v.c)(9),{withText:s,className:c}=e,d=void 0!==s&&s;return o[0]!==c?(n=(0,i.cn)("size-8 animate-color-pulse rounded-full",c),o[0]=c,o[1]=n):n=o[1],o[2]!==n?(l=(0,t.jsx)("div",{className:n}),o[2]=n,o[3]=l):l=o[3],o[4]!==d?(r=d&&(0,t.jsx)("p",{className:"pl-3 text-base text-muted-foreground",children:"Loading..."}),o[4]=d,o[5]=r):r=o[5],o[6]!==l||o[7]!==r?(a=(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[l,r]}),o[6]=l,o[7]=r,o[8]=a):a=o[8],a}var tj=e.i(450713);let tN=(0,b.createContext)(null);function t_(e){let n,i,l,r,a=(0,v.c)(8),{children:o}=e,[s,c]=(0,b.useState)(!1),[d,u]=(0,b.useState)(0);a[0]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{c(e),e&&u(tS)},a[0]=n):n=a[0];let m=n;a[1]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{u(tk)},a[1]=i):i=a[1];let p=i;a[2]!==s||a[3]!==d?(l={isExpanded:s,setIsExpanded:m,runKey:d,rerun:p},a[2]=s,a[3]=d,a[4]=l):l=a[4];let g=l;return a[5]!==o||a[6]!==g?(r=(0,t.jsx)(tN.Provider,{value:g,children:o}),a[5]=o,a[6]=g,a[7]=r):r=a[7],r}function tk(e){return e+1}function tS(e){return e+1}let tw=Array(25).fill("Attention is all you need. The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train.").join(" "),tM=tw.split(" ").length;function tC(e){let n,l,r,a,o,s,c,d,u,m,p,g,f,h,x,y,j,N,_,k,S,w,C,P,I,L=(0,v.c)(64),{latencyMs:A,throughputTps:R}=e,{isExpanded:T,setIsExpanded:$,runKey:D,rerun:z}=function(){let e=(0,b.useContext)(tN);if(!e)throw Error("usePerformanceVisualization must be used within a PerformanceVisualizationProvider");return e}(),[V,O]=(0,b.useState)("idle"),[F,E]=(0,b.useState)(""),[B,q]=(0,b.useState)(null),[G,H]=(0,b.useState)(0),U=(0,b.useRef)(null),K=(0,b.useRef)(null),W=(0,b.useRef)(null);L[0]!==T||L[1]!==A||L[2]!==D||L[3]!==R?(n=()=>{if(!T||0===D){O("idle"),E("");return}let e=A??500,t=Math.max(1,R??30);O("waiting"),E(""),q(null),H(0),W.current=performance.now(),U.current&&cancelAnimationFrame(U.current);let n=setTimeout(()=>{O("streaming");let e=tw.split(" "),n=1e3/t,i=0,l=0,r=performance.now(),a=t=>{let o=Math.min(Math.floor((t-r)/n),e.length);if(o>i){i=o,E(e.slice(0,i).join(" "));let t=10*Math.floor(i/e.length*10);t>l&&(l=t,H(t))}if(i{clearTimeout(n),U.current&&cancelAnimationFrame(U.current)}},l=[T,D,A,R],L[0]=T,L[1]=A,L[2]=D,L[3]=R,L[4]=n,L[5]=l):(n=L[4],l=L[5]),(0,b.useEffect)(n,l),L[6]!==V?(r=()=>{"streaming"===V&&K.current&&(K.current.scrollTop=K.current.scrollHeight)},L[6]=V,L[7]=r):r=L[7],L[8]!==F||L[9]!==V?(a=[F,V],L[8]=F,L[9]=V,L[10]=a):a=L[10],(0,b.useEffect)(r,a),L[11]!==T||L[12]!==$?(o=()=>{$(!T)},L[11]=T,L[12]=$,L[13]=o):o=L[13];let Q=o;L[14]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("span",{className:"text-sm font-medium text-muted-foreground",children:"Visualize Performance"}),L[14]=s):s=L[14];let Y=T&&"rotate-180";L[15]!==Y?(c=(0,i.cn)("size-4 text-muted-foreground transition-transform duration-200",Y),L[15]=Y,L[16]=c):c=L[16],L[17]!==c?(d=(0,t.jsx)(M.ChevronDownIcon,{className:c}),L[17]=c,L[18]=d):d=L[18],L[19]!==Q||L[20]!==d?(u=(0,t.jsxs)("button",{type:"button",onClick:Q,className:"flex w-full items-center justify-between py-1 text-left hover:opacity-80 transition-opacity",children:[s,d]}),L[19]=Q,L[20]=d,L[21]=u):u=L[21];let Z=T?"auto":0;return L[22]!==V?(m="waiting"===V&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ty,{className:"size-4"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Waiting for first token..."})]}),L[22]=V,L[23]=m):m=L[23],L[24]!==V?(p="streaming"===V&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ty,{className:"size-4"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Streaming..."})]}),L[24]=V,L[25]=p):p=L[25],L[26]!==V||L[27]!==B?(g=(0,t.jsx)(tP,{state:V,totalTimeMs:B}),L[26]=V,L[27]=B,L[28]=g):g=L[28],L[29]!==V?(f="idle"===V&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Ready"}),L[29]=V,L[30]=f):f=L[30],L[31]!==m||L[32]!==p||L[33]!==g||L[34]!==f?(h=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m,p,g,f]}),L[31]=m,L[32]=p,L[33]=g,L[34]=f,L[35]=h):h=L[35],L[36]!==V||L[37]!==G?(x=(0,t.jsx)(tI,{state:V,streamingProgress:G}),L[36]=V,L[37]=G,L[38]=x):x=L[38],L[39]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(tv.ArrowPathIcon,{className:"size-4 text-muted-foreground"}),L[39]=y):y=L[39],L[40]!==z?(j=(0,t.jsx)("button",{type:"button",onClick:z,className:"p-1 rounded-sm hover:bg-foreground/[0.06] transition-colors",title:"Re-run visualization",children:y}),L[40]=z,L[41]=j):j=L[41],L[42]!==x||L[43]!==j?(N=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[x,j]}),L[42]=x,L[43]=j,L[44]=N):N=L[44],L[45]!==h||L[46]!==N?(_=(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[h,N]}),L[45]=h,L[46]=N,L[47]=_):_=L[47],L[48]!==F?(k=F||(0,t.jsx)("span",{className:"text-muted-foreground opacity-50",children:"Output will appear here..."}),L[48]=F,L[49]=k):k=L[49],L[50]!==V?(S="streaming"===V&&(0,t.jsx)("span",{className:"animate-pulse",children:"▌"}),L[50]=V,L[51]=S):S=L[51],L[52]!==k||L[53]!==S?(w=(0,t.jsxs)("div",{ref:K,className:"h-48 overflow-y-auto rounded-sm bg-background p-2 text-sm font-mono",children:[k,S]}),L[52]=k,L[53]=S,L[54]=w):w=L[54],L[55]!==_||L[56]!==w?(C=(0,t.jsxs)("div",{className:"mt-3 rounded-md border bg-muted p-3",children:[_,w]}),L[55]=_,L[56]=w,L[57]=C):C=L[57],L[58]!==Z||L[59]!==C?(P=(0,t.jsx)(tj.default,{height:Z,duration:200,children:C}),L[58]=Z,L[59]=C,L[60]=P):P=L[60],L[61]!==u||L[62]!==P?(I=(0,t.jsxs)("div",{className:"py-2",children:[u,P]}),L[61]=u,L[62]=P,L[63]=I):I=L[63],I}function tP(e){let n,i,l=(0,v.c)(6),{state:r,totalTimeMs:a}=e,o=(0,d.useLocale)();return l[0]!==o||l[1]!==r||l[2]!==a?(n="complete"===r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eG.CheckCircleIcon,{className:"size-4 text-positive"}),(0,t.jsxs)("span",{className:"text-xs text-positive",children:["Complete",null!==a&&` (${tM} tokens in ${(0,eW.formatNativeFixed)(a/1e3,{locale:o,fractionDigits:1})??"—"}s)`]})]}),l[0]=o,l[1]=r,l[2]=a,l[3]=n):n=l[3],l[4]!==n?(i=(0,t.jsx)(t.Fragment,{children:n}),l[4]=n,l[5]=i):i=l[5],i}function tI(e){let n,i,l=(0,v.c)(6),{state:r,streamingProgress:a}=e,o=(0,d.useLocale)();return l[0]!==o||l[1]!==r||l[2]!==a?(n="streaming"===r&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",(0,to.formatPercentPoints)(a,{locale:o,preset:"fee"})??"—",")"]}),l[0]=o,l[1]=r,l[2]=a,l[3]=n):n=l[3],l[4]!==n?(i=(0,t.jsx)(t.Fragment,{children:n}),l[4]=n,l[5]=i):i=l[5],i}var tL=e.i(761512);function tA(){let e,n=(0,v.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"}),n[0]=e):e=n[0],e}function tR(e){let n,l,r,a,o,s=(0,v.c)(18),{values:c,withIcons:d,variant:u,align:m}=e,p=void 0!==d&&d,g=void 0===u?"round":u,f=void 0===m?"start":m;s[0]!==c?(n=function(){return null==c?[]:Array.isArray(c)?c:[c]},s[0]=c,s[1]=n):n=s[1];let h=n;if(s[2]!==f||s[3]!==h||s[4]!==g||s[5]!==p){a=Symbol.for("react.early_return_sentinel");e:{let e,n=h();if(0===n.length){let e;s[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(tA,{}),s[9]=e):e=s[9],a=e;break e}let o="square"===g?"rounded-md":"rounded-full",c="end"===f&&"mt-2 w-full justify-start md:mt-0 md:min-w-0 md:flex-1 md:justify-end";s[10]!==c?(l=(0,i.cn)("flex flex-wrap items-center gap-1",c),s[10]=c,s[11]=l):l=s[11],s[12]!==o||s[13]!==p?(e=e=>(0,t.jsxs)("span",{className:(0,i.cn)("inline-flex items-center gap-1 border border-border bg-muted px-2 py-0.5 text-xs font-medium",o),children:[p&&function(e){let n="size-3.5 shrink-0";switch(e.toLowerCase()){case"text":return(0,t.jsx)(e3.Type,{className:n});case"image":return(0,t.jsx)(e0.Image,{className:n});case"audio":return(0,t.jsx)(eZ.AudioLines,{className:n});case"video":return(0,t.jsx)(e5.Video,{className:n});case"file":return(0,t.jsx)(eJ.FileText,{className:n});case"embeddings":return(0,t.jsx)(eX.Boxes,{className:n});case"speech":case"tts":return(0,t.jsx)(e2.Speech,{className:n});case"transcription":return(0,t.jsx)(e1.Mic,{className:n});case"rerank":return(0,t.jsx)(eY.ArrowUpDown,{className:n});default:return null}}(e),e]},e),s[12]=o,s[13]=p,s[14]=e):e=s[14],r=n.map(e)}s[2]=f,s[3]=h,s[4]=g,s[5]=p,s[6]=l,s[7]=r,s[8]=a}else l=s[6],r=s[7],a=s[8];return a!==Symbol.for("react.early_return_sentinel")?a:(s[15]!==l||s[16]!==r?(o=(0,t.jsx)("div",{className:l,children:r}),s[15]=l,s[16]=r,s[17]=o):o=s[17],o)}function tT(e){let n,i,l,r=(0,v.c)(8),{value:a,units:o}=e;if(null===a){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(tA,{}),r[0]=e):e=r[0],e}return r[1]!==a?(n=(0,t.jsx)("span",{className:"text-sm font-medium tabular-nums text-foreground",children:a}),r[1]=a,r[2]=n):n=r[2],r[3]!==o?(i=o&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o}),r[3]=o,r[4]=i):i=r[4],r[5]!==n||r[6]!==i?(l=(0,t.jsxs)("span",{className:"inline-flex items-baseline gap-1",children:[n,i]}),r[5]=n,r[6]=i,r[7]=l):l=r[7],l}function t$(e){let n,i,l,r,a=(0,v.c)(11),{value:o,percentile:s}=e,c=(0,d.useLocale)();if(!(0,f.isDefinedAndNotNull)(o)){let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(tA,{}),a[0]=e):e=a[0],e}if(a[1]!==c||a[2]!==o?(n=(0,eW.formatNativeFixed)(o,{locale:c,fractionDigits:0})??"—",a[1]=c,a[2]=o,a[3]=n):n=a[3],a[4]!==n?(i=(0,t.jsx)("span",{className:"text-sm font-medium tabular-nums text-foreground",children:n}),a[4]=n,a[5]=i):i=a[5],a[6]!==s)l=(0,f.isDefinedAndNotNull)(s)?(0,t.jsx)(tb,{percentile:s}):null,a[6]=s,a[7]=l;else l=a[7];return a[8]!==i||a[9]!==l?(r=(0,t.jsxs)("span",{className:"inline-flex items-baseline gap-1.5",children:[i,l]}),a[8]=i,a[9]=l,a[10]=r):r=a[10],r}function tD(e){let n,i=(0,v.c)(3),{value:l}=e;if(!(0,f.isDefinedAndNotNull)(l)){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(tA,{}),i[0]=e):e=i[0],e}return i[1]!==l?(n=l?(0,t.jsx)(eG.CheckCircleIcon,{className:"size-5 text-positive"}):(0,t.jsx)(C.XMarkIcon,{className:"size-5 text-negative"}),i[1]=l,i[2]=n):n=i[2],n}function tz(e,n,i,l){return!(0,f.isDefinedAndNotNull)(n)||(0,eK.bn)(n).lt(0)?(0,t.jsx)(tA,{}):(0,t.jsxs)("span",{className:"inline-flex items-baseline gap-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium tabular-nums text-foreground",children:(0,eQ.formatUsd)((0,eK.bn)(n).times(i),{locale:e,preset:"model-price"})??"—"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:tn(l)})]})}let tV=[{key:"text",label:"Text",bg:tL.MODALITY_BG[N.OutputModality.Text],iconColor:tL.MODALITY_ICON_COLOR[N.OutputModality.Text],Icon:e3.Type},{key:"image",label:"Image",bg:tL.MODALITY_BG[N.OutputModality.Image],iconColor:tL.MODALITY_ICON_COLOR[N.OutputModality.Image],Icon:e0.Image},{key:"audio",label:"Audio",bg:tL.MODALITY_BG[N.OutputModality.Audio],iconColor:tL.MODALITY_ICON_COLOR[N.OutputModality.Audio],Icon:eZ.AudioLines},{key:"video",label:"Video",bg:tL.MODALITY_BG[N.OutputModality.Video],iconColor:tL.MODALITY_ICON_COLOR[N.OutputModality.Video],Icon:e5.Video},{key:"file",label:"File",bg:"bg-modality-file/12",iconColor:"text-modality-file",Icon:eJ.FileText}];function tO(e){let n,l,r,a,o=(0,v.c)(9),{modalities:s}=e;o[0]!==s?(n=s??[],o[0]=s,o[1]=n):n=o[1],o[2]!==n?(l=new Set(n.map(tF)),o[2]=n,o[3]=l):l=o[3];let c=l;if(0===c.size){let e;return o[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(tA,{}),o[4]=e):e=o[4],e}return o[5]!==c?(r=tV.map(e=>{let{key:n,label:l,bg:r,iconColor:a,Icon:o}=e,s=c.has(n),d=s?l:`${l} (not supported)`;return(0,t.jsx)(eU.Tooltip,{content:d,children:(0,t.jsx)("span",{className:(0,i.cn)("inline-flex size-[20px] items-center justify-center rounded-md transition-colors",s?r:"bg-muted/40"),children:(0,t.jsx)(o,{className:(0,i.cn)("size-3.5",s?a:"text-muted-foreground/30"),strokeWidth:2.5})})},n)}),o[5]=c,o[6]=r):r=o[6],o[7]!==r?(a=(0,t.jsx)("div",{className:"ml-auto flex flex-wrap items-center justify-end gap-1",children:r}),o[7]=r,o[8]=a):a=o[8],a}function tF(e){return e.toLowerCase()}function tE(e){let n,l,r,a,o,s,c=(0,v.c)(18),{options:d,selected:u,onChange:m}=e;if(0===d.length)return null;let p=1===d.length,g=u??void 0,f=p&&"border-transparent disabled:cursor-default disabled:bg-muted/60 disabled:opacity-100";c[0]!==f?(n=(0,i.cn)("w-full max-w-[14rem]",f),c[0]=f,c[1]=n):n=c[1];let h=u??void 0;return c[2]!==u||c[3]!==h?(l=(0,t.jsx)(D.SelectValue,{children:(0,t.jsx)("span",{className:"block truncate",title:h,children:u})}),c[2]=u,c[3]=h,c[4]=l):l=c[4],c[5]!==n||c[6]!==l?(r=(0,t.jsx)(D.SelectTrigger,{className:n,children:l}),c[5]=n,c[6]=l,c[7]=r):r=c[7],c[8]!==d?(a=d.map(tB),c[8]=d,c[9]=a):a=c[9],c[10]!==a?(o=(0,t.jsx)(D.SelectContent,{children:a}),c[10]=a,c[11]=o):o=c[11],c[12]!==p||c[13]!==m||c[14]!==g||c[15]!==r||c[16]!==o?(s=(0,t.jsxs)(D.Select,{variant:"square",size:"compact",disabled:p,value:g,onValueChange:m,children:[r,o]}),c[12]=p,c[13]=m,c[14]=g,c[15]=r,c[16]=o,c[17]=s):s=c[17],s}function tB(e){return(0,t.jsx)(D.SelectItem,{value:e,children:e},e)}function tq(e){let n,i=(0,v.c)(3),{model:l,activityMetric:r}=e;return i[0]!==r||i[1]!==l?(n=(0,t.jsx)("div",{className:"-mx-5 h-full",children:(0,t.jsx)(ti.ModelActivityMini,{model:l,activityMetric:r,hideHeader:!0,renderEmpty:tG})}),i[0]=r,i[1]=l,i[2]=n):n=i[2],n}function tG(){return(0,t.jsxs)("div",{className:"flex h-full min-h-[280px] flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-foreground/[0.02] p-6 text-center text-muted-foreground",children:[(0,t.jsx)(eH.ChartBarIcon,{className:"size-10 text-border"}),(0,t.jsx)("h3",{className:"text-sm",children:"No activity data available yet."})]})}function tH(e){let n,i=(0,v.c)(3),{endpointData:l}=e,{currentProviderStats:r}=l,a=r?.stats?.p50_latency??null,o=r?.stats?.p50_throughput??null;return i[0]!==a||i[1]!==o?(n=(0,t.jsx)(tC,{latencyMs:a,throughputTps:o}),i[0]=a,i[1]=o,i[2]=n):n=i[2],n}var tU=e.i(536582),tK=e.i(179019),tW=e.i(50846),tQ=e.i(138567),tY=e.i(270783),tZ=e.i(430573),tX=e.i(490817),tJ=e.i(537457),t0=e.i(487154);let t1=["#3b82f6","#10b981","#f59e0b"];function t2(e){let n,i,l,r,a,o,s,c,u,m,p,g,f,h,x,b,y,j,N=(0,v.c)(45),{models:_,data:k}=e,S=(0,d.useLocale)();if(N[0]!==k||N[1]!==S||N[2]!==_){a=Symbol.for("react.early_return_sentinel");e:{let e,d,h;N[16]!==k?(e=(e,t)=>k.some(e=>"number"==typeof e[`value${t}`])?{model:e,index:t}:null,N[16]=k,N[17]=e):e=N[17];let x=_.map(e).filter(t5);if(0===k.length||0===x.length){let e;N[18]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex h-[360px] items-center justify-center px-5 py-4 text-center text-xs text-muted-foreground",children:"No benchmark data available for the selected models yet."}),N[18]=e):e=N[18],a=e;break e}r="px-6 py-4",i=tJ.ResponsiveContainer,g="100%",f=360,n=tX.RadarChart,l=k,o="72%",N[19]===Symbol.for("react.memo_cache_sentinel")?(s={top:16,right:40,bottom:16,left:40},c=(0,t.jsx)(tQ.PolarGrid,{stroke:"currentColor",className:"text-border"}),N[19]=s,N[20]=c):(s=N[19],c=N[20]),N[21]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(tW.PolarAngleAxis,{dataKey:"axis",tick:{fill:"currentColor",fontSize:12},className:"text-foreground"}),N[21]=u):u=N[21],N[22]===Symbol.for("react.memo_cache_sentinel")?(d=[0,1],N[22]=d):d=N[22],N[23]===Symbol.for("react.memo_cache_sentinel")?(h={fill:"currentColor",fontSize:10},N[23]=h):h=N[23],N[24]!==S?(m=(0,t.jsx)(tY.PolarRadiusAxis,{angle:90,domain:d,tickCount:5,tick:h,className:"text-muted-foreground",tickFormatter:e=>{var t,n;return t=S,n=e,(0,eW.formatNativeFixed)(n,{locale:t,fractionDigits:1})??"—"}}),N[24]=S,N[25]=m):m=N[25],p=x.map(t3)}N[0]=k,N[1]=S,N[2]=_,N[3]=n,N[4]=i,N[5]=l,N[6]=r,N[7]=a,N[8]=o,N[9]=s,N[10]=c,N[11]=u,N[12]=m,N[13]=p,N[14]=g,N[15]=f}else n=N[3],i=N[4],l=N[5],r=N[6],a=N[7],o=N[8],s=N[9],c=N[10],u=N[11],m=N[12],p=N[13],g=N[14],f=N[15];return a!==Symbol.for("react.early_return_sentinel")?a:(N[26]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)(t0.Tooltip,{wrapperStyle:{zIndex:10},content:t4}),N[26]=h):h=N[26],N[27]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(tK.Legend,{iconType:"circle",wrapperStyle:{fontSize:12,paddingTop:8}}),N[27]=x):x=N[27],N[28]!==n||N[29]!==l||N[30]!==o||N[31]!==s||N[32]!==c||N[33]!==u||N[34]!==m||N[35]!==p?(b=(0,t.jsxs)(n,{data:l,outerRadius:o,margin:s,children:[c,u,m,p,h,x]}),N[28]=n,N[29]=l,N[30]=o,N[31]=s,N[32]=c,N[33]=u,N[34]=m,N[35]=p,N[36]=b):b=N[36],N[37]!==i||N[38]!==b||N[39]!==g||N[40]!==f?(y=(0,t.jsx)(i,{width:g,height:f,children:b}),N[37]=i,N[38]=b,N[39]=g,N[40]=f,N[41]=y):y=N[41],N[42]!==r||N[43]!==y?(j=(0,t.jsx)("div",{className:r,children:y}),N[42]=r,N[43]=y,N[44]=j):j=N[44],j)}function t3(e){let{model:n,index:i}=e;return(0,t.jsx)(tZ.Radar,{name:(0,g.formatModelName)(n.short_name,{keepNote:!1}),dataKey:`model${i}`,stroke:t1[i%t1.length],fill:t1[i%t1.length],fillOpacity:.18,strokeWidth:2,isAnimationActive:!1},`model-${n.slug}`)}function t5(e){return null!==e}function t4(e){let n,i,l=(0,v.c)(9),r=(0,d.useLocale)();if(!e.active||!e.payload?.length)return null;let a=e.payload;if(l[0]!==r||l[1]!==e.label||l[2]!==e.payload){i=Symbol.for("react.early_return_sentinel");e:{let o,s,c=a.map(t6).filter(t8);if(0===c.length){i=null;break e}l[5]!==e.label?(o=(0,t.jsx)("div",{className:"mb-1 font-semibold",children:e.label}),l[5]=e.label,l[6]=o):o=l[6],l[7]!==r?(s=e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-2 rounded-full",style:{backgroundColor:e.color}}),e.name]}),(0,t.jsx)("span",{className:"font-mono",children:(0,eW.formatNativeFixed)(e.value,{locale:r,fractionDigits:2})??"—"})]},e.key),l[7]=r,l[8]=s):s=l[8],n=(0,t.jsxs)("div",{className:"rounded-md border border-border bg-background px-3 py-2 text-xs shadow-lg",children:[o,c.map(s)]})}l[0]=r,l[1]=e.label,l[2]=e.payload,l[3]=n,l[4]=i}else n=l[3],i=l[4];return i!==Symbol.for("react.early_return_sentinel")?i:n}function t8(e){return null!==e}function t6(e){let t=e.dataKey;if("string"!=typeof t||!t.startsWith("model"))return null;let n=t.slice(5),i=e.payload?.[`value${n}`];return"number"!=typeof i?null:{key:t,name:"string"==typeof e.name?e.name:"",color:"string"==typeof e.color?e.color:void 0,value:i}}let t7={openai:{from:"#10a37f",to:"#0d6e57"},anthropic:{from:"#d97757",to:"#a8553a"},google:{from:"#4285f4",to:"#ea4335"},"meta-llama":{from:"#0866ff",to:"#1c40c6"},deepseek:{from:"#4d6bfe",to:"#7e57f0"},moonshotai:{from:"#34d399",to:"#06b6d4"},qwen:{from:"#6b5bff",to:"#a855f7"},"x-ai":{from:"#1f2937",to:"#475569"},mistralai:{from:"#ff7000",to:"#dc2626"},cohere:{from:"#f97583",to:"#d946ef"}};var t9=e.i(307425),ne=e.i(5353),nt=e.i(4696),nn=e.i(249743),ni=e.i(853862),nl=e.i(429088),nr=e.i(287172);let na=["#a78bfa","#60a5fa","#fbbf24","#34d399","#f87171"],no={from:"#64748b",to:"#334155"};function ns(e){return`landscape-grad-${e.replaceAll(/[^a-zA-Z0-9_-]/g,"_")}`}let nc=["intelligence","coding","agentic"];function nd(e){switch(e){case"intelligence":return"Intelligence";case"coding":return"Coding";case"agentic":return"Agentic"}}function nu(e,t){if(!e||e.benchmark_data.model_type!==tl.ModelType.Llm)return null;let n=(0,tr.extractIndexScores)(e.benchmark_data.evaluations)[t];return null==n?null:Math.round(n)}function nm(e){let t=e.filter(e=>null!==e);return 0===t.length?0:t.reduce((e,t)=>e+t,0)/t.length}function np(e){let n,i,l,r,a,o,s,c,d=(0,v.c)(20);if(!e.active||!e.payload?.length)return null;let u=e.payload[0],m=u?.payload;if(!(m&&"object"==typeof m&&"slug"in m&&"string"==typeof m.slug&&"label"in m&&"string"==typeof m.label&&"avg"in m&&"number"==typeof m.avg&&"isPick"in m&&"boolean"==typeof m.isPick))return null;d[0]!==m.author?(n=t7[m.author]??no,d[0]=m.author,d[1]=n):n=d[1];let p=n.from;d[2]!==m.author?(i=t7[m.author]??no,d[2]=m.author,d[3]=i):i=d[3];let g=`linear-gradient(to bottom, ${p}, ${i.to})`,f=m.isPick?1:.22;return d[4]!==g||d[5]!==f?(l=(0,t.jsx)("span",{"aria-hidden":"true",className:"size-2 rounded-sm",style:{backgroundImage:g,opacity:f}}),d[4]=g,d[5]=f,d[6]=l):l=d[6],d[7]!==m.label||d[8]!==l?(r=(0,t.jsxs)("div",{className:"mb-1 flex items-center gap-1.5 font-semibold",children:[l,m.label]}),d[7]=m.label,d[8]=l,d[9]=r):r=d[9],d[10]!==m?(a=nc.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:nd(e)}),(0,t.jsx)("span",{className:"text-foreground",children:m[e]??"—"})]},e)),d[10]=m,d[11]=a):a=d[11],d[12]!==a?(o=(0,t.jsx)("div",{className:"flex flex-col gap-0.5 font-mono tabular-nums",children:a}),d[12]=a,d[13]=o):o=d[13],d[14]!==m.isPick?(s=m.isPick&&(0,t.jsx)("div",{className:"mt-1 text-2xs text-primary",children:"Your pick"}),d[14]=m.isPick,d[15]=s):s=d[15],d[16]!==r||d[17]!==o||d[18]!==s?(c=(0,t.jsxs)("div",{className:"rounded-md border border-border bg-background px-3 py-2 text-xs shadow-lg",children:[r,o,s]}),d[16]=r,d[17]=o,d[18]=s,d[19]=c):c=d[19],c}function ng(e){let n,l,r,a,o,s,c,d,u,m,p,g,f,h,x,b,y,N,_,k,S,w,M,C=(0,v.c)(59),{metric:P,rows:I,showYAxis:L}=e;if(C[0]!==P||C[1]!==I){let e;C[3]!==P?(e=e=>null!==e[P],C[3]=P,C[4]=e):e=C[4],n=I.filter(e),C[0]=P,C[1]=I,C[2]=n}else n=C[2];let A=n;if(C[5]!==A){for(let e of(l=new Map,A))l.set(e.label,e);C[5]=A,C[6]=l}else l=C[6];let R=l;if(C[7]!==P||C[8]!==I){let e;C[10]!==P?(e=e=>e.isPick&&null===e[P],C[10]=P,C[11]=e):e=C[11],r=I.filter(e).map(nx),C[7]=P,C[8]=I,C[9]=r}else r=C[9];let T=r,$=L?32:60,D=L?"pl-1":"pl-[60px]";if(C[12]!==D?(a=(0,i.cn)("flex items-baseline justify-between gap-2",D),C[12]=D,C[13]=a):a=C[13],C[14]!==P?(o=nd(P),C[14]=P,C[15]=o):o=C[15],C[16]!==o?(s=(0,t.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground",children:o}),C[16]=o,C[17]=s):s=C[17],C[18]!==a||C[19]!==s?(c=(0,t.jsx)("div",{className:a,children:s}),C[18]=a,C[19]=s,C[20]=c):c=C[20],C[21]!==$?(d={top:12,right:4,bottom:72,left:$},C[21]=$,C[22]=d):d=C[22],C[23]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(nt.CartesianGrid,{strokeDasharray:"3 3",vertical:!1,stroke:"currentColor",className:"text-muted"}),C[23]=u):u=C[23],C[24]!==R)m=({x:e,y:n,payload:l})=>{if("number"!=typeof e||"number"!=typeof n)return(0,t.jsx)("g",{});let r=String(l?.value??""),a=R.get(r);if(!a)return(0,t.jsx)("g",{});let o=function(e){if(e.length<=20)return[e];let t=e.lastIndexOf(" ",20),n=t>0?t:20,i=e.slice(0,n).trimEnd(),l=e.slice(n).trimStart();return l.length>20&&(l=`${l.slice(0,19)}…`),[i,l]}(a.label),s=(0,i.cn)("fill-current text-3xs",a.isPick?"font-semibold text-foreground":"text-muted-foreground"),c=a.isPick?1:.22;return(0,t.jsxs)("g",{transform:`translate(${e}, ${n+2})`,opacity:c,children:[(0,t.jsx)("title",{children:a.label}),(0,t.jsx)("foreignObject",{x:-8,y:0,width:16,height:16,children:(0,t.jsx)("div",{className:"flex size-4 items-center justify-center",children:(0,t.jsx)(j.AuthorIcon,{frame:!0,author:a.author,className:"size-4 shrink-0"})})}),(0,t.jsxs)("text",{x:0,y:22,textAnchor:"end",transform:"rotate(-45, 0, 22)",className:s,children:[(0,t.jsx)("tspan",{x:0,dy:0,children:o[0]}),2===o.length&&(0,t.jsx)("tspan",{x:0,dy:"1.1em",children:o[1]})]})]})},C[24]=R,C[25]=m;else m=C[25];C[26]!==m?(p=(0,t.jsx)(nl.XAxis,{dataKey:"label",interval:0,axisLine:!1,tickLine:!1,tick:m,height:72}),C[26]=m,C[27]=p):p=C[27];let z=!L;C[28]===Symbol.for("react.memo_cache_sentinel")?(g=[0,100],f=[0,20,40,60,80,100],C[28]=g,C[29]=f):(g=C[28],f=C[29]);let V=28*!!L;return C[30]!==z||C[31]!==V?(h=(0,t.jsx)(nr.YAxis,{hide:z,tick:nh,className:"text-muted-foreground",axisLine:!1,tickLine:!1,domain:g,ticks:f,width:V}),C[30]=z,C[31]=V,C[32]=h):h=C[32],C[33]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(t0.Tooltip,{cursor:{fill:"currentColor",opacity:.06},wrapperStyle:{zIndex:10},isAnimationActive:!1,content:np}),C[33]=x):x=C[33],C[34]===Symbol.for("react.memo_cache_sentinel")?(b=[2,2,0,0],C[34]=b):b=C[34],C[35]!==A?(y=A.map(nf),C[35]=A,C[36]=y):y=C[36],C[37]!==A?(N=e=>(function(e,n){let l,{x:r,y:a,width:o,height:s,value:c,index:d}=n;if("number"!=typeof r||"number"!=typeof a||"number"!=typeof o||"number"!=typeof s||"number"!=typeof d||"number"!=typeof c)return null;let u=e[d];if(!u)return null;let m=s>=26;return l=m?u.isPick?"fill-white text-white":"fill-white/85":"text-muted-foreground",(0,t.jsx)("text",{x:r+o/2,y:m?a+12:a-4,textAnchor:"middle",className:(0,i.cn)("font-mono text-2xs font-semibold tabular-nums",l),children:c})})(A,e),C[37]=A,C[38]=N):N=C[38],C[39]!==P||C[40]!==N?(_=(0,t.jsx)(ni.LabelList,{dataKey:P,content:N}),C[39]=P,C[40]=N,C[41]=_):_=C[41],C[42]!==P||C[43]!==y||C[44]!==_?(k=(0,t.jsxs)(t9.Bar,{dataKey:P,radius:b,isAnimationActive:!1,children:[y,_]}),C[42]=P,C[43]=y,C[44]=_,C[45]=k):k=C[45],C[46]!==A||C[47]!==p||C[48]!==h||C[49]!==k||C[50]!==d?(S=(0,t.jsx)("div",{className:"h-72 w-full [&_svg]:outline-none",children:(0,t.jsx)(tJ.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ne.BarChart,{data:A,margin:d,barCategoryGap:"18%",children:[u,p,h,x,k]})})}),C[46]=A,C[47]=p,C[48]=h,C[49]=k,C[50]=d,C[51]=S):S=C[51],C[52]!==P||C[53]!==T?(w=T.length>0&&(0,t.jsx)("div",{className:"-mt-8 px-1 text-right text-2xs italic text-muted-foreground",children:T.map(e=>(0,t.jsxs)("div",{children:["* ",e," has no ",nd(P).toLowerCase()," data"]},e))}),C[52]=P,C[53]=T,C[54]=w):w=C[54],C[55]!==S||C[56]!==w||C[57]!==c?(M=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[c,S,w]}),C[55]=S,C[56]=w,C[57]=c,C[58]=M):M=C[58],M}function nf(e){return(0,t.jsx)(nn.Cell,{fill:`url(#${ns(e.author)})`,opacity:e.isPick?1:.22},e.slug)}function nh(e){let n=e&&"object"==typeof e&&"y"in e&&"number"==typeof e.y?e.y:null,i=e&&"object"==typeof e&&"payload"in e&&e.payload&&"object"==typeof e.payload&&"value"in e.payload?e.payload.value:null;return null===n?(0,t.jsx)("g",{}):(0,t.jsx)("text",{x:26,y:n,dy:3,textAnchor:"end",className:"fill-current text-2xs text-muted-foreground",children:"string"==typeof i||"number"==typeof i?i:""})}function nx(e){return e.label}function nb(e){let n,i,l,r,a,o,s,c,d=(0,v.c)(23),{picks:u,pickScores:m,pickAANames:p}=e;d[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,tg.allArtificialAnalysisBenchmarksOptions)(),d[0]=n):n=d[0];let{data:f}=(0,z.useQuery)(n);if(d[1]!==f||d[2]!==p||d[3]!==m||d[4]!==u){let e;d[6]!==p||d[7]!==m?(e=(e,t)=>{let n=m[t],i=n?.intelligence??null,l=n?.coding??null,r=n?.agentic??null,a=p?.[t]??null;return{slug:e.slug,author:e.author,label:a??(0,g.formatModelName)(e.short_name,{keepNote:!0}),intelligence:null===i?null:Math.round(i),coding:null===l?null:Math.round(l),agentic:null===r?null:Math.round(r),avg:nm([i,l,r]),isPick:!0,pickColor:na[t%na.length]??na[0]}},d[6]=p,d[7]=m,d[8]=e):e=d[8];let t=u.map(e),n=new Set(u.map(n_)),l=(f?function(e,t){let n=new Map;for(let i of e){let e=i.openrouter_slug??i.heuristic_openrouter_slug??i.permaslug;if(!e)continue;let l=function(e){let[t]=e.split("/");return t??e}(e);if(t.has(l))continue;let r=nu(i,"intelligence"),a=nu(i,"coding"),o=nu(i,"agentic");if(null===r&&null===a&&null===o)continue;let s={slug:e,author:l,label:i.aa_name,intelligence:r,coding:a,agentic:o,avg:nm([r,a,o])},c=n.get(l);(!c||s.avg>c.avg)&&n.set(l,s)}return[...n.values()]}(f,n):[]).map(nN),r=Math.max(0,10-t.length);i=[...t,...[...l].toSorted(nj).slice(0,r)].toSorted(ny),d[1]=f,d[2]=p,d[3]=m,d[4]=u,d[5]=i}else i=d[5];let h=i;if(d[9]!==h){for(let e of(l=new Set,h))l.add(e.author);d[9]=h,d[10]=l}else l=d[10];d[11]!==l?(r=[...l],d[11]=l,d[12]=r):r=d[12];let x=r;if(0===h.length){let e;return d[13]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"px-5 py-6 text-center text-xs text-muted-foreground",children:"No benchmark data available for the selected models yet."}),d[13]=e):e=d[13],e}return d[14]!==x?(a=(0,t.jsx)("svg",{"aria-hidden":"true",className:"absolute h-0 w-0",children:(0,t.jsx)("defs",{children:x.map(nv)})}),d[14]=x,d[15]=a):a=d[15],d[16]!==h?(o=nc.map((e,n)=>(0,t.jsx)(ng,{metric:e,rows:h,showYAxis:0===n},e)),d[16]=h,d[17]=o):o=d[17],d[18]!==o?(s=(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-3",children:o}),d[18]=o,d[19]=s):s=d[19],d[20]!==a||d[21]!==s?(c=(0,t.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg border border-border px-4 pt-4 pb-4 md:px-5 md:pb-5",children:[a,s]}),d[20]=a,d[21]=s,d[22]=c):c=d[22],c}function nv(e){let{from:n,to:i}=t7[e]??no;return(0,t.jsxs)("linearGradient",{id:ns(e),x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:n}),(0,t.jsx)("stop",{offset:"100%",stopColor:i})]},e)}function ny(e,t){return t.avg-e.avg}function nj(e,t){return t.avg-e.avg}function nN(e){return{...e,isPick:!1,pickColor:"transparent"}}function n_(e){return e.author}function nk(e){let n,l,r,a,o,s,c,d,u,m,p,h=(0,v.c)(58),{effectiveColumnCount:x,mobileColumnLabels:y,totalColumns:j,visibleIndices:N,allModels:_,visibleModels:k,aaScoresByModel:S,aaVariantsByModel:w,aaSelectedVariantByModel:M,aaSelectedRecordByModel:C,onAaVariantChange:P,daCategories:I,daRecordsByModel:L,daVariantsByModel:A,daSelectedVariantByModel:R,hasDaVariantChoice:T,onDaVariantChange:$}=e,[z,V]=(0,b.useState)("table");h[0]!==S?(n=S.some(nL),h[0]=S,h[1]=n):n=h[1];let O=n;h[2]!==k?(l=eA(k),h[2]=k,h[3]=l):l=h[3];let F=!l,E=I.length>0,B=F&&O||E;h[4]!==w?(r=w.some(nI),h[4]=w,h[5]=r):r=h[5];let q=r;if(h[6]!==S||h[7]!==N){let e;h[9]!==S?(e=(e,t)=>{let n=S[t];return!((0,f.isDefinedAndNotNull)(n?.intelligence)||(0,f.isDefinedAndNotNull)(n?.coding)||(0,f.isDefinedAndNotNull)(n?.agentic))},h[9]=S,h[10]=e):e=h[10],a=N.map(e),h[6]=S,h[7]=N,h[8]=a}else a=h[8];let G=a;if(h[11]!==L||h[12]!==N){let e;h[15]!==L?(e=(e,t)=>(L[t]?.length??0)===0,h[15]=L,h[16]=e):e=h[16],s=(o=N.map(e)).map(nP).filter(nC),h[11]=L,h[12]=N,h[13]=o,h[14]=s}else o=h[13],s=h[14];let H=s;h[17]!==G||h[18]!==o?(c=e=>{let{visibleI:n,value:i,percentile:l,section:r}=e;if("aa"===r?G[n]:o[n]){let e=(0,t.jsx)(tU.EmptyAnalyticsData,{message:"No benchmarks available",height:280,className:"rounded-md border border-dashed border-border bg-foreground/[0.02]"});return(0,t.jsx)("div",{className:"flex items-center justify-center text-center md:hidden",children:e})}return(0,t.jsx)(t$,{value:i,percentile:l})},h[17]=G,h[18]=o,h[19]=c):c=h[19];let K=c;return B?(h[20]!==j?(d=(0,t.jsx)(eu.SectionHeader,{id:"section-benchmarks",title:"Benchmarks",totalColumns:j}),h[20]=j,h[21]=d):d=h[21],h[22]!==S||h[23]!==C||h[24]!==M||h[25]!==w||h[26]!==_||h[27]!==x||h[28]!==q||h[29]!==O||h[30]!==y||h[31]!==P||h[32]!==F||h[33]!==j||h[34]!==N||h[35]!==k?(u=F&&O&&(0,t.jsxs)("section",{className:"relative z-[55]",children:[q?(0,t.jsxs)(eu.SectionGrid,{columnCount:x,mobileColumnLabels:y,gridRowTemplate:"auto",children:[(0,t.jsx)(eu.SectionHeader,{subsection:!0,id:"section-aa",title:"Artificial Analysis",totalColumns:j}),(0,t.jsx)(eu.DataRow,{isFirst:!0,label:"Variant",values:N.map((e,n)=>{let l=_[e];if(!l)return null;let r=w[n]??[],a=r.length>0?r:[(0,g.formatModelName)(l.short_name,{keepNote:!0})],o=M[n]??a[0],s=1===a.length;return(0,t.jsxs)(D.Select,{variant:"square",size:"compact",disabled:s,value:o,onValueChange:e=>P(l.permaslug,e),children:[(0,t.jsx)(D.SelectTrigger,{className:(0,i.cn)("w-full min-w-0 max-w-[14rem]",s&&"border-transparent disabled:cursor-default disabled:bg-muted/60 disabled:opacity-100"),children:(0,t.jsx)(D.SelectValue,{children:(0,t.jsx)("span",{className:"flex min-w-0 items-center",children:(0,t.jsx)("span",{className:"min-w-0 truncate",children:o})})})}),(0,t.jsx)(D.SelectContent,{children:a.map(nM)})]},l.permaslug)})})]}):(0,t.jsx)(eu.SectionHeader,{subsection:!0,id:"section-aa",title:"Artificial Analysis",totalColumns:j}),(0,t.jsx)(nb,{picks:k,pickScores:S.map(nw),pickAANames:C.map(nS)})]}),h[22]=S,h[23]=C,h[24]=M,h[25]=w,h[26]=_,h[27]=x,h[28]=q,h[29]=O,h[30]=y,h[31]=P,h[32]=F,h[33]=j,h[34]=N,h[35]=k,h[36]=u):u=h[36],h[37]!==_||h[38]!==z||h[39]!==I||h[40]!==L||h[41]!==R||h[42]!==A||h[43]!==x||h[44]!==H||h[45]!==E||h[46]!==T||h[47]!==y||h[48]!==$||h[49]!==K||h[50]!==j||h[51]!==N||h[52]!==k?(m=E&&(0,t.jsx)("section",{className:"relative pt-6",children:(()=>{let e=I.map(e=>{let t={axis:(0,ta.getCategoryLabel)(e.arena,e.category)};for(let n=0;nt.arena===e.arena&&t.category===e.category),l=i?.elo_percentile??null,r=null!==l?Math.max(0,Math.min(1,l/100)):null;t[`model${n}`]=r??0,t[`value${n}`]=r}return t}),n=(0,t.jsx)(U,{value:z,onChange:V});if("table"===z){let e=+!!T+I.length;return(0,t.jsxs)(eu.SectionGrid,{columnCount:x,mobileColumnLabels:y,gridRowTemplate:`repeat(${e}, auto)`,children:[(0,t.jsx)(eu.SectionHeader,{subsection:!0,id:"section-da",title:"Design Arena",totalColumns:j,rightSlot:n}),T&&(0,t.jsx)(eu.DataRow,{isFirst:!0,label:"Variant",emptyIndices:H,values:N.map((e,n)=>{let i=_[e];if(!i)return null;let l=A[n];return(0,t.jsx)(tE,{options:l?.variants??[],selected:R[n]??null,onChange:e=>$(i.permaslug,e)},i.permaslug)})}),I.map((e,n)=>(0,t.jsx)(eu.DataRow,{isFirst:0===n&&!T,label:(0,ta.getCategoryLabel)(e.arena,e.category),emptyIndices:H,values:(0,ep.buildValues)(N,_,(t,n)=>{let i=N.indexOf(n),l=(L[i]??[]).find(t=>t.arena===e.arena&&t.category===e.category);return K({visibleI:i,value:l?.elo,percentile:l?.elo_percentile,section:"da"})}),bestIndices:(0,ep.highestVisibleIndex)({visibleIndices:N,allModels:_,extract:(t,n)=>{let i=(L[n]??[]).find(t=>t.arena===e.arena&&t.category===e.category);return i?.elo??null}})},`${e.arena}-${e.category}`)),H.map(e=>{let n=e+1,i=(x-1)*12+8,l=`calc((100% - ${i}px) * ${n-1} / ${x} + ${(n-1)*12}px)`,r=`calc((100% - ${i}px) / ${x})`;return(0,t.jsxs)("div",{"aria-hidden":"true",style:{position:"absolute",top:0,bottom:0,left:l,width:r},className:"hidden flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-foreground/[0.02] p-6 text-center text-sm text-muted-foreground md:flex",children:[(0,t.jsx)(eH.ChartBarIcon,{className:"size-10 text-border"}),(0,t.jsx)("h3",{children:"No benchmarks available"})]},`da-empty-overlay-${e}`)})]})}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.SectionHeader,{subsection:!0,id:"section-da",title:"Design Arena",totalColumns:j,rightSlot:n}),(0,t.jsx)(t2,{models:k,data:e})]})})()}),h[37]=_,h[38]=z,h[39]=I,h[40]=L,h[41]=R,h[42]=A,h[43]=x,h[44]=H,h[45]=E,h[46]=T,h[47]=y,h[48]=$,h[49]=K,h[50]=j,h[51]=N,h[52]=k,h[53]=m):m=h[53],h[54]!==d||h[55]!==u||h[56]!==m?(p=(0,t.jsxs)(t.Fragment,{children:[d,u,m]}),h[54]=d,h[55]=u,h[56]=m,h[57]=p):p=h[57],p):null}function nS(e){return e?.aa_name??null}function nw(e){return{intelligence:e?.intelligence??null,coding:e?.coding??null,agentic:e?.agentic??null}}function nM(e){return(0,t.jsx)(D.SelectItem,{value:e,children:e},e)}function nC(e){return e>=0}function nP(e,t){return e?t:-1}function nI(e){return e.length>1}function nL(e){return(0,f.isDefinedAndNotNull)(e?.intelligence)||(0,f.isDefinedAndNotNull)(e?.coding)||(0,f.isDefinedAndNotNull)(e?.agentic)}function nA(e){let n,i,l,r,o=(0,v.c)(7),{presetCount:s}=e;o[0]!==s?(n=Array.from({length:Math.min(s,4)},nT),o[0]=s,o[1]=n):n=o[1];let c=n;return o[2]!==c?(i=c.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:c.map(nR)}),o[2]=c,o[3]=i):i=o[3],o[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-[60px] w-full rounded-lg"}),(0,t.jsx)(a.Skeleton,{className:"h-[60px] w-full rounded-lg"})]}),o[4]=l):l=o[4],o[5]!==i?(r=(0,t.jsxs)("div",{"data-slot":"compare-body-skeleton","data-variant":"selection","aria-busy":"true",className:"flex flex-col gap-6 md:gap-8",children:[i,l]}),o[5]=i,o[6]=r):r=o[6],r}function nR(e){return(0,t.jsx)(a.Skeleton,{className:"h-[140px] w-full rounded-lg"},`preset-${e}`)}function nT(e,t){return t}function n$(e){let n,i,l,r,o,s,c,d,u,m,p,g=(0,v.c)(24),{columnCount:f,presetCount:h}=e,x=void 0===h?0:h;if(f<2){let e;return g[0]!==x?(e=(0,t.jsx)(nA,{presetCount:x}),g[0]=x,g[1]=e):e=g[1],e}g[2]!==f?(n=Array.from({length:f},nF),g[2]=f,g[3]=n):n=g[3];let b=n;g[4]===Symbol.for("react.memo_cache_sentinel")?(i=Array.from({length:8},nO),g[4]=i):i=g[4];let y=i;return g[5]!==b?(l=(0,t.jsx)("div",{className:"flex flex-col gap-2 md:hidden",children:b.map(nV)}),g[5]=b,g[6]=l):l=g[6],g[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("div",{className:"mb-2 flex h-9 items-center justify-end",children:(0,t.jsx)(a.Skeleton,{className:"h-5 w-56"})}),g[7]=r):r=g[7],g[8]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("div",{className:"w-32 shrink-0"}),g[8]=o):o=g[8],g[9]!==b?(s=(0,t.jsxs)("div",{className:"flex h-[60px] items-center gap-x-3 pr-2",children:[o,b.map(nz)]}),g[9]=b,g[10]=s):s=g[10],g[11]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("div",{className:"w-32 shrink-0"}),g[11]=c):c=g[11],g[12]!==b?(d=(0,t.jsxs)("div",{className:"mt-2 flex h-9 items-center gap-x-3 pr-2",children:[c,b.map(nD)]}),g[12]=b,g[13]=d):d=g[13],g[14]!==s||g[15]!==d?(u=(0,t.jsxs)("div",{className:"hidden flex-col md:flex md:pt-2 md:pb-2",children:[r,s,d]}),g[14]=s,g[15]=d,g[16]=u):u=g[16],g[17]!==b||g[18]!==y?(m=(0,t.jsx)("div",{className:"flex flex-col rounded-lg border border-border",children:y.map(e=>(0,t.jsxs)("div",{className:"flex h-12 items-center gap-x-3 border-b border-border px-4 last:border-b-0",children:[(0,t.jsx)(a.Skeleton,{className:"h-4 w-24 shrink-0 md:w-32"}),b.map(n=>(0,t.jsx)(a.Skeleton,{className:"h-4 flex-1"},`cell-${e}-${n}`))]},`row-${e}`))}),g[17]=b,g[18]=y,g[19]=m):m=g[19],g[20]!==u||g[21]!==m||g[22]!==l?(p=(0,t.jsxs)("div",{"data-slot":"compare-body-skeleton","aria-busy":"true",className:"flex min-h-dvh flex-col gap-3 md:gap-2",children:[l,u,m]}),g[20]=u,g[21]=m,g[22]=l,g[23]=p):p=g[23],p}function nD(e){return(0,t.jsx)(a.Skeleton,{className:"h-9 flex-1 rounded-lg"},`endpoint-${e}`)}function nz(e){return(0,t.jsx)(a.Skeleton,{className:"h-[60px] flex-1 rounded-lg"},`header-${e}`)}function nV(e){return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-[60px] w-full rounded-lg"}),(0,t.jsx)(a.Skeleton,{className:"h-9 w-full rounded-lg"})]},`mobile-${e}`)}function nO(e,t){return t}function nF(e,t){return t}var nE=e.i(6231);e.i(406201);var nB=e.i(806024);function nq(e){let n,i,l,r,a,o=(0,v.c)(9),{breadcrumbModels:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(nE.BreadcrumbItem,{children:(0,t.jsx)(nE.BreadcrumbLink,{render:(0,t.jsx)(nB.Link,{href:"/",children:"Home"})})}),i=(0,t.jsx)(nE.BreadcrumbSeparator,{children:"/"}),o[0]=n,o[1]=i):(n=o[0],i=o[1]),o[2]!==s.length?(l=(0,t.jsx)(nE.BreadcrumbItem,{children:0===s.length?(0,t.jsx)(nE.BreadcrumbPage,{children:"Compare"}):(0,t.jsx)(nE.BreadcrumbLink,{render:(0,t.jsx)(nB.Link,{href:"/compare",children:"Compare"})})}),o[2]=s.length,o[3]=l):l=o[3],o[4]!==s?(r=s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(nE.BreadcrumbSeparator,{children:"/"}),(0,t.jsx)(nE.BreadcrumbItem,{children:(0,t.jsx)(nE.BreadcrumbPage,{className:"truncate",children:s.map(nG).join(" vs ")})})]}),o[4]=s,o[5]=r):r=o[5],o[6]!==l||o[7]!==r?(a=(0,t.jsx)(nE.Breadcrumb,{children:(0,t.jsxs)(nE.BreadcrumbList,{className:"text-sm",children:[n,i,l,r]})}),o[6]=l,o[7]=r,o[8]=a):a=o[8],a}function nG(e){return(0,g.formatModelName)(e.short_name,{keepNote:!0})}function nH(e){let n,i,l,r,a,o,s,c,d=(0,v.c)(26),{summary:u,models:m}=e;if(d[0]!==u.heading?(n=(0,t.jsx)("h2",{id:"compare-summary-heading",className:"mb-3 text-xl font-semibold",children:u.heading}),d[0]=u.heading,d[1]=n):n=d[1],d[2]!==u.intro?(i=(0,t.jsx)("p",{className:"mb-3 text-muted-foreground",children:u.intro}),d[2]=u.intro,d[3]=i):i=d[3],d[4]!==m||d[5]!==u.sentences){let e;d[7]!==m?(e=(e,n)=>(0,t.jsx)("p",{className:"mb-3 text-muted-foreground",children:e},m[n]?.slotId??e),d[7]=m,d[8]=e):e=d[8],l=u.sentences.map(e),d[4]=m,d[5]=u.sentences,d[6]=l}else l=d[6];if(d[9]!==m||d[10]!==u.facts){let e;d[12]!==m?(e=e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-sm font-semibold",children:e.label}),(0,t.jsx)("dd",{className:"text-sm text-muted-foreground",children:(0,t.jsx)("ul",{children:e.values.map((e,n)=>(0,t.jsxs)("li",{children:[m[n]?.name,": ",e]},m[n]?.slotId??e))})})]},e.label),d[12]=m,d[13]=e):e=d[13],r=u.facts.map(e),d[9]=m,d[10]=u.facts,d[11]=r}else r=d[11];return d[14]!==r?(a=(0,t.jsx)("dl",{className:"mb-6 flex flex-col gap-3",children:r}),d[14]=r,d[15]=a):a=d[15],d[16]!==m?(o=m.map(nU),d[16]=m,d[17]=o):o=d[17],d[18]!==o?(s=(0,t.jsx)("ul",{className:"flex flex-wrap gap-4 text-sm",children:o}),d[18]=o,d[19]=s):s=d[19],d[20]!==n||d[21]!==i||d[22]!==l||d[23]!==a||d[24]!==s?(c=(0,t.jsxs)("section",{"aria-labelledby":"compare-summary-heading",className:"container mx-auto max-w-4xl px-4 pb-12",children:[n,i,l,a,s]}),d[20]=n,d[21]=i,d[22]=l,d[23]=a,d[24]=s,d[25]=c):c=d[25],c}function nU(e){return(0,t.jsx)("li",{children:(0,t.jsxs)(nB.Link,{href:e.href,className:"underline",children:[e.name," model details, providers and pricing"]})},e.slotId)}var nK=e.i(704318),nW=e.i(634723);e.i(204067);var nQ=e.i(748700),nY=e.i(922358);nW.OpenAIChatCompletionsContentPartImageSchema,e.i(971453);var nZ=e.i(475968);let nX={[nZ.VideoFrameType.first_frame]:"First frame",[nZ.VideoFrameType.last_frame]:"Last frame"};var nJ=e.i(130868),n0=e.i(126154),n1=e.i(946903),n2=e.i(652942);function n3(e){return e.trim().replaceAll(/\s+/g," ").toLowerCase()}function n5(e){return e.modality===ed.ModelExampleModality.Speech?e.request.input:e.request.prompt}function n4(e){let t=e.map(e=>new Set(e?.data?.filter(e=>e.modality!==ed.ModelExampleModality.Speech&&e.output_assets[0]).map(n5).filter(e=>void 0!==e).map(n3)??[]));return t.some(e=>0===e.size)?[]:[...t[0]??new Set].filter(e=>t.every(t=>t.has(e)))}function n8(e){return(0,f.isDefinedAndNotNull)(e)&&Number.isFinite(e)&&e>0}let n6=[["16:9",16/9],["9:16",9/16],["4:3",4/3],["3:4",3/4],["3:2",1.5],["2:3",2/3],["21:9",21/9],["1:1",1]],n7=["Aspect ratio","Resolution","Clip length","Quality","Size"];function n9(e){let t=n7.indexOf(e);return -1===t?n7.length:t}function ie(e,t){return(0,f.isDefinedAndNotNull)(t)&&t.length>0?{label:e,value:t}:void 0}function it(e){let n,l,r,a,o=(0,v.c)(10),{prompt:s,label:c,variant:d}=e,u=void 0===c?"Prompt used":c;if(!s)return null;let m="section"===(void 0===d?"section":d)&&"col-span-full px-4 pb-2 pt-1 md:px-5";return o[0]!==m?(n=(0,i.cn)("flex flex-col gap-1",m),o[0]=m,o[1]=n):n=o[1],o[2]!==u?(l=(0,t.jsx)("p",{className:"text-overline uppercase tracking-wider text-muted-foreground",children:u}),o[2]=u,o[3]=l):l=o[3],o[4]!==s?(r=(0,t.jsx)("p",{className:"text-body text-foreground",children:s}),o[4]=s,o[5]=r):r=o[5],o[6]!==n||o[7]!==l||o[8]!==r?(a=(0,t.jsxs)("div",{className:n,children:[l,r]}),o[6]=n,o[7]=l,o[8]=r,o[9]=a):a=o[9],a}function ii(e){let n,i,l=(0,v.c)(4),{chips:r}=e;return l[0]!==r?(n=r.map(il),l[0]=r,l[1]=n):n=l[1],l[2]!==n?(i=(0,t.jsx)(t.Fragment,{children:n}),l[2]=n,l[3]=i):i=l[3],i}function il(e){return(0,t.jsxs)(L.Badge,{size:"sm",className:"gap-1 border-border text-muted-foreground",children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"text-foreground",children:e.value})]},`${e.label}-${e.value}`)}function ir(e){let i,l,r,a,o,s,d=(0,v.c)(44),{model:u,example:m,asset:p,onClipMetadata:g}=e,h=(0,c.usePosthogClient)();if(m.modality===ed.ModelExampleModality.Speech){let e,i,l,r=m.title??"Speech preview",a=`Voice: ${m.request.voice}`;return d[0]!==m.request.response_format?(e=m.request.response_format?.toUpperCase(),d[0]=m.request.response_format,d[1]=e):e=d[1],d[2]!==m.request.voice||d[3]!==u||d[4]!==h?(i={onPlay:()=>{h.capture(n.PostHogEvent.ComparePlayExampleSpeech,{model_permaslug:u.permaslug,voice:m.request.voice})}},d[2]=m.request.voice,d[3]=u,d[4]=h,d[5]=i):i=d[5],d[6]!==p.url||d[7]!==r||d[8]!==a||d[9]!==e||d[10]!==i?(l=(0,t.jsx)(nJ.AudioPlayer,{src:p.url,title:r,description:a,metadata:e,className:"shadow-none",audioProps:i}),d[6]=p.url,d[7]=r,d[8]=a,d[9]=e,d[10]=i,d[11]=l):l=d[11],l}d[12]!==m?(i=function(e){if(!e)return"16 / 9";let[t,n]=e.split(":"),i=Number(t),l=Number(n);return!Number.isFinite(i)||!Number.isFinite(l)||i<=0||l<=0?"16 / 9":`${i} / ${l}`}(function(e){if(e.modality===ed.ModelExampleModality.Speech)return null;let t=e.request.aspect_ratio;if("string"==typeof t&&t.includes(":"))return t;let n=e.request.size;if(e.modality===ed.ModelExampleModality.Video&&"string"==typeof n){let[e,t]=n.split("x").map(Number);if(n8(e)&&n8(t))return`${e}:${t}`}let i=e.output_assets[0];return(0,f.isDefinedAndNotNull)(i?.width)&&(0,f.isDefinedAndNotNull)(i?.height)&&i.width>0&&i.height>0?`${i.width}:${i.height}`:null}(m)),d[12]=m,d[13]=i):i=d[13];let x=i;if(m.modality===ed.ModelExampleModality.Video){let e,i,l,r,a=`${u.short_name} generated example video`;return d[14]!==g?(e=e=>{let{videoWidth:t,videoHeight:n,duration:i}=e.currentTarget;g({width:t,height:n,durationSeconds:i})},d[14]=g,d[15]=e):e=d[15],d[16]!==x?(i={aspectRatio:x},d[16]=x,d[17]=i):i=d[17],d[18]!==u.permaslug||d[19]!==h?(l=()=>{h.capture(n.PostHogEvent.CompareViewExampleVideo,{model_permaslug:u.permaslug})},d[18]=u.permaslug,d[19]=h,d[20]=l):l=d[20],d[21]!==p.thumbnail_url||d[22]!==p.url||d[23]!==a||d[24]!==e||d[25]!==i||d[26]!==l?(r=(0,t.jsx)("video",{src:p.url,poster:p.thumbnail_url,controls:!0,playsInline:!0,preload:"metadata","aria-label":a,onLoadedMetadata:e,style:i,className:"w-full rounded-md bg-muted object-contain",onPlay:l}),d[21]=p.thumbnail_url,d[22]=p.url,d[23]=a,d[24]=e,d[25]=i,d[26]=l,d[27]=r):r=d[27],r}let b=`${u.short_name} example`;d[28]!==p.url||d[29]!==b?(l=[{url:p.url,name:b}],d[28]=p.url,d[29]=b,d[30]=l):l=d[30];let y=`${u.short_name} generated example`;return d[31]!==x?(r={aspectRatio:x},d[31]=x,d[32]=r):r=d[32],d[33]!==u.permaslug||d[34]!==h?(a=()=>{h.capture(n.PostHogEvent.CompareViewExampleImage,{model_permaslug:u.permaslug})},d[33]=u.permaslug,d[34]=h,d[35]=a):a=d[35],d[36]!==p.url||d[37]!==y||d[38]!==r||d[39]!==a?(o=(0,t.jsx)("img",{src:p.url,alt:y,style:r,className:"w-full rounded-md object-cover",onClick:a}),d[36]=p.url,d[37]=y,d[38]=r,d[39]=a,d[40]=o):o=d[40],d[41]!==l||d[42]!==o?(s=(0,t.jsx)(n2.ImagePreviewDialog,{images:l,children:o}),d[41]=l,d[42]=o,d[43]=s):s=d[43],s}function ia(e){let n,i,l,r,a,o,s,c,u=(0,v.c)(32),{model:m,example:p,isLoading:g,showPrompt:h,isBestDuration:x,isBestCost:y}=e,j=(0,d.useLocale)(),N=(0,eu.useHighlightBest)(),[_,k]=(0,b.useState)(null),S=p?.output_assets[0];if(g){let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading…"}),u[0]=e):e=u[0],e}if(!p||!S){let e;return u[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(tU.EmptyAnalyticsData,{message:"No approved example available",height:180}),u[1]=e):e=u[1],e}u[2]!==p.duration_ms||u[3]!==j?(n=(0,f.isDefinedAndNotNull)(p.duration_ms)?(0,n1.formatDuration)(j,p.duration_ms):null,u[2]=p.duration_ms,u[3]=j,u[4]=n):n=u[4];let w=n;u[5]!==p.cost||u[6]!==j?(i=(0,f.isDefinedAndNotNull)(p.cost)?`${(0,eQ.formatUsd)((0,eK.bn)(String(p.cost)).times(1),{locale:j,preset:"model-price"})??"—"}`:null,u[5]=p.cost,u[6]=j,u[7]=i):i=u[7];let M=i;u[8]!==_||u[9]!==p?(l=function(e,t){if(!t)return e;let n=new Set(e.map(e=>e.label)),i=n.has("Aspect ratio")?null:function(e,t){if(!n8(e)||!n8(t))return null;let n=e/t,i=n6.find(([,e])=>Math.abs(e-n)/e<=.05);return i?.[0]??null}(t.width,t.height),l=n.has("Clip length")||!n8(t.durationSeconds)?null:`${Math.round(t.durationSeconds)}s`;return[ie("Aspect ratio",i),...e,ie("Clip length",l)].filter(f.isDefinedAndNotNull).sort((e,t)=>n9(e.label)-n9(t.label))}(function(e){if(e.modality===ed.ModelExampleModality.Video){let{aspect_ratio:t,resolution:n,duration:i,size:l}=e.request;return[ie("Aspect ratio",t),ie("Resolution",n),(0,f.isDefinedAndNotNull)(i)&&i>0?{label:"Clip length",value:`${i}s`}:void 0,ie("Size",l)].filter(f.isDefinedAndNotNull)}if(e.modality===ed.ModelExampleModality.Speech)return[];let{aspect_ratio:t,resolution:n,quality:i,size:l}=e.request;return[ie("Aspect ratio",t),ie("Resolution",n),ie("Quality",i),ie("Size",l)].filter(f.isDefinedAndNotNull)}(p),_),u[8]=_,u[9]=p,u[10]=l):l=u[10];let C=l;u[11]!==p||u[12]!==h?(r=h?n5(p):void 0,u[11]=p,u[12]=h,u[13]=r):r=u[13];let P=p.modality===ed.ModelExampleModality.Speech?"Text synthesized":"Prompt used";return u[14]!==r||u[15]!==P?(a=(0,t.jsx)(it,{prompt:r,label:P,variant:"cell"}),u[14]=r,u[15]=P,u[16]=a):a=u[16],u[17]!==S||u[18]!==p||u[19]!==m?(o=(0,t.jsx)(ir,{model:m,example:p,asset:S,onClipMetadata:k}),u[17]=S,u[18]=p,u[19]=m,u[20]=o):o=u[20],u[21]!==C||u[22]!==M||u[23]!==w||u[24]!==N||u[25]!==y||u[26]!==x?(s=(w||M||C.length>0)&&(0,t.jsxs)("div",{className:"flex min-h-6 flex-wrap items-center gap-x-1.5 gap-y-1 text-overline text-muted-foreground",children:[w&&(0,t.jsx)("span",{className:N&&x?"rounded-sm bg-positive/12 px-1 py-0.5 font-medium text-positive-text":void 0,children:w}),w&&M&&(0,t.jsx)(n0.DotSeparator,{}),M&&(0,t.jsx)("span",{className:N&&y?"rounded-sm bg-positive/12 px-1 py-0.5 font-medium text-positive-text":void 0,children:M}),(0,t.jsx)(ii,{chips:C})]}),u[21]=C,u[22]=M,u[23]=w,u[24]=N,u[25]=y,u[26]=x,u[27]=s):s=u[27],u[28]!==a||u[29]!==o||u[30]!==s?(c=(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[a,o,s]}),u[28]=a,u[29]=o,u[30]=s,u[31]=c):c=u[31],c}function io({visibleIndices:e,exampleResults:t,prompt:n}){return e.map(e=>{var i;return i=t[e]?.data,null===n?i?.find(e=>e.output_assets[0]):i?.find(e=>{let t=n5(e);return void 0!==e.output_assets[0]&&void 0!==t&&n3(t)===n})})}function is(e,t){let n=e.map(e=>t[e]),i=n.some(e=>e?.isLoading);return n4(n).length>0||!!i||n.some(e=>e?.data?.some(e=>e.output_assets[0]))}function ic(e){let n,i,l,r,a,o=(0,v.c)(27),{visibleIndices:s,allModels:c,exampleResults:d,prompt:u,isFirst:m,isLoading:p,showPrompt:g,label:f}=e;o[0]!==d||o[1]!==u||o[2]!==s?(i=io({visibleIndices:s,exampleResults:d,prompt:u}),n=new Set((0,ep.winningValueIndices)(i.map(iu),"min")),l=new Set((0,ep.winningValueIndices)(i.map(id),"min")),o[0]=d,o[1]=u,o[2]=s,o[3]=n,o[4]=i,o[5]=l):(n=o[3],i=o[4],l=o[5]);let h=l;if(o[6]!==c||o[7]!==h||o[8]!==n||o[9]!==d||o[10]!==i||o[11]!==p||o[12]!==g||o[13]!==s){let e;o[15]!==c||o[16]!==h||o[17]!==n||o[18]!==d||o[19]!==i||o[20]!==p||o[21]!==g?(e=(e,l)=>{let r=c[e],a=d[e];return r?(0,t.jsx)(ia,{model:r,example:i[l],isLoading:!!a?.isLoading||p,showPrompt:g,isBestDuration:n.has(l),isBestCost:h.has(l)},r.permaslug):null},o[15]=c,o[16]=h,o[17]=n,o[18]=d,o[19]=i,o[20]=p,o[21]=g,o[22]=e):e=o[22],r=s.map(e),o[6]=c,o[7]=h,o[8]=n,o[9]=d,o[10]=i,o[11]=p,o[12]=g,o[13]=s,o[14]=r}else r=o[14];return o[23]!==m||o[24]!==f||o[25]!==r?(a=(0,t.jsx)(eu.DataRow,{isFirst:m,stacked:!0,hideLabel:!0,label:f,values:r}),o[23]=m,o[24]=f,o[25]=r,o[26]=a):a=o[26],a}function id(e){return e?.cost??null}function iu(e){return e?.duration_ms??null}function im(e){let n,i,l,r,a=(0,v.c)(13),{visibleIndices:o,allModels:s,exampleResults:c}=e;if(s.length>ey)throw Error(`CompareExamplesContent supports at most ${ey} models`);if(a[0]!==s||a[1]!==c||a[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{let e;a[6]!==c?(e=e=>c[e],a[6]=c,a[7]=e):e=a[7];let r=o.map(e);n=r.some(ip);let d=n4(r).slice(0,4);if(i=is(o,c),d.length>0){l=(0,t.jsx)(t.Fragment,{children:d.map((e,n)=>{let i=io({visibleIndices:o,exampleResults:c,prompt:e}).find(f.isDefinedAndNotNull),l=void 0===i?void 0:n5(i);return(0,t.jsxs)(b.Fragment,{children:[(0,t.jsx)(it,{prompt:l,label:i?.modality===ed.ModelExampleModality.Speech?"Text synthesized":"Prompt used"}),(0,t.jsx)(ic,{visibleIndices:o,allModels:s,exampleResults:c,prompt:e,isFirst:0===n,isLoading:!1,showPrompt:!1,label:""})]},e)})});break e}}a[0]=s,a[1]=c,a[2]=o,a[3]=n,a[4]=i,a[5]=l}else n=a[3],i=a[4],l=a[5];return l!==Symbol.for("react.early_return_sentinel")?l:i?(a[8]!==s||a[9]!==c||a[10]!==n||a[11]!==o?(r=(0,t.jsx)(ic,{visibleIndices:o,allModels:s,exampleResults:c,prompt:null,isFirst:!0,isLoading:n,showPrompt:!0,label:"Pregenerated examples"}),a[8]=s,a[9]=c,a[10]=n,a[11]=o,a[12]=r):r=a[12],r):null}function ip(e){return e?.isLoading}var ig=e.i(470573),ih=e.i(570667);let ix={n:"Images per request",duration:"Clip length",frame_images:"Frame images",generate_audio:"Audio generation"};function ib(e){let i,l,r,a,o,s,u,m,g,f,h,x,b,y,j,_,k=(0,v.c)(151),{effectiveColumnCount:S,mobileColumnLabels:w,totalColumns:M,visibleIndices:C,allModels:P,allEndpointData:I,visibleModels:L,exampleResults:A}=e,R=(0,d.useLocale)(),T=(0,c.usePosthogClient)();if(k[0]!==I||k[1]!==P||k[2]!==S||k[3]!==A||k[4]!==R||k[5]!==w||k[6]!==T||k[7]!==M||k[8]!==C||k[9]!==L){let e,c,d,v,j,_,D,z,V,O,F,E,B,q,G,H,U,W,Q,Y,Z,X,J,ee,et,en,ei,el,er,ea,eo,es,ec,ed,em,eg=eI(L),ef=(ed=eI(L),em=eA(L)||eR(L)||eT(L)?eP[ed]:eP[eM.Text],L.some(e=>{if(e.output_modalities.includes(N.OutputModality.Text))return!1;let{perfWorkload:t}=(0,eS.getProviderTablePerfSelector)(e);return t===ek.PerfWorkload.ImageGeneration&&!eA(L)||t===ek.PerfWorkload.VideoGeneration&&!eR(L)})?{hideRows:new Set([...em.hideRows,...e$])}:em),eh=eg===eM.Image,ex=eg===eM.Video,eb=eh||ex,ev=eg!==eM.Text;k[24]!==ex?(e=e=>ex?function(e){if(!e)return{};let t={};return e.supported_resolutions?.length&&(t.resolution={type:nQ.CapabilityType.Enum,values:[...e.supported_resolutions]}),e.supported_aspect_ratios?.length&&(t.aspect_ratio={type:nQ.CapabilityType.Enum,values:[...e.supported_aspect_ratios]}),e.supported_sizes?.length&&(t.size={type:nQ.CapabilityType.Enum,values:[...e.supported_sizes]}),e.supported_durations?.length&&(t.duration={type:nQ.CapabilityType.Enum,values:e.supported_durations.toSorted((e,t)=>e-t).map(e=>`${e}s`)}),e.supported_frame_images?.length&&(t.frame_images={type:nQ.CapabilityType.Enum,values:e.supported_frame_images.map(e=>nX[e])}),!0===e.generate_audio&&(t.generate_audio={type:nQ.CapabilityType.Boolean}),!0===e.seed&&(t.seed={type:nQ.CapabilityType.Boolean}),t}(e.endpoint?.supported_video_parameters):function(e){let t;return e?(t={},e.resolutions?.length&&(t.resolution={type:nQ.CapabilityType.Enum,values:[...e.resolutions]}),e.aspect_ratios?.length&&(t.aspect_ratio={type:nQ.CapabilityType.Enum,values:[...e.aspect_ratios]}),e.output_formats?.length&&(t.output_format={type:nQ.CapabilityType.Enum,values:[...e.output_formats]}),e.qualities?.length&&(t.quality={type:nQ.CapabilityType.Enum,values:[...e.qualities]}),e.backgrounds?.length&&(t.background={type:nQ.CapabilityType.Enum,values:[...e.backgrounds]}),(0,nY.hasCompleteImageParameterRange)(e.n)&&(t.n={type:nQ.CapabilityType.Range,min:e.n.min,max:e.n.max}),(0,nY.hasCompleteImageParameterRange)(e.input_references)&&(t.input_references={type:nQ.CapabilityType.Range,min:e.input_references.min,max:e.input_references.max}),(0,nY.hasCompleteImageParameterRange)(e.output_compression)&&(t.output_compression={type:nQ.CapabilityType.Range,min:e.output_compression.min,max:e.output_compression.max}),e.seed&&(t.seed={type:nQ.CapabilityType.Boolean}),e.size&&(t.size={type:nQ.CapabilityType.Boolean}),t):null}(e.endpoint?.supported_image_parameters)??{},k[24]=ex,k[25]=e):e=k[25];let ey=e;k[26]!==A||k[27]!==ev||k[28]!==C?(c=ev&&is(C,A),k[26]=A,k[27]=ev,k[28]=C,k[29]=c):c=k[29];let ej=c;k[30]!==P||k[31]!==C?(d=e=>(0,ep.buildValues)(C,P,e),k[30]=P,k[31]=C,k[32]=d):d=k[32];let eN=d;k[33]!==P||k[34]!==C?(v=e=>(0,ep.lowestVisibleIndex)(C,P,e),k[33]=P,k[34]=C,k[35]=v):v=k[35];let e_=v;k[36]!==P||k[37]!==C?(j=(e,t)=>(0,ep.highestVisibleIndex)({visibleIndices:C,allModels:P,extract:e,options:t}),k[36]=P,k[37]=C,k[38]=j):j=k[38];let ew=j;k[39]!==L?(_=(0,ep.anyModel)(L,iB),k[39]=L,k[40]=_):_=k[40];let eC=_;k[41]!==L?(D=(0,ep.anyModel)(L,iE),k[41]=L,k[42]=D):D=k[42];let eL=D;k[43]!==L?(z=(0,ep.anyModel)(L,iF),k[43]=L,k[44]=z):z=k[44];let ez=z;k[45]!==I||k[46]!==eC?(V=eC&&I.some(iO),k[45]=I,k[46]=eC,k[47]=V):V=k[47];let eV=V,eO=new Map(L.map(e=>[(0,p.getModelVariantSlug)(e),e.endpoint?.display_pricing??[]])),eF=Array.from(new Map(L.flatMap(e=>e7(eO.get((0,p.getModelVariantSlug)(e))??[])).map(iV)).values()),eE=new Map(L.map(e=>[(0,p.getModelVariantSlug)(e),new Map(e7(eO.get((0,p.getModelVariantSlug)(e))??[]).map(iz))])),eB=eF.length>0,eq=ez&&!ef.hideRows.has("quantization"),eG=!ef.hideRows.has("max-output-tokens");k[48]!==ey?(O=e=>Object.keys(ey(e)).length>0,k[48]=ey,k[49]=O):O=k[49],k[50]!==O||k[51]!==L?(F=(0,ep.anyModel)(L,O),k[50]=O,k[51]=L,k[52]=F):F=k[52];let eH=F;k[53]!==ey?(E=e=>Object.keys(ey(e)),k[53]=ey,k[54]=E):E=k[54];let eY=Array.from(new Set(L.flatMap(E))).toSorted();k[55]!==M?(B=(0,t.jsx)(eu.SectionHeader,{id:"section-overview",title:"Overview",totalColumns:M}),k[55]=M,k[56]=B):B=k[56],k[57]!==P||k[58]!==A||k[59]!==ej||k[60]!==C?(q=ej&&(0,t.jsx)(im,{visibleIndices:C,allModels:P,exampleResults:A}),k[57]=P,k[58]=A,k[59]=ej,k[60]=C,k[61]=q):q=k[61];let eZ=!ej;k[62]!==eN?(G=eN(iD),k[62]=eN,k[63]=G):G=k[63],k[64]!==eZ||k[65]!==G?(H=(0,t.jsx)(eu.DataRow,{isFirst:eZ,label:"Author",values:G}),k[64]=eZ,k[65]=G,k[66]=H):H=k[66],k[67]!==R?(U=e=>(0,t.jsx)(tT,{value:e.context_length?(0,eD.formatNumber)(e.context_length,{locale:R,preset:"compact-rounded-thousands"})??"—":null,units:"tokens"}),k[67]=R,k[68]=U):U=k[68],k[69]!==eN||k[70]!==U?(W=eN(U),k[69]=eN,k[70]=U,k[71]=W):W=k[71],k[72]!==ew?(Q=ew(i$),k[72]=ew,k[73]=Q):Q=k[73],k[74]!==W||k[75]!==Q?(Y=(0,t.jsx)(eu.DataRow,{label:"Context length",values:W,bestIndices:Q}),k[74]=W,k[75]=Q,k[76]=Y):Y=k[76],k[77]!==eN?(Z=eN(iT),k[77]=eN,k[78]=Z):Z=k[78],k[79]!==Z?(X=(0,t.jsx)(eu.DataRow,{label:"Reasoning",values:Z}),k[79]=Z,k[80]=X):X=k[80],k[81]!==eN?(J=eN(iR),k[81]=eN,k[82]=J):J=k[82],k[83]!==J?(ee=(0,t.jsx)(eu.DataRow,{label:"Input modalities",values:J}),k[83]=J,k[84]=ee):ee=k[84],k[85]!==eN?(et=eN(iA),k[85]=eN,k[86]=et):et=k[86],k[87]!==et?(en=(0,t.jsx)(eu.DataRow,{label:"Output modalities",values:et}),k[87]=et,k[88]=en):en=k[88],k[89]!==I?(ei=(e,n)=>{let i=I[n];return i?.isLoading?(0,t.jsx)($.LoadingDots,{}):i?.endpointStats?(0,t.jsx)(K,{providers:i.availableProviders,variant:"inline",className:"text-foreground underline"}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})},k[89]=I,k[90]=ei):ei=k[90],k[91]!==eN||k[92]!==ei?(el=eN(ei),k[91]=eN,k[92]=ei,k[93]=el):el=k[93],k[94]!==I||k[95]!==C?(er=(e,t)=>{let n=I[C[t]??0];return n?.endpointStats?n.availableProviders.length:null},k[94]=I,k[95]=C,k[96]=er):er=k[96],k[97]!==ew||k[98]!==er?(ea=ew(er),k[97]=ew,k[98]=er,k[99]=ea):ea=k[99],k[100]!==el||k[101]!==ea?(eo=(0,t.jsx)(eu.DataRow,{label:"Providers",values:el,bestIndices:ea}),k[100]=el,k[101]=ea,k[102]=eo):eo=k[102],k[103]!==S||k[104]!==w||k[105]!==B||k[106]!==q||k[107]!==H||k[108]!==Y||k[109]!==X||k[110]!==ee||k[111]!==en||k[112]!==eo?(a=(0,t.jsxs)(eu.SectionGrid,{columnCount:S,mobileColumnLabels:w,children:[B,q,H,Y,X,ee,en,eo]}),k[103]=S,k[104]=w,k[105]=B,k[106]=q,k[107]=H,k[108]=Y,k[109]=X,k[110]=ee,k[111]=en,k[112]=eo,k[113]=a):a=k[113],o=(eC||eL||eV||eB)&&(0,t.jsxs)(eu.SectionGrid,{columnCount:S,mobileColumnLabels:w,children:[(0,t.jsx)(eu.SectionHeader,{id:"section-pricing",title:"Pricing",totalColumns:M}),eC&&(0,t.jsx)(eu.DataRow,{isFirst:!0,label:"Input",values:eN(e=>te(e.endpoint?.pricing.prompt,e.output_modalities)?tz(R,e.endpoint?.pricing.prompt,1e6,"M tokens"):tz(R,null,1e6,"M tokens")),bestIndices:e_(iL)}),eC&&(0,t.jsx)(eu.DataRow,{label:"Output",values:eN(e=>te(e.endpoint?.pricing.completion,e.output_modalities)?tz(R,e.endpoint?.pricing.completion,1e6,"M tokens"):tz(R,null,1e6,"M tokens")),bestIndices:e_(iI)}),eL&&(0,t.jsx)(eu.DataRow,{isFirst:!eC,label:"Cached input",values:eN(e=>te(e.endpoint?.pricing.input_cache_read,e.output_modalities)?tz(R,e.endpoint?.pricing.input_cache_read,1e6,"M tokens"):tz(R,null,1e6,"M tokens")),bestIndices:e_(iP)}),eV&&(0,t.jsx)(eu.DataRow,{label:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Weighted Average Input",(0,t.jsx)(eU.Tooltip,{side:"right",className:"max-w-xs",content:"The average price actually paid per million input tokens, cached or uncached, over the past day, factoring in provider traffic.",children:(0,t.jsx)("button",{type:"button",tabIndex:-1,className:"inline-flex shrink-0 cursor-help text-muted-foreground","aria-label":"Effective blended input explanation",children:(0,t.jsx)(nK.InformationCircleIcon,{className:"h-4 w-4"})})})]}),values:eN((e,n)=>{let i=I[n];return i?.isEffectivePricingLoading?(0,t.jsx)($.LoadingDots,{}):tz(R,i?.effectiveInputPrice===null||i?.effectiveInputPrice===void 0?null:(0,eK.bn)(i.effectiveInputPrice).div(1e6),1e6,"M tokens")}),bestIndices:e_((e,t)=>{let n=I[C[t]??0];return n?.effectiveInputPrice??null})}),eB&&eF.map((e,i)=>{let l,r,a=L.map(t=>eE.get((0,p.getModelVariantSlug)(t))?.get(e.key)),o=!(void 0!==(r=(l=a.filter(e=>void 0!==e))[0])&&l.every(e=>e.unitLabel===r.unitLabel&&e.displayMultiplier===r.displayMultiplier)),s=a.some(iC),c=[...new Set(a.filter(iM).map(iw))],d=o?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[e.sku_label,(0,t.jsx)(eU.Tooltip,{content:`Providers bill in different units: ${c.join(", ")}. Prices aren't directly comparable.`,children:(0,t.jsx)(nK.InformationCircleIcon,{className:"size-3.5 cursor-help text-muted-foreground",onPointerEnter:()=>{T.capture(n.PostHogEvent.CompareViewMixedPricingUnitInfo,{model_permaslugs:L.map(iS),pricing_sku:e.sku_label,pricing_units:c})}})})]}):e.sku_label;return(0,t.jsx)(eu.DataRow,{isFirst:!eC&&!eL&&0===i,label:d,values:eN(n=>{let i,l,r,a=eE.get((0,p.getModelVariantSlug)(n))?.get(e.key);return a?(i=tt(a),l=function(e,t){let n=t.tiers?.filter(e=>(0,eK.bn)(e.price).gt(0))??[];if(0===n.length)return[];let i=tt(t);return n.every(e=>(0,eK.bn)(e.price).eq(i.price))?[]:n.map(n=>`${n.sku_label} ${(0,eQ.formatUsd)((0,eK.bn)(n.price).times(t.displayMultiplier),{locale:e,preset:"model-price"})??"—"}`)}(R,a),r=`${(0,eQ.formatUsd)((0,eK.bn)(i.price).times(i.displayMultiplier),{locale:R,preset:"model-price"})??"—"}`,(0,t.jsxs)("span",{className:"flex flex-col items-start gap-0.5 md:items-end",children:[(0,t.jsxs)("span",{className:"inline-flex items-baseline gap-1",children:[l.length>0&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"from"}),(0,t.jsx)("span",{className:"text-sm font-medium tabular-nums text-foreground",children:r}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:tn(i.unitLabel)})]}),l.length>0&&(0,t.jsx)("span",{className:"flex max-w-full flex-col items-start text-xs tabular-nums text-muted-foreground md:items-end md:text-right",children:l.map(e=>(0,t.jsx)("span",{children:e},e))})]})):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})}),bestIndices:o||s?void 0:e_(t=>{let n,i=eE.get((0,p.getModelVariantSlug)(t))?.get(e.key);return i?Number((n=tt(i)).price)*n.displayMultiplier:null})},e.key)})]}),s=ef.hideRows.has("latency")&&ef.hideRows.has("throughput")&&ef.hideRows.has("visualize-performance")?null:(0,t.jsxs)(eu.SectionGrid,{columnCount:S,mobileColumnLabels:w,children:[(0,t.jsx)(eu.SectionHeader,{id:"section-performance",title:"Performance",totalColumns:M}),!ef.hideRows.has("latency")&&(0,t.jsx)(eu.DataRow,{isFirst:!0,label:"Latency (p50)",values:eN((e,n)=>{let i=I[n]?.currentProviderStats?.stats;return(0,t.jsx)(tT,{value:i?.p50_latency?(0,eW.formatNativeFixed)(i.p50_latency/1e3,{locale:R,fractionDigits:2})??"—":null,units:"s"})}),bestIndices:e_((e,t)=>I[C[t]??0]?.currentProviderStats?.stats?.p50_latency??null)}),!ef.hideRows.has("throughput")&&(0,t.jsx)(eu.DataRow,{isFirst:ef.hideRows.has("latency"),label:"Throughput (p50)",values:eN((e,n)=>{let i=I[n]?.currentProviderStats?.stats;return(0,t.jsx)(tT,{value:i?.p50_throughput?(0,eW.formatNativeFixed)(i.p50_throughput,{locale:R,fractionDigits:1})??"—":null,units:"tok/s"})}),bestIndices:ew((e,t)=>I[C[t]??0]?.currentProviderStats?.stats?.p50_throughput??null)}),!ef.hideRows.has("visualize-performance")&&(0,t.jsx)(eu.DataRow,{stacked:!0,hideLabel:!0,isFirst:ef.hideRows.has("latency")&&ef.hideRows.has("throughput"),label:"Visualize",values:eN((e,n)=>(0,t.jsx)(tH,{endpointData:I[n]}))})]}),i=eu.SectionGrid,l=S,u=w,k[114]!==M?(m=(0,t.jsx)(eu.SectionHeader,{id:"section-features",title:"Features",totalColumns:M}),k[114]=M,k[115]=m):m=k[115],k[116]!==eN||k[117]!==eq?(g=eq&&(0,t.jsx)(eu.DataRow,{isFirst:!0,label:"Quantization",values:eN(ik)}),k[116]=eN,k[117]=eq,k[118]=g):g=k[118],k[119]!==eN||k[120]!==ew||k[121]!==R||k[122]!==eG||k[123]!==eq?(f=eG&&(0,t.jsx)(eu.DataRow,{isFirst:!eq,label:"Max output tokens",values:eN(e=>(0,t.jsx)(tT,{value:e.endpoint?.max_completion_tokens?(0,eD.formatNumber)(e.endpoint.max_completion_tokens,{locale:R,preset:"compact-rounded-thousands"})??"—":null})),bestIndices:ew(i_)}),k[119]=eN,k[120]=ew,k[121]=R,k[122]=eG,k[123]=eq,k[124]=f):f=k[124];let eX=!eq&&!eG;k[125]!==eN?(es=eN(iN),k[125]=eN,k[126]=es):es=k[126],k[127]!==eX||k[128]!==es?(h=(0,t.jsx)(eu.DataRow,{isFirst:eX,label:"Stream cancellation",values:es}),k[127]=eX,k[128]=es,k[129]=h):h=k[129],x=!ef.hideRows.has("tool-use")&&(0,t.jsx)(eu.DataRow,{label:"Tool use",values:eN(ij)}),k[130]!==eN?(ec=eN(iy),k[130]=eN,k[131]=ec):ec=k[131],k[132]!==ec?(b=(0,t.jsx)(eu.DataRow,{label:"No prompt training",values:ec}),k[132]=ec,k[133]=b):b=k[133],y=!ef.hideRows.has("caching")&&(0,t.jsx)(eu.DataRow,{label:"Caching",values:eN(iv)}),r=eb&&eH&&eY.map(e=>(0,t.jsx)(eu.DataRow,{label:function(e){let t=ix[e];if(t)return t;let n=e.replaceAll("_"," ");return 0===n.length?n:`${n[0].toUpperCase()}${n.slice(1)}`}(e),values:eN(n=>{let i=ey(n)[e];return i?i.type===nQ.CapabilityType.Boolean?(0,t.jsx)(tD,{value:!0}):(0,t.jsx)("span",{className:"min-w-0 flex-1 text-right text-sm text-muted-foreground",children:(0,ig.getCompareCapabilityValuesLabel)(i)}):(0,t.jsx)(tD,{value:!1})}),bestIndices:(0,ig.hasComparableCapabilityType)(L.map(t=>ey(t)[e]))?ew(t=>(0,ig.getCapabilityComparableValue)(ey(t)[e]),{includeZeroValues:!0}):[]},e)),k[0]=I,k[1]=P,k[2]=S,k[3]=A,k[4]=R,k[5]=w,k[6]=T,k[7]=M,k[8]=C,k[9]=L,k[10]=i,k[11]=l,k[12]=r,k[13]=a,k[14]=o,k[15]=s,k[16]=u,k[17]=m,k[18]=g,k[19]=f,k[20]=h,k[21]=x,k[22]=b,k[23]=y}else i=k[10],l=k[11],r=k[12],a=k[13],o=k[14],s=k[15],u=k[16],m=k[17],g=k[18],f=k[19],h=k[20],x=k[21],b=k[22],y=k[23];return k[134]!==i||k[135]!==l||k[136]!==r||k[137]!==u||k[138]!==m||k[139]!==g||k[140]!==f||k[141]!==h||k[142]!==x||k[143]!==b||k[144]!==y?(j=(0,t.jsxs)(i,{columnCount:l,mobileColumnLabels:u,children:[m,g,f,h,x,b,y,r]}),k[134]=i,k[135]=l,k[136]=r,k[137]=u,k[138]=m,k[139]=g,k[140]=f,k[141]=h,k[142]=x,k[143]=b,k[144]=y,k[145]=j):j=k[145],k[146]!==a||k[147]!==o||k[148]!==s||k[149]!==j?(_=(0,t.jsxs)(t.Fragment,{children:[a,o,s,j]}),k[146]=a,k[147]=o,k[148]=s,k[149]=j,k[150]=_):_=k[150],_}function iv(e){return(0,t.jsx)(tD,{value:!!e.endpoint?.pricing.input_cache_read})}function iy(e){return(0,t.jsx)(tD,{value:!e.endpoint?.data_policy.training})}function ij(e){return(0,t.jsx)(tD,{value:e.endpoint?.supports_tool_parameters})}function iN(e){return(0,t.jsx)(tD,{value:e.endpoint?.can_abort})}function i_(e){return e.endpoint?.max_completion_tokens}function ik(e){return(0,t.jsx)(tR,{values:e.endpoint?.quantization??null,variant:"square"})}function iS(e){return e.permaslug}function iw(e){return e.unitLabel}function iM(e){return void 0!==e}function iC(e){return void 0===e}function iP(e){return e.endpoint?.pricing.input_cache_read===null||e.endpoint?.pricing.input_cache_read===void 0?null:Number(e.endpoint.pricing.input_cache_read)}function iI(e){return e.endpoint?.pricing.completion===null||e.endpoint?.pricing.completion===void 0?null:Number(e.endpoint.pricing.completion)}function iL(e){return e.endpoint?.pricing.prompt===null||e.endpoint?.pricing.prompt===void 0?null:Number(e.endpoint.pricing.prompt)}function iA(e){return(0,t.jsx)(tO,{modalities:e.output_modalities??null})}function iR(e){return(0,t.jsx)(tO,{modalities:e.input_modalities??null})}function iT(e){return(0,t.jsx)(tD,{value:e.supports_reasoning})}function i$(e){return e.context_length}function iD(e){return(0,t.jsx)(ih.AuthorPill,{author:e.author,label:e.author_display_name??e.author,variant:"inline",hideIcon:!0,className:"text-foreground underline"})}function iz(e){return[e.key,e]}function iV(e){return[e.key,e]}function iO(e){return(0,f.isDefinedAndNotNull)(e?.effectiveInputPrice)}function iF(e){return!!e.endpoint?.quantization&&""!==e.endpoint.quantization.trim()}function iE(e){return(0,ep.isPricedField)(e.endpoint?.pricing.input_cache_read)&&e9(e.endpoint?.pricing.input_cache_read,e.output_modalities)}function iB(e){return(0,ep.isPricedField)(e.endpoint?.pricing.prompt)&&e9(e.endpoint?.pricing.prompt,e.output_modalities)||(0,ep.isPricedField)(e.endpoint?.pricing.completion)&&e9(e.endpoint?.pricing.completion,e.output_modalities)}let iq=b.forwardRef(function({title:e,titleId:t,...n},i){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{fillRule:"evenodd",d:"M4.848 2.771A49.144 49.144 0 0 1 12 2.25c2.43 0 4.817.178 7.152.52 1.978.292 3.348 2.024 3.348 3.97v6.02c0 1.946-1.37 3.678-3.348 3.97-1.94.284-3.916.455-5.922.505a.39.39 0 0 0-.266.112L8.78 21.53A.75.75 0 0 1 7.5 21v-3.955a48.842 48.842 0 0 1-2.652-.316c-1.978-.29-3.348-2.024-3.348-3.97V6.741c0-1.946 1.37-3.68 3.348-3.97Z",clipRule:"evenodd"}))});var iG=e.i(528164);function iH(e){let i,l,r,a,o,s,d,u=(0,v.c)(17),{nextEmptySlot:m,disabledForAdd:p,onAddModel:g,breadcrumbModels:f,chatUrl:h}=e,x=(0,c.usePosthogClient)();return u[0]!==p||u[1]!==m||u[2]!==g?(i=null!==m?(0,t.jsx)(G.ModelSelect,{isDialog:!0,onDone:e=>g(m,e),disabledModelSlugs:p,children:(0,t.jsxs)(iG.Button,{size:"sm",className:"flex-1 gap-1.5",children:[(0,t.jsx)(y,{className:"!size-3.5"}),(0,t.jsx)("span",{children:"Add model"})]})}):(0,t.jsx)(eU.Tooltip,{content:`Maximum ${ey} models reached`,children:(0,t.jsxs)(iG.Button,{size:"sm",disabled:!0,className:"flex-1 gap-1.5",children:[(0,t.jsx)(y,{className:"!size-3.5"}),(0,t.jsx)("span",{children:"Add model"})]})}),u[0]=p,u[1]=m,u[2]=g,u[3]=i):i=u[3],u[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(iq,{className:"!size-3.5"}),r=(0,t.jsx)("span",{children:"Chat"}),u[4]=l,u[5]=r):(l=u[4],r=u[5]),u[6]!==h?(a=(0,t.jsxs)("a",{href:h,target:"_blank",rel:"noreferrer",children:[l,r]}),u[6]=h,u[7]=a):a=u[7],u[8]!==f||u[9]!==x?(o=()=>{x.capture(n.PostHogEvent.CompareClickChatButton,{models:f.map(iU)})},u[8]=f,u[9]=x,u[10]=o):o=u[10],u[11]!==a||u[12]!==o?(s=(0,t.jsx)(iG.Button,{render:a,size:"sm",variant:"outline",className:"flex-1 gap-1.5",onClick:o}),u[11]=a,u[12]=o,u[13]=s):s=u[13],u[14]!==i||u[15]!==s?(d=(0,t.jsxs)("div",{className:"mx-0.5 flex flex-row items-stretch gap-1 rounded-lg border border-border bg-background p-1",children:[i,s]}),u[14]=i,u[15]=s,u[16]=d):d=u[16],d}function iU(e){return(0,p.getModelVariantSlug)(e)}var iK=e.i(353524);function iW(e){return(0,iK.authorModelsOptions)(e)}function iQ(e){return e?.author??null}var iY=e.i(428755),iZ=e.i(179273),iX=e.i(585351),iJ=e.i(341910);function i0(e,t){let n,i=e?{permaslug:e.permaslug,variant:e.endpoint?.variant??iZ.StaticVariant.Standard}:null,{data:l,isLoading:r}=(0,z.useQuery)((0,iX.endpointStatsOptions)(e&&i?{...i,...(n=(0,eS.getProviderTablePerfSelector)(e)).perfWorkload===ek.PerfWorkload.ImageGeneration&&!eA(t)||n.perfWorkload===ek.PerfWorkload.VideoGeneration&&!eR(t)?{perfWorkload:ek.PerfWorkload.TextGeneration,latencyMetric:"latency"}:n}:null)),{data:a,isLoading:o}=(0,z.useQuery)((0,iX.effectivePricingSummaryOptions)(i)),s=a?.response,{fixture:c,isPending:d}=(0,iJ.useDevEndpointStatsFixture)(e?(0,p.getModelVariantSlug)(e):void 0),u=(0,b.useMemo)(()=>{let e=l??[];return e.length>0?e:c??l},[l,c]),m=(0,b.useMemo)(()=>u?Array.from(new Set(u.map(e=>e.provider_name).filter(e=>(0,f.isDefinedAndNotNull)(e)))):[],[u]),g=(0,b.useMemo)(()=>{let e=new Map;if(!u)return e;for(let t of u)t.provider_name&&!e.has(t.provider_name)&&e.set(t.provider_name,{displayName:t.provider_display_name,icon:t.provider_info.icon});return e},[u]),h=(0,b.useMemo)(()=>{if(!u||0===u.length||!e?.endpoint)return null;let t=u.find(t=>t.provider_name===e.endpoint?.provider_info.name)??null;return t||null},[u,e?.endpoint]),x=(0,b.useMemo)(()=>{let e=s?.weightedInputPrice;if("number"!=typeof e||!Number.isFinite(e))return null;let t=s?.providerSummaries?.some(e=>e.totalTokens>0);return 0!==e||t?e:null},[s]),v=d&&!u?.length;return{endpointStats:u,isLoading:r||v,effectiveInputPrice:x,isEffectivePricingLoading:o,availableProviders:m,providerInfoMap:g,currentProviderStats:h}}var i1=e.i(416363),i2=e.i(612960),i3=e.i(615366),i5=e.i(387353);function i4(e){var t;t=function(e){let[,...t]=e.split("/").filter(e=>e.length>0);return["/compare",...eb.slice(0,Math.floor(t.length/2)).flat()].join("/")}(e),i5.useRenderedRouteStore.getState().setPageNamedRoute({pathname:e,viewName:t}),(0,i3.setDatadogRumViewName)(t)}e.s(["ModelCompare",0,function({initialApiPresets:e,initialResolvedPresets:y,serverHeadline:j,serverSummary:_}){var k,S;let w,M,C,P,I,L,A,R,T,$,D=(0,d.useLocale)(),z=(0,c.usePosthogClient)(),V=(0,x.useParams)(),O=(0,i2.useLocalizedRouter)(),F=(0,s.useHydrated)(),{availableTextModels:E,isReady:B}=(0,m.useGlobal)(),[q,G]=(0,b.useState)(),[H,U]=(0,b.useState)(),[K,Y]=(0,b.useState)(),[Z,X]=(0,b.useState)(),[J,ee]=(0,b.useState)(),{stickyHeaderRowRef:et,stickyCardsWrapperRef:ei,tableViewportRef:el,canScrollLeft:er,canScrollRight:ea,handleSyncedScrollLeftChange:eo}=(0,iY.useCompareScroll)(),[em,eh]=(0,b.useState)(!1),[eb,e_]=(0,b.useState)(!1),ek=function(e){let{model1:t,model2:n,model3:i,model4:l,model5:r}=e,a=[t,n,i,l,r].map(iQ),o=[...new Set(a)],s=(0,h.useQueries)({queries:o.map(iW)}),c=new Map(o.map((e,t)=>[e,s[t]?.data?.author]));return a.map(e=>c.get(e))}({model1:q,model2:H,model3:K,model4:Z,model5:J}),eS=V?.["maker-id"],eM=V?.slug,eC=V?.["compare-maker-id"],eP=V?.["compare-slug"],eL=V?.["compare-maker-id-2"],e$=V?.["compare-slug-2"],eD=V?.["compare-maker-id-3"],ez=V?.["compare-slug-3"],eF=V?.["compare-maker-id-4"],eE=V?.["compare-slug-4"],eq=(0,b.useMemo)(()=>({makerId:eS,slug:eM,compareMakerId:eC,compareSlug:eP,compareMakerId2:eL,compareSlug2:e$,compareMakerId3:eD,compareSlug3:ez,compareMakerId4:eF,compareSlug4:eE}),[eS,eM,eC,eP,eL,e$,eD,ez,eF,eE]),eG=(0,b.useMemo)(()=>[q,H,K,Z,J],[q,H,K,Z,J]),eH=(0,b.useRef)(null);(0,b.useEffect)(()=>{var e;let t;if(!B||0===E.length)return;let n=(e=eH.current,t=ev(eq),null!==e&&t===e?{action:"skip",key:t}:{action:"sync",key:t});if("skip"===n.action)return void eh(!0);if(eH.current=n.key,function({routeParams:e,models:t,hasLocallyChangedSelection:n}){return!!n&&ev(ef(e))!==ej(t)}({routeParams:eq,models:eG,hasLocallyChangedSelection:eb})&&e_(!1),!eS||!eM){G(void 0),U(void 0),Y(void 0),X(void 0),ee(void 0),eh(!0);return}G(eg(E,eS,eM)),U(eg(E,eC,eP)),Y(eg(E,eL,e$)),X(eg(E,eD,ez)),ee(eg(E,eF,eE)),eh(!0)},[eG,E,eb,B,eS,eq,eM]),(0,b.useEffect)(()=>{!em||eS||window.scrollTo({top:0})},[em,eS]);let eU=(0,b.useMemo)(()=>eG.filter(e=>void 0!==e),[eG]),eK=i0(q,eU),eW=i0(H,eU),eQ=i0(K,eU),eY=i0(Z,eU),eZ=i0(J,eU),eX=eI(eU),eJ=(0,h.useQueries)({queries:eG.map(e=>{let t;return(0,u.modelExamplesOptions)((t=function(e){switch(e){case N.OutputModality.Image:return ed.ModelExampleModality.Image;case N.OutputModality.Video:return ed.ModelExampleModality.Video;case N.OutputModality.TTS:return ed.ModelExampleModality.Speech;case N.OutputModality.Text:return null;default:return e}}(eX),void 0!==e&&null!==e.endpoint&&null!==t&&e.output_modalities.includes(eX)?{permaslug:e.permaslug,modality:t}:{permaslug:e?.permaslug??null,modality:null}))})}),e0=[eK,eW,eQ,eY,eZ],e1=[0,1,2,3,4],e2=(0,b.useMemo)(()=>eG.map((e,t)=>e?t:null).filter(e=>null!==e),[eG]),e3=(0,b.useMemo)(()=>e2.lengthvoid 0===eG[e])??null:null,[e2,eG]),e5=(0,b.useMemo)(()=>1===e2.length&&null!==e3?[...e2,e3]:[...e2],[e2,e3]),e4=e5.length,e8=e=>{let t=ex(e.m1,e.m2,e.m3,e.m4,e.m5);e.syncRouter?"push"===e.mode?O.push(t,{scroll:!1}):O.replace(t,{scroll:!1}):("push"===e.mode?window.history.pushState(null,"",t):window.history.replaceState(null,"",t),i4(t))},e6=(e,t)=>{if(!t)return;let i=eG[e];if(i&&(0,p.getModelVariantSlug)(i)===(0,p.getModelVariantSlug)(t))return void(0===e?G(t):1===e?U(t):2===e?Y(t):3===e?X(t):4===e&&ee(t));z.capture(n.PostHogEvent.CompareSelectModel,{model_slug:(0,p.getModelVariantSlug)(t),slot_index:e});let l=[q,H,K,Z,J];l[e]=t;let r=eG.filter(e=>e).length,a=l.filter(e=>e).length,o=0===r&&a>0,s=ex(l[0],l[1],l[2],l[3],l[4]),c=()=>{G(l[0]),U(l[1]),Y(l[2]),X(l[3]),ee(l[4]),e8({m1:l[0],m2:l[1],m3:l[2],m4:l[3],m5:l[4],mode:o?"push":"replace",syncRouter:!1})};r<2&&a>=2?(0,i1.withViewTransitionMorph)(()=>{c(),O.push(s,{scroll:!1})}):c()},e7=(e,t)=>{t&&(e_(!0),e6(e,t))},e9=e=>{e_(!0);let t=[q,H,K,Z,J];for(t.splice(e,1);t.lengthe).length,i=t.filter(e=>e).length;n>=2&&i<2?(0,i1.withViewTransitionMorph)(()=>{G(t[0]),U(t[1]),Y(t[2]),X(t[3]),ee(t[4]),e8({m1:t[0],m2:t[1],m3:t[2],m4:t[3],m5:t[4],syncRouter:!0})}):(G(t[0]),U(t[1]),Y(t[2]),X(t[3]),ee(t[4]),e8({m1:t[0],m2:t[1],m3:t[2],m4:t[3],m5:t[4]}))},te=eG.filter(e=>void 0!==e),tt=(0,b.useMemo)(()=>[q,H,K,Z,J].filter(e=>void 0!==e).map(e=>e.permaslug),[q,H,K,Z,J]),tn=(0,b.useMemo)(()=>[q,H,K,Z,J].filter(e=>void 0!==e).map(e=>e.slug),[q,H,K,Z,J]),ti=((C=(0,v.c)(9))[0]!==tn?(w=void 0===tn?[]:tn,C[0]=tn,C[1]=w):w=C[1],P=w,I=(0,d.useLocale)(),L=th(tt[0]??null,P[0]),A=th(tt[1]??null,P[1]),R=th(tt[2]??null,P[2]),T=th(tt[3]??null,P[3]),$=th(tt[4]??null,P[4]),C[2]!==I||C[3]!==L.daRecordList||C[4]!==A.daRecordList||C[5]!==R.daRecordList||C[6]!==T.daRecordList||C[7]!==$.daRecordList?(M=function(e,t){let n=new Map;for(let e of t)for(let t of e){if("models"!==t.arena)continue;let e=`${t.arena}::${t.category}`;n.has(e)||n.set(e,{arena:t.arena,category:t.category})}return[...n.values()].toSorted((t,n)=>(0,ts.compareDisplayText)((0,ta.getCategoryLabel)(t.arena,t.category),(0,ta.getCategoryLabel)(n.arena,n.category),{locale:e}))}(I,[L.daRecordList,A.daRecordList,R.daRecordList,T.daRecordList,$.daRecordList]),C[2]=I,C[3]=L.daRecordList,C[4]=A.daRecordList,C[5]=R.daRecordList,C[6]=T.daRecordList,C[7]=$.daRecordList,C[8]=M):M=C[8],M),to=function(e,t=[]){let n=tf(e[0]??null,t[0]),i=tf(e[1]??null,t[1]),l=tf(e[2]??null,t[2]),r=tf(e[3]??null,t[3]),a=tf(e[4]??null,t[4]),o=[n,i,l,r,a];return(0,b.useMemo)(()=>e.map((e,t)=>{let n=o[t],i=n?.benchmarkList??[];return{benchmarkList:i,defaultIdx:(0,tr.getDefaultBenchmarkIndex)(i),isLoaded:n?.isAALoaded??!1}}),[e.length,n.benchmarkList,i.benchmarkList,l.benchmarkList,r.benchmarkList,a.benchmarkList,n.isAALoaded,i.isAALoaded,l.isAALoaded,r.isAALoaded,a.isAALoaded])}(tt,tn),td=function(e,t=[]){let n=th(e[0]??null,t[0]),i=th(e[1]??null,t[1]),l=th(e[2]??null,t[2]),r=th(e[3]??null,t[3]),a=th(e[4]??null,t[4]),o=[n,i,l,r,a];return(0,b.useMemo)(()=>e.map((e,t)=>{let n=o[t],i=(n?.daRecordList??[]).filter(e=>"models"===e.arena),l=(0,tc.extractVariantList)(i);return{records:i,variants:l,defaultVariant:l[0]??null,isLoaded:n?.isDALoaded??!1}}),[e.length,n.daRecordList,i.daRecordList,l.daRecordList,r.daRecordList,a.daRecordList,n.isDALoaded,i.isDALoaded,l.isDALoaded,r.isDALoaded,a.isDALoaded])}(tt,tn),[tu,tm]=(0,b.useState)({}),[tp,tg]=(0,b.useState)({}),tx=(0,b.useMemo)(()=>to.map(e=>e.benchmarkList.map(e=>e.aa_name)),[to]),tb=(0,b.useMemo)(()=>to.map((e,t)=>{let n=tt[t],i=tx[t]??[],l=n?tp[n]:void 0;if(void 0!==l&&i.includes(l))return l;let r=Math.max(e.benchmarkList.length-1,0),a=Math.min(e.defaultIdx,r);return e.benchmarkList[a]?.aa_name??null}),[to,tx,tt,tp]),tv=(0,b.useMemo)(()=>to.map((e,t)=>{let n=tb[t],i=n?e.benchmarkList.find(e=>e.aa_name===n):void 0;if(i)return i;let l=Math.max(e.benchmarkList.length-1,0),r=Math.min(e.defaultIdx,l);return e.benchmarkList[r]??null}),[to,tb]),ty=(0,b.useMemo)(()=>tv.map(e=>{let t,n,i;return n=(t=e?.benchmark_data.model_type===tl.ModelType.Llm?e.benchmark_data.evaluations:null)?(0,tr.extractIndexScores)(t):null,i=e?.percentiles??null,{intelligence:n?.intelligence??null,coding:n?.coding??null,agentic:n?.agentic??null,intelligence_percentile:i?.intelligence_percentile??null,coding_percentile:i?.coding_percentile??null,agentic_percentile:i?.agentic_percentile??null}}),[tv]),tj=(0,b.useMemo)(()=>td.map((e,t)=>{let n=tt[t],i=n?tu[n]:void 0;return void 0!==i&&e.variants.includes(i)?i:e.defaultVariant}),[td,tt,tu]),tN=(0,b.useMemo)(()=>td.map((e,t)=>{let n=tj[t];return n?e.records.filter(e=>e.display_name===n):e.records}),[td,tj]),tk=td.some(e=>e.variants.length>1),tS=(0,eu.useHighlightBest)(),tw=(0,b.useMemo)(()=>e5.map(e=>eG[e]).filter(e=>void 0!==e),[eG,e5]),tM=(0,b.useMemo)(()=>tw.map(e=>(0,p.getModelVariantSlug)(e)),[tw]),tC=e=>{let t=(0,p.getModelVariantSlug)(e);return tM.filter(e=>e!==t)},tP=!eS&&!eM,tI=[eS,eC,eL,eD,eF].filter(f.isDefinedAndNotNull).length,tL=te.length<2&&(tP||em),tA=(0,b.useMemo)(()=>B?e.filter(e=>e.enabled).map(e=>({title:e.title,description:e.description,models:e.model_slugs.map(e=>(function(e,t){if(0===e.length)return;if(e.includes("/"))return t.find(t=>t.slug===e)??t.find(t=>(0,p.getModelVariantSlug)(t)===e)??t.find(t=>t.permaslug===e)??t.find(t=>t.hf_slug===e);let n=t.filter(t=>t.slug.endsWith(`/${e}`)||t.permaslug.endsWith(`/${e}`));if(1===n.length)return n[0]})(e,E)).filter(e=>void 0!==e)})).filter(e=>e.models.length>=2):[],[B,E,e]),tR=te.length>0?`/chat?models=${te.map(e=>(0,p.getModelVariantSlug)(e)).join(",")}`:"",tT=(!B||!F||!em)&&!tP,t$=B&&F,tD=(0,b.useMemo)(()=>tw.map(e=>(0,g.formatModelName)(e.short_name,{keepNote:!0})),[tw]),tz=function({routeParams:e,models:t,hasInitialized:n,hasLocallyChangedSelection:i}){return!!n&&(i||ev(ef(e))!==ej(t))}({routeParams:eq,models:eG,hasInitialized:em,hasLocallyChangedSelection:eb}),tV=(0,b.useMemo)(()=>eG.flatMap((e,t)=>{var n;let i;return e?[(n=(0,ep.authorLabelFor)(e,t,ek),i=(0,p.getModelVariantSlug)(e),{slotId:`${t}:${i}`,name:(0,ep.formatNameKeepNote)(e),authorName:n,href:`/${i}`,contextLength:e.context_length,endpoint:e.endpoint})]:[]}),[ek,eG]),tO=(0,b.useMemo)(()=>tV.length<2?null:{heading:`${tV.map(e=>e.name).join(" vs ")}: side-by-side summary`,intro:`${(0,ep.joinList)(tV.map(e=>e.name))} are available through the OpenRouter API, so switching between them takes a model slug change rather than a new integration.`,sentences:tV.map(eV.bind(void 0,D)),facts:[{label:"Context window",values:tV.map(eO.bind(void 0,D))},{label:"Price",values:tV.map(eB.bind(void 0,D))},{label:"Provided by",values:tV.map(e=>e.authorName)}]},[tV,D]),tF=function({isStale:e,hasClientSummary:t,hasLocallyChangedSelection:n}){return e?t?"client":n?"none":"server":"server"}({isStale:tz,hasClientSummary:null!==tO,hasLocallyChangedSelection:eb}),tE="client"===tF&&tO?(0,t.jsx)(nH,{summary:tO,models:tV}):null,tB=(k={routeKey:ev(ef(eq)),isSelectionStale:tz},null===j||j.routeKey!==k.routeKey||k.isSelectionStale)?(S=te.map(p.getModelVariantSlug),{routeKey:eN(S),title:function(e){let[t]=e;return t?1===e.length?`${t.name} compared to other AI models`:e.map(e=>e.name).join(" vs "):"AI Model Comparison"}(tV),description:function(e){let[t]=e;if(!t)return"Compare AI models by key metrics including benchmarks, price, context length, and other model features.";if(1===e.length)return`Compare ${t.name} from ${t.authorName} to other AI models on key metrics including benchmarks, price, context length, and other model features.`;let n=e.map(e=>`${e.name} from ${e.authorName}`);return`Compare ${(0,ep.joinList)(n)} on key metrics including benchmarks, price, context length, and other model features.`}(tV),apiAccessModelRef:function(e){let[t]=e;return t?1===e.length?t.name:2===e.length?"both models":`all ${e.length} models`:"hundreds of AI models"}(tV),modelCount:tV.length}):j,tG=tT&&tB!==j,tH=q?(0,t.jsx)(iH,{nextEmptySlot:e3,disabledForAdd:tM,onAddModel:e7,breadcrumbModels:te,chatUrl:tR}):null;return(0,t.jsxs)("div",{className:"container mx-auto flex min-h-[calc(100vh-80px)] max-w-7xl flex-col gap-6 py-6 md:min-h-screen md:py-10",children:[(0,t.jsx)(nq,{breadcrumbModels:te}),(0,t.jsx)("div",{className:"flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight md:text-3xl",children:tG?(0,t.jsx)(a.Skeleton,{className:"h-[1lh] w-full max-w-2xl"}):tB.title}),tG?(0,t.jsx)("div",{className:"max-w-3xl text-sm md:text-base",children:(0,t.jsx)(a.Skeleton,{className:"h-[2lh] w-full"})}):(0,t.jsxs)("p",{"data-slot":"compare-intro-description",className:"max-w-3xl text-sm text-foreground md:text-base",children:[tB.description,tP&&!q&&(0,t.jsxs)(t.Fragment,{children:[" Browse the ",(0,t.jsx)(o.TextLink,{href:"/models",className:"text-sm md:text-base",children:"model catalog"})," or explore ",(0,t.jsx)(o.TextLink,{href:"/rankings",className:"text-sm md:text-base",children:"model rankings"})," to find candidates."]}),tB.modelCount>0?(0,t.jsxs)(t.Fragment,{children:[" Access ",tB.apiAccessModelRef,1===tB.modelCount?" and hundreds of other AI models through the ":" and hundreds of others through the ",(0,t.jsx)(l.ExternalLink,{href:"/docs/quickstart",target:"_blank",rel:"noreferrer",className:"text-sm md:text-base",onClick:()=>{z.capture(n.PostHogEvent.CompareClickApiDocs)},children:"OpenRouter API"}),"."]}):(0,t.jsxs)(t.Fragment,{children:[" Access hundreds of AI models through the ",(0,t.jsx)(l.ExternalLink,{href:"/docs/quickstart",target:"_blank",rel:"noreferrer",className:"text-sm md:text-base",onClick:()=>{z.capture(n.PostHogEvent.CompareClickApiDocs)},children:"OpenRouter API"}),"."]})]})]})}),(0,t.jsx)(r.Fade,{initialRender:tP,hidden:!tP&&(!B||!F),className:"flex min-h-0 flex-1 flex-col",loader:(0,t.jsx)(n$,{columnCount:tI,presetCount:Math.min(e.filter(e=>e.enabled&&e.model_slugs.length>=2).length,4)}),children:(0,t.jsx)(t_,{children:tL?(0,t.jsx)(ec,{comparePresets:tA,initialResolvedPresets:y,shouldUseLivePresets:t$,picks:[q,H],onPickSlot:(e,t)=>e7(e,t),onClearSlot:e=>e9(e),onPickPreset:e=>{e_(!0);let t=ex(e[0],e[1],e[2],e[3],e[4]);G(e[0]),U(e[1]),Y(e[2]),X(e[3]),ee(e[4]),window.history.pushState(null,"",t),i4(t),queueMicrotask(()=>{O.push(t,{scroll:!1})})}}):(0,t.jsx)(eu.SyncedScrollProvider,{onScrollLeftChange:eo,children:(0,t.jsx)("div",{className:"flex flex-col gap-3 md:gap-2",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:gap-0",children:[tH&&(0,t.jsx)("div",{className:"flex md:hidden",children:tH}),(0,t.jsx)("div",{className:"flex flex-col gap-2 md:hidden",children:(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2",children:e5.map(e=>{let n=eG[e];return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(Q,{model:n,onModelChange:t=>e7(e,t),onRemove:()=>e9(e),disabledModelSlugs:tC(n)}),(0,t.jsx)(en,{model:n,onModelChange:t=>e6(e,t),onUserSelection:()=>e_(!0),endpointData:e0[e]},`${n.permaslug}-${n.endpoint?.variant??""}`)]},`mobile-slot-${e}`):(0,t.jsx)(es,{ariaLabel:"Add another model to compare",onPick:t=>e7(e,t),disabledModelSlugs:tM},`mobile-empty-${e}`)})})}),(0,t.jsxs)("div",{ref:el,className:"relative -mx-2 flex flex-col gap-0 overflow-x-clip px-2",children:[(0,t.jsxs)("div",{ref:ei,className:(0,i.cn)("hidden md:block md:sticky md:top-[calc(56px+var(--sticky-banner-top,0px))] z-[70] overflow-x-clip bg-background md:pt-2 md:pb-2"),children:[tH&&(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-end gap-3",children:[(0,t.jsxs)("button",{type:"button",role:"switch","aria-checked":tS,onClick:()=>eu.highlightBestStore.set(!tS),className:"inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:(0,i.cn)("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors",tS?"bg-positive":"bg-muted"),children:(0,t.jsx)("span",{className:(0,i.cn)("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",tS?"translate-x-[18px]":"translate-x-0.5")})}),(0,t.jsx)("span",{children:"Highlight best"})]}),tH]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{ref:et,className:(0,i.cn)("grid h-[60px] min-w-min items-center gap-x-3 border-x border-transparent pr-2"),style:{gridTemplateColumns:(0,eu.buildGridTemplate)(e4)},children:e5.map(e=>{let n=eG[e],i=`compare-slot-${e}`;return n?(0,t.jsx)(W,{model:n,onModelChange:t=>e7(e,t),onRemove:()=>e9(e),disabledModelSlugs:tC(n),viewTransitionName:i},`hdr-${e}`):(0,t.jsx)(es,{ariaLabel:"Add another model to compare",onPick:t=>e7(e,t),disabledModelSlugs:tM,viewTransitionName:i},`hdr-empty-${e}`)})}),(0,t.jsx)("div",{"data-synced-translate-target":"",className:"mt-2 grid min-w-min items-center gap-x-3 border-x border-transparent pr-2",style:{gridTemplateColumns:(0,eu.buildGridTemplate)(e4)},children:e5.map(e=>{let n=eG[e];return n?(0,t.jsx)("div",{className:"flex min-w-0",children:(0,t.jsx)(en,{model:n,onModelChange:t=>e6(e,t),onUserSelection:()=>e_(!0),endpointData:e0[e]},`${n.permaslug}-${n.endpoint?.variant??""}`)},`prov-${e}`):(0,t.jsx)("div",{},`prov-empty-${e}`)})}),(0,t.jsx)("div",{"aria-hidden":"true",className:(0,i.cn)("pointer-events-none absolute inset-y-0 left-0 w-16 bg-gradient-to-r from-background to-transparent transition-opacity duration-150",er?"opacity-100":"opacity-0")}),(0,t.jsx)("div",{"aria-hidden":"true",className:(0,i.cn)("pointer-events-none absolute inset-y-0 right-0 w-16 bg-gradient-to-l from-background to-transparent transition-opacity duration-150",ea?"opacity-100":"opacity-0")})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-col gap-2",children:(0,t.jsx)(ib,{effectiveColumnCount:e4,mobileColumnLabels:tD,totalColumns:e4,visibleIndices:e5,allModels:eG,allEndpointData:e0,visibleModels:tw,exampleResults:eJ})}),(0,t.jsx)(nk,{effectiveColumnCount:e4,mobileColumnLabels:tD,totalColumns:e4,visibleIndices:e5,allModels:eG,visibleModels:tw,aaScoresByModel:ty,aaVariantsByModel:tx,aaSelectedVariantByModel:tb,aaSelectedRecordByModel:tv,onAaVariantChange:(e,t)=>tg(n=>({...n,[e]:t})),daCategories:ti,daRecordsByModel:tN,daVariantsByModel:td,daSelectedVariantByModel:tj,hasDaVariantChoice:tk,onDaVariantChange:(e,t)=>tm(n=>({...n,[e]:t}))}),(0,t.jsxs)(eu.SectionGrid,{columnCount:e4,mobileColumnLabels:tD,allowOverflow:!0,children:[(0,t.jsx)(eu.SectionHeader,{id:"section-activity",title:"Activity",totalColumns:e4}),(0,t.jsx)(eu.DataRow,{isFirst:!0,stacked:!0,hideLabel:!0,label:"Last 30 days",values:e5.map(e=>{let n=eG[e];return n?(0,t.jsx)(tq,{model:n,activityMetric:eA(tw)?ew.ActivityMetric.Images:eR(tw)?ew.ActivityMetric.Video:eT(tw)?ew.ActivityMetric.Requests:ew.ActivityMetric.Tokens},e):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"},e)})})]})]}),(0,t.jsx)("div",{"aria-hidden":"true",className:(0,i.cn)("pointer-events-none absolute inset-y-0 left-0 z-overlay hidden w-16 bg-gradient-to-r from-background to-transparent transition-opacity duration-150 md:block",er?"opacity-100":"opacity-0")}),(0,t.jsx)("div",{"aria-hidden":"true",className:(0,i.cn)("pointer-events-none absolute inset-y-0 right-0 z-overlay hidden w-16 bg-gradient-to-l from-background to-transparent transition-opacity duration-150 md:block",ea?"opacity-100":"opacity-0")})]})]})})})})}),tE,"server"===tF?_:null]})}],858735)}]); //# sourceMappingURL=1n7qi9cr59h4a.js.map //# chunkId=01a08d90-235f-7043-8ce6-2cac6ee26065