(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,820113,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(463686);e.i(707060);var n=e.i(196991);e.i(406201);var i=e.i(967605);function o(e){let l,o=(0,r.c)(2),{href:s}=e;return o[0]!==s?(l=(0,t.jsx)("p",{className:"mt-6 border-t border-border pt-4 text-body text-muted-foreground",children:(0,t.jsxs)(n.T,{children:["Nothing on this page is scored. The graded prompts, each with a stated check per grid, are in the Evaluations."," ",(0,t.jsx)(i.Link,{href:s,variant:"inline",children:"Open Evaluations"}),"."]})}),o[0]=s,o[1]=l):l=o[1],l}var s=e.i(658108);e.s(["ExploreEvaluationsFooterWithSearchParams",0,function(e){let n,i=(0,r.c)(3),{href:a}=e,c=(0,s.I)((0,l.useSearchParams)()),d=(0,s.n)(a,c);return i[0]!==o||i[1]!==d?(n=(0,t.jsx)(o,{href:d}),i[0]=o,i[1]=d,i[2]=n):n=i[2],n}],820113)},312303,e=>{"use strict";var t=e.i(659350),r=e.i(663456);e.s(["f",0,function(e){let l,n,i=(0,r.c)(5),{label:o,children:s}=e;return i[0]!==o?(l=(0,t.jsx)("span",{className:"shrink-0 text-body text-muted-foreground",children:o}),i[0]=o,i[1]=l):l=i[1],i[2]!==s||i[3]!==l?(n=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l,s]}),i[2]=s,i[3]=l,i[4]=n):n=i[4],n}])},131830,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(463686);e.i(16043);var n=e.i(883534),i=e.i(658108);let o=[];function s(e){let t,n,s,a,c=(0,r.c)(15),{items:d,lenses:u}=e,m=void 0===u?o:u,f=(0,l.useSearchParams)();c[0]!==f?(t=(0,i.I)(f),c[0]=f,c[1]=t):t=c[1];let h=t;if(c[2]!==h||c[3]!==d){let e;c[5]!==h?(e=e=>({...e,href:(0,i.n)(e.href,h)}),c[5]=h,c[6]=e):e=c[6],n=d.map(e),c[2]=h,c[3]=d,c[4]=n}else n=c[4];if(c[7]!==h||c[8]!==m){let e;c[10]!==h?(e=e=>({...e,href:(0,i.n)(e.href,h)}),c[10]=h,c[11]=e):e=c[11],s=m.map(e),c[7]=h,c[8]=m,c[9]=s}else s=c[9];return c[12]!==n||c[13]!==s?(a={items:n,lenses:s},c[12]=n,c[13]=s,c[14]=a):a=c[14],a}e.s(["ExploreScenarioRailWithSearchParams",0,function(e){let l,i=(0,r.c)(3),o=s(e);return i[0]!==e||i[1]!==o?(l=(0,t.jsx)(n.ExploreScenarioRail,{...e,...o}),i[0]=e,i[1]=o,i[2]=l):l=i[2],l},"ExploreScenarioStripWithSearchParams",0,function(e){let l,i=(0,r.c)(3),o=s(e);return i[0]!==e||i[1]!==o?(l=(0,t.jsx)(n.ExploreScenarioStrip,{...e,...o}),i[0]=e,i[1]=o,i[2]=l):l=i[2],l}])},260870,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(960773);e.i(707060);var n=e.i(288265),i=e.i(16043);e.i(406201);var o=e.i(967605),s=e.i(517665),a=e.i(312303),c=e.i(658108),d=e.i(312679),u=e.i(909613),m=e.i(30180);function f(e){return e.setIsPillRowHidden}function h(e){return e.setAxis}function p(e,t){let r=new IntersectionObserver(([e])=>{if(void 0===e)return;let r=e.rootBounds?.top??0;t(!e.isIntersecting&&e.boundingClientRect.bottom<=r)},{rootMargin:`-${(0,m.S)()}px 0px 0px 0px`});return r.observe(e),r}e.s(["ExploreVariantPills",0,function(e){let m,x,g,b,v,j,y,_,w,N,k,S,C,E,z=(0,r.c)(33),{basePath:R,section:I,lens:T,label:O,variants:M,activeVariant:P,highlightedModelId:L}=e,A=(0,l.Q)(),q=(0,n.f)(),F=(0,i.useRef)(null);if(z[0]!==R||z[1]!==L||z[2]!==M){let e;z[4]!==R||z[5]!==L?(e=e=>({...e,href:function(e,{variantId:t,highlightedModelId:r}){return(0,c.n)(`${e}?variant=${encodeURIComponent(t)}`,r)}(R,{variantId:e.id,highlightedModelId:L})}),z[4]=R,z[5]=L,z[6]=e):e=z[6],m=M.map(e),z[0]=R,z[1]=L,z[2]=M,z[3]=m}else m=z[3];let V=m;z[7]!==P||z[8]!==O||z[9]!==T||z[10]!==V||z[11]!==I?(x={lens:T,section:I,label:O,activeId:P,options:V},z[7]=P,z[8]=O,z[9]=T,z[10]=V,z[11]=I,z[12]=x):x=z[12];let $=x;if(k=(0,r.c)(11),S=(0,u.f)(h),C=(0,u.f)(f),E=(0,d.f)(),k[0]!==$||k[1]!==S?(y=()=>(S($),()=>S(null)),_=[S,$],k[0]=$,k[1]=S,k[2]=y,k[3]=_):(y=k[2],_=k[3]),(0,i.useEffect)(y,_),k[4]!==F||k[5]!==C?(w=()=>{let e=F.current;if(null===e||"u"{t.disconnect(),t=p(e,C)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),t.disconnect(),C(!1)}},k[4]=F,k[5]=C,k[6]=w):w=k[6],k[7]!==E||k[8]!==F||k[9]!==C?(N=[F,C,E],k[7]=E,k[8]=F,k[9]=C,k[10]=N):N=k[10],(0,i.useEffect)(w,N),z[13]!==q||z[14]!==O?(g=q("Filter by {label}",{label:O}),z[13]=q,z[14]=O,z[15]=g):g=z[15],z[16]!==P||z[17]!==T||z[18]!==V||z[19]!==A||z[20]!==I){let e;z[22]!==P||z[23]!==T||z[24]!==A||z[25]!==I?(e=e=>{let r=e.id===P;return(0,t.jsx)(o.Link,{href:e.href,"aria-current":r?"page":void 0,onClick:()=>A.capture("click_benchmark_explore_subject",{lens:T,section:I,subject:e.id}),className:(0,s.a)(r),children:e.label},e.id)},z[22]=P,z[23]=T,z[24]=A,z[25]=I,z[26]=e):e=z[26],b=V.map(e),z[16]=P,z[17]=T,z[18]=V,z[19]=A,z[20]=I,z[21]=b}else b=z[21];return z[27]!==g||z[28]!==b?(v=(0,t.jsx)("div",{ref:F,role:"group","aria-label":g,className:s.f,children:b}),z[27]=g,z[28]=b,z[29]=v):v=z[29],z[30]!==O||z[31]!==v?(j=(0,t.jsx)(a.f,{label:O,children:v}),z[30]=O,z[31]=v,z[32]=j):j=z[32],j}],260870)},361323,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(463686),n=e.i(16043),i=e.i(644807),o=e.i(658108),s=e.i(260870),a=e.i(189360),c=e.i(880414),d=e.i(542692),u=e.i(761787);function m(e){let l,n,i,o,m,f,h,p,x=(0,r.c)(26),{challenge:g,scenarios:b,tab:v,selectedVariant:j,highlightedModelId:y}=e;if(x[0]!==g.kind||x[1]!==g.lens||x[2]!==g.modality||x[3]!==g.slug||x[4]!==g.variantAxisName||x[5]!==y||x[6]!==b||x[7]!==j||x[8]!==v){let e,{activeVariant:r,shownScenarios:u}=function({challengeKind:e,scenarios:t,selectedVariant:r}){let l=t.find(e=>e.id===r),n="style"===e&&void 0!==l;return{activeVariant:l?.id,shownScenarios:n?[l]:t}}({challengeKind:g.kind,scenarios:b,selectedVariant:j});m="style"===g.kind&&void 0!==r&&b.length>1&&(0,t.jsx)(s.ExploreVariantPills,{basePath:(0,a.x)(v,g.slug),section:g.slug,lens:g.lens,label:g.variantAxisName,variants:b,activeVariant:r,highlightedModelId:y}),l=d.MediaGallerySelectionProvider,n="style"===g.kind?r:void 0,i=g.modality,x[14]!==g.lens||x[15]!==y?(e=e=>(0,t.jsx)("section",{children:(0,t.jsx)(c.MediaGallery,{scenario:e,lens:g.lens,highlightedModelId:y})},e.id),x[14]=g.lens,x[15]=y,x[16]=e):e=x[16],o=u.map(e),x[0]=g.kind,x[1]=g.lens,x[2]=g.modality,x[3]=g.slug,x[4]=g.variantAxisName,x[5]=y,x[6]=b,x[7]=j,x[8]=v,x[9]=l,x[10]=n,x[11]=i,x[12]=o,x[13]=m}else l=x[9],n=x[10],i=x[11],o=x[12],m=x[13];return x[17]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(u.MediaGallerySelectionBar,{}),x[17]=f):f=x[17],x[18]!==l||x[19]!==n||x[20]!==i||x[21]!==o?(h=(0,t.jsxs)(l,{modality:i,children:[o,f]},n),x[18]=l,x[19]=n,x[20]=i,x[21]=o,x[22]=h):h=x[22],x[23]!==m||x[24]!==h?(p=(0,t.jsxs)(t.Fragment,{children:[m,h]}),x[23]=m,x[24]=h,x[25]=p):p=x[25],p}function f(e){return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)}function h(){return(0,i.F)(window.location.hash)?.scenario}function p(){}e.s(["MediaEvaluationScenariosWithSearchParams",0,function(e){let i,s,a,c,d,u=(0,r.c)(14),x=(0,l.useSearchParams)(),g=(0,n.useSyncExternalStore)(f,h,p);u[0]!==g||u[1]!==e.challenge.kind||u[2]!==e.scenarios||u[3]!==x?(i=function({challengeKind:e,scenarios:t,queryVariant:r,linkedVariant:l}){if("style"!==e)return{selectedVariant:r,promotedVariant:void 0};let n=e=>t.some(t=>t.id===e);if(n(r))return{selectedVariant:r,promotedVariant:void 0};let i=n(l)?l:void 0;return{selectedVariant:i??t.at(0)?.id,promotedVariant:i}}({challengeKind:e.challenge.kind,scenarios:e.scenarios,queryVariant:x?.get("variant")??void 0,linkedVariant:g}),u[0]=g,u[1]=e.challenge.kind,u[2]=e.scenarios,u[3]=x,u[4]=i):i=u[4];let{selectedVariant:b,promotedVariant:v}=i;return u[5]!==v?(s=()=>{void 0!==v&&function(e){let{pathname:t,search:r,hash:l}=window.location,n=new URLSearchParams(r);n.set("variant",e),window.history.replaceState(window.history.state,"",`${t}?${n.toString()}${l}`)}(v)},a=[v],u[5]=v,u[6]=s,u[7]=a):(s=u[6],a=u[7]),(0,n.useEffect)(s,a),u[8]!==x?(c=(0,o.I)(x),u[8]=x,u[9]=c):c=u[9],u[10]!==e||u[11]!==b||u[12]!==c?(d=(0,t.jsx)(m,{...e,selectedVariant:b,highlightedModelId:c}),u[10]=e,u[11]=b,u[12]=c,u[13]=d):d=u[13],d}],361323)},880414,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(139697),n=e.i(326e3),i=e.i(960773),o=e.i(138257),s=e.i(427150);e.i(707060);var a=e.i(196991),c=e.i(288265),d=e.i(919035),u=e.i(61885),m=e.i(309317),f=e.i(173155),h=e.i(16043),p=e.i(440627),x=e.i(312303),g=e.i(575639),b=e.i(339814),v=e.i(78138),j=e.i(644807),y=e.i(658108);function _(e){return e>=7?"positive":e<4?"negative":"warning"}var w=e.i(536960);function N(e){return e.mediaType.startsWith("video/")}function k(e){return e.mediaType.startsWith("video/")}var S=e.i(136562);let C="w-14 shrink-0 text-body text-muted-foreground";function E(e){let l,i,o,s,d,u,m,f,h,p,x,g,b,v,j,y=(0,r.c)(39),{options:_,author:w,onSelect:N}=e,k=(0,c.f)();if(y[0]!==w||y[1]!==k||y[2]!==N||y[3]!==_){let e;y[11]!==w?(e=e=>e.slug===w,y[11]=w,y[12]=e):e=y[12];let r=_.find(e);u="flex w-full items-center gap-2 sm:w-auto",y[13]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("span",{className:(0,S.f)(C,"sm:w-auto"),children:(0,t.jsx)(a.T,{children:"Author"})}),y[13]=m):m=y[13],i=n.Select,s=w??"all",y[14]!==N?(d=e=>N("all"===e?null:e),y[14]=N,y[15]=d):d=y[15],l=n.SelectTrigger,o=k("Filter by author: {author}",{author:r?.label??k("All")}),y[0]=w,y[1]=k,y[2]=N,y[3]=_,y[4]=l,y[5]=i,y[6]=o,y[7]=s,y[8]=d,y[9]=u,y[10]=m}else l=y[4],i=y[5],o=y[6],s=y[7],d=y[8],u=y[9],m=y[10];return y[16]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(n.SelectValue,{}),y[16]=f):f=y[16],y[17]!==l||y[18]!==o?(h=(0,t.jsx)(l,{"aria-label":o,className:"min-h-10 flex-1 sm:h-8 sm:min-h-8 sm:w-44 sm:flex-none",children:f}),y[17]=l,y[18]=o,y[19]=h):h=y[19],y[20]!==k?(p=k("All"),y[20]=k,y[21]=p):p=y[21],y[22]!==p?(x=(0,t.jsx)(n.SelectItem,{value:"all",children:p}),y[22]=p,y[23]=x):x=y[23],y[24]!==_?(g=_.map(z),y[24]=_,y[25]=g):g=y[25],y[26]!==g||y[27]!==x?(b=(0,t.jsxs)(n.SelectContent,{children:[x,g]}),y[26]=g,y[27]=x,y[28]=b):b=y[28],y[29]!==i||y[30]!==b||y[31]!==s||y[32]!==d||y[33]!==h?(v=(0,t.jsxs)(i,{value:s,onValueChange:d,children:[h,b]}),y[29]=i,y[30]=b,y[31]=s,y[32]=d,y[33]=h,y[34]=v):v=y[34],y[35]!==v||y[36]!==u||y[37]!==m?(j=(0,t.jsxs)("div",{className:u,children:[m,v]}),y[35]=v,y[36]=u,y[37]=m,y[38]=j):j=y[38],j}function z(e){return(0,t.jsx)(n.SelectItem,{value:e.slug,children:e.label},e.slug)}var R=e.i(647402),I=e.i(894868),T=e.i(816216);e.i(406201);var O=e.i(967605),M=e.i(586534),P=e.i(714170),L=e.i(30042),A=e.i(381084),q=e.i(9251),F=e.i(872635),V=e.i(527993);function $(e){let l,n,i,o,s,a,d,u=(0,r.c)(20),{checked:m,pinned:f,label:h,onClick:p}=e,x=(0,c.f)();u[0]!==x||u[1]!==h?(l=x("Select {label} for comparison",{label:h}),u[0]=x,u[1]=h,u[2]=l):l=u[2],u[3]!==p?(n=e=>{e.stopPropagation(),p()},u[3]=p,u[4]=n):n=u[4];let g=f?"opacity-100":"opacity-100 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/cell:opacity-100";u[5]!==g?(i=(0,S.f)("absolute left-1.5 top-1.5 z-10 flex size-5 items-center justify-center rounded-sm text-primary-foreground transition-opacity focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary before:absolute before:-inset-2.5",g),u[5]=g,u[6]=i):i=u[6];let b=m?"border-primary bg-primary":"border-border";return u[7]!==b?(o=(0,S.f)("flex size-5 items-center justify-center rounded border bg-background/80 backdrop-blur-sm",b),u[7]=b,u[8]=o):o=u[8],u[9]!==m?(s=m&&(0,t.jsx)(F.f,{className:"size-3.5"}),u[9]=m,u[10]=s):s=u[10],u[11]!==o||u[12]!==s?(a=(0,t.jsx)("span",{"aria-hidden":!0,className:o,children:s}),u[11]=o,u[12]=s,u[13]=a):a=u[13],u[14]!==m||u[15]!==l||u[16]!==n||u[17]!==i||u[18]!==a?(d=(0,t.jsx)("button",{type:"button",role:"checkbox","aria-checked":m,"aria-label":l,onClick:n,className:i,children:a}),u[14]=m,u[15]=l,u[16]=n,u[17]=i,u[18]=a,u[19]=d):d=u[19],d}function B(e){let l,n,i,o,s=(0,r.c)(10),{label:a,pinned:d,onClick:u}=e,m=(0,c.f)();s[0]!==m||s[1]!==a?(l=m("Open {label} output in the lightbox",{label:a}),s[0]=m,s[1]=a,s[2]=l):l=s[2];let f=d&&"visible pointer-events-auto opacity-100";return s[3]!==f?(n=(0,S.f)("absolute right-1.5 top-1.5 z-10 flex size-6 items-center justify-center rounded-sm bg-(--or-ink)/70 text-white opacity-0 backdrop-blur-sm transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 focus-visible:outline-none","invisible pointer-events-none","[@media(hover:hover)]:visible [@media(hover:hover)]:group-hover/cell:pointer-events-auto [@media(hover:hover)]:group-hover/cell:opacity-100",f),s[3]=f,s[4]=n):n=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(V.f,{className:"size-3"}),s[5]=i):i=s[5],s[6]!==u||s[7]!==l||s[8]!==n?(o=(0,t.jsx)("button",{type:"button",onClick:u,"aria-label":l,className:n,children:i}),s[6]=u,s[7]=l,s[8]=n,s[9]=o):o=s[9],o}var U=e.i(670168),G=e.i(96659);function D(e){return(0,S.f)("transition-[opacity,scale] duration-fast ease-smooth-out motion-reduce:transition-opacity",e?"scale-100 opacity-100":"scale-(--scale-small) opacity-0 motion-reduce:scale-100")}function H(){let e,l=(0,r.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[length:8px_8px] bg-[position:0_0,4px_4px] opacity-[0.02] [background-image:linear-gradient(45deg,var(--foreground)_25%,transparent_25%,transparent_75%,var(--foreground)_75%),linear-gradient(45deg,var(--foreground)_25%,transparent_25%,transparent_75%,var(--foreground)_75%)] dark:opacity-[0.025]"}),l[0]=e):e=l[0],e}function Q(e){let l,n,i,o,s,a,c,d,u=(0,r.c)(22),{asset:m,alt:f,sizes:p}=e,[x,g]=(0,h.useState)(!1),b=(0,h.useRef)(null),v=N(m)&&null===m.thumbnailUrl,j=m.thumbnailUrl??m.url;u[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{g(b.current?.complete??!1)},u[0]=l):l=u[0],u[1]!==j?(n=[j],u[1]=j,u[2]=n):n=u[2],(0,h.useEffect)(l,n),u[3]===Symbol.for("react.memo_cache_sentinel")?(i=()=>g(!0),u[3]=i):i=u[3];let y=i;if(v){let e,r;return u[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(H,{}),u[4]=e):e=u[4],u[5]!==m.url?(r=(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)("video",{src:m.url,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 size-full object-cover"})]}),u[5]=m.url,u[6]=r):r=u[6],r}u[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(H,{}),u[7]=o):o=u[7],u[8]!==x?(s=!x&&(0,t.jsx)(U.l,{"aria-hidden":"true",className:"absolute inset-0 bg-muted/60"}),u[8]=x,u[9]=s):s=u[9];let _=m.width,w=m.height;return u[10]!==x?(a=(0,S.f)("absolute inset-0 size-full object-cover",D(x)),u[10]=x,u[11]=a):a=u[11],u[12]!==f||u[13]!==m.height||u[14]!==m.width||u[15]!==j||u[16]!==p||u[17]!==a?(c=(0,t.jsx)(G.default,{ref:b,src:j,alt:f,width:_,height:w,sizes:p,loading:"lazy",onLoad:y,className:a}),u[12]=f,u[13]=m.height,u[14]=m.width,u[15]=j,u[16]=p,u[17]=a,u[18]=c):c=u[18],u[19]!==s||u[20]!==c?(d=(0,t.jsxs)(t.Fragment,{children:[o,s,c]}),u[19]=s,u[20]=c,u[21]=d):d=u[21],d}var K=e.i(782143),W=e.i(9285),Y=e.i(741155);let J=(0,e.i(387086).b)("Median of the judges’ scores. Rated by AI, may contain errors.");function X(e,t){return(0,K.f)(t,{locale:e,preset:"fixed-1"})??"—"}function Z(e){let l,n,i,s,a,d=(0,r.c)(19),{quality:u,emphasised:m,className:f}=e,h=(0,o.useLocale)(),p=(0,c.f)();d[0]!==u.score?(l=_(u.score),d[0]=u.score,d[1]=l):l=d[1];let x=l,g="positive"===x&&"border-positive/60 bg-positive/10 text-positive",b="warning"===x&&"border-warning/60 bg-warning/10 text-warning",v="negative"===x&&"border-negative/60 bg-negative/10 text-negative",j=m&&"font-medium";return d[2]!==f||d[3]!==g||d[4]!==b||d[5]!==v||d[6]!==j?(n=(0,S.f)("inline-flex shrink-0 items-center rounded-sm border px-1 tabular-nums",g,b,v,j,f),d[2]=f,d[3]=g,d[4]=b,d[5]=v,d[6]=j,d[7]=n):n=d[7],d[8]!==p||d[9]!==h||d[10]!==u.score?(i=p("Quality {score} out of 10",{score:X(h,u.score)}),d[8]=p,d[9]=h,d[10]=u.score,d[11]=i):i=d[11],d[12]!==h||d[13]!==u.score?(s=X(h,u.score),d[12]=h,d[13]=u.score,d[14]=s):s=d[14],d[15]!==n||d[16]!==i||d[17]!==s?(a=(0,t.jsx)("span",{className:n,"aria-label":i,children:s}),d[15]=n,d[16]=i,d[17]=s,d[18]=a):a=d[18],a}function ee(e){let l,n,i,s=(0,r.c)(12),{quality:a,className:c}=e,d=(0,o.useLocale)();if(s[0]!==c||s[1]!==d||s[2]!==a.judges){let e,r=[...a.judges].sort(et);s[5]!==c?(l=(0,S.f)("flex flex-col gap-1",c),s[5]=c,s[6]=l):l=s[6],s[7]!==d?(e=e=>(0,t.jsx)(er,{judge:e,locale:d},e.id),s[7]=d,s[8]=e):e=s[8],n=r.map(e),s[0]=c,s[1]=d,s[2]=a.judges,s[3]=l,s[4]=n}else l=s[3],n=s[4];return s[9]!==l||s[10]!==n?(i=(0,t.jsx)("ul",{className:l,children:n}),s[9]=l,s[10]=n,s[11]=i):i=s[11],i}function et(e,t){return t.score-e.score}function er(e){let l,n,i,o,s,a,c=(0,r.c)(16),{judge:d,locale:u}=e;return c[0]!==d.author||c[1]!==d.id?(l=(0,t.jsx)(I.f,{author:d.author,permaslug:d.id,frame:!0,className:"size-3.5 shrink-0"}),c[0]=d.author,c[1]=d.id,c[2]=l):l=c[2],c[3]!==d?(n=(0,q.r)(d),c[3]=d,c[4]=n):n=c[4],c[5]!==n?(i=(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:n}),c[5]=n,c[6]=i):i=c[6],c[7]!==d.score||c[8]!==u?(o=X(u,d.score),c[7]=d.score,c[8]=u,c[9]=o):o=c[9],c[10]!==o?(s=(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:o}),c[10]=o,c[11]=s):s=c[11],c[12]!==l||c[13]!==i||c[14]!==s?(a=(0,t.jsxs)("li",{className:"flex items-center gap-1.5 text-overline leading-5",children:[l,i,s]}),c[12]=l,c[13]=i,c[14]=s,c[15]=a):a=c[15],a}function el(e){let l,n,o,s,c,u,m,f,p,x=(0,r.c)(23),{quality:g,emphasised:b,scenarioId:v}=e,j=(0,d.f)(),y=(0,i.Q)(),[_,w]=(0,h.useState)(!1);x[0]!==y||x[1]!==g||x[2]!==v?(l=e=>{w(e),e&&y.capture("open_benchmark_explore_quality_breakdown",{scenario:v,score:g.score,spread:g.spread,judge_count:g.judges.length})},x[0]=y,x[1]=g,x[2]=v,x[3]=l):l=x[3];let N=l;return x[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("span",{className:"mb-1 block text-overline font-medium text-muted-foreground",children:(0,t.jsx)(a.T,{children:"Quality score out of 10"})}),x[4]=n):n=x[4],x[5]!==g?(o=(0,t.jsx)(ee,{quality:g}),x[5]=g,x[6]=o):o=x[6],x[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(W.f,{className:"my-1.5"}),x[7]=s):s=x[7],x[8]!==j?(c=j(J),x[8]=j,x[9]=c):c=x[9],x[10]!==c?(u=(0,t.jsx)("p",{className:"text-overline leading-5 text-muted-foreground",children:c}),x[10]=c,x[11]=u):u=x[11],x[12]!==o||x[13]!==u?(m=(0,t.jsxs)(t.Fragment,{children:[n,o,s,u]}),x[12]=o,x[13]=u,x[14]=m):m=x[14],x[15]!==b||x[16]!==g?(f=(0,t.jsx)("button",{type:"button",className:"inline-flex rounded-sm focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",children:(0,t.jsx)(Z,{quality:g,emphasised:b,className:"h-4"})}),x[15]=b,x[16]=g,x[17]=f):f=x[17],x[18]!==N||x[19]!==_||x[20]!==m||x[21]!==f?(p=(0,t.jsx)(Y.f,{inline:!0,side:"bottom",align:"end",className:"w-max max-w-60",open:_,onOpenChange:N,content:m,children:f}),x[18]=N,x[19]=_,x[20]=m,x[21]=f,x[22]=p):p=x[22],p}var en=e.i(171973),ei=e.i(119488),eo=e.i(535072),es=e.i(502704);function ea(e){let l,n,i,o,s,a,d,u,m,f,p,x,g,b,v,j,y,_,w,N,k,C,E,z,R,I=(0,r.c)(80),{cell:T,frames:O,onOpen:M,onScrub:P,selectionEnabled:L,selectionActive:A,selected:q,highlighted:F,onSelect:V}=e,U=(0,c.f)(),D=(0,eo.o)("(hover: hover) and (pointer: fine)"),[H,Q]=(0,h.useState)(0),[K,W]=(0,h.useState)(!1),[Y,J]=(0,h.useState)(!1);I[0]===Symbol.for("react.memo_cache_sentinel")?(l=new Set,I[0]=l):l=I[0];let[X,Z]=(0,h.useState)(l),ee=(0,h.useRef)(null),et=(0,h.useRef)(!1),er=O.length;I[1]!==er||I[2]!==X?(n=function({loadedFrames:e,frameCount:t}){return t>0&&Array.from({length:t},(e,t)=>t).every(t=>e.has(t))}({loadedFrames:X,frameCount:er}),I[1]=er,I[2]=X,I[3]=n):n=I[3];let el=n;I[4]===Symbol.for("react.memo_cache_sentinel")?(i={rootMargin:"200px",freezeOnceVisible:!0},I[4]=i):i=I[4];let{ref:en,isIntersecting:ea}=(0,ei.f)(i);I[5]!==D||I[6]!==ea?(o=()=>{D&&ea&&W(!0)},s=[D,ea],I[5]=D,I[6]=ea,I[7]=o,I[8]=s):(o=I[7],s=I[8]),(0,h.useEffect)(o,s),I[9]!==en?(a=e=>{ee.current=e,en(e)},I[9]=en,I[10]=a):a=I[10];let ed=a;I[11]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{W(!0)},I[11]=d):d=I[11];let eu=d;I[12]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{Z(t=>t.has(e)?t:new Set(t).add(e))},I[12]=u):u=I[12];let em=u;I[13]!==D?(m=()=>{D&&W(!0)},I[13]=D,I[14]=m):m=I[14];let ef=m;I[15]!==D||I[16]!==er||I[17]!==el||I[18]!==P?(f=e=>{if(!D||(W(!0),!el))return;let t=ee.current?.getBoundingClientRect();t&&0!==t.width&&(Q(function({clientX:e,left:t,width:r,frameCount:l}){return Math.floor(Math.min(.999,Math.max(0,(e-t)/r))*l)}({clientX:e.clientX,left:t.left,width:t.width,frameCount:er})),et.current||(et.current=!0,P()),J(!0))},I[15]=D,I[16]=er,I[17]=el,I[18]=P,I[19]=f):f=I[19];let eh=f;I[20]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{et.current=!1,J(!1),Q(0)},I[20]=p):p=I[20];let ep=p;I[21]!==er||I[22]!==el?(x=e=>{el&&("ArrowRight"===e.key?(e.preventDefault(),J(!0),Q(e=>Math.min(er-1,e+1))):"ArrowLeft"===e.key&&(e.preventDefault(),J(!0),Q(ec)))},I[21]=er,I[22]=el,I[23]=x):x=I[23];let ex=x,eg=A?V:M;I[24]!==T.model.name||I[25]!==U||I[26]!==A?(g=A?U("Toggle {model} selection",{model:T.model.name}):U("{model} — play clip. Arrow keys step through frames.",{model:T.model.name}),I[24]=T.model.name,I[25]=U,I[26]=A,I[27]=g):g=I[27];let eb=(q||F)&&"ring-2 ring-primary ring-offset-2 ring-offset-background";if(I[28]!==eb?(b=(0,S.f)("group relative block w-full cursor-pointer overflow-hidden rounded-md border border-border bg-muted/40 transition-shadow hover:ring-1 hover:ring-border focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",eb),I[28]=eb,I[29]=b):b=I[29],I[30]!==O||I[31]!==K?(v=K?O:O.slice(0,1),I[30]=O,I[31]=K,I[32]=v):v=I[32],I[33]!==T.model.name||I[34]!==H||I[35]!==U||I[36]!==v){let e;I[38]!==T.model.name||I[39]!==H||I[40]!==U?(e=(e,r)=>(0,t.jsx)(G.default,{src:e,alt:0===r?U("{model}: first frame",{model:T.model.name}):"","aria-hidden":0!==r,fill:!0,sizes:"(min-width: 1024px) 400px, (min-width: 640px) 50vw, 100vw",loading:0===r?"lazy":"eager",fetchPriority:0===r?void 0:"low",onLoad:()=>{em(r)},onError:()=>{em(r)},className:(0,S.f)("absolute inset-0 size-full object-cover",r===H?"opacity-100":"opacity-0")},e),I[38]=T.model.name,I[39]=H,I[40]=U,I[41]=e):e=I[41],j=v.map(e),I[33]=T.model.name,I[34]=H,I[35]=U,I[36]=v,I[37]=j}else j=I[37];let ev=Y?"opacity-0":"opacity-100";return I[42]!==ev?(y=(0,S.f)("pointer-events-none absolute inset-0 flex items-center justify-center transition-opacity",ev),I[42]=ev,I[43]=y):y=I[43],I[44]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)("span",{className:"flex size-11 items-center justify-center rounded-full bg-background/70 ring-1 ring-border backdrop-blur-sm",children:(0,t.jsx)(es.f,{className:"size-5","aria-hidden":!0})}),I[44]=_):_=I[44],I[45]!==y?(w=(0,t.jsx)("span",{className:y,children:_}),I[45]=y,I[46]=w):w=I[46],I[47]!==D||I[48]!==H||I[49]!==O||I[50]!==Y?(N=D&&(0,t.jsx)("span",{className:(0,S.f)("pointer-events-none absolute inset-x-1.5 bottom-1.5 flex gap-0.5 transition-opacity",Y?"opacity-100":"opacity-0"),"aria-hidden":!0,children:O.map((e,r)=>(0,t.jsx)("span",{className:(0,S.f)("h-0.5 flex-1 rounded-full",r===H?"bg-foreground":"bg-foreground/25")},e))}),I[47]=D,I[48]=H,I[49]=O,I[50]=Y,I[51]=N):N=I[51],I[52]!==j||I[53]!==w||I[54]!==N?(k=(0,t.jsxs)("span",{className:"relative block aspect-video",children:[j,w,N]}),I[52]=j,I[53]=w,I[54]=N,I[55]=k):k=I[55],I[56]!==ex||I[57]!==ef||I[58]!==eh||I[59]!==ed||I[60]!==eg||I[61]!==g||I[62]!==b||I[63]!==k?(C=(0,t.jsx)("button",{ref:ed,type:"button",onPointerEnter:ef,onFocus:eu,onPointerMove:eh,onPointerLeave:ep,onBlur:ep,onClick:eg,onKeyDown:ex,"aria-label":g,className:b,children:k}),I[56]=ex,I[57]=ef,I[58]=eh,I[59]=ed,I[60]=eg,I[61]=g,I[62]=b,I[63]=k,I[64]=C):C=I[64],I[65]!==T.model.name||I[66]!==V||I[67]!==q||I[68]!==A||I[69]!==L?(E=L&&(0,t.jsx)($,{checked:q,pinned:A,label:T.model.name,onClick:V}),I[65]=T.model.name,I[66]=V,I[67]=q,I[68]=A,I[69]=L,I[70]=E):E=I[70],I[71]!==T.model.name||I[72]!==M||I[73]!==A?(z=(0,t.jsx)(B,{label:T.model.name,pinned:A,onClick:M}),I[71]=T.model.name,I[72]=M,I[73]=A,I[74]=z):z=I[74],I[75]!==ef||I[76]!==C||I[77]!==E||I[78]!==z?(R=(0,t.jsxs)("span",{className:"group/cell relative block before:absolute before:-inset-x-2 before:-top-2 before:bottom-0",onPointerEnter:ef,children:[C,E,z]}),I[75]=ef,I[76]=C,I[77]=E,I[78]=z,I[79]=R):R=I[79],R}function ec(e){return Math.max(0,e-1)}function ed(e){let l,n,i,s,a,d,u,m,f,h,p,x,g,b,v,j,y,_=(0,r.c)(65),{cell:N,isVideoScenario:k,showScore:S,showQuality:C,scenarioId:E,sortKey:z,scenarioHeading:T,onOpen:M,onOpenModel:F,onScrub:V,selectionEnabled:$,selectionActive:B,selected:U,highlighted:G,onSelect:D}=e,H=(0,c.f)(),Q=(0,o.useLocale)();_[0]!==N||_[1]!==G||_[2]!==k||_[3]!==M||_[4]!==V||_[5]!==D||_[6]!==T||_[7]!==U||_[8]!==B||_[9]!==$?(l=N.asset?(0,t.jsx)(eu,{cell:N,asset:N.asset,isVideoScenario:k,scenarioHeading:T,onOpen:M,onScrub:V,selectionEnabled:$,selectionActive:B,selected:U,highlighted:G,onSelect:D}):(0,t.jsx)(em,{cell:N,isVideoScenario:k,selectionEnabled:$,selectionActive:B,selected:U,highlighted:G,onSelect:D}),_[0]=N,_[1]=G,_[2]=k,_[3]=M,_[4]=V,_[5]=D,_[6]=T,_[7]=U,_[8]=B,_[9]=$,_[10]=l):l=_[10],_[11]!==N.model.author||_[12]!==N.model.id?(n=(0,t.jsx)(I.f,{author:N.model.author,permaslug:N.model.id,frame:!0,className:"size-4"}),_[11]=N.model.author,_[12]=N.model.id,_[13]=n):n=_[13],_[14]!==N.model?(i=(0,A.f)(N.model),_[14]=N.model,_[15]=i):i=_[15];let K=N.model.name;_[16]!==N.model?(s=(0,q.Y)(N.model),_[16]=N.model,_[17]=s):s=_[17],_[18]!==N.model.name||_[19]!==F||_[20]!==i||_[21]!==s?(a=(0,t.jsx)(O.Link,{href:i,title:K,onClick:F,prefetch:!1,className:"truncate rounded-sm text-overline font-medium leading-snug hover:text-accent-foreground hover:underline focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",children:s}),_[18]=N.model.name,_[19]=F,_[20]=i,_[21]=s,_[22]=a):a=_[22],_[23]!==n||_[24]!==a?(d=(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[n,a]}),_[23]=n,_[24]=a,_[25]=d):d=_[25];let W="cost"===z?"text-foreground":"text-muted-foreground";_[26]!==N.costUsd||_[27]!==Q?(u=(0,P.J)(Q,N.costUsd),_[26]=N.costUsd,_[27]=Q,_[28]=u):u=_[28],_[29]!==W||_[30]!==u?(m=(0,t.jsx)("span",{className:W,children:u}),_[29]=W,_[30]=u,_[31]=m):m=_[31],_[32]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(R.f,{className:"text-muted-foreground/40"}),_[32]=f):f=_[32];let Y="time"===z?"text-foreground":"text-muted-foreground";return _[33]!==N.durationMs||_[34]!==H||_[35]!==Q?(h=(0,w.f)(H,Q,N.durationMs),_[33]=N.durationMs,_[34]=H,_[35]=Q,_[36]=h):h=_[36],_[37]!==Y||_[38]!==h?(p=(0,t.jsx)("span",{className:Y,children:h}),_[37]=Y,_[38]=h,_[39]=p):p=_[39],_[40]!==N||_[41]!==Q||_[42]!==E||_[43]!==S||_[44]!==z?(x=S&&void 0!==N.score&&(0,t.jsx)(en.b,{score:N.score,emphasised:"score"===z,judges:(0,L.o)(Q,[N]),scenarioId:E}),_[40]=N,_[41]=Q,_[42]=E,_[43]=S,_[44]=z,_[45]=x):x=_[45],_[46]!==N.quality||_[47]!==E||_[48]!==C||_[49]!==z?(g=C&&void 0!==N.quality&&(0,t.jsx)(el,{quality:N.quality,emphasised:"quality"===z||"controversial"===z,scenarioId:E}),_[46]=N.quality,_[47]=E,_[48]=C,_[49]=z,_[50]=g):g=_[50],_[51]!==m||_[52]!==p||_[53]!==x||_[54]!==g?(b=(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 text-overline leading-tight tabular-nums",children:[m,f,p,x,g]}),_[51]=m,_[52]=p,_[53]=x,_[54]=g,_[55]=b):b=_[55],_[56]!==N.provider?(v=null===N.provider?null:(0,t.jsx)("span",{className:"mt-0.5 shrink-0 truncate text-overline leading-snug text-muted-foreground",children:N.provider}),_[56]=N.provider,_[57]=v):v=_[57],_[58]!==b||_[59]!==v||_[60]!==d?(j=(0,t.jsxs)("div",{className:"flex h-[3.4rem] min-w-0 flex-col justify-start",children:[d,b,v]}),_[58]=b,_[59]=v,_[60]=d,_[61]=j):j=_[61],_[62]!==l||_[63]!==j?(y=(0,t.jsxs)("li",{className:"flex min-w-0 flex-col gap-1.5",children:[l,j]}),_[62]=l,_[63]=j,_[64]=y):y=_[64],y}function eu(e){let l,n,i,o,s,a,d,u,m,f,h=(0,r.c)(53),{cell:p,asset:x,isVideoScenario:g,scenarioHeading:b,onOpen:v,onScrub:j,selectionEnabled:y,selectionActive:_,selected:w,highlighted:k,onSelect:C}=e,E=(0,c.f)();h[0]!==x?(l=N(x)?x.frameThumbnailUrls??[]:[],h[0]=x,h[1]=l):l=h[1];let z=l,R=N(x)&&0===z.length?x.url:null,{shouldPlayVideo:I,isVideoRendering:T,handlePlayStart:O,handlePlayStop:P,handleVideoPlaying:L}=(0,M.f)(R);if(z.length>0){let e;return h[2]!==p||h[3]!==k||h[4]!==v||h[5]!==j||h[6]!==C||h[7]!==z||h[8]!==w||h[9]!==_||h[10]!==y?(e=(0,t.jsx)(ea,{cell:p,frames:z,onOpen:v,onScrub:j,selectionEnabled:y,selectionActive:_,selected:w,highlighted:k,onSelect:C}),h[2]=p,h[3]=k,h[4]=v,h[5]=j,h[6]=C,h[7]=z,h[8]=w,h[9]=_,h[10]=y,h[11]=e):e=h[11],e}let A=_?C:v;h[12]!==p.model.name||h[13]!==E||h[14]!==_?(n=E(_?"Toggle {model} selection":"View {model} output full size",{model:p.model.name}),h[12]=p.model.name,h[13]=E,h[14]=_,h[15]=n):n=h[15];let q=(w||k)&&"ring-2 ring-primary ring-offset-2 ring-offset-background",F=g?"aspect-video":"aspect-square";return h[16]!==q||h[17]!==F?(i=(0,S.f)("relative block w-full cursor-pointer overflow-hidden rounded-md border border-border bg-muted/40 transition-colors focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",q,F),h[16]=q,h[17]=F,h[18]=i):i=h[18],h[19]!==p.model.name||h[20]!==E||h[21]!==b?(o=E("{model} rendering of the {scenario} prompt",{model:p.model.name,scenario:b.toLowerCase()}),h[19]=p.model.name,h[20]=E,h[21]=b,h[22]=o):o=h[22],h[23]!==x||h[24]!==o?(s=(0,t.jsx)(Q,{asset:x,alt:o,sizes:"(min-width: 1280px) 240px, (min-width: 1024px) 280px, (min-width: 640px) 33vw, 50vw"}),h[23]=x,h[24]=o,h[25]=s):s=h[25],h[26]!==L||h[27]!==R||h[28]!==T||h[29]!==I?(a=I&&R?(0,t.jsx)("video",{src:R,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,"aria-hidden":!0,onPlaying:L,className:(0,S.f)("pointer-events-none absolute inset-0 size-full object-cover transition-opacity duration-300",T?"opacity-100":"opacity-0")}):null,h[26]=L,h[27]=R,h[28]=T,h[29]=I,h[30]=a):a=h[30],h[31]!==A||h[32]!==n||h[33]!==i||h[34]!==s||h[35]!==a?(d=(0,t.jsxs)("button",{type:"button",onClick:A,"aria-label":n,className:i,children:[s,a]}),h[31]=A,h[32]=n,h[33]=i,h[34]=s,h[35]=a,h[36]=d):d=h[36],h[37]!==p.model.name||h[38]!==C||h[39]!==w||h[40]!==_||h[41]!==y?(u=y&&(0,t.jsx)($,{checked:w,pinned:_,label:p.model.name,onClick:C}),h[37]=p.model.name,h[38]=C,h[39]=w,h[40]=_,h[41]=y,h[42]=u):u=h[42],h[43]!==p.model.name||h[44]!==v||h[45]!==_?(m=(0,t.jsx)(B,{label:p.model.name,pinned:_,onClick:v}),h[43]=p.model.name,h[44]=v,h[45]=_,h[46]=m):m=h[46],h[47]!==O||h[48]!==P||h[49]!==d||h[50]!==u||h[51]!==m?(f=(0,t.jsxs)("div",{className:"group/cell relative",onMouseEnter:O,onMouseLeave:P,onFocus:O,onBlur:P,children:[d,u,m]}),h[47]=O,h[48]=P,h[49]=d,h[50]=u,h[51]=m,h[52]=f):f=h[52],f}function em(e){let l,n,i,o,s,a,d,u=(0,r.c)(23),{cell:m,isVideoScenario:f,selectionEnabled:h,selectionActive:p,selected:x,highlighted:g,onSelect:b}=e,v=(0,c.f)(),j=p?b:void 0,y=f?"aspect-video":"aspect-square",_=(x||g)&&"ring-2 ring-primary ring-offset-2 ring-offset-background",w=p&&"cursor-pointer";return u[0]!==y||u[1]!==_||u[2]!==w?(l=(0,S.f)("flex flex-col items-center justify-center gap-1.5 rounded-md",y,"border border-dashed border-border bg-muted/30 px-2 text-center",_,w),u[0]=y,u[1]=_,u[2]=w,u[3]=l):l=u[3],u[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(T.f,{className:"size-4 shrink-0 text-muted-foreground/60"}),u[4]=n):n=u[4],u[5]!==m||u[6]!==v?(i=function(e,t){switch(e.failure){case"ref-limit":return e.failureNote??t("Does not accept references");case"refused":return t("Refused the prompt");case"unsupported":return t("Prompt unsupported");case"error":case void 0:return t("No output returned");default:return e.failure}}(m,v),u[5]=m,u[6]=v,u[7]=i):i=u[7],u[8]!==i?(o=(0,t.jsx)("span",{className:"text-overline leading-tight text-muted-foreground",children:i}),u[8]=i,u[9]=o):o=u[9],u[10]!==l||u[11]!==o?(s=(0,t.jsxs)("div",{className:l,children:[n,o]}),u[10]=l,u[11]=o,u[12]=s):s=u[12],u[13]!==m||u[14]!==b||u[15]!==x||u[16]!==p||u[17]!==h?(a=h&&(0,t.jsx)($,{checked:x,pinned:p,label:m.model.name,onClick:b}),u[13]=m,u[14]=b,u[15]=x,u[16]=p,u[17]=h,u[18]=a):a=u[18],u[19]!==j||u[20]!==a||u[21]!==s?(d=(0,t.jsxs)("div",{className:"group/cell relative",onClick:j,children:[s,a]}),u[19]=j,u[20]=a,u[21]=s,u[22]=d):d=u[22],d}var ef=e.i(153746);function eh(e){let l,n,i,s,a,d=(0,r.c)(15),{harshest:u,mostLenient:m}=e,f=(0,c.f)(),h=(0,o.useLocale)();return d[0]!==f?(l=f("Toughest critic"),d[0]=f,d[1]=l):l=d[1],d[2]!==u||d[3]!==h||d[4]!==l?(n=(0,t.jsx)(ep,{label:l,tendency:u,locale:h}),d[2]=u,d[3]=h,d[4]=l,d[5]=n):n=d[5],d[6]!==f?(i=f("Biggest fan"),d[6]=f,d[7]=i):i=d[7],d[8]!==h||d[9]!==m||d[10]!==i?(s=(0,t.jsx)(ep,{label:i,tendency:m,locale:h}),d[8]=h,d[9]=m,d[10]=i,d[11]=s):s=d[11],d[12]!==n||d[13]!==s?(a=(0,t.jsxs)("dl",{className:"grid w-max grid-cols-[auto_auto_auto_auto] items-center gap-x-2 gap-y-1.5 text-overline leading-5",children:[n,s]}),d[12]=n,d[13]=s,d[14]=a):a=d[14],a}function ep(e){var l,n;let i,o,s,c,d,u,m,f,h,p,x=(0,r.c)(22),{label:g,tendency:b,locale:v}=e;return x[0]!==g?(o=(0,t.jsx)("dt",{className:"text-muted-foreground",children:g}),x[0]=g,x[1]=o):o=x[1],x[2]!==b.judge.author||x[3]!==b.judge.id?(s=(0,t.jsx)(I.f,{author:b.judge.author,permaslug:b.judge.id,frame:!0,className:"size-3.5 shrink-0"}),x[2]=b.judge.author,x[3]=b.judge.id,x[4]=s):s=x[4],x[5]!==b.judge?(c=(0,q.r)(b.judge),x[5]=b.judge,x[6]=c):c=x[6],x[7]!==s||x[8]!==c?(d=(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-foreground",children:[s,c]}),x[7]=s,x[8]=c,x[9]=d):d=x[9],x[10]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground/40",children:"|"}),x[10]=u):u=x[10],x[11]!==v||x[12]!==b.deviation?(l=v,n=b.deviation,i=(0,K.f)(Math.abs(n),{locale:l,preset:"fixed-1"})??"—",m=`${n<0?"−":"+"}${i}`,x[11]=v,x[12]=b.deviation,x[13]=m):m=x[13],x[14]!==m?(f=(0,t.jsx)("span",{className:"tabular-nums text-muted-foreground",children:(0,t.jsxs)(a.T,{children:[(0,t.jsx)(ef.d,{children:m})," vs median"]})}),x[14]=m,x[15]=f):f=x[15],x[16]!==d||x[17]!==f?(h=(0,t.jsxs)("dd",{className:"contents",children:[d,u,f]}),x[16]=d,x[17]=f,x[18]=h):h=x[18],x[19]!==o||x[20]!==h?(p=(0,t.jsxs)(t.Fragment,{children:[o,h]}),x[19]=o,x[20]=h,x[21]=p):p=x[21],p}var ex=e.i(618115),eg=e.i(246705),eb=e.i(647204),ev=e.i(173465);let ej=(0,e.i(524287).f)("arena-source",{text:e=>[e]});async function ey(e,t){let r=await fetch(e,{signal:t});if(!r.ok)return await r.body?.cancel(),(0,eb.Y)({kind:"fetch_failed",status:r.status});let l=Number(r.headers.get("content-length"));return Number.isFinite(l)&&l>1048576?(await r.body?.cancel(),(0,eb.Y)({kind:"too_large"})):null===r.body?(0,eb.N)(""):e_(r.body,1048576)}async function e_(e,t){let r=e.getReader(),l=new TextDecoder,n=[],i=0;try{for(;;){let{done:e,value:o}=await r.read();if(e)return n.push(l.decode()),(0,eb.N)(n.join(""));if((i+=o.byteLength)>t)return await r.cancel(),(0,eb.Y)({kind:"too_large"});n.push(l.decode(o,{stream:!0}))}}catch(e){throw await r.cancel().catch(()=>void 0),e}}let ew="image/svg+xml";function eN(){let e,l=(0,r.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border px-3",children:[(0,t.jsx)(U.l,{className:"h-3 w-28"}),(0,t.jsx)(U.l,{className:"size-8"})]}),(0,t.jsx)(U.l,{className:"h-96 w-full rounded-none"})]}),l[0]=e):e=l[0],e}function ek(e){let n,i,o,s=(0,r.c)(25),{url:d,mediaType:u,className:m}=e,f=(0,c.f)();if(s[0]!==d)n=(0,ev.f)({queryKey:ej.text(d),queryFn:async({signal:e})=>{let t=await ey(d,e);if((0,eb.V)(t))throw Error(function(e){switch(e.kind){case"fetch_failed":return`Source fetch failed with status ${e.status}`;case"too_large":return"Source exceeds the display limit";default:return"Source fetch failed"}}(t.error));return t.data},staleTime:1/0}),s[0]=d,s[1]=n;else n=s[1];let{data:h,isPending:p,isError:x,refetch:g}=(0,ex.f)(n);if(p){let e,r,l;return s[2]!==f?(e=f("Loading generated source"),s[2]=f,s[3]=e):e=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(eN,{}),s[4]=r):r=s[4],s[5]!==m||s[6]!==e?(l=(0,t.jsx)("div",{className:m,role:"status","aria-live":"polite","aria-label":e,children:r}),s[5]=m,s[6]=e,s[7]=l):l=s[7],l}if(x){let e,r,n,i,o;return s[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,t.jsx)(a.T,{children:"The generated source could not be loaded."})}),s[8]=e):e=s[8],s[9]!==g?(r=()=>void g(),s[9]=g,s[10]=r):r=s[10],s[11]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(a.T,{children:"Retry"}),s[11]=n):n=s[11],s[12]!==r?(i=(0,t.jsx)(l.Button,{size:"sm",variant:"outline",onClick:r,children:n}),s[12]=r,s[13]=i):i=s[13],s[14]!==m||s[15]!==i?(o=(0,t.jsxs)("div",{className:m,role:"alert",children:[e,i]}),s[14]=m,s[15]=i,s[16]=o):o=s[16],o}s[17]!==f||s[18]!==u?(i=f(u===ew?"SVG source":"Pixel grid source"),s[17]=f,s[18]=u,s[19]=i):i=s[19];let b=u===ew?"xml":"text";return s[20]!==m||s[21]!==h||s[22]!==i||s[23]!==b?(o=(0,t.jsx)(eg.CodeBlock,{className:m,title:i,rawLanguage:b,value:h,bodyClassName:"min-h-96"}),s[20]=m,s[21]=h,s[22]=i,s[23]=b,s[24]=o):o=s[24],o}var eS=e.i(80676),eC=e.i(192668),eE=e.i(797521),ez=e.i(49505),eR=e.i(88084),eI=e.i(700009),eT=e.i(988278);function eO(e){let l,n=(0,r.c)(6),{asset:i}=e;if(N(i)&&null===i.thumbnailUrl){let e;return n[0]!==i.url?(e=(0,t.jsx)("video",{src:i.url,muted:!0,playsInline:!0,preload:"metadata",className:"size-full object-cover"}),n[0]=i.url,n[1]=e):e=n[1],e}let o=i.thumbnailUrl??i.url;return n[2]!==i.height||n[3]!==i.width||n[4]!==o?(l=(0,t.jsx)(G.default,{src:o,alt:"",width:i.width,height:i.height,sizes:"152px",loading:"lazy",className:"size-full object-cover"}),n[2]=i.height,n[3]=i.width,n[4]=o,n[5]=l):l=n[5],l}function eM(e){let l,n,i,o,s,a,d,u,m,f,p,x,g,b,v,j,y=(0,r.c)(38),{cells:_,index:w,onSelect:N}=e,k=(0,c.f)();y[0]!==_?(l=_.flatMap(eP),y[0]=_,y[1]=l):l=y[1];let C=l,E=(0,h.useRef)(null),z=(0,h.useRef)(null);y[2]===Symbol.for("react.memo_cache_sentinel")?(n={top:!1,bottom:!1},y[2]=n):n=y[2];let[R,T]=(0,h.useState)(n);y[3]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=z.current;if(!e)return;let t={top:e.scrollTop>1,bottom:e.scrollTop+e.clientHeighte.top===t.top&&e.bottom===t.bottom?e:t)},y[3]=i):i=y[3];let O=i;if(y[4]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{E.current?.scrollIntoView({block:"nearest",inline:"nearest"}),O()},y[4]=o):o=y[4],y[5]!==w?(s=[w,O],y[5]=w,y[6]=s):s=y[6],(0,h.useEffect)(o,s),y[7]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{O();let e=z.current;if(!e||"u"t.disconnect()},y[7]=a):a=y[7],y[8]!==C.length?(d=[C.length,O],y[8]=C.length,y[9]=d):d=y[9],(0,h.useEffect)(a,d),C.length<2)return null;let M=R.top?"transparent 0, #000 2.5rem":"#000 0",P=R.bottom?"#000 calc(100% - 2.5rem), transparent 100%":"#000 100%";y[10]!==M||y[11]!==P?(u=[M,P],y[10]=M,y[11]=P,y[12]=u):u=y[12];let L=u.join(", ");if(y[13]!==R.bottom||y[14]!==R.top||y[15]!==L||y[16]!==k){let e=R.top||R.bottom?{"--fade-mask":`linear-gradient(to bottom, ${L})`}:void 0;m=z,y[23]!==k?(f=k("Other models"),y[23]=k,y[24]=f):f=y[24],p=O,x=!0,g=e,b=(0,S.f)("hidden h-[min(60dvh,60vh)] w-38 shrink-0 flex-col gap-2 overflow-y-auto scroll-py-10 p-1 lg:flex",e&&"mask-(--fade-mask) [-webkit-mask-image:var(--fade-mask)]"),y[13]=R.bottom,y[14]=R.top,y[15]=L,y[16]=k,y[17]=m,y[18]=f,y[19]=p,y[20]=x,y[21]=g,y[22]=b}else m=y[17],f=y[18],p=y[19],x=y[20],g=y[21],b=y[22];return y[25]!==k||y[26]!==w||y[27]!==C||y[28]!==N?(v=C.map(e=>{let{asset:r,at:l,cell:n}=e,i=l===w;return(0,t.jsxs)("button",{ref:i?E:void 0,type:"button",onClick:()=>N(l),"aria-label":k("View {model} output",{model:n.model.name}),"aria-current":i?"true":void 0,className:"group w-full shrink-0 cursor-pointer text-left focus-visible:outline-none",children:[(0,t.jsx)("div",{className:(0,S.f)("aspect-(--asset-ratio) overflow-hidden rounded-sm border transition-colors",i?"border-transparent ring-2 ring-focus-border ring-offset-2 ring-offset-popover":"border-border group-hover:border-focus-border"),"data-allow-inline-style":!0,style:{"--asset-ratio":`${r.width} / ${r.height}`},children:(0,t.jsx)(eO,{asset:r})}),(0,t.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1",children:[(0,t.jsx)(I.f,{author:n.model.author,permaslug:n.model.id,frame:!0,className:"size-3.5"}),(0,t.jsx)("span",{className:(0,S.f)("min-w-0 truncate text-overline leading-snug",i?"font-medium text-foreground":"text-muted-foreground"),children:(0,q.Y)(n.model)})]})]},n.id)}),y[25]=k,y[26]=w,y[27]=C,y[28]=N,y[29]=v):v=y[29],y[30]!==m||y[31]!==f||y[32]!==p||y[33]!==x||y[34]!==g||y[35]!==b||y[36]!==v?(j=(0,t.jsx)("nav",{ref:m,"aria-label":f,onScroll:p,"data-allow-inline-style":x,style:g,className:b,children:v}),y[30]=m,y[31]=f,y[32]=p,y[33]=x,y[34]=g,y[35]=b,y[36]=v,y[37]=j):j=y[37],j}function eP(e,t){return null===e.asset?[]:[{asset:e.asset,at:t,cell:e}]}function eL(e){let l,n,i,o,s,a,c=(0,r.c)(18),{asset:d,alt:u}=e,[m,f]=(0,h.useState)(!1);c[0]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{if(null===e)return;let t=()=>f(!0);return e.complete&&t(),e.addEventListener("load",t),e.addEventListener("error",t),()=>{e.removeEventListener("load",t),e.removeEventListener("error",t)}},c[0]=l):l=c[0];let p=l;if(N(d)){let e;return c[1]!==u||c[2]!==d?(e=(0,t.jsx)(eA,{asset:d,alt:u}),c[1]=u,c[2]=d,c[3]=e):e=c[3],e}let x=`${d.width} / ${d.height}`;c[4]!==x?(n={"--asset-ratio":x},c[4]=x,c[5]=n):n=c[5],c[6]!==m?(i=!m&&(0,t.jsx)(U.l,{"aria-hidden":"true","data-slot":"lightbox-media-pending",className:"absolute inset-0 bg-muted/60"}),c[6]=m,c[7]=i):i=c[7];let g=d.url;return c[8]!==m?(o=(0,S.f)("object-contain",D(m)),c[8]=m,c[9]=o):o=c[9],c[10]!==u||c[11]!==d.url||c[12]!==o?(s=(0,t.jsx)(G.default,{ref:p,src:g,alt:u,fill:!0,sizes:"(min-width: 1024px) 860px, calc(100vw - 4rem)",className:o}),c[10]=u,c[11]=d.url,c[12]=o,c[13]=s):s=c[13],c[14]!==n||c[15]!==i||c[16]!==s?(a=(0,t.jsxs)("figure",{"data-slot":"lightbox-media-frame",className:"relative aspect-(--asset-ratio) w-[min(var(--lightbox-frame-width),var(--lightbox-frame-height-width),100%)] shrink-0 overflow-hidden rounded-md border border-border bg-muted/40","data-allow-inline-style":!0,style:n,children:[i,s]}),c[14]=n,c[15]=i,c[16]=s,c[17]=a):a=c[17],a}function eA(e){let l,n,i,o=(0,r.c)(9),{asset:s,alt:a}=e,c=`${s.width} / ${s.height}`;o[0]!==c?(l={"--asset-ratio":c},o[0]=c,o[1]=l):l=o[1];let d=s.thumbnailUrl??void 0;return o[2]!==a||o[3]!==s.url||o[4]!==d?(n=(0,t.jsx)("video",{src:s.url,poster:d,controls:!0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,"aria-label":a,className:"absolute inset-0 size-full object-contain"}),o[2]=a,o[3]=s.url,o[4]=d,o[5]=n):n=o[5],o[6]!==l||o[7]!==n?(i=(0,t.jsx)("figure",{"data-slot":"lightbox-media-frame",className:"relative aspect-(--asset-ratio) w-[min(var(--lightbox-frame-width),var(--lightbox-frame-height-width),100%)] shrink-0 overflow-hidden rounded-md border border-border bg-muted/40","data-allow-inline-style":!0,style:l,children:n}),o[6]=l,o[7]=n,o[8]=i):i=o[8],i}var eq=e.i(67565),eF=e.i(324872),eV=e.i(325100),e$=e.i(548204),eB=e.i(261499),eU=e.i(354896);function eG(e){let l,n,s,a=(0,r.c)(16),{judges:c,className:d}=e,u=(0,o.useLocale)(),m=(0,i.Q)();if(a[0]!==d||a[1]!==c||a[2]!==u||a[3]!==m){let e,r,i=[...c].sort(eD);a[6]!==m?(e=e=>{m.capture("open_benchmark_explore_quality_judge_ratings",{judge:e.id,score:e.score})},a[6]=m,a[7]=e):e=a[7];let o=e;a[8]!==d?(l=(0,S.f)("flex flex-col gap-1.5",d),a[8]=d,a[9]=l):l=a[9],a[10]!==u||a[11]!==o?(r=(e,r)=>(0,t.jsx)(eH,{judge:e,locale:u,defaultOpen:0===r,onOpen:o},e.id),a[10]=u,a[11]=o,a[12]=r):r=a[12],n=i.map(r),a[0]=d,a[1]=c,a[2]=u,a[3]=m,a[4]=l,a[5]=n}else l=a[4],n=a[5];return a[13]!==l||a[14]!==n?(s=(0,t.jsx)("ul",{className:l,children:n}),a[13]=l,a[14]=n,a[15]=s):s=a[15],s}function eD(e,t){return t.score-e.score}function eH(e){let l,n,i,o,s,a,c,d,u,m,f,h,p,x=(0,r.c)(36),{judge:g,locale:b,defaultOpen:v,onOpen:j}=e;if(x[0]!==g||x[1]!==j?(l=e=>{e&&j(g)},x[0]=g,x[1]=j,x[2]=l):l=x[2],x[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,S.f)("flex w-full items-center gap-1.5 px-2.5 py-1.5 text-left text-overline leading-5","rounded-md focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none"),x[3]=n):n=x[3],x[4]!==g.author||x[5]!==g.id?(i=(0,t.jsx)(I.f,{author:g.author,permaslug:g.id,frame:!0,className:"size-3.5 shrink-0"}),x[4]=g.author,x[5]=g.id,x[6]=i):i=x[6],x[7]!==g?(o=(0,q.r)(g),x[7]=g,x[8]=o):o=x[8],x[9]!==o?(s=(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:o}),x[9]=o,x[10]=s):s=x[10],x[11]!==g.score?(a=(0,S.f)("shrink-0 tabular-nums",eK[_(g.score)]),x[11]=g.score,x[12]=a):a=x[12],x[13]!==g.score||x[14]!==b?(c=eW(b,g.score),x[13]=g.score,x[14]=b,x[15]=c):c=x[15],x[16]!==a||x[17]!==c?(d=(0,t.jsx)("span",{className:a,children:c}),x[16]=a,x[17]=c,x[18]=d):d=x[18],x[19]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(eU.f,{className:(0,S.f)("size-3.5 shrink-0 text-faint",eB.a,"group-data-open:-scale-y-100")}),x[19]=u):u=x[19],x[20]!==i||x[21]!==s||x[22]!==d?(m=(0,t.jsxs)(e$.CollapsibleTrigger,{className:n,children:[i,s,d,u]}),x[20]=i,x[21]=s,x[22]=d,x[23]=m):m=x[23],x[24]!==g.ratings||x[25]!==b){let e;x[27]!==b?(e=e=>(0,t.jsx)(eQ,{rating:e,locale:b},e.label),x[27]=b,x[28]=e):e=x[28],f=g.ratings.map(e),x[24]=g.ratings,x[25]=b,x[26]=f}else f=x[26];return x[29]!==f?(h=(0,t.jsx)(e$.CollapsibleContent,{children:(0,t.jsx)("ul",{className:"flex flex-col gap-1.5 border-t border-border px-2.5 py-2",children:f})}),x[29]=f,x[30]=h):h=x[30],x[31]!==v||x[32]!==l||x[33]!==m||x[34]!==h?(p=(0,t.jsx)("li",{children:(0,t.jsxs)(e$.Collapsible,{defaultOpen:v,onOpenChange:l,className:"group rounded-md border border-border",children:[m,h]})}),x[31]=v,x[32]=l,x[33]=m,x[34]=h,x[35]=p):p=x[35],p}function eQ(e){let l,n,i,o,s,a,c=(0,r.c)(16),{rating:d,locale:u}=e;return c[0]!==d.score?(l=(0,S.f)("tabular-nums",eK[_(d.score)]),c[0]=d.score,c[1]=l):l=c[1],c[2]!==u||c[3]!==d.score?(n=eW(u,d.score),c[2]=u,c[3]=d.score,c[4]=n):n=c[4],c[5]!==l||c[6]!==n?(i=(0,t.jsx)("span",{className:l,children:n}),c[5]=l,c[6]=n,c[7]=i):i=c[7],c[8]!==d.label?(o=(0,t.jsx)("span",{className:"whitespace-nowrap text-foreground",children:d.label}),c[8]=d.label,c[9]=o):o=c[9],c[10]!==d.reason?(s=void 0!==d.reason&&(0,t.jsx)("span",{className:"col-start-2 text-muted-foreground sm:col-start-3",children:d.reason}),c[10]=d.reason,c[11]=s):s=c[11],c[12]!==i||c[13]!==o||c[14]!==s?(a=(0,t.jsxs)("li",{className:"grid grid-cols-[1.75rem_1fr] gap-x-2 text-overline leading-5 sm:grid-cols-[1.75rem_auto_1fr]",children:[i,o,s]}),c[12]=i,c[13]=o,c[14]=s,c[15]=a):a=c[15],a}let eK={positive:"text-positive",warning:"text-warning",negative:"text-negative"};function eW(e,t){return(0,K.f)(t,{locale:e,preset:"fixed-1"})??"—"}var eY=e.i(498885);function eJ(e){let n,i,o,s,u,m,f,p,x,g,b,j,y,_,w,N,k,C,E,z,I,T,O,M,P,L,A,q,F,V,$,B,U,G,D,H,Q,K,W,Y,X,ee,et,er,el,ei,eo,es,ea,ec=(0,r.c)(152),{cells:ed,index:eu,showScore:em,showQuality:ef,prompt:eh,chatReferences:ep,scenarioHeading:ex,scenarioId:eg,onClose:eb,onIndex:ev,onStep:ej,onOpenModel:ey,onCopyLink:e_,onTryChat:ew,onModelCta:eN,onToggleSource:eO}=e,eP=(0,eE.f)(),{isCopied:eA,copyToClipboard:e$}=(0,eC.f)(),eB=(0,c.f)(),eU=(0,d.f)(),[eD,eH]=(0,h.useState)(!0),[eQ,eK]=(0,h.useState)(null),eW=eQ!==eu,eJ=(0,h.useRef)(null);ec[0]!==ed?(n=ed.flatMap(eX),ec[0]=ed,ec[1]=n):n=ec[1];let e3=n,e4=e3.indexOf(eu),e5=ed[eu];ec[2]!==ed||ec[3]!==eu||ec[4]!==ev||ec[5]!==ej||ec[6]!==e4||ec[7]!==e3?(i=(e,t)=>{if(-1===e4)return;let r=e3[(e4+e+e3.length)%e3.length],l=void 0===r?void 0:ed[r];void 0!==r&&r!==eu&&l&&(ej({direction:e>0?"next":"previous",modelId:l.model.id,input:t}),eK(null),ev(r))},ec[2]=ed,ec[3]=eu,ec[4]=ev,ec[5]=ej,ec[6]=e4,ec[7]=e3,ec[8]=i):i=ec[8];let e6=i;ec[9]!==e6?(o=e=>e6(e,"keyboard"),ec[9]=e6,ec[10]=o):o=ec[10];let e7=o;ec[11]!==e7?(s={onStep:e7},ec[11]=e7,ec[12]=s):s=ec[12],(0,eY.f)(s),ec[13]!==ed||ec[14]!==eu||ec[15]!==ev||ec[16]!==ej?(u=e=>{let t=ed[e];e!==eu&&t&&(ej({direction:e>eu?"next":"previous",modelId:t.model.id,input:"thumbnail"}),eK(null),ev(e))},ec[13]=ed,ec[14]=eu,ec[15]=ev,ec[16]=ej,ec[17]=u):u=ec[17];let e8=u;ec[18]!==e$||ec[19]!==e_?(m=()=>{e_(),e$(window.location.href)},ec[18]=e$,ec[19]=e_,ec[20]=m):m=ec[20];let e9=m;ec[21]===Symbol.for("react.memo_cache_sentinel")?(f=e=>{null===eJ.current&&(eJ.current=e,eH(!1))},ec[21]=f):f=ec[21];let te=f;ec[22]!==eu||ec[23]!==eW||ec[24]!==eO?(p=()=>{let e=!eW;eK(e?null:eu),eO(e)},ec[22]=eu,ec[23]=eW,ec[24]=eO,ec[25]=p):p=ec[25];let tt=p;if(!e5?.asset)return null;ec[26]===Symbol.for("react.memo_cache_sentinel")?(x=(e,t)=>{e?eH(!0):"escape-key"===t.reason?te("escape"):"outside-press"===t.reason&&te("scrim")},ec[26]=x):x=ec[26],ec[27]!==eb?(g=e=>{e||null===eJ.current||eb(eJ.current)},ec[27]=eb,ec[28]=g):g=ec[28],ec[29]!==e5.model.name||ec[30]!==eB?(b=eB("{model} output",{model:e5.model.name}),ec[29]=e5.model.name,ec[30]=eB,ec[31]=b):b=ec[31],ec[32]===Symbol.for("react.memo_cache_sentinel")?(j=(0,S.f)("flex max-h-[calc(100dvh-2rem)] w-full max-w-[min(calc(100vw-2rem),calc(min(var(--lightbox-frame-width),var(--lightbox-frame-height-width))+2rem))] flex-col gap-3 overflow-y-auto p-4 lg:max-w-[min(calc(100vw-2rem),calc(min(var(--lightbox-frame-width),var(--lightbox-frame-height-width))+var(--lightbox-rail-allowance)))]",eZ),ec[32]=j):j=ec[32];let tr=`${e5.asset.width}px`,tl=`${60*e5.asset.width/e5.asset.height}dvh`,tn=e3.length>1?e1:e0;ec[33]!==tr||ec[34]!==tl||ec[35]!==tn?(y={"--lightbox-frame-width":tr,"--lightbox-frame-height-width":tl,"--lightbox-rail-allowance":tn},ec[33]=tr,ec[34]=tl,ec[35]=tn,ec[36]=y):y=ec[36],ec[37]===Symbol.for("react.memo_cache_sentinel")?(_=()=>te("button"),ec[37]=_):_=ec[37],ec[38]!==e5.source||ec[39]!==eW||ec[40]!==tt?(w=void 0===e5.source?void 0:{isShown:eW,onToggle:tt},ec[38]=e5.source,ec[39]=eW,ec[40]=tt,ec[41]=w):w=ec[41],ec[42]!==e9||ec[43]!==eA||ec[44]!==w?(N=(0,t.jsx)(eV.f,{isCopied:eA,onCopyLink:e9,onClose:_,source:w}),ec[42]=e9,ec[43]=eA,ec[44]=w,ec[45]=N):N=ec[45],ec[46]!==e5.model||ec[47]!==e5.provider||ec[48]!==ey||ec[49]!==N?(k=(0,t.jsx)(eI.H,{model:e5.model,provider:e5.provider,onOpenModel:ey,actions:N}),ec[46]=e5.model,ec[47]=e5.provider,ec[48]=ey,ec[49]=N,ec[50]=k):k=ec[50];let ti=e5.asset.url,to=e5.asset;ec[51]!==e5.model.name||ec[52]!==eB||ec[53]!==ex?(C=eB("{model} rendering of the {scenario} prompt, full size",{model:e5.model.name,scenario:ex.toLowerCase()}),ec[51]=e5.model.name,ec[52]=eB,ec[53]=ex,ec[54]=C):C=ec[54],ec[55]!==e5.asset||ec[56]!==C?(E=(0,t.jsx)("div",{className:"flex min-w-0 flex-1 items-start justify-center",children:(0,t.jsx)(eL,{asset:to,alt:C},ti)}),ec[55]=e5.asset,ec[56]=C,ec[57]=E):E=ec[57],ec[58]!==ed||ec[59]!==eu||ec[60]!==e8?(z=(0,t.jsx)(eM,{cells:ed,index:eu,onSelect:e8}),ec[58]=ed,ec[59]=eu,ec[60]=e8,ec[61]=z):z=ec[61],ec[62]!==E||ec[63]!==z?(I=(0,t.jsxs)("div",{"data-slot":"lightbox-media-row",className:"flex shrink-0 flex-col gap-3 lg:flex-row",children:[E,z]}),ec[62]=E,ec[63]=z,ec[64]=I):I=ec[64],ec[65]!==e5?(T=(0,t.jsx)(e2,{cell:e5}),ec[65]=e5,ec[66]=T):T=ec[66],ec[67]!==e5.score||ec[68]!==em?(O=em&&void 0!==e5.score&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.f,{className:"text-muted-foreground/40"}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,t.jsx)(a.T,{children:"Correctness"})," "]}),(0,t.jsx)(en.E,{score:e5.score})]})]}),ec[67]=e5.score,ec[68]=em,ec[69]=O):O=ec[69],ec[70]!==e5.quality||ec[71]!==ef?(M=ef&&void 0!==e5.quality&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.f,{className:"text-muted-foreground/40"}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,t.jsx)(a.T,{children:"Quality"})," "]}),(0,t.jsx)(Z,{quality:e5.quality})]})]}),ec[70]=e5.quality,ec[71]=ef,ec[72]=M):M=ec[72],ec[73]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsx)(R.f,{className:"text-muted-foreground/40"}),ec[73]=P):P=ec[73],ec[74]!==e5.asset.height||ec[75]!==e5.asset.width?(L=(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e5.asset.width,"×",e5.asset.height]}),ec[74]=e5.asset.height,ec[75]=e5.asset.width,ec[76]=L):L=ec[76],ec[77]!==e5.reasoningEffort?(A=void 0!==e5.reasoningEffort&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.f,{className:"text-muted-foreground/40"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,t.jsx)(a.T,{children:"Reasoning"})," "]}),e5.reasoningEffort]})]}),ec[77]=e5.reasoningEffort,ec[78]=A):A=ec[78],ec[79]!==e6?(q=()=>e6(-1,"button"),ec[79]=e6,ec[80]=q):q=ec[80],ec[81]!==eB?(F=eB("Previous output"),ec[81]=eB,ec[82]=F):F=ec[82],ec[83]===Symbol.for("react.memo_cache_sentinel")?(V=(0,t.jsx)(ez.f,{className:"size-4"}),ec[83]=V):V=ec[83],ec[84]!==q||ec[85]!==F?($=(0,t.jsx)(l.Button,{variant:"outline",size:"icon",onClick:q,"aria-label":F,children:V}),ec[84]=q,ec[85]=F,ec[86]=$):$=ec[86],ec[87]!==e6?(B=()=>e6(1,"button"),ec[87]=e6,ec[88]=B):B=ec[88],ec[89]!==eB?(U=eB("Next output"),ec[89]=eB,ec[90]=U):U=ec[90],ec[91]===Symbol.for("react.memo_cache_sentinel")?(G=(0,t.jsx)(eR.f,{className:"size-4"}),ec[91]=G):G=ec[91],ec[92]!==B||ec[93]!==U?(D=(0,t.jsx)(l.Button,{variant:"outline",size:"icon",onClick:B,"aria-label":U,children:G}),ec[92]=B,ec[93]=U,ec[94]=D):D=ec[94],ec[95]!==$||ec[96]!==D?(H=(0,t.jsxs)("span",{className:"ml-auto flex items-center gap-1",children:[$,D]}),ec[95]=$,ec[96]=D,ec[97]=H):H=ec[97],ec[98]!==T||ec[99]!==O||ec[100]!==M||ec[101]!==L||ec[102]!==A||ec[103]!==H?(Q=(0,t.jsxs)(eI.d,{children:[T,O,M,P,L,A,H]}),ec[98]=T,ec[99]=O,ec[100]=M,ec[101]=L,ec[102]=A,ec[103]=H,ec[104]=Q):Q=ec[104],ec[105]!==e5.score||ec[106]!==eP||ec[107]!==eB||ec[108]!==eg||ec[109]!==em?(K=em&&void 0!==e5.score&&(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:[e5.score.total>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-overline font-medium text-muted-foreground",children:eB("{passed} of {total} checks passed",{passed:eP.number(e5.score.score,{preset:"integer"}),total:eP.number(e5.score.total,{preset:"integer"})})}),(0,t.jsx)(en.k,{score:e5.score})]}),(0,t.jsx)(eq.f,{judges:e5.score.judges??[],scenarioId:eg})]}),ec[105]=e5.score,ec[106]=eP,ec[107]=eB,ec[108]=eg,ec[109]=em,ec[110]=K):K=ec[110],ec[111]!==e5.quality||ec[112]!==eU||ec[113]!==ef?(W=ef&&void 0!==e5.quality&&(0,t.jsxs)("div",{className:"border-t border-border pt-3",children:[(0,t.jsx)("p",{className:"mb-1.5 text-overline font-medium text-muted-foreground",children:(0,t.jsx)(a.T,{children:"Quality score out of 10"})}),(0,t.jsx)(eG,{judges:e5.quality.judges,className:"max-w-lg"}),(0,t.jsx)("p",{className:"mt-1.5 text-overline leading-5 text-muted-foreground",children:eU(J)})]}),ec[111]=e5.quality,ec[112]=eU,ec[113]=ef,ec[114]=W):W=ec[114],ec[115]===Symbol.for("react.memo_cache_sentinel")?(Y=(0,S.f)("max-h-[5lh] min-w-0 overflow-y-auto rounded-sm text-body leading-relaxed text-muted-foreground focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",eZ),ec[115]=Y):Y=ec[115],ec[116]!==eh?(X=(0,t.jsx)("p",{tabIndex:0,"data-slot":"lightbox-prompt",className:Y,children:eh}),ec[116]=eh,ec[117]=X):X=ec[117],ec[118]!==e5.model||ec[119]!==eN?(ee=(0,t.jsx)(eF.f,{model:e5.model,onClickCta:eN}),ec[118]=e5.model,ec[119]=eN,ec[120]=ee):ee=ec[120];let ts=e5.model;return ec[121]!==e5||ec[122]!==ep?(et=(0,v.z)(e5,ep),ec[121]=e5,ec[122]=ep,ec[123]=et):et=ec[123],ec[124]!==e5.model||ec[125]!==ew||ec[126]!==eh||ec[127]!==et?(er=(0,t.jsx)(eT.f,{model:ts,prompt:eh,references:et,onTryChat:ew}),ec[124]=e5.model,ec[125]=ew,ec[126]=eh,ec[127]=et,ec[128]=er):er=ec[128],ec[129]!==ee||ec[130]!==er?(el=(0,t.jsxs)("div",{className:"flex w-full shrink-0 flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[ee,er]}),ec[129]=ee,ec[130]=er,ec[131]=el):el=ec[131],ec[132]!==X||ec[133]!==el?(ei=(0,t.jsxs)("div",{className:"flex flex-col items-start gap-3 border-t border-border pt-3 sm:flex-row sm:justify-between",children:[X,el]}),ec[132]=X,ec[133]=el,ec[134]=ei):ei=ec[134],ec[135]!==e5.source||ec[136]!==eW?(eo=void 0!==e5.source&&eW&&(0,t.jsx)("div",{"data-slot":"lightbox-source",className:"border-t border-border pt-3",children:(0,t.jsx)("div",{className:"max-h-[40dvh] overflow-y-auto",children:(0,t.jsx)(ek,{url:e5.source.url,mediaType:e5.source.mediaType})})}),ec[135]=e5.source,ec[136]=eW,ec[137]=eo):eo=ec[137],ec[138]!==b||ec[139]!==y||ec[140]!==k||ec[141]!==I||ec[142]!==Q||ec[143]!==K||ec[144]!==W||ec[145]!==ei||ec[146]!==eo?(es=(0,t.jsxs)(eS.d,{"aria-label":b,showCloseButton:!1,keepMounted:!1,className:j,"data-allow-inline-style":!0,style:y,children:[k,I,Q,K,W,ei,eo]}),ec[138]=b,ec[139]=y,ec[140]=k,ec[141]=I,ec[142]=Q,ec[143]=K,ec[144]=W,ec[145]=ei,ec[146]=eo,ec[147]=es):es=ec[147],ec[148]!==eD||ec[149]!==g||ec[150]!==es?(ea=(0,t.jsx)(eS.N,{open:eD,onOpenChange:x,onOpenChangeComplete:g,children:es}),ec[148]=eD,ec[149]=g,ec[150]=es,ec[151]=ea):ea=ec[151],ea}function eX(e,t){return e.asset?[t]:[]}let eZ="[scrollbar-color:hsl(var(--muted-foreground))_transparent] scrollbar-thin [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/30 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5",e1="12.25rem",e0="2rem";function e2(e){let l,n,i,s,d,u,m,f,h=(0,r.c)(17),{cell:p}=e,x=(0,c.f)(),g=(0,o.useLocale)();return h[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,t.jsx)(a.T,{children:"Cost"})," "]}),h[0]=l):l=h[0],h[1]!==p.costUsd||h[2]!==g?(n=(0,P.J)(g,p.costUsd),h[1]=p.costUsd,h[2]=g,h[3]=n):n=h[3],h[4]!==n?(i=(0,t.jsxs)("span",{children:[l,n]}),h[4]=n,h[5]=i):i=h[5],h[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(R.f,{className:"text-muted-foreground/40"}),h[6]=s):s=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,t.jsx)(a.T,{children:"Generation time"})," "]}),h[7]=d):d=h[7],h[8]!==p.durationMs||h[9]!==x||h[10]!==g?(u=(0,w.f)(x,g,p.durationMs),h[8]=p.durationMs,h[9]=x,h[10]=g,h[11]=u):u=h[11],h[12]!==u?(m=(0,t.jsxs)("span",{children:[d,u]}),h[12]=u,h[13]=m):m=h[13],h[14]!==i||h[15]!==m?(f=(0,t.jsxs)(t.Fragment,{children:[i,s,m]}),h[14]=i,h[15]=m,h[16]=f):f=h[16],f}var e3=e.i(859986),e4=e.i(934416),e5=e.i(612927);function e6(e){let n,i,o,s,d,u,m=(0,r.c)(18),{references:f,onOpenReference:p}=e,x=(0,c.f)(),[g,b]=(0,h.useState)(null);if(!f||0===f.length)return null;if(m[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("div",{className:"text-overline font-medium uppercase tracking-wider text-muted-foreground/70",children:(0,t.jsx)(a.T,{children:"INPUT REFERENCES"})}),m[0]=n):n=m[0],m[1]!==x||m[2]!==p||m[3]!==f){let e;m[5]!==x||m[6]!==p||m[7]!==f.length?(e=(e,r)=>(0,t.jsxs)(l.Button,{variant:"ghost",onClick:()=>{p(),b(r)},"aria-label":x("Expand reference {index} of {count}",{index:r+1,count:f.length}),className:"group relative h-auto w-auto shrink-0 p-1",children:[(0,t.jsx)(e8,{reference:e,index:r,count:f.length}),(0,t.jsx)("span",{className:"absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(V.f,{className:"size-4 text-foreground drop-shadow"})})]},e.url),m[5]=x,m[6]=p,m[7]=f.length,m[8]=e):e=m[8],i=f.map(e),m[1]=x,m[2]=p,m[3]=f,m[4]=i}else i=m[4];return m[9]!==i?(o=(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:i}),m[9]=i,m[10]=o):o=m[10],m[11]===Symbol.for("react.memo_cache_sentinel")?(s=()=>b(null),m[11]=s):s=m[11],m[12]!==g||m[13]!==f?(d=(0,t.jsx)(e9,{references:f,index:g,onIndex:b,onClose:s}),m[12]=g,m[13]=f,m[14]=d):d=m[14],m[15]!==o||m[16]!==d?(u=(0,t.jsxs)("div",{className:"border-t border-border pt-3",children:[n,o,d]}),m[15]=o,m[16]=d,m[17]=u):u=m[17],u}let e7="size-16 rounded-md border border-border bg-muted/30 object-contain transition-opacity group-hover:opacity-80";function e8(e){let l,n,i=(0,r.c)(21),{reference:o,index:s,count:a}=e,d=(0,c.f)();if(k(o)){let e,r;if(null!==o.thumbnailUrl){let e,r,l=o.thumbnailUrl,n=s+1;return i[0]!==a||i[1]!==d||i[2]!==n?(e=d("Reference video {index} of {count} sent with this prompt",{index:n,count:a}),i[0]=a,i[1]=d,i[2]=n,i[3]=e):e=i[3],i[4]!==o.thumbnailUrl||i[5]!==e?(r=(0,t.jsx)(G.default,{src:l,alt:e,width:64,height:64,sizes:"64px",className:e7}),i[4]=o.thumbnailUrl,i[5]=e,i[6]=r):r=i[6],r}let l=o.url,n=s+1;return i[7]!==a||i[8]!==d||i[9]!==n?(e=d("Reference video {index} of {count} sent with this prompt",{index:n,count:a}),i[7]=a,i[8]=d,i[9]=n,i[10]=e):e=i[10],i[11]!==o.url||i[12]!==e?(r=(0,t.jsx)("video",{src:l,muted:!0,playsInline:!0,preload:"metadata","aria-label":e,className:e7}),i[11]=o.url,i[12]=e,i[13]=r):r=i[13],r}let u=o.url,m=s+1;return i[14]!==a||i[15]!==d||i[16]!==m?(l=d("Reference image {index} of {count} sent with this prompt",{index:m,count:a}),i[14]=a,i[15]=d,i[16]=m,i[17]=l):l=i[17],i[18]!==o.url||i[19]!==l?(n=(0,t.jsx)(G.default,{src:u,alt:l,width:64,height:64,sizes:"64px",className:e7}),i[18]=o.url,i[19]=l,i[20]=n):n=i[20],n}function e9(e){let l,n=(0,r.c)(5),{references:i,index:o,onIndex:s,onClose:a}=e;return null!==o&&i[o]?(n[0]!==o||n[1]!==a||n[2]!==s||n[3]!==i?(l=(0,t.jsx)(te,{references:i,index:o,onIndex:s,onClose:a}),n[0]=o,n[1]=a,n[2]=s,n[3]=i,n[4]=l):l=n[4],l):null}function te(e){let n,i,o,s,a,d,u,m,f,p,x,g,b,v=(0,r.c)(39),{references:j,index:y,onIndex:_,onClose:w}=e,N=(0,eE.f)(),S=(0,c.f)(),[C,E]=(0,h.useState)(!0);v[0]!==y||v[1]!==_||v[2]!==j.length?(n=e=>_((y+e+j.length)%j.length),v[0]=y,v[1]=_,v[2]=j.length,v[3]=n):n=v[3];let z=n;v[4]!==z?(i={onStep:z},v[4]=z,v[5]=i):i=v[5],(0,eY.f)(i),v[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>E(!1),v[6]=o):o=v[6];let R=o,I=j[y];if(!I)return null;v[7]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{E(e)},v[7]=s):s=v[7],v[8]!==w?(a=e=>{e||w()},v[8]=w,v[9]=a):a=v[9];let T=y+1;return v[10]!==S||v[11]!==j.length||v[12]!==T?(d=S("Reference {index} of {count}",{index:T,count:j.length}),v[10]=S,v[11]=j.length,v[12]=T,v[13]=d):d=v[13],v[14]!==S?(u=S("Close"),v[14]=S,v[15]=u):u=v[15],v[16]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(e5.X,{className:"size-4"}),v[16]=m):m=v[16],v[17]!==u?(f=(0,t.jsx)(l.Button,{variant:"outline",size:"icon",onClick:R,"aria-label":u,className:"absolute right-6 top-6 z-10 bg-popover/90 backdrop-blur-sm",children:m}),v[17]=u,v[18]=f):f=v[18],v[19]!==S||v[20]!==y||v[21]!==I||v[22]!==j.length?(p=k(I)?(0,t.jsx)("video",{src:I.url,poster:I.thumbnailUrl??void 0,controls:!0,muted:!0,playsInline:!0,"aria-label":S("Reference video {index} of {count}",{index:y+1,count:j.length}),className:"max-h-[70vh] w-full rounded-lg border border-border object-contain"}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("img",{src:I.url,alt:S("Reference {index} of {count}",{index:y+1,count:j.length}),className:"max-h-[70vh] w-full rounded-lg border border-border object-contain"})}),v[19]=S,v[20]=y,v[21]=I,v[22]=j.length,v[23]=p):p=v[23],v[24]!==N||v[25]!==S||v[26]!==y||v[27]!==j.length||v[28]!==z?(x=j.length>1?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-body text-muted-foreground",children:S("{current} of {total}",{current:N.number(y+1,{preset:"integer"}),total:N.number(j.length,{preset:"integer"})})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.Button,{variant:"outline",size:"icon-sm",onClick:()=>z(-1),"aria-label":S("Previous reference"),children:(0,t.jsx)(e3.f,{className:"size-4"})}),(0,t.jsx)(l.Button,{variant:"outline",size:"icon-sm",onClick:()=>z(1),"aria-label":S("Next reference"),children:(0,t.jsx)(e4.f,{className:"size-4"})})]})]}):null,v[24]=N,v[25]=S,v[26]=y,v[27]=j.length,v[28]=z,v[29]=x):x=v[29],v[30]!==f||v[31]!==p||v[32]!==x||v[33]!==d?(g=(0,t.jsxs)(eS.d,{"aria-label":d,showCloseButton:!1,keepMounted:!1,className:"flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-225 flex-col gap-3 overflow-y-auto p-4",children:[f,p,x]}),v[30]=f,v[31]=p,v[32]=x,v[33]=d,v[34]=g):g=v[34],v[35]!==C||v[36]!==g||v[37]!==a?(b=(0,t.jsx)(eS.N,{open:C,onOpenChange:s,onOpenChangeComplete:a,children:g}),v[35]=C,v[36]=g,v[37]=a,v[38]=b):b=v[38],b}var tt=e.i(542692),tr=e.i(33706);function tl(e){return!e.asset}function tn(e){return e.cells}function ti(e){return e.cells}function to(e){return e.cells.some(ts)}function ts(e){return null!==e.asset&&N(e.asset)}function ta(e){return e.setting}function tc(e){let l,n,i,o=(0,r.c)(10),{label:s,options:a,active:c,onSelect:d}=e;return a.length<2?null:(o[0]!==a?(l=a.map(td),o[0]=a,o[1]=l):l=o[1],o[2]!==c||o[3]!==s||o[4]!==d||o[5]!==l?(n=(0,t.jsx)(p.f,{label:s,options:l,active:c,onSelect:d}),o[2]=c,o[3]=s,o[4]=d,o[5]=l,o[6]=n):n=o[6],o[7]!==s||o[8]!==n?(i=(0,t.jsx)(x.f,{label:s,children:n}),o[7]=s,o[8]=n,o[9]=i):i=o[9],i)}function td(e){return{id:e,label:e}}function tu(e){let n,i,o,s,c,d=(0,r.c)(9),{cells:u,active:m,onSelect:h}=e;d[0]!==u?(n=u.filter(tf).slice(0,3).map(tm),d[0]=u,d[1]=n):n=d[1];let p=n;return m||p.length<2?null:(d[2]!==h||d[3]!==p?(i=()=>h(p),d[2]=h,d[3]=p,d[4]=i):i=d[4],d[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(f.f,{}),s=(0,t.jsx)(a.T,{children:"Try in chat"}),d[5]=o,d[6]=s):(o=d[5],s=d[6]),d[7]!==i?(c=(0,t.jsxs)(l.Button,{variant:"default",size:"sm",className:"ml-auto",onClick:i,children:[o,s]}),d[7]=i,d[8]=c):c=d[8],c)}function tm(e){return e.model.id}function tf(e){return null!==e.asset}function th(e){let i,o,s,f,h,p,x,b,v,j,y,_,N,k,S,E,z,R=(0,r.c)(50),{keys:I,sortKey:T,dir:O,onSort:M}=e,P="asc"===O?m.f:u.f,L=(0,c.f)(),A=(0,d.f)();if(R[0]!==L?(i=L("Sort image outputs"),R[0]=L,R[1]=i):i=R[1],R[2]!==M?(o=e=>M(e,"buttons"),R[2]=M,R[3]=o):o=R[3],R[4]!==O||R[5]!==I||R[6]!==T||R[7]!==i||R[8]!==o?(s=(0,t.jsx)(g.f,{ariaLabel:i,keys:I,labels:w.G,sortKey:T,dir:O,onSort:o,className:"hidden sm:flex"}),R[4]=O,R[5]=I,R[6]=T,R[7]=i,R[8]=o,R[9]=s):s=R[9],R[10]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("span",{className:C,children:(0,t.jsx)(a.T,{children:"Sort by"})}),R[10]=f):f=R[10],R[11]!==M?(h=e=>{let t=(0,w.I)(e);t&&M(t,"select")},R[11]=M,R[12]=h):h=R[12],R[13]!==L||R[14]!==A||R[15]!==T?(p=L("Sort by {label}",{label:A(w.G[T])}),R[13]=L,R[14]=A,R[15]=T,R[16]=p):p=R[16],R[17]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(n.SelectValue,{}),R[17]=x):x=R[17],R[18]!==p?(b=(0,t.jsx)(n.SelectTrigger,{"aria-label":p,className:"min-h-10 flex-1",children:x}),R[18]=p,R[19]=b):b=R[19],R[20]!==I||R[21]!==A){let e;R[23]!==A?(e=e=>(0,t.jsx)(n.SelectItem,{value:e,children:A(w.G[e])},e),R[23]=A,R[24]=e):e=R[24],v=I.map(e),R[20]=I,R[21]=A,R[22]=v}else v=R[22];return R[25]!==v?(j=(0,t.jsx)(n.SelectContent,{children:v}),R[25]=v,R[26]=j):j=R[26],R[27]!==T||R[28]!==j||R[29]!==h||R[30]!==b?(y=(0,t.jsxs)(n.Select,{value:T,onValueChange:h,children:[b,j]}),R[27]=T,R[28]=j,R[29]=h,R[30]=b,R[31]=y):y=R[31],R[32]!==M||R[33]!==T?(_=()=>M(T,"select"),R[32]=M,R[33]=T,R[34]=_):_=R[34],R[35]!==O||R[36]!==L?(N=L("asc"===O?"Sort descending":"Sort ascending"),R[35]=O,R[36]=L,R[37]=N):N=R[37],R[38]!==P?(k=(0,t.jsx)(P,{className:"size-4"}),R[38]=P,R[39]=k):k=R[39],R[40]!==_||R[41]!==N||R[42]!==k?(S=(0,t.jsx)(l.Button,{variant:"outline",size:"icon",onClick:_,"aria-label":N,children:k}),R[40]=_,R[41]=N,R[42]=k,R[43]=S):S=R[43],R[44]!==y||R[45]!==S?(E=(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 sm:hidden",children:[f,y,S]}),R[44]=y,R[45]=S,R[46]=E):E=R[46],R[47]!==E||R[48]!==s?(z=(0,t.jsxs)(t.Fragment,{children:[s,E]}),R[47]=E,R[48]=s,R[49]=z):z=R[49],z}function tp(e){let l,n,o,s,a=(0,r.c)(17),{variant:c,scenarioId:d,lens:u}=e,m=(0,i.Q)();a[0]!==u||a[1]!==m||a[2]!==d?(l=()=>{m.capture("copy_benchmark_explore_prompt",{lens:u,scenario:d})},a[0]=u,a[1]=m,a[2]=d,a[3]=l):l=a[3];let f=l;a[4]!==u||a[5]!==m||a[6]!==d||a[7]!==c.id?(n=()=>{m.capture("click_benchmark_explore_reference",{lens:u,scenario:d,variant:c.id})},a[4]=u,a[5]=m,a[6]=d,a[7]=c.id,a[8]=n):n=a[8];let h=n;return a[9]!==h||a[10]!==c.id||a[11]!==c.references?(o=(0,t.jsx)(e6,{references:c.references,onOpenReference:h},c.id),a[9]=h,a[10]=c.id,a[11]=c.references,a[12]=o):o=a[12],a[13]!==f||a[14]!==o||a[15]!==c.prompt?(s=(0,t.jsx)(tr.f,{prompt:c.prompt,onCopy:f,children:o}),a[13]=f,a[14]=o,a[15]=c.prompt,a[16]=s):s=a[16],s}e.s(["MediaGallery",0,function(e){var l,n;let a,c,d,u,m,f,p,x,g,_,N,k,S,C,z,R,I,T,O,M,P,L,A,q,F,V,$,B,U,G,D,H,Q,K,W,Y,J,X,Z,ee,et,er,el,en,eo,es,ea,ec,eu,em=(0,r.c)(250),{scenario:ef,lens:ep,highlightedModelId:ex}=e,eg=(0,i.Q)();em[0]!==ef.variants?(a=(0,w.E)(ef.variants.map(ta)),em[0]=ef.variants,em[1]=a):a=em[1];let eb=a,ev=ef.secondAxis,[ej,ey]=(0,h.useState)(eb[0]);em[2]!==ef.variants||em[3]!==ej?(l=ef.variants,c=l.find(e=>e.setting===ej)??l[0],em[2]=ef.variants,em[3]=ej,em[4]=c):c=em[4];let e_=c;em[5]!==ef.variants?(d=ef.variants.some(to),em[5]=ef.variants,em[6]=d):d=em[6];let ew=d;em[7]!==ef.variants?(u=ef.variants.flatMap(ti),em[7]=ef.variants,em[8]=u):u=em[8];let eN=u;em[9]!==eN?(m=(0,w.g)(eN),em[9]=eN,em[10]=m):m=em[10];let ek=m;em[11]!==ek?(f=ek.includes("score"),em[11]=ek,em[12]=f):f=em[12];let eS=f;em[13]!==ek?(p=ek.includes("quality"),em[13]=ek,em[14]=p):p=em[14];let eC=p;em[15]!==eN?(x=function(e){let t=new Map;for(let r of e){if(void 0===r.quality)continue;let{score:e}=r.quality;for(let l of r.quality.judges){let r=t.get(l.id)??{judge:l,deviations:[]};t.set(l.id,{judge:r.judge,deviations:[...r.deviations,l.score-e]})}}let r=[...t.values()].map(e=>{var t;return{judge:e.judge,deviation:(t=e.deviations).reduce((e,t)=>e+t,0)/t.length}}).sort((e,t)=>e.deviation-t.deviation),l=r[0],n=r.at(-1);return void 0===l||void 0===n||l===n||n.deviation-l.deviation<.1?null:{harshest:l,mostLenient:n}}(eN),em[15]=eN,em[16]=x):x=em[16];let eE=x;em[17]!==ek?(g=(0,w.Z)(ek),em[17]=ek,em[18]=g):g=em[18];let ez=g,[eR,eI]=(0,h.useState)(ez),[eT,eO]=(0,h.useState)(w.z[ez]),eM=(0,h.useRef)(!1);em[19]!==ez||em[20]!==eR||em[21]!==ek?(_=()=>{eM.current&&ek.includes(eR)||(eI(ez),eO(w.z[ez]))},N=[ek,eR,ez],em[19]=ez,em[20]=eR,em[21]=ek,em[22]=_,em[23]=N):(_=em[22],N=em[23]),(0,h.useEffect)(_,N);let eP=(0,o.useLocale)();em[24]!==eP||em[25]!==ef.variants?(k=function(e,t){let r=new Map;for(let t of e)r.has(t.model.author)||r.set(t.model.author,function(e){let t=e.model.name.indexOf(": ");return t<=0?e.model.author:e.model.name.slice(0,t)}(t));return[...r.entries()].map(([e,t])=>({slug:e,label:t})).sort((e,r)=>(0,b.o)(e.label,r.label,{locale:t}))}(ef.variants.flatMap(tn),eP),em[24]=eP,em[25]=ef.variants,em[26]=k):k=em[26];let eL=k,[eA,eq]=(0,h.useState)(null);em[27]!==eA||em[28]!==eL?(S=null!==eA&&eL.some(e=>e.slug===eA)?eA:null,em[27]=eA,em[28]=eL,em[29]=S):S=em[29];let eF=S;if(em[30]!==eF||em[31]!==eT||em[32]!==ex||em[33]!==eR||em[34]!==e_?.cells){let e;em[36]!==e_?.cells?(e=e_?.cells??[],em[36]=e_?.cells,em[37]=e):e=em[37],C=(0,y.R)((0,w.S)((n=e,null===eF?[...n]:n.filter(e=>e.model.author===eF)),eR,eT),ex),em[30]=eF,em[31]=eT,em[32]=ex,em[33]=eR,em[34]=e_?.cells,em[35]=C}else C=em[35];let eV=C,e$=(0,tt.useMediaGallerySelection)(),eB=null!==e$;em[38]!==eV||em[39]!==eg||em[40]!==ef.id||em[41]!==e$||em[42]!==eB||em[43]!==e_?(z=e=>{if(!eB||null===e$)return;let t=!e$.selected.has(e);eg.capture("click_benchmark_explore_select_model",{model_id:e,modality:e$.modality,did_select:t,model_count:e$.selected.size+(t?1:-1)}),void 0!==e_&&e$.setPrompt(ef.id,e_.prompt,(0,v.e)(eV,e_.chatReferences)),e$.toggle(e)},em[38]=eV,em[39]=eg,em[40]=ef.id,em[41]=e$,em[42]=eB,em[43]=e_,em[44]=z):z=em[44];let eU=z;em[45]!==eV||em[46]!==eg||em[47]!==ef.id||em[48]!==e$||em[49]!==eB||em[50]!==e_?(R=e=>{eB&&null!==e$&&(eg.capture("click_benchmark_explore_select_hint",{modality:e$.modality,model_count:e.length}),void 0!==e_&&e$.setPrompt(ef.id,e_.prompt,(0,v.e)(eV,e_.chatReferences)),e.forEach(e=>e$.toggle(e)))},em[45]=eV,em[46]=eg,em[47]=ef.id,em[48]=e$,em[49]=eB,em[50]=e_,em[51]=R):R=em[51];let eG=R;em[52]!==eV||em[53]!==ef.id||em[54]!==e$||em[55]!==e_?(I=()=>{e$?.active===!0&&e$.promptScenarioId===ef.id&&void 0!==e_&&e$.setPrompt(ef.id,e_.prompt,(0,v.e)(eV,e_.chatReferences))},em[52]=eV,em[53]=ef.id,em[54]=e$,em[55]=e_,em[56]=I):I=em[56];let eD=e$?.active,eH=e$?.promptScenarioId,eQ=e$?.setPrompt,eK=e_?.chatReferences,eW=e_?.id,eY=e_?.prompt;em[57]!==eV||em[58]!==ef.id||em[59]!==eD||em[60]!==eH||em[61]!==eQ||em[62]!==eK||em[63]!==eW||em[64]!==eY?(T=[eV,ef.id,eD,eH,eQ,eK,eW,eY],em[57]=eV,em[58]=ef.id,em[59]=eD,em[60]=eH,em[61]=eQ,em[62]=eK,em[63]=eW,em[64]=eY,em[65]=T):T=em[65],(0,h.useEffect)(I,T);let[eX,eZ]=(0,h.useState)(null),e1=(0,h.useRef)(null),[e0,e2]=(0,h.useState)(null),e3=ef.variants[0]?.cells.length??0;em[66]!==ef.variants[0]?.cells?(O=ef.variants[0]?.cells.filter(tl).length??0,em[66]=ef.variants[0]?.cells,em[67]=O):O=em[67];let e4=O;em[68]!==e4||em[69]!==ep||em[70]!==e3||em[71]!==ef.id?(M={lens:ep,scenario:ef.id,modelCount:e3,failureCount:e4},em[68]=e4,em[69]=ep,em[70]=e3,em[71]=ef.id,em[72]=M):M=em[72];let{ref:e5,recordOutputOpen:e6,recordModelClick:e7}=function({lens:e,scenario:t,modelCount:r,failureCount:l}){let n=(0,i.Q)(),o=(0,h.useRef)(0),s=(0,h.useRef)(null),a=(0,h.useRef)(0),c=(0,h.useRef)(0),d=(0,h.useRef)(!1),u=(0,h.useRef)(!1),m=(0,h.useRef)(!1),{ref:f,isIntersecting:p}=(0,ei.f)({rootMargin:"-25% 0px",initialIsIntersecting:!("IntersectionObserver"in window)}),x=(0,h.useCallback)(()=>{null!==s.current&&(o.current+=Date.now()-s.current,s.current=null)},[]),g=(0,h.useCallback)(()=>{null!==s.current||"hidden"!==document.visibilityState&&(s.current=Date.now())},[]);(0,h.useEffect)(()=>(m.current=p,p)?(g(),d.current||(d.current=!0,n.capture("view_benchmark_explore_scenario",{lens:e,scenario:t,model_count:r,failure_count:l})),x):void x(),[p,n,e,t,r,l,x,g]),(0,h.useEffect)(()=>{let e=()=>{"hidden"===document.visibilityState?x():m.current&&g()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[x,g]);let b=(0,h.useRef)({posthog:n,lens:e,scenario:t});b.current={posthog:n,lens:e,scenario:t};let v=(0,h.useCallback)(()=>{d.current&&!u.current&&(u.current=!0,x(),b.current.posthog.capture("exit_benchmark_explore_scenario",{lens:b.current.lens,scenario:b.current.scenario,dwell_ms:o.current,outputs_opened:a.current,models_clicked:c.current}))},[x]);return(0,h.useEffect)(()=>{let e=e=>{e.persisted&&(u.current=!1,o.current=0,a.current=0,c.current=0,m.current&&g())};return window.addEventListener("pagehide",v),window.addEventListener("pageshow",e),()=>{window.removeEventListener("pagehide",v),window.removeEventListener("pageshow",e),v()}},[v,g]),{ref:f,recordOutputOpen:(0,h.useCallback)(()=>{a.current+=1},[]),recordModelClick:(0,h.useCallback)(()=>{c.current+=1},[])}}(M);em[73]!==eT||em[74]!==ep||em[75]!==eg||em[76]!==ef.id||em[77]!==eR?(P=(e,t)=>{let r="asc"===eT?"desc":"asc",l=e===eR?r:w.z[e];eg.capture("click_benchmark_explore_sort",{lens:ep,scenario:ef.id,sort_key:e,sort_dir:l,surface:t}),eM.current=!0,eO(l),eI(e)},em[73]=eT,em[74]=ep,em[75]=eg,em[76]=ef.id,em[77]=eR,em[78]=P):P=em[78];let e8=P;em[79]!==eV||em[80]!==ep||em[81]!==eX||em[82]!==eg||em[83]!==ef.id?(L=e=>{eg.capture("close_benchmark_explore_output",{lens:ep,scenario:ef.id,model_id:null===eX?null:eV[eX]?.model.id??null,trigger:e,dwell_ms:null===e1.current?null:Date.now()-e1.current}),e1.current=null,eZ(null),(0,j.W)()},em[79]=eV,em[80]=ep,em[81]=eX,em[82]=eg,em[83]=ef.id,em[84]=L):L=em[84];let e9=L;em[85]!==ep||em[86]!==e9||em[87]!==eX||em[88]!==eg||em[89]!==ef.id?(A=(e,t)=>{eg.capture("click_benchmark_explore_second_axis",{lens:ep,scenario:ef.id,axis:e,value:t}),null!==eX&&e9("axis_switch"),ey(t)},em[85]=ep,em[86]=e9,em[87]=eX,em[88]=eg,em[89]=ef.id,em[90]=A):A=em[90];let te=A;em[91]!==ep||em[92]!==e9||em[93]!==eX||em[94]!==eg||em[95]!==ef.id?(q=e=>{eg.capture("click_benchmark_explore_author_filter",{lens:ep,scenario:ef.id,author:e}),null!==eX&&e9("author_filter"),eq(e)},em[91]=ep,em[92]=e9,em[93]=eX,em[94]=eg,em[95]=ef.id,em[96]=q):q=em[96];let tr=q;em[97]!==eV||em[98]!==ep||em[99]!==eg||em[100]!==e6||em[101]!==ef.id||em[102]!==eR?(F=(e,t)=>{let r=eV[e];r&&(e6(),e1.current=Date.now(),eg.capture("open_benchmark_explore_output",{lens:ep,scenario:ef.id,model_id:r.model.id,rank:e+1,sort_key:eR,source:t}),eZ(e))},em[97]=eV,em[98]=ep,em[99]=eg,em[100]=e6,em[101]=ef.id,em[102]=eR,em[103]=F):F=em[103];let ts=F;em[104]!==ef.id||em[105]!==eb?(V=()=>{let e=(0,j.F)(window.location.hash);null!==e&&e.scenario===ef.id&&((0,s.f)(e.setting)&&eb.includes(e.setting)&&ey(e.setting),e2(e.modelId))},$=[ef.id,eb],em[104]=ef.id,em[105]=eb,em[106]=V,em[107]=$):(V=em[106],$=em[107]),(0,h.useEffect)(V,$),em[108]!==eV||em[109]!==e0||em[110]!==ts?(B=()=>{if(null===e0)return;e2(null);let e=eV.findIndex(e=>e.model.id===e0&&e.asset);-1!==e&&ts(e,"deep_link")},U=[e0,eV,ts],em[108]=eV,em[109]=e0,em[110]=ts,em[111]=B,em[112]=U):(B=em[111],U=em[112]),(0,h.useEffect)(B,U),em[113]!==eV||em[114]!==eX||em[115]!==ef.id||em[116]!==ev||em[117]!==ej?(G=()=>{if(null===eX)return;let e=eV[eX];e&&(0,j.V)({scenario:ef.id,modelId:e.model.id,setting:(0,s.f)(ev)?ej??null:null})},D=[eX,eV,ef.id,ev,ej],em[113]=eV,em[114]=eX,em[115]=ef.id,em[116]=ev,em[117]=ej,em[118]=G,em[119]=D):(G=em[118],D=em[119]),(0,h.useEffect)(G,D),em[120]!==ep||em[121]!==eg||em[122]!==ef.id?(H=e=>{eg.capture("step_benchmark_explore_output",{lens:ep,scenario:ef.id,direction:e.direction,model_id:e.modelId,input:e.input}),e1.current=Date.now()},em[120]=ep,em[121]=eg,em[122]=ef.id,em[123]=H):H=em[123];let td=H;em[124]!==eV||em[125]!==ep||em[126]!==eg||em[127]!==e7||em[128]!==ef.id||em[129]!==eR?(Q=(e,t)=>{let r=eV[e];r&&(e7(),eg.capture("click_benchmark_explore_model",{lens:ep,scenario:ef.id,model_id:r.model.id,model_author:r.model.author,source:t,sort_key:eR,rank:e+1,did_generate:!!r.asset}))},em[124]=eV,em[125]=ep,em[126]=eg,em[127]=e7,em[128]=ef.id,em[129]=eR,em[130]=Q):Q=em[130];let tm=Q;em[131]!==eV||em[132]!==ep||em[133]!==eX||em[134]!==eg||em[135]!==ef.id||em[136]!==eR||em[137]!==e_?.chatReferences?(K=()=>{if(null===eX)return;let e=eV[eX];if(!e)return;let t=(0,v.z)(e,e_?.chatReferences);eg.capture("click_benchmark_explore_try_chat",{lens:ep,scenario:ef.id,model_id:e.model.id,model_author:e.model.author,sort_key:eR,rank:eX+1,did_carry_references:t.length>0,reference_count:t.length})},em[131]=eV,em[132]=ep,em[133]=eX,em[134]=eg,em[135]=ef.id,em[136]=eR,em[137]=e_?.chatReferences,em[138]=K):K=em[138];let tf=K;em[139]!==eV||em[140]!==ep||em[141]!==eX||em[142]!==eg||em[143]!==ef.id||em[144]!==eR?(W=e=>{if(null===eX)return;let t=eV[eX];t&&eg.capture("click_benchmark_explore_model_cta",{lens:ep,scenario:ef.id,model_id:t.model.id,model_author:t.model.author,cta:e,sort_key:eR,rank:eX+1})},em[139]=eV,em[140]=ep,em[141]=eX,em[142]=eg,em[143]=ef.id,em[144]=eR,em[145]=W):W=em[145];let tx=W;em[146]!==eV||em[147]!==ep||em[148]!==eX||em[149]!==eg||em[150]!==ef.id?(Y=e=>{if(null===eX)return;let t=eV[eX];t&&eg.capture("toggle_benchmark_explore_source",{lens:ep,scenario:ef.id,model_id:t.model.id,model_author:t.model.author,is_shown:e,rank:eX+1})},em[146]=eV,em[147]=ep,em[148]=eX,em[149]=eg,em[150]=ef.id,em[151]=Y):Y=em[151];let tg=Y;em[152]!==eV||em[153]!==ep||em[154]!==eg||em[155]!==ef.id||em[156]!==eR?(J=e=>{let t=eV[e];t&&eg.capture("scrub_benchmark_explore_video_thumbnail",{lens:ep,scenario:ef.id,model_id:t.model.id,frame_count:t.asset?.frameThumbnailUrls?.length??0,sort_key:eR,rank:e+1})},em[152]=eV,em[153]=ep,em[154]=eg,em[155]=ef.id,em[156]=eR,em[157]=J):J=em[157];let tb=J;em[158]!==eV||em[159]!==ep||em[160]!==eX||em[161]!==eg||em[162]!==ef.id?(X=()=>{eg.capture("copy_benchmark_explore_output_link",{lens:ep,scenario:ef.id,model_id:null===eX?null:eV[eX]?.model.id??null})},em[158]=eV,em[159]=ep,em[160]=eX,em[161]=eg,em[162]=ef.id,em[163]=X):X=em[163];let tv=X;if(!e_)return null;em[164]!==te||em[165]!==ev||em[166]!==eb||em[167]!==e_?(Z=(0,s.f)(ev)&&(0,t.jsx)(tc,{label:ev,options:eb,active:e_.setting,onSelect:e=>te(ev,e)}),em[164]=te,em[165]=ev,em[166]=eb,em[167]=e_,em[168]=Z):Z=em[168],em[169]!==ep||em[170]!==ef.id||em[171]!==e_?(ee=(0,t.jsx)(tp,{variant:e_,scenarioId:ef.id,lens:ep}),em[169]=ep,em[170]=ef.id,em[171]=e_,em[172]=ee):ee=em[172],em[173]!==eT||em[174]!==e8||em[175]!==eR||em[176]!==ek?(et=(0,t.jsx)(th,{keys:ek,sortKey:eR,dir:eT,onSort:e8}),em[173]=eT,em[174]=e8,em[175]=eR,em[176]=ek,em[177]=et):et=em[177],em[178]!==eF||em[179]!==eL||em[180]!==tr?(er=eL.length>1&&(0,t.jsx)(E,{options:eL,author:eF,onSelect:tr}),em[178]=eF,em[179]=eL,em[180]=tr,em[181]=er):er=em[181],em[182]!==eV||em[183]!==eG||em[184]!==e$?(el=null!==e$&&(0,t.jsx)(tu,{cells:eV,active:e$.active,onSelect:eG}),em[182]=eV,em[183]=eG,em[184]=e$,em[185]=el):el=em[185],em[186]!==et||em[187]!==er||em[188]!==el?(en=(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[et,er,el]}),em[186]=et,em[187]=er,em[188]=el,em[189]=en):en=em[189],em[190]!==eC||em[191]!==eE?(eo=eC&&null!==eE&&(0,t.jsx)(eh,{harshest:eE.harshest,mostLenient:eE.mostLenient}),em[190]=eC,em[191]=eE,em[192]=eo):eo=em[192];let tj=ew?"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:gap-4":"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 xl:gap-4";if(em[193]!==eV||em[194]!==ex||em[195]!==ew||em[196]!==ts||em[197]!==tm||em[198]!==tb||em[199]!==eU||em[200]!==ef.heading||em[201]!==ef.id||em[202]!==e$?.active||em[203]!==e$?.selected||em[204]!==eB||em[205]!==eC||em[206]!==eS||em[207]!==eR){let e;em[209]!==ex||em[210]!==ew||em[211]!==ts||em[212]!==tm||em[213]!==tb||em[214]!==eU||em[215]!==ef.heading||em[216]!==ef.id||em[217]!==e$?.active||em[218]!==e$?.selected||em[219]!==eB||em[220]!==eC||em[221]!==eS||em[222]!==eR?(e=(e,r)=>(0,t.jsx)(ed,{cell:e,isVideoScenario:ew,showScore:eS,showQuality:eC,scenarioId:ef.id,sortKey:eR,scenarioHeading:ef.heading,onOpen:()=>ts(r,"grid"),onOpenModel:()=>tm(r,"grid"),onScrub:()=>tb(r),selectionEnabled:eB,selectionActive:e$?.active??!1,selected:e$?.selected.has(e.model.id)??!1,highlighted:e.model.id===ex,onSelect:()=>eU(e.model.id)},e.id),em[209]=ex,em[210]=ew,em[211]=ts,em[212]=tm,em[213]=tb,em[214]=eU,em[215]=ef.heading,em[216]=ef.id,em[217]=e$?.active,em[218]=e$?.selected,em[219]=eB,em[220]=eC,em[221]=eS,em[222]=eR,em[223]=e):e=em[223],es=eV.map(e),em[193]=eV,em[194]=ex,em[195]=ew,em[196]=ts,em[197]=tm,em[198]=tb,em[199]=eU,em[200]=ef.heading,em[201]=ef.id,em[202]=e$?.active,em[203]=e$?.selected,em[204]=eB,em[205]=eC,em[206]=eS,em[207]=eR,em[208]=es}else es=em[208];return em[224]!==tj||em[225]!==es?(ea=(0,t.jsx)("ul",{className:tj,children:es}),em[224]=tj,em[225]=es,em[226]=ea):ea=em[226],em[227]!==eV||em[228]!==e9||em[229]!==tv||em[230]!==tx||em[231]!==tm||em[232]!==td||em[233]!==tg||em[234]!==tf||em[235]!==eX||em[236]!==ef.heading||em[237]!==ef.id||em[238]!==eC||em[239]!==eS||em[240]!==e_?(ec=null!==eX&&(0,t.jsx)(eJ,{cells:eV,index:eX,showScore:eS,showQuality:eC,prompt:e_.prompt,chatReferences:e_.chatReferences,scenarioHeading:ef.heading,scenarioId:ef.id,onClose:e9,onIndex:eZ,onStep:td,onOpenModel:()=>tm(eX,"lightbox"),onCopyLink:tv,onTryChat:tf,onModelCta:tx,onToggleSource:tg}),em[227]=eV,em[228]=e9,em[229]=tv,em[230]=tx,em[231]=tm,em[232]=td,em[233]=tg,em[234]=tf,em[235]=eX,em[236]=ef.heading,em[237]=ef.id,em[238]=eC,em[239]=eS,em[240]=e_,em[241]=ec):ec=em[241],em[242]!==Z||em[243]!==ee||em[244]!==en||em[245]!==eo||em[246]!==ea||em[247]!==ec||em[248]!==e5?(eu=(0,t.jsxs)("section",{ref:e5,className:"flex flex-col gap-4",children:[Z,ee,en,eo,ea,ec]}),em[242]=Z,em[243]=ee,em[244]=en,em[245]=eo,em[246]=ea,em[247]=ec,em[248]=e5,em[249]=eu):eu=em[249],eu}],880414)},542692,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(16043);let n=(0,l.createContext)(null);function i(){return new Set}e.s(["MediaGallerySelectionProvider",0,function(e){let o,s,a,c,d,u,m=(0,r.c)(15),{modality:f,children:h}=e,[p,x]=(0,l.useState)(i),[g,b]=(0,l.useState)(null);m[0]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{x(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},m[0]=o):o=m[0];let v=o;m[1]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{x(new Set)},m[1]=s):s=m[1];let j=s;m[2]===Symbol.for("react.memo_cache_sentinel")?(a=(e,t,r)=>{b({prompt:t,references:[...r],scenarioId:e})},m[2]=a):a=m[2];let y=a,_=p.size>0,w=g?.prompt??"",N=g?.scenarioId??null;m[3]!==g?.references?(c=g?.references??[],m[3]=g?.references,m[4]=c):c=m[4],m[5]!==f||m[6]!==p||m[7]!==_||m[8]!==w||m[9]!==N||m[10]!==c?(d={modality:f,selected:p,active:_,prompt:w,promptScenarioId:N,references:c,toggle:v,clear:j,setPrompt:y},m[5]=f,m[6]=p,m[7]=_,m[8]=w,m[9]=N,m[10]=c,m[11]=d):d=m[11];let k=d;return m[12]!==h||m[13]!==k?(u=(0,t.jsx)(n.Provider,{value:k,children:h}),m[12]=h,m[13]=k,m[14]=u):u=m[14],u},"useMediaGallerySelection",0,function(){return(0,l.useContext)(n)}])},761787,e=>{"use strict";var t=e.i(659350),r=e.i(663456),l=e.i(510433),n=e.i(139697),i=e.i(732571),o=e.i(609623),s=e.i(236614),a=e.i(192668),c=e.i(960773),d=e.i(797521);e.i(707060);var u=e.i(359980),m=e.i(196991),f=e.i(288265),h=e.i(153746),p=e.i(872635),x=e.i(10460),g=e.i(173155),b=e.i(16043),v=e.i(410857),j=e.i(447131),y=e.i(155771);function _(e,t){let r=JSON.stringify({model:"",prompt:e,...t.length>0?{input_references:t.map(w)}:{}},null,2);return`'${r.replaceAll("'","'\\''")}'`}function w(e){let{url:t}=e;return e.mediaType.startsWith("video/")?{type:"video_url",video_url:{url:t}}:e.mediaType.startsWith("audio/")?{type:"audio_url",audio_url:{url:t}}:{type:"image_url",image_url:{url:t}}}var N=e.i(78138),k=e.i(542692);let S="flex-1 md:flex-none",C=new Set;function E(e){let l,i,s,a,c,f,g,b,v,j,y,_,w,N,k,C=(0,r.c)(38),{count:E,isCopied:R,onClear:I,onCopy:T,chatHref:O,chatroomCapabilityGate:M,onChatClick:P}=e,L=(0,d.f)();return C[0]!==E||C[1]!==L?(l=L.number(E,{preset:"integer"}),C[0]=E,C[1]=L,C[2]=l):l=C[2],C[3]!==l?(i=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.d,{children:l})," model selected"]}),C[3]=l,C[4]=i):i=C[4],C[5]!==E||C[6]!==L?(s=L.number(E,{preset:"integer"}),C[5]=E,C[6]=L,C[7]=s):s=C[7],C[8]!==s?(a=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.d,{children:s})," models selected"]}),C[8]=s,C[9]=a):a=C[9],C[10]!==E||C[11]!==i||C[12]!==a?(c=(0,t.jsx)("span",{className:"text-body font-medium tabular-nums",children:(0,t.jsx)(m.T,{children:(0,t.jsx)(u.f,{n:E,one:i,other:a})})}),C[10]=E,C[11]=i,C[12]=a,C[13]=c):c=C[13],C[14]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(m.T,{children:"Clear"}),C[14]=f):f=C[14],C[15]!==I?(g=(0,t.jsx)(n.Button,{variant:"ghost",onClick:I,className:"md:ml-auto",children:f}),C[15]=I,C[16]=g):g=C[16],C[17]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(x.f,{}),v=(0,t.jsx)(p.f,{className:"text-positive"}),C[17]=b,C[18]=v):(b=C[17],v=C[18]),C[19]!==R?(j=(0,t.jsx)(o.f,{active:R,from:b,to:v}),y=R?(0,t.jsx)(m.T,{children:"Copied"}):(0,t.jsx)(m.T,{children:"Copy agent prompt"}),C[19]=R,C[20]=j,C[21]=y):(j=C[20],y=C[21]),C[22]!==T||C[23]!==j||C[24]!==y?(_=(0,t.jsxs)(n.Button,{variant:"outline",onClick:T,className:S,children:[j,y]}),C[22]=T,C[23]=j,C[24]=y,C[25]=_):_=C[25],C[26]!==O||C[27]!==M||C[28]!==E||C[29]!==P?(w=(0,t.jsx)(z,{chatHref:O,count:E,chatroomCapabilityGate:M,onChatClick:P}),C[26]=O,C[27]=M,C[28]=E,C[29]=P,C[30]=w):w=C[30],C[31]!==_||C[32]!==w?(N=(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 md:w-auto",children:[_,w]}),C[31]=_,C[32]=w,C[33]=N):N=C[33],C[34]!==N||C[35]!==c||C[36]!==g?(k=(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-320 flex-wrap items-center gap-3 px-4 py-3 md:px-6",children:[c,g,N]}),C[34]=N,C[35]=c,C[36]=g,C[37]=k):k=C[37],k}function z(e){let l,n,i,o,s=(0,r.c)(11),{chatHref:a,count:c,chatroomCapabilityGate:d,onChatClick:u}=e,m=(0,f.f)();s[0]!==c||s[1]!==m?(l=1===c?m("Try it in chat"):m("Try all {count} in chat",{count:c}),s[0]=c,s[1]=m,s[2]=l):l=s[2];let h=l;return s[3]!==a?(n=(0,t.jsx)("a",{href:a,target:"_blank",rel:"noreferrer noopener"}),s[3]=a,s[4]=n):n=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(g.f,{}),s[5]=i):i=s[5],s[6]!==d||s[7]!==h||s[8]!==u||s[9]!==n?(o=(0,t.jsxs)(j.f,{gate:d,variant:"default",className:S,onClick:u,render:n,children:[i,h]}),s[6]=d,s[7]=h,s[8]=u,s[9]=n,s[10]=o):o=s[10],o}function R(){let e,l,n,i=(0,r.c)(3);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"h-6"}),l=(0,t.jsx)("span",{className:"invisible min-h-10 md:ml-auto"}),i[0]=e,i[1]=l):(e=i[0],l=i[1]),i[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("div",{"aria-hidden":"true","data-testid":"selected-models-footer-spacer",className:"border-t border-transparent [padding-bottom:env(safe-area-inset-bottom)]",children:(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-320 flex-wrap items-center gap-3 px-4 py-3 md:px-6",children:[e,l,(0,t.jsxs)("div",{className:"flex h-10 w-full items-center gap-2 md:w-auto",children:[(0,t.jsx)("span",{className:"invisible min-h-10 flex-1 md:flex-none"}),(0,t.jsx)("span",{className:"invisible min-h-10 flex-1 md:flex-none"})]})]})}),i[2]=n):n=i[2],n}e.s(["MediaGallerySelectionBar",0,function(){let e,n,o,d,u,m,h,p,x,g,j,w,S,z=(0,r.c)(48),I=(0,k.useMediaGallerySelection)(),T=(0,c.Q)(),O=(0,f.f)(),M=(0,s.f)(l.J.Chatroom),P=(0,y.f)(),{isCopied:L,copyToClipboard:A}=(0,a.f)(),q=I?.selected??C,[F,V]=(0,b.useState)(q);q.size>0&&q!==F&&V(q);let $=0===q.size;if(z[0]!==P||z[1]!==I||z[2]!==F){d=Symbol.for("react.early_return_sentinel");e:{if(e=(n=Array.from(F)).length,null===I||0===e){d=null;break e}o=(0,N.s)(P,n,I.references)}z[0]=P,z[1]=I,z[2]=F,z[3]=e,z[4]=n,z[5]=o,z[6]=d}else e=z[3],n=z[4],o=z[5],d=z[6];if(d!==Symbol.for("react.early_return_sentinel"))return d;let B=o;z[7]!==A||z[8]!==e||z[9]!==T||z[10]!==n||z[11]!==I.modality||z[12]!==I.prompt||z[13]!==I.references?(u=()=>{T.capture("copy_benchmark_explore_selected_prompt",{modality:I.modality,model_count:e}),A(function({modality:e,prompt:t,modelIds:r,references:l=[]}){var n,i,o,s;let a=`Prompt: ${JSON.stringify(t)} Models: ${r.map(e=>`- ${e}`).join("\n")} Auth: use $OPENROUTER_API_KEY if already set in the env; otherwise ask the user for a key from https://openrouter.ai/keys.`;switch(e){case"image":return n=a,i=_(t,l.filter(e=>e.mediaType.startsWith("image/"))),`Generate one image per model below with the OpenRouter Image API, then build a comparison artifact. ${n} For each model, time the call: curl -s -w '\\n%{time_total}\\n' https://openrouter.ai/api/v1/images \\ -H "Authorization: Bearer $OPENROUTER_API_KEY" \\ -H "Content-Type: application/json" \\ -d ${i} Response: {"data":[{"b64_json":"...","media_type":"image/png"}],"usage":{"cost":0.04}} Output into ./openrouter-comparison/: - images/. — decoded data[0].b64_json - results.csv — model_id, cost_usd (usage.cost), seconds, image_path, error - index.html — self-contained grid of the images, each captioned with model ID, cost, and time; keep failures in the grid as an error cell.`;case"video":return o=a,s=_(t,l),`Generate one video per model below with the OpenRouter Video API, then build a comparison artifact. ${o} Video generation is asynchronous. For each model, submit a job and time it from submit to completion: curl -s https://openrouter.ai/api/v1/videos \\ -H "Authorization: Bearer $OPENROUTER_API_KEY" \\ -H "Content-Type: application/json" \\ -d ${s} Response: {"id":"","polling_url":"https://openrouter.ai/api/v1/videos/","status":"pending"} Poll GET the polling_url with the same Authorization header every 5s until status is terminal — "completed", "failed", "cancelled", or "expired" — giving up after 15 minutes. Only "completed" produces a clip; record the other three as that model's error. A completed job reads {"status":"completed","unsigned_urls":["..."],"usage":{"cost":0.25}}; download unsigned_urls[0] with the same header. Run the models concurrently — the jobs take minutes each. Output into ./openrouter-comparison/: - videos/.mp4 — the downloaded unsigned_urls[0] - results.csv — model_id, cost_usd (usage.cost), seconds, video_path, error - index.html — self-contained grid of the clips as muted looping