arize-phoenix 4.30.1__py3-none-any.whl → 4.31.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- import{r as u,j as e,b as I,a9 as Yn,v as s,w as C,aa as Fe,ab as je,$ as G,ac as ea,y as me,z as ge,D as U,F as W,B as Kn,R as De,o as sl,ad as ln,ae as ce,af as tn,ag as Cr,E as La,ah as qn,a7 as le,a1 as qe,a2 as B,ai as ye,aj as pn,ak as Fr,al as pa,am as ya,an as fa,ao as Pn,ap as ve,aq as ol,n as dl,a as Kr,ar as xr,as as Dr,at as cl,au as ul,av as Tr,c as Ir,d as Lr,aw as _r,G as Ar,ax as Er}from"./vendor-DsnEJuEV.js";import{R as Te,u as Ie,a as Me,T as _a,P as ml,b as gl,M as qa,c as Ba,d as Bn,D as wr,e as Rr,f as z,g as pl,h as ke,i as ia,j as xn,k as yl,l as Dn,m as Tn,n as fl,o as Ne,p as we,C as re,q as ra,r as Be,s as Aa,t as cn,E as hl,v as Pr,w as Mr,L as se,x as Nr,y as Vr,F as $r,z as zr,A as rn,B as be,S as Qr,G as Or,H as kl,I as jr,J as qr,K as Ha,N as Br,O as Hr,Q as Gr,U as Ur,V as Wr,W as Jr,X as bl,Y as In,Z as Zr,_ as Xr,$ as Yr,a0 as es,a1 as ns,a2 as sn,a3 as Ea,a4 as Sl,a5 as Sn,a6 as Da,a7 as kn,a8 as Le,a9 as as,aa as ls,ab as pe,ac as vl,ad as sa,ae as Ke,af as wa,ag as un,ah as X,ai as mn,aj as ts,ak as Ra,al as Ae,am as Ee,an as la,ao as Pa,ap as Cl,aq as is,ar as rs,as as Se,at as Re,au as Hn,av as ss,aw as Gn,ax as oa,ay as Fl,az as Kl,aA as os,aB as xl,aC as Dl,aD as Tl,aE as Ln,aF as _n,aG as Ve,aH as An,aI as Pe,aJ as ds,aK as Ga,aL as Il,aM as cs,aN as us,aO as ms,aP as Mn,aQ as gs,aR as ps,aS as ys,aT as fs,aU as hs,aV as ks,aW as bs,aX as Ss,aY as vs,aZ as vn,a_ as Ye,a$ as Ta,b0 as yn,b1 as en,b2 as Cs,b3 as da,b4 as Fs,b5 as Ma,b6 as Ks,b7 as xs,b8 as na}from"./components-CkSg5zK4.js";import{D as Na,B as he,C as q,H as nn,J as ue,K as Ds,l as Va,M as Un,P as gn,I as w,e as E,N as He,a as Ll,c as te,p as En,q as wn,t as ie,h as K,n as _l,O as $e,j as x,i as k,L as zn,Q as Al,f as V,S as j,s as Y,U as J,V as El,W as wl,X as Ts,Y as Is,Z as $a,_ as Cn,v as Wn,T as Ce,d as ae,z as Jn,r as on,$ as Q,a0 as Rl,E as ca,b as Qn,a1 as za,a2 as Ls,y as ua,u as _s,a3 as As}from"./vendor-arizeai-DtynTLNi.js";import{R as Ge,C as Zn,X as Ue,Y as xe,a as We,T as Je,B as Fn,A as On,b as Pl,c as Qa,L as Ml,d as Es,P as ws,e as Rs,f as Ps}from"./vendor-recharts-reihe2SJ.js";import{p as Oa,R as ma,n as ga,j as Ms,E as Ns,k as Vs,c as $s}from"./vendor-codemirror-C5to5cK4.js";const Nl=u.createContext(null);function zs(){const n=u.useContext(Nl);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function am(n){return e(Nl.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Vl=function(){var n=[{alias:null,args:null,concreteType:"Functionality",kind:"LinkedField",name:"functionality",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"modelInferences",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"homeLoaderQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"homeLoaderQuery",selections:n},params:{cacheID:"6926e4e720b443f7b7252b60271944e6",id:null,metadata:{},name:"homeLoaderQuery",operationKind:"query",text:`query homeLoaderQuery {
1
+ import{r as u,j as e,b as I,a9 as Yn,v as s,w as C,aa as Fe,ab as je,$ as G,ac as ea,y as me,z as ge,D as U,F as W,B as Kn,R as De,o as sl,ad as ln,ae as ce,af as tn,ag as Cr,E as La,ah as qn,a7 as le,a1 as qe,a2 as H,a3 as Fr,ai as ye,aj as pn,ak as Kr,al as pa,am as ya,an as fa,ao as Pn,ap as ve,aq as ol,n as dl,a as xr,ar as Dr,as as Tr,at as cl,au as ul,av as Ir,c as Lr,d as _r,aw as Er,G as Ar,ax as wr}from"./vendor-DsnEJuEV.js";import{R as Te,u as Ie,a as Me,T as _a,P as ml,b as gl,M as qa,c as Ha,d as Hn,D as Rr,e as Pr,f as z,g as pl,h as ke,i as ia,j as xn,k as yl,l as Dn,m as Tn,n as fl,o as Ne,p as we,C as re,q as ra,r as He,s as Ea,t as cn,E as hl,v as Mr,w as Nr,L as se,x as Vr,y as $r,F as zr,z as Qr,A as rn,B as be,S as Or,G as jr,H as kl,I as qr,J as Hr,K as Ba,N as Br,O as Gr,Q as Ur,U as Wr,V as Jr,W as Zr,X as bl,Y as In,Z as Xr,_ as Yr,$ as es,a0 as ns,a1 as as,a2 as sn,a3 as Aa,a4 as Sl,a5 as Sn,a6 as Da,a7 as kn,a8 as Le,a9 as ls,aa as ts,ab as pe,ac as vl,ad as sa,ae as Ke,af as wa,ag as un,ah as X,ai as mn,aj as is,ak as Ra,al as Ee,am as Ae,an as la,ao as Pa,ap as Cl,aq as rs,ar as ss,as as Se,at as Re,au as Bn,av as os,aw as Gn,ax as oa,ay as Fl,az as Kl,aA as ds,aB as xl,aC as Dl,aD as Tl,aE as Ln,aF as _n,aG as Ve,aH as En,aI as Pe,aJ as cs,aK as Ga,aL as Il,aM as us,aN as ms,aO as gs,aP as Mn,aQ as ps,aR as ys,aS as fs,aT as hs,aU as ks,aV as bs,aW as Ss,aX as vs,aY as Cs,aZ as vn,a_ as Ye,a$ as Ta,b0 as yn,b1 as en,b2 as Fs,b3 as da,b4 as Ks,b5 as Ma,b6 as xs,b7 as Ds,b8 as na}from"./components-CEsu6itL.js";import{D as Na,B as he,C as q,H as nn,J as ue,K as Ts,l as Va,M as Un,P as gn,I as w,e as A,N as Be,a as Ll,c as te,p as An,q as wn,t as ie,h as K,n as _l,O as $e,j as x,i as k,L as zn,Q as El,f as V,S as j,s as Y,U as J,V as Al,W as wl,X as Is,Y as Ls,Z as $a,_ as Cn,v as Wn,T as Ce,d as ae,z as Jn,r as on,$ as Q,a0 as Rl,E as ca,b as Qn,a1 as za,a2 as _s,y as ua,u as Es,a3 as As}from"./vendor-arizeai-DtynTLNi.js";import{R as Ge,C as Zn,X as Ue,Y as xe,a as We,T as Je,B as Fn,A as On,b as Pl,c as Qa,L as Ml,d as ws,P as Rs,e as Ps,f as Ms}from"./vendor-recharts-reihe2SJ.js";import{p as Oa,R as ma,n as ga,j as Ns,E as Vs,k as $s,c as zs}from"./vendor-codemirror-C5to5cK4.js";const Nl=u.createContext(null);function Qs(){const n=u.useContext(Nl);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function om(n){return e(Nl.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Vl=function(){var n=[{alias:null,args:null,concreteType:"Functionality",kind:"LinkedField",name:"functionality",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"modelInferences",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"homeLoaderQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"homeLoaderQuery",selections:n},params:{cacheID:"6926e4e720b443f7b7252b60271944e6",id:null,metadata:{},name:"homeLoaderQuery",operationKind:"query",text:`query homeLoaderQuery {
2
2
  functionality {
3
3
  modelInferences
4
4
  }
@@ -11,7 +11,7 @@ import{r as u,j as e,b as I,a9 as Yn,v as s,w as C,aa as Fe,ab as je,$ as G,ac a
11
11
  }
12
12
  }
13
13
  }
14
- `}}}();Vl.hash="a4bbc4917b3217b8254d68ec7c76dbdd";async function lm(n){var l;const a=await I.fetchQuery(Te,Vl,{}).toPromise();if(a!=null&&a.functionality.modelInferences)return Yn("/model");if((l=a==null?void 0:a.projects.edges)!=null&&l.length){let t=0,i=null;for(const{project:o}of a.projects.edges)o.endTime!=null&&(t++,i=o.id);if(t>1)return Yn("/projects");if(t===1&&i!=null)return Yn(`/projects/${i}`);const r=a==null?void 0:a.projects.edges[0].project.id;return Yn(`/projects/${r}`)}else throw new Error("No functionality available")}const $l=function(){var n={defaultValue:null,kind:"LocalArgument",name:"endTime"},a={defaultValue:null,kind:"LocalArgument",name:"startTime"},l=[{kind:"Variable",name:"endTime",variableName:"endTime"},{kind:"Variable",name:"startTime",variableName:"startTime"}],t=[{kind:"Literal",name:"first",value:50}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={fields:[{kind:"Variable",name:"end",variableName:"endTime"},{kind:"Variable",name:"start",variableName:"startTime"}],kind:"ObjectValue",name:"timeRange"},c={alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},d=[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],m={alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ModelPageQuery",selections:[{args:l,kind:"FragmentSpread",name:"ModelSchemaTable_dimensions"},{args:l,kind:"FragmentSpread",name:"ModelEmbeddingsTable_embeddingDimensions"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ModelPageQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:t,concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dimension",args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},{alias:"cardinality",args:[{kind:"Literal",name:"metric",value:"cardinality"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[{kind:"Literal",name:"metric",value:"percentEmpty"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"min",args:[{kind:"Literal",name:"metric",value:"min"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"mean",args:[{kind:"Literal",name:"metric",value:"mean"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"max",args:[{kind:"Literal",name:"metric",value:"max"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},m],storageKey:"dimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelSchemaTable_dimensions",kind:"LinkedHandle",name:"dimensions"},{alias:null,args:t,concreteType:"EmbeddingDimensionConnection",kind:"LinkedField",name:"embeddingDimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"EmbeddingDimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"embedding",args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:"euclideanDistance",args:[{kind:"Literal",name:"metric",value:"euclideanDistance"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},m],storageKey:"embeddingDimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelEmbeddingsTable_embeddingDimensions",kind:"LinkedHandle",name:"embeddingDimensions"}],storageKey:null}]},params:{cacheID:"18059ac8df6b3c15d5e4bc04ca2c9877",id:null,metadata:{},name:"ModelPageQuery",operationKind:"query",text:`query ModelPageQuery(
14
+ `}}}();Vl.hash="a4bbc4917b3217b8254d68ec7c76dbdd";async function dm(n){var l;const a=await I.fetchQuery(Te,Vl,{}).toPromise();if(a!=null&&a.functionality.modelInferences)return Yn("/model");if((l=a==null?void 0:a.projects.edges)!=null&&l.length){let t=0,i=null;for(const{project:o}of a.projects.edges)o.endTime!=null&&(t++,i=o.id);if(t>1)return Yn("/projects");if(t===1&&i!=null)return Yn(`/projects/${i}`);const r=a==null?void 0:a.projects.edges[0].project.id;return Yn(`/projects/${r}`)}else throw new Error("No functionality available")}const $l=function(){var n={defaultValue:null,kind:"LocalArgument",name:"endTime"},a={defaultValue:null,kind:"LocalArgument",name:"startTime"},l=[{kind:"Variable",name:"endTime",variableName:"endTime"},{kind:"Variable",name:"startTime",variableName:"startTime"}],t=[{kind:"Literal",name:"first",value:50}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={fields:[{kind:"Variable",name:"end",variableName:"endTime"},{kind:"Variable",name:"start",variableName:"startTime"}],kind:"ObjectValue",name:"timeRange"},c={alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},d=[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],m={alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ModelPageQuery",selections:[{args:l,kind:"FragmentSpread",name:"ModelSchemaTable_dimensions"},{args:l,kind:"FragmentSpread",name:"ModelEmbeddingsTable_embeddingDimensions"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ModelPageQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:t,concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dimension",args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},{alias:"cardinality",args:[{kind:"Literal",name:"metric",value:"cardinality"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[{kind:"Literal",name:"metric",value:"percentEmpty"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"min",args:[{kind:"Literal",name:"metric",value:"min"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"mean",args:[{kind:"Literal",name:"metric",value:"mean"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"max",args:[{kind:"Literal",name:"metric",value:"max"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},m],storageKey:"dimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelSchemaTable_dimensions",kind:"LinkedHandle",name:"dimensions"},{alias:null,args:t,concreteType:"EmbeddingDimensionConnection",kind:"LinkedField",name:"embeddingDimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"EmbeddingDimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"embedding",args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:"euclideanDistance",args:[{kind:"Literal",name:"metric",value:"euclideanDistance"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},m],storageKey:"embeddingDimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelEmbeddingsTable_embeddingDimensions",kind:"LinkedHandle",name:"embeddingDimensions"}],storageKey:null}]},params:{cacheID:"18059ac8df6b3c15d5e4bc04ca2c9877",id:null,metadata:{},name:"ModelPageQuery",operationKind:"query",text:`query ModelPageQuery(
15
15
  $startTime: DateTime!
16
16
  $endTime: DateTime!
17
17
  ) {
@@ -69,9 +69,9 @@ fragment ModelSchemaTable_dimensions_3uKjWt on Query {
69
69
  }
70
70
  }
71
71
  }
72
- `}}}();$l.hash="b612239336c7638df42037315b00f635";function tm(n){const{referenceInferences:a}=Ie(),{timeRange:l}=Me(),t=I.useLazyLoadQuery($l,{startTime:l.start.toISOString(),endTime:l.end.toISOString()});return s("main",{children:[s(_a,{children:[e(ml,{}),a?e(gl,{inferencesRole:"reference",timeRange:{start:new Date(a.startTime),end:new Date(a.endTime)}}):null]}),e("section",{css:C`
72
+ `}}}();$l.hash="b612239336c7638df42037315b00f635";function cm(n){const{referenceInferences:a}=Ie(),{timeRange:l}=Me(),t=I.useLazyLoadQuery($l,{startTime:l.start.toISOString(),endTime:l.end.toISOString()});return s("main",{children:[s(_a,{children:[e(ml,{}),a?e(gl,{inferencesRole:"reference",timeRange:{start:new Date(a.startTime),end:new Date(a.endTime)}}):null]}),e("section",{css:C`
73
73
  margin: var(--px-spacing-lg);
74
- `,children:e(Na,{title:"Model Schema",variant:"compact",bodyStyle:{padding:0},children:s(he,{children:[e(q,{name:"All",children:s(nn,{children:[e(ue,{title:"Embeddings",id:"embeddings",children:e(qa,{model:t})}),e(ue,{title:"Dimensions",id:"dimensions",children:e(Ba,{model:t})})]})},"all"),e(q,{name:"Embeddings",children:e(qa,{model:t})},"embeddings"),e(q,{name:"Dimensions",children:e(Ba,{model:t})},"dimensions")]})})}),e(Fe,{})]})}const zl={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"MetricSelector_dimensions"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],storageKey:null}]},params:{cacheID:"4ccf476dd862525b059197daccd0d4d9",id:null,metadata:{},name:"EmbeddingPageModelQuery",operationKind:"query",text:`query EmbeddingPageModelQuery {
74
+ `,children:e(Na,{title:"Model Schema",variant:"compact",bodyStyle:{padding:0},children:s(he,{children:[e(q,{name:"All",children:s(nn,{children:[e(ue,{title:"Embeddings",id:"embeddings",children:e(qa,{model:t})}),e(ue,{title:"Dimensions",id:"dimensions",children:e(Ha,{model:t})})]})},"all"),e(q,{name:"Embeddings",children:e(qa,{model:t})},"embeddings"),e(q,{name:"Dimensions",children:e(Ha,{model:t})},"dimensions")]})})}),e(Fe,{})]})}const zl={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"MetricSelector_dimensions"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],storageKey:null}]},params:{cacheID:"4ccf476dd862525b059197daccd0d4d9",id:null,metadata:{},name:"EmbeddingPageModelQuery",operationKind:"query",text:`query EmbeddingPageModelQuery {
75
75
  model {
76
76
  ...MetricSelector_dimensions
77
77
  }
@@ -212,7 +212,7 @@ fragment MetricSelector_dimensions on Model {
212
212
  id
213
213
  }
214
214
  }
215
- `}}}();Ql.hash="f1ee7ce02317f1c3fe96b77af405095f";function Qs(){const{theme:n}=Bn();return u.useMemo(()=>n==="light"?wr:Rr,[n])}function Os(){const{embeddingDimensionId:n}=je();if(!n)throw new Error("Missing embeddingDimensionId in URL params");return n}const Ol={euclideanDistance:{name:"Euclidean Distance",shortName:"Euc. Distance",definition:"Euclidean distance over time captures how much your primary inferences's embeddings are drifting from the reference data. Euclidean distance of the embeddings is calculated by taking the centroid of the embedding vectors for each inferences and calculating the distance between the two centroids."},queryDistance:{name:"Query Distance",shortName:"Query Distance",definition:"The query distance is the euclidean distance of the centroid of queries from the centroid of the corpus."},accuracyScore:{name:"Accuracy Score",shortName:"Accuracy",definition:"Accuracy classification score. In multi-label classification, this function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in the ground truth."}};function an(n){const a=Ol[n];return a!=null?a.shortName:n}function ha(n){const a=Ol[n];return a&&a.definition!=null&&a.definition||null}function fn(n){return`${n.column}:${n.dir}`}function js(){const{referenceInferences:n}=Ie(),a=!!n,l=z(d=>d.clusterSort),t=z(d=>d.setClusterSort),[i,r]=u.useState(!1),o=u.useMemo(()=>{const d=[];return a&&d.push({label:"Most drift",value:fn({column:"driftRatio",dir:"desc"})}),[...d,{label:"Largest clusters",value:fn({column:"size",dir:"desc"})},{label:"Smallest clusters",value:fn({column:"size",dir:"asc"})},{label:"Highest metric value",value:fn({column:"primaryMetricValue",dir:"desc"})},{label:"Lowest metric value",value:fn({column:"primaryMetricValue",dir:"asc"})}]},[a]),c=fn(l);return e("div",{css:d=>C`
215
+ `}}}();Ql.hash="f1ee7ce02317f1c3fe96b77af405095f";function Os(){const{theme:n}=Hn();return u.useMemo(()=>n==="light"?Rr:Pr,[n])}function js(){const{embeddingDimensionId:n}=je();if(!n)throw new Error("Missing embeddingDimensionId in URL params");return n}const Ol={euclideanDistance:{name:"Euclidean Distance",shortName:"Euc. Distance",definition:"Euclidean distance over time captures how much your primary inferences's embeddings are drifting from the reference data. Euclidean distance of the embeddings is calculated by taking the centroid of the embedding vectors for each inferences and calculating the distance between the two centroids."},queryDistance:{name:"Query Distance",shortName:"Query Distance",definition:"The query distance is the euclidean distance of the centroid of queries from the centroid of the corpus."},accuracyScore:{name:"Accuracy Score",shortName:"Accuracy",definition:"Accuracy classification score. In multi-label classification, this function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in the ground truth."}};function an(n){const a=Ol[n];return a!=null?a.shortName:n}function ha(n){const a=Ol[n];return a&&a.definition!=null&&a.definition||null}function fn(n){return`${n.column}:${n.dir}`}function qs(){const{referenceInferences:n}=Ie(),a=!!n,l=z(d=>d.clusterSort),t=z(d=>d.setClusterSort),[i,r]=u.useState(!1),o=u.useMemo(()=>{const d=[];return a&&d.push({label:"Most drift",value:fn({column:"driftRatio",dir:"desc"})}),[...d,{label:"Largest clusters",value:fn({column:"size",dir:"desc"})},{label:"Smallest clusters",value:fn({column:"size",dir:"asc"})},{label:"Highest metric value",value:fn({column:"primaryMetricValue",dir:"desc"})},{label:"Lowest metric value",value:fn({column:"primaryMetricValue",dir:"asc"})}]},[a]),c=fn(l);return e("div",{css:d=>C`
216
216
  .ac-action-button {
217
217
  background: none;
218
218
  border: none;
@@ -225,7 +225,7 @@ fragment MetricSelector_dimensions on Model {
225
225
  color: var(--ac-global-text-color-900);
226
226
  }
227
227
  }
228
- `,children:s(gn,{placement:"bottom right","aria-label":"Sort clusters by",isOpen:i,onOpenChange:d=>r(d),children:[s(Ds,{children:["Sort",e("span",{"aria-hidden":!0,"data-testid":"dropdown-caret",css:C`
228
+ `,children:s(gn,{placement:"bottom right","aria-label":"Sort clusters by",isOpen:i,onOpenChange:d=>r(d),children:[s(Ts,{children:["Sort",e("span",{"aria-hidden":!0,"data-testid":"dropdown-caret",css:C`
229
229
  margin-left: var(--px-spacing-sm);
230
230
  border-bottom-color: #0000;
231
231
  border-left-color: #0000;
@@ -244,7 +244,7 @@ fragment MetricSelector_dimensions on Model {
244
244
  fileName
245
245
  }
246
246
  }
247
- `}}}();jl.hash="b5ff2517dbb0d19a1b24dea1796a3576";function qs(){const n=z(r=>r.clusters),{notifyError:a,notifySuccess:l}=pl(),[t,i]=I.useMutation(jl);return e(He,{align:"end",buttonSize:"compact",icon:i?e(w,{svg:e(E.LoadingOutline,{})}):null,onAction:r=>{switch(r){case"export_cluster":t({variables:{clusters:n.map(o=>({eventIds:o.eventIds,id:o.id}))},onCompleted:o=>{const{fileName:c}=o.exportClusters;l({title:"Clusters Exported",message:"dataframe is available via px.active_session().exports or can be downloaded by clicking below",action:{text:"Download",onClick:()=>{window.open(`/exports?filename=${c}`,"_self")}}})},onError:o=>{a({title:"Failed to export clusters",message:`Failed to export clusters: ${o.message}`})}});break}},children:s(G,{children:[e(w,{svg:e(E.Download,{})}),"Export clusters"]},"export_cluster")})}const ql={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"MetricSelector_dimensions",selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],type:"Model",abstractKey:null};ql.hash="55d03de16503d7af254c17cef7d18ee0";const bn=":";function Bs(n){return["drift","performance","dataQuality","retrieval"].includes(n)}function Nn(n){const{type:a,metric:l}=n;switch(a){case"drift":return`${a}${bn}${l}`;case"retrieval":return`${a}${bn}${l}`;case"performance":return`${a}${bn}${l}`;case"dataQuality":{const{name:t}=n.dimension;return`${a}${bn}${l}${bn}${t}`}default:ke()}}function Hs({metricKey:n,dimensions:a}){const[l,t,i]=n.split(bn);if(!Bs(l))throw new Error(`Invalid metric type: ${l}`);switch(l){case"drift":return{type:l,metric:t};case"retrieval":return{type:l,metric:t};case"performance":return{type:l,metric:t};case"dataQuality":{const r=a.find(o=>o.name===i);if(!r)throw new Error(`Invalid dimension name: ${i}`);return{type:l,metric:t,dimension:r}}default:ke()}}const Gs=s(wn,{variant:"info",children:[e(te,{level:4,children:"Analysis Metric"}),s(En,{children:[e("p",{children:"Select a metric to drive the analysis of your embeddings."}),e("p",{children:"To analyze the the drift between your two inferencess, select a drift metric and the UI will highlight areas of high drift."}),e("p",{children:"To analyze the quality of your embeddings, select a dimension data quality metric by which to analyze the point cloud. The UI will highlight areas where the data quality is degrading."})]})]});function Us({model:n}){const[,a]=u.useTransition(),l=I.useFragment(ql,n),{referenceInferences:t,corpusInferences:i}=Ie(),r=!!t,o=!!i,c=z(p=>p.metric),d=z(p=>p.loading),m=z(p=>p.setMetric),y=l.numericDimensions.edges.map(p=>p.node),g=y.length>0,f=u.useCallback(p=>{const b=Hs({metricKey:p,dimensions:y});a(()=>{m(b)})},[m,y,a]);return s(Ll,{label:"metric",labelExtra:Gs,selectedKey:c?Nn(c):void 0,onSelectionChange:f,placeholder:"Select a metric...",isDisabled:d,children:[r?e(ea,{title:"Drift",children:e(G,{children:"Euclidean Distance"},Nn({type:"drift",metric:"euclideanDistance"}))}):null,o?e(ea,{title:"Retrieval",children:e(G,{children:"Query Distance"},Nn({type:"retrieval",metric:"queryDistance"}))}):null,e(ea,{title:"Performance",children:e(G,{children:"Accuracy Score"},Nn({type:"performance",metric:"accuracyScore"}))}),g?e(ea,{title:"Data Quality",children:y.map(p=>e(G,{children:`${p.name} avg`},Nn({type:"dataQuality",metric:"average",dimension:p})))}):null]})}const Bl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"embeddingDimensionId"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQuality"},i={defaultValue:null,kind:"LocalArgument",name:"fetchDrift"},r={defaultValue:null,kind:"LocalArgument",name:"fetchPerformance"},o={defaultValue:null,kind:"LocalArgument",name:"fetchQueryDistance"},c={defaultValue:null,kind:"LocalArgument",name:"metricGranularity"},d={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},m={defaultValue:null,kind:"LocalArgument",name:"timeRange"},y=[{kind:"Variable",name:"id",variableName:"embeddingDimensionId"}],g={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},f={kind:"Variable",name:"granularity",variableName:"metricGranularity"},p={kind:"Variable",name:"timeRange",variableName:"timeRange"},b=[f,{kind:"Literal",name:"metric",value:"euclideanDistance"},p],S=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],h={kind:"InlineFragment",selections:[{condition:"fetchDrift",kind:"Condition",passingValue:!0,selections:[{alias:"euclideanDistanceTimeSeries",args:b,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:S,storageKey:null}]},{condition:"fetchQueryDistance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:b,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"retrievalMetricTimeSeries",plural:!1,selections:S,storageKey:null}]},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},p],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:S,storageKey:null}],type:"EmbeddingDimension",abstractKey:null},v=[{kind:"Variable",name:"id",variableName:"dimensionId"}],_={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:[f,{kind:"Literal",name:"metric",value:"mean"},p],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:S,storageKey:null}],type:"Dimension",abstractKey:null},L={alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{condition:"fetchPerformance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[f,{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"},p],concreteType:"PerformanceTimeSeries",kind:"LinkedField",name:"performanceTimeSeries",plural:!1,selections:S,storageKey:null}]}],storageKey:null},T={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,c,d,m],kind:"Fragment",metadata:null,name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:y,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,h],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:v,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[_],storageKey:null}]},L],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,m,c,n,i,o,t,a,r,d],kind:"Operation",name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:y,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[T,g,h],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:v,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[T,_,{kind:"TypeDiscriminator",abstractKey:"__isNode"},g],storageKey:null}]},L]},params:{cacheID:"a68a8204bf7fdd13e6915b338d4b5497",id:null,metadata:{},name:"MetricTimeSeriesQuery",operationKind:"query",text:`query MetricTimeSeriesQuery(
247
+ `}}}();jl.hash="b5ff2517dbb0d19a1b24dea1796a3576";function Hs(){const n=z(r=>r.clusters),{notifyError:a,notifySuccess:l}=pl(),[t,i]=I.useMutation(jl);return e(Be,{align:"end",buttonSize:"compact",icon:i?e(w,{svg:e(A.LoadingOutline,{})}):null,onAction:r=>{switch(r){case"export_cluster":t({variables:{clusters:n.map(o=>({eventIds:o.eventIds,id:o.id}))},onCompleted:o=>{const{fileName:c}=o.exportClusters;l({title:"Clusters Exported",message:"dataframe is available via px.active_session().exports or can be downloaded by clicking below",action:{text:"Download",onClick:()=>{window.open(`/exports?filename=${c}`,"_self")}}})},onError:o=>{a({title:"Failed to export clusters",message:`Failed to export clusters: ${o.message}`})}});break}},children:s(G,{children:[e(w,{svg:e(A.Download,{})}),"Export clusters"]},"export_cluster")})}const ql={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"MetricSelector_dimensions",selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],type:"Model",abstractKey:null};ql.hash="55d03de16503d7af254c17cef7d18ee0";const bn=":";function Bs(n){return["drift","performance","dataQuality","retrieval"].includes(n)}function Nn(n){const{type:a,metric:l}=n;switch(a){case"drift":return`${a}${bn}${l}`;case"retrieval":return`${a}${bn}${l}`;case"performance":return`${a}${bn}${l}`;case"dataQuality":{const{name:t}=n.dimension;return`${a}${bn}${l}${bn}${t}`}default:ke()}}function Gs({metricKey:n,dimensions:a}){const[l,t,i]=n.split(bn);if(!Bs(l))throw new Error(`Invalid metric type: ${l}`);switch(l){case"drift":return{type:l,metric:t};case"retrieval":return{type:l,metric:t};case"performance":return{type:l,metric:t};case"dataQuality":{const r=a.find(o=>o.name===i);if(!r)throw new Error(`Invalid dimension name: ${i}`);return{type:l,metric:t,dimension:r}}default:ke()}}const Us=s(wn,{variant:"info",children:[e(te,{level:4,children:"Analysis Metric"}),s(An,{children:[e("p",{children:"Select a metric to drive the analysis of your embeddings."}),e("p",{children:"To analyze the the drift between your two inferencess, select a drift metric and the UI will highlight areas of high drift."}),e("p",{children:"To analyze the quality of your embeddings, select a dimension data quality metric by which to analyze the point cloud. The UI will highlight areas where the data quality is degrading."})]})]});function Ws({model:n}){const[,a]=u.useTransition(),l=I.useFragment(ql,n),{referenceInferences:t,corpusInferences:i}=Ie(),r=!!t,o=!!i,c=z(p=>p.metric),d=z(p=>p.loading),m=z(p=>p.setMetric),y=l.numericDimensions.edges.map(p=>p.node),g=y.length>0,f=u.useCallback(p=>{const b=Gs({metricKey:p,dimensions:y});a(()=>{m(b)})},[m,y,a]);return s(Ll,{label:"metric",labelExtra:Us,selectedKey:c?Nn(c):void 0,onSelectionChange:f,placeholder:"Select a metric...",isDisabled:d,children:[r?e(ea,{title:"Drift",children:e(G,{children:"Euclidean Distance"},Nn({type:"drift",metric:"euclideanDistance"}))}):null,o?e(ea,{title:"Retrieval",children:e(G,{children:"Query Distance"},Nn({type:"retrieval",metric:"queryDistance"}))}):null,e(ea,{title:"Performance",children:e(G,{children:"Accuracy Score"},Nn({type:"performance",metric:"accuracyScore"}))}),g?e(ea,{title:"Data Quality",children:y.map(p=>e(G,{children:`${p.name} avg`},Nn({type:"dataQuality",metric:"average",dimension:p})))}):null]})}const Hl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"embeddingDimensionId"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQuality"},i={defaultValue:null,kind:"LocalArgument",name:"fetchDrift"},r={defaultValue:null,kind:"LocalArgument",name:"fetchPerformance"},o={defaultValue:null,kind:"LocalArgument",name:"fetchQueryDistance"},c={defaultValue:null,kind:"LocalArgument",name:"metricGranularity"},d={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},m={defaultValue:null,kind:"LocalArgument",name:"timeRange"},y=[{kind:"Variable",name:"id",variableName:"embeddingDimensionId"}],g={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},f={kind:"Variable",name:"granularity",variableName:"metricGranularity"},p={kind:"Variable",name:"timeRange",variableName:"timeRange"},b=[f,{kind:"Literal",name:"metric",value:"euclideanDistance"},p],S=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],h={kind:"InlineFragment",selections:[{condition:"fetchDrift",kind:"Condition",passingValue:!0,selections:[{alias:"euclideanDistanceTimeSeries",args:b,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:S,storageKey:null}]},{condition:"fetchQueryDistance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:b,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"retrievalMetricTimeSeries",plural:!1,selections:S,storageKey:null}]},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},p],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:S,storageKey:null}],type:"EmbeddingDimension",abstractKey:null},v=[{kind:"Variable",name:"id",variableName:"dimensionId"}],_={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:[f,{kind:"Literal",name:"metric",value:"mean"},p],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:S,storageKey:null}],type:"Dimension",abstractKey:null},L={alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{condition:"fetchPerformance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[f,{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"},p],concreteType:"PerformanceTimeSeries",kind:"LinkedField",name:"performanceTimeSeries",plural:!1,selections:S,storageKey:null}]}],storageKey:null},T={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,c,d,m],kind:"Fragment",metadata:null,name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:y,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,h],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:v,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[_],storageKey:null}]},L],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,m,c,n,i,o,t,a,r,d],kind:"Operation",name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:y,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[T,g,h],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:v,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[T,_,{kind:"TypeDiscriminator",abstractKey:"__isNode"},g],storageKey:null}]},L]},params:{cacheID:"a68a8204bf7fdd13e6915b338d4b5497",id:null,metadata:{},name:"MetricTimeSeriesQuery",operationKind:"query",text:`query MetricTimeSeriesQuery(
248
248
  $embeddingDimensionId: GlobalID!
249
249
  $timeRange: TimeRange!
250
250
  $metricGranularity: Granularity!
@@ -303,7 +303,7 @@ fragment MetricSelector_dimensions on Model {
303
303
  }
304
304
  }
305
305
  }
306
- `}}}();Bl.hash="f31abad2141a5a1c461ef2a598ffa4f3";const Ua=new Intl.NumberFormat([],{maximumFractionDigits:2}),Hl=()=>{const n=Ne(),a=n.blue400,l=n.gray500;return{color:a,barColor:l}};function Ws({active:n,payload:a,label:l}){var r,o,c;const{color:t,barColor:i}=Hl();if(n&&a&&a.length){const d=((r=a[1])==null?void 0:r.value)??null,m=((o=a[0])==null?void 0:o.value)??null,y=typeof d=="number"?Ua.format(d):"--",g=typeof m=="number"?Ua.format(m):"--";return s(Be,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:((c=a[1])==null?void 0:c.payload.metricName)??"Metric",value:y}),e(re,{color:i,shape:"square",name:"Count",value:g}),e(ra,{}),s("div",{css:C`
306
+ `}}}();Hl.hash="f31abad2141a5a1c461ef2a598ffa4f3";const Ua=new Intl.NumberFormat([],{maximumFractionDigits:2}),Bl=()=>{const n=Ne(),a=n.blue400,l=n.gray500;return{color:a,barColor:l}};function Js({active:n,payload:a,label:l}){var r,o,c;const{color:t,barColor:i}=Bl();if(n&&a&&a.length){const d=((r=a[1])==null?void 0:r.value)??null,m=((o=a[0])==null?void 0:o.value)??null,y=typeof d=="number"?Ua.format(d):"--",g=typeof m=="number"?Ua.format(m):"--";return s(He,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:((c=a[1])==null?void 0:c.payload.metricName)??"Metric",value:y}),e(re,{color:i,shape:"square",name:"Count",value:g}),e(ra,{}),s("div",{css:C`
307
307
  display: flex;
308
308
  flex-direction: row;
309
309
  align-items: center;
@@ -311,7 +311,7 @@ fragment MetricSelector_dimensions on Model {
311
311
  gap: var(--px-spacing-sm);
312
312
 
313
313
  margin-top: var(--px-spacing-sm);
314
- `,children:[e(w,{svg:e(_l,{})}),e("span",{children:"Click to view the point cloud at this time"})]})]})}return null}function Js(n){switch(n.type){case"drift":return"Embedding Drift";case"performance":return"Model Performance";case"dataQuality":return"Data Quality";case"retrieval":return"Query Distance";default:ke()}}function Zs(n){if(n)switch(n.type){case"drift":return an(n.metric);case"performance":return an(n.metric);case"dataQuality":return`${n.dimension.name} avg`;case"retrieval":return an(n.metric);default:ke()}else return"Count"}function Xs(n){switch(n.type){case"drift":return ha(n.metric);case"performance":return ha(n.metric);case"dataQuality":return null;case"retrieval":return ha(n.metric);default:ke()}}function Ys({embeddingDimensionId:n}){const a=z(F=>F.metric),l=a.type==="drift",t=a.type==="retrieval",i=a.type==="dataQuality",r=a.type==="performance",{timeRange:o}=Me(),{selectedTimestamp:c,setSelectedTimestamp:d}=ia(),m=xn(o),y=I.useLazyLoadQuery(Bl,{embeddingDimensionId:n,timeRange:{start:o.start.toISOString(),end:o.end.toISOString()},metricGranularity:yl(o),countGranularity:m,fetchDrift:l,fetchQueryDistance:t,fetchDataQuality:i,fetchPerformance:r,dimensionId:a.type==="dataQuality"?a.dimension.id:n,performanceMetric:a.type==="performance"?a.metric:"accuracyScore"}),g=Dn({samplingIntervalMinutes:m.samplingIntervalMinutes}),f=u.useCallback(F=>{const{activePayload:D}=F;if(D!=null&&D.length>0){const M=D[0].payload;d(new Date(M.timestamp))}},[d]),p=eo({data:y,metric:a}),S=no(y).reduce((F,D)=>(F[D.timestamp]=D.value,F),{})??{},h=p.map(F=>{const D=S[F.timestamp];return{...F,traffic:D,timestamp:new Date(F.timestamp).getTime()}}),v=Zs(a),_=Xs(a),{color:L,barColor:T}=Hl();return s("section",{css:C`
314
+ `,children:[e(w,{svg:e(_l,{})}),e("span",{children:"Click to view the point cloud at this time"})]})]})}return null}function Zs(n){switch(n.type){case"drift":return"Embedding Drift";case"performance":return"Model Performance";case"dataQuality":return"Data Quality";case"retrieval":return"Query Distance";default:ke()}}function Xs(n){if(n)switch(n.type){case"drift":return an(n.metric);case"performance":return an(n.metric);case"dataQuality":return`${n.dimension.name} avg`;case"retrieval":return an(n.metric);default:ke()}else return"Count"}function Ys(n){switch(n.type){case"drift":return ha(n.metric);case"performance":return ha(n.metric);case"dataQuality":return null;case"retrieval":return ha(n.metric);default:ke()}}function eo({embeddingDimensionId:n}){const a=z(F=>F.metric),l=a.type==="drift",t=a.type==="retrieval",i=a.type==="dataQuality",r=a.type==="performance",{timeRange:o}=Me(),{selectedTimestamp:c,setSelectedTimestamp:d}=ia(),m=xn(o),y=I.useLazyLoadQuery(Hl,{embeddingDimensionId:n,timeRange:{start:o.start.toISOString(),end:o.end.toISOString()},metricGranularity:yl(o),countGranularity:m,fetchDrift:l,fetchQueryDistance:t,fetchDataQuality:i,fetchPerformance:r,dimensionId:a.type==="dataQuality"?a.dimension.id:n,performanceMetric:a.type==="performance"?a.metric:"accuracyScore"}),g=Dn({samplingIntervalMinutes:m.samplingIntervalMinutes}),f=u.useCallback(F=>{const{activePayload:D}=F;if(D!=null&&D.length>0){const M=D[0].payload;d(new Date(M.timestamp))}},[d]),p=no({data:y,metric:a}),S=ao(y).reduce((F,D)=>(F[D.timestamp]=D.value,F),{})??{},h=p.map(F=>{const D=S[F.timestamp];return{...F,traffic:D,timestamp:new Date(F.timestamp).getTime()}}),v=Xs(a),_=Ys(a),{color:L,barColor:T}=Bl();return s("section",{css:C`
315
315
  width: 100%;
316
316
  height: 100%;
317
317
  display: flex;
@@ -331,7 +331,7 @@ fragment MetricSelector_dimensions on Model {
331
331
  width: 100%;
332
332
  overflow: hidden;
333
333
  }
334
- `,children:[s(te,{level:3,children:[Js(a),_!=null?s(wn,{children:[e(te,{level:4,children:v}),e(En,{children:_})]}):null]}),e("div",{children:e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:h,margin:{top:25,right:18,left:18,bottom:10},onClick:f,children:[s("defs",{children:[s("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:L,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:L,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:T,stopOpacity:.3}),e("stop",{offset:"95%",stopColor:T,stopOpacity:0})]})]}),e(Ue,{...Tn,tickFormatter:F=>g(new Date(F)),style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{stroke:ie.colors.gray200,label:{value:v,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{yAxisId:"right",orientation:"right",label:{value:"Count",angle:90,position:"insideRight",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Ws,{})}),e(Fn,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(On,{type:"monotone",dataKey:"value",stroke:L,fillOpacity:1,fill:"url(#colorUv)"}),c!=null?e(Pl,{...fl,x:c.getTime()}):null]})})})]})}function eo({data:n,metric:a}){var l,t,i,r,o,c;if(((l=n.embedding.euclideanDistanceTimeSeries)==null?void 0:l.data)!=null&&n.embedding.euclideanDistanceTimeSeries.data.length>0)return n.embedding.euclideanDistanceTimeSeries.data.map(d=>({metricName:an(a.metric),...d}));if(((t=n.embedding.retrievalMetricTimeSeries)==null?void 0:t.data)!=null&&n.embedding.retrievalMetricTimeSeries.data.length>0)return n.embedding.retrievalMetricTimeSeries.data.map(d=>({metricName:an(a.metric),...d}));if(n.dimension&&((r=(i=n.dimension)==null?void 0:i.dataQualityTimeSeries)==null?void 0:r.data)!=null&&n.dimension.dataQualityTimeSeries.data.length>0){const d=n.dimension.name||"unknown";return n.dimension.dataQualityTimeSeries.data.map(m=>({metricName:`${d} avg`,...m}))}else{if(n.model&&((o=n.model.performanceTimeSeries)==null?void 0:o.data)!=null&&n.model.performanceTimeSeries.data.length>0)return n.model.performanceTimeSeries.data.map(d=>({metricName:an(a.metric),...d}));if(((c=n.embedding.trafficTimeSeries)==null?void 0:c.data)!=null)return n.embedding.trafficTimeSeries.data.map(d=>({metricName:"Count",...d}))}return[]}function no(n){var a;return((a=n.embedding.trafficTimeSeries)==null?void 0:a.data)!=null?[...n.embedding.trafficTimeSeries.data]:[]}const Gl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"corpusEventIds"},a={defaultValue:null,kind:"LocalArgument",name:"primaryEventIds"},l={defaultValue:null,kind:"LocalArgument",name:"referenceEventIds"},t=[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,concreteType:"DimensionWithValue",kind:"LinkedField",name:"dimensions",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"dimension",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EventMetadata",kind:"LinkedField",name:"eventMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"predictionId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualScore",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PromptResponse",kind:"LinkedField",name:"promptAndResponse",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"prompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"response",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentText",storageKey:null}],i=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"primaryInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"primaryEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"referenceInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"referenceEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"corpusInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"corpusEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"PointSelectionPanelContentQuery",selections:i,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"PointSelectionPanelContentQuery",selections:i},params:{cacheID:"8b48064eba35d0d6c8dc834c2f7795c0",id:null,metadata:{},name:"PointSelectionPanelContentQuery",operationKind:"query",text:`query PointSelectionPanelContentQuery(
334
+ `,children:[s(te,{level:3,children:[Zs(a),_!=null?s(wn,{children:[e(te,{level:4,children:v}),e(An,{children:_})]}):null]}),e("div",{children:e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:h,margin:{top:25,right:18,left:18,bottom:10},onClick:f,children:[s("defs",{children:[s("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:L,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:L,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:T,stopOpacity:.3}),e("stop",{offset:"95%",stopColor:T,stopOpacity:0})]})]}),e(Ue,{...Tn,tickFormatter:F=>g(new Date(F)),style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{stroke:ie.colors.gray200,label:{value:v,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{yAxisId:"right",orientation:"right",label:{value:"Count",angle:90,position:"insideRight",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Js,{})}),e(Fn,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(On,{type:"monotone",dataKey:"value",stroke:L,fillOpacity:1,fill:"url(#colorUv)"}),c!=null?e(Pl,{...fl,x:c.getTime()}):null]})})})]})}function no({data:n,metric:a}){var l,t,i,r,o,c;if(((l=n.embedding.euclideanDistanceTimeSeries)==null?void 0:l.data)!=null&&n.embedding.euclideanDistanceTimeSeries.data.length>0)return n.embedding.euclideanDistanceTimeSeries.data.map(d=>({metricName:an(a.metric),...d}));if(((t=n.embedding.retrievalMetricTimeSeries)==null?void 0:t.data)!=null&&n.embedding.retrievalMetricTimeSeries.data.length>0)return n.embedding.retrievalMetricTimeSeries.data.map(d=>({metricName:an(a.metric),...d}));if(n.dimension&&((r=(i=n.dimension)==null?void 0:i.dataQualityTimeSeries)==null?void 0:r.data)!=null&&n.dimension.dataQualityTimeSeries.data.length>0){const d=n.dimension.name||"unknown";return n.dimension.dataQualityTimeSeries.data.map(m=>({metricName:`${d} avg`,...m}))}else{if(n.model&&((o=n.model.performanceTimeSeries)==null?void 0:o.data)!=null&&n.model.performanceTimeSeries.data.length>0)return n.model.performanceTimeSeries.data.map(d=>({metricName:an(a.metric),...d}));if(((c=n.embedding.trafficTimeSeries)==null?void 0:c.data)!=null)return n.embedding.trafficTimeSeries.data.map(d=>({metricName:"Count",...d}))}return[]}function ao(n){var a;return((a=n.embedding.trafficTimeSeries)==null?void 0:a.data)!=null?[...n.embedding.trafficTimeSeries.data]:[]}const Gl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"corpusEventIds"},a={defaultValue:null,kind:"LocalArgument",name:"primaryEventIds"},l={defaultValue:null,kind:"LocalArgument",name:"referenceEventIds"},t=[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,concreteType:"DimensionWithValue",kind:"LinkedField",name:"dimensions",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"dimension",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EventMetadata",kind:"LinkedField",name:"eventMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"predictionId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualScore",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PromptResponse",kind:"LinkedField",name:"promptAndResponse",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"prompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"response",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentText",storageKey:null}],i=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"primaryInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"primaryEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"referenceInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"referenceEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"corpusInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"corpusEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"PointSelectionPanelContentQuery",selections:i,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"PointSelectionPanelContentQuery",selections:i},params:{cacheID:"8b48064eba35d0d6c8dc834c2f7795c0",id:null,metadata:{},name:"PointSelectionPanelContentQuery",operationKind:"query",text:`query PointSelectionPanelContentQuery(
335
335
  $primaryEventIds: [ID!]!
336
336
  $referenceEventIds: [ID!]!
337
337
  $corpusEventIds: [ID!]!
@@ -437,32 +437,32 @@ fragment MetricSelector_dimensions on Model {
437
437
  color: var(--ac-global-text-color-900);
438
438
  white-space: normal;
439
439
  margin: 0;
440
- `,children:n.children})})}function ao({event:n}){const a=n.retrievedDocuments&&n.retrievedDocuments.length>0,l=!n.id.includes("CORPUS");return s("section",{css:C`
440
+ `,children:n.children})})}function lo({event:n}){const a=n.retrievedDocuments&&n.retrievedDocuments.length>0,l=!n.id.includes("CORPUS");return s("section",{css:C`
441
441
  height: 100%;
442
442
  overflow-y: auto;
443
- `,children:[e(ro,{event:n}),s(nn,{children:[l?e(ue,{id:"prediction",title:"Prediction Details",children:s("dl",{css:Wa,children:[n.predictionId!=null&&s("div",{children:[e("dt",{children:"Prediction ID"}),e("dd",{css:C`
443
+ `,children:[e(so,{event:n}),s(nn,{children:[l?e(ue,{id:"prediction",title:"Prediction Details",children:s("dl",{css:Wa,children:[n.predictionId!=null&&s("div",{children:[e("dt",{children:"Prediction ID"}),e("dd",{css:C`
444
444
  display: flex;
445
445
  align-items: center;
446
446
  `,children:n.predictionId})]}),n.predictionLabel!=null&&s("div",{children:[e("dt",{children:"Prediction Label"}),e("dd",{children:n.predictionLabel})]}),n.predictionScore!=null&&s("div",{children:[e("dt",{children:"Prediction Score"}),e("dd",{children:n.predictionScore})]}),n.actualLabel!=null&&s("div",{children:[e("dt",{children:"Actual Label"}),e("dd",{children:n.actualLabel})]}),n.actualScore!=null&&s("div",{children:[e("dt",{children:"Actual Score"}),e("dd",{children:n.actualScore})]})]})}):e(ue,{id:"document",title:"Document Details",children:e("dl",{css:Wa,children:n.predictionId!=null&&s("div",{children:[e("dt",{children:"Document ID"}),e("dd",{css:C`
447
447
  display: flex;
448
448
  align-items: center;
449
- `,children:n.predictionId})]})})}),e(ue,{id:"dimensions",title:"Dimensions",children:e(to,{dimensions:n.dimensions})}),a&&e(ue,{id:"retrievals",title:"Retrieved Documents",titleExtra:e($e,{variant:"light",children:n.retrievedDocuments.length}),children:e("ul",{css:C`
449
+ `,children:n.predictionId})]})})}),e(ue,{id:"dimensions",title:"Dimensions",children:e(io,{dimensions:n.dimensions})}),a&&e(ue,{id:"retrievals",title:"Retrieved Documents",titleExtra:e($e,{variant:"light",children:n.retrievedDocuments.length}),children:e("ul",{css:C`
450
450
  padding: var(--px-spacing-med);
451
451
  li + li {
452
452
  margin-top: var(--px-spacing-med);
453
453
  }
454
- `,children:n.retrievedDocuments.map(t=>e("li",{children:e(lo,{document:t})},t.id))})})]})]})}function lo({document:n}){return e(x,{borderRadius:"medium",backgroundColor:"light",children:s(k,{direction:"column",children:[e(x,{width:"100%",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(k,{direction:"row",justifyContent:"space-between",margin:"size-100",alignItems:"center",children:[s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(w,{svg:e(E.FileOutline,{})}),s(te,{level:4,children:["document ",n.id]})]}),typeof n.relevance=="number"&&e(zn,{color:"blue",children:`relevance ${Aa(n.relevance)}`})]})}),e("pre",{css:C`
454
+ `,children:n.retrievedDocuments.map(t=>e("li",{children:e(to,{document:t})},t.id))})})]})]})}function to({document:n}){return e(x,{borderRadius:"medium",backgroundColor:"light",children:s(k,{direction:"column",children:[e(x,{width:"100%",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(k,{direction:"row",justifyContent:"space-between",margin:"size-100",alignItems:"center",children:[s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(w,{svg:e(A.FileOutline,{})}),s(te,{level:4,children:["document ",n.id]})]}),typeof n.relevance=="number"&&e(zn,{color:"blue",children:`relevance ${Ea(n.relevance)}`})]})}),e("pre",{css:C`
455
455
  padding: var(--px-spacing-lg);
456
456
  white-space: normal;
457
457
  margin: 0;
458
- `,children:n.text})]})})}function to({dimensions:n}){const a=u.useMemo(()=>n.map(i=>({name:i.dimension.name,type:i.dimension.type,value:i.value??"--"})),[n]),l=u.useMemo(()=>[{header:()=>"Name",accessorKey:"name"},{header:()=>"Type",accessorKey:"type"},{header:()=>"Value",accessorKey:"value"}],[]),t=me({columns:l,data:a,getCoreRowModel:ge()});return s("table",{css:cn,children:[e("thead",{children:t.getHeaderGroups().map(i=>e("tr",{children:i.headers.map(r=>e("th",{colSpan:r.colSpan,children:r.isPlaceholder?null:e("div",{children:U(r.column.columnDef.header,r.getContext())})},r.id))},i.id))}),t.getCoreRowModel().rows.length?e("tbody",{children:t.getRowModel().rows.map(i=>e("tr",{children:i.getVisibleCells().map(r=>e("td",{children:U(r.column.columnDef.cell,r.getContext())},r.id))},i.id))}):e(so,{})]})}function io({dataUrl:n}){const a=Pr(n),l=Mr(n);return a?e("video",{src:n,controls:!0,css:C`
458
+ `,children:n.text})]})})}function io({dimensions:n}){const a=u.useMemo(()=>n.map(i=>({name:i.dimension.name,type:i.dimension.type,value:i.value??"--"})),[n]),l=u.useMemo(()=>[{header:()=>"Name",accessorKey:"name"},{header:()=>"Type",accessorKey:"type"},{header:()=>"Value",accessorKey:"value"}],[]),t=me({columns:l,data:a,getCoreRowModel:ge()});return s("table",{css:cn,children:[e("thead",{children:t.getHeaderGroups().map(i=>e("tr",{children:i.headers.map(r=>e("th",{colSpan:r.colSpan,children:r.isPlaceholder?null:e("div",{children:U(r.column.columnDef.header,r.getContext())})},r.id))},i.id))}),t.getCoreRowModel().rows.length?e("tbody",{children:t.getRowModel().rows.map(i=>e("tr",{children:i.getVisibleCells().map(r=>e("td",{children:U(r.column.columnDef.cell,r.getContext())},r.id))},i.id))}):e(oo,{})]})}function ro({dataUrl:n}){const a=Mr(n),l=Nr(n);return a?e("video",{src:n,controls:!0,css:C`
459
459
  width: 100%;
460
460
  height: 500px;
461
461
  background-color: black;
462
462
  `}):l?e("audio",{src:n,controls:!0,autoPlay:!0}):e("img",{src:n,alt:"event image",width:"100%",height:"200px",css:C`
463
463
  object-fit: contain;
464
464
  background-color: black;
465
- `})}function ro({event:n}){const a=n.linkToData||void 0,l=n.rawData,t=n.prompt||n.response?{prompt:n.prompt,response:n.response}:null,i=n.documentText;let r=null;return a?r=s(k,{direction:"column",children:[e(io,{dataUrl:a}),l&&e(nn,{children:e(ue,{id:"raw",title:"Raw Data",children:e(Vn,{children:l})})})]}):i?r=e(nn,{children:e(ue,{id:"document",title:"Document",children:e(Vn,{children:i})})}):t?r=s(nn,{children:[e(ue,{id:"prompt",title:"Prompt",children:e(Vn,{children:t.prompt})}),e(ue,{id:"response",title:"Response",children:e(Vn,{children:t.response})})]}):n.rawData&&n.rawData&&n.rawData,r}function so(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
465
+ `})}function so({event:n}){const a=n.linkToData||void 0,l=n.rawData,t=n.prompt||n.response?{prompt:n.prompt,response:n.response}:null,i=n.documentText;let r=null;return a?r=s(k,{direction:"column",children:[e(ro,{dataUrl:a}),l&&e(nn,{children:e(ue,{id:"raw",title:"Raw Data",children:e(Vn,{children:l})})})]}):i?r=e(nn,{children:e(ue,{id:"document",title:"Document",children:e(Vn,{children:i})})}):t?r=s(nn,{children:[e(ue,{id:"prompt",title:"Prompt",children:e(Vn,{children:t.prompt})}),e(ue,{id:"response",title:"Response",children:e(Vn,{children:t.response})})]}):n.rawData&&n.rawData&&n.rawData,r}function oo(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
466
466
  text-align: center;
467
467
  padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
468
468
  `,children:e(hl,{graphicKey:"documents",message:"This embedding has no associated dimensions"})})})})}const Ul=function(){var n=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"ExportedFile",kind:"LinkedField",name:"exportedFiles",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fileName",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExportSelectionButtonExportsQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"ExportSelectionButtonExportsQuery",selections:n},params:{cacheID:"2f7e3554305121746dc799b6a8d120da",id:null,metadata:{},name:"ExportSelectionButtonExportsQuery",operationKind:"query",text:`query ExportSelectionButtonExportsQuery {
@@ -479,15 +479,15 @@ fragment MetricSelector_dimensions on Model {
479
479
  fileName
480
480
  }
481
481
  }
482
- `}}}();Wl.hash="8b0d6962e2034d4c148d1b9919111d2f";const oo=`import phoenix as px
482
+ `}}}();Wl.hash="8b0d6962e2034d4c148d1b9919111d2f";const co=`import phoenix as px
483
483
 
484
484
  exports = px.active_session().exports
485
485
  dataframe = exports[-1]
486
- dataframe`,co=C`
486
+ dataframe`,uo=C`
487
487
  .cm-content {
488
488
  padding: var(--ac-global-dimension-static-size-100);
489
489
  }
490
- `;function uo({value:n}){const{theme:a}=Bn(),l=a==="light"?void 0:ga;return e(ma,{value:n,basicSetup:!1,extensions:[Oa()],editable:!1,theme:l,css:co})}function mo(){const n=z(o=>o.selectedEventIds),[a,l]=I.useMutation(Wl),[t,i]=u.useState(null),r=u.useCallback(()=>{a({variables:{eventIds:[...n]},onCompleted:o=>{i(o.exportEvents)}})},[a,n]);return s(W,{children:[e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(Al,{})}),"aria-label":"Export selection / cluster",loading:l,onClick:r,children:l?"Exporting":"Export"}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t!=null&&s(j,{title:"Cluster Exports",size:"M",children:[e(Y,{variant:"success",banner:!0,title:"Export succeeded",extra:e(V,{variant:"success",size:"compact",onClick:()=>{window.open(`/exports?filename=${t.fileName}`,"_self")},children:"Download"})}),s("div",{css:C`
490
+ `;function mo({value:n}){const{theme:a}=Hn(),l=a==="light"?void 0:ga;return e(ma,{value:n,basicSetup:!1,extensions:[Oa()],editable:!1,theme:l,css:uo})}function go(){const n=z(o=>o.selectedEventIds),[a,l]=I.useMutation(Wl),[t,i]=u.useState(null),r=u.useCallback(()=>{a({variables:{eventIds:[...n]},onCompleted:o=>{i(o.exportEvents)}})},[a,n]);return s(W,{children:[e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(El,{})}),"aria-label":"Export selection / cluster",loading:l,onClick:r,children:l?"Exporting":"Export"}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t!=null&&s(j,{title:"Cluster Exports",size:"M",children:[e(Y,{variant:"success",banner:!0,title:"Export succeeded",extra:e(V,{variant:"success",size:"compact",onClick:()=>{window.open(`/exports?filename=${t.fileName}`,"_self")},children:"Download"})}),s("div",{css:C`
491
491
  display: flex;
492
492
  flex-direction: column;
493
493
  justify-content: space-between;
@@ -497,12 +497,12 @@ dataframe`,co=C`
497
497
  `,children:[e("p",{css:C`
498
498
  margin: 0;
499
499
  flex: 1 1 auto;
500
- `,children:"You can retrieve your export in your notebook via"}),e(x,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(uo,{value:oo})})]}),e(nn,{children:e(ue,{id:"all-exports",title:"Latest Exports",children:e(u.Suspense,{fallback:e(se,{}),children:e(go,{})})})})]})})]})}function go(){const n=I.useLazyLoadQuery(Ul,{},{fetchPolicy:"network-only"});return e(wl,{children:n.model.exportedFiles.map((a,l)=>e(El,{children:s("div",{css:C`
500
+ `,children:"You can retrieve your export in your notebook via"}),e(x,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(mo,{value:co})})]}),e(nn,{children:e(ue,{id:"all-exports",title:"Latest Exports",children:e(u.Suspense,{fallback:e(se,{}),children:e(po,{})})})})]})})]})}function po(){const n=I.useLazyLoadQuery(Ul,{},{fetchPolicy:"network-only"});return e(wl,{children:n.model.exportedFiles.map((a,l)=>e(Al,{children:s("div",{css:C`
501
501
  display: flex;
502
502
  flex-direction: row;
503
503
  justify-content: space-between;
504
504
  align-items: center;
505
- `,children:[a.fileName,e(V,{size:"compact","aria-label":"Download",variant:"default",icon:e(w,{svg:e(Al,{})}),onClick:()=>{window.open(`/exports?filename=${a.fileName}`,"_self")}})]})},l))})}function po(n){const{getInferencesNameByRole:a}=Ie(),{events:l,onItemSelected:t}=n,i=z(m=>m.eventIdToDataMap),r=z(m=>m.eventIdToGroup),o=z(m=>m.pointGroupColors),c=z(m=>m.selectionGridSize),d=z(m=>m.setHoveredEventId);return e("div",{css:C`
505
+ `,children:[a.fileName,e(V,{size:"compact","aria-label":"Download",variant:"default",icon:e(w,{svg:e(El,{})}),onClick:()=>{window.open(`/exports?filename=${a.fileName}`,"_self")}})]})},l))})}function yo(n){const{getInferencesNameByRole:a}=Ie(),{events:l,onItemSelected:t}=n,i=z(m=>m.eventIdToDataMap),r=z(m=>m.eventIdToGroup),o=z(m=>m.pointGroupColors),c=z(m=>m.selectionGridSize),d=z(m=>m.setHoveredEventId);return e("div",{css:C`
506
506
  flex: 1 1 auto;
507
507
  overflow-y: auto;
508
508
  `,"data-testid":"grid-view-scroll-container",children:e("ul",{"data-grid-size":c,css:C`
@@ -531,7 +531,7 @@ dataframe`,co=C`
531
531
  min-width: var(--grid-item-min-width);
532
532
  height: var(--grid-item-height);
533
533
  }
534
- `,children:l.map((m,y)=>{const g=i.get(m.id),{rawData:f=null,linkToData:p=null}=(g==null?void 0:g.embeddingMetadata)??{},{predictionLabel:b=null,actualLabel:S=null}=(g==null?void 0:g.eventMetadata)??{},h=Nr(m.id),v=a(h),_=r[m.id],L=o[_];return e("li",{children:e(Vr,{rawData:f,linkToData:p,inferencesName:v,group:_,onClick:()=>{t(m.id)},onMouseOver:()=>{d(m.id)},onMouseOut:()=>{d(null)},color:L,size:c,predictionLabel:b,actualLabel:S,promptAndResponse:m.promptAndResponse,documentText:m.documentText,autoPlay:!1})},y)})})})}function yo({data:n,onPointSelected:a}){const{primaryInferences:l,referenceInferences:t}=Ie(),i=z(y=>y.metric),[r,o]=u.useState([]),{columns:c,tableData:d}=u.useMemo(()=>{const y=n.filter(L=>L.id.includes("CORPUS")===!1);let g=!1,f=!1,p=!1,b=!1,S=!1;n.forEach(L=>{L.linkToData&&(g=!0),L.rawData&&(f=!0),(L.prompt||L.response)&&(p=!0),L.predictionLabel&&(b=!0),L.actualLabel&&(S=!0)});const h=[];t&&h.push({header:"Inference Set",accessorKey:"id",size:50,cell:({getValue:L})=>e(fo,{id:L(),primaryInferencesName:l.name,referenceInferencesName:(t==null?void 0:t.name)??"reference"})}),g&&h.push({header:"Link",accessorKey:"linkToData",cell:({getValue:L})=>{const T=L();if(typeof T=="string"){const F=T.split("/").pop();return e(rn,{href:T,children:F})}return null}}),p?(h.push({header:"Prompt",accessorKey:"prompt",cell:be,size:200}),h.push({header:"Response",accessorKey:"response",cell:be,size:200})):f&&h.push({header:"Raw Data",accessorKey:"rawData"}),b&&h.push({header:"Prediction Label",accessorKey:"predictionLabel",size:50}),S&&h.push({header:"Actual Label",accessorKey:"actualLabel",size:50});const v=[];if(i&&i.type==="dataQuality"){const L=i.dimension.name;v.push({header:i.dimension.name,accessorKey:"metric",cell:$r,sortingFn:"basic"}),y.forEach(T=>{var D;const F=(D=T.dimensions.find(M=>M.dimension.name===L))==null?void 0:D.value;T.metric=F!=null?Number(F):null})}return{columns:[...h,...v,{header:"",id:"view-details",size:50,cell:({row:L})=>e(zr,{"aria-label":"view point details",onClick:()=>{a(L.original.id)},children:"view details"})}],tableData:y}},[n,a,l,t,i]),m=me({columns:c,data:d,state:{sorting:r},getCoreRowModel:ge(),onSortingChange:o,getSortedRowModel:Kn()});return s("table",{css:cn,children:[e("thead",{children:m.getHeaderGroups().map(y=>e("tr",{children:y.headers.map(g=>s("th",{children:[g.isPlaceholder?null:s("div",{className:g.column.getCanSort()?"cursor-pointer":"",onClick:g.column.getToggleSortingHandler(),children:[U(g.column.columnDef.header,g.getContext()),g.column.getIsSorted()?e(w,{className:"sort-icon",svg:g.column.getIsSorted()==="asc"?e(E.ArrowDownFilled,{}):e(E.ArrowUpFilled,{})}):null]}),e("div",{onMouseDown:g.getResizeHandler(),onTouchStart:g.getResizeHandler(),className:`resizer ${g.column.getIsResizing()?"isResizing":""}`,style:{transform:g.column.getIsResizing()?`translateX(${m.getState().columnSizingInfo.deltaOffset}px)`:""}})]},g.id))},y.id))}),e("tbody",{children:m.getRowModel().rows.map(y=>e("tr",{children:y.getVisibleCells().map(g=>e("td",{style:{width:g.column.getSize()},children:U(g.column.columnDef.cell,g.getContext())},g.id))},y.id))})]})}function fo({id:n,primaryInferencesName:a,referenceInferencesName:l}){const t=n.includes("PRIMARY"),i=Qs();return s(k,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Or,{shape:Qr.circle,color:i[t?0:1]}),t?a:l]})}const ho=C`
534
+ `,children:l.map((m,y)=>{const g=i.get(m.id),{rawData:f=null,linkToData:p=null}=(g==null?void 0:g.embeddingMetadata)??{},{predictionLabel:b=null,actualLabel:S=null}=(g==null?void 0:g.eventMetadata)??{},h=Vr(m.id),v=a(h),_=r[m.id],L=o[_];return e("li",{children:e($r,{rawData:f,linkToData:p,inferencesName:v,group:_,onClick:()=>{t(m.id)},onMouseOver:()=>{d(m.id)},onMouseOut:()=>{d(null)},color:L,size:c,predictionLabel:b,actualLabel:S,promptAndResponse:m.promptAndResponse,documentText:m.documentText,autoPlay:!1})},y)})})})}function fo({data:n,onPointSelected:a}){const{primaryInferences:l,referenceInferences:t}=Ie(),i=z(y=>y.metric),[r,o]=u.useState([]),{columns:c,tableData:d}=u.useMemo(()=>{const y=n.filter(L=>L.id.includes("CORPUS")===!1);let g=!1,f=!1,p=!1,b=!1,S=!1;n.forEach(L=>{L.linkToData&&(g=!0),L.rawData&&(f=!0),(L.prompt||L.response)&&(p=!0),L.predictionLabel&&(b=!0),L.actualLabel&&(S=!0)});const h=[];t&&h.push({header:"Inference Set",accessorKey:"id",size:50,cell:({getValue:L})=>e(ho,{id:L(),primaryInferencesName:l.name,referenceInferencesName:(t==null?void 0:t.name)??"reference"})}),g&&h.push({header:"Link",accessorKey:"linkToData",cell:({getValue:L})=>{const T=L();if(typeof T=="string"){const F=T.split("/").pop();return e(rn,{href:T,children:F})}return null}}),p?(h.push({header:"Prompt",accessorKey:"prompt",cell:be,size:200}),h.push({header:"Response",accessorKey:"response",cell:be,size:200})):f&&h.push({header:"Raw Data",accessorKey:"rawData"}),b&&h.push({header:"Prediction Label",accessorKey:"predictionLabel",size:50}),S&&h.push({header:"Actual Label",accessorKey:"actualLabel",size:50});const v=[];if(i&&i.type==="dataQuality"){const L=i.dimension.name;v.push({header:i.dimension.name,accessorKey:"metric",cell:zr,sortingFn:"basic"}),y.forEach(T=>{var D;const F=(D=T.dimensions.find(M=>M.dimension.name===L))==null?void 0:D.value;T.metric=F!=null?Number(F):null})}return{columns:[...h,...v,{header:"",id:"view-details",size:50,cell:({row:L})=>e(Qr,{"aria-label":"view point details",onClick:()=>{a(L.original.id)},children:"view details"})}],tableData:y}},[n,a,l,t,i]),m=me({columns:c,data:d,state:{sorting:r},getCoreRowModel:ge(),onSortingChange:o,getSortedRowModel:Kn()});return s("table",{css:cn,children:[e("thead",{children:m.getHeaderGroups().map(y=>e("tr",{children:y.headers.map(g=>s("th",{children:[g.isPlaceholder?null:s("div",{className:g.column.getCanSort()?"cursor-pointer":"",onClick:g.column.getToggleSortingHandler(),children:[U(g.column.columnDef.header,g.getContext()),g.column.getIsSorted()?e(w,{className:"sort-icon",svg:g.column.getIsSorted()==="asc"?e(A.ArrowDownFilled,{}):e(A.ArrowUpFilled,{})}):null]}),e("div",{onMouseDown:g.getResizeHandler(),onTouchStart:g.getResizeHandler(),className:`resizer ${g.column.getIsResizing()?"isResizing":""}`,style:{transform:g.column.getIsResizing()?`translateX(${m.getState().columnSizingInfo.deltaOffset}px)`:""}})]},g.id))},y.id))}),e("tbody",{children:m.getRowModel().rows.map(y=>e("tr",{children:y.getVisibleCells().map(g=>e("td",{style:{width:g.column.getSize()},children:U(g.column.columnDef.cell,g.getContext())},g.id))},y.id))})]})}function ho({id:n,primaryInferencesName:a,referenceInferencesName:l}){const t=n.includes("PRIMARY"),i=Os();return s(k,{direction:"row",gap:"size-100",alignItems:"center",children:[e(jr,{shape:Or.circle,color:i[t?0:1]}),t?a:l]})}const ko=C`
535
535
  width: 100%;
536
536
  height: 100%;
537
537
  position: relative;
@@ -561,30 +561,30 @@ dataframe`,co=C`
561
561
  }
562
562
  }
563
563
  }
564
- `;function ko({event:n,relevance:a}){return{id:n.eventMetadata.predictionId||"unknown id",text:n.documentText??"empty document",relevance:a}}function bo(){const n=z(F=>F.selectedEventIds),a=z(F=>F.setSelectedEventIds),l=z(F=>F.setSelectedClusterId),t=z(F=>F.selectionDisplay),[i,r]=De.useState(null),{primaryEventIds:o,referenceEventIds:c,corpusEventIds:d}=u.useMemo(()=>{const F=[],D=[],M=[];return n.forEach(R=>{R.includes("PRIMARY")?F.push(R):R.includes("CORPUS")?M.push(R):D.push(R)}),{primaryEventIds:F,referenceEventIds:D,corpusEventIds:M}},[n]),m=I.useLazyLoadQuery(Gl,{primaryEventIds:[...o],referenceEventIds:[...c],corpusEventIds:[...d]}),y=u.useMemo(()=>{var R,O,Z,ee,oe,de;const F=((O=(R=m.model)==null?void 0:R.primaryInferences)==null?void 0:O.events)??[],D=((ee=(Z=m.model)==null?void 0:Z.referenceInferences)==null?void 0:ee.events)??[],M=((de=(oe=m.model)==null?void 0:oe.corpusInferences)==null?void 0:de.events)??[];return[...F,...D,...M]},[m]),g=()=>{a(new Set),l(null)},f=z(F=>F.eventIdToDataMap),p=z(F=>F.pointData),b=z(F=>F.selectionSearchText),S=u.useMemo(()=>y.map(F=>{var R,O,Z,ee,oe,de,P;const D=f.get(F.id),M=[];return p!=null&&(D==null?void 0:D.retrievals)!=null&&D.retrievals.forEach(({documentId:N,relevance:A})=>{const $=p[N];$!=null&&M.push(ko({event:$,relevance:A}))}),{id:F.id,predictionId:((R=F.eventMetadata)==null?void 0:R.predictionId)??null,actualLabel:((O=F.eventMetadata)==null?void 0:O.actualLabel)??null,actualScore:((Z=F.eventMetadata)==null?void 0:Z.actualScore)??null,predictionLabel:((ee=F.eventMetadata)==null?void 0:ee.predictionLabel)??null,predictionScore:((oe=F.eventMetadata)==null?void 0:oe.predictionScore)??null,rawData:(D==null?void 0:D.embeddingMetadata.rawData)??null,linkToData:(D==null?void 0:D.embeddingMetadata.linkToData)??null,dimensions:F.dimensions,prompt:((de=F.promptAndResponse)==null?void 0:de.prompt)??null,response:((P=F.promptAndResponse)==null?void 0:P.response)??null,retrievedDocuments:M,documentText:F.documentText??null}}),[y,f,p]),h=u.useMemo(()=>{if(b){const F=b.toLowerCase();return S.filter(D=>{var M,R,O,Z;return D.id.includes(F)||((M=D.documentText)==null?void 0:M.toLowerCase().includes(F))||((R=D.predictionId)==null?void 0:R.includes(F))||((O=D.prompt)==null?void 0:O.toLowerCase().includes(F))||((Z=D.response)==null?void 0:Z.toLowerCase().includes(F))})}return S},[S,b]),v=u.useMemo(()=>{if(b){const F=b.toLowerCase();return y.filter(D=>{var M,R,O,Z,ee,oe,de;return D.id.includes(F)||((M=D.documentText)==null?void 0:M.toLowerCase().includes(F))||((O=(R=D.eventMetadata)==null?void 0:R.predictionId)==null?void 0:O.includes(F))||((ee=(Z=D.promptAndResponse)==null?void 0:Z.prompt)==null?void 0:ee.toLowerCase().includes(F))||((de=(oe=D.promptAndResponse)==null?void 0:oe.response)==null?void 0:de.toLowerCase().includes(F))})}return y},[y,b]),_=u.useMemo(()=>i?S.find(D=>D.id===i)??null:null,[S,i]),L=y.length,T=v.length;return s("section",{css:ho,children:[s("div",{role:"toolbar",css:C`
564
+ `;function bo({event:n,relevance:a}){return{id:n.eventMetadata.predictionId||"unknown id",text:n.documentText??"empty document",relevance:a}}function So(){const n=z(F=>F.selectedEventIds),a=z(F=>F.setSelectedEventIds),l=z(F=>F.setSelectedClusterId),t=z(F=>F.selectionDisplay),[i,r]=De.useState(null),{primaryEventIds:o,referenceEventIds:c,corpusEventIds:d}=u.useMemo(()=>{const F=[],D=[],M=[];return n.forEach(R=>{R.includes("PRIMARY")?F.push(R):R.includes("CORPUS")?M.push(R):D.push(R)}),{primaryEventIds:F,referenceEventIds:D,corpusEventIds:M}},[n]),m=I.useLazyLoadQuery(Gl,{primaryEventIds:[...o],referenceEventIds:[...c],corpusEventIds:[...d]}),y=u.useMemo(()=>{var R,O,Z,ee,oe,de;const F=((O=(R=m.model)==null?void 0:R.primaryInferences)==null?void 0:O.events)??[],D=((ee=(Z=m.model)==null?void 0:Z.referenceInferences)==null?void 0:ee.events)??[],M=((de=(oe=m.model)==null?void 0:oe.corpusInferences)==null?void 0:de.events)??[];return[...F,...D,...M]},[m]),g=()=>{a(new Set),l(null)},f=z(F=>F.eventIdToDataMap),p=z(F=>F.pointData),b=z(F=>F.selectionSearchText),S=u.useMemo(()=>y.map(F=>{var R,O,Z,ee,oe,de,P;const D=f.get(F.id),M=[];return p!=null&&(D==null?void 0:D.retrievals)!=null&&D.retrievals.forEach(({documentId:N,relevance:E})=>{const $=p[N];$!=null&&M.push(bo({event:$,relevance:E}))}),{id:F.id,predictionId:((R=F.eventMetadata)==null?void 0:R.predictionId)??null,actualLabel:((O=F.eventMetadata)==null?void 0:O.actualLabel)??null,actualScore:((Z=F.eventMetadata)==null?void 0:Z.actualScore)??null,predictionLabel:((ee=F.eventMetadata)==null?void 0:ee.predictionLabel)??null,predictionScore:((oe=F.eventMetadata)==null?void 0:oe.predictionScore)??null,rawData:(D==null?void 0:D.embeddingMetadata.rawData)??null,linkToData:(D==null?void 0:D.embeddingMetadata.linkToData)??null,dimensions:F.dimensions,prompt:((de=F.promptAndResponse)==null?void 0:de.prompt)??null,response:((P=F.promptAndResponse)==null?void 0:P.response)??null,retrievedDocuments:M,documentText:F.documentText??null}}),[y,f,p]),h=u.useMemo(()=>{if(b){const F=b.toLowerCase();return S.filter(D=>{var M,R,O,Z;return D.id.includes(F)||((M=D.documentText)==null?void 0:M.toLowerCase().includes(F))||((R=D.predictionId)==null?void 0:R.includes(F))||((O=D.prompt)==null?void 0:O.toLowerCase().includes(F))||((Z=D.response)==null?void 0:Z.toLowerCase().includes(F))})}return S},[S,b]),v=u.useMemo(()=>{if(b){const F=b.toLowerCase();return y.filter(D=>{var M,R,O,Z,ee,oe,de;return D.id.includes(F)||((M=D.documentText)==null?void 0:M.toLowerCase().includes(F))||((O=(R=D.eventMetadata)==null?void 0:R.predictionId)==null?void 0:O.includes(F))||((ee=(Z=D.promptAndResponse)==null?void 0:Z.prompt)==null?void 0:ee.toLowerCase().includes(F))||((de=(oe=D.promptAndResponse)==null?void 0:oe.response)==null?void 0:de.toLowerCase().includes(F))})}return y},[y,b]),_=u.useMemo(()=>i?S.find(D=>D.id===i)??null:null,[S,i]),L=y.length,T=v.length;return s("section",{css:ko,children:[s("div",{role:"toolbar",css:C`
565
565
  position: absolute;
566
566
  top: var(--px-spacing-med);
567
567
  right: var(--px-spacing-lg);
568
568
  display: flex;
569
569
  flex-direction: row-reverse;
570
570
  gap: var(--px-spacing-med);
571
- `,children:[e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(Ts,{})}),"aria-label":"Clear selection",onClick:g}),e(mo,{})]}),e(he,{children:s(q,{name:"Selection",children:[e(So,{numSelectedEvents:L,numMatchingEvents:T,searchText:b}),t===kl.list?e("div",{css:C`
571
+ `,children:[e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(Is,{})}),"aria-label":"Clear selection",onClick:g}),e(go,{})]}),e(he,{children:s(q,{name:"Selection",children:[e(vo,{numSelectedEvents:L,numMatchingEvents:T,searchText:b}),t===kl.list?e("div",{css:C`
572
572
  flex: 1 1 auto;
573
573
  overflow-y: auto;
574
- `,children:e(yo,{data:h,onPointSelected:r})}):e(po,{events:v,onItemSelected:r})]})}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>r(null),children:_&&e(j,{title:"Embedding Details",size:"L",children:e(ao,{event:_})})})]})}function So({numSelectedEvents:n,numMatchingEvents:a,searchText:l}){const t=z(m=>m.selectionDisplay),i=z(m=>m.setSelectionDisplay),r=z(m=>m.selectionGridSize),o=z(m=>m.setSelectionGridSize),c=z(m=>m.setSelectionSearchText),d=u.useMemo(()=>l?`${a}/${n} match "${l}"`:`${n} selected`,[n,a,l]);return e(_a,{extra:s("div",{css:C`
574
+ `,children:e(fo,{data:h,onPointSelected:r})}):e(yo,{events:v,onItemSelected:r})]})}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>r(null),children:_&&e(j,{title:"Embedding Details",size:"L",children:e(lo,{event:_})})})]})}function vo({numSelectedEvents:n,numMatchingEvents:a,searchText:l}){const t=z(m=>m.selectionDisplay),i=z(m=>m.setSelectionDisplay),r=z(m=>m.selectionGridSize),o=z(m=>m.setSelectionGridSize),c=z(m=>m.setSelectionSearchText),d=u.useMemo(()=>l?`${a}/${n} match "${l}"`:`${n} selected`,[n,a,l]);return e(_a,{extra:s("div",{css:C`
575
575
  display: flex;
576
576
  flex-direction: row;
577
577
  gap: var(--px-spacing-med);
578
- `,children:[e(Is,{placeholder:"Search by text or ID",onChange:m=>{c(m)}}),t===kl.gallery&&e(jr,{size:r,onChange:o}),e(qr,{mode:t,onChange:m=>{i(m)}})]}),children:e(K,{children:d})})}const Jl=Ql;function im(){const{referenceInferences:n,corpusInferences:a}=Ie(),{timeRange:l}=Me(),t=u.useMemo(()=>{let i={};return a!=null?i=Gr():n!=null?i=Ur():i=Wr(),i={...i,umapParameters:{...window.Config.UMAP}},i},[a,n]);return e(bl,{initialTimestamp:l.end,children:e(Jr,{...t,children:e(vo,{})})})}function vo(){const n=Os(),{primaryInferences:a,referenceInferences:l}=Ie(),t=z(v=>v.umapParameters),i=z(v=>v.getHDSCANParameters),r=z(v=>v.getMetric),o=z(v=>v.reset),c=z(v=>v.setLoading),[d,m]=u.useState(!0),[y,g,f]=I.useQueryLoader(Jl),{selectedTimestamp:p}=ia(),b=u.useMemo(()=>p??new Date(a.endTime),[p,a.endTime]),S=u.useMemo(()=>({start:sl(b,2).toISOString(),end:b.toISOString()}),[b]),h=I.useLazyLoadQuery(zl,{});return u.useEffect(()=>{o(),c(!0);const v=r();return g({id:n,timeRange:S,...t,...i(),fetchDataQualityMetric:v.type==="dataQuality",fetchPerformanceMetric:v.type==="performance",dataQualityMetricColumnName:v.type==="dataQuality"?v.dimension.name:null,performanceMetric:v.type==="performance"?v.metric:"accuracyScore"},{fetchPolicy:"network-only"}),()=>{f()}},[c,o,n,g,f,t,i,r,S]),s("main",{css:C`
578
+ `,children:[e(Ls,{placeholder:"Search by text or ID",onChange:m=>{c(m)}}),t===kl.gallery&&e(qr,{size:r,onChange:o}),e(Hr,{mode:t,onChange:m=>{i(m)}})]}),children:e(K,{children:d})})}const Jl=Ql;function um(){const{referenceInferences:n,corpusInferences:a}=Ie(),{timeRange:l}=Me(),t=u.useMemo(()=>{let i={};return a!=null?i=Ur():n!=null?i=Wr():i=Jr(),i={...i,umapParameters:{...window.Config.UMAP}},i},[a,n]);return e(bl,{initialTimestamp:l.end,children:e(Zr,{...t,children:e(Co,{})})})}function Co(){const n=js(),{primaryInferences:a,referenceInferences:l}=Ie(),t=z(v=>v.umapParameters),i=z(v=>v.getHDSCANParameters),r=z(v=>v.getMetric),o=z(v=>v.reset),c=z(v=>v.setLoading),[d,m]=u.useState(!0),[y,g,f]=I.useQueryLoader(Jl),{selectedTimestamp:p}=ia(),b=u.useMemo(()=>p??new Date(a.endTime),[p,a.endTime]),S=u.useMemo(()=>({start:sl(b,2).toISOString(),end:b.toISOString()}),[b]),h=I.useLazyLoadQuery(zl,{});return u.useEffect(()=>{o(),c(!0);const v=r();return g({id:n,timeRange:S,...t,...i(),fetchDataQualityMetric:v.type==="dataQuality",fetchPerformanceMetric:v.type==="performance",dataQualityMetricColumnName:v.type==="dataQuality"?v.dimension.name:null,performanceMetric:v.type==="performance"?v.metric:"accuracyScore"},{fetchPolicy:"network-only"}),()=>{f()}},[c,o,n,g,f,t,i,r,S]),s("main",{css:C`
579
579
  flex: 1 1 auto;
580
580
  display: flex;
581
581
  flex-direction: column;
582
582
  overflow: hidden;
583
- `,children:[e(Lo,{}),s(_a,{extra:s(k,{direction:"row",justifyContent:"center",alignItems:"center",gap:"size-100",children:[e($a,{onChange:v=>{m(v)},defaultSelected:!0,labelPlacement:"start",children:"Show Timeseries"}),e(qs,{})]}),children:[e(ml,{}),l?e(gl,{inferencesRole:"reference",timeRange:{start:new Date(l.startTime),end:new Date(l.endTime)}}):null,e(Us,{model:h.model})]}),s(ln,{direction:"vertical",children:[d?s(W,{children:[e(ce,{defaultSize:20,collapsible:!0,order:1,children:e(u.Suspense,{fallback:e(se,{}),children:e(Ys,{embeddingDimensionId:n})})}),e(tn,{css:In})]}):null,e(ce,{order:2,children:e("div",{css:C`
583
+ `,children:[e(_o,{}),s(_a,{extra:s(k,{direction:"row",justifyContent:"center",alignItems:"center",gap:"size-100",children:[e($a,{onChange:v=>{m(v)},defaultSelected:!0,labelPlacement:"start",children:"Show Timeseries"}),e(Hs,{})]}),children:[e(ml,{}),l?e(gl,{inferencesRole:"reference",timeRange:{start:new Date(l.startTime),end:new Date(l.endTime)}}):null,e(Ws,{model:h.model})]}),s(ln,{direction:"vertical",children:[d?s(W,{children:[e(ce,{defaultSize:20,collapsible:!0,order:1,children:e(u.Suspense,{fallback:e(se,{}),children:e(eo,{embeddingDimensionId:n})})}),e(tn,{css:In})]}):null,e(ce,{order:2,children:e("div",{css:C`
584
584
  width: 100%;
585
585
  height: 100%;
586
586
  position: relative;
587
- `,children:e(u.Suspense,{fallback:e(Zr,{}),children:y?e(Fo,{queryReference:y}):null})})})]})]})}function Co(n){if(n.__typename!=="Point3D")throw new Error(`Expected Point3D but got ${n.__typename} for coordinates`);return[n.x,n.y,n.z]}function Fo({queryReference:n}){const a=I.usePreloadedQuery(Jl,n),l=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.data)??[]},[a]),t=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.referenceData)??[]},[a]),i=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.corpusData)??[]},[a]),r=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.contextRetrievals)??[]},[a]),o=u.useMemo(()=>[...l,...t,...i].map(y=>({...y,position:Co(y.coordinates),metaData:{id:y.eventId}})),[t,l,i]),c=z(m=>m.setInitialData),d=z(m=>m.setClusters);return Cr(()=>{var y,g;const m=((g=(y=a.embedding)==null?void 0:y.UMAPPoints)==null?void 0:g.clusters)||[];c({points:o,clusters:m,retrievals:r})},[o,n,r,c,d]),e("div",{css:C`
587
+ `,children:e(u.Suspense,{fallback:e(Xr,{}),children:y?e(Ko,{queryReference:y}):null})})})]})]})}function Fo(n){if(n.__typename!=="Point3D")throw new Error(`Expected Point3D but got ${n.__typename} for coordinates`);return[n.x,n.y,n.z]}function Ko({queryReference:n}){const a=I.usePreloadedQuery(Jl,n),l=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.data)??[]},[a]),t=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.referenceData)??[]},[a]),i=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.corpusData)??[]},[a]),r=u.useMemo(()=>{var m,y;return((y=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:y.contextRetrievals)??[]},[a]),o=u.useMemo(()=>[...l,...t,...i].map(y=>({...y,position:Fo(y.coordinates),metaData:{id:y.eventId}})),[t,l,i]),c=z(m=>m.setInitialData),d=z(m=>m.setClusters);return Cr(()=>{var y,g;const m=((g=(y=a.embedding)==null?void 0:y.UMAPPoints)==null?void 0:g.clusters)||[];c({points:o,clusters:m,retrievals:r})},[o,n,r,c,d]),e("div",{css:C`
588
588
  flex: 1 1 auto;
589
589
  display: flex;
590
590
  flex-direction: row;
@@ -612,7 +612,7 @@ dataframe`,co=C`
612
612
  }
613
613
  }
614
614
  }
615
- `,children:e(To,{})}),e(tn,{css:In}),e(ce,{css:C`
615
+ `,children:e(Io,{})}),e(tn,{css:In}),e(ce,{css:C`
616
616
  .ac-tabs {
617
617
  height: 100%;
618
618
  overflow: hidden;
@@ -621,27 +621,27 @@ dataframe`,co=C`
621
621
  overflow-y: auto;
622
622
  }
623
623
  }
624
- `,children:s(he,{children:[e(q,{name:"Display",children:e(Xr,{})}),e(q,{name:"Hyperparameters",children:e(Yr,{})})]})})]})}),e(tn,{css:es}),e(ce,{children:s("div",{css:C`
624
+ `,children:s(he,{children:[e(q,{name:"Display",children:e(Yr,{})}),e(q,{name:"Hyperparameters",children:e(es,{})})]})})]})}),e(tn,{css:ns}),e(ce,{children:s("div",{css:C`
625
625
  position: relative;
626
626
  width: 100%;
627
627
  height: 100%;
628
- `,children:[e(Ko,{}),e(ns,{})]})})]})})}function Ko(){return z(a=>a.selectedEventIds).size===0?null:e("div",{css:C`
628
+ `,children:[e(xo,{}),e(as,{})]})})]})})}function xo(){return z(a=>a.selectedEventIds).size===0?null:e("div",{css:C`
629
629
  position: absolute;
630
630
  top: 0;
631
631
  left: 0;
632
632
  bottom: 0;
633
633
  right: 0;
634
- `,"data-testid":"selection-panel",children:s(ln,{direction:"vertical",children:[e(ce,{}),e(tn,{css:In,style:{zIndex:1}}),e(ce,{id:"embedding-point-selection",defaultSize:40,minSize:20,order:2,style:{zIndex:1},children:e(xo,{children:e(u.Suspense,{fallback:e(se,{}),children:e(bo,{})})})})]})})}function xo(n){return e("div",{css:C`
634
+ `,"data-testid":"selection-panel",children:s(ln,{direction:"vertical",children:[e(ce,{}),e(tn,{css:In,style:{zIndex:1}}),e(ce,{id:"embedding-point-selection",defaultSize:40,minSize:20,order:2,style:{zIndex:1},children:e(Do,{children:e(u.Suspense,{fallback:e(se,{}),children:e(So,{})})})})]})})}function Do(n){return e("div",{css:C`
635
635
  background-color: var(--ac-global-color-grey-75);
636
636
  width: 100%;
637
637
  height: 100%;
638
- `,children:n.children})}const Do=1,To=De.memo(function(){const{referenceInferences:a}=Ie(),l=z(g=>g.clusters),t=z(g=>g.selectedClusterId),i=z(g=>g.metric),r=z(g=>g.setSelectedClusterId),o=z(g=>g.setSelectedEventIds),c=z(g=>g.setHighlightedClusterId),d=z(g=>g.setClusterColorMode),m=a==null||i.type==="drift",y=u.useCallback(g=>{d(g===Do?Ha.highlight:Ha.default)},[d]);return s(he,{onChange:y,children:[e(q,{name:"Clusters",extra:e($e,{children:l.length}),children:s(k,{direction:"column",height:"100%",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"dark",flex:"none",padding:"size-50",children:e(k,{direction:"row",justifyContent:"end",children:e(js,{})})}),e(x,{flex:"1 1 auto",overflow:"auto",children:e("ul",{css:g=>C`
638
+ `,children:n.children})}const To=1,Io=De.memo(function(){const{referenceInferences:a}=Ie(),l=z(g=>g.clusters),t=z(g=>g.selectedClusterId),i=z(g=>g.metric),r=z(g=>g.setSelectedClusterId),o=z(g=>g.setSelectedEventIds),c=z(g=>g.setHighlightedClusterId),d=z(g=>g.setClusterColorMode),m=a==null||i.type==="drift",y=u.useCallback(g=>{d(g===To?Ba.highlight:Ba.default)},[d]);return s(he,{onChange:y,children:[e(q,{name:"Clusters",extra:e($e,{children:l.length}),children:s(k,{direction:"column",height:"100%",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"dark",flex:"none",padding:"size-50",children:e(k,{direction:"row",justifyContent:"end",children:e(qs,{})})}),e(x,{flex:"1 1 auto",overflow:"auto",children:e("ul",{css:g=>C`
639
639
  flex: 1 1 auto;
640
640
  display: flex;
641
641
  flex-direction: column;
642
642
  gap: ${g.spacing.margin8}px;
643
643
  margin: ${g.spacing.margin8}px;
644
- `,children:l.map(g=>e("li",{children:e(Br,{clusterId:g.id,numPoints:g.eventIds.length,isSelected:t===g.id,driftRatio:g.driftRatio,primaryToCorpusRatio:g.primaryToCorpusRatio,primaryMetricValue:g.primaryMetricValue,referenceMetricValue:g.referenceMetricValue,metricName:Io(i),hideReference:m,onClick:()=>{t!==g.id?(r(g.id),o(new Set(g.eventIds))):(r(null),o(new Set))},onMouseEnter:()=>{c(g.id)},onMouseLeave:()=>{c(null)}})},g.id))})})]})}),e(q,{name:"Configuration",children:e(x,{overflow:"auto",height:"100%",children:e(Hr,{})})})]})});function Io(n){const{type:a,metric:l}=n;switch(a){case"dataQuality":return`${n.dimension.name} avg`;case"drift":{switch(l){case"euclideanDistance":return"Cluster Drift";default:ke()}break}case"performance":return an(l);case"retrieval":{switch(l){case"queryDistance":return"% Query";default:ke()}break}default:ke()}}function Lo(){const{notifyError:n}=pl(),a=z(t=>t.errorMessage),l=z(t=>t.setErrorMessage);return u.useEffect(()=>{a!==null&&n({title:"An error occurred",message:a,action:{text:"Dismiss",onClick:()=>{l(null)}}})},[a,n,l]),null}const Zl=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"cff0ac130f1ef79784f7bef4161ac60d",id:null,metadata:{},name:"embeddingLoaderQuery",operationKind:"query",text:`query embeddingLoaderQuery(
644
+ `,children:l.map(g=>e("li",{children:e(Br,{clusterId:g.id,numPoints:g.eventIds.length,isSelected:t===g.id,driftRatio:g.driftRatio,primaryToCorpusRatio:g.primaryToCorpusRatio,primaryMetricValue:g.primaryMetricValue,referenceMetricValue:g.referenceMetricValue,metricName:Lo(i),hideReference:m,onClick:()=>{t!==g.id?(r(g.id),o(new Set(g.eventIds))):(r(null),o(new Set))},onMouseEnter:()=>{c(g.id)},onMouseLeave:()=>{c(null)}})},g.id))})})]})}),e(q,{name:"Configuration",children:e(x,{overflow:"auto",height:"100%",children:e(Gr,{})})})]})});function Lo(n){const{type:a,metric:l}=n;switch(a){case"dataQuality":return`${n.dimension.name} avg`;case"drift":{switch(l){case"euclideanDistance":return"Cluster Drift";default:ke()}break}case"performance":return an(l);case"retrieval":{switch(l){case"queryDistance":return"% Query";default:ke()}break}default:ke()}}function _o(){const{notifyError:n}=pl(),a=z(t=>t.errorMessage),l=z(t=>t.setErrorMessage);return u.useEffect(()=>{a!==null&&n({title:"An error occurred",message:a,action:{text:"Dismiss",onClick:()=>{l(null)}}})},[a,n,l]),null}const Zl=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"cff0ac130f1ef79784f7bef4161ac60d",id:null,metadata:{},name:"embeddingLoaderQuery",operationKind:"query",text:`query embeddingLoaderQuery(
645
645
  $id: GlobalID!
646
646
  ) {
647
647
  embedding: node(id: $id) {
@@ -654,7 +654,7 @@ dataframe`,co=C`
654
654
  id
655
655
  }
656
656
  }
657
- `}}}();Zl.hash="c049e57d92943f64b5e751e0daa89dc8";async function rm(n){const{embeddingDimensionId:a}=n.params;return I.fetchQuery(Te,Zl,{id:a}).toPromise()}const Xl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"hasReference"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[r],c=[{kind:"Variable",name:"hasReference",variableName:"hasReference"},r],d={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},m=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}],y={kind:"Literal",name:"metric",value:"cardinality"},g={kind:"Literal",name:"metric",value:"percentEmpty"},f={kind:"Literal",name:"inferencesRole",value:"reference"};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[i,{args:o,kind:"FragmentSpread",name:"DimensionSegmentsBarChart_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionCountStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionDriftStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionCardinalityStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionPercentEmptyStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionQuantilesStats_dimension"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[d,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[d,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:m,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:m,storageKey:null}],storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},r],kind:"ScalarField",name:"driftMetric",storageKey:null},{alias:"cardinality",args:[y,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[g,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[f,y],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'},{alias:"referencePercentEmpty",args:[f,g],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ad937e56d4647309b9d78ac11f57265",id:null,metadata:{},name:"DimensionPageQuery",operationKind:"query",text:`query DimensionPageQuery(
657
+ `}}}();Zl.hash="c049e57d92943f64b5e751e0daa89dc8";async function mm(n){const{embeddingDimensionId:a}=n.params;return I.fetchQuery(Te,Zl,{id:a}).toPromise()}const Xl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"hasReference"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[r],c=[{kind:"Variable",name:"hasReference",variableName:"hasReference"},r],d={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},m=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}],y={kind:"Literal",name:"metric",value:"cardinality"},g={kind:"Literal",name:"metric",value:"percentEmpty"},f={kind:"Literal",name:"inferencesRole",value:"reference"};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[i,{args:o,kind:"FragmentSpread",name:"DimensionSegmentsBarChart_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionCountStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionDriftStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionCardinalityStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionPercentEmptyStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionQuantilesStats_dimension"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[d,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[d,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:m,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:m,storageKey:null}],storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},r],kind:"ScalarField",name:"driftMetric",storageKey:null},{alias:"cardinality",args:[y,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[g,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[f,y],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'},{alias:"referencePercentEmpty",args:[f,g],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ad937e56d4647309b9d78ac11f57265",id:null,metadata:{},name:"DimensionPageQuery",operationKind:"query",text:`query DimensionPageQuery(
658
658
  $dimensionId: GlobalID!
659
659
  $timeRange: TimeRange!
660
660
  $hasReference: Boolean!
@@ -735,7 +735,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
735
735
  }
736
736
  }
737
737
  }
738
- `}}}();Xl.hash="d194bfd656408e8ba7cb427ddc80fc85";const Yl=function(){var n={kind:"Literal",name:"metric",value:"cardinality"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCardinalityStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"cardinality",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'}]}],type:"Dimension",abstractKey:null}}();Yl.hash="8b4edef350e4df49e799afa70ca34918";function _o(n){const a=I.useFragment(Yl,n.dimension);return s(W,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Cardinality"}),e(K,{textSize:"xlarge",children:sn(a.cardinality)}),a.referenceCardinality!=null&&e(K,{textSize:"medium",color:"designationPurple",children:sn(a.referenceCardinality)})]})}const et=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"cardinalityTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"cardinality"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"f53e5ac5e0bfd6a0a6c50b761223a617",id:null,metadata:{},name:"DimensionCardinalityTimeSeriesQuery",operationKind:"query",text:`query DimensionCardinalityTimeSeriesQuery(
738
+ `}}}();Xl.hash="d194bfd656408e8ba7cb427ddc80fc85";const Yl=function(){var n={kind:"Literal",name:"metric",value:"cardinality"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCardinalityStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"cardinality",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'}]}],type:"Dimension",abstractKey:null}}();Yl.hash="8b4edef350e4df49e799afa70ca34918";function Eo(n){const a=I.useFragment(Yl,n.dimension);return s(W,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Cardinality"}),e(K,{textSize:"xlarge",children:sn(a.cardinality)}),a.referenceCardinality!=null&&e(K,{textSize:"medium",color:"designationPurple",children:sn(a.referenceCardinality)})]})}const et=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"cardinalityTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"cardinality"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"f53e5ac5e0bfd6a0a6c50b761223a617",id:null,metadata:{},name:"DimensionCardinalityTimeSeriesQuery",operationKind:"query",text:`query DimensionCardinalityTimeSeriesQuery(
739
739
  $dimensionId: GlobalID!
740
740
  $timeRange: TimeRange!
741
741
  $granularity: Granularity!
@@ -753,7 +753,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
753
753
  }
754
754
  }
755
755
  }
756
- `}}}();et.hash="88ce04bb2022d5e2bc75c663abd7e5de";const Xn={top:25,right:18,left:18,bottom:5},Ao=new Intl.NumberFormat([],{maximumFractionDigits:2}),nt=()=>{const{gray300:n}=Ne();return{color:n}};function Eo({active:n,payload:a,label:l}){var i;const{color:t}=nt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Ao.format(r):"--";return s(Be,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"Cardinality",value:o}),e(ra,{})]})}return null}function wo({dimensionId:n}){var c;const{timeRange:a}=Me(),l=xn(a),t=I.useLazyLoadQuery(et,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),{color:i}=nt(),r=((c=t.dimension.cardinalityTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],o=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes});return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:r,margin:Xn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"cardinalityColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:i,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:i,stopOpacity:0})]})}),e(Ue,{...Tn,tickFormatter:d=>o(new Date(d))}),e(xe,{stroke:ie.colors.gray200,label:{value:"Cardinality",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Eo,{})}),e(On,{type:"monotone",dataKey:"value",stroke:i,fillOpacity:1,fill:"url(#cardinalityColorUv)"})]})})}const at={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCountStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null};at.hash="6dccac51f3fb0853276677c692af5a43";function Ro(n){const l=I.useFragment(at,n.dimension).count??0;return s(W,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Total Count"}),e(K,{textSize:"xlarge",children:sn(l)})]})}const lt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"1f9eff6d8d453148844edae32b844df7",id:null,metadata:{},name:"DimensionCountTimeSeriesQuery",operationKind:"query",text:`query DimensionCountTimeSeriesQuery(
756
+ `}}}();et.hash="88ce04bb2022d5e2bc75c663abd7e5de";const Xn={top:25,right:18,left:18,bottom:5},Ao=new Intl.NumberFormat([],{maximumFractionDigits:2}),nt=()=>{const{gray300:n}=Ne();return{color:n}};function wo({active:n,payload:a,label:l}){var i;const{color:t}=nt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Ao.format(r):"--";return s(He,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"Cardinality",value:o}),e(ra,{})]})}return null}function Ro({dimensionId:n}){var c;const{timeRange:a}=Me(),l=xn(a),t=I.useLazyLoadQuery(et,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),{color:i}=nt(),r=((c=t.dimension.cardinalityTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],o=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes});return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:r,margin:Xn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"cardinalityColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:i,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:i,stopOpacity:0})]})}),e(Ue,{...Tn,tickFormatter:d=>o(new Date(d))}),e(xe,{stroke:ie.colors.gray200,label:{value:"Cardinality",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(wo,{})}),e(On,{type:"monotone",dataKey:"value",stroke:i,fillOpacity:1,fill:"url(#cardinalityColorUv)"})]})})}const at={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCountStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null};at.hash="6dccac51f3fb0853276677c692af5a43";function Po(n){const l=I.useFragment(at,n.dimension).count??0;return s(W,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Total Count"}),e(K,{textSize:"xlarge",children:sn(l)})]})}const lt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"1f9eff6d8d453148844edae32b844df7",id:null,metadata:{},name:"DimensionCountTimeSeriesQuery",operationKind:"query",text:`query DimensionCountTimeSeriesQuery(
757
757
  $dimensionId: GlobalID!
758
758
  $timeRange: TimeRange!
759
759
  $countGranularity: Granularity!
@@ -771,7 +771,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
771
771
  }
772
772
  }
773
773
  }
774
- `}}}();lt.hash="9677ef7c6b298554824fe3fd3904c7aa";const Po=new Intl.NumberFormat([],{maximumFractionDigits:2}),tt=()=>{const{gray300:n}=Ne();return{barColor:n}};function Mo({active:n,payload:a,label:l}){var i;const{barColor:t}=tt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Po.format(r):"--";return s(Be,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,shape:"square",name:"Count",value:o})]})}return null}function No({dimensionId:n}){var d;const{timeRange:a}=Me(),l=xn(a),r=(((d=I.useLazyLoadQuery(lt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},countGranularity:l}).embedding.trafficTimeSeries)==null?void 0:d.data)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).valueOf()})),o=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes}),{barColor:c}=tt();return e(Ge,{width:"100%",height:"100%",children:s(Qa,{data:r,margin:Xn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"countBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:c,stopOpacity:1}),e("stop",{offset:"95%",stopColor:c,stopOpacity:.5})]})}),e(Ue,{...Tn,tickFormatter:m=>o(new Date(m))}),e(xe,{stroke:ie.colors.gray200,label:{value:"Count",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{...Ea,content:e(Mo,{})}),e(Fn,{dataKey:"value",fill:"url(#countBarColor)",spacing:5})]})})}const it=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"dimensionId"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"dimensionId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],i={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null},c=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],d={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:c,storageKey:null},m={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:c,storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{kind:"RequiredField",field:{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[i,r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[i,o],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[i],type:"MissingValueBin",abstractKey:null}],storageKey:null},d],storageKey:null},m],storageKey:null},action:"THROW",path:"dimension.segmentsComparison"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,l,{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[i,{kind:"InlineFragment",selections:[r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[o],type:"IntervalBin",abstractKey:null}],storageKey:null},d],storageKey:null},m],storageKey:null}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"7d11d88f419003f5ee8cd9d11312e427",id:null,metadata:{},name:"DimensionDriftBreakdownSegmentBarChartQuery",operationKind:"query",text:`query DimensionDriftBreakdownSegmentBarChartQuery(
774
+ `}}}();lt.hash="9677ef7c6b298554824fe3fd3904c7aa";const Mo=new Intl.NumberFormat([],{maximumFractionDigits:2}),tt=()=>{const{gray300:n}=Ne();return{barColor:n}};function No({active:n,payload:a,label:l}){var i;const{barColor:t}=tt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Mo.format(r):"--";return s(He,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,shape:"square",name:"Count",value:o})]})}return null}function Vo({dimensionId:n}){var d;const{timeRange:a}=Me(),l=xn(a),r=(((d=I.useLazyLoadQuery(lt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},countGranularity:l}).embedding.trafficTimeSeries)==null?void 0:d.data)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).valueOf()})),o=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes}),{barColor:c}=tt();return e(Ge,{width:"100%",height:"100%",children:s(Qa,{data:r,margin:Xn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"countBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:c,stopOpacity:1}),e("stop",{offset:"95%",stopColor:c,stopOpacity:.5})]})}),e(Ue,{...Tn,tickFormatter:m=>o(new Date(m))}),e(xe,{stroke:ie.colors.gray200,label:{value:"Count",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{...Aa,content:e(No,{})}),e(Fn,{dataKey:"value",fill:"url(#countBarColor)",spacing:5})]})})}const it=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"dimensionId"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"dimensionId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],i={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null},c=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],d={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:c,storageKey:null},m={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:c,storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{kind:"RequiredField",field:{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[i,r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[i,o],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[i],type:"MissingValueBin",abstractKey:null}],storageKey:null},d],storageKey:null},m],storageKey:null},action:"THROW",path:"dimension.segmentsComparison"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,l,{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[i,{kind:"InlineFragment",selections:[r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[o],type:"IntervalBin",abstractKey:null}],storageKey:null},d],storageKey:null},m],storageKey:null}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"7d11d88f419003f5ee8cd9d11312e427",id:null,metadata:{},name:"DimensionDriftBreakdownSegmentBarChartQuery",operationKind:"query",text:`query DimensionDriftBreakdownSegmentBarChartQuery(
775
775
  $dimensionId: GlobalID!
776
776
  $timeRange: TimeRange!
777
777
  ) {
@@ -811,7 +811,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
811
811
  }
812
812
  }
813
813
  }
814
- `}}}();it.hash="6bb76e3cce4ee28c333e485b3aa2dffd";const Ja=La(".2f"),rt=()=>{const{primary:n,reference:a}=Ne();return{primaryBarColor:n,referenceBarColor:a}};function Vo({active:n,payload:a,label:l}){var r,o,c,d,m,y;const{primaryBarColor:t,referenceBarColor:i}=rt();if(n&&a&&a.length){const g=(o=(r=a[0])==null?void 0:r.payload)==null?void 0:o.primaryName,f=(c=a[0])==null?void 0:c.value,p=(m=(d=a[0])==null?void 0:d.payload)==null?void 0:m.referenceName,b=(y=a[1])==null?void 0:y.value;return s(Be,{children:[e(K,{elementType:"h3",textSize:"medium",weight:"heavy",children:l}),e(re,{color:t,shape:"square",name:g,value:f!=null?`${Ja(f)}%`:"--"}),e(re,{color:i,shape:"square",name:p,value:b!=null?`${Ja(b)}%`:"--"})]})}return null}function $o(n){var f,p,b,S,h;const{primaryInferences:a,referenceInferences:l}=Ie(),t=a.name,i=(l==null?void 0:l.name)||"reference",{selectedTimestamp:r}=ia(),o=u.useMemo(()=>r??new Date(a.endTime),[r,a.endTime]),c=u.useMemo(()=>({start:sl(o,2).toISOString(),end:o.toISOString()}),[o]),d=I.useLazyLoadQuery(it,{dimensionId:n.dimensionId,timeRange:c}),m=u.useMemo(()=>{var T,F,D,M,R;const v=((T=d.dimension.segmentsComparison)==null?void 0:T.segments)??[],_=((D=(F=d.dimension.segmentsComparison)==null?void 0:F.totalCounts)==null?void 0:D.primaryValue)??0,L=((R=(M=d.dimension.segmentsComparison)==null?void 0:M.totalCounts)==null?void 0:R.referenceValue)??0;return v.map(O=>{var N,A;const Z=((N=O.counts)==null?void 0:N.primaryValue)??0,ee=((A=O.counts)==null?void 0:A.referenceValue)??0,oe=Sl(O.bin),de=Z/_*100,P=ee/L*100;return{name:oe,primaryName:t,referenceName:i,primaryPercent:de,referencePercent:P}})},[(f=d.dimension.segmentsComparison)==null?void 0:f.segments,(b=(p=d.dimension.segmentsComparison)==null?void 0:p.totalCounts)==null?void 0:b.primaryValue,(h=(S=d.dimension.segmentsComparison)==null?void 0:S.totalCounts)==null?void 0:h.referenceValue,t,i]),{primaryBarColor:y,referenceBarColor:g}=rt();return s(k,{direction:"column",height:"100%",children:[e(x,{flex:"none",paddingTop:"size-100",paddingStart:"size-200",children:e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:`Distribution comparison at ${we(new Date(c.end))}`})}),e(x,{flex:!0,children:e(Ge,{children:s(Qa,{data:m,margin:{top:15,right:18,left:18,bottom:5},children:[s("defs",{children:[s("linearGradient",{id:"dimensionPrimarySegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:y,stopOpacity:1}),e("stop",{offset:"95%",stopColor:y,stopOpacity:.5})]}),s("linearGradient",{id:"dimensionReferenceSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:1}),e("stop",{offset:"95%",stopColor:g,stopOpacity:.5})]})]}),e(Ue,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{stroke:ie.colors.gray200,label:{value:"Percent",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{...Ea,content:e(Vo,{})}),e(Fn,{dataKey:"primaryPercent",fill:"url(#dimensionPrimarySegmentsBarColor)"}),e(Fn,{dataKey:"referencePercent",fill:"url(#dimensionReferenceSegmentsBarColor)"})]})})})]})}const st={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionDriftStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"driftMetric",storageKey:null}],type:"Dimension",abstractKey:null};st.hash="f8a9fb08a14f63906e38bc247d50b189";const zo=s(wn,{variant:"info",placement:"top end",children:[e(te,{weight:"heavy",level:4,children:"Population Stability Index"}),e(En,{children:e(K,{children:"PSI is a symmetric metric that measures the relative entropy, or difference in information represented by two distributions. It can be thought of as measuring the distance between two data distributions showing how different the two distributions are from each other."})}),e("footer",{children:e(rn,{href:"https://arize.com/blog-course/population-stability-index-psi/#:~:text=Population%20Stability%20Index%20(PSI)%20Overview,distributions%20are%20from%20each%20other.",children:"Learn more"})})]});function Qo(n){const a=I.useFragment(st,n.dimension);return s(W,{children:[s(k,{direction:"row",alignItems:"center",gap:"size-25",children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"PSI"}),zo]}),e(K,{textSize:"xlarge",children:Sn(a.psi)})]})}const ot=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"driftGranularity"},t={defaultValue:null,kind:"LocalArgument",name:"timeRange"},i=[{kind:"Variable",name:"id",variableName:"dimensionId"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"granularity",variableName:"driftGranularity"},{kind:"Literal",name:"metric",value:"psi"},o],concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l,t],kind:"Fragment",metadata:null,name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,t,l,n],kind:"Operation",name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,d],storageKey:null}]},params:{cacheID:"af2d25e28675891b3c8a6bc75027f731",id:null,metadata:{},name:"DimensionDriftTimeSeriesQuery",operationKind:"query",text:`query DimensionDriftTimeSeriesQuery(
814
+ `}}}();it.hash="6bb76e3cce4ee28c333e485b3aa2dffd";const Ja=La(".2f"),rt=()=>{const{primary:n,reference:a}=Ne();return{primaryBarColor:n,referenceBarColor:a}};function $o({active:n,payload:a,label:l}){var r,o,c,d,m,y;const{primaryBarColor:t,referenceBarColor:i}=rt();if(n&&a&&a.length){const g=(o=(r=a[0])==null?void 0:r.payload)==null?void 0:o.primaryName,f=(c=a[0])==null?void 0:c.value,p=(m=(d=a[0])==null?void 0:d.payload)==null?void 0:m.referenceName,b=(y=a[1])==null?void 0:y.value;return s(He,{children:[e(K,{elementType:"h3",textSize:"medium",weight:"heavy",children:l}),e(re,{color:t,shape:"square",name:g,value:f!=null?`${Ja(f)}%`:"--"}),e(re,{color:i,shape:"square",name:p,value:b!=null?`${Ja(b)}%`:"--"})]})}return null}function zo(n){var f,p,b,S,h;const{primaryInferences:a,referenceInferences:l}=Ie(),t=a.name,i=(l==null?void 0:l.name)||"reference",{selectedTimestamp:r}=ia(),o=u.useMemo(()=>r??new Date(a.endTime),[r,a.endTime]),c=u.useMemo(()=>({start:sl(o,2).toISOString(),end:o.toISOString()}),[o]),d=I.useLazyLoadQuery(it,{dimensionId:n.dimensionId,timeRange:c}),m=u.useMemo(()=>{var T,F,D,M,R;const v=((T=d.dimension.segmentsComparison)==null?void 0:T.segments)??[],_=((D=(F=d.dimension.segmentsComparison)==null?void 0:F.totalCounts)==null?void 0:D.primaryValue)??0,L=((R=(M=d.dimension.segmentsComparison)==null?void 0:M.totalCounts)==null?void 0:R.referenceValue)??0;return v.map(O=>{var N,E;const Z=((N=O.counts)==null?void 0:N.primaryValue)??0,ee=((E=O.counts)==null?void 0:E.referenceValue)??0,oe=Sl(O.bin),de=Z/_*100,P=ee/L*100;return{name:oe,primaryName:t,referenceName:i,primaryPercent:de,referencePercent:P}})},[(f=d.dimension.segmentsComparison)==null?void 0:f.segments,(b=(p=d.dimension.segmentsComparison)==null?void 0:p.totalCounts)==null?void 0:b.primaryValue,(h=(S=d.dimension.segmentsComparison)==null?void 0:S.totalCounts)==null?void 0:h.referenceValue,t,i]),{primaryBarColor:y,referenceBarColor:g}=rt();return s(k,{direction:"column",height:"100%",children:[e(x,{flex:"none",paddingTop:"size-100",paddingStart:"size-200",children:e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:`Distribution comparison at ${we(new Date(c.end))}`})}),e(x,{flex:!0,children:e(Ge,{children:s(Qa,{data:m,margin:{top:15,right:18,left:18,bottom:5},children:[s("defs",{children:[s("linearGradient",{id:"dimensionPrimarySegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:y,stopOpacity:1}),e("stop",{offset:"95%",stopColor:y,stopOpacity:.5})]}),s("linearGradient",{id:"dimensionReferenceSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:1}),e("stop",{offset:"95%",stopColor:g,stopOpacity:.5})]})]}),e(Ue,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{stroke:ie.colors.gray200,label:{value:"Percent",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{...Aa,content:e($o,{})}),e(Fn,{dataKey:"primaryPercent",fill:"url(#dimensionPrimarySegmentsBarColor)"}),e(Fn,{dataKey:"referencePercent",fill:"url(#dimensionReferenceSegmentsBarColor)"})]})})})]})}const st={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionDriftStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"driftMetric",storageKey:null}],type:"Dimension",abstractKey:null};st.hash="f8a9fb08a14f63906e38bc247d50b189";const Qo=s(wn,{variant:"info",placement:"top end",children:[e(te,{weight:"heavy",level:4,children:"Population Stability Index"}),e(An,{children:e(K,{children:"PSI is a symmetric metric that measures the relative entropy, or difference in information represented by two distributions. It can be thought of as measuring the distance between two data distributions showing how different the two distributions are from each other."})}),e("footer",{children:e(rn,{href:"https://arize.com/blog-course/population-stability-index-psi/#:~:text=Population%20Stability%20Index%20(PSI)%20Overview,distributions%20are%20from%20each%20other.",children:"Learn more"})})]});function Oo(n){const a=I.useFragment(st,n.dimension);return s(W,{children:[s(k,{direction:"row",alignItems:"center",gap:"size-25",children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"PSI"}),Qo]}),e(K,{textSize:"xlarge",children:Sn(a.psi)})]})}const ot=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"driftGranularity"},t={defaultValue:null,kind:"LocalArgument",name:"timeRange"},i=[{kind:"Variable",name:"id",variableName:"dimensionId"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"granularity",variableName:"driftGranularity"},{kind:"Literal",name:"metric",value:"psi"},o],concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l,t],kind:"Fragment",metadata:null,name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,t,l,n],kind:"Operation",name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,d],storageKey:null}]},params:{cacheID:"af2d25e28675891b3c8a6bc75027f731",id:null,metadata:{},name:"DimensionDriftTimeSeriesQuery",operationKind:"query",text:`query DimensionDriftTimeSeriesQuery(
815
815
  $dimensionId: GlobalID!
816
816
  $timeRange: TimeRange!
817
817
  $driftGranularity: Granularity!
@@ -836,7 +836,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
836
836
  }
837
837
  }
838
838
  }
839
- `}}}();ot.hash="6312b58dbb252b17efdf08d44dd58630";const dt=()=>{const{orange300:n,gray300:a}=Ne();return{color:n,barColor:a}};function Oo({active:n,payload:a,label:l}){var i;const{color:t}=dt();if(n&&a&&a.length){const r=((i=a[1])==null?void 0:i.value)??null;return s(Be,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"PSI",value:Sn(r)}),e(ra,{}),s("div",{css:C`
839
+ `}}}();ot.hash="6312b58dbb252b17efdf08d44dd58630";const dt=()=>{const{orange300:n,gray300:a}=Ne();return{color:n,barColor:a}};function jo({active:n,payload:a,label:l}){var i;const{color:t}=dt();if(n&&a&&a.length){const r=((i=a[1])==null?void 0:i.value)??null;return s(He,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"PSI",value:Sn(r)}),e(ra,{}),s("div",{css:C`
840
840
  display: flex;
841
841
  flex-direction: row;
842
842
  align-items: center;
@@ -844,7 +844,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
844
844
  gap: var(--px-spacing-sm);
845
845
 
846
846
  margin-top: var(--px-spacing-sm);
847
- `,children:[e(w,{svg:e(_l,{})}),e("span",{children:"Click to view details"})]})]})}return null}function jo({dimensionId:n}){var p,b;const{timeRange:a}=Me(),{selectedTimestamp:l,setSelectedTimestamp:t}=ia(),i=xn(a),r=I.useLazyLoadQuery(ot,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},driftGranularity:yl(a),countGranularity:i}),o=((p=r.embedding.driftTimeSeries)==null?void 0:p.data)||[],c=((b=r.embedding.trafficTimeSeries)==null?void 0:b.data.reduce((S,h)=>(S[h.timestamp]=h.value,S),{}))??{},d=o.map(S=>{const h=c[S.timestamp];return{...S,traffic:h,timestamp:new Date(S.timestamp).valueOf()}}),m=Dn({samplingIntervalMinutes:i.samplingIntervalMinutes}),y=u.useCallback(S=>{const{activePayload:h}=S;if(h!=null&&h.length>0){const v=h[0].payload;t(new Date(v.timestamp))}},[t]),{color:g,barColor:f}=dt();return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:d,margin:Xn,onClick:y,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"dimensionDriftColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:g,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:f,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:f,stopOpacity:0})]})]}),e(Ue,{...Tn,tickFormatter:S=>m(new Date(S))}),e(xe,{stroke:ie.colors.gray200,label:{value:"PSI",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{yAxisId:"right",orientation:"right",tick:!1,tickLine:!1,width:0}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Oo,{})}),e(Fn,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(On,{type:"monotone",dataKey:"value",stroke:g,fillOpacity:1,fill:"url(#dimensionDriftColorUv)"}),l!=null?e(Pl,{...fl,x:l.getTime()}):null]})})}const ct=function(){var n={kind:"Literal",name:"metric",value:"percentEmpty"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"percentEmpty",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referencePercentEmpty",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}}();ct.hash="1e10d0449d6607d9292f355548c41c78";function qo(n){const a=I.useFragment(ct,n.dimension);return s(W,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"% Empty"}),e(K,{textSize:"xlarge",children:Da(a.percentEmpty)}),a.referencePercentEmpty!=null&&e(K,{textSize:"medium",color:"designationPurple",children:Da(a.referencePercentEmpty)})]})}const ut=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"percentEmptyTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"percentEmpty"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"9be05c72f19755036f4829777a96f97d",id:null,metadata:{},name:"DimensionPercentEmptyTimeSeriesQuery",operationKind:"query",text:`query DimensionPercentEmptyTimeSeriesQuery(
847
+ `,children:[e(w,{svg:e(_l,{})}),e("span",{children:"Click to view details"})]})]})}return null}function qo({dimensionId:n}){var p,b;const{timeRange:a}=Me(),{selectedTimestamp:l,setSelectedTimestamp:t}=ia(),i=xn(a),r=I.useLazyLoadQuery(ot,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},driftGranularity:yl(a),countGranularity:i}),o=((p=r.embedding.driftTimeSeries)==null?void 0:p.data)||[],c=((b=r.embedding.trafficTimeSeries)==null?void 0:b.data.reduce((S,h)=>(S[h.timestamp]=h.value,S),{}))??{},d=o.map(S=>{const h=c[S.timestamp];return{...S,traffic:h,timestamp:new Date(S.timestamp).valueOf()}}),m=Dn({samplingIntervalMinutes:i.samplingIntervalMinutes}),y=u.useCallback(S=>{const{activePayload:h}=S;if(h!=null&&h.length>0){const v=h[0].payload;t(new Date(v.timestamp))}},[t]),{color:g,barColor:f}=dt();return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:d,margin:Xn,onClick:y,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"dimensionDriftColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:g,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:f,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:f,stopOpacity:0})]})]}),e(Ue,{...Tn,tickFormatter:S=>m(new Date(S))}),e(xe,{stroke:ie.colors.gray200,label:{value:"PSI",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{yAxisId:"right",orientation:"right",tick:!1,tickLine:!1,width:0}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(jo,{})}),e(Fn,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(On,{type:"monotone",dataKey:"value",stroke:g,fillOpacity:1,fill:"url(#dimensionDriftColorUv)"}),l!=null?e(Pl,{...fl,x:l.getTime()}):null]})})}const ct=function(){var n={kind:"Literal",name:"metric",value:"percentEmpty"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"percentEmpty",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referencePercentEmpty",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}}();ct.hash="1e10d0449d6607d9292f355548c41c78";function Ho(n){const a=I.useFragment(ct,n.dimension);return s(W,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"% Empty"}),e(K,{textSize:"xlarge",children:Da(a.percentEmpty)}),a.referencePercentEmpty!=null&&e(K,{textSize:"medium",color:"designationPurple",children:Da(a.referencePercentEmpty)})]})}const ut=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"percentEmptyTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"percentEmpty"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"9be05c72f19755036f4829777a96f97d",id:null,metadata:{},name:"DimensionPercentEmptyTimeSeriesQuery",operationKind:"query",text:`query DimensionPercentEmptyTimeSeriesQuery(
848
848
  $dimensionId: GlobalID!
849
849
  $timeRange: TimeRange!
850
850
  $granularity: Granularity!
@@ -862,7 +862,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
862
862
  }
863
863
  }
864
864
  }
865
- `}}}();ut.hash="1e843d6c8dbe05b389b24188c6bdb394";const Bo=new Intl.NumberFormat([],{maximumFractionDigits:2}),mt=()=>{const{gray100:n}=Ne();return{color:n}};function Ho({active:n,payload:a,label:l}){var i;const{color:t}=mt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Bo.format(r):"--";return s(Be,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"% Empty",value:o})]})}return null}function Go({dimensionId:n}){var c;const{timeRange:a}=Me(),l=xn(a),i=((c=I.useLazyLoadQuery(ut,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}).embedding.percentEmptyTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],r=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes}),{color:o}=mt();return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:i,margin:Xn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"percentEmptyColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:o,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),e(Ue,{...Tn,tickFormatter:d=>r(new Date(d))}),e(xe,{stroke:ie.colors.gray200,label:{value:"% Empty",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Ho,{})}),e(Ml,{type:"monotone",dataKey:"value",stroke:o,fillOpacity:1,fill:"url(#percentEmptyColorUv)"})]})})}const gt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionQuantilesStats_dimension",selections:[{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null}}();gt.hash="c306c8eafb1d34be464d3a658d5f94a7";function Uo(n){const a=I.useFragment(gt,n.dimension);return e("ul",{css:C`
865
+ `}}}();ut.hash="1e843d6c8dbe05b389b24188c6bdb394";const Bo=new Intl.NumberFormat([],{maximumFractionDigits:2}),mt=()=>{const{gray100:n}=Ne();return{color:n}};function Go({active:n,payload:a,label:l}){var i;const{color:t}=mt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Bo.format(r):"--";return s(He,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"% Empty",value:o})]})}return null}function Uo({dimensionId:n}){var c;const{timeRange:a}=Me(),l=xn(a),i=((c=I.useLazyLoadQuery(ut,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}).embedding.percentEmptyTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],r=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes}),{color:o}=mt();return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:i,margin:Xn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"percentEmptyColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:o,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),e(Ue,{...Tn,tickFormatter:d=>r(new Date(d))}),e(xe,{stroke:ie.colors.gray200,label:{value:"% Empty",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Go,{})}),e(Ml,{type:"monotone",dataKey:"value",stroke:o,fillOpacity:1,fill:"url(#percentEmptyColorUv)"})]})})}const gt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionQuantilesStats_dimension",selections:[{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null}}();gt.hash="c306c8eafb1d34be464d3a658d5f94a7";function Wo(n){const a=I.useFragment(gt,n.dimension);return e("ul",{css:C`
866
866
  display: flex;
867
867
  flex-direction: column;
868
868
  gap: var(--px-spacing-sm);
@@ -870,7 +870,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
870
870
  display: flex;
871
871
  flex-direction: column;
872
872
  align-items: flex-end;
873
- `,children:[e(K,{elementType:"h3",textSize:"xsmall",color:"text-700",children:l}),e(K,{textSize:"medium","data-raw":t,children:Aa(t)})]},l)})})}const pt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"granularity",variableName:"granularity"},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:"p99TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p99"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p75TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p75"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p50TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p50"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p25TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p25"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p01TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p01"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionQuantilesTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionQuantilesTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,d],storageKey:null}]},params:{cacheID:"0bb3d9faf9d7f0c2e27995120ae24e1c",id:null,metadata:{},name:"DimensionQuantilesTimeSeriesQuery",operationKind:"query",text:`query DimensionQuantilesTimeSeriesQuery(
873
+ `,children:[e(K,{elementType:"h3",textSize:"xsmall",color:"text-700",children:l}),e(K,{textSize:"medium","data-raw":t,children:Ea(t)})]},l)})})}const pt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"granularity",variableName:"granularity"},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:"p99TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p99"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p75TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p75"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p50TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p50"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p25TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p25"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p01TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p01"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionQuantilesTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionQuantilesTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,d],storageKey:null}]},params:{cacheID:"0bb3d9faf9d7f0c2e27995120ae24e1c",id:null,metadata:{},name:"DimensionQuantilesTimeSeriesQuery",operationKind:"query",text:`query DimensionQuantilesTimeSeriesQuery(
874
874
  $dimensionId: GlobalID!
875
875
  $timeRange: TimeRange!
876
876
  $granularity: Granularity!
@@ -912,14 +912,14 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
912
912
  }
913
913
  }
914
914
  }
915
- `}}}();pt.hash="134f0dad0e0ecc7863dfbb0f437d829b";const Wo=La("~s");var yt=(n=>(n.p99_p01="p99_p01",n.p75_p25="p75_p25",n.p50="p50",n))(yt||{});const Jo=new Intl.NumberFormat([],{maximumFractionDigits:2});function $n(n){return typeof n=="number"?Jo.format(n):"--"}const ft=()=>{const n=Ne();return{outerColor:n.gray500,innerColor:n.gray300,lineColor:n.default}};function Zo({active:n,payload:a,label:l}){const{outerColor:t,innerColor:i,lineColor:r}=ft();if(n&&a&&a.length){const o=a[0].payload;return s(Be,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"p99",value:$n(o.p99_p01[0])}),e(re,{color:i,name:"p75",value:$n(o.p75_p25[0])}),e(re,{color:r,name:"p50",value:$n(o.p50)}),e(re,{color:i,name:"p25",value:$n(o.p75_p25[1])}),e(re,{color:t,name:"p01",value:$n(o.p99_p01[1])})]})}return null}function Xo({dimensionId:n}){var L,T,F,D,M;const{timeRange:a}=Me(),l=xn(a),t=I.useLazyLoadQuery(pt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),i=((L=t.dimension.p99TimeSeries)==null?void 0:L.data.map(R=>R))||[],r=((T=t.dimension.p01TimeSeries)==null?void 0:T.data.map(R=>R))||[],o=((F=t.dimension.p75TimeSeries)==null?void 0:F.data.map(R=>R))||[],c=((D=t.dimension.p25TimeSeries)==null?void 0:D.data.map(R=>R))||[],d=((M=t.dimension.p50TimeSeries)==null?void 0:M.data.map(R=>R))||[],m=i.map((R,O)=>({timestamp:new Date(R.timestamp).valueOf(),p99_p01:[R.value,r[O].value],p75_p25:[o[O].value,c[O].value],p50:d[O].value})),y=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes}),[g,f]=u.useState(Object.keys(yt).reduce((R,O)=>(R[O]=!1,R),{})),p=R=>{g[R.dataKey]||f({...g})},b=()=>{f({...g})},S=R=>{f({...g,[String(R.dataKey)]:!g[R.dataKey]})},{outerColor:h,innerColor:v,lineColor:_}=ft();return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:m,margin:Xn,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"p99_p01ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:h,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:h,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:h,stopOpacity:.7})]}),s("linearGradient",{id:"p75_p25ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:v,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:v,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:v,stopOpacity:.7})]})]}),e(Ue,{...Tn,tickFormatter:R=>y(new Date(R))}),e(xe,{stroke:ie.colors.gray200,label:{value:"Value",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},tickFormatter:R=>Wo(R),style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Zo,{})}),e(Es,{onClick:S,onMouseOver:p,onMouseOut:b}),e(On,{type:"monotone",dataKey:"p99_p01",name:"p99 - p01",fillOpacity:1,fill:"url(#p99_p01ColorUV)",stroke:h,hide:g.p99_p01===!0}),e(On,{type:"monotone",dataKey:"p75_p25",name:"p75 - p25",fillOpacity:1,stroke:v,fill:"url(#p75_p25ColorUV)",hide:g.p75_p25===!0}),e(Ml,{type:"monotone",dataKey:"p50",stroke:_,hide:g.p50===!0})]})})}const ht=function(){var n={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},a=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionSegmentsBarChart_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[n,{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[n],type:"MissingValueBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:a,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:a,storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null}}();ht.hash="8cef9841e9a5bd7d0d50acb5db9028b0";const Yo=La(".2f"),kt=()=>{const{primary:n}=Ne();return{color:n}};function ed({active:n,payload:a,label:l}){var i;const{color:t}=kt();if(n&&a&&a.length){const r=(i=a[0])==null?void 0:i.value;return e(Be,{children:e(re,{color:t,shape:"square",name:l,value:r!=null?`${Yo(r)}%`:"--"})})}return null}function nd(n){const a=I.useFragment(ht,n.dimension),l=u.useMemo(()=>{var o,c,d;const i=((o=a.segmentsComparison)==null?void 0:o.segments)??[],r=((d=(c=a.segmentsComparison)==null?void 0:c.totalCounts)==null?void 0:d.primaryValue)??0;return i.map(m=>{var p;const y=((p=m.counts)==null?void 0:p.primaryValue)??0,g=Sl(m.bin),f=y/r*100;return{name:g,percent:f}})},[a]),{color:t}=kt();return e(Ge,{children:s(Qa,{data:l,margin:{top:25,right:18,left:18,bottom:5},children:[e("defs",{children:s("linearGradient",{id:"dimensionSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:t,stopOpacity:1}),e("stop",{offset:"95%",stopColor:t,stopOpacity:.5})]})}),e(Ue,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{stroke:ie.colors.gray200,label:{value:"% Volume",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{...Ea,content:e(ed,{})}),e(Fn,{dataKey:"percent",fill:"url(#dimensionSegmentsBarColor)",spacing:15})]})})}function sm(){const{dimensionId:n}=je(),{timeRange:a}=Me(),l=qn(),{referenceInferences:t}=Ie(),i=t!==null,r=i,o=l.dimension.shape!=="continuous",c=l.dimension.dataType==="numeric",d=le(),m=I.useLazyLoadQuery(Xl,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},hasReference:i});if(!n)throw new Error("Dimension ID is required to display a dimension");return e(bl,{initialTimestamp:new Date(a.end),children:e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>d(-1),children:e(j,{size:"L",title:l.dimension.name,children:e("main",{css:C`
915
+ `}}}();pt.hash="134f0dad0e0ecc7863dfbb0f437d829b";const Jo=La("~s");var yt=(n=>(n.p99_p01="p99_p01",n.p75_p25="p75_p25",n.p50="p50",n))(yt||{});const Zo=new Intl.NumberFormat([],{maximumFractionDigits:2});function $n(n){return typeof n=="number"?Zo.format(n):"--"}const ft=()=>{const n=Ne();return{outerColor:n.gray500,innerColor:n.gray300,lineColor:n.default}};function Xo({active:n,payload:a,label:l}){const{outerColor:t,innerColor:i,lineColor:r}=ft();if(n&&a&&a.length){const o=a[0].payload;return s(He,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${we(new Date(l))}`}),e(re,{color:t,name:"p99",value:$n(o.p99_p01[0])}),e(re,{color:i,name:"p75",value:$n(o.p75_p25[0])}),e(re,{color:r,name:"p50",value:$n(o.p50)}),e(re,{color:i,name:"p25",value:$n(o.p75_p25[1])}),e(re,{color:t,name:"p01",value:$n(o.p99_p01[1])})]})}return null}function Yo({dimensionId:n}){var L,T,F,D,M;const{timeRange:a}=Me(),l=xn(a),t=I.useLazyLoadQuery(pt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),i=((L=t.dimension.p99TimeSeries)==null?void 0:L.data.map(R=>R))||[],r=((T=t.dimension.p01TimeSeries)==null?void 0:T.data.map(R=>R))||[],o=((F=t.dimension.p75TimeSeries)==null?void 0:F.data.map(R=>R))||[],c=((D=t.dimension.p25TimeSeries)==null?void 0:D.data.map(R=>R))||[],d=((M=t.dimension.p50TimeSeries)==null?void 0:M.data.map(R=>R))||[],m=i.map((R,O)=>({timestamp:new Date(R.timestamp).valueOf(),p99_p01:[R.value,r[O].value],p75_p25:[o[O].value,c[O].value],p50:d[O].value})),y=Dn({samplingIntervalMinutes:l.samplingIntervalMinutes}),[g,f]=u.useState(Object.keys(yt).reduce((R,O)=>(R[O]=!1,R),{})),p=R=>{g[R.dataKey]||f({...g})},b=()=>{f({...g})},S=R=>{f({...g,[String(R.dataKey)]:!g[R.dataKey]})},{outerColor:h,innerColor:v,lineColor:_}=ft();return e(Ge,{width:"100%",height:"100%",children:s(Zn,{data:m,margin:Xn,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"p99_p01ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:h,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:h,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:h,stopOpacity:.7})]}),s("linearGradient",{id:"p75_p25ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:v,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:v,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:v,stopOpacity:.7})]})]}),e(Ue,{...Tn,tickFormatter:R=>y(new Date(R))}),e(xe,{stroke:ie.colors.gray200,label:{value:"Value",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},tickFormatter:R=>Jo(R),style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{content:e(Xo,{})}),e(ws,{onClick:S,onMouseOver:p,onMouseOut:b}),e(On,{type:"monotone",dataKey:"p99_p01",name:"p99 - p01",fillOpacity:1,fill:"url(#p99_p01ColorUV)",stroke:h,hide:g.p99_p01===!0}),e(On,{type:"monotone",dataKey:"p75_p25",name:"p75 - p25",fillOpacity:1,stroke:v,fill:"url(#p75_p25ColorUV)",hide:g.p75_p25===!0}),e(Ml,{type:"monotone",dataKey:"p50",stroke:_,hide:g.p50===!0})]})})}const ht=function(){var n={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},a=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionSegmentsBarChart_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[n,{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[n],type:"MissingValueBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:a,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:a,storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null}}();ht.hash="8cef9841e9a5bd7d0d50acb5db9028b0";const ed=La(".2f"),kt=()=>{const{primary:n}=Ne();return{color:n}};function nd({active:n,payload:a,label:l}){var i;const{color:t}=kt();if(n&&a&&a.length){const r=(i=a[0])==null?void 0:i.value;return e(He,{children:e(re,{color:t,shape:"square",name:l,value:r!=null?`${ed(r)}%`:"--"})})}return null}function ad(n){const a=I.useFragment(ht,n.dimension),l=u.useMemo(()=>{var o,c,d;const i=((o=a.segmentsComparison)==null?void 0:o.segments)??[],r=((d=(c=a.segmentsComparison)==null?void 0:c.totalCounts)==null?void 0:d.primaryValue)??0;return i.map(m=>{var p;const y=((p=m.counts)==null?void 0:p.primaryValue)??0,g=Sl(m.bin),f=y/r*100;return{name:g,percent:f}})},[a]),{color:t}=kt();return e(Ge,{children:s(Qa,{data:l,margin:{top:25,right:18,left:18,bottom:5},children:[e("defs",{children:s("linearGradient",{id:"dimensionSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:t,stopOpacity:1}),e("stop",{offset:"95%",stopColor:t,stopOpacity:.5})]})}),e(Ue,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(xe,{stroke:ie.colors.gray200,label:{value:"% Volume",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(We,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Je,{...Aa,content:e(nd,{})}),e(Fn,{dataKey:"percent",fill:"url(#dimensionSegmentsBarColor)",spacing:15})]})})}function gm(){const{dimensionId:n}=je(),{timeRange:a}=Me(),l=qn(),{referenceInferences:t}=Ie(),i=t!==null,r=i,o=l.dimension.shape!=="continuous",c=l.dimension.dataType==="numeric",d=le(),m=I.useLazyLoadQuery(Xl,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},hasReference:i});if(!n)throw new Error("Dimension ID is required to display a dimension");return e(bl,{initialTimestamp:new Date(a.end),children:e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>d(-1),children:e(j,{size:"L",title:l.dimension.name,children:e("main",{css:C`
916
916
  padding: var(--px-spacing-med);
917
917
  display: flex;
918
918
  flex-direction: column;
919
919
  min-height: 400px;
920
920
  overflow-y: auto;
921
921
  height: 100%;
922
- `,children:e(u.Suspense,{fallback:e(se,{}),children:s(k,{direction:"column",gap:"size-100",children:[e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(nd,{dimension:m.dimension})}),e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600","data-testid":"dimension-count-time-series-view",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(No,{dimensionId:n}),e(kn,{children:e(Ro,{dimension:m.dimension})})]})}),r?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",children:s(k,{direction:"column",alignItems:"stretch",children:[e(x,{width:"100%",height:"size-1600",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(jo,{dimensionId:n})}),e(kn,{children:e(Qo,{dimension:m.dimension})})]})}),e(x,{height:"size-1600",width:"100%",borderTopColor:"dark",borderTopWidth:"thin",children:e(u.Suspense,{fallback:e(se,{}),children:e($o,{dimensionId:n})})})]})}):null,c?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-3000",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(Xo,{dimensionId:n})}),e(kn,{children:e(Uo,{dimension:m.dimension})})]})}):null,o?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(wo,{dimensionId:n})}),e(kn,{children:e(_o,{dimension:m.dimension})})]})}):null,e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Go,{dimensionId:n}),e(kn,{children:e(qo,{dimension:m.dimension})})]})})]})})})})})})}const bt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"shape",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"03a9aafe3f08a9d093b029ff4a9e3253",id:null,metadata:{},name:"dimensionLoaderQuery",operationKind:"query",text:`query dimensionLoaderQuery(
922
+ `,children:e(u.Suspense,{fallback:e(se,{}),children:s(k,{direction:"column",gap:"size-100",children:[e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(ad,{dimension:m.dimension})}),e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600","data-testid":"dimension-count-time-series-view",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Vo,{dimensionId:n}),e(kn,{children:e(Po,{dimension:m.dimension})})]})}),r?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",children:s(k,{direction:"column",alignItems:"stretch",children:[e(x,{width:"100%",height:"size-1600",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(qo,{dimensionId:n})}),e(kn,{children:e(Oo,{dimension:m.dimension})})]})}),e(x,{height:"size-1600",width:"100%",borderTopColor:"dark",borderTopWidth:"thin",children:e(u.Suspense,{fallback:e(se,{}),children:e(zo,{dimensionId:n})})})]})}):null,c?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-3000",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(Yo,{dimensionId:n})}),e(kn,{children:e(Wo,{dimension:m.dimension})})]})}):null,o?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(Ro,{dimensionId:n})}),e(kn,{children:e(Eo,{dimension:m.dimension})})]})}):null,e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(k,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Uo,{dimensionId:n}),e(kn,{children:e(Ho,{dimension:m.dimension})})]})})]})})})})})})}const bt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"shape",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"03a9aafe3f08a9d093b029ff4a9e3253",id:null,metadata:{},name:"dimensionLoaderQuery",operationKind:"query",text:`query dimensionLoaderQuery(
923
923
  $id: GlobalID!
924
924
  ) {
925
925
  dimension: node(id: $id) {
@@ -934,7 +934,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
934
934
  id
935
935
  }
936
936
  }
937
- `}}}();bt.hash="5a662d77e69d2e9bb4eb2af4cad6b722";async function om(n){const{dimensionId:a}=n.params;return I.fetchQuery(Te,bt,{id:a}).toPromise()}const St=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"traceId"},l=[{kind:"Variable",name:"id",variableName:"id"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"traceId",variableName:"traceId"}],concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:[{kind:"Literal",name:"first",value:1e3}],concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},i,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:"spans(first:1000)"}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t],storageKey:null}]},params:{cacheID:"22103e9bb1f983529081ca93d60e76ef",id:null,metadata:{},name:"TraceDetailsQuery",operationKind:"query",text:`query TraceDetailsQuery(
937
+ `}}}();bt.hash="5a662d77e69d2e9bb4eb2af4cad6b722";async function pm(n){const{dimensionId:a}=n.params;return I.fetchQuery(Te,bt,{id:a}).toPromise()}const St=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"traceId"},l=[{kind:"Variable",name:"id",variableName:"id"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"traceId",variableName:"traceId"}],concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:[{kind:"Literal",name:"first",value:1e3}],concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},i,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:"spans(first:1000)"}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t],storageKey:null}]},params:{cacheID:"22103e9bb1f983529081ca93d60e76ef",id:null,metadata:{},name:"TraceDetailsQuery",operationKind:"query",text:`query TraceDetailsQuery(
938
938
  $traceId: ID!
939
939
  $id: GlobalID!
940
940
  ) {
@@ -1069,7 +1069,7 @@ fragment SpanFeedback_annotations on Span {
1069
1069
  overflow: hidden;
1070
1070
  text-overflow: ellipsis;
1071
1071
  }
1072
- `;function fe(n){const{name:a,metric:l,k:t,score:i}=n,r=typeof t=="number"?`${l}@${t}`:l,o=u.useMemo(()=>l==="hit"?i?"true":"false":typeof i=="number"&&Le(i)||"--",[i,l]);return s(Ce,{delay:500,offset:3,children:[e(Cn,{children:e("div",{css:as,children:s(k,{direction:"row",gap:"size-100",alignItems:"center",children:[e(ls,{color:"var(--ac-global-color-seafoam-1000)"}),a?e("div",{css:ka,children:e(K,{weight:"heavy",textSize:"small",color:"inherit",children:a})}):null,e("div",{css:ka,children:e(K,{textSize:"small",color:"inherit",children:r})}),e("div",{css:ka,children:e(K,{textSize:"small",children:o})})]})})}),e(Wn,{children:s(k,{direction:"row",gap:"size-100",children:[s(K,{weight:"heavy",color:"inherit",children:[a," ",r]}),e(K,{color:"inherit",children:o})]})})]})}const Ct=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"projectId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null},i=[{kind:"Variable",name:"id",variableName:"spanId"}],r={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null},o={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,r],storageKey:null}]},params:{cacheID:"4aa13fbe70360943615a8ff4d4b2a06f",id:null,metadata:{},name:"EditSpanAnnotationsDialogNewAnnotationQuery",operationKind:"query",text:`query EditSpanAnnotationsDialogNewAnnotationQuery(
1072
+ `;function fe(n){const{name:a,metric:l,k:t,score:i}=n,r=typeof t=="number"?`${l}@${t}`:l,o=u.useMemo(()=>l==="hit"?i?"true":"false":typeof i=="number"&&Le(i)||"--",[i,l]);return s(Ce,{delay:500,offset:3,children:[e(Cn,{children:e("div",{css:ls,children:s(k,{direction:"row",gap:"size-100",alignItems:"center",children:[e(ts,{color:"var(--ac-global-color-seafoam-1000)"}),a?e("div",{css:ka,children:e(K,{weight:"heavy",textSize:"small",color:"inherit",children:a})}):null,e("div",{css:ka,children:e(K,{textSize:"small",color:"inherit",children:r})}),e("div",{css:ka,children:e(K,{textSize:"small",children:o})})]})})}),e(Wn,{children:s(k,{direction:"row",gap:"size-100",children:[s(K,{weight:"heavy",color:"inherit",children:[a," ",r]}),e(K,{color:"inherit",children:o})]})})]})}const Ct=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"projectId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null},i=[{kind:"Variable",name:"id",variableName:"spanId"}],r={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null},o={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,r],storageKey:null}]},params:{cacheID:"4aa13fbe70360943615a8ff4d4b2a06f",id:null,metadata:{},name:"EditSpanAnnotationsDialogNewAnnotationQuery",operationKind:"query",text:`query EditSpanAnnotationsDialogNewAnnotationQuery(
1073
1073
  $projectId: GlobalID!
1074
1074
  $spanId: GlobalID!
1075
1075
  ) {
@@ -1199,7 +1199,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
1199
1199
  explanation
1200
1200
  }
1201
1201
  }
1202
- `}}}();Tt.hash="ded0a7a64a2706f6ec472a63c1c57eca";const ad=C`
1202
+ `}}}();Tt.hash="ded0a7a64a2706f6ec472a63c1c57eca";const ld=C`
1203
1203
  color: var(--ac-global-text-color-900);
1204
1204
  font-size: 12px;
1205
1205
  `;function It(n){const{initialData:a,isReadOnly:l,onSubmit:t,isSubmitting:i=!1}=n,{control:r,handleSubmit:o,formState:{isDirty:c,isValid:d},setError:m,reset:y}=qe({defaultValues:a,disabled:l}),g=u.useCallback(p=>{const b=!p.label,S=p.score===""||p.score==null;if(b&&S){m("label",{type:"manual",message:"Label or score is required"}),m("score",{type:"manual",message:"Label or score is required"});return}const h={...p,score:p.score!=null?parseFloat(p.score.toString()):null};t&&t(h),y(h)},[t,m,y]),f=l;return s(on,{onSubmit:o(g),children:[e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-100",children:[s("div",{css:C`
@@ -1214,7 +1214,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
1214
1214
  .ac-textfield {
1215
1215
  min-width: 0;
1216
1216
  }
1217
- `,children:[e(B,{name:"label",control:r,render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(ae,{label:"Label",placeholder:"e.x. good, bad",description:"A categorical label like 'good' or 'bad'",isReadOnly:l,errorMessage:v==null?void 0:v.message,validationState:h?"invalid":"valid",onChange:p,onBlur:b,value:(S==null?void 0:S.toString())||""})}),e(B,{name:"score",control:r,render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(ae,{label:"Score",type:"number",placeholder:"e.x. 0.8",description:"A numeric grade",errorMessage:v==null?void 0:v.message,isReadOnly:l,validationState:h?"invalid":"valid",onChange:p,onBlur:b,value:(S==null?void 0:S.toString())||""})})]}),s("details",{open:!f,css:ad,children:[e("summary",{children:"Annotation Details"}),e(x,{paddingTop:"size-50",children:e(B,{name:"explanation",control:r,render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(Jn,{label:"Explanation",height:70,isReadOnly:l,description:"Why this score or label was given",errorMessage:v==null?void 0:v.message,validationState:h?"invalid":"valid",onChange:p,onBlur:b,value:(S==null?void 0:S.toString())||""})})})]})]})}),e(W,{children:l?null:e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingEnd:"size-200",paddingStart:"size-200",borderTopWidth:"thin",borderColor:"dark",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:c?"primary":"default",type:"submit",size:"compact",disabled:!d||!c||i,children:i?"Saving...":"Save"})})})})]})}function ld(n){const{annotationName:a,spanNodeId:l,onCreated:t}=n,[i,r]=I.useMutation(Tt);return e(It,{initialData:{name:a},isSubmitting:r,onSubmit:c=>{i({variables:{input:{spanId:l,annotatorKind:"HUMAN",...c},spanId:l},onCompleted:()=>{t()}})}})}const Lt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"annotationId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{fields:[{items:[{kind:"Variable",name:"annotationIds.0",variableName:"annotationId"}],kind:"ListValue",name:"annotationIds"}],kind:"ObjectValue",name:"input"}],l=[{kind:"Variable",name:"id",variableName:"spanId"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"422687a283120080277d2649c1b9f6ee",id:null,metadata:{},name:"SpanAnnotationActionMenuDeleteMutation",operationKind:"mutation",text:`mutation SpanAnnotationActionMenuDeleteMutation(
1217
+ `,children:[e(H,{name:"label",control:r,render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(ae,{label:"Label",placeholder:"e.x. good, bad",description:"A categorical label like 'good' or 'bad'",isReadOnly:l,errorMessage:v==null?void 0:v.message,validationState:h?"invalid":"valid",onChange:p,onBlur:b,value:(S==null?void 0:S.toString())||""})}),e(H,{name:"score",control:r,render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(ae,{label:"Score",type:"number",placeholder:"e.x. 0.8",description:"A numeric grade",errorMessage:v==null?void 0:v.message,isReadOnly:l,validationState:h?"invalid":"valid",onChange:p,onBlur:b,value:(S==null?void 0:S.toString())||""})})]}),s("details",{open:!f,css:ld,children:[e("summary",{children:"Annotation Details"}),e(x,{paddingTop:"size-50",children:e(H,{name:"explanation",control:r,render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(Jn,{label:"Explanation",height:70,isReadOnly:l,description:"Why this score or label was given",errorMessage:v==null?void 0:v.message,validationState:h?"invalid":"valid",onChange:p,onBlur:b,value:(S==null?void 0:S.toString())||""})})})]})]})}),e(W,{children:l?null:e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingEnd:"size-200",paddingStart:"size-200",borderTopWidth:"thin",borderColor:"dark",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:c?"primary":"default",type:"submit",size:"compact",disabled:!d||!c||i,children:i?"Saving...":"Save"})})})})]})}function td(n){const{annotationName:a,spanNodeId:l,onCreated:t}=n,[i,r]=I.useMutation(Tt);return e(It,{initialData:{name:a},isSubmitting:r,onSubmit:c=>{i({variables:{input:{spanId:l,annotatorKind:"HUMAN",...c},spanId:l},onCompleted:()=>{t()}})}})}const Lt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"annotationId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{fields:[{items:[{kind:"Variable",name:"annotationIds.0",variableName:"annotationId"}],kind:"ListValue",name:"annotationIds"}],kind:"ObjectValue",name:"input"}],l=[{kind:"Variable",name:"id",variableName:"spanId"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"422687a283120080277d2649c1b9f6ee",id:null,metadata:{},name:"SpanAnnotationActionMenuDeleteMutation",operationKind:"mutation",text:`mutation SpanAnnotationActionMenuDeleteMutation(
1218
1218
  $annotationId: GlobalID!
1219
1219
  $spanId: GlobalID!
1220
1220
  ) {
@@ -1243,15 +1243,15 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
1243
1243
  explanation
1244
1244
  }
1245
1245
  }
1246
- `}}}();Lt.hash="a898fcb037b08cb626daaf3d385588ce";function td(n){const{onDelete:a,isDisabled:l=!1}=n;return e("div",{onClick:t=>{t.preventDefault(),t.stopPropagation()},children:e(He,{align:"end",buttonSize:"compact",isDisabled:l,onAction:t=>{switch(t){case"deleteAnnotation":a();break}},children:e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteAnnotation")})})}function id(n){const{annotationId:a,spanNodeId:l,annotationName:t,onSpanAnnotationActionSuccess:i,onSpanAnnotationActionError:r}=n,[o,c]=u.useState(null),[d,m]=I.useMutation(Lt),y=u.useCallback(()=>{u.startTransition(()=>{d({variables:{annotationId:a,spanId:l},onCompleted:()=>{i({title:"Annotation Deleted",message:`Annotation ${t} has been deleted.`})},onError:f=>{r(f)}})})},[d,a,l,i,t,r]),g=u.useCallback(()=>{c(s(j,{size:"S",title:"Delete Annotation",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete annotation ${t}? This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{y(),c(null)},children:"Delete Annotation"})})})]}))},[y,t]);return s("div",{children:[e(td,{onDelete:g,isDisabled:m}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>c(null),children:o})]})}function rd(n){const{projectId:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=pe();return e(j,{title:"Annotate",size:"M",isDismissable:!0,extra:e(sd,{projectId:a,spanNodeId:l,disabled:t!==null,onAnnotationNameSelect:i}),children:s("div",{css:C`
1246
+ `}}}();Lt.hash="a898fcb037b08cb626daaf3d385588ce";function id(n){const{onDelete:a,isDisabled:l=!1}=n;return e("div",{onClick:t=>{t.preventDefault(),t.stopPropagation()},children:e(Be,{align:"end",buttonSize:"compact",isDisabled:l,onAction:t=>{switch(t){case"deleteAnnotation":a();break}},children:e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteAnnotation")})})}function rd(n){const{annotationId:a,spanNodeId:l,annotationName:t,onSpanAnnotationActionSuccess:i,onSpanAnnotationActionError:r}=n,[o,c]=u.useState(null),[d,m]=I.useMutation(Lt),y=u.useCallback(()=>{u.startTransition(()=>{d({variables:{annotationId:a,spanId:l},onCompleted:()=>{i({title:"Annotation Deleted",message:`Annotation ${t} has been deleted.`})},onError:f=>{r(f)}})})},[d,a,l,i,t,r]),g=u.useCallback(()=>{c(s(j,{size:"S",title:"Delete Annotation",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete annotation ${t}? This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{y(),c(null)},children:"Delete Annotation"})})})]}))},[y,t]);return s("div",{children:[e(id,{onDelete:g,isDisabled:m}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>c(null),children:o})]})}function sd(n){const{projectId:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=pe();return e(j,{title:"Annotate",size:"M",isDismissable:!0,extra:e(od,{projectId:a,spanNodeId:l,disabled:t!==null,onAnnotationNameSelect:i}),children:s("div",{css:C`
1247
1247
  height: 100%;
1248
1248
  overflow-y: auto;
1249
1249
  padding: var(--ac-global-dimension-size-200);
1250
- `,children:[t&&e(x,{paddingBottom:"size-200",children:e(ud,{spanNodeId:l,name:t,onDelete:()=>{i(null)},onCreated:()=>{i(null),r({title:"New Span Annotation",message:`Annotation ${t} has been created.`})}})}),e(u.Suspense,{children:e(dd,{...n})})]})})}function sd(n){const{projectId:a,disabled:l=!1,spanNodeId:t,onAnnotationNameSelect:i}=n,[r,o]=u.useState(!1);return s(gn,{placement:"bottom end",crossOffset:300,isOpen:r,onOpenChange:c=>{o(c)},children:[e(V,{variant:"default",disabled:l,size:"compact",icon:e(w,{svg:e(E.PlusCircleOutline,{})}),onClick:()=>{o(!0)},children:"New"}),e(od,{projectId:a,spanNodeId:t,onAnnotationNameSelect:c=>{i(c),o(!1)}})]})}function od(n){const{projectId:a,spanNodeId:l,onAnnotationNameSelect:t}=n;return e(Q,{title:"New Annotation",backgroundColor:"light",borderColor:"light",variant:"compact",bodyStyle:{padding:0},children:e(u.Suspense,{children:e(gd,{projectId:a,spanId:l,onAnnotationNameSelect:t})})})}function dd(n){const a=I.useLazyLoadQuery(Dt,{spanId:n.spanNodeId},{fetchPolicy:"store-and-network"});return e(cd,{span:a.span})}function cd(n){const{span:a}=n,[l]=I.useRefetchableFragment(xt,a),t=l.spanAnnotations||[],i=t.length>0;return s("div",{children:[!i&&e(hl,{graphicKey:"documents",message:"No annotations for this span"}),e("ul",{css:C`
1250
+ `,children:[t&&e(x,{paddingBottom:"size-200",children:e(md,{spanNodeId:l,name:t,onDelete:()=>{i(null)},onCreated:()=>{i(null),r({title:"New Span Annotation",message:`Annotation ${t} has been created.`})}})}),e(u.Suspense,{children:e(cd,{...n})})]})})}function od(n){const{projectId:a,disabled:l=!1,spanNodeId:t,onAnnotationNameSelect:i}=n,[r,o]=u.useState(!1);return s(gn,{placement:"bottom end",crossOffset:300,isOpen:r,onOpenChange:c=>{o(c)},children:[e(V,{variant:"default",disabled:l,size:"compact",icon:e(w,{svg:e(A.PlusCircleOutline,{})}),onClick:()=>{o(!0)},children:"New"}),e(dd,{projectId:a,spanNodeId:t,onAnnotationNameSelect:c=>{i(c),o(!1)}})]})}function dd(n){const{projectId:a,spanNodeId:l,onAnnotationNameSelect:t}=n;return e(Q,{title:"New Annotation",backgroundColor:"light",borderColor:"light",variant:"compact",bodyStyle:{padding:0},children:e(u.Suspense,{children:e(pd,{projectId:a,spanId:l,onAnnotationNameSelect:t})})})}function cd(n){const a=I.useLazyLoadQuery(Dt,{spanId:n.spanNodeId},{fetchPolicy:"store-and-network"});return e(ud,{span:a.span})}function ud(n){const{span:a}=n,[l]=I.useRefetchableFragment(xt,a),t=l.spanAnnotations||[],i=t.length>0;return s("div",{children:[!i&&e(hl,{graphicKey:"documents",message:"No annotations for this span"}),e("ul",{css:C`
1251
1251
  display: flex;
1252
1252
  flex-direction: column;
1253
1253
  gap: var(--ac-global-dimension-size-200);
1254
- `,children:t.map((r,o)=>e("li",{children:e(md,{annotation:r,spanNodeId:l.id})},`${o}_${r.name}`))})]})}function ud(n){const{spanNodeId:a,name:l,onDelete:t,onCreated:i}=n;return s(Q,{variant:"compact",title:l,borderColor:"orange-900",extra:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(_t,{kind:"HUMAN"}),e(V,{variant:"default",size:"compact",isDisabled:!0,"aria-label":"delete annotation",icon:e(w,{svg:e(E.CloseOutline,{})}),onClick:t})]}),bodyStyle:{padding:0},children:[e(Y,{variant:"info",banner:!0,children:"Fill out the fields below and click save to create a new annotation."}),e(ld,{annotationName:l,spanNodeId:a,onCreated:i})]})}function md(n){const{annotation:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=pe(),[o,c]=I.useMutation(Ft),d=u.useCallback(m=>{u.startTransition(()=>{o({variables:{annotationId:a.id,spanId:l,...m},onCompleted:()=>{r({title:"Annotation Updated",message:`Annotation ${a.name} has been updated.`})},onError:y=>{i(y)}})})},[a.id,a.name,o,r,l]);return s(Q,{variant:"compact",title:a.name,titleExtra:a.label||typeof a.score=="number"&&Le(a.score)||null,collapsible:!0,bodyStyle:{padding:0},extra:s(k,{gap:"size-100",alignItems:"center",children:[e(_t,{kind:a.annotatorKind}),e(id,{annotationId:a.id,spanNodeId:l,annotationName:a.name,onSpanAnnotationActionSuccess:m=>{r(m)},onSpanAnnotationActionError:m=>{i(m)}})]}),children:[t&&e(Y,{variant:"danger",banner:!0,children:t.message}),e(It,{initialData:a,isReadOnly:a.annotatorKind==="LLM",isSubmitting:c,onSubmit:m=>{d(m)}})]})}function _t(n){const{kind:a}=n;return e(zn,{color:a==="HUMAN"?"blue-900":"orange-900",children:a})}function gd(n){const{projectId:a,spanId:l,onAnnotationNameSelect:t}=n,i=I.useLazyLoadQuery(Ct,{projectId:a,spanId:l}),[r,o]=u.useState(""),c=u.useMemo(()=>{var y,g;return((g=(y=i==null?void 0:i.span)==null?void 0:y.spanAnnotations)==null?void 0:g.map(f=>f.name))||[]},[i.span.spanAnnotations]),d=u.useMemo(()=>(i.project.spanAnnotationNames||[]).filter(g=>!c.includes(g)),[i.project.spanAnnotationNames,c]),m=d.length>0;return s(W,{children:[e(x,{padding:"size-200",children:s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Annotation Name",value:r,placeholder:"e.x. correctness",onChange:y=>{o(y)}}),e(V,{variant:"primary",onClick:()=>{t(r)},children:"Create"})]})}),m&&s(W,{children:[e(x,{borderTopWidth:"thin",borderBottomWidth:"thin",borderColor:"light",paddingStart:"size-200",paddingTop:"size-100",paddingBottom:"size-100",backgroundColor:"grey-300",children:e("label",{children:"select from existing"})}),e(Un,{selectionMode:"single",onSelectionChange:y=>{if(y==="all"||y.size===0)return;const f=y.values().next().value;o(f||"")},disabledKeys:c,children:d.map(y=>e(G,{children:y},y))})]})]})}function pd(n){const{spanNodeId:a,projectId:l}=n,[t,i]=u.useState(null);return s(W,{children:[e(V,{variant:"default",icon:e(w,{svg:e(E.EditOutline,{})}),onClick:()=>i(e(rd,{spanNodeId:a,projectId:l})),children:"Annotate"}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const At=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"878027b90513af8f947e6aa408450057",id:null,metadata:{},name:"SpanAsideSpanQuery",operationKind:"query",text:`query SpanAsideSpanQuery(
1254
+ `,children:t.map((r,o)=>e("li",{children:e(gd,{annotation:r,spanNodeId:l.id})},`${o}_${r.name}`))})]})}function md(n){const{spanNodeId:a,name:l,onDelete:t,onCreated:i}=n;return s(Q,{variant:"compact",title:l,borderColor:"orange-900",extra:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(_t,{kind:"HUMAN"}),e(V,{variant:"default",size:"compact",isDisabled:!0,"aria-label":"delete annotation",icon:e(w,{svg:e(A.CloseOutline,{})}),onClick:t})]}),bodyStyle:{padding:0},children:[e(Y,{variant:"info",banner:!0,children:"Fill out the fields below and click save to create a new annotation."}),e(td,{annotationName:l,spanNodeId:a,onCreated:i})]})}function gd(n){const{annotation:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=pe(),[o,c]=I.useMutation(Ft),d=u.useCallback(m=>{u.startTransition(()=>{o({variables:{annotationId:a.id,spanId:l,...m},onCompleted:()=>{r({title:"Annotation Updated",message:`Annotation ${a.name} has been updated.`})},onError:y=>{i(y)}})})},[a.id,a.name,o,r,l]);return s(Q,{variant:"compact",title:a.name,titleExtra:a.label||typeof a.score=="number"&&Le(a.score)||null,collapsible:!0,bodyStyle:{padding:0},extra:s(k,{gap:"size-100",alignItems:"center",children:[e(_t,{kind:a.annotatorKind}),e(rd,{annotationId:a.id,spanNodeId:l,annotationName:a.name,onSpanAnnotationActionSuccess:m=>{r(m)},onSpanAnnotationActionError:m=>{i(m)}})]}),children:[t&&e(Y,{variant:"danger",banner:!0,children:t.message}),e(It,{initialData:a,isReadOnly:a.annotatorKind==="LLM",isSubmitting:c,onSubmit:m=>{d(m)}})]})}function _t(n){const{kind:a}=n;return e(zn,{color:a==="HUMAN"?"blue-900":"orange-900",children:a})}function pd(n){const{projectId:a,spanId:l,onAnnotationNameSelect:t}=n,i=I.useLazyLoadQuery(Ct,{projectId:a,spanId:l}),[r,o]=u.useState(""),c=u.useMemo(()=>{var y,g;return((g=(y=i==null?void 0:i.span)==null?void 0:y.spanAnnotations)==null?void 0:g.map(f=>f.name))||[]},[i.span.spanAnnotations]),d=u.useMemo(()=>(i.project.spanAnnotationNames||[]).filter(g=>!c.includes(g)),[i.project.spanAnnotationNames,c]),m=d.length>0;return s(W,{children:[e(x,{padding:"size-200",children:s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Annotation Name",value:r,placeholder:"e.x. correctness",onChange:y=>{o(y)}}),e(V,{variant:"primary",onClick:()=>{t(r)},children:"Create"})]})}),m&&s(W,{children:[e(x,{borderTopWidth:"thin",borderBottomWidth:"thin",borderColor:"light",paddingStart:"size-200",paddingTop:"size-100",paddingBottom:"size-100",backgroundColor:"grey-300",children:e("label",{children:"select from existing"})}),e(Un,{selectionMode:"single",onSelectionChange:y=>{if(y==="all"||y.size===0)return;const f=y.values().next().value;o(f||"")},disabledKeys:c,children:d.map(y=>e(G,{children:y},y))})]})]})}function yd(n){const{spanNodeId:a,projectId:l}=n,[t,i]=u.useState(null);return s(W,{children:[e(V,{variant:"default",icon:e(w,{svg:e(A.EditOutline,{})}),onClick:()=>i(e(sd,{spanNodeId:a,projectId:l})),children:"Annotate"}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const Et=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"878027b90513af8f947e6aa408450057",id:null,metadata:{},name:"SpanAsideSpanQuery",operationKind:"query",text:`query SpanAsideSpanQuery(
1255
1255
  $id: GlobalID!
1256
1256
  ) {
1257
1257
  node(id: $id) {
@@ -1278,22 +1278,61 @@ fragment SpanAside_span on Span {
1278
1278
  score
1279
1279
  }
1280
1280
  }
1281
- `}}}();At.hash="cb5cab60889623d77ad0c96c98b3f8ac";const Et=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:At,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpanAside_span",selections:[n,{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}}();Et.hash="cb5cab60889623d77ad0c96c98b3f8ac";const yd=C`
1281
+ `}}}();Et.hash="cb5cab60889623d77ad0c96c98b3f8ac";const At=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Et,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpanAside_span",selections:[n,{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}}();At.hash="cb5cab60889623d77ad0c96c98b3f8ac";const fd=C`
1282
1282
  display: flex;
1283
1283
  padding-top: var(--ac-global-dimension-size-50);
1284
1284
  flex-direction: column;
1285
1285
  gap: var(--ac-global-dimension-size-100);
1286
1286
  align-items: flex-start;
1287
- `;function fd(n){const[a]=I.useRefetchableFragment(Et,n.span),{startTime:l,endTime:t,code:i,tokenCountCompletion:r,tokenCountPrompt:o,tokenCountTotal:c}=a,d=u.useMemo(()=>new Date(l),[l]),m=u.useMemo(()=>t?new Date(t):null,[t]),y=u.useMemo(()=>m?m.getTime()-d.getTime():null,[m,d]),g=vl(i),f=a.spanAnnotations,p=f.length>0;return e(x,{padding:"size-200",borderColor:"dark",backgroundColor:"dark",borderLeftWidth:"thin",width:"230px",flex:"none",minHeight:"100%",children:s(k,{direction:"column",gap:"size-200",children:[e(hn,{label:"Status",children:s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(sa,{statusCode:i}),e(K,{textSize:"xlarge",color:g,children:i})]})}),e(hn,{label:"Start Time",children:e(K,{textSize:"xlarge",children:we(d)})}),m&&e(hn,{label:"End Time",children:e(K,{textSize:"xlarge",children:we(m)})}),e(hn,{label:"Latency",children:e(K,{textSize:"xlarge",children:typeof y=="number"?e(Ke,{latencyMs:y,textSize:"xlarge"}):"--"})}),c?e(hn,{label:"Total Tokens",children:e(wa,{tokenCountTotal:c,tokenCountPrompt:o??0,tokenCountCompletion:r??0,textSize:"xlarge"})},"tokens"):null,p&&e(hn,{label:"Feedback",children:e("ul",{css:yd,children:f.map(b=>e("li",{children:e(un,{annotation:b,annotationDisplayPreference:"label"})},b.id))})})]})})}function hn({label:n,children:a}){return s(k,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),a]})}function hd(n){const{spanId:a,traceId:l}=n;return e("div",{css:C`
1287
+ `;function hd(n){const[a]=I.useRefetchableFragment(At,n.span),{startTime:l,endTime:t,code:i,tokenCountCompletion:r,tokenCountPrompt:o,tokenCountTotal:c}=a,d=u.useMemo(()=>new Date(l),[l]),m=u.useMemo(()=>t?new Date(t):null,[t]),y=u.useMemo(()=>m?m.getTime()-d.getTime():null,[m,d]),g=vl(i),f=a.spanAnnotations,p=f.length>0;return e(x,{padding:"size-200",borderColor:"dark",backgroundColor:"dark",borderLeftWidth:"thin",width:"230px",flex:"none",minHeight:"100%",children:s(k,{direction:"column",gap:"size-200",children:[e(hn,{label:"Status",children:s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(sa,{statusCode:i}),e(K,{textSize:"xlarge",color:g,children:i})]})}),e(hn,{label:"Start Time",children:e(K,{textSize:"xlarge",children:we(d)})}),m&&e(hn,{label:"End Time",children:e(K,{textSize:"xlarge",children:we(m)})}),e(hn,{label:"Latency",children:e(K,{textSize:"xlarge",children:typeof y=="number"?e(Ke,{latencyMs:y,textSize:"xlarge"}):"--"})}),c?e(hn,{label:"Total Tokens",children:e(wa,{tokenCountTotal:c,tokenCountPrompt:o??0,tokenCountCompletion:r??0,textSize:"xlarge"})},"tokens"):null,p&&e(hn,{label:"Feedback",children:e("ul",{css:fd,children:f.map(b=>e("li",{children:e(un,{annotation:b,annotationDisplayPreference:"label"})},b.id))})})]})})}function hn({label:n,children:a}){return s(k,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),a]})}function kd(n){const{spanId:a,traceId:l}=n;return e("div",{css:C`
1288
1288
  button.ac-dropdown-button {
1289
1289
  min-width: 50px;
1290
1290
  .ac-dropdown-button__text {
1291
1291
  padding-right: 10px;
1292
1292
  }
1293
1293
  }
1294
- `,children:s(gn,{placement:"bottom right",children:[e(Rl,{addonBefore:e(w,{svg:e(E.Code,{})}),children:"Code"}),e(Va,{children:e(x,{padding:"size-200",children:s(on,{children:[s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Span ID",isReadOnly:!0,value:a}),e(X,{text:a,size:"normal"})]}),s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Trace ID",isReadOnly:!0,value:l}),e(X,{text:l,size:"normal"})]})]})})})]})})}const wt={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanFeedback_annotations",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null};wt.hash="6199ecd4f0143cffbaa2fe5e19a8739c";function kd(){const[n,a]=u.useState(null);return s(x,{padding:"size-200",children:[s(k,{direction:"column",gap:"size-100",alignItems:"center",children:[e(ca,{graphicKey:"documents"}),e(K,{children:"No annotations for this span"}),e(V,{variant:"default",size:"compact",onClick:()=>{a(e(j,{title:"Span Annotations",isDismissable:!0,children:s(x,{padding:"size-200",children:[e("p",{css:C`
1294
+ `,children:s(gn,{placement:"bottom right",children:[e(Rl,{addonBefore:e(w,{svg:e(A.Code,{})}),children:"Code"}),e(Va,{children:e(x,{padding:"size-200",children:s(on,{children:[s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Span ID",isReadOnly:!0,value:a}),e(X,{text:a,size:"normal"})]}),s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Trace ID",isReadOnly:!0,value:l}),e(X,{text:l,size:"normal"})]})]})})})]})})}const wt={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanFeedback_annotations",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null};wt.hash="6199ecd4f0143cffbaa2fe5e19a8739c";function bd(){const[n,a]=u.useState(null);return s(x,{padding:"size-200",children:[s(k,{direction:"column",gap:"size-100",alignItems:"center",children:[e(ca,{graphicKey:"documents"}),e(K,{children:"No annotations for this span"}),e(V,{variant:"default",size:"compact",onClick:()=>{a(e(j,{title:"Span Annotations",isDismissable:!0,children:s(x,{padding:"size-200",children:[e("p",{css:C`
1295
1295
  margin: 0 0 var(--ac-global-dimension-size-100) 0;
1296
- `,children:"Annotations are pivotal for tracking and improving the performance of your application. Phoenix allows for both LLM and HUMAN annotations."}),e(rn,{href:"https://docs.arize.com/phoenix/tracing/concepts-tracing/how-to-evaluate-traces",children:"View annotation documentation"})]})}))},icon:e(w,{svg:e(E.Edit2Outline,{})}),children:"How to Annotate"})]}),e(J,{onDismiss:()=>a(null),isDismissable:!0,children:n})]})}const bd=[{header:"name",accessorKey:"name",size:100},{header:"label",accessorKey:"label",size:100},{header:"score",accessorKey:"score",size:100},{header:"explanation",accessorKey:"explanation",cell:ts,size:400}];function Za({annotations:n}){const a=u.useMemo(()=>[...n],[n]),l=me({columns:bd,data:a,getCoreRowModel:ge()}),i=l.getRowModel().rows.length===0;return s("table",{css:cn,children:[e("thead",{children:l.getHeaderGroups().map(r=>e("tr",{children:r.headers.map(o=>e("th",{colSpan:o.colSpan,children:o.isPlaceholder?null:e(W,{children:U(o.column.columnDef.header,o.getContext())})},o.id))},r.id))}),i?e(mn,{}):e("tbody",{children:l.getRowModel().rows.map(r=>e("tr",{children:r.getVisibleCells().map(o=>e("td",{style:{width:o.column.getSize()},children:U(o.column.columnDef.cell,o.getContext())},o.id))},r.id))})]})}function Sd({span:n}){const a=I.useFragment(wt,n),l=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="HUMAN"),[a.spanAnnotations]),t=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="LLM"),[a.spanAnnotations]);return a.spanAnnotations.length>0?s(nn,{children:[e(ue,{id:"evaluations",title:"Evaluations",children:e(Za,{annotations:t})}),e(ue,{id:"human",title:"Human Annotations",children:e(Za,{annotations:l})})]}):e(kd,{})}const Rt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addExamplesToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a},params:{cacheID:"d93c9d47668fc266ba09ecb14c2b72ae",id:null,metadata:{},name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",operationKind:"mutation",text:`mutation SpanToDatasetExampleDialogAddExampleToDatasetMutation(
1296
+ `,children:"Annotations are pivotal for tracking and improving the performance of your application. Phoenix allows for both LLM and HUMAN annotations."}),e(rn,{href:"https://docs.arize.com/phoenix/tracing/concepts-tracing/how-to-evaluate-traces",children:"View annotation documentation"})]})}))},icon:e(w,{svg:e(A.Edit2Outline,{})}),children:"How to Annotate"})]}),e(J,{onDismiss:()=>a(null),isDismissable:!0,children:n})]})}const Sd=[{header:"name",accessorKey:"name",size:100},{header:"label",accessorKey:"label",size:100},{header:"score",accessorKey:"score",size:100},{header:"explanation",accessorKey:"explanation",cell:is,size:400}];function Za({annotations:n}){const a=u.useMemo(()=>[...n],[n]),l=me({columns:Sd,data:a,getCoreRowModel:ge()}),i=l.getRowModel().rows.length===0;return s("table",{css:cn,children:[e("thead",{children:l.getHeaderGroups().map(r=>e("tr",{children:r.headers.map(o=>e("th",{colSpan:o.colSpan,children:o.isPlaceholder?null:e(W,{children:U(o.column.columnDef.header,o.getContext())})},o.id))},r.id))}),i?e(mn,{}):e("tbody",{children:l.getRowModel().rows.map(r=>e("tr",{children:r.getVisibleCells().map(o=>e("td",{style:{width:o.column.getSize()},children:U(o.column.columnDef.cell,o.getContext())},o.id))},r.id))})]})}function vd({span:n}){const a=I.useFragment(wt,n),l=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="HUMAN"),[a.spanAnnotations]),t=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="LLM"),[a.spanAnnotations]);return a.spanAnnotations.length>0?s(nn,{children:[e(ue,{id:"evaluations",title:"Evaluations",children:e(Za,{annotations:t})}),e(ue,{id:"human",title:"Human Annotations",children:e(Za,{annotations:l})})]}):e(bd,{})}function Cd(n){return n==="__REDACTED__"}const Fd=C`
1297
+ position: relative;
1298
+ overflow: hidden;
1299
+ width: 400px;
1300
+ height: 200px;
1301
+ border-radius: var(--ac-global-rounding-small);
1302
+ border: 1px solid var(--ac-global-color-grey-500);
1303
+ background-color: var(--ac-global-color-grey-200);
1304
+ overflow: hidden;
1305
+ display: flex;
1306
+ flex-direction: column;
1307
+ justify-content: center;
1308
+ align-items: center;
1309
+ transition:
1310
+ width 0.1s ease-in-out,
1311
+ height 0.1s ease-in-out opacity 0.1s ease-in-out;
1312
+ button {
1313
+ position: absolute;
1314
+ right: var(--ac-global-dimension-size-100);
1315
+ top: var(--ac-global-dimension-size-100);
1316
+ z-index: 1;
1317
+ opacity: 0;
1318
+ }
1319
+ &:hover button {
1320
+ opacity: 1;
1321
+ }
1322
+ img {
1323
+ width: inherit;
1324
+ height: inherit;
1325
+ object-fit: contain;
1326
+ }
1327
+
1328
+ &.is-expanded {
1329
+ width: 100%;
1330
+ height: 100%;
1331
+ img {
1332
+ object-fit: cover;
1333
+ }
1334
+ }
1335
+ `;function Kd(n){const[a,l]=u.useState(!1);let t;const i=Cd(n.url);return i?t=e(xd,{}):t=e("img",{src:n.url}),s("div",{className:Fr({"is-expanded":a}),css:Fd,children:[!i&&e(V,{variant:"default",size:"compact",onClick:()=>l(!a),icon:e(w,{svg:a?e(A.CollapseOutline,{}):e(A.ExpandOutline,{})}),"aria-label":"Expand / Collapse Image"}),t]})}const xd=()=>s("svg",{width:"130",height:"130",viewBox:"0 0 130 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{x:"1.5",y:"1.5",width:"127",height:"127",rx:"6.5",strokeOpacity:"0.8",strokeWidth:"3"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 27.5H90C96.8917 27.5 102.5 33.1083 102.5 40V90C102.5 96.8917 96.8917 102.5 90 102.5H40C33.1083 102.5 27.5 96.8917 27.5 90V40C27.5 33.1083 33.1083 27.5 40 27.5ZM40 35.8333H90C92.3 35.8333 94.1667 37.7 94.1667 40V74.85L80.8208 63.4667C76.6958 59.9583 70.2417 59.9583 66.1542 63.4417L35.8333 88.7417V40C35.8333 37.7 37.7 35.8333 40 35.8333ZM54.5833 50.4167C54.5833 53.8667 51.7833 56.6667 48.3333 56.6667C44.8833 56.6667 42.0833 53.8667 42.0833 50.4167C42.0833 46.9667 44.8833 44.1667 48.3333 44.1667C51.7833 44.1667 54.5833 46.9667 54.5833 50.4167ZM42.3375 94.1667H90C92.3 94.1667 94.1667 92.3 94.1667 90V85.8083L75.4125 69.8083C74.4083 68.9458 72.55 68.9417 71.525 69.8125L42.3375 94.1667Z",fill:"var(--ac-global-color-grey-300)"})]}),Rt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addExamplesToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a},params:{cacheID:"d93c9d47668fc266ba09ecb14c2b72ae",id:null,metadata:{},name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",operationKind:"mutation",text:`mutation SpanToDatasetExampleDialogAddExampleToDatasetMutation(
1297
1336
  $input: AddExamplesToDatasetInput!
1298
1337
  ) {
1299
1338
  addExamplesToDataset(input: $input) {
@@ -1344,7 +1383,7 @@ fragment DatasetPicker__datasets on Query {
1344
1383
  }
1345
1384
  }
1346
1385
  }
1347
- `}};Mt.hash="03d88d1706089bb63edcd44d04563cbc";const Nt={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Mt}},name:"DatasetPicker__datasets",selections:[{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Nt.hash="03d88d1706089bb63edcd44d04563cbc";function vd(n){const[a,l]=I.useRefetchableFragment(Nt,n.query);return s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Ll,{label:"dataset","data-testid":"dataset-picker",className:"dataset-picker",width:"100%","aria-label":"The dataset to add the example to",onSelectionChange:n.onSelectionChange,placeholder:"Select a dataset",onBlur:n.onBlur,isRequired:!0,validationState:n.validationState,errorMessage:n.errorMessage,children:a.datasets.edges.map(({dataset:t})=>e(G,{children:t.name},t.id))}),e(Cd,{onDatasetCreated:()=>{u.startTransition(()=>{l({},{fetchPolicy:"store-and-network"})})}})]})}function Cd({onDatasetCreated:n}){const[a,l]=u.useState(null),[t,i]=u.useState(!1),r=pe();return s(gn,{placement:"bottom right",isOpen:t,onOpenChange:o=>{l(null),i(o)},children:[e(V,{variant:"default",icon:e(w,{svg:e(E.PlusCircleOutline,{})}),"aria-label":"Create a new dataset"}),e(Q,{title:"Create New Dataset",bodyStyle:{padding:0},variant:"compact",borderColor:"light",backgroundColor:"light",children:s(x,{width:"500px",children:[a?e(Y,{variant:"danger",children:a}):null,e(Ra,{onDatasetCreateError:o=>l(o.message),onDatasetCreated:({id:o,name:c})=>{l(null),i(!1),r({title:"Dataset Created",message:`Dataset "${c}" created successfully`}),n(o)}})]})})]})}const ba={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Fd({spanId:n,onCompleted:a}){const[l,t]=u.useState(null),i=I.useLazyLoadQuery(Pt,{spanId:n},{fetchPolicy:"store-and-network"}),{span:{revision:r}}=i,[o,c]=I.useMutation(Rt),{control:d,setError:m,handleSubmit:y,formState:{isValid:g}}=qe({defaultValues:{input:JSON.stringify(r==null?void 0:r.input,null,2),output:JSON.stringify(r==null?void 0:r.output,null,2),metadata:JSON.stringify(r==null?void 0:r.metadata,null,2),datasetId:""}}),f=u.useCallback(p=>{if(t(null),!Ae(p==null?void 0:p.input))return m("input",{message:"Input must be a valid JSON object"});if(!Ae(p==null?void 0:p.output))return m("output",{message:"Output must be a valid JSON object"});if(!Ae(p==null?void 0:p.metadata))return m("metadata",{message:"Metadata must be a valid JSON object"});if(!(p!=null&&p.datasetId))return m("datasetId",{message:"Dataset is required"});o({variables:{input:{datasetId:p.datasetId,examples:[{input:JSON.parse(p.input),output:JSON.parse(p.output),metadata:JSON.parse(p.metadata),spanId:n}]}},onCompleted:()=>{a(p.datasetId)},onError:b=>{t(b.message)}})},[o,m,n,a]);return e(j,{size:"fullscreen",title:"Add Example to Dataset",extra:e(V,{variant:"primary",size:"compact",disabled:!g||c,loading:c,onClick:y(f),icon:e(w,{svg:e(E.PlusCircleOutline,{})}),children:"Add Example"}),children:e("div",{css:C`
1386
+ `}};Mt.hash="03d88d1706089bb63edcd44d04563cbc";const Nt={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Mt}},name:"DatasetPicker__datasets",selections:[{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Nt.hash="03d88d1706089bb63edcd44d04563cbc";function Dd(n){const[a,l]=I.useRefetchableFragment(Nt,n.query);return s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Ll,{label:"dataset","data-testid":"dataset-picker",className:"dataset-picker",width:"100%","aria-label":"The dataset to add the example to",onSelectionChange:n.onSelectionChange,placeholder:"Select a dataset",onBlur:n.onBlur,isRequired:!0,validationState:n.validationState,errorMessage:n.errorMessage,children:a.datasets.edges.map(({dataset:t})=>e(G,{children:t.name},t.id))}),e(Td,{onDatasetCreated:()=>{u.startTransition(()=>{l({},{fetchPolicy:"store-and-network"})})}})]})}function Td({onDatasetCreated:n}){const[a,l]=u.useState(null),[t,i]=u.useState(!1),r=pe();return s(gn,{placement:"bottom right",isOpen:t,onOpenChange:o=>{l(null),i(o)},children:[e(V,{variant:"default",icon:e(w,{svg:e(A.PlusCircleOutline,{})}),"aria-label":"Create a new dataset"}),e(Q,{title:"Create New Dataset",bodyStyle:{padding:0},variant:"compact",borderColor:"light",backgroundColor:"light",children:s(x,{width:"500px",children:[a?e(Y,{variant:"danger",children:a}):null,e(Ra,{onDatasetCreateError:o=>l(o.message),onDatasetCreated:({id:o,name:c})=>{l(null),i(!1),r({title:"Dataset Created",message:`Dataset "${c}" created successfully`}),n(o)}})]})})]})}const ba={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Id({spanId:n,onCompleted:a}){const[l,t]=u.useState(null),i=I.useLazyLoadQuery(Pt,{spanId:n},{fetchPolicy:"store-and-network"}),{span:{revision:r}}=i,[o,c]=I.useMutation(Rt),{control:d,setError:m,handleSubmit:y,formState:{isValid:g}}=qe({defaultValues:{input:JSON.stringify(r==null?void 0:r.input,null,2),output:JSON.stringify(r==null?void 0:r.output,null,2),metadata:JSON.stringify(r==null?void 0:r.metadata,null,2),datasetId:""}}),f=u.useCallback(p=>{if(t(null),!Ee(p==null?void 0:p.input))return m("input",{message:"Input must be a valid JSON object"});if(!Ee(p==null?void 0:p.output))return m("output",{message:"Output must be a valid JSON object"});if(!Ee(p==null?void 0:p.metadata))return m("metadata",{message:"Metadata must be a valid JSON object"});if(!(p!=null&&p.datasetId))return m("datasetId",{message:"Dataset is required"});o({variables:{input:{datasetId:p.datasetId,examples:[{input:JSON.parse(p.input),output:JSON.parse(p.output),metadata:JSON.parse(p.metadata),spanId:n}]}},onCompleted:()=>{a(p.datasetId)},onError:b=>{t(b.message)}})},[o,m,n,a]);return e(j,{size:"fullscreen",title:"Add Example to Dataset",extra:e(V,{variant:"primary",size:"compact",disabled:!g||c,loading:c,onClick:y(f),icon:e(w,{svg:e(A.PlusCircleOutline,{})}),children:"Add Example"}),children:e("div",{css:C`
1348
1387
  overflow-y: auto;
1349
1388
  padding: var(--ac-global-dimension-size-400);
1350
1389
  /* Make widths configurable */
@@ -1355,7 +1394,7 @@ fragment DatasetPicker__datasets on Query {
1355
1394
  width: 100%;
1356
1395
  }
1357
1396
  }
1358
- `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(k,{direction:"column",gap:"size-200",children:[l?e(Y,{variant:"danger",children:l}):null,e(B,{control:d,name:"datasetId",render:({field:{onChange:p,onBlur:b},fieldState:{invalid:S,error:h}})=>e(vd,{onSelectionChange:p,onBlur:b,validationState:S?"invalid":"valid",errorMessage:h==null?void 0:h.message,query:i})}),e(B,{control:d,name:"input",render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>s(Q,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...ba,children:[h?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Ee,{value:S,onChange:p,onBlur:b})]})}),e(B,{control:d,name:"output",render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>s(Q,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...ba,backgroundColor:"green-100",borderColor:"green-700",children:[h?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Ee,{value:S,onChange:p,onBlur:b})]})}),e(B,{control:d,name:"metadata",render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>s(Q,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...ba,children:[h?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Ee,{value:S,onChange:p,onBlur:b})]})})]})})})})})}const Kd=n=>u.useMemo(()=>{try{return{json:JSON.parse(n)}}catch(a){return{json:null,parseError:a}}},[n]),xd=n=>n.events.some(a=>a.name==="exception"),ne={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0};function Dd({spanNodeId:n,projectId:a}){const{span:l}=I.useLazyLoadQuery(vt,{spanId:n});if(l.__typename!=="Span")throw new Error("Expected a span, but got a different type"+l.__typename);const t=u.useMemo(()=>xd(l),[l]),i=la(o=>o.showSpanAside),r=la(o=>o.setShowSpanAside);return s(k,{direction:"column",flex:"1 1 auto",height:"100%",children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-150",paddingEnd:"size-200",flex:"none",children:s(k,{direction:"row",gap:"size-200",alignItems:"center",children:[s(k,{direction:"row",gap:"size-100",width:"100%",height:"100%",alignItems:"center",children:[e(Pa,{spanKind:l.spanKind}),e(K,{children:l.name})]}),s(k,{flex:"none",direction:"row",alignItems:"center",gap:"size-100",children:[e(hd,{traceId:l.context.traceId,spanId:l.context.spanId}),e(Ld,{span:l}),e(pd,{spanNodeId:l.id,projectId:a}),s(Ce,{placement:"top",offset:5,children:[e(V,{variant:"default","aria-label":"Toggle showing span details",onClick:()=>{r(!i)},icon:e(w,{svg:i?e(E.SlideIn,{}):e(E.SlideOut,{})})}),e(Qn,{children:i?"Hide Span Details":"Show Span Details"})]})]})]})}),s(he,{children:[e(q,{name:"Info",children:s(k,{direction:"row",height:"100%",children:[e(Id,{children:e(Cl,{children:e(_d,{span:l})})}),i?e(fd,{span:l}):null]})}),e(q,{name:"Feedback",extra:e($e,{variant:"light",children:l.spanAnnotations.length}),children:o=>o?e(Sd,{span:l}):null}),e(q,{name:"Attributes",title:"Attributes",children:e(x,{padding:"size-200",children:e(Q,{title:"All Attributes",...ne,titleExtra:zt,extra:e(X,{text:l.attributes}),bodyStyle:{padding:0},children:e(ze,{children:l.attributes})})})}),e(q,{name:"Events",extra:e($e,{variant:t?"danger":"light",children:l.events.length}),children:e(qd,{events:l.events})})]})]})}const Td=C`
1397
+ `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(k,{direction:"column",gap:"size-200",children:[l?e(Y,{variant:"danger",children:l}):null,e(H,{control:d,name:"datasetId",render:({field:{onChange:p,onBlur:b},fieldState:{invalid:S,error:h}})=>e(Dd,{onSelectionChange:p,onBlur:b,validationState:S?"invalid":"valid",errorMessage:h==null?void 0:h.message,query:i})}),e(H,{control:d,name:"input",render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>s(Q,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...ba,children:[h?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Ae,{value:S,onChange:p,onBlur:b})]})}),e(H,{control:d,name:"output",render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>s(Q,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...ba,backgroundColor:"green-100",borderColor:"green-700",children:[h?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Ae,{value:S,onChange:p,onBlur:b})]})}),e(H,{control:d,name:"metadata",render:({field:{onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>s(Q,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...ba,children:[h?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Ae,{value:S,onChange:p,onBlur:b})]})})]})})})})})}const Ld=n=>u.useMemo(()=>{try{return{json:JSON.parse(n)}}catch(a){return{json:null,parseError:a}}},[n]),_d=n=>n.events.some(a=>a.name==="exception"),ne={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0};function Ed({spanNodeId:n,projectId:a}){const{span:l}=I.useLazyLoadQuery(vt,{spanId:n});if(l.__typename!=="Span")throw new Error("Expected a span, but got a different type"+l.__typename);const t=u.useMemo(()=>_d(l),[l]),i=la(o=>o.showSpanAside),r=la(o=>o.setShowSpanAside);return s(k,{direction:"column",flex:"1 1 auto",height:"100%",children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-150",paddingEnd:"size-200",flex:"none",children:s(k,{direction:"row",gap:"size-200",alignItems:"center",children:[s(k,{direction:"row",gap:"size-100",width:"100%",height:"100%",alignItems:"center",children:[e(Pa,{spanKind:l.spanKind}),e(K,{children:l.name})]}),s(k,{flex:"none",direction:"row",alignItems:"center",gap:"size-100",children:[e(kd,{traceId:l.context.traceId,spanId:l.context.spanId}),e(Rd,{span:l}),e(yd,{spanNodeId:l.id,projectId:a}),s(Ce,{placement:"top",offset:5,children:[e(V,{variant:"default","aria-label":"Toggle showing span details",onClick:()=>{r(!i)},icon:e(w,{svg:i?e(A.SlideIn,{}):e(A.SlideOut,{})})}),e(Qn,{children:i?"Hide Span Details":"Show Span Details"})]})]})]})}),s(he,{children:[e(q,{name:"Info",children:s(k,{direction:"row",height:"100%",children:[e(wd,{children:e(Cl,{children:e(Pd,{span:l})})}),i?e(hd,{span:l}):null]})}),e(q,{name:"Feedback",extra:e($e,{variant:"light",children:l.spanAnnotations.length}),children:o=>o?e(vd,{span:l}):null}),e(q,{name:"Attributes",title:"Attributes",children:e(x,{padding:"size-200",children:e(Q,{title:"All Attributes",...ne,titleExtra:zt,extra:e(X,{text:l.attributes}),bodyStyle:{padding:0},children:e(ze,{children:l.attributes})})})}),e(q,{name:"Events",extra:e($e,{variant:t?"danger":"light",children:l.events.length}),children:e(Jd,{events:l.events})})]})]})}const Ad=C`
1359
1398
  flex: 1 1 auto;
1360
1399
  overflow-y: auto;
1361
1400
  // Overflow fails to take into account padding
@@ -1364,11 +1403,11 @@ fragment DatasetPicker__datasets on Query {
1364
1403
  display: block;
1365
1404
  height: var(--ac-global-dimension-static-size-400);
1366
1405
  }
1367
- `;function Id({children:n}){return e("div",{css:Td,"data-testid":"span-info-wrap",children:n})}function Ld({span:n}){const[a,l]=u.useState(null),t=pe(),i=le(),r=u.useCallback(()=>{l(e(Fd,{spanId:n.id,onCompleted:o=>{l(null),t({title:"Span Added to Dataset",message:"Successfully added span to dataset",action:{text:"View Dataset",onClick:()=>{i(`/datasets/${o}/examples`)}}})}}))},[n.id,t,i]);return s(W,{children:[e(V,{variant:"default",icon:e(w,{svg:e(E.DatabaseOutline,{})}),onClick:r,children:"Add to Dataset"}),e(u.Suspense,{children:e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(null),children:a})})]})}function _d({span:n}){const{spanKind:a,attributes:l}=n,{json:t,parseError:i}=Kd(l),r=u.useMemo(()=>n.statusMessage?e(Y,{variant:"danger",title:"Status Description",children:n.statusMessage}):null,[n]);if(i||!t)return e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-200",children:[r,e(Y,{variant:"warning",title:"Un-parsable attributes",children:`Failed to parse span attributes. ${i instanceof Error?i.message:""}`}),e(Q,{...ne,title:"Attributes",children:e(x,{padding:"size-100",children:l})})]})});let o;switch(a){case"llm":{o=e(Ad,{span:n,spanAttributes:t});break}case"retriever":{o=e(Ed,{span:n,spanAttributes:t});break}case"reranker":{o=e(wd,{span:n,spanAttributes:t});break}case"embedding":{o=e(Rd,{span:n,spanAttributes:t});break}case"tool":{o=e(Pd,{span:n,spanAttributes:t});break}default:o=e(Vt,{span:n})}return e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-200",children:[r,o,t!=null&&t.metadata?e(Q,{...ne,title:"Metadata",children:e(ze,{children:JSON.stringify(t.metadata)})}):null]})})}function Ad(n){const{spanAttributes:a,span:l}=n,{input:t,output:i}=l,r=u.useMemo(()=>a[ye.llm]||null,[a]),o=u.useMemo(()=>{if(r==null)return null;const T=r[pn.model_name];return typeof T=="string"?T:null},[r]),c=u.useMemo(()=>{var T;return r==null?[]:((T=r[pn.input_messages])==null?void 0:T.map(F=>F[ye.message]).filter(Boolean))||[]},[r]),d=u.useMemo(()=>{var T;return r==null?[]:((T=r[pn.output_messages])==null?void 0:T.map(F=>F[ye.message]).filter(Boolean))||[]},[r]),m=u.useMemo(()=>{if(r==null)return[];const T=r[pn.prompts];return is(T)?T:[]},[r]),y=u.useMemo(()=>{if(r==null)return null;const T=r[pn.prompt_template];return T??null},[r]),g=u.useMemo(()=>r==null?"{}":r[pn.invocation_parameters]||"{}",[r]),f=u.useMemo(()=>o==null?null:s(k,{direction:"row",gap:"size-100",alignItems:"center",children:[e(rs,{spanKind:"llm"}),e(K,{textSize:"large",weight:"heavy",children:o})]}),[o]),p=t!=null&&t.value!=null,b=c.length>0,S=i!=null&&i.value!=null,h=d.length>0,v=m.length>0,_=Object.keys(JSON.parse(g)).length>0,L=y!=null;return s(k,{direction:"column",gap:"size-200",children:[e(Q,{collapsible:!0,backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},titleSeparator:!1,variant:"compact",title:f,children:s(he,{children:[b?e(q,{name:"Input Messages",hidden:!b,children:e(Xa,{messages:c})}):null,p?e(q,{name:"Input",hidden:!p,children:e(x,{padding:"size-200",children:e(Se,{children:e(Q,{...ne,title:"LLM Input",extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:t.value})]}),children:e(Qe,{...t})})})})}):null,L?e(q,{name:"Prompt Template",hidden:!L,children:e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-100",children:[e(x,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(aa,{text:y.template,children:[e(K,{color:"text-700",fontStyle:"italic",children:"prompt template"}),e($t,{children:y.template})]})}),e(x,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(aa,{text:JSON.stringify(y.variables),children:[e(K,{color:"text-700",fontStyle:"italic",children:"template variables"}),e(ze,{children:JSON.stringify(y.variables)})]})})]})})}):null,e(q,{name:"Prompts",hidden:!v,children:e(Vd,{prompts:m})}),e(q,{name:"Invocation Params",hidden:!_,children:e(aa,{text:g,padding:"size-100",children:e(ze,{children:g})})})]})}),S||h?e(Na,{...ne,children:s(he,{children:[h?e(q,{name:"Output Messages",hidden:!h,children:e(Xa,{messages:d})}):null,S?e(q,{name:"Output",hidden:!S,children:e(x,{padding:"size-200",children:e(Se,{children:e(Q,{...ne,title:"LLM Output",extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:i.value})]}),children:e(Qe,{...i})})})})}):null]})}):null]})}function Ed(n){const{spanAttributes:a,span:l}=n,{input:t}=l,i=u.useMemo(()=>a[ye.retrieval]||null,[a]),r=u.useMemo(()=>{var y;return i==null?[]:((y=i[Fr.documents])==null?void 0:y.map(g=>g[ye.document]).filter(Boolean))||[]},[i]),o=u.useMemo(()=>l.documentEvaluations.reduce((g,f)=>{const p=f.documentPosition,b=g[p]||[];return{...g,[p]:[...b,f]}},{}),[l.documentEvaluations]),c=t!=null&&t.value!=null,d=r.length>0,m=l.documentRetrievalMetrics.length>0;return s(k,{direction:"column",gap:"size-200",children:[c?e(Se,{children:e(Q,{title:"Input",...ne,extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:t.value})]}),children:e(Qe,{...t})})}):null,d?e(Se,{children:e(Q,{title:"Documents",...ne,titleExtra:m&&e(k,{direction:"row",alignItems:"center",gap:"size-100",children:l.documentRetrievalMetrics.map(y=>s(W,{children:[e(fe,{name:y.evaluationName,metric:"ndcg",score:y.ndcg},"ndcg"),e(fe,{name:y.evaluationName,metric:"precision",score:y.precision},"precision"),e(fe,{name:y.evaluationName,metric:"hit",score:y.hit},"hit")]}))}),extra:e(Re,{}),children:e("ul",{css:C`
1406
+ `;function wd({children:n}){return e("div",{css:Ad,"data-testid":"span-info-wrap",children:n})}function Rd({span:n}){const[a,l]=u.useState(null),t=pe(),i=le(),r=u.useCallback(()=>{l(e(Id,{spanId:n.id,onCompleted:o=>{l(null),t({title:"Span Added to Dataset",message:"Successfully added span to dataset",action:{text:"View Dataset",onClick:()=>{i(`/datasets/${o}/examples`)}}})}}))},[n.id,t,i]);return s(W,{children:[e(V,{variant:"default",icon:e(w,{svg:e(A.DatabaseOutline,{})}),onClick:r,children:"Add to Dataset"}),e(u.Suspense,{children:e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(null),children:a})})]})}function Pd({span:n}){const{spanKind:a,attributes:l}=n,{json:t,parseError:i}=Ld(l),r=u.useMemo(()=>n.statusMessage?e(Y,{variant:"danger",title:"Status Description",children:n.statusMessage}):null,[n]);if(i||!t)return e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-200",children:[r,e(Y,{variant:"warning",title:"Un-parsable attributes",children:`Failed to parse span attributes. ${i instanceof Error?i.message:""}`}),e(Q,{...ne,title:"Attributes",children:e(x,{padding:"size-100",children:l})})]})});let o;switch(a){case"llm":{o=e(Md,{span:n,spanAttributes:t});break}case"retriever":{o=e(Nd,{span:n,spanAttributes:t});break}case"reranker":{o=e(Vd,{span:n,spanAttributes:t});break}case"embedding":{o=e($d,{span:n,spanAttributes:t});break}case"tool":{o=e(zd,{span:n,spanAttributes:t});break}default:o=e(Vt,{span:n})}return e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-200",children:[r,o,t!=null&&t.metadata?e(Q,{...ne,title:"Metadata",children:e(ze,{children:JSON.stringify(t.metadata)})}):null]})})}function Md(n){const{spanAttributes:a,span:l}=n,{input:t,output:i}=l,r=u.useMemo(()=>a[ye.llm]||null,[a]),o=u.useMemo(()=>{if(r==null)return null;const T=r[pn.model_name];return typeof T=="string"?T:null},[r]),c=u.useMemo(()=>{var T;return r==null?[]:((T=r[pn.input_messages])==null?void 0:T.map(F=>F[ye.message]).filter(Boolean))||[]},[r]),d=u.useMemo(()=>{var T;return r==null?[]:((T=r[pn.output_messages])==null?void 0:T.map(F=>F[ye.message]).filter(Boolean))||[]},[r]),m=u.useMemo(()=>{if(r==null)return[];const T=r[pn.prompts];return rs(T)?T:[]},[r]),y=u.useMemo(()=>{if(r==null)return null;const T=r[pn.prompt_template];return T??null},[r]),g=u.useMemo(()=>r==null?"{}":r[pn.invocation_parameters]||"{}",[r]),f=u.useMemo(()=>o==null?null:s(k,{direction:"row",gap:"size-100",alignItems:"center",children:[e(ss,{spanKind:"llm"}),e(K,{textSize:"large",weight:"heavy",children:o})]}),[o]),p=t!=null&&t.value!=null,b=c.length>0,S=i!=null&&i.value!=null,h=d.length>0,v=m.length>0,_=Object.keys(JSON.parse(g)).length>0,L=y!=null;return s(k,{direction:"column",gap:"size-200",children:[e(Q,{collapsible:!0,backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},titleSeparator:!1,variant:"compact",title:f,children:s(he,{children:[b?e(q,{name:"Input Messages",hidden:!b,children:e(Xa,{messages:c})}):null,p?e(q,{name:"Input",hidden:!p,children:e(x,{padding:"size-200",children:e(Se,{children:e(Q,{...ne,title:"LLM Input",extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:t.value})]}),children:e(Qe,{...t})})})})}):null,L?e(q,{name:"Prompt Template",hidden:!L,children:e(x,{padding:"size-200",children:s(k,{direction:"column",gap:"size-100",children:[e(x,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(aa,{text:y.template,children:[e(K,{color:"text-700",fontStyle:"italic",children:"prompt template"}),e($t,{children:y.template})]})}),e(x,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(aa,{text:JSON.stringify(y.variables),children:[e(K,{color:"text-700",fontStyle:"italic",children:"template variables"}),e(ze,{children:JSON.stringify(y.variables)})]})})]})})}):null,e(q,{name:"Prompts",hidden:!v,children:e(jd,{prompts:m})}),e(q,{name:"Invocation Params",hidden:!_,children:e(aa,{text:g,padding:"size-100",children:e(ze,{children:g})})})]})}),S||h?e(Na,{...ne,children:s(he,{children:[h?e(q,{name:"Output Messages",hidden:!h,children:e(Xa,{messages:d})}):null,S?e(q,{name:"Output",hidden:!S,children:e(x,{padding:"size-200",children:e(Se,{children:e(Q,{...ne,title:"LLM Output",extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:i.value})]}),children:e(Qe,{...i})})})})}):null]})}):null]})}function Nd(n){const{spanAttributes:a,span:l}=n,{input:t}=l,i=u.useMemo(()=>a[ye.retrieval]||null,[a]),r=u.useMemo(()=>{var y;return i==null?[]:((y=i[Kr.documents])==null?void 0:y.map(g=>g[ye.document]).filter(Boolean))||[]},[i]),o=u.useMemo(()=>l.documentEvaluations.reduce((g,f)=>{const p=f.documentPosition,b=g[p]||[];return{...g,[p]:[...b,f]}},{}),[l.documentEvaluations]),c=t!=null&&t.value!=null,d=r.length>0,m=l.documentRetrievalMetrics.length>0;return s(k,{direction:"column",gap:"size-200",children:[c?e(Se,{children:e(Q,{title:"Input",...ne,extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:t.value})]}),children:e(Qe,{...t})})}):null,d?e(Se,{children:e(Q,{title:"Documents",...ne,titleExtra:m&&e(k,{direction:"row",alignItems:"center",gap:"size-100",children:l.documentRetrievalMetrics.map(y=>s(W,{children:[e(fe,{name:y.evaluationName,metric:"ndcg",score:y.ndcg},"ndcg"),e(fe,{name:y.evaluationName,metric:"precision",score:y.precision},"precision"),e(fe,{name:y.evaluationName,metric:"hit",score:y.hit},"hit")]}))}),extra:e(Re,{}),children:e("ul",{css:C`
1368
1407
  display: flex;
1369
1408
  flex-direction: column;
1370
1409
  gap: var(--ac-global-dimension-static-size-200);
1371
- `,children:r.map((y,g)=>e("li",{children:e(Ia,{document:y,documentEvaluations:o[g],borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},g))})})}):null]})}function wd(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[ye.reranker]||null,[a]),t=u.useMemo(()=>l==null?null:l[pa.query]||null,[l]),i=u.useMemo(()=>{var d;return l==null?[]:((d=l[pa.input_documents])==null?void 0:d.map(m=>m[ye.document]).filter(Boolean))||[]},[l]),r=u.useMemo(()=>{var d;return l==null?[]:((d=l[pa.output_documents])==null?void 0:d.map(m=>m[ye.document]).filter(Boolean))||[]},[l]),o=i.length,c=r.length;return s(k,{direction:"column",gap:"size-200",children:[e(Se,{children:t&&e(Q,{title:"Query",...ne,children:e(Hn,{children:t})})}),e(Q,{title:"Input Documents",titleExtra:e($e,{variant:"light",children:o}),...ne,defaultOpen:!1,bodyStyle:{padding:0},children:e("ul",{css:C`
1410
+ `,children:r.map((y,g)=>e("li",{children:e(Ia,{document:y,documentEvaluations:o[g],borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},g))})})}):null]})}function Vd(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[ye.reranker]||null,[a]),t=u.useMemo(()=>l==null?null:l[pa.query]||null,[l]),i=u.useMemo(()=>{var d;return l==null?[]:((d=l[pa.input_documents])==null?void 0:d.map(m=>m[ye.document]).filter(Boolean))||[]},[l]),r=u.useMemo(()=>{var d;return l==null?[]:((d=l[pa.output_documents])==null?void 0:d.map(m=>m[ye.document]).filter(Boolean))||[]},[l]),o=i.length,c=r.length;return s(k,{direction:"column",gap:"size-200",children:[e(Se,{children:t&&e(Q,{title:"Query",...ne,children:e(Bn,{children:t})})}),e(Q,{title:"Input Documents",titleExtra:e($e,{variant:"light",children:o}),...ne,defaultOpen:!1,bodyStyle:{padding:0},children:e("ul",{css:C`
1372
1411
  padding: var(--ac-global-dimension-static-size-200);
1373
1412
  display: flex;
1374
1413
  flex-direction: column;
@@ -1378,16 +1417,16 @@ fragment DatasetPicker__datasets on Query {
1378
1417
  display: flex;
1379
1418
  flex-direction: column;
1380
1419
  gap: var(--ac-global-dimension-static-size-200);
1381
- `,children:r.map((d,m)=>e("li",{children:e(Ia,{document:d,borderColor:"celery-700",backgroundColor:"celery-100",labelColor:"celery-1000"})},m))})})]})}function Rd(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[ye.embedding]||null,[a]),t=u.useMemo(()=>{var o;return l==null?[]:((o=l[ya.embeddings])==null?void 0:o.map(c=>c[ye.embedding]).filter(Boolean))||[]},[l]),i=t.length>0,r=l==null?void 0:l[ya.model_name];return e(k,{direction:"column",gap:"size-200",children:i?e(Q,{title:"Embeddings"+(typeof r=="string"?`: ${r}`:""),...ne,children:e("ul",{css:C`
1420
+ `,children:r.map((d,m)=>e("li",{children:e(Ia,{document:d,borderColor:"celery-700",backgroundColor:"celery-100",labelColor:"celery-1000"})},m))})})]})}function $d(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[ye.embedding]||null,[a]),t=u.useMemo(()=>{var o;return l==null?[]:((o=l[ya.embeddings])==null?void 0:o.map(c=>c[ye.embedding]).filter(Boolean))||[]},[l]),i=t.length>0,r=l==null?void 0:l[ya.model_name];return e(k,{direction:"column",gap:"size-200",children:i?e(Q,{title:"Embeddings"+(typeof r=="string"?`: ${r}`:""),...ne,children:e("ul",{css:C`
1382
1421
  display: flex;
1383
1422
  flex-direction: column;
1384
1423
  gap: var(--ac-global-dimension-static-size-200);
1385
- `,children:t.map((o,c)=>e("li",{children:e(Se,{children:e(Q,{...ne,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(Hn,{children:o[ya.text]||""})})})},c))})}):e(Vt,{span:n.span})})}function Pd(n){const{span:a,spanAttributes:l}=n,{input:t,output:i}=a,r=typeof(t==null?void 0:t.value)=="string",o=typeof(i==null?void 0:i.value)=="string",c=(t==null?void 0:t.mimeType)==="text",d=(i==null?void 0:i.mimeType)==="text",m=u.useMemo(()=>l[ye.tool]||{},[l]),y=Object.keys(m).length>0,g=m[fa.name],f=m[fa.description],p=m[fa.parameters];return!r&&!o&&!y?null:s(k,{direction:"column",gap:"size-200",children:[r?e(Se,{children:e(Q,{title:"Input",...ne,extra:s(k,{direction:"row",gap:"size-100",children:[c?e(Re,{}):null,e(X,{text:t.value})]}),children:e(Qe,{...t})})}):null,o?e(Se,{children:e(Q,{title:"Output",...ne,backgroundColor:"green-100",borderColor:"green-700",extra:s(k,{direction:"row",gap:"size-100",children:[d?e(Re,{}):null,e(X,{text:i.value})]}),children:e(Qe,{...i})})}):null,y?e(Q,{title:"Tool"+(typeof g=="string"?`: ${g}`:""),...ne,children:s(k,{direction:"column",children:[f!=null?e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"light",children:s(k,{direction:"column",alignItems:"start",gap:"size-50",children:[e(K,{color:"text-700",fontStyle:"italic",children:"Description"}),e(K,{children:f})]})}):null,p!=null?e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",children:s(k,{direction:"column",alignItems:"start",width:"100%",children:[e(K,{color:"text-700",fontStyle:"italic",children:"Parameters"}),e(ze,{children:JSON.stringify(p)})]})}):null]})}):null]})}const Md=["irrelevant","unrelated"];function Ia({document:n,documentEvaluations:a,backgroundColor:l,borderColor:t,labelColor:i}){const r=n[Pn.metadata],o=a&&a.length,c=n[Pn.content];return e(Q,{...ne,backgroundColor:l,borderColor:t,bodyStyle:{padding:0},title:s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(w,{svg:e(E.FileOutline,{})}),s(te,{level:4,children:["document ",n[Pn.id]]})]}),extra:typeof n[Pn.score]=="number"&&e(zn,{color:i,children:`score ${Aa(n[Pn.score])}`}),children:s(k,{direction:"column",children:[c&&e(x,{padding:"size-200",children:e(Hn,{children:c})}),r&&e(W,{children:e(x,{borderColor:t,borderTopWidth:"thin",children:e(ze,{children:JSON.stringify(r)})})}),o&&e(x,{borderColor:t,borderTopWidth:"thin",padding:"size-200",children:s(k,{direction:"column",gap:"size-100",children:[e(te,{level:3,weight:"heavy",children:"Evaluations"}),e("ul",{children:a.map((d,m)=>{const y=d.label&&Md.includes(d.label)?"danger":i;return e("li",{children:e(x,{padding:"size-200",borderWidth:"thin",borderColor:t,borderRadius:"medium",children:s(k,{direction:"column",gap:"size-50",children:[s(k,{direction:"row",gap:"size-100",children:[e(K,{weight:"heavy",elementType:"h5",children:d.name}),d.label&&e(zn,{color:y,shape:"badge",children:d.label}),typeof d.score=="number"&&e(zn,{color:y,shape:"badge",children:s(k,{direction:"row",gap:"size-50",children:[e(K,{textSize:"xsmall",weight:"heavy",color:"inherit",children:"score"}),e(K,{textSize:"xsmall",children:Le(d.score)})]})})]}),typeof d.explanation&&e("p",{css:C`
1424
+ `,children:t.map((o,c)=>e("li",{children:e(Se,{children:e(Q,{...ne,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(Bn,{children:o[ya.text]||""})})})},c))})}):e(Vt,{span:n.span})})}function zd(n){const{span:a,spanAttributes:l}=n,{input:t,output:i}=a,r=typeof(t==null?void 0:t.value)=="string",o=typeof(i==null?void 0:i.value)=="string",c=(t==null?void 0:t.mimeType)==="text",d=(i==null?void 0:i.mimeType)==="text",m=u.useMemo(()=>l[ye.tool]||{},[l]),y=Object.keys(m).length>0,g=m[fa.name],f=m[fa.description],p=m[fa.parameters];return!r&&!o&&!y?null:s(k,{direction:"column",gap:"size-200",children:[r?e(Se,{children:e(Q,{title:"Input",...ne,extra:s(k,{direction:"row",gap:"size-100",children:[c?e(Re,{}):null,e(X,{text:t.value})]}),children:e(Qe,{...t})})}):null,o?e(Se,{children:e(Q,{title:"Output",...ne,backgroundColor:"green-100",borderColor:"green-700",extra:s(k,{direction:"row",gap:"size-100",children:[d?e(Re,{}):null,e(X,{text:i.value})]}),children:e(Qe,{...i})})}):null,y?e(Q,{title:"Tool"+(typeof g=="string"?`: ${g}`:""),...ne,children:s(k,{direction:"column",children:[f!=null?e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"light",children:s(k,{direction:"column",alignItems:"start",gap:"size-50",children:[e(K,{color:"text-700",fontStyle:"italic",children:"Description"}),e(K,{children:f})]})}):null,p!=null?e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",children:s(k,{direction:"column",alignItems:"start",width:"100%",children:[e(K,{color:"text-700",fontStyle:"italic",children:"Parameters"}),e(ze,{children:JSON.stringify(p)})]})}):null]})}):null]})}const Qd=["irrelevant","unrelated"];function Ia({document:n,documentEvaluations:a,backgroundColor:l,borderColor:t,labelColor:i}){const r=n[Pn.metadata],o=a&&a.length,c=n[Pn.content];return e(Q,{...ne,backgroundColor:l,borderColor:t,bodyStyle:{padding:0},title:s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(w,{svg:e(A.FileOutline,{})}),s(te,{level:4,children:["document ",n[Pn.id]]})]}),extra:typeof n[Pn.score]=="number"&&e(zn,{color:i,children:`score ${Ea(n[Pn.score])}`}),children:s(k,{direction:"column",children:[c&&e(x,{padding:"size-200",children:e(Bn,{children:c})}),r&&e(W,{children:e(x,{borderColor:t,borderTopWidth:"thin",children:e(ze,{children:JSON.stringify(r)})})}),o&&e(x,{borderColor:t,borderTopWidth:"thin",padding:"size-200",children:s(k,{direction:"column",gap:"size-100",children:[e(te,{level:3,weight:"heavy",children:"Evaluations"}),e("ul",{children:a.map((d,m)=>{const y=d.label&&Qd.includes(d.label)?"danger":i;return e("li",{children:e(x,{padding:"size-200",borderWidth:"thin",borderColor:t,borderRadius:"medium",children:s(k,{direction:"column",gap:"size-50",children:[s(k,{direction:"row",gap:"size-100",children:[e(K,{weight:"heavy",elementType:"h5",children:d.name}),d.label&&e(zn,{color:y,shape:"badge",children:d.label}),typeof d.score=="number"&&e(zn,{color:y,shape:"badge",children:s(k,{direction:"row",gap:"size-50",children:[e(K,{textSize:"xsmall",weight:"heavy",color:"inherit",children:"score"}),e(K,{textSize:"xsmall",children:Le(d.score)})]})})]}),typeof d.explanation&&e("p",{css:C`
1386
1425
  margin-top: var(
1387
1426
  --ac-global-dimension-static-size-100
1388
1427
  );
1389
1428
  margin-bottom: 0;
1390
- `,children:d.explanation})]})})},m)})})]})})]})})}function Nd({message:n}){var c;const a=n[ve.content],l=n[ve.contents],t=((c=n[ve.tool_calls])==null?void 0:c.map(d=>d[ye.tool_call]).filter(Boolean))||[],i=n[ve.function_call_arguments_json]&&n[ve.function_call_name],r=n[ve.role]||"unknown",o=u.useMemo(()=>r==="user"?{backgroundColor:"grey-100",borderColor:"grey-500"}:r==="assistant"?{backgroundColor:"blue-100",borderColor:"blue-700"}:r==="system"?{backgroundColor:"indigo-100",borderColor:"indigo-700"}:["function","tool"].includes(r)?{backgroundColor:"yellow-100",borderColor:"yellow-700"}:{backgroundColor:"grey-100",borderColor:"grey-700"},[r]);return e(Se,{children:s(Q,{...ne,...o,title:r+(n[ve.name]?`: ${n[ve.name]}`:""),extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:a||JSON.stringify(n)})]}),children:[e(Cl,{children:l?e($d,{messageContents:l}):null}),s(k,{direction:"column",alignItems:"start",children:[a?e(Hn,{children:a}):null,t.length>0?t.map((d,m)=>{var y,g;return s("pre",{css:C`
1429
+ `,children:d.explanation})]})})},m)})})]})})]})})}function Od({message:n}){var c;const a=n[ve.content],l=n[ve.contents],t=((c=n[ve.tool_calls])==null?void 0:c.map(d=>d[ye.tool_call]).filter(Boolean))||[],i=n[ve.function_call_arguments_json]&&n[ve.function_call_name],r=n[ve.role]||"unknown",o=u.useMemo(()=>r==="user"?{backgroundColor:"grey-100",borderColor:"grey-500"}:r==="assistant"?{backgroundColor:"blue-100",borderColor:"blue-700"}:r==="system"?{backgroundColor:"indigo-100",borderColor:"indigo-700"}:["function","tool"].includes(r)?{backgroundColor:"yellow-100",borderColor:"yellow-700"}:{backgroundColor:"grey-100",borderColor:"grey-700"},[r]);return e(Se,{children:s(Q,{...ne,...o,title:r+(n[ve.name]?`: ${n[ve.name]}`:""),extra:s(k,{direction:"row",gap:"size-100",children:[e(Re,{}),e(X,{text:a||JSON.stringify(n)})]}),children:[e(Cl,{children:l?e(Hd,{messageContents:l}):null}),s(k,{direction:"column",alignItems:"start",children:[a?e(Bn,{children:a}):null,t.length>0?t.map((d,m)=>{var y,g;return s("pre",{css:C`
1391
1430
  text-wrap: wrap;
1392
1431
  margin: var(--ac-global-dimension-static-size-100) 0;
1393
1432
  `,children:[(y=d==null?void 0:d.function)==null?void 0:y.name,"(",JSON.stringify(JSON.parse((g=d==null?void 0:d.function)==null?void 0:g.arguments),null,2),")"]},m)}):null,i?s("pre",{css:C`
@@ -1398,24 +1437,23 @@ fragment DatasetPicker__datasets on Query {
1398
1437
  flex-direction: column;
1399
1438
  gap: var(--ac-global-dimension-static-size-100);
1400
1439
  padding: var(--ac-global-dimension-static-size-200);
1401
- `,children:n.map((a,l)=>e("li",{children:e(Nd,{message:a})},l))})}function Vd({prompts:n}){return e("ul",{"data-testid":"llm-prompts-list",css:C`
1440
+ `,children:n.map((a,l)=>e("li",{children:e(Od,{message:a})},l))})}function jd({prompts:n}){return e("ul",{"data-testid":"llm-prompts-list",css:C`
1402
1441
  padding: var(--ac-global-dimension-size-200);
1403
1442
  display: flex;
1404
1443
  flex-direction: column;
1405
1444
  gap: var(--ac-global-dimension-size-100);
1406
- `,children:n.map((a,l)=>e("li",{children:e(x,{backgroundColor:"gray-600",borderColor:"gray-400",borderWidth:"thin",borderRadius:"medium",padding:"size-100",children:e(aa,{text:a,children:e(Qe,{value:a,mimeType:"text"})})})},l))})}function $d({messageContents:n}){return e("ul",{css:C`
1407
- display: flex;
1408
- flex-direction: column;
1409
- gap: var(--ac-global-dimension-size-100);
1410
- `,children:n.map((a,l)=>e("li",{children:e(Qd,{messageContentAttribute:a})},l))})}const zd=C`
1411
- max-width: 100%;
1412
- max-height: 100%;
1413
- object-fit: cover;
1414
- `;function Qd({messageContentAttribute:n}){var r;const{message_content:a}=n,l=a==null?void 0:a.text,t=a==null?void 0:a.image,i=(r=t==null?void 0:t.image)==null?void 0:r.url;return s(k,{direction:"column",children:[l?e("pre",{css:C`
1445
+ `,children:n.map((a,l)=>e("li",{children:e(x,{backgroundColor:"gray-600",borderColor:"gray-400",borderWidth:"thin",borderRadius:"medium",padding:"size-100",children:e(aa,{text:a,children:e(Qe,{value:a,mimeType:"text"})})})},l))})}const qd=C`
1446
+ display: flex;
1447
+ flex-direction: row;
1448
+ gap: var(--ac-global-dimension-size-200);
1449
+ flex-wrap: wrap;
1450
+ `;function Hd({messageContents:n}){return e("ul",{css:qd,"data-testid":"message-content-list",children:n.map((a,l)=>e(Gd,{messageContentAttribute:a},l))})}const Bd=C`
1451
+ flex: 1 1 100%;
1452
+ `;function Gd({messageContentAttribute:n}){var r;const{message_content:a}=n,l=a==null?void 0:a.text,t=a==null?void 0:a.image,i=(r=t==null?void 0:t.image)==null?void 0:r.url;return s("li",{css:l?Bd:null,children:[l?e("pre",{css:C`
1415
1453
  white-space: pre-wrap;
1416
1454
  padding: 0;
1417
1455
  margin: 0;
1418
- `,children:l}):null,i?e("img",{src:i,css:zd}):null]})}function Vt({span:n}){const{input:a,output:l}=n,t=a==null&&l==null,i=(a==null?void 0:a.mimeType)==="text",r=(l==null?void 0:l.mimeType)==="text";return s(k,{direction:"column",gap:"size-200",children:[a&&a.value!=null?e(Se,{children:e(Q,{title:"Input",...ne,extra:s(k,{direction:"row",gap:"size-100",children:[i?e(Re,{}):null,e(X,{text:a.value})]}),children:e(Qe,{...a})})}):null,l&&l.value!=null?e(Se,{children:e(Q,{title:"Output",...ne,backgroundColor:"green-100",borderColor:"green-700",extra:s(k,{direction:"row",gap:"size-100",children:[r?e(Re,{}):null,e(X,{text:l.value})]}),children:e(Qe,{...l})})}):null,t?e(Q,{title:"All Attributes",titleExtra:zt,...ne,bodyStyle:{padding:0},extra:e(X,{text:n.attributes}),children:e(ze,{children:n.attributes})}):null]})}const Od=C`
1456
+ `,children:l}):null,i?e(Kd,{url:i}):null]})}function Vt({span:n}){const{input:a,output:l}=n,t=a==null&&l==null,i=(a==null?void 0:a.mimeType)==="text",r=(l==null?void 0:l.mimeType)==="text";return s(k,{direction:"column",gap:"size-200",children:[a&&a.value!=null?e(Se,{children:e(Q,{title:"Input",...ne,extra:s(k,{direction:"row",gap:"size-100",children:[i?e(Re,{}):null,e(X,{text:a.value})]}),children:e(Qe,{...a})})}):null,l&&l.value!=null?e(Se,{children:e(Q,{title:"Output",...ne,backgroundColor:"green-100",borderColor:"green-700",extra:s(k,{direction:"row",gap:"size-100",children:[r?e(Re,{}):null,e(X,{text:l.value})]}),children:e(Qe,{...l})})}):null,t?e(Q,{title:"All Attributes",titleExtra:zt,...ne,bodyStyle:{padding:0},extra:e(X,{text:n.attributes}),children:e(ze,{children:n.attributes})}):null]})}const Ud=C`
1419
1457
  .cm-content {
1420
1458
  padding: var(--ac-global-dimension-static-size-200) 0;
1421
1459
  }
@@ -1436,10 +1474,10 @@ fragment DatasetPicker__datasets on Query {
1436
1474
  &:hover .copy-to-clipboard-button {
1437
1475
  opacity: 1;
1438
1476
  }
1439
- `,children:[e(X,{text:n}),a]})}function ze({children:n}){const{theme:a}=Bn(),l=a==="light"?void 0:ga,{value:t,mimeType:i}=u.useMemo(()=>{try{return{value:JSON.stringify(JSON.parse(n),null,2),mimeType:"json"}}catch{return{value:n,mimeType:"text"}}},[n]);return i==="json"?e(ma,{value:t,basicSetup:{lineNumbers:!0,foldGutter:!0,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Ms(),Ns.lineWrapping],editable:!1,theme:l,css:Od}):e($t,{children:t})}function $t({children:n}){return e("pre",{css:C`
1477
+ `,children:[e(X,{text:n}),a]})}function ze({children:n}){const{theme:a}=Hn(),l=a==="light"?void 0:ga,{value:t,mimeType:i}=u.useMemo(()=>{try{return{value:JSON.stringify(JSON.parse(n),null,2),mimeType:"json"}}catch{return{value:n,mimeType:"text"}}},[n]);return i==="json"?e(ma,{value:t,basicSetup:{lineNumbers:!0,foldGutter:!0,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Ns(),Vs.lineWrapping],editable:!1,theme:l,css:Ud}):e($t,{children:t})}function $t({children:n}){return e("pre",{css:C`
1440
1478
  white-space: pre-wrap;
1441
1479
  padding: 0;
1442
- `,children:n})}function Qe({value:n,mimeType:a}){let l;switch(a){case"json":l=e(ze,{children:n});break;case"text":l=e(Hn,{children:n});break;default:ke()}return l}function jd({text:n}){return s(k,{direction:"column",alignItems:"center",flex:"1 1 auto",height:"size-2400",justifyContent:"center",gap:"size-100",children:[e(ca,{graphicKey:"documents"}),e(K,{children:n})]})}function qd({events:n}){return n.length===0?e(jd,{text:"No events"}):e(wl,{children:n.map((a,l)=>{const t=a.name==="exception";return e(El,{children:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(x,{flex:"none",children:e("div",{"data-event-type":t?"exception":"info",css:i=>C`
1480
+ `,children:n})}function Qe({value:n,mimeType:a}){let l;switch(a){case"json":l=e(ze,{children:n});break;case"text":l=e(Bn,{children:n});break;default:ke()}return l}function Wd({text:n}){return s(k,{direction:"column",alignItems:"center",flex:"1 1 auto",height:"size-2400",justifyContent:"center",gap:"size-100",children:[e(ca,{graphicKey:"documents"}),e(K,{children:n})]})}function Jd({events:n}){return n.length===0?e(Wd,{text:"No events"}):e(wl,{children:n.map((a,l)=>{const t=a.name==="exception";return e(Al,{children:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(x,{flex:"none",children:e("div",{"data-event-type":t?"exception":"info",css:i=>C`
1443
1481
  &[data-event-type="exception"] {
1444
1482
  --px-event-icon-color: ${i.colors.statusDanger};
1445
1483
  }
@@ -1449,15 +1487,15 @@ fragment DatasetPicker__datasets on Query {
1449
1487
  .ac-icon-wrap {
1450
1488
  color: var(--px-event-icon-color);
1451
1489
  }
1452
- `,children:e(w,{svg:t?e(E.AlertTriangleOutline,{}):e(E.InfoOutline,{})})})}),s(k,{direction:"column",gap:"size-25",flex:"1 1 auto",children:[e(K,{weight:"heavy",children:a.name}),e(K,{color:"text-700",children:a.message})]}),e(x,{children:e(K,{color:"text-700",children:new Date(a.timestamp).toLocaleString()})})]})},l)})})}const zt=e(k,{alignItems:"center",justifyContent:"center",children:e(x,{marginStart:"size-100",children:s(wn,{children:[e(te,{weight:"heavy",level:4,children:"Span Attributes"}),e(En,{children:e(K,{children:"Attributes are key-value pairs that represent metadata associated with a span. For detailed descriptions of specific attributes, consult the semantic conventions section of the OpenInference tracing specification."})}),e("footer",{children:e(rn,{href:"https://github.com/Arize-ai/openinference/blob/main/spec/semantic_conventions.md",children:"Semantic Conventions"})})]})})}),Ya="selectedSpanNodeId";function Bd(n){const a=n.find(i=>i.parentId==null);if(a)return a;const l=new Set(n.map(i=>i.context.spanId)),t=n.filter(i=>i.parentId!=null&&!l.has(i.parentId));return t.length===1?t[0]:null}function Qt(n){const{traceId:a,projectId:l}=n,[t,i]=ol(),r=I.useLazyLoadQuery(St,{traceId:a,id:l},{fetchPolicy:"store-and-network"}),o=u.useMemo(()=>{var g;return(((g=r.project.trace)==null?void 0:g.spans.edges)||[]).map(f=>f.span)},[r]),d=t.get(Ya)??o[0].id,m=u.useMemo(()=>Bd(o),[o]);return u.useEffect(()=>()=>{i(y=>(y.delete("spanNodeId"),y),{replace:!0})},[]),s("main",{css:C`
1490
+ `,children:e(w,{svg:t?e(A.AlertTriangleOutline,{}):e(A.InfoOutline,{})})})}),s(k,{direction:"column",gap:"size-25",flex:"1 1 auto",children:[e(K,{weight:"heavy",children:a.name}),e(K,{color:"text-700",children:a.message})]}),e(x,{children:e(K,{color:"text-700",children:new Date(a.timestamp).toLocaleString()})})]})},l)})})}const zt=e(k,{alignItems:"center",justifyContent:"center",children:e(x,{marginStart:"size-100",children:s(wn,{children:[e(te,{weight:"heavy",level:4,children:"Span Attributes"}),e(An,{children:e(K,{children:"Attributes are key-value pairs that represent metadata associated with a span. For detailed descriptions of specific attributes, consult the semantic conventions section of the OpenInference tracing specification."})}),e("footer",{children:e(rn,{href:"https://github.com/Arize-ai/openinference/blob/main/spec/semantic_conventions.md",children:"Semantic Conventions"})})]})})}),Ya="selectedSpanNodeId";function Zd(n){const a=n.find(i=>i.parentId==null);if(a)return a;const l=new Set(n.map(i=>i.context.spanId)),t=n.filter(i=>i.parentId!=null&&!l.has(i.parentId));return t.length===1?t[0]:null}function Qt(n){const{traceId:a,projectId:l}=n,[t,i]=ol(),r=I.useLazyLoadQuery(St,{traceId:a,id:l},{fetchPolicy:"store-and-network"}),o=u.useMemo(()=>{var g;return(((g=r.project.trace)==null?void 0:g.spans.edges)||[]).map(f=>f.span)},[r]),d=t.get(Ya)??o[0].id,m=u.useMemo(()=>Zd(o),[o]);return u.useEffect(()=>()=>{i(y=>(y.delete("spanNodeId"),y),{replace:!0})},[]),s("main",{css:C`
1453
1491
  flex: 1 1 auto;
1454
1492
  overflow: hidden;
1455
1493
  display: flex;
1456
1494
  flex-direction: column;
1457
- `,children:[e(Hd,{rootSpan:m}),s(ln,{direction:"horizontal",autoSaveId:"trace-panel-group",css:C`
1495
+ `,children:[e(Xd,{rootSpan:m}),s(ln,{direction:"horizontal",autoSaveId:"trace-panel-group",css:C`
1458
1496
  flex: 1 1 auto;
1459
1497
  overflow: hidden;
1460
- `,children:[e(ce,{defaultSize:30,minSize:10,maxSize:70,children:e(Ud,{children:e(ss,{spans:o,selectedSpanNodeId:d,onSpanClick:y=>{i(g=>(g.set(Ya,y.id),g),{replace:!0})}})})}),e(tn,{css:In}),e(ce,{children:e(Gd,{children:d?e(u.Suspense,{fallback:e(se,{}),children:e(Dd,{spanNodeId:d,projectId:l})}):null})})]})]})}function Hd({rootSpan:n}){const{latencyMs:a,statusCode:l,spanAnnotations:t}=n??{latencyMs:null,statusCode:"UNSET",spanAnnotations:[]},i=t.length>0,r=vl(l);return e(x,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(k,{direction:"row",gap:"size-400",children:[s(k,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Trace Status"}),e(K,{textSize:"xlarge",children:s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(sa,{statusCode:l}),e(K,{textSize:"xlarge",color:r,children:l})]})})]}),s(k,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency"}),e(K,{textSize:"xlarge",children:typeof a=="number"?e(Ke,{latencyMs:a,textSize:"xlarge"}):"--"})]}),i?s(k,{direction:"column",gap:"size-50",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Feedback"}),e(k,{direction:"row",gap:"size-50",children:t.map(o=>e(Gn,{annotation:o,children:e(un,{annotation:o,annotationDisplayPreference:"label"})},o.name))})]}):null]})})}function Gd({children:n}){return e("div",{"data-testid":"scrolling-tabs-wrapper",css:C`
1498
+ `,children:[e(ce,{defaultSize:30,minSize:10,maxSize:70,children:e(ec,{children:e(os,{spans:o,selectedSpanNodeId:d,onSpanClick:y=>{i(g=>(g.set(Ya,y.id),g),{replace:!0})}})})}),e(tn,{css:In}),e(ce,{children:e(Yd,{children:d?e(u.Suspense,{fallback:e(se,{}),children:e(Ed,{spanNodeId:d,projectId:l})}):null})})]})]})}function Xd({rootSpan:n}){const{latencyMs:a,statusCode:l,spanAnnotations:t}=n??{latencyMs:null,statusCode:"UNSET",spanAnnotations:[]},i=t.length>0,r=vl(l);return e(x,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(k,{direction:"row",gap:"size-400",children:[s(k,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Trace Status"}),e(K,{textSize:"xlarge",children:s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(sa,{statusCode:l}),e(K,{textSize:"xlarge",color:r,children:l})]})})]}),s(k,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency"}),e(K,{textSize:"xlarge",children:typeof a=="number"?e(Ke,{latencyMs:a,textSize:"xlarge"}):"--"})]}),i?s(k,{direction:"column",gap:"size-50",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Feedback"}),e(k,{direction:"row",gap:"size-50",children:t.map(o=>e(Gn,{annotation:o,children:e(un,{annotation:o,annotationDisplayPreference:"label"})},o.name))})]}):null]})})}function Yd({children:n}){return e("div",{"data-testid":"scrolling-tabs-wrapper",css:C`
1461
1499
  height: 100%;
1462
1500
  overflow: hidden;
1463
1501
  .ac-tabs {
@@ -1477,10 +1515,10 @@ fragment DatasetPicker__datasets on Query {
1477
1515
  }
1478
1516
  }
1479
1517
  }
1480
- `,children:n})}function Ud({children:n}){return e("div",{"data-testid":"scrolling-panel-content",css:C`
1518
+ `,children:n})}function ec({children:n}){return e("div",{"data-testid":"scrolling-panel-content",css:C`
1481
1519
  height: 100%;
1482
1520
  overflow-y: auto;
1483
- `,children:n})}function dm(){const{traceId:n,projectId:a}=je(),l=le();return e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(`/projects/${a}`),children:e(j,{size:"fullscreen",title:"Trace Details",children:e(Qt,{traceId:n,projectId:a})})})}const Ot=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[{kind:"Literal",name:"first",value:50},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},r],c={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},f=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],p={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},b={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},S={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},h=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],v=[r];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"TracesTable_spans"},{args:null,kind:"FragmentSpread",name:"ProjectPageHeader_stats"},{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:o,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,c,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},d,m,y,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},g,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:f,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:f,storageKey:null},p,b,S,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[t,c,i,d,m,y,g,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:h,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:h,storageKey:null},p,b,S],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:o,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"},{alias:null,args:v,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:v,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"43fee2b22bc4798639d2e1fbef09ce21",id:null,metadata:{},name:"ProjectPageQuery",operationKind:"query",text:`query ProjectPageQuery(
1521
+ `,children:n})}function ym(){const{traceId:n,projectId:a}=je(),l=le();return e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(`/projects/${a}`),children:e(j,{size:"fullscreen",title:"Trace Details",children:e(Qt,{traceId:n,projectId:a})})})}const Ot=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[{kind:"Literal",name:"first",value:50},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},r],c={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},f=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],p={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},b={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},S={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},h=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],v=[r];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"TracesTable_spans"},{args:null,kind:"FragmentSpread",name:"ProjectPageHeader_stats"},{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:o,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,c,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},d,m,y,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},g,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:f,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:f,storageKey:null},p,b,S,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[t,c,i,d,m,y,g,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:h,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:h,storageKey:null},p,b,S],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:o,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"},{alias:null,args:v,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:v,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"43fee2b22bc4798639d2e1fbef09ce21",id:null,metadata:{},name:"ProjectPageQuery",operationKind:"query",text:`query ProjectPageQuery(
1484
1522
  $id: GlobalID!
1485
1523
  $timeRange: TimeRange!
1486
1524
  ) {
@@ -1687,7 +1725,7 @@ fragment ProjectPageHeader_stats on Project {
1687
1725
  documentEvaluationNames
1688
1726
  id
1689
1727
  }
1690
- `}}}();qt.hash="dcce9d160db90e2b5c51eef9971101a4";const Bt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"},a=[n];return{argumentDefinitions:[{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:qt,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ProjectPageHeader_stats",selections:[{alias:null,args:a,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:a,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null}}();Bt.hash="dcce9d160db90e2b5c51eef9971101a4";const Ht=u.createContext(null);function Rn(){const n=De.useContext(Ht);if(n===null)throw new Error("useStreamState must be used within a StreamStateProvider");return n}function Wd({initialFetchKey:n="initial",children:a}){const l=la(c=>c.traceStreamingEnabled),t=la(c=>c.setTraceStreamingEnabled),[i,r]=u.useState(n),o=u.useCallback(c=>{u.startTransition(()=>{r(c)})},[r]);return e(Ht.Provider,{value:{isStreaming:l,setIsStreaming:t,fetchKey:i,setFetchKey:o},children:a})}const Gt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"annotationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"annotationName",variableName:"annotationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"AnnotationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"bae90b7000aa37d37050070d8504b41c",id:null,metadata:{},name:"AnnotationSummaryValueQuery",operationKind:"query",text:`query AnnotationSummaryValueQuery(
1728
+ `}}}();qt.hash="dcce9d160db90e2b5c51eef9971101a4";const Ht=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"},a=[n];return{argumentDefinitions:[{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:qt,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ProjectPageHeader_stats",selections:[{alias:null,args:a,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:a,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null}}();Ht.hash="dcce9d160db90e2b5c51eef9971101a4";const Bt=u.createContext(null);function Rn(){const n=De.useContext(Bt);if(n===null)throw new Error("useStreamState must be used within a StreamStateProvider");return n}function nc({initialFetchKey:n="initial",children:a}){const l=la(c=>c.traceStreamingEnabled),t=la(c=>c.setTraceStreamingEnabled),[i,r]=u.useState(n),o=u.useCallback(c=>{u.startTransition(()=>{r(c)})},[r]);return e(Bt.Provider,{value:{isStreaming:l,setIsStreaming:t,fetchKey:i,setFetchKey:o},children:a})}const Gt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"annotationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"annotationName",variableName:"annotationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"AnnotationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"bae90b7000aa37d37050070d8504b41c",id:null,metadata:{},name:"AnnotationSummaryValueQuery",operationKind:"query",text:`query AnnotationSummaryValueQuery(
1691
1729
  $annotationName: String!
1692
1730
  $timeRange: TimeRange!
1693
1731
  $id: GlobalID!
@@ -1733,7 +1771,7 @@ fragment AnnotationSummaryValueFragment_4BTVrq on Project {
1733
1771
  }
1734
1772
  id
1735
1773
  }
1736
- `}}}();Wt.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function Jd({annotationName:n}){const{projectId:a}=je(),{timeRange:l}=oa(),t=I.useLazyLoadQuery(Wt,{annotationName:n,id:a,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(Zd,{annotationName:n,project:t.project})})]})}function Zd(n){var p,b;const{project:a,annotationName:l}=n,{fetchKey:t}=Rn(),[i,r]=I.useRefetchableFragment(Ut,a);u.useEffect(()=>{u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[t,r]);const o=Ne(),d=[Fl(l),o.default,o.gray600,o.gray400,o.gray200],m=(p=i==null?void 0:i.spanAnnotationSummary)==null?void 0:p.meanScore,y=(b=i==null?void 0:i.spanAnnotationSummary)==null?void 0:b.labelFractions,g=typeof m=="number",f=Array.isArray(y)&&y.length>0;return!g&&!f?e(K,{textSize:"xlarge",children:"--"}):s(Ce,{delay:0,placement:"bottom",children:[e(Cn,{children:s(k,{direction:"row",alignItems:"center",gap:"size-50",children:[f?e(ws,{width:24,height:24,children:e(Rs,{data:y,dataKey:"fraction",nameKey:"label",cx:"50%",cy:"50%",innerRadius:8,outerRadius:11,strokeWidth:0,stroke:"transparent",children:y.map((S,h)=>e(Ps,{fill:d[h%d.length]},`cell-${h}`))})}):null,e(K,{textSize:"xlarge",children:g?Le(m):"--"})]})}),e(Wn,{children:e(x,{width:"size-2400",children:s(k,{direction:"column",gap:"size-50",children:[f&&e("ul",{children:y.map((S,h)=>e("li",{children:e(re,{color:d[h%d.length],name:S.label,shape:"square",value:Kl(S.fraction*100)})},S.label))}),f&&g?e(ra,{}):null,g?s(k,{direction:"row",justifyContent:"space-between",children:[e(K,{children:"mean"}),e(K,{children:Le(m)})]}):null]})})})]})}const Jt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"evaluationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"evaluationName",variableName:"evaluationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"DocumentEvaluationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DocumentEvaluationSummary",kind:"LinkedField",name:"documentEvaluationSummary",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"averageNdcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averagePrecision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanReciprocalRank",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hitRate",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"60d7798d88e1408e6b6b0bebdc1716f5",id:null,metadata:{},name:"DocumentEvaluationSummaryValueQuery",operationKind:"query",text:`query DocumentEvaluationSummaryValueQuery(
1774
+ `}}}();Wt.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function ac({annotationName:n}){const{projectId:a}=je(),{timeRange:l}=oa(),t=I.useLazyLoadQuery(Wt,{annotationName:n,id:a,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(lc,{annotationName:n,project:t.project})})]})}function lc(n){var p,b;const{project:a,annotationName:l}=n,{fetchKey:t}=Rn(),[i,r]=I.useRefetchableFragment(Ut,a);u.useEffect(()=>{u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[t,r]);const o=Ne(),d=[Fl(l),o.default,o.gray600,o.gray400,o.gray200],m=(p=i==null?void 0:i.spanAnnotationSummary)==null?void 0:p.meanScore,y=(b=i==null?void 0:i.spanAnnotationSummary)==null?void 0:b.labelFractions,g=typeof m=="number",f=Array.isArray(y)&&y.length>0;return!g&&!f?e(K,{textSize:"xlarge",children:"--"}):s(Ce,{delay:0,placement:"bottom",children:[e(Cn,{children:s(k,{direction:"row",alignItems:"center",gap:"size-50",children:[f?e(Rs,{width:24,height:24,children:e(Ps,{data:y,dataKey:"fraction",nameKey:"label",cx:"50%",cy:"50%",innerRadius:8,outerRadius:11,strokeWidth:0,stroke:"transparent",children:y.map((S,h)=>e(Ms,{fill:d[h%d.length]},`cell-${h}`))})}):null,e(K,{textSize:"xlarge",children:g?Le(m):"--"})]})}),e(Wn,{children:e(x,{width:"size-2400",children:s(k,{direction:"column",gap:"size-50",children:[f&&e("ul",{children:y.map((S,h)=>e("li",{children:e(re,{color:d[h%d.length],name:S.label,shape:"square",value:Kl(S.fraction*100)})},S.label))}),f&&g?e(ra,{}):null,g?s(k,{direction:"row",justifyContent:"space-between",children:[e(K,{children:"mean"}),e(K,{children:Le(m)})]}):null]})})})]})}const Jt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"evaluationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"evaluationName",variableName:"evaluationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"DocumentEvaluationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DocumentEvaluationSummary",kind:"LinkedField",name:"documentEvaluationSummary",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"averageNdcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averagePrecision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanReciprocalRank",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hitRate",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"60d7798d88e1408e6b6b0bebdc1716f5",id:null,metadata:{},name:"DocumentEvaluationSummaryValueQuery",operationKind:"query",text:`query DocumentEvaluationSummaryValueQuery(
1737
1775
  $evaluationName: String!
1738
1776
  $timeRange: TimeRange!
1739
1777
  $id: GlobalID!
@@ -1777,7 +1815,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
1777
1815
  }
1778
1816
  id
1779
1817
  }
1780
- `}}}();Xt.hash="4d50474ffa9b9e4a68d07f6e0777c144";function Xd({evaluationName:n}){const{projectId:a}=je(),{timeRange:l}=oa(),t=I.useLazyLoadQuery(Xt,{id:a,evaluationName:n,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(Yd,{evaluationName:n,project:t==null?void 0:t.project})})]})}function Yd(n){var m,y,g,f;const{project:a}=n,{fetchKey:l}=Rn(),[t,i]=I.useRefetchableFragment(Zt,a);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=(m=t==null?void 0:t.documentEvaluationSummary)==null?void 0:m.averageNdcg,o=(y=t==null?void 0:t.documentEvaluationSummary)==null?void 0:y.averagePrecision,c=(g=t==null?void 0:t.documentEvaluationSummary)==null?void 0:g.hitRate,d=(f=t==null?void 0:t.documentEvaluationSummary)==null?void 0:f.meanReciprocalRank;return s(Ce,{delay:0,placement:"bottom",children:[e(Cn,{children:e(k,{direction:"row",alignItems:"center",gap:"size-50",height:"28px",children:s(W,{children:[e(fe,{metric:"ndcg",score:r},"ndcg"),e(fe,{metric:"precision",score:o},"precision"),e(fe,{metric:"hit rate",score:c},"hit")]})})}),e(Wn,{children:e(x,{width:"size-2400",children:s(k,{direction:"column",children:[s(k,{justifyContent:"space-between",children:[e(K,{children:"average ndcg"}),e(K,{children:typeof r=="number"?Le(r):"--"})]}),s(k,{justifyContent:"space-between",children:[e(K,{children:"average precision"}),e(K,{children:typeof o=="number"?Le(o):"--"})]}),s(k,{justifyContent:"space-between",children:[e(K,{children:"mean reciprocal rank"}),e(K,{children:typeof d=="number"?Le(d):"--"})]}),s(k,{justifyContent:"space-between",children:[e(K,{children:"hit rate"}),e(K,{children:typeof c=="number"?Le(c):"--"})]})]})})})]})}function ec(n){const{extra:a}=n,{fetchKey:l}=Rn(),[t,i]=I.useRefetchableFragment(Bt,n.project);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=t==null?void 0:t.latencyMsP50,o=t==null?void 0:t.latencyMsP99,c=t==null?void 0:t.tokenCountTotal,d=t==null?void 0:t.spanAnnotationNames,m=t==null?void 0:t.documentEvaluationNames;return e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e("div",{css:C`
1818
+ `}}}();Xt.hash="4d50474ffa9b9e4a68d07f6e0777c144";function tc({evaluationName:n}){const{projectId:a}=je(),{timeRange:l}=oa(),t=I.useLazyLoadQuery(Xt,{id:a,evaluationName:n,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(ic,{evaluationName:n,project:t==null?void 0:t.project})})]})}function ic(n){var m,y,g,f;const{project:a}=n,{fetchKey:l}=Rn(),[t,i]=I.useRefetchableFragment(Zt,a);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=(m=t==null?void 0:t.documentEvaluationSummary)==null?void 0:m.averageNdcg,o=(y=t==null?void 0:t.documentEvaluationSummary)==null?void 0:y.averagePrecision,c=(g=t==null?void 0:t.documentEvaluationSummary)==null?void 0:g.hitRate,d=(f=t==null?void 0:t.documentEvaluationSummary)==null?void 0:f.meanReciprocalRank;return s(Ce,{delay:0,placement:"bottom",children:[e(Cn,{children:e(k,{direction:"row",alignItems:"center",gap:"size-50",height:"28px",children:s(W,{children:[e(fe,{metric:"ndcg",score:r},"ndcg"),e(fe,{metric:"precision",score:o},"precision"),e(fe,{metric:"hit rate",score:c},"hit")]})})}),e(Wn,{children:e(x,{width:"size-2400",children:s(k,{direction:"column",children:[s(k,{justifyContent:"space-between",children:[e(K,{children:"average ndcg"}),e(K,{children:typeof r=="number"?Le(r):"--"})]}),s(k,{justifyContent:"space-between",children:[e(K,{children:"average precision"}),e(K,{children:typeof o=="number"?Le(o):"--"})]}),s(k,{justifyContent:"space-between",children:[e(K,{children:"mean reciprocal rank"}),e(K,{children:typeof d=="number"?Le(d):"--"})]}),s(k,{justifyContent:"space-between",children:[e(K,{children:"hit rate"}),e(K,{children:typeof c=="number"?Le(c):"--"})]})]})})})]})}function rc(n){const{extra:a}=n,{fetchKey:l}=Rn(),[t,i]=I.useRefetchableFragment(Ht,n.project);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=t==null?void 0:t.latencyMsP50,o=t==null?void 0:t.latencyMsP99,c=t==null?void 0:t.tokenCountTotal,d=t==null?void 0:t.spanAnnotationNames,m=t==null?void 0:t.documentEvaluationNames;return e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e("div",{css:C`
1781
1819
  overflow-x: auto;
1782
1820
  overflow-y: hidden;
1783
1821
  flex: 1 1 auto;
@@ -1813,7 +1851,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
1813
1851
  left center,
1814
1852
  right center;
1815
1853
  background-attachment: local, local, scroll, scroll;
1816
- `,children:s(k,{direction:"row",gap:"size-400",alignItems:"center",children:[s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(K,{textSize:"xlarge",children:sn(t==null?void 0:t.traceCount)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:sn(c)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),r!=null?e(Ke,{latencyMs:r,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P99"}),o!=null?e(Ke,{latencyMs:o,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),d.map(y=>e(Jd,{annotationName:y},y)),m.map(y=>e(Xd,{evaluationName:y},`document-${y}`))]})}),e(x,{flex:"none",paddingStart:"size-100",children:a})]})})}const Yt=u.createContext(null);function ei(){const n=u.useContext(Yt);if(n===null)throw new Error("useSpanFilterCondition must be used within a SpanFilterConditionProvider");return n}function el(n){const[a,l]=u.useState(""),t=u.useCallback(r=>{u.startTransition(()=>{l(r)})},[]),i=u.useCallback(r=>{u.startTransition(()=>{a.length>0?l(a+" and "+r):l(r)})},[a]);return e(Yt.Provider,{value:{filterCondition:a,setFilterCondition:t,appendFilterCondition:i},children:n.children})}const ni=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},y={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},b=[c,d,m,y,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],S=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,m,y],kind:"FragmentSpread",name:"SpansTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"TypeDiscriminator",abstractKey:"__isNode"},f,{kind:"InlineFragment",selections:[p,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:b,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[f,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},p,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:S,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:S,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[p,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[g],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:b,filters:["sort","filterCondition","timeRange"],handle:"connection",key:"SpansTable_spans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"21dc6f490cf749c02bc20bcdb43c199c",id:null,metadata:{},name:"SpansTableSpansQuery",operationKind:"query",text:`query SpansTableSpansQuery(
1854
+ `,children:s(k,{direction:"row",gap:"size-400",alignItems:"center",children:[s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(K,{textSize:"xlarge",children:sn(t==null?void 0:t.traceCount)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:sn(c)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),r!=null?e(Ke,{latencyMs:r,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P99"}),o!=null?e(Ke,{latencyMs:o,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),d.map(y=>e(ac,{annotationName:y},y)),m.map(y=>e(tc,{evaluationName:y},`document-${y}`))]})}),e(x,{flex:"none",paddingStart:"size-100",children:a})]})})}const Yt=u.createContext(null);function ei(){const n=u.useContext(Yt);if(n===null)throw new Error("useSpanFilterCondition must be used within a SpanFilterConditionProvider");return n}function el(n){const[a,l]=u.useState(""),t=u.useCallback(r=>{u.startTransition(()=>{l(r)})},[]),i=u.useCallback(r=>{u.startTransition(()=>{a.length>0?l(a+" and "+r):l(r)})},[a]);return e(Yt.Provider,{value:{filterCondition:a,setFilterCondition:t,appendFilterCondition:i},children:n.children})}const ni=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},y={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},b=[c,d,m,y,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],S=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,m,y],kind:"FragmentSpread",name:"SpansTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"TypeDiscriminator",abstractKey:"__isNode"},f,{kind:"InlineFragment",selections:[p,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:b,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[f,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},p,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:S,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:S,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[p,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[g],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:b,filters:["sort","filterCondition","timeRange"],handle:"connection",key:"SpansTable_spans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"21dc6f490cf749c02bc20bcdb43c199c",id:null,metadata:{},name:"SpansTableSpansQuery",operationKind:"query",text:`query SpansTableSpansQuery(
1817
1855
  $after: String = null
1818
1856
  $filterCondition: String = null
1819
1857
  $first: Int = 50
@@ -1884,14 +1922,14 @@ fragment SpansTable_spans_1XEuU on Project {
1884
1922
  }
1885
1923
  id
1886
1924
  }
1887
- `}}}();ni.hash="4827989f55b1c0bd269253b6bc977439";const ai=function(){var n=["spans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:ni,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpansTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"spans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__SpansTable_spans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();ai.hash="4827989f55b1c0bd269253b6bc977439";const li=u.createContext(null);function nc({children:n,...a}){const l=u.useRef();return l.current||(l.current=os(a)),e(li.Provider,{value:l.current,children:n})}function Oe(n,a){const l=De.useContext(li);if(!l)throw new Error("Missing TracingContext.Provider in the tree");return dl(l,n,a)}function ti(n){const{appendFilterCondition:a}=ei(),{annotation:l}=n,{name:t,label:i,score:r}=l,o=u.useMemo(()=>{const c=[];return i!=null&&(c.push({filterName:"Match label",filterCondition:`annotations['${t}'].label == "${i}"`}),c.push({filterName:"Exclude label",filterCondition:`annotations['${t}'].label != "${i}"`})),typeof r=="number"&&(c.push({filterName:"Greater than score",filterCondition:`annotations['${t}'].score > ${r}`}),c.push({filterName:"Less than score",filterCondition:`annotations['${t}'].score < ${r}`}),c.push({filterName:"Equals score",filterCondition:`annotations['${t}'].score == ${r}`})),c},[t,i,r]);return s(x,{borderStartWidth:"thin",borderColor:"dark",paddingStart:"size-200",paddingEnd:"size-100",marginStart:"size-200",width:300,children:[e(K,{textSize:"large",weight:"heavy",children:"Filters"}),e("ul",{css:C`
1925
+ `}}}();ni.hash="4827989f55b1c0bd269253b6bc977439";const ai=function(){var n=["spans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:ni,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpansTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"spans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__SpansTable_spans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();ai.hash="4827989f55b1c0bd269253b6bc977439";const li=u.createContext(null);function sc({children:n,...a}){const l=u.useRef();return l.current||(l.current=ds(a)),e(li.Provider,{value:l.current,children:n})}function Oe(n,a){const l=De.useContext(li);if(!l)throw new Error("Missing TracingContext.Provider in the tree");return dl(l,n,a)}function ti(n){const{appendFilterCondition:a}=ei(),{annotation:l}=n,{name:t,label:i,score:r}=l,o=u.useMemo(()=>{const c=[];return i!=null&&(c.push({filterName:"Match label",filterCondition:`annotations['${t}'].label == "${i}"`}),c.push({filterName:"Exclude label",filterCondition:`annotations['${t}'].label != "${i}"`})),typeof r=="number"&&(c.push({filterName:"Greater than score",filterCondition:`annotations['${t}'].score > ${r}`}),c.push({filterName:"Less than score",filterCondition:`annotations['${t}'].score < ${r}`}),c.push({filterName:"Equals score",filterCondition:`annotations['${t}'].score == ${r}`})),c},[t,i,r]);return s(x,{borderStartWidth:"thin",borderColor:"dark",paddingStart:"size-200",paddingEnd:"size-100",marginStart:"size-200",width:300,children:[e(K,{textSize:"large",weight:"heavy",children:"Filters"}),e("ul",{css:C`
1888
1926
  display: flex;
1889
1927
  flex-direction: row;
1890
1928
  gap: var(--ac-global-dimension-size-100);
1891
1929
  color: var(--ac-global-color-primary);
1892
1930
  padding: var(--ac-global-dimension-size-100) 0;
1893
1931
  flex-wrap: wrap;
1894
- `,children:o.map(c=>e("li",{children:e(ac,{onClick:()=>{a(c.filterCondition)},children:c.filterName})},c.filterName))})]})}function ac({onClick:n,children:a}){return e("button",{onClick:l=>{l.preventDefault(),l.stopPropagation(),n()},className:"button--reset",css:C`
1932
+ `,children:o.map(c=>e("li",{children:e(oc,{onClick:()=>{a(c.filterCondition)},children:c.filterName})},c.filterName))})]})}function oc({onClick:n,children:a}){return e("button",{onClick:l=>{l.preventDefault(),l.stopPropagation(),n()},className:"button--reset",css:C`
1895
1933
  color: var(--ac-global-text-color-900);
1896
1934
  border: 1px solid var(--ac-global-color-gray-200);
1897
1935
  border-radius: 4px;
@@ -1902,10 +1940,10 @@ fragment SpansTable_spans_1XEuU on Project {
1902
1940
  &:hover {
1903
1941
  background-color: var(--ac-global-color-gray-300);
1904
1942
  }
1905
- `,children:a})}function lc({projectName:n}){const[a,l]=u.useState("Python");return e(j,{title:"Send Traces to this Project",size:"L",children:s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(xl,{language:a,onChange:l})}),a==="Python"?e(Dl,{projectName:n}):e(Tl,{projectName:n})]})})}function ii({projectName:n}){const[a,l]=u.useState(null),t=()=>{l(e(lc,{projectName:n}))};return s("tbody",{className:"is-empty",children:[e("tr",{children:e("td",{colSpan:100,css:i=>C`
1943
+ `,children:a})}function dc({projectName:n}){const[a,l]=u.useState("Python");return e(j,{title:"Send Traces to this Project",size:"L",children:s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(xl,{language:a,onChange:l})}),a==="Python"?e(Dl,{projectName:n}):e(Tl,{projectName:n})]})})}function ii({projectName:n}){const[a,l]=u.useState(null),t=()=>{l(e(dc,{projectName:n}))};return s("tbody",{className:"is-empty",children:[e("tr",{children:e("td",{colSpan:100,css:i=>C`
1906
1944
  text-align: center;
1907
1945
  padding: ${i.spacing.margin24}px ${i.spacing.margin24}px !important;
1908
- `,children:s(k,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",e(V,{variant:"default",icon:e(w,{svg:e(E.PlayCircleOutline,{})}),onClick:t,children:"Get Started"})]})})}),e(J,{onDismiss:()=>l(null),isDismissable:!0,type:"slideOver",children:a})]})}const ri={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanColumnSelector_annotations",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null};ri.hash="ad01e6897ad1ea779eb346d85783b8b4";const tc=["spanKind","name"];function si(n){return e(za,{menu:e(ic,{...n}),triggerProps:{placement:"bottom end"},children:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(w,{svg:e(E.Column,{})}),"Columns"]})})}const ta=C`
1946
+ `,children:s(k,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",e(V,{variant:"default",icon:e(w,{svg:e(A.PlayCircleOutline,{})}),onClick:t,children:"Get Started"})]})})}),e(J,{onDismiss:()=>l(null),isDismissable:!0,type:"slideOver",children:a})]})}const ri={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanColumnSelector_annotations",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null};ri.hash="ad01e6897ad1ea779eb346d85783b8b4";const cc=["spanKind","name"];function si(n){return e(za,{menu:e(uc,{...n}),triggerProps:{placement:"bottom end"},children:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(w,{svg:e(A.Column,{})}),"Columns"]})})}const ta=C`
1909
1947
  padding: var(--ac-global-dimension-static-size-50)
1910
1948
  var(--ac-global-dimension-static-size-100);
1911
1949
  label {
@@ -1913,10 +1951,10 @@ fragment SpansTable_spans_1XEuU on Project {
1913
1951
  align-items: center;
1914
1952
  gap: var(--ac-global-dimension-static-size-100);
1915
1953
  }
1916
- `;function ic(n){const{columns:a}=n,l=Oe(d=>d.columnVisibility),t=Oe(d=>d.setColumnVisibility),i=u.useMemo(()=>a.filter(d=>!tc.includes(d.id)),[a]),r=u.useMemo(()=>i.every(d=>{const m=l[d.id];return m??!0}),[i,l]),o=u.useCallback(d=>{const{name:m,checked:y}=d.target;t({...l,[m]:y})},[l,t]),c=u.useCallback(d=>{const{checked:m}=d.target,y=i.reduce((g,f)=>({...g,[f.id]:m}),{});t(y)},[i,t]);return e("div",{css:C`
1954
+ `;function uc(n){const{columns:a}=n,l=Oe(d=>d.columnVisibility),t=Oe(d=>d.setColumnVisibility),i=u.useMemo(()=>a.filter(d=>!cc.includes(d.id)),[a]),r=u.useMemo(()=>i.every(d=>{const m=l[d.id];return m??!0}),[i,l]),o=u.useCallback(d=>{const{name:m,checked:y}=d.target;t({...l,[m]:y})},[l,t]),c=u.useCallback(d=>{const{checked:m}=d.target,y=i.reduce((g,f)=>({...g,[f.id]:m}),{});t(y)},[i,t]);return e("div",{css:C`
1917
1955
  overflow-y: auto;
1918
1956
  max-height: calc(100vh - 200px);
1919
- `,children:s(x,{paddingTop:"size-50",paddingBottom:"size-50",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",paddingBottom:"size-50",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-all",checked:r,onChange:c}),"span columns"]})})}),e("ul",{children:i.map(d=>{const m=l[d.id],y=m??!0,g=typeof d.columnDef.header=="string"?d.columnDef.header:d.id;return e("li",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:d.id,checked:y,onChange:o}),g]})},d.id)})}),e(rc,{...n})]})})}function rc({query:n}){const a=I.useFragment(ri,n),l=Oe(o=>o.annotationColumnVisibility),t=Oe(o=>o.setAnnotationColumnVisibility),i=u.useMemo(()=>a.spanAnnotationNames.every(o=>l[o]||!1),[a.spanAnnotationNames,l]),r=u.useCallback(()=>{const o=a.spanAnnotationNames.reduce((c,d)=>({...c,[d]:!i}),{});t(o)},[a.spanAnnotationNames,t,i]);return s("section",{children:[e(x,{paddingTop:"size-50",paddingBottom:"size-50",borderColor:"dark",borderTopWidth:"thin",borderBottomWidth:"thin",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-evaluations-all",checked:i,onChange:r}),"feedback"]})})}),e("ul",{children:a.spanAnnotationNames.map(o=>{const c=l[o]??!1;return e("li",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:o,checked:c,onChange:()=>{t({...l,[o]:!c})}}),o]})},o)})})]})}const oi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"condition"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"condition",variableName:"condition"}],concreteType:"ValidationResult",kind:"LinkedField",name:"validateSpanFilterCondition",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"isValid",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorMessage",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{cacheID:"29583e7ec666cef832dc7effb9e75678",id:null,metadata:{},name:"SpanFilterConditionFieldValidationQuery",operationKind:"query",text:`query SpanFilterConditionFieldValidationQuery(
1957
+ `,children:s(x,{paddingTop:"size-50",paddingBottom:"size-50",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",paddingBottom:"size-50",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-all",checked:r,onChange:c}),"span columns"]})})}),e("ul",{children:i.map(d=>{const m=l[d.id],y=m??!0,g=typeof d.columnDef.header=="string"?d.columnDef.header:d.id;return e("li",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:d.id,checked:y,onChange:o}),g]})},d.id)})}),e(mc,{...n})]})})}function mc({query:n}){const a=I.useFragment(ri,n),l=Oe(o=>o.annotationColumnVisibility),t=Oe(o=>o.setAnnotationColumnVisibility),i=u.useMemo(()=>a.spanAnnotationNames.every(o=>l[o]||!1),[a.spanAnnotationNames,l]),r=u.useCallback(()=>{const o=a.spanAnnotationNames.reduce((c,d)=>({...c,[d]:!i}),{});t(o)},[a.spanAnnotationNames,t,i]);return s("section",{children:[e(x,{paddingTop:"size-50",paddingBottom:"size-50",borderColor:"dark",borderTopWidth:"thin",borderBottomWidth:"thin",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-evaluations-all",checked:i,onChange:r}),"feedback"]})})}),e("ul",{children:a.spanAnnotationNames.map(o=>{const c=l[o]??!1;return e("li",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:o,checked:c,onChange:()=>{t({...l,[o]:!c})}}),o]})},o)})})]})}const oi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"condition"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"condition",variableName:"condition"}],concreteType:"ValidationResult",kind:"LinkedField",name:"validateSpanFilterCondition",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"isValid",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorMessage",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{cacheID:"29583e7ec666cef832dc7effb9e75678",id:null,metadata:{},name:"SpanFilterConditionFieldValidationQuery",operationKind:"query",text:`query SpanFilterConditionFieldValidationQuery(
1920
1958
  $condition: String!
1921
1959
  $id: GlobalID!
1922
1960
  ) {
@@ -1963,19 +2001,19 @@ fragment SpansTable_spans_1XEuU on Project {
1963
2001
  border-color: var(--ac-global-color-danger);
1964
2002
  }
1965
2003
  box-sizing: border-box;
1966
- `;function sc(n){const a=n.matchBefore(/\w*/);return!a||a.from==a.to&&!n.explicit?null:{from:a.from,options:[{label:"span_kind",type:"variable",info:"The span variant: CHAIN, LLM, RETRIEVER, TOOL, etc."},{label:"status_code",type:"variable",info:"The span status: OK, UNSET, or ERROR"},{label:"input.value",type:"variable",info:"The input value of a span, typically a query"},{label:"output.value",type:"variable",info:"The output value of a span, typically a response"},{label:"name",type:"variable",info:"The name given to a span - e.x. OpenAI"},{label:"latency_ms",type:"variable",info:"Latency (i.e. duration) in milliseconds"},{label:"cumulative_token_count.prompt",type:"variable",info:"Sum of token count for prompt from self and all child spans"},{label:"cumulative_token_count.completion",type:"variable",info:"Sum of token count for completion from self and all child spans"},{label:"cumulative_token_count.total",type:"variable",info:"Sum of token count total (prompt + completion) from self and all child spans"},{label:"llm spans",type:"text",apply:"span_kind == 'LLM'",detail:"macro"},{label:"retriever spans",type:"text",apply:"span_kind == 'RETRIEVER'",detail:"macro"},{label:"search input",type:"text",apply:"'' in input.value",detail:"macro"},{label:"search output",type:"text",apply:"'' in output.value",detail:"macro"},{label:"status_code error",type:"text",apply:"status_code == 'ERROR'",detail:"macro"},{label:"Latency >= 10s",type:"text",apply:"latency_ms >= 10_000",detail:"macro"},{label:"Tokens >= 1,000",type:"text",apply:"llm.token_count.total >= 1_000",detail:"macro"},{label:"Hallucinations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Annotations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Metadata",type:"text",apply:"metadata['topic'] == 'agent'",detail:"macro"},{label:"Substring",type:"text",apply:"'agent' in input.value",detail:"macro"}]}}async function oc(n,a){if(!n)return{isValid:!0,errorMessage:null};const l=await Kr.fetchQuery(Te,oi,{condition:n,id:a}).toPromise();if(!l)throw new Error("Filter condition validation is null");return l.project.validateSpanFilterCondition}const dc=[Vs.of([{key:"Enter",run:n=>!0}]),Oa(),$s({override:[sc]})];function ui(n){const{onValidCondition:a,placeholder:l="filter condition (e.x. span_kind == 'LLM')"}=n,[t,i]=u.useState(!1),[r,o]=u.useState(""),{filterCondition:c,setFilterCondition:d,appendFilterCondition:m}=ei(),y=u.useDeferredValue(c),{theme:g}=Bn(),f=g==="dark"?ga:void 0,{projectId:p}=je();u.useEffect(()=>{oc(y,p).then(h=>{h!=null&&h.isValid?(o(""),u.startTransition(()=>{a(y)})):o((h==null?void 0:h.errorMessage)??"Invalid filter condition")})},[a,y,p]);const b=r!=="",S=c!=="";return s("div",{"data-is-focused":t,"data-is-invalid":b,className:"span-filter-condition-field",css:ci,children:[s(k,{direction:"row",children:[e(Ls,{children:e(w,{svg:e(E.Search,{})})}),e(ma,{css:di,indentWithTab:!1,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},onFocus:()=>i(!0),onBlur:()=>i(!1),value:c,onChange:d,height:"36px",width:"100%",theme:f,placeholder:l,extensions:dc}),e("button",{css:C`
2004
+ `;function gc(n){const a=n.matchBefore(/\w*/);return!a||a.from==a.to&&!n.explicit?null:{from:a.from,options:[{label:"span_kind",type:"variable",info:"The span variant: CHAIN, LLM, RETRIEVER, TOOL, etc."},{label:"status_code",type:"variable",info:"The span status: OK, UNSET, or ERROR"},{label:"input.value",type:"variable",info:"The input value of a span, typically a query"},{label:"output.value",type:"variable",info:"The output value of a span, typically a response"},{label:"name",type:"variable",info:"The name given to a span - e.x. OpenAI"},{label:"latency_ms",type:"variable",info:"Latency (i.e. duration) in milliseconds"},{label:"cumulative_token_count.prompt",type:"variable",info:"Sum of token count for prompt from self and all child spans"},{label:"cumulative_token_count.completion",type:"variable",info:"Sum of token count for completion from self and all child spans"},{label:"cumulative_token_count.total",type:"variable",info:"Sum of token count total (prompt + completion) from self and all child spans"},{label:"llm spans",type:"text",apply:"span_kind == 'LLM'",detail:"macro"},{label:"retriever spans",type:"text",apply:"span_kind == 'RETRIEVER'",detail:"macro"},{label:"search input",type:"text",apply:"'' in input.value",detail:"macro"},{label:"search output",type:"text",apply:"'' in output.value",detail:"macro"},{label:"status_code error",type:"text",apply:"status_code == 'ERROR'",detail:"macro"},{label:"Latency >= 10s",type:"text",apply:"latency_ms >= 10_000",detail:"macro"},{label:"Tokens >= 1,000",type:"text",apply:"llm.token_count.total >= 1_000",detail:"macro"},{label:"Hallucinations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Annotations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Metadata",type:"text",apply:"metadata['topic'] == 'agent'",detail:"macro"},{label:"Substring",type:"text",apply:"'agent' in input.value",detail:"macro"}]}}async function pc(n,a){if(!n)return{isValid:!0,errorMessage:null};const l=await xr.fetchQuery(Te,oi,{condition:n,id:a}).toPromise();if(!l)throw new Error("Filter condition validation is null");return l.project.validateSpanFilterCondition}const yc=[$s.of([{key:"Enter",run:n=>!0}]),Oa(),zs({override:[gc]})];function ui(n){const{onValidCondition:a,placeholder:l="filter condition (e.x. span_kind == 'LLM')"}=n,[t,i]=u.useState(!1),[r,o]=u.useState(""),{filterCondition:c,setFilterCondition:d,appendFilterCondition:m}=ei(),y=u.useDeferredValue(c),{theme:g}=Hn(),f=g==="dark"?ga:void 0,{projectId:p}=je();u.useEffect(()=>{pc(y,p).then(h=>{h!=null&&h.isValid?(o(""),u.startTransition(()=>{a(y)})):o((h==null?void 0:h.errorMessage)??"Invalid filter condition")})},[a,y,p]);const b=r!=="",S=c!=="";return s("div",{"data-is-focused":t,"data-is-invalid":b,className:"span-filter-condition-field",css:ci,children:[s(k,{direction:"row",children:[e(_s,{children:e(w,{svg:e(A.Search,{})})}),e(ma,{css:di,indentWithTab:!1,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},onFocus:()=>i(!0),onBlur:()=>i(!1),value:c,onChange:d,height:"36px",width:"100%",theme:f,placeholder:l,extensions:yc}),e("button",{css:C`
1967
2005
  margin-right: var(--ac-global-dimension-static-size-100);
1968
2006
  color: var(--ac-global-text-color-700);
1969
2007
  visibility: ${S?"visible":"hidden"};
1970
- `,onClick:()=>d(""),className:"button--reset",children:e(w,{svg:e(E.CloseCircleOutline,{})})}),s(gn,{placement:"bottom right",children:[e(Cn,{children:e("button",{css:C`
2008
+ `,onClick:()=>d(""),className:"button--reset",children:e(w,{svg:e(A.CloseCircleOutline,{})})}),s(gn,{placement:"bottom right",children:[e(Cn,{children:e("button",{css:C`
1971
2009
  color: var(--ac-global-text-color-700);
1972
2010
  background-color: var(--ac-global-color-grey-400);
1973
2011
  padding-left: var(--ac-global-dimension-static-size-100);
1974
2012
  padding-right: var(--ac-global-dimension-static-size-100);
1975
2013
  height: 100%;
1976
- `,className:"button--reset",children:e(w,{svg:e(E.PlusCircleOutline,{})})})}),e(cc,{onAddFilterConditionSnippet:m})]})]}),s(Ce,{isOpen:b&&t,placement:"bottom",children:[e(Cn,{children:e("div",{})}),e(Wn,{children:r!=""?e(K,{color:"danger",children:r}):e(K,{color:"success",children:"Valid Expression"})})]})]})}function cc(n){const{onAddFilterConditionSnippet:a}=n;return e(x,{width:"500px",paddingTop:"size-200",paddingStart:"size-200",paddingEnd:"size-200",borderRadius:"medium",borderWidth:"thin",borderColor:"light",backgroundColor:"light",children:s(on,{children:[e(Xe,{label:"filter by kind",initialSnippet:"span_kind == 'LLM'",onAddFilterConditionSnippet:a},"kind"),e(Xe,{label:"filter by token count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:a},"token_count"),e(Xe,{label:"filter by annotation label",initialSnippet:"annotations['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"annotation_label"),e(Xe,{label:"filter by evaluation label",initialSnippet:"evals['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"eval_label"),e(Xe,{label:"filter by evaluation score",initialSnippet:"evals['Hallucination'].score < 1",onAddFilterConditionSnippet:a},"eval_score"),e(Xe,{label:"filter by metadata",initialSnippet:"metadata['topic'] == 'agent'",onAddFilterConditionSnippet:a},"metadata"),e(Xe,{label:"filter by substring",initialSnippet:"'agent' in input.value",onAddFilterConditionSnippet:a},"substring")]})})}function Xe(n){const{initialSnippet:a,onAddFilterConditionSnippet:l}=n,[t,i]=u.useState(a),{theme:r}=Bn(),o=r==="light"?void 0:ga;return e(ua,{label:n.label,children:s(k,{direction:"row",width:"100%",gap:"size-100",children:[e("div",{css:C(ci,C`
2014
+ `,className:"button--reset",children:e(w,{svg:e(A.PlusCircleOutline,{})})})}),e(fc,{onAddFilterConditionSnippet:m})]})]}),s(Ce,{isOpen:b&&t,placement:"bottom",children:[e(Cn,{children:e("div",{})}),e(Wn,{children:r!=""?e(K,{color:"danger",children:r}):e(K,{color:"success",children:"Valid Expression"})})]})]})}function fc(n){const{onAddFilterConditionSnippet:a}=n;return e(x,{width:"500px",paddingTop:"size-200",paddingStart:"size-200",paddingEnd:"size-200",borderRadius:"medium",borderWidth:"thin",borderColor:"light",backgroundColor:"light",children:s(on,{children:[e(Xe,{label:"filter by kind",initialSnippet:"span_kind == 'LLM'",onAddFilterConditionSnippet:a},"kind"),e(Xe,{label:"filter by token count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:a},"token_count"),e(Xe,{label:"filter by annotation label",initialSnippet:"annotations['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"annotation_label"),e(Xe,{label:"filter by evaluation label",initialSnippet:"evals['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"eval_label"),e(Xe,{label:"filter by evaluation score",initialSnippet:"evals['Hallucination'].score < 1",onAddFilterConditionSnippet:a},"eval_score"),e(Xe,{label:"filter by metadata",initialSnippet:"metadata['topic'] == 'agent'",onAddFilterConditionSnippet:a},"metadata"),e(Xe,{label:"filter by substring",initialSnippet:"'agent' in input.value",onAddFilterConditionSnippet:a},"substring")]})})}function Xe(n){const{initialSnippet:a,onAddFilterConditionSnippet:l}=n,[t,i]=u.useState(a),{theme:r}=Hn(),o=r==="light"?void 0:ga;return e(ua,{label:n.label,children:s(k,{direction:"row",width:"100%",gap:"size-100",children:[e("div",{css:C(ci,C`
1977
2015
  flex: 1 1 auto;
1978
- `),children:e(ma,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Oa()],editable:!0,onChange:i,theme:o,css:di})}),e(V,{title:"Add to filter condition",variant:"default",onClick:()=>l(t),icon:e(w,{svg:e(E.PlusCircleOutline,{})})})]})})}const mi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addSpansToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a},params:{cacheID:"1c694540190478b8fba8ef3c0cacf30c",id:null,metadata:{},name:"SpanSelectionToolbarAddSpansToDatasetMutation",operationKind:"mutation",text:`mutation SpanSelectionToolbarAddSpansToDatasetMutation(
2016
+ `),children:e(ma,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Oa()],editable:!0,onChange:i,theme:o,css:di})}),e(V,{title:"Add to filter condition",variant:"default",onClick:()=>l(t),icon:e(w,{svg:e(A.PlusCircleOutline,{})})})]})})}const mi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addSpansToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a},params:{cacheID:"1c694540190478b8fba8ef3c0cacf30c",id:null,metadata:{},name:"SpanSelectionToolbarAddSpansToDatasetMutation",operationKind:"mutation",text:`mutation SpanSelectionToolbarAddSpansToDatasetMutation(
1979
2017
  $input: AddSpansToDatasetInput!
1980
2018
  ) {
1981
2019
  addSpansToDataset(input: $input) {
@@ -2012,15 +2050,15 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
2012
2050
  }
2013
2051
  }
2014
2052
  }
2015
- `}};yi.hash="7cd8a13144d97d2b5294f2a09c9e1351";function uc(n){const{onCreateNewDataset:a,onDatasetSelected:l}=n,[t,i]=u.useState(""),r=I.useLazyLoadQuery(yi,{},{fetchPolicy:"network-only"});return s(Q,{title:"Add to Dataset",variant:"compact",backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},extra:e(V,{variant:"default",size:"compact",onClick:a,children:"New Dataset"}),children:[e(x,{padding:"size-100",children:e(ae,{type:"search",placeholder:"Search datasets",addonBefore:e(w,{svg:e(E.Search,{})}),onChange:o=>{i(o)}})}),e(x,{borderTopWidth:"thin",borderColor:"light",children:e("div",{css:C`
2053
+ `}};yi.hash="7cd8a13144d97d2b5294f2a09c9e1351";function hc(n){const{onCreateNewDataset:a,onDatasetSelected:l}=n,[t,i]=u.useState(""),r=I.useLazyLoadQuery(yi,{},{fetchPolicy:"network-only"});return s(Q,{title:"Add to Dataset",variant:"compact",backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},extra:e(V,{variant:"default",size:"compact",onClick:a,children:"New Dataset"}),children:[e(x,{padding:"size-100",children:e(ae,{type:"search",placeholder:"Search datasets",addonBefore:e(w,{svg:e(A.Search,{})}),onChange:o=>{i(o)}})}),e(x,{borderTopWidth:"thin",borderColor:"light",children:e("div",{css:C`
2016
2054
  height: 400px;
2017
2055
  overflow-y: auto;
2018
- `,children:e(mc,{query:r,search:t,onDatasetSelected:l})})})]})}function mc(n){const{search:a,onDatasetSelected:l}=n,[t]=I.useRefetchableFragment(pi,n.query),i=u.useMemo(()=>{let o=t.datasets.edges.map(c=>c.dataset);return a&&(o=o.filter(c=>c.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(k,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})}):e(Un,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const c=Array.from(o);l(c[0])}},children:i.map(o=>e(G,{children:o.name},o.id))})}function fi(n){const a=le(),[l,t]=u.useState(null),i=pe(),r=Ln(),[o,c]=u.useState(!1),{selectedSpans:d,onClearSelection:m}=n,[y,g]=I.useMutation(mi),f=d.length!==1,p=u.useCallback(b=>{y({variables:{input:{datasetId:b,spanIds:d.map(S=>S.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${f?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${b}/examples`)}}}),m()},onError:S=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${S.message}`})}})},[y,d,i,f,m,a,r]);return s("div",{css:C`
2056
+ `,children:e(kc,{query:r,search:t,onDatasetSelected:l})})})]})}function kc(n){const{search:a,onDatasetSelected:l}=n,[t]=I.useRefetchableFragment(pi,n.query),i=u.useMemo(()=>{let o=t.datasets.edges.map(c=>c.dataset);return a&&(o=o.filter(c=>c.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(k,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})}):e(Un,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const c=Array.from(o);l(c[0])}},children:i.map(o=>e(G,{children:o.name},o.id))})}function fi(n){const a=le(),[l,t]=u.useState(null),i=pe(),r=Ln(),[o,c]=u.useState(!1),{selectedSpans:d,onClearSelection:m}=n,[y,g]=I.useMutation(mi),f=d.length!==1,p=u.useCallback(b=>{y({variables:{input:{datasetId:b,spanIds:d.map(S=>S.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${f?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${b}/examples`)}}}),m()},onError:S=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${S.message}`})}})},[y,d,i,f,m,a,r]);return s("div",{css:C`
2019
2057
  position: absolute;
2020
2058
  bottom: var(--ac-global-dimension-size-400);
2021
2059
  left: 50%;
2022
2060
  transform: translateX(-50%);
2023
- `,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${d.length} span${f?"s":""} selected`}),s(k,{direction:"row",gap:"size-100",children:[e(V,{variant:"default",size:"compact",onClick:m,children:"Cancel"}),s(gn,{placement:"top end",crossOffset:300,isOpen:o,onOpenChange:b=>{c(b)},children:[e(V,{variant:"primary",size:"compact",icon:e(w,{svg:e(E.DatabaseOutline,{})}),loading:g,disabled:g,children:g?"Adding to dataset":"Add to dataset"}),e(u.Suspense,{children:e(uc,{onDatasetSelected:b=>{p(b),c(!1)},onCreateNewDataset:()=>{c(!1),t(e(j,{title:"New Dataset",isDismissable:!0,onDismiss:()=>t(null),children:e(Ra,{onDatasetCreateError:()=>{r({title:"Dataset creation failed",message:"Failed to create dataset."})},onDatasetCreated:b=>{t(null),i({title:"Dataset created",message:`${b.name} has been successfully created.`}),c(!0)}})}))}})})]})]})]})}),e(J,{onDismiss:()=>{t(null)},children:l})]})}const hi=C`
2061
+ `,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${d.length} span${f?"s":""} selected`}),s(k,{direction:"row",gap:"size-100",children:[e(V,{variant:"default",size:"compact",onClick:m,children:"Cancel"}),s(gn,{placement:"top end",crossOffset:300,isOpen:o,onOpenChange:b=>{c(b)},children:[e(V,{variant:"primary",size:"compact",icon:e(w,{svg:e(A.DatabaseOutline,{})}),loading:g,disabled:g,children:g?"Adding to dataset":"Add to dataset"}),e(u.Suspense,{children:e(hc,{onDatasetSelected:b=>{p(b),c(!1)},onCreateNewDataset:()=>{c(!1),t(e(j,{title:"New Dataset",isDismissable:!0,onDismiss:()=>t(null),children:e(Ra,{onDatasetCreateError:()=>{r({title:"Dataset creation failed",message:"Failed to create dataset."})},onDatasetCreated:b=>{t(null),i({title:"Dataset created",message:`${b.name} has been successfully created.`}),c(!0)}})}))}})})]})]})]})}),e(J,{onDismiss:()=>{t(null)},children:l})]})}const hi=C`
2024
2062
  display: flex;
2025
2063
  flex-direction: column;
2026
2064
  flex: 1 1 auto;
@@ -2033,10 +2071,10 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
2033
2071
  .ac-dropdown-button {
2034
2072
  min-width: var(--ac-global-dimension-static-size-300);
2035
2073
  }
2036
- `,jn="annotations",_e=":",ki={col:"startTime",dir:"desc"};function bi(n){let a=null,l=null;if(n.id&&n.id.startsWith(jn)){const[,t,i]=n.id.split(_e);l={attr:t,name:i}}else a=n.id;return{col:a,evalResultKey:l,dir:n.desc?"desc":"asc"}}const nl=50;function gc(n){const{fetchKey:a}=Rn(),l=u.useRef(null),[t,i]=u.useState({}),[r,o]=u.useState([]),[c,d]=u.useState(""),m=Oe(P=>P.columnVisibility),y=le(),{data:g,loadNext:f,hasNext:p,isLoadingNext:b,refetch:S}=I.usePaginationFragment(ai,n.project),h=Oe(P=>P.annotationColumnVisibility),v=u.useMemo(()=>Object.keys(h).filter(P=>h[P]),[h]),_=u.useMemo(()=>g.spans.edges.map(({span:N})=>N),[g]),L=v.map(P=>({header:P,columns:[{header:"label",accessorKey:`${jn}${_e}label${_e}${P}`,cell:({row:N})=>{const A=N.original.spanAnnotations.find($=>$.name===P);return A?A.label:null}},{header:"score",accessorKey:`${jn}${_e}score${_e}${P}`,cell:({row:N})=>{const A=N.original.spanAnnotations.find($=>$.name===P);return A?A.score:null}}]})),T=[{header:()=>s(k,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(wn,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(En,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:P})=>s(k,{direction:"row",gap:"size-50",wrap:"wrap",children:[P.original.spanAnnotations.map(N=>e(Gn,{annotation:N,layout:"horizontal",width:"500px",extra:e(ti,{annotation:N}),children:e(un,{annotation:N,annotationDisplayPreference:"label"})},N.name)),P.original.documentRetrievalMetrics.map(N=>s(W,{children:[e(fe,{name:N.evaluationName,metric:"ndcg",score:N.ndcg},"ndcg"),e(fe,{name:N.evaluationName,metric:"precision",score:N.precision},"precision"),e(fe,{name:N.evaluationName,metric:"hit",score:N.hit},"hit")]}))]})},...L],F=[{id:"select",maxSize:10,header:({table:P})=>e(Ve,{checked:P.getIsAllRowsSelected(),indeterminate:P.getIsSomeRowsSelected(),onChange:P.getToggleAllRowsSelectedHandler()}),cell:({row:P})=>e(Ve,{checked:P.getIsSelected(),disabled:!P.getCanSelect(),indeterminate:P.getIsSomeSelected(),onChange:P.getToggleSelectedHandler()})},{header:"kind",accessorKey:"spanKind",maxSize:100,enableSorting:!1,cell:({getValue:P})=>e(Pa,{spanKind:P()})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:P,row:N})=>{const A=N.original,{traceId:$}=A.context;return e(An,{to:`traces/${$}?selectedSpanNodeId=${A.id}`,children:P()})}},{header:"input",accessorKey:"input.value",cell:be,enableSorting:!1},{header:"output",accessorKey:"output.value",cell:be,enableSorting:!1},{header:"metadata",accessorKey:"metadata",cell:be,enableSorting:!1},...T,{header:"start time",accessorKey:"startTime",cell:Pe},{header:"latency",accessorKey:"latencyMs",cell:({getValue:P})=>{const N=P();return N===null||typeof N!="number"?null:e(Ke,{latencyMs:N})}},{header:"total tokens",accessorKey:"tokenCountTotal",cell:({row:P,getValue:N})=>{const A=N();return A===null?"--":e(wa,{tokenCountTotal:A,tokenCountPrompt:P.original.tokenCountPrompt||0,tokenCountCompletion:P.original.tokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:P})=>e(sa,{statusCode:P()})}];u.useEffect(()=>{const P=r[0];u.startTransition(()=>{S({sort:P?bi(P):ki,after:null,first:nl,filterCondition:c},{fetchPolicy:"store-and-network"})})},[r,S,c,a]);const D=u.useCallback(P=>{if(P){const{scrollHeight:N,scrollTop:A,clientHeight:$}=P;N-A-$<300&&!b&&p&&f(nl)}},[p,b,f]),M=me({columns:F,data:_,state:{sorting:r,columnVisibility:m,rowSelection:t},manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:o,getCoreRowModel:ge(),getSortedRowModel:Kn()}),R=M.getRowModel().rows,O=M.getSelectedRowModel().rows,Z=O.map(P=>P.original),ee=u.useCallback(()=>{i({})},[i]),oe=R.length===0,de=M.getAllColumns().filter(P=>P.columns.length===0);return s("div",{css:hi,children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(k,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(ui,{onValidCondition:d}),e(si,{columns:de,query:g})]})}),e("div",{css:C`
2074
+ `,jn="annotations",_e=":",ki={col:"startTime",dir:"desc"};function bi(n){let a=null,l=null;if(n.id&&n.id.startsWith(jn)){const[,t,i]=n.id.split(_e);l={attr:t,name:i}}else a=n.id;return{col:a,evalResultKey:l,dir:n.desc?"desc":"asc"}}const nl=50;function bc(n){const{fetchKey:a}=Rn(),l=u.useRef(null),[t,i]=u.useState({}),[r,o]=u.useState([]),[c,d]=u.useState(""),m=Oe(P=>P.columnVisibility),y=le(),{data:g,loadNext:f,hasNext:p,isLoadingNext:b,refetch:S}=I.usePaginationFragment(ai,n.project),h=Oe(P=>P.annotationColumnVisibility),v=u.useMemo(()=>Object.keys(h).filter(P=>h[P]),[h]),_=u.useMemo(()=>g.spans.edges.map(({span:N})=>N),[g]),L=v.map(P=>({header:P,columns:[{header:"label",accessorKey:`${jn}${_e}label${_e}${P}`,cell:({row:N})=>{const E=N.original.spanAnnotations.find($=>$.name===P);return E?E.label:null}},{header:"score",accessorKey:`${jn}${_e}score${_e}${P}`,cell:({row:N})=>{const E=N.original.spanAnnotations.find($=>$.name===P);return E?E.score:null}}]})),T=[{header:()=>s(k,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(wn,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(An,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:P})=>s(k,{direction:"row",gap:"size-50",wrap:"wrap",children:[P.original.spanAnnotations.map(N=>e(Gn,{annotation:N,layout:"horizontal",width:"500px",extra:e(ti,{annotation:N}),children:e(un,{annotation:N,annotationDisplayPreference:"label"})},N.name)),P.original.documentRetrievalMetrics.map(N=>s(W,{children:[e(fe,{name:N.evaluationName,metric:"ndcg",score:N.ndcg},"ndcg"),e(fe,{name:N.evaluationName,metric:"precision",score:N.precision},"precision"),e(fe,{name:N.evaluationName,metric:"hit",score:N.hit},"hit")]}))]})},...L],F=[{id:"select",maxSize:10,header:({table:P})=>e(Ve,{checked:P.getIsAllRowsSelected(),indeterminate:P.getIsSomeRowsSelected(),onChange:P.getToggleAllRowsSelectedHandler()}),cell:({row:P})=>e(Ve,{checked:P.getIsSelected(),disabled:!P.getCanSelect(),indeterminate:P.getIsSomeSelected(),onChange:P.getToggleSelectedHandler()})},{header:"kind",accessorKey:"spanKind",maxSize:100,enableSorting:!1,cell:({getValue:P})=>e(Pa,{spanKind:P()})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:P,row:N})=>{const E=N.original,{traceId:$}=E.context;return e(En,{to:`traces/${$}?selectedSpanNodeId=${E.id}`,children:P()})}},{header:"input",accessorKey:"input.value",cell:be,enableSorting:!1},{header:"output",accessorKey:"output.value",cell:be,enableSorting:!1},{header:"metadata",accessorKey:"metadata",cell:be,enableSorting:!1},...T,{header:"start time",accessorKey:"startTime",cell:Pe},{header:"latency",accessorKey:"latencyMs",cell:({getValue:P})=>{const N=P();return N===null||typeof N!="number"?null:e(Ke,{latencyMs:N})}},{header:"total tokens",accessorKey:"tokenCountTotal",cell:({row:P,getValue:N})=>{const E=N();return E===null?"--":e(wa,{tokenCountTotal:E,tokenCountPrompt:P.original.tokenCountPrompt||0,tokenCountCompletion:P.original.tokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:P})=>e(sa,{statusCode:P()})}];u.useEffect(()=>{const P=r[0];u.startTransition(()=>{S({sort:P?bi(P):ki,after:null,first:nl,filterCondition:c},{fetchPolicy:"store-and-network"})})},[r,S,c,a]);const D=u.useCallback(P=>{if(P){const{scrollHeight:N,scrollTop:E,clientHeight:$}=P;N-E-$<300&&!b&&p&&f(nl)}},[p,b,f]),M=me({columns:F,data:_,state:{sorting:r,columnVisibility:m,rowSelection:t},manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:o,getCoreRowModel:ge(),getSortedRowModel:Kn()}),R=M.getRowModel().rows,O=M.getSelectedRowModel().rows,Z=O.map(P=>P.original),ee=u.useCallback(()=>{i({})},[i]),oe=R.length===0,de=M.getAllColumns().filter(P=>P.columns.length===0);return s("div",{css:hi,children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(k,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(ui,{onValidCondition:d}),e(si,{columns:de,query:g})]})}),e("div",{css:C`
2037
2075
  flex: 1 1 auto;
2038
2076
  overflow: auto;
2039
- `,onScroll:P=>D(P.target),ref:l,children:s("table",{css:_n,children:[e("thead",{children:M.getHeaderGroups().map(P=>e("tr",{children:P.headers.map(N=>e("th",{colSpan:N.colSpan,children:N.isPlaceholder?null:s("div",{className:N.column.getCanSort()?"cursor-pointer":"",onClick:N.column.getToggleSortingHandler(),style:{left:N.getStart(),width:N.getSize()},children:[U(N.column.columnDef.header,N.getContext()),N.column.getIsSorted()?e(w,{className:"sort-icon",svg:N.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},N.id))},P.id))}),oe?e(ii,{projectName:g.name}):e("tbody",{children:R.map(P=>e("tr",{onClick:()=>y(`traces/${P.original.context.traceId}?selectedSpanNodeId=${P.original.id}`),children:P.getVisibleCells().map(N=>e("td",{children:U(N.column.columnDef.cell,N.getContext())},N.id))},P.id))})]})}),O.length?e(fi,{selectedSpans:Z,onClearSelection:ee}):null]})}const Si=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e136f41c0942f253822336dc0c5b291",id:null,metadata:{},name:"StreamToggleRefetchQuery",operationKind:"query",text:`query StreamToggleRefetchQuery(
2077
+ `,onScroll:P=>D(P.target),ref:l,children:s("table",{css:_n,children:[e("thead",{children:M.getHeaderGroups().map(P=>e("tr",{children:P.headers.map(N=>e("th",{colSpan:N.colSpan,children:N.isPlaceholder?null:s("div",{className:N.column.getCanSort()?"cursor-pointer":"",onClick:N.column.getToggleSortingHandler(),style:{left:N.getStart(),width:N.getSize()},children:[U(N.column.columnDef.header,N.getContext()),N.column.getIsSorted()?e(w,{className:"sort-icon",svg:N.column.getIsSorted()==="asc"?e(A.ArrowUpFilled,{}):e(A.ArrowDownFilled,{})}):null]})},N.id))},P.id))}),oe?e(ii,{projectName:g.name}):e("tbody",{children:R.map(P=>e("tr",{onClick:()=>y(`traces/${P.original.context.traceId}?selectedSpanNodeId=${P.original.id}`),children:P.getVisibleCells().map(N=>e("td",{children:U(N.column.columnDef.cell,N.getContext())},N.id))},P.id))})]})}),O.length?e(fi,{selectedSpans:Z,onClearSelection:ee}):null]})}const Si=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e136f41c0942f253822336dc0c5b291",id:null,metadata:{},name:"StreamToggleRefetchQuery",operationKind:"query",text:`query StreamToggleRefetchQuery(
2040
2078
  $id: GlobalID!
2041
2079
  ) {
2042
2080
  node(id: $id) {
@@ -2051,7 +2089,7 @@ fragment StreamToggle_data on Project {
2051
2089
  streamingLastUpdatedAt
2052
2090
  id
2053
2091
  }
2054
- `}}}();Si.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const vi={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Si,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"StreamToggle_data",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};vi.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function Ci(n,a){const l=u.useRef(null);u.useEffect(()=>{l.current=n},[n]),u.useEffect(()=>{function t(){l.current&&l.current()}if(a!==null){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const pc=2e3;function yc(n){const{isStreaming:a,setIsStreaming:l,setFetchKey:t}=Rn(),[i,r]=I.useRefetchableFragment(vi,n.project),o=u.useRef(i.streamingLastUpdatedAt),c=u.useCallback(()=>{a&&u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[a,r]),d=i.streamingLastUpdatedAt;return u.useEffect(()=>{d!=null&&(o.current==null||o.current<d)&&(o.current=d,t(`fetch-traces-${d}`))},[t,d]),Ci(c,pc),e($a,{labelPlacement:"start",isSelected:a,onChange:()=>{l(!a)},children:"Stream"})}const Fi=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},y={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},b=[c,d,m,{kind:"Literal",name:"rootSpansOnly",value:!0},y,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],S={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},h={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},_={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},L={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},T=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],F={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},D={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[p,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},M={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},R=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,m,y],kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"TypeDiscriminator",abstractKey:"__isNode"},f,{kind:"InlineFragment",selections:[p,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:b,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[f,S,p,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},h,v,_,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},L,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:T,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:T,storageKey:null},F,D,M,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[f,S,p,h,v,_,L,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:R,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:R,storageKey:null},F,D,M],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[g],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:b,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e6571e93159d5ab4244d5cc4058a65a",id:null,metadata:{},name:"TracesTableQuery",operationKind:"query",text:`query TracesTableQuery(
2092
+ `}}}();Si.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const vi={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Si,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"StreamToggle_data",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};vi.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function Ci(n,a){const l=u.useRef(null);u.useEffect(()=>{l.current=n},[n]),u.useEffect(()=>{function t(){l.current&&l.current()}if(a!==null){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const Sc=2e3;function vc(n){const{isStreaming:a,setIsStreaming:l,setFetchKey:t}=Rn(),[i,r]=I.useRefetchableFragment(vi,n.project),o=u.useRef(i.streamingLastUpdatedAt),c=u.useCallback(()=>{a&&u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[a,r]),d=i.streamingLastUpdatedAt;return u.useEffect(()=>{d!=null&&(o.current==null||o.current<d)&&(o.current=d,t(`fetch-traces-${d}`))},[t,d]),Ci(c,Sc),e($a,{labelPlacement:"start",isSelected:a,onChange:()=>{l(!a)},children:"Stream"})}const Fi=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},y={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},b=[c,d,m,{kind:"Literal",name:"rootSpansOnly",value:!0},y,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],S={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},h={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},_={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},L={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},T=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],F={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},D={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[p,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},M={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},R=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,m,y],kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"TypeDiscriminator",abstractKey:"__isNode"},f,{kind:"InlineFragment",selections:[p,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:b,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[f,S,p,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},h,v,_,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},L,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:T,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:T,storageKey:null},F,D,M,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[f,S,p,h,v,_,L,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:R,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:R,storageKey:null},F,D,M],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[g],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:b,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e6571e93159d5ab4244d5cc4058a65a",id:null,metadata:{},name:"TracesTableQuery",operationKind:"query",text:`query TracesTableQuery(
2055
2093
  $after: String = null
2056
2094
  $filterCondition: String = null
2057
2095
  $first: Int = 50
@@ -2157,16 +2195,16 @@ fragment TracesTable_spans_1XEuU on Project {
2157
2195
  }
2158
2196
  id
2159
2197
  }
2160
- `}}}();Fi.hash="69e77ceeea7371be4ec13fc702225150";const Ki=function(){var n=["rootSpans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],m={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},y={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},g={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},f=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Fi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"TracesTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"rootSpans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__TracesTable_rootSpans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},i,r,o,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},c,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:d,storageKey:null},m,y,g,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[l,t,a,i,r,o,c,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:f,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:f,storageKey:null},m,y,g],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();Ki.hash="69e77ceeea7371be4ec13fc702225150";const al=50;function xi(n){const a=[];for(const l of n){const t={...l.span,children:xi(l.children)};a.push(t)}return a}function fc(n){const a=u.useRef(null),[l,t]=u.useState({}),[i,r]=u.useState([]),[o,c]=u.useState(""),d=le(),{fetchKey:m}=Rn(),{data:y,loadNext:g,hasNext:f,isLoadingNext:p,refetch:b}=I.usePaginationFragment(Ki,n.project),S=Oe(A=>A.annotationColumnVisibility),h=u.useMemo(()=>Object.keys(S).filter(A=>S[A]),[S]),v=u.useMemo(()=>y.rootSpans.edges.map(({rootSpan:$})=>{const H=ds([$,...$.descendants]),[Ze]=xi(H);return Ze}),[y]),_=h.map(A=>({header:A,columns:[{header:"label",accessorKey:`${jn}${_e}label${_e}${A}`,cell:({row:$})=>{const H=$.original.spanAnnotations.find(Ze=>Ze.name===A);return H?H.label:null}},{header:"score",accessorKey:`${jn}${_e}score${_e}${A}`,cell:({row:$})=>{const H=$.original.spanAnnotations.find(Ze=>Ze.name===A);return H?H.score:null}}]})),L=[{header:()=>s(k,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(wn,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(En,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:A})=>{const $=A.original.spanAnnotations.length===0&&A.original.documentRetrievalMetrics.length===0;return s(k,{direction:"row",gap:"size-50",wrap:"wrap",children:[A.original.spanAnnotations.map(H=>e(Gn,{annotation:H,layout:"horizontal",width:"500px",extra:e(ti,{annotation:H}),children:e(un,{annotation:H,annotationDisplayPreference:"label"})},H.name)),A.original.documentRetrievalMetrics.map(H=>s(u.Fragment,{children:[e(fe,{name:H.evaluationName,metric:"ndcg",score:H.ndcg},"ndcg"),e(fe,{name:H.evaluationName,metric:"precision",score:H.precision},"precision"),e(fe,{name:H.evaluationName,metric:"hit",score:H.hit},"hit")]},"doc-evals")),$?"--":null]})}},..._],T=[{id:"select",maxSize:10,header:({table:A})=>e(Ve,{checked:A.getIsAllRowsSelected(),indeterminate:A.getIsSomeRowsSelected(),onChange:A.getToggleAllRowsSelectedHandler()}),cell:({row:A})=>e(Ve,{checked:A.getIsSelected(),disabled:!A.getCanSelect(),indeterminate:A.getIsSomeSelected(),onChange:A.getToggleSelectedHandler()})},{header:()=>s(k,{gap:"size-50",direction:"row",alignItems:"center",children:[e(Ga,{isExpanded:O.getIsAllRowsExpanded(),onClick:O.getToggleAllRowsExpandedHandler(),"aria-label":"Expand all rows"}),"kind"]}),enableSorting:!1,accessorKey:"spanKind",maxSize:100,cell:A=>e("div",{css:C`
2198
+ `}}}();Fi.hash="69e77ceeea7371be4ec13fc702225150";const Ki=function(){var n=["rootSpans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],m={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},y={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},g={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},f=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Fi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"TracesTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"rootSpans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__TracesTable_rootSpans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},i,r,o,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},c,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:d,storageKey:null},m,y,g,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[l,t,a,i,r,o,c,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:f,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:f,storageKey:null},m,y,g],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();Ki.hash="69e77ceeea7371be4ec13fc702225150";const al=50;function xi(n){const a=[];for(const l of n){const t={...l.span,children:xi(l.children)};a.push(t)}return a}function Cc(n){const a=u.useRef(null),[l,t]=u.useState({}),[i,r]=u.useState([]),[o,c]=u.useState(""),d=le(),{fetchKey:m}=Rn(),{data:y,loadNext:g,hasNext:f,isLoadingNext:p,refetch:b}=I.usePaginationFragment(Ki,n.project),S=Oe(E=>E.annotationColumnVisibility),h=u.useMemo(()=>Object.keys(S).filter(E=>S[E]),[S]),v=u.useMemo(()=>y.rootSpans.edges.map(({rootSpan:$})=>{const B=cs([$,...$.descendants]),[Ze]=xi(B);return Ze}),[y]),_=h.map(E=>({header:E,columns:[{header:"label",accessorKey:`${jn}${_e}label${_e}${E}`,cell:({row:$})=>{const B=$.original.spanAnnotations.find(Ze=>Ze.name===E);return B?B.label:null}},{header:"score",accessorKey:`${jn}${_e}score${_e}${E}`,cell:({row:$})=>{const B=$.original.spanAnnotations.find(Ze=>Ze.name===E);return B?B.score:null}}]})),L=[{header:()=>s(k,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(wn,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(An,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:E})=>{const $=E.original.spanAnnotations.length===0&&E.original.documentRetrievalMetrics.length===0;return s(k,{direction:"row",gap:"size-50",wrap:"wrap",children:[E.original.spanAnnotations.map(B=>e(Gn,{annotation:B,layout:"horizontal",width:"500px",extra:e(ti,{annotation:B}),children:e(un,{annotation:B,annotationDisplayPreference:"label"})},B.name)),E.original.documentRetrievalMetrics.map(B=>s(u.Fragment,{children:[e(fe,{name:B.evaluationName,metric:"ndcg",score:B.ndcg},"ndcg"),e(fe,{name:B.evaluationName,metric:"precision",score:B.precision},"precision"),e(fe,{name:B.evaluationName,metric:"hit",score:B.hit},"hit")]},"doc-evals")),$?"--":null]})}},..._],T=[{id:"select",maxSize:10,header:({table:E})=>e(Ve,{checked:E.getIsAllRowsSelected(),indeterminate:E.getIsSomeRowsSelected(),onChange:E.getToggleAllRowsSelectedHandler()}),cell:({row:E})=>e(Ve,{checked:E.getIsSelected(),disabled:!E.getCanSelect(),indeterminate:E.getIsSomeSelected(),onChange:E.getToggleSelectedHandler()})},{header:()=>s(k,{gap:"size-50",direction:"row",alignItems:"center",children:[e(Ga,{isExpanded:O.getIsAllRowsExpanded(),onClick:O.getToggleAllRowsExpandedHandler(),"aria-label":"Expand all rows"}),"kind"]}),enableSorting:!1,accessorKey:"spanKind",maxSize:100,cell:E=>e("div",{css:C`
2161
2199
  // Since rows are flattened by default,
2162
2200
  // we can use the row.depth property
2163
2201
  // and paddingLeft to visually indicate the depth
2164
2202
  // of the row
2165
- padding-left: ${A.row.depth*2}rem;
2166
- `,children:s(k,{gap:"size-50",children:[A.row.getCanExpand()?e(Ga,{isExpanded:A.row.getIsExpanded(),onClick:A.row.getToggleExpandedHandler(),"aria-label":"Expand row"}):null,e(Pa,{spanKind:A.getValue()})]})})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:A,row:$})=>{const{traceId:H}=$.original.context;return e(An,{to:`traces/${H}?selectedSpanNodeId=${$.original.id}`,children:A()})}},{header:"input",accessorKey:"input.value",enableSorting:!1,cell:be},{header:"output",accessorKey:"output.value",enableSorting:!1,cell:be},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:be},...L,{header:"start time",accessorKey:"startTime",cell:Pe},{header:"latency",accessorKey:"latencyMs",cell:({getValue:A})=>{const $=A();return $===null||typeof $!="number"?null:e(Ke,{latencyMs:$})}},{header:"total tokens",minSize:80,accessorKey:"cumulativeTokenCountTotal",cell:({row:A,getValue:$})=>{const H=$();return H===null?"--":e(wa,{tokenCountTotal:H,tokenCountPrompt:A.original.cumulativeTokenCountPrompt||0,tokenCountCompletion:A.original.cumulativeTokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:A})=>e(sa,{statusCode:A()})}];u.useEffect(()=>{const A=i[0];u.startTransition(()=>{b({sort:A?bi(A):ki,after:null,first:al,filterCondition:o},{fetchPolicy:"store-and-network"})})},[i,b,o,m]);const F=De.useCallback(A=>{if(A){const{scrollHeight:$,scrollTop:H,clientHeight:Ze}=A;$-H-Ze<300&&!p&&f&&g(al)}},[f,p,g]),[D,M]=u.useState({}),R=Oe(A=>A.columnVisibility),O=me({columns:T,data:v,onExpandedChange:M,manualSorting:!0,getSubRows:A=>A.children,state:{sorting:i,expanded:D,columnVisibility:R,rowSelection:l},onRowSelectionChange:t,enableSubRowSelection:!1,onSortingChange:r,getCoreRowModel:ge(),getSortedRowModel:Kn(),getExpandedRowModel:xr(),getRowId:A=>A.id}),Z=O.getRowModel().rows,ee=O.getSelectedRowModel().flatRows,oe=ee.map(A=>A.original),de=u.useCallback(()=>{t({})},[t]),P=Z.length===0,N=O.getAllColumns().filter(A=>A.columns.length===0);return s("div",{css:hi,children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(k,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(ui,{onValidCondition:c}),e(si,{columns:N,query:y})]})}),e("div",{css:C`
2203
+ padding-left: ${E.row.depth*2}rem;
2204
+ `,children:s(k,{gap:"size-50",children:[E.row.getCanExpand()?e(Ga,{isExpanded:E.row.getIsExpanded(),onClick:E.row.getToggleExpandedHandler(),"aria-label":"Expand row"}):null,e(Pa,{spanKind:E.getValue()})]})})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:E,row:$})=>{const{traceId:B}=$.original.context;return e(En,{to:`traces/${B}?selectedSpanNodeId=${$.original.id}`,children:E()})}},{header:"input",accessorKey:"input.value",enableSorting:!1,cell:be},{header:"output",accessorKey:"output.value",enableSorting:!1,cell:be},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:be},...L,{header:"start time",accessorKey:"startTime",cell:Pe},{header:"latency",accessorKey:"latencyMs",cell:({getValue:E})=>{const $=E();return $===null||typeof $!="number"?null:e(Ke,{latencyMs:$})}},{header:"total tokens",minSize:80,accessorKey:"cumulativeTokenCountTotal",cell:({row:E,getValue:$})=>{const B=$();return B===null?"--":e(wa,{tokenCountTotal:B,tokenCountPrompt:E.original.cumulativeTokenCountPrompt||0,tokenCountCompletion:E.original.cumulativeTokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:E})=>e(sa,{statusCode:E()})}];u.useEffect(()=>{const E=i[0];u.startTransition(()=>{b({sort:E?bi(E):ki,after:null,first:al,filterCondition:o},{fetchPolicy:"store-and-network"})})},[i,b,o,m]);const F=De.useCallback(E=>{if(E){const{scrollHeight:$,scrollTop:B,clientHeight:Ze}=E;$-B-Ze<300&&!p&&f&&g(al)}},[f,p,g]),[D,M]=u.useState({}),R=Oe(E=>E.columnVisibility),O=me({columns:T,data:v,onExpandedChange:M,manualSorting:!0,getSubRows:E=>E.children,state:{sorting:i,expanded:D,columnVisibility:R,rowSelection:l},onRowSelectionChange:t,enableSubRowSelection:!1,onSortingChange:r,getCoreRowModel:ge(),getSortedRowModel:Kn(),getExpandedRowModel:Dr(),getRowId:E=>E.id}),Z=O.getRowModel().rows,ee=O.getSelectedRowModel().flatRows,oe=ee.map(E=>E.original),de=u.useCallback(()=>{t({})},[t]),P=Z.length===0,N=O.getAllColumns().filter(E=>E.columns.length===0);return s("div",{css:hi,children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(k,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(ui,{onValidCondition:c}),e(si,{columns:N,query:y})]})}),e("div",{css:C`
2167
2205
  flex: 1 1 auto;
2168
2206
  overflow: auto;
2169
- `,onScroll:A=>F(A.target),ref:a,children:s("table",{css:_n,children:[e("thead",{children:O.getHeaderGroups().map(A=>e("tr",{children:A.headers.map($=>e("th",{colSpan:$.colSpan,children:$.isPlaceholder?null:s("div",{"data-sortable":$.column.getCanSort(),className:$.column.getCanSort()?"cursor-pointer":"",onClick:$.column.getToggleSortingHandler(),style:{left:$.getStart(),width:$.getSize()},children:[U($.column.columnDef.header,$.getContext()),$.column.getIsSorted()?e(w,{className:"sort-icon",svg:$.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},$.id))},A.id))}),P?e(ii,{projectName:y.name}):e("tbody",{children:Z.map(A=>e("tr",{onClick:()=>d(`traces/${A.original.context.traceId}`),children:A.getVisibleCells().map($=>e("td",{children:U($.column.columnDef.cell,$.getContext())},$.id))},A.id))})]})}),ee.length?e(fi,{selectedSpans:oe,onClearSelection:de}):null]})}const hc=C`
2207
+ `,onScroll:E=>F(E.target),ref:a,children:s("table",{css:_n,children:[e("thead",{children:O.getHeaderGroups().map(E=>e("tr",{children:E.headers.map($=>e("th",{colSpan:$.colSpan,children:$.isPlaceholder?null:s("div",{"data-sortable":$.column.getCanSort(),className:$.column.getCanSort()?"cursor-pointer":"",onClick:$.column.getToggleSortingHandler(),style:{left:$.getStart(),width:$.getSize()},children:[U($.column.columnDef.header,$.getContext()),$.column.getIsSorted()?e(w,{className:"sort-icon",svg:$.column.getIsSorted()==="asc"?e(A.ArrowUpFilled,{}):e(A.ArrowDownFilled,{})}):null]})},$.id))},E.id))}),P?e(ii,{projectName:y.name}):e("tbody",{children:Z.map(E=>e("tr",{onClick:()=>d(`traces/${E.original.context.traceId}`),children:E.getVisibleCells().map($=>e("td",{children:U($.column.columnDef.cell,$.getContext())},$.id))},E.id))})]})}),ee.length?e(fi,{selectedSpans:oe,onClearSelection:de}):null]})}const Fc=C`
2170
2208
  flex: 1 1 auto;
2171
2209
  display: flex;
2172
2210
  flex-direction: column;
@@ -2192,7 +2230,7 @@ fragment TracesTable_spans_1XEuU on Project {
2192
2230
  }
2193
2231
  }
2194
2232
  }
2195
- `;function cm(){const{projectId:n}=je(),{timeRange:a}=oa();return e(u.Suspense,{fallback:e(se,{}),children:e(kc,{projectId:n,timeRange:a})})}const Di=jt;function kc({projectId:n,timeRange:a}){const l=u.useMemo(()=>({start:a.start.toISOString(),end:a.end.toISOString()}),[a]),t=I.useLazyLoadQuery(Ot,{id:n,timeRange:l},{fetchPolicy:"store-and-network"}),[i,r,o]=I.useQueryLoader(Di),c=u.useCallback(d=>{d===1?r({id:n,timeRange:l}):o()},[o,r,n,l]);return s("main",{css:hc,children:[e(ec,{project:t.project,extra:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(yc,{project:t.project}),e(Il,{})]})}),s(he,{onChange:c,children:[e(q,{name:"Traces",children:({isSelected:d})=>d&&e(el,{children:e(u.Suspense,{children:e(fc,{project:t.project})})})}),e(q,{name:"Spans",title:"Spans",children:({isSelected:d})=>d&&i&&e(el,{children:e(u.Suspense,{fallback:e(se,{}),children:e(bc,{queryReference:i})})})})]}),e(u.Suspense,{children:e(Fe,{})})]})}function bc({queryReference:n}){const a=I.usePreloadedQuery(Di,n);return e(gc,{project:a.project})}const Ti=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"04c84b5bc2a01477851d347af75dcc11",id:null,metadata:{},name:"projectLoaderQuery",operationKind:"query",text:`query projectLoaderQuery(
2233
+ `;function fm(){const{projectId:n}=je(),{timeRange:a}=oa();return e(u.Suspense,{fallback:e(se,{}),children:e(Kc,{projectId:n,timeRange:a})})}const Di=jt;function Kc({projectId:n,timeRange:a}){const l=u.useMemo(()=>({start:a.start.toISOString(),end:a.end.toISOString()}),[a]),t=I.useLazyLoadQuery(Ot,{id:n,timeRange:l},{fetchPolicy:"store-and-network"}),[i,r,o]=I.useQueryLoader(Di),c=u.useCallback(d=>{d===1?r({id:n,timeRange:l}):o()},[o,r,n,l]);return s("main",{css:Fc,children:[e(rc,{project:t.project,extra:s(k,{direction:"row",alignItems:"center",gap:"size-100",children:[e(vc,{project:t.project}),e(Il,{})]})}),s(he,{onChange:c,children:[e(q,{name:"Traces",children:({isSelected:d})=>d&&e(el,{children:e(u.Suspense,{children:e(Cc,{project:t.project})})})}),e(q,{name:"Spans",title:"Spans",children:({isSelected:d})=>d&&i&&e(el,{children:e(u.Suspense,{fallback:e(se,{}),children:e(xc,{queryReference:i})})})})]}),e(u.Suspense,{children:e(Fe,{})})]})}function xc({queryReference:n}){const a=I.usePreloadedQuery(Di,n);return e(bc,{project:a.project})}const Ti=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"04c84b5bc2a01477851d347af75dcc11",id:null,metadata:{},name:"projectLoaderQuery",operationKind:"query",text:`query projectLoaderQuery(
2196
2234
  $id: GlobalID!
2197
2235
  ) {
2198
2236
  project: node(id: $id) {
@@ -2203,36 +2241,36 @@ fragment TracesTable_spans_1XEuU on Project {
2203
2241
  }
2204
2242
  }
2205
2243
  }
2206
- `}}}();Ti.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function um(n){const{projectId:a}=n.params;return await I.fetchQuery(Te,Ti,{id:a}).toPromise()}const Sc=C`
2244
+ `}}}();Ti.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function hm(n){const{projectId:a}=n.params;return await I.fetchQuery(Te,Ti,{id:a}).toPromise()}const Dc=C`
2207
2245
  display: flex;
2208
2246
  direction: row;
2209
2247
  height: 100vh;
2210
2248
  overflow: hidden;
2211
- `,vc=C`
2249
+ `,Tc=C`
2212
2250
  display: flex;
2213
2251
  flex-direction: column;
2214
2252
  flex: 1 1 auto;
2215
2253
  height: 100%;
2216
2254
  overflow: hidden;
2217
2255
  padding-left: var(--px-nav-collapsed-width);
2218
- `,Cc=C`
2256
+ `,Ic=C`
2219
2257
  flex: 1 1 auto;
2220
2258
  display: flex;
2221
2259
  flex-direction: column;
2222
2260
  height: 100%;
2223
2261
  overflow: hidden;
2224
- `,Fc=C`
2262
+ `,Lc=C`
2225
2263
  display: flex;
2226
2264
  flex-direction: column;
2227
2265
  margin: 0;
2228
2266
  list-style: none;
2229
2267
  gap: var(--ac-global-dimension-size-50);
2230
2268
  padding-inline-start: 0;
2231
- `,Kc=C`
2269
+ `,_c=C`
2232
2270
  display: flex;
2233
2271
  flex-direction: column;
2234
2272
  gap: var(--ac-global-dimension-size-50);
2235
- `;function mm(){return s("div",{css:Sc,"data-testid":"layout",children:[e(xc,{}),s("div",{css:vc,children:[e(us,{children:e(cs,{})}),e("div",{"data-testid":"content",css:Cc,children:e(u.Suspense,{fallback:e(se,{}),children:e(Fe,{})})})]})]})}function xc(){const n=u.useMemo(()=>window.Config.hasInferences,[]);return s(fs,{children:[e(ms,{}),s(k,{direction:"column",justifyContent:"space-between",flex:"1 1 auto",children:[s("ul",{css:Kc,children:[n&&e("li",{children:e(Mn,{to:"/model",text:"Model",icon:e(w,{svg:e(E.CubeOutline,{})})})}),e("li",{children:e(Mn,{to:"/projects",text:"Projects",icon:e(w,{svg:e(E.GridOutline,{})})})}),e("li",{children:e(Mn,{to:"/datasets",text:"Datasets",icon:e(w,{svg:e(E.DatabaseOutline,{})})})}),e("li",{children:e(Mn,{to:"/apis",text:"APIs",icon:e(w,{svg:e(E.Code,{})})})})]}),s("ul",{css:Fc,children:[e("li",{children:e(Mn,{to:"/settings",text:"Settings",icon:e(w,{svg:e(E.SettingsOutline,{})})})}),e("li",{children:e(gs,{})}),e("li",{children:e(ps,{})}),e("li",{children:e(ys,{})})]})]})]})}function gm(){const n=Dr(),a=u.useMemo(()=>n instanceof Error&&n.message==="Failed to fetch"?e(Dc,{}):e(Tc,{error:n}),[n]);return e("main",{css:C`
2273
+ `;function km(){return s("div",{css:Dc,"data-testid":"layout",children:[e(Ec,{}),s("div",{css:Tc,children:[e(ms,{children:e(us,{})}),e("div",{"data-testid":"content",css:Ic,children:e(u.Suspense,{fallback:e(se,{}),children:e(Fe,{})})})]})]})}function Ec(){const n=u.useMemo(()=>window.Config.hasInferences,[]);return s(hs,{children:[e(gs,{}),s(k,{direction:"column",justifyContent:"space-between",flex:"1 1 auto",children:[s("ul",{css:_c,children:[n&&e("li",{children:e(Mn,{to:"/model",text:"Model",icon:e(w,{svg:e(A.CubeOutline,{})})})}),e("li",{children:e(Mn,{to:"/projects",text:"Projects",icon:e(w,{svg:e(A.GridOutline,{})})})}),e("li",{children:e(Mn,{to:"/datasets",text:"Datasets",icon:e(w,{svg:e(A.DatabaseOutline,{})})})}),e("li",{children:e(Mn,{to:"/apis",text:"APIs",icon:e(w,{svg:e(A.Code,{})})})})]}),s("ul",{css:Lc,children:[e("li",{children:e(Mn,{to:"/settings",text:"Settings",icon:e(w,{svg:e(A.SettingsOutline,{})})})}),e("li",{children:e(ps,{})}),e("li",{children:e(ys,{})}),e("li",{children:e(fs,{})})]})]})]})}function bm(){const n=Tr(),a=u.useMemo(()=>n instanceof Error&&n.message==="Failed to fetch"?e(Ac,{}):e(wc,{error:n}),[n]);return e("main",{css:C`
2236
2274
  width: 100%;
2237
2275
  height: 100%;
2238
2276
  display: flex;
@@ -2245,7 +2283,7 @@ fragment TracesTable_spans_1XEuU on Project {
2245
2283
  margin-top: 200px;
2246
2284
  display: flex;
2247
2285
  flex-direction: column;
2248
- `,children:a})})}function Dc(){return s(W,{children:[s(k,{direction:"column",width:"100%",alignItems:"center",children:[e(ca,{graphicKey:"not found"}),e("h1",{children:"Server disconnected"})]}),e("p",{children:"We are unable to reach the Phoenix server. Please ensure that Phoenix is running and try again."})]})}function Tc({error:n}){return s(W,{children:[s(k,{direction:"column",width:"100%",alignItems:"center",children:[e(ca,{graphicKey:"error"}),e("h1",{children:"Something went wrong"})]}),e("p",{children:"We strive to do our very best but 🐛 bugs happen. It would mean a lot to us if you could file a an issue. If you feel comfortable, please include the error details below in your issue. We will get back to you as soon as we can."}),e("p",{css:C`
2286
+ `,children:a})})}function Ac(){return s(W,{children:[s(k,{direction:"column",width:"100%",alignItems:"center",children:[e(ca,{graphicKey:"not found"}),e("h1",{children:"Server disconnected"})]}),e("p",{children:"We are unable to reach the Phoenix server. Please ensure that Phoenix is running and try again."})]})}function wc({error:n}){return s(W,{children:[s(k,{direction:"column",width:"100%",alignItems:"center",children:[e(ca,{graphicKey:"error"}),e("h1",{children:"Something went wrong"})]}),e("p",{children:"We strive to do our very best but 🐛 bugs happen. It would mean a lot to us if you could file a an issue. If you feel comfortable, please include the error details below in your issue. We will get back to you as soon as we can."}),e("p",{css:C`
2249
2287
  display: flex;
2250
2288
  flex-direction: row;
2251
2289
  justify-content: flex-end;
@@ -2286,7 +2324,7 @@ fragment TracesTable_spans_1XEuU on Project {
2286
2324
  }
2287
2325
  }
2288
2326
  }
2289
- `}}}();Ii.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const Ic=Ii;function pm(){const n=I.useLazyLoadQuery(Ic,{}),{model:{primaryInferences:a,referenceInferences:l,corpusInferences:t}}=n;return e(ks,{primaryInferences:a,referenceInferences:l??null,corpusInferences:t??null,children:e(hs,{timeRangeBounds:{start:new Date(a.startTime),end:new Date(a.endTime)},children:e(Fe,{})})})}function ym(){return e(nc,{children:e(Wd,{children:e(Fe,{})})})}function fm(){return e(bs,{children:e(Fe,{})})}const Li=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageProjectsQuery",selections:[{args:a,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageProjectsQuery",selections:[{alias:null,args:a,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},l],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"dd65be0e4921fda8c7330e4b91d0d016",id:null,metadata:{},name:"ProjectsPageProjectsQuery",operationKind:"query",text:`query ProjectsPageProjectsQuery(
2327
+ `}}}();Ii.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const Rc=Ii;function Sm(){const n=I.useLazyLoadQuery(Rc,{}),{model:{primaryInferences:a,referenceInferences:l,corpusInferences:t}}=n;return e(bs,{primaryInferences:a,referenceInferences:l??null,corpusInferences:t??null,children:e(ks,{timeRangeBounds:{start:new Date(a.startTime),end:new Date(a.endTime)},children:e(Fe,{})})})}function vm(){return e(sc,{children:e(nc,{children:e(Fe,{})})})}function Cm(){return e(Ss,{children:e(Fe,{})})}const Li=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageProjectsQuery",selections:[{args:a,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageProjectsQuery",selections:[{alias:null,args:a,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},l],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"dd65be0e4921fda8c7330e4b91d0d016",id:null,metadata:{},name:"ProjectsPageProjectsQuery",operationKind:"query",text:`query ProjectsPageProjectsQuery(
2290
2328
  $after: String = null
2291
2329
  $first: Int = 100
2292
2330
  $timeRange: TimeRange
@@ -2318,7 +2356,7 @@ fragment ProjectsPageProjectsFragment_2HEEH6 on Query {
2318
2356
  }
2319
2357
  }
2320
2358
  }
2321
- `}}}();Li.hash="720b12837ec779f66a493b8c4f993cba";const _i=function(){var n=["projects"],a={kind:"Variable",name:"timeRange",variableName:"timeRange"},l=[a];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:[],operation:Li}},name:"ProjectsPageProjectsFragment",selections:[{alias:"projects",args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"__ProjectsPage_projects_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:l,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},a],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:l,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null}}();_i.hash="720b12837ec779f66a493b8c4f993cba";const Ai=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Literal",name:"first",value:100}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageQuery",selections:[{alias:null,args:a,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},l],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"projects(first:100)"},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"e510243be5e7bcef0561820e0515c779",id:null,metadata:{},name:"ProjectsPageQuery",operationKind:"query",text:`query ProjectsPageQuery(
2359
+ `}}}();Li.hash="720b12837ec779f66a493b8c4f993cba";const _i=function(){var n=["projects"],a={kind:"Variable",name:"timeRange",variableName:"timeRange"},l=[a];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:[],operation:Li}},name:"ProjectsPageProjectsFragment",selections:[{alias:"projects",args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"__ProjectsPage_projects_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:l,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},a],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:l,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null}}();_i.hash="720b12837ec779f66a493b8c4f993cba";const Ei=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Literal",name:"first",value:100}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageQuery",selections:[{alias:null,args:a,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},l],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"projects(first:100)"},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"e510243be5e7bcef0561820e0515c779",id:null,metadata:{},name:"ProjectsPageQuery",operationKind:"query",text:`query ProjectsPageQuery(
2322
2360
  $timeRange: TimeRange!
2323
2361
  ) {
2324
2362
  ...ProjectsPageProjectsFragment
@@ -2348,14 +2386,14 @@ fragment ProjectsPageProjectsFragment on Query {
2348
2386
  }
2349
2387
  }
2350
2388
  }
2351
- `}}}();Ai.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const Lc="https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-tracing";function _c(){const[n,a]=u.useState(null);return s("div",{children:[e(V,{variant:"default",icon:e(w,{svg:e(E.GridOutline,{})}),onClick:()=>{a(e(Ac,{}))},children:"New Project"}),e(J,{isDismissable:!0,type:"slideOver",onDismiss:()=>a(null),children:n})]})}function Ac(){const[n,a]=u.useState("Python");return e(j,{title:"Create a New Project",size:"L",children:s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-200",children:e(xl,{language:n,onChange:a})}),e(x,{paddingBottom:"size-100",children:s(K,{children:["Projects are created when you log your first trace via OpenTelemetry. See the"," ",e(rn,{href:Lc,children:"documentation"})," ","for a complete guide."]})}),n==="Python"?e(Dl,{}):e(Tl,{})]})})}const Ei=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"Query",kind:"LinkedField",name:"clearProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuClearMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuClearMutation",selections:a},params:{cacheID:"63319b4e42b499db2447817f1dc821fb",id:null,metadata:{},name:"ProjectActionMenuClearMutation",operationKind:"mutation",text:`mutation ProjectActionMenuClearMutation(
2389
+ `}}}();Ei.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const Pc="https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-tracing";function Mc(){const[n,a]=u.useState(null);return s("div",{children:[e(V,{variant:"default",icon:e(w,{svg:e(A.GridOutline,{})}),onClick:()=>{a(e(Nc,{}))},children:"New Project"}),e(J,{isDismissable:!0,type:"slideOver",onDismiss:()=>a(null),children:n})]})}function Nc(){const[n,a]=u.useState("Python");return e(j,{title:"Create a New Project",size:"L",children:s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-200",children:e(xl,{language:n,onChange:a})}),e(x,{paddingBottom:"size-100",children:s(K,{children:["Projects are created when you log your first trace via OpenTelemetry. See the"," ",e(rn,{href:Pc,children:"documentation"})," ","for a complete guide."]})}),n==="Python"?e(Dl,{}):e(Tl,{})]})})}const Ai=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"Query",kind:"LinkedField",name:"clearProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuClearMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuClearMutation",selections:a},params:{cacheID:"63319b4e42b499db2447817f1dc821fb",id:null,metadata:{},name:"ProjectActionMenuClearMutation",operationKind:"mutation",text:`mutation ProjectActionMenuClearMutation(
2352
2390
  $input: ClearProjectInput!
2353
2391
  ) {
2354
2392
  clearProject(input: $input) {
2355
2393
  __typename
2356
2394
  }
2357
2395
  }
2358
- `}}}();Ei.hash="c43eec4d6b882468c611dd9ebf3b095e";const wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"}],a=[{alias:null,args:[{kind:"Variable",name:"id",variableName:"projectId"}],concreteType:"Query",kind:"LinkedField",name:"deleteProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuDeleteMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuDeleteMutation",selections:a},params:{cacheID:"8b00ab3aaef4c5fb3de24f7295d38499",id:null,metadata:{},name:"ProjectActionMenuDeleteMutation",operationKind:"mutation",text:`mutation ProjectActionMenuDeleteMutation(
2396
+ `}}}();Ai.hash="c43eec4d6b882468c611dd9ebf3b095e";const wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"}],a=[{alias:null,args:[{kind:"Variable",name:"id",variableName:"projectId"}],concreteType:"Query",kind:"LinkedField",name:"deleteProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuDeleteMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuDeleteMutation",selections:a},params:{cacheID:"8b00ab3aaef4c5fb3de24f7295d38499",id:null,metadata:{},name:"ProjectActionMenuDeleteMutation",operationKind:"mutation",text:`mutation ProjectActionMenuDeleteMutation(
2359
2397
  $projectId: GlobalID!
2360
2398
  ) {
2361
2399
  deleteProject(id: $projectId) {
@@ -2369,19 +2407,19 @@ fragment ProjectsPageProjectsFragment on Query {
2369
2407
  __typename
2370
2408
  }
2371
2409
  }
2372
- `}}}();Ri.hash="212501fe2d6367ec1503bd7a00c1730f";function Ec(n){const{projectId:a}=n,l=u.useRef(null),[t,i]=I.useMutation(Ri),{control:r,handleSubmit:o,setError:c,formState:{isValid:d}}=qe({defaultValues:{endDate:new Date(Date.now()-Ss).toISOString().slice(0,16)}}),m=u.useCallback(y=>{const g=cl(y.endDate);if(!ul(g))return c("endDate",{message:"Date is not in a valid format"});t({variables:{input:{id:a,endTime:new Date(g).toISOString()}},onCompleted:()=>{n.onComplete()},onError:f=>{alert("Failed to clear project traces: "+f)}})},[t,a,n,c]);return s("form",{onSubmit:o(m),ref:l,children:[s(x,{padding:"size-200",children:[e(K,{color:"danger",children:"You are about to remove all data before the following date. This cannot be undone."}),e(B,{name:"endDate",control:r,rules:{required:"field is required"},render:({field:{name:y,onChange:g,onBlur:f,value:p},fieldState:{invalid:b,error:S}})=>e(ae,{label:"End Date",type:"datetime-local",name:y,description:"The date up to which you want to remove data",errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:g,onBlur:f,defaultValue:p})})]}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{type:"submit",variant:"danger",isDisabled:!d,size:"compact",loading:i,onClick:()=>{var y;(y=l.current)==null||y.requestSubmit()},children:i?"Removing...":"Remove Data"})})})]})}function wc({projectId:n,projectName:a,onProjectDelete:l,onProjectClear:t,onProjectRemoveData:i}){const[r,o]=u.useState(null),c=a!=="default",[d]=I.useMutation(wi),[m]=I.useMutation(Ei),y=u.useCallback(()=>{u.startTransition(()=>{d({variables:{projectId:n}}),l()})},[d,n,l]),g=u.useCallback(()=>{u.startTransition(()=>{m({variables:{input:{id:n}},onCompleted:()=>{t()},onError:S=>{alert("Failed to clear project: "+S)}})})},[m,n,t]),f=u.useCallback(()=>{o(s(j,{size:"S",title:"Delete Project",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete project ${a}? This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{y(),o(null)},children:"Delete Project"})})})]}))},[y,a]),p=u.useCallback(()=>{o(s(j,{size:"S",title:"Clear Project",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to clear project ${a}? All traces and evaluations for this project will be deleted. This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{g(),o(null)},children:"Clear"})})})]}))},[g,a]),b=u.useCallback(()=>{o(e(j,{size:"M",title:"Remove Data",children:e(Ec,{projectId:n,onComplete:()=>{i(),o(null)}})}))},[i,n]);return s("div",{onClick:S=>{S.preventDefault(),S.stopPropagation()},children:[s(He,{buttonVariant:"quiet",align:"end",onAction:S=>{switch(S){case"deleteProject":return f();case"clearProject":return p();case"removeProjectData":return b()}},disabledKeys:c?[]:["deleteProject"],children:[e(G,{textValue:"Clear Traces",children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.Refresh,{})}),e(K,{children:"Clear Data"})]})},"clearProject"),e(G,{textValue:"Remove Data",children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.CloseCircleOutline,{})}),e(K,{children:"Remove Data"})]})},"removeProjectData"),c?e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteProject"):null]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>o(null),children:r})]})}const Rc=1e4,Pc=100;function hm(){const{timeRange:n}=oa();return e(u.Suspense,{fallback:e(se,{}),children:e(Mc,{timeRange:n})})}function Mc({timeRange:n}){const[a,l]=_s(),t=u.useMemo(()=>({start:n.start.toISOString(),end:n.end.toISOString()}),[n]),i=I.useLazyLoadQuery(Ai,{timeRange:t}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:m}=I.usePaginationFragment(_i,i),y=r.projects.edges.map(h=>h.project),g=u.useRef(null),f=u.useCallback(h=>{if(h){const{scrollHeight:v,scrollTop:_,clientHeight:L}=h;v-_-L<300&&!d&&c&&o(Pc)}},[c,d,o]);Ci(()=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"})})},Rc);const p=u.useCallback(h=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"}),a({variant:"success",title:"Project Deleted",message:`Project ${h} has been deleted.`})})},[a,m]),b=u.useCallback(h=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"}),a({variant:"success",title:"Project Cleared",message:`Project ${h} has been cleared of traces.`})})},[a,m]),S=u.useCallback(h=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"}),a({variant:"success",title:"Project Data Removed",message:`Old data from project ${h} have been removed.`})})},[a,m]);return s("div",{css:C`
2410
+ `}}}();Ri.hash="212501fe2d6367ec1503bd7a00c1730f";function Vc(n){const{projectId:a}=n,l=u.useRef(null),[t,i]=I.useMutation(Ri),{control:r,handleSubmit:o,setError:c,formState:{isValid:d}}=qe({defaultValues:{endDate:new Date(Date.now()-vs).toISOString().slice(0,16)}}),m=u.useCallback(y=>{const g=cl(y.endDate);if(!ul(g))return c("endDate",{message:"Date is not in a valid format"});t({variables:{input:{id:a,endTime:new Date(g).toISOString()}},onCompleted:()=>{n.onComplete()},onError:f=>{alert("Failed to clear project traces: "+f)}})},[t,a,n,c]);return s("form",{onSubmit:o(m),ref:l,children:[s(x,{padding:"size-200",children:[e(K,{color:"danger",children:"You are about to remove all data before the following date. This cannot be undone."}),e(H,{name:"endDate",control:r,rules:{required:"field is required"},render:({field:{name:y,onChange:g,onBlur:f,value:p},fieldState:{invalid:b,error:S}})=>e(ae,{label:"End Date",type:"datetime-local",name:y,description:"The date up to which you want to remove data",errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:g,onBlur:f,defaultValue:p})})]}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{type:"submit",variant:"danger",isDisabled:!d,size:"compact",loading:i,onClick:()=>{var y;(y=l.current)==null||y.requestSubmit()},children:i?"Removing...":"Remove Data"})})})]})}function $c({projectId:n,projectName:a,onProjectDelete:l,onProjectClear:t,onProjectRemoveData:i}){const[r,o]=u.useState(null),c=a!=="default",[d]=I.useMutation(wi),[m]=I.useMutation(Ai),y=u.useCallback(()=>{u.startTransition(()=>{d({variables:{projectId:n}}),l()})},[d,n,l]),g=u.useCallback(()=>{u.startTransition(()=>{m({variables:{input:{id:n}},onCompleted:()=>{t()},onError:S=>{alert("Failed to clear project: "+S)}})})},[m,n,t]),f=u.useCallback(()=>{o(s(j,{size:"S",title:"Delete Project",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete project ${a}? This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{y(),o(null)},children:"Delete Project"})})})]}))},[y,a]),p=u.useCallback(()=>{o(s(j,{size:"S",title:"Clear Project",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to clear project ${a}? All traces and evaluations for this project will be deleted. This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{g(),o(null)},children:"Clear"})})})]}))},[g,a]),b=u.useCallback(()=>{o(e(j,{size:"M",title:"Remove Data",children:e(Vc,{projectId:n,onComplete:()=>{i(),o(null)}})}))},[i,n]);return s("div",{onClick:S=>{S.preventDefault(),S.stopPropagation()},children:[s(Be,{buttonVariant:"quiet",align:"end",onAction:S=>{switch(S){case"deleteProject":return f();case"clearProject":return p();case"removeProjectData":return b()}},disabledKeys:c?[]:["deleteProject"],children:[e(G,{textValue:"Clear Traces",children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.Refresh,{})}),e(K,{children:"Clear Data"})]})},"clearProject"),e(G,{textValue:"Remove Data",children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.CloseCircleOutline,{})}),e(K,{children:"Remove Data"})]})},"removeProjectData"),c?e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteProject"):null]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>o(null),children:r})]})}const zc=1e4,Qc=100;function Fm(){const{timeRange:n}=oa();return e(u.Suspense,{fallback:e(se,{}),children:e(Oc,{timeRange:n})})}function Oc({timeRange:n}){const[a,l]=Es(),t=u.useMemo(()=>({start:n.start.toISOString(),end:n.end.toISOString()}),[n]),i=I.useLazyLoadQuery(Ei,{timeRange:t}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:m}=I.usePaginationFragment(_i,i),y=r.projects.edges.map(h=>h.project),g=u.useRef(null),f=u.useCallback(h=>{if(h){const{scrollHeight:v,scrollTop:_,clientHeight:L}=h;v-_-L<300&&!d&&c&&o(Qc)}},[c,d,o]);Ci(()=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"})})},zc);const p=u.useCallback(h=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"}),a({variant:"success",title:"Project Deleted",message:`Project ${h} has been deleted.`})})},[a,m]),b=u.useCallback(h=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"}),a({variant:"success",title:"Project Cleared",message:`Project ${h} has been cleared of traces.`})})},[a,m]),S=u.useCallback(h=>{u.startTransition(()=>{m({},{fetchPolicy:"store-and-network"}),a({variant:"success",title:"Project Data Removed",message:`Old data from project ${h} have been removed.`})})},[a,m]);return s("div",{css:C`
2373
2411
  flex: 1 1 auto;
2374
2412
  overflow-y: auto;
2375
2413
  overflow-x: hidden;
2376
2414
  padding-bottom: var(--ac-global-dimension-size-750);
2377
- `,onScroll:h=>f(h.target),ref:g,children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",width:"100%",borderBottomColor:"grey-200",borderBottomWidth:"thin",children:s(k,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(_c,{}),e(Il,{})]})}),e(x,{padding:"size-200",width:"100%",children:e("ul",{css:C`
2415
+ `,onScroll:h=>f(h.target),ref:g,children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",width:"100%",borderBottomColor:"grey-200",borderBottomWidth:"thin",children:s(k,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(Mc,{}),e(Il,{})]})}),e(x,{padding:"size-200",width:"100%",children:e("ul",{css:C`
2378
2416
  display: flex;
2379
2417
  flex-direction: row;
2380
2418
  gap: var(--ac-global-dimension-size-200);
2381
2419
  flex-wrap: wrap;
2382
- `,children:y.map(h=>e("li",{children:e(An,{to:`/projects/${h.id}`,css:C`
2420
+ `,children:y.map(h=>e("li",{children:e(En,{to:`/projects/${h.id}`,css:C`
2383
2421
  text-decoration: none;
2384
- `,children:e(Vc,{project:h,onProjectDelete:()=>p(h.name),onProjectClear:()=>b(h.name),onProjectRemoveData:()=>S(h.name)})})},h.id))})}),l]})}function Nc({gradientStartColor:n,gradientEndColor:a}){return e("div",{css:C`
2422
+ `,children:e(qc,{project:h,onProjectDelete:()=>p(h.name),onProjectClear:()=>b(h.name),onProjectRemoveData:()=>S(h.name)})})},h.id))})}),l]})}function jc({gradientStartColor:n,gradientEndColor:a}){return e("div",{css:C`
2385
2423
  border-radius: 50%;
2386
2424
  width: 32px;
2387
2425
  height: 32px;
@@ -2391,7 +2429,7 @@ fragment ProjectsPageProjectsFragment on Query {
2391
2429
  ${a} 84.38%
2392
2430
  );
2393
2431
  flex-shrink: 0;
2394
- `})}function Vc({project:n,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t}){const{endTime:i,traceCount:r,tokenCountTotal:o,latencyMsP50:c,gradientStartColor:d,gradientEndColor:m}=n,y=u.useMemo(()=>i?`Last updated ${Tr(new Date(i),new Date,{addSuffix:!0})}`:"No traces uploaded yet.",[i]);return s("div",{css:C`
2432
+ `})}function qc({project:n,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t}){const{endTime:i,traceCount:r,tokenCountTotal:o,latencyMsP50:c,gradientStartColor:d,gradientEndColor:m}=n,y=u.useMemo(()=>i?`Last updated ${Ir(new Date(i),new Date,{addSuffix:!0})}`:"No traces uploaded yet.",[i]);return s("div",{css:C`
2395
2433
  padding: var(--ac-global-dimension-size-200);
2396
2434
  border: 1px solid var(--ac-global-color-grey-400);
2397
2435
  background-color: var(--ac-global-color-grey-100);
@@ -2405,11 +2443,11 @@ fragment ProjectsPageProjectsFragment on Query {
2405
2443
  display: flex;
2406
2444
  flex-direction: column;
2407
2445
  justify-content: space-between;
2408
- `,children:[s(k,{direction:"row",justifyContent:"space-between",alignItems:"start",children:[s(k,{direction:"row",gap:"size-100",alignItems:"center",minWidth:0,children:[e(Nc,{gradientStartColor:d,gradientEndColor:m}),s(k,{direction:"column",minWidth:0,children:[e(te,{level:2,css:C`
2446
+ `,children:[s(k,{direction:"row",justifyContent:"space-between",alignItems:"start",children:[s(k,{direction:"row",gap:"size-100",alignItems:"center",minWidth:0,children:[e(jc,{gradientStartColor:d,gradientEndColor:m}),s(k,{direction:"column",minWidth:0,children:[e(te,{level:2,css:C`
2409
2447
  overflow: hidden;
2410
2448
  white-space: nowrap;
2411
2449
  text-overflow: ellipsis;
2412
- `,children:n.name}),e(K,{color:"text-700",textSize:"small",fontStyle:"italic",children:y})]})]}),e(wc,{projectId:n.id,projectName:n.name,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t})]}),s(k,{direction:"row",justifyContent:"space-between",children:[s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(K,{textSize:"xlarge",children:sn(r)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:sn(o)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),c!=null?e(Ke,{latencyMs:c,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]})]})]})}const Pi=function(){var n=[{kind:"Literal",name:"first",value:100},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetsPageQuery",selections:[{alias:null,args:n,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:'datasets(first:100,sort:{"col":"createdAt","dir":"desc"})'},{alias:null,args:n,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"695b221e981c4795492d79faa7d007e4",id:null,metadata:{},name:"DatasetsPageQuery",operationKind:"query",text:`query DatasetsPageQuery {
2450
+ `,children:n.name}),e(K,{color:"text-700",textSize:"small",fontStyle:"italic",children:y})]})]}),e($c,{projectId:n.id,projectName:n.name,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t})]}),s(k,{direction:"row",justifyContent:"space-between",children:[s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(K,{textSize:"xlarge",children:sn(r)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:sn(o)})]}),s(k,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),c!=null?e(Ke,{latencyMs:c,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]})]})]})}const Pi=function(){var n=[{kind:"Literal",name:"first",value:100},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetsPageQuery",selections:[{alias:null,args:n,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:'datasets(first:100,sort:{"col":"createdAt","dir":"desc"})'},{alias:null,args:n,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"695b221e981c4795492d79faa7d007e4",id:null,metadata:{},name:"DatasetsPageQuery",operationKind:"query",text:`query DatasetsPageQuery {
2413
2451
  ...DatasetsTable_datasets
2414
2452
  }
2415
2453
 
@@ -2434,13 +2472,13 @@ fragment DatasetsTable_datasets on Query {
2434
2472
  }
2435
2473
  }
2436
2474
  }
2437
- `}}}();Pi.hash="985853a7939f44c0cefdd1a91472c67e";function $c(n){const a=n.split(`
2438
- `);return a.length>0?a[0].split(",").map(l=>l.trim()):[]}function zc(n){const{onDatasetCreated:a,onDatasetCreateError:l}=n,[t,i]=u.useState([]),{control:r,handleSubmit:o,resetField:c,formState:{isDirty:d,isValid:m}}=qe({defaultValues:{name:"Dataset "+new Date().toISOString(),input_keys:[],output_keys:[],metadata_keys:[],description:"",metadata:{}}}),y=u.useCallback(g=>{const f=new FormData;return f.append("file",g.file[0]),f.append("name",g.name),f.append("description",g.description),f.append("metadata",JSON.stringify(g.metadata)),g.input_keys.forEach(p=>{f.append("input_keys[]",p)}),g.output_keys.forEach(p=>{f.append("output_keys[]",p)}),g.metadata_keys.forEach(p=>{f.append("metadata_keys[]",p)}),fetch("/v1/datasets/upload?sync=true",{method:"POST",body:f}).then(p=>{if(!p.ok)throw l(new Error(p.statusText||"Failed to create dataset"));return p.json()}).then(p=>{a({name:g.name,id:p.data.dataset_id})})},[l,a]);return s(on,{onSubmit:o(y),children:[s("div",{css:C`
2475
+ `}}}();Pi.hash="985853a7939f44c0cefdd1a91472c67e";function Hc(n){const a=n.split(`
2476
+ `);return a.length>0?a[0].split(",").map(l=>l.trim()):[]}function Bc(n){const{onDatasetCreated:a,onDatasetCreateError:l}=n,[t,i]=u.useState([]),{control:r,handleSubmit:o,resetField:c,formState:{isDirty:d,isValid:m}}=qe({defaultValues:{name:"Dataset "+new Date().toISOString(),input_keys:[],output_keys:[],metadata_keys:[],description:"",metadata:{}}}),y=u.useCallback(g=>{const f=new FormData;return f.append("file",g.file[0]),f.append("name",g.name),f.append("description",g.description),f.append("metadata",JSON.stringify(g.metadata)),g.input_keys.forEach(p=>{f.append("input_keys[]",p)}),g.output_keys.forEach(p=>{f.append("output_keys[]",p)}),g.metadata_keys.forEach(p=>{f.append("metadata_keys[]",p)}),fetch("/v1/datasets/upload?sync=true",{method:"POST",body:f}).then(p=>{if(!p.ok)throw l(new Error(p.statusText||"Failed to create dataset"));return p.json()}).then(p=>{a({name:g.name,id:p.data.dataset_id})})},[l,a]);return s(on,{onSubmit:o(y),children:[s("div",{css:C`
2439
2477
  padding: var(--ac-global-dimension-size-200);
2440
2478
  .ac-dropdown-button {
2441
2479
  width: 100%;
2442
2480
  }
2443
- `,children:[e(B,{name:"name",control:r,rules:{required:"field is required"},render:({field:{onChange:g,onBlur:f,value:p},fieldState:{invalid:b,error:S}})=>e(ae,{label:"Dataset Name",description:"The name of the dataset",errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:g,onBlur:f,value:p.toString()})}),e(B,{name:"description",control:r,render:({field:{onChange:g,onBlur:f,value:p},fieldState:{invalid:b,error:S}})=>e(Jn,{label:"description",placeholder:"Description of the dataset",isRequired:!1,height:100,errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:g,onBlur:f,value:p.toString()})}),e(B,{control:r,name:"file",rules:{required:"CSV file is required"},render:({field:{value:g,onChange:f,...p},fieldState:{invalid:b,error:S}})=>e(ua,{label:"CSV file",validationState:b?"invalid":"valid",errorMessage:S==null?void 0:S.message,children:e("input",{...p,onChange:h=>{var _;f(h.target.files),c("input_keys"),c("output_keys"),c("metadata_keys");const v=(_=h.target.files)==null?void 0:_[0];if(v){const L=new FileReader;L.onload=function(T){if(!T.target)return;const F=T.target.result,D=$c(F);i(D)},L.readAsText(v)}},type:"file",id:"file",accept:".csv"})})}),e(B,{name:"input_keys",control:r,rules:{required:"field is required"},render:({field:{value:g,onChange:f},fieldState:{invalid:p,error:b}})=>e(Sa,{label:"input keys",validationState:p?"invalid":"valid",description:"the columns to use as input",columns:t,selectedColumns:g,onChange:f,errorMessage:b==null?void 0:b.message})}),e(B,{name:"output_keys",control:r,render:({field:{value:g,onChange:f},fieldState:{invalid:p,error:b}})=>e(Sa,{label:"output keys",validationState:p?"invalid":"valid",description:"the columns to use as output",columns:t,selectedColumns:g,onChange:f,errorMessage:b==null?void 0:b.message})}),e(B,{name:"metadata_keys",control:r,render:({field:{value:g,onChange:f},fieldState:{invalid:p,error:b}})=>e(Sa,{label:"metadata keys",validationState:p?"invalid":"valid",description:"the columns to use as metadata",columns:t,selectedColumns:g,onChange:f,errorMessage:b==null?void 0:b.message})})]}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{type:"submit",isDisabled:!m,variant:d?"primary":"default",size:"compact",loading:!1,children:"Create Dataset"})})})]})}function Sa(n){const{columns:a,selectedColumns:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,m=a.length===0,y=u.useMemo(()=>m?"No columns to select":l.length>0?`${l.join(", ")}`:"No columns selected",[l,m]);return e(ua,{label:i,isDisabled:m,validationState:r,description:o,errorMessage:c,children:e(za,{isDisabled:m,...d,menu:e(Un,{selectionMode:"multiple",onSelectionChange:g=>{t(Array.from(g))},selectedKeys:new Set(l),children:a.map(g=>e(G,{children:g},g))}),triggerProps:{placement:"bottom end"},children:y})})}const Mi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:{col:"createdAt",dir:"desc"},kind:"LocalArgument",name:"sort"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"},{kind:"Variable",name:"sort",variableName:"sort"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DatasetsTableDatasetsQuery",selections:[{args:a,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetsTableDatasetsQuery",selections:[{alias:null,args:a,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:a,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"5ac1688f54e51f9bb3247c83e23d98fb",id:null,metadata:{},name:"DatasetsTableDatasetsQuery",operationKind:"query",text:`query DatasetsTableDatasetsQuery(
2481
+ `,children:[e(H,{name:"name",control:r,rules:{required:"field is required"},render:({field:{onChange:g,onBlur:f,value:p},fieldState:{invalid:b,error:S}})=>e(ae,{label:"Dataset Name",description:"The name of the dataset",errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:g,onBlur:f,value:p.toString()})}),e(H,{name:"description",control:r,render:({field:{onChange:g,onBlur:f,value:p},fieldState:{invalid:b,error:S}})=>e(Jn,{label:"description",placeholder:"Description of the dataset",isRequired:!1,height:100,errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:g,onBlur:f,value:p.toString()})}),e(H,{control:r,name:"file",rules:{required:"CSV file is required"},render:({field:{value:g,onChange:f,...p},fieldState:{invalid:b,error:S}})=>e(ua,{label:"CSV file",validationState:b?"invalid":"valid",errorMessage:S==null?void 0:S.message,children:e("input",{...p,onChange:h=>{var _;f(h.target.files),c("input_keys"),c("output_keys"),c("metadata_keys");const v=(_=h.target.files)==null?void 0:_[0];if(v){const L=new FileReader;L.onload=function(T){if(!T.target)return;const F=T.target.result,D=Hc(F);i(D)},L.readAsText(v)}},type:"file",id:"file",accept:".csv"})})}),e(H,{name:"input_keys",control:r,rules:{required:"field is required"},render:({field:{value:g,onChange:f},fieldState:{invalid:p,error:b}})=>e(Sa,{label:"input keys",validationState:p?"invalid":"valid",description:"the columns to use as input",columns:t,selectedColumns:g,onChange:f,errorMessage:b==null?void 0:b.message})}),e(H,{name:"output_keys",control:r,render:({field:{value:g,onChange:f},fieldState:{invalid:p,error:b}})=>e(Sa,{label:"output keys",validationState:p?"invalid":"valid",description:"the columns to use as output",columns:t,selectedColumns:g,onChange:f,errorMessage:b==null?void 0:b.message})}),e(H,{name:"metadata_keys",control:r,render:({field:{value:g,onChange:f},fieldState:{invalid:p,error:b}})=>e(Sa,{label:"metadata keys",validationState:p?"invalid":"valid",description:"the columns to use as metadata",columns:t,selectedColumns:g,onChange:f,errorMessage:b==null?void 0:b.message})})]}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{type:"submit",isDisabled:!m,variant:d?"primary":"default",size:"compact",loading:!1,children:"Create Dataset"})})})]})}function Sa(n){const{columns:a,selectedColumns:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,m=a.length===0,y=u.useMemo(()=>m?"No columns to select":l.length>0?`${l.join(", ")}`:"No columns selected",[l,m]);return e(ua,{label:i,isDisabled:m,validationState:r,description:o,errorMessage:c,children:e(za,{isDisabled:m,...d,menu:e(Un,{selectionMode:"multiple",onSelectionChange:g=>{t(Array.from(g))},selectedKeys:new Set(l),children:a.map(g=>e(G,{children:g},g))}),triggerProps:{placement:"bottom end"},children:y})})}const Mi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:{col:"createdAt",dir:"desc"},kind:"LocalArgument",name:"sort"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"},{kind:"Variable",name:"sort",variableName:"sort"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DatasetsTableDatasetsQuery",selections:[{args:a,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetsTableDatasetsQuery",selections:[{alias:null,args:a,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:a,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"5ac1688f54e51f9bb3247c83e23d98fb",id:null,metadata:{},name:"DatasetsTableDatasetsQuery",operationKind:"query",text:`query DatasetsTableDatasetsQuery(
2444
2482
  $after: String = null
2445
2483
  $first: Int = 100
2446
2484
  $sort: DatasetSort = {col: createdAt, dir: desc}
@@ -2476,10 +2514,10 @@ fragment DatasetsTable_datasets_dWkdd on Query {
2476
2514
  __typename
2477
2515
  }
2478
2516
  }
2479
- `}}}();Vi.hash="7066cca7015a7e344b77862b0bdab21c";function Qc({datasetId:n,datasetName:a,onDatasetDelete:l,onDatasetDeleteError:t}){const[i,r]=I.useMutation(Vi),o=u.useCallback(()=>{u.startTransition(()=>{i({variables:{datasetId:n},onCompleted:()=>{l()},onError:c=>{t(c)}})})},[i,n,l,t]);return s(j,{size:"S",title:"Delete Dataset",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete dataset ${a}? This will also delete all associated experiments and traces, and it cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{o()},disabled:r,loading:r,children:"Delete Dataset"})})})]})}function Oc({datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r}){return e(j,{title:"Edit Dataset",size:"M",children:e(vs,{datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r})})}function jc(n){const{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetDelete:r,onDatasetDeleteError:o,onDatasetEdit:c,onDatasetEditError:d}=n,[m,y]=u.useState(null),g=u.useCallback(()=>{y(e(Qc,{datasetId:a,datasetName:l,onDatasetDelete:()=>{r(),y(null)},onDatasetDeleteError:o}))},[a,l,r,o]),f=u.useCallback(()=>{y(e(Oc,{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetEdited:()=>{c(),y(null)},onDatasetEditError:d}))},[t,a,i,l,c,d]);return s("div",{onClick:p=>{p.preventDefault(),p.stopPropagation()},children:[s(He,{align:"end",buttonSize:"compact",onAction:p=>{switch(p){case"deleteDataset":g();break;case"editDataset":f();break}},children:[e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteDataset"),e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.Edit2Outline,{})}),e(K,{children:"Edit"})]})},"editDataset")]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>y(null),children:m})]})}const ll=100;function qc(n){const a=n.id;if(a!=="createdAt"&&a!=="name")throw new Error("Invalid sort column");return{col:a,dir:n.desc?"desc":"asc"}}function Bc(n){const[a,l]=u.useState([]),t=u.useRef(null),i=le(),r=pe(),o=Ln(),{data:c,loadNext:d,hasNext:m,isLoadingNext:y,refetch:g}=I.usePaginationFragment(Ni,n.query),f=u.useMemo(()=>c.datasets.edges.map(v=>v.node),[c]),p=De.useCallback(v=>{if(v){const{scrollHeight:_,scrollTop:L,clientHeight:T}=v;_-L-T<300&&!y&&m&&d(ll)}},[m,y,d]),b=me({columns:[{header:"name",accessorKey:"name",cell:({row:v})=>{const L=v.original.experimentCount>0?`${v.original.id}/experiments`:`${v.original.id}/examples`;return e(An,{to:L,children:v.original.name})}},{header:"description",accessorKey:"description",enableSorting:!1},{header:"created at",accessorKey:"createdAt",cell:Pe},{header:"example count",accessorKey:"exampleCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"experiment count",accessorKey:"experimentCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:vn},{header:"",id:"actions",enableSorting:!1,size:10,cell:({row:v})=>e(jc,{datasetId:v.original.id,datasetName:v.original.name,datasetDescription:v.original.description,datasetMetadata:v.original.metadata,onDatasetEdit:()=>{r({title:"Dataset updated",message:`${v.original.name} has been successfully updated.`}),g({},{fetchPolicy:"store-and-network"})},onDatasetEditError:_=>{o({title:"Dataset update failed",message:_.message})},onDatasetDelete:()=>{r({title:"Dataset deleted",message:`${v.original.name} has been successfully deleted.`}),g({},{fetchPolicy:"store-and-network"})},onDatasetDeleteError:_=>{o({title:"Dataset deletion failed",message:_.message})}})}],data:f,state:{sorting:a},getCoreRowModel:ge(),getSortedRowModel:Kn(),onSortingChange:l,manualSorting:!0});u.useEffect(()=>{const v=a[0];u.startTransition(()=>{g({sort:v?qc(v):{col:"createdAt",dir:"desc"},after:null,first:ll},{fetchPolicy:"store-and-network"})})},[a,g]);const S=b.getRowModel().rows,h=S.length===0;return e("div",{css:C`
2517
+ `}}}();Vi.hash="7066cca7015a7e344b77862b0bdab21c";function Gc({datasetId:n,datasetName:a,onDatasetDelete:l,onDatasetDeleteError:t}){const[i,r]=I.useMutation(Vi),o=u.useCallback(()=>{u.startTransition(()=>{i({variables:{datasetId:n},onCompleted:()=>{l()},onError:c=>{t(c)}})})},[i,n,l,t]);return s(j,{size:"S",title:"Delete Dataset",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete dataset ${a}? This will also delete all associated experiments and traces, and it cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{o()},disabled:r,loading:r,children:"Delete Dataset"})})})]})}function Uc({datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r}){return e(j,{title:"Edit Dataset",size:"M",children:e(Cs,{datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r})})}function Wc(n){const{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetDelete:r,onDatasetDeleteError:o,onDatasetEdit:c,onDatasetEditError:d}=n,[m,y]=u.useState(null),g=u.useCallback(()=>{y(e(Gc,{datasetId:a,datasetName:l,onDatasetDelete:()=>{r(),y(null)},onDatasetDeleteError:o}))},[a,l,r,o]),f=u.useCallback(()=>{y(e(Uc,{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetEdited:()=>{c(),y(null)},onDatasetEditError:d}))},[t,a,i,l,c,d]);return s("div",{onClick:p=>{p.preventDefault(),p.stopPropagation()},children:[s(Be,{align:"end",buttonSize:"compact",onAction:p=>{switch(p){case"deleteDataset":g();break;case"editDataset":f();break}},children:[e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteDataset"),e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.Edit2Outline,{})}),e(K,{children:"Edit"})]})},"editDataset")]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>y(null),children:m})]})}const ll=100;function Jc(n){const a=n.id;if(a!=="createdAt"&&a!=="name")throw new Error("Invalid sort column");return{col:a,dir:n.desc?"desc":"asc"}}function Zc(n){const[a,l]=u.useState([]),t=u.useRef(null),i=le(),r=pe(),o=Ln(),{data:c,loadNext:d,hasNext:m,isLoadingNext:y,refetch:g}=I.usePaginationFragment(Ni,n.query),f=u.useMemo(()=>c.datasets.edges.map(v=>v.node),[c]),p=De.useCallback(v=>{if(v){const{scrollHeight:_,scrollTop:L,clientHeight:T}=v;_-L-T<300&&!y&&m&&d(ll)}},[m,y,d]),b=me({columns:[{header:"name",accessorKey:"name",cell:({row:v})=>{const L=v.original.experimentCount>0?`${v.original.id}/experiments`:`${v.original.id}/examples`;return e(En,{to:L,children:v.original.name})}},{header:"description",accessorKey:"description",enableSorting:!1},{header:"created at",accessorKey:"createdAt",cell:Pe},{header:"example count",accessorKey:"exampleCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"experiment count",accessorKey:"experimentCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:vn},{header:"",id:"actions",enableSorting:!1,size:10,cell:({row:v})=>e(Wc,{datasetId:v.original.id,datasetName:v.original.name,datasetDescription:v.original.description,datasetMetadata:v.original.metadata,onDatasetEdit:()=>{r({title:"Dataset updated",message:`${v.original.name} has been successfully updated.`}),g({},{fetchPolicy:"store-and-network"})},onDatasetEditError:_=>{o({title:"Dataset update failed",message:_.message})},onDatasetDelete:()=>{r({title:"Dataset deleted",message:`${v.original.name} has been successfully deleted.`}),g({},{fetchPolicy:"store-and-network"})},onDatasetDeleteError:_=>{o({title:"Dataset deletion failed",message:_.message})}})}],data:f,state:{sorting:a},getCoreRowModel:ge(),getSortedRowModel:Kn(),onSortingChange:l,manualSorting:!0});u.useEffect(()=>{const v=a[0];u.startTransition(()=>{g({sort:v?Jc(v):{col:"createdAt",dir:"desc"},after:null,first:ll},{fetchPolicy:"store-and-network"})})},[a,g]);const S=b.getRowModel().rows,h=S.length===0;return e("div",{css:C`
2480
2518
  flex: 1 1 auto;
2481
2519
  overflow: auto;
2482
- `,onScroll:v=>p(v.target),ref:t,children:s("table",{css:_n,children:[e("thead",{children:b.getHeaderGroups().map(v=>e("tr",{children:v.headers.map(_=>{var L;return e("th",{colSpan:_.colSpan,children:_.isPlaceholder?null:s("div",{className:_.column.getCanSort()?"cursor-pointer":"",onClick:_.column.getToggleSortingHandler(),style:{textAlign:(L=_.column.columnDef.meta)==null?void 0:L.textAlign},children:[U(_.column.columnDef.header,_.getContext()),_.column.getIsSorted()?e(w,{className:"sort-icon",svg:_.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},_.id)})},v.id))}),h?e(mn,{}):e("tbody",{children:S.map(v=>e("tr",{onClick:()=>{const L=v.original.experimentCount>0?`${v.original.id}/experiments`:`${v.original.id}/examples`;i(L)},children:v.getVisibleCells().map(_=>{var L;return e("td",{align:(L=_.column.columnDef.meta)==null?void 0:L.textAlign,children:U(_.column.columnDef.cell,_.getContext())},_.id)})},v.id))})]})})}function km(){return e(u.Suspense,{fallback:e(se,{}),children:e(Hc,{})})}function Hc(){const[n,a]=u.useState(0),l=I.useLazyLoadQuery(Pi,{},{fetchKey:n,fetchPolicy:"store-and-network"}),t=u.useCallback(()=>{a(i=>i+1)},[a]);return s(k,{direction:"column",height:"100%",children:[e(x,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",flex:"none",children:s(k,{direction:"row",justifyContent:"space-between",children:[e(te,{level:1,children:"Datasets"}),e(Gc,{onDatasetCreated:t})]})}),e(Bc,{query:l})]})}function Gc({onDatasetCreated:n}){const a=le(),l=pe(),t=Ln(),[i,r]=u.useState(null),o=()=>{r(e(j,{size:"S",title:"New Dataset",children:e(Ra,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))},c=()=>{r(e(j,{size:"M",title:"New Dataset from CSV",children:e(zc,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))};return s(W,{children:[s(He,{buttonText:"Create Dataset",align:"end",icon:e(w,{svg:e(E.DatabaseOutline,{})}),onAction:d=>{switch(d){case"newDataset":o();break;case"datasetFromCSV":c();break}},children:[e(G,{children:"New Dataset"},"newDataset"),e(G,{children:"Dataset from CSV"},"datasetFromCSV")]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const $i=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"datasetId"}],a=[{kind:"Variable",name:"id",variableName:"datasetId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"d7075240e4dae8871997e57616c05302",id:null,metadata:{},name:"datasetStore_latestVersionQuery",operationKind:"query",text:`query datasetStore_latestVersionQuery(
2520
+ `,onScroll:v=>p(v.target),ref:t,children:s("table",{css:_n,children:[e("thead",{children:b.getHeaderGroups().map(v=>e("tr",{children:v.headers.map(_=>{var L;return e("th",{colSpan:_.colSpan,children:_.isPlaceholder?null:s("div",{className:_.column.getCanSort()?"cursor-pointer":"",onClick:_.column.getToggleSortingHandler(),style:{textAlign:(L=_.column.columnDef.meta)==null?void 0:L.textAlign},children:[U(_.column.columnDef.header,_.getContext()),_.column.getIsSorted()?e(w,{className:"sort-icon",svg:_.column.getIsSorted()==="asc"?e(A.ArrowUpFilled,{}):e(A.ArrowDownFilled,{})}):null]})},_.id)})},v.id))}),h?e(mn,{}):e("tbody",{children:S.map(v=>e("tr",{onClick:()=>{const L=v.original.experimentCount>0?`${v.original.id}/experiments`:`${v.original.id}/examples`;i(L)},children:v.getVisibleCells().map(_=>{var L;return e("td",{align:(L=_.column.columnDef.meta)==null?void 0:L.textAlign,children:U(_.column.columnDef.cell,_.getContext())},_.id)})},v.id))})]})})}function Km(){return e(u.Suspense,{fallback:e(se,{}),children:e(Xc,{})})}function Xc(){const[n,a]=u.useState(0),l=I.useLazyLoadQuery(Pi,{},{fetchKey:n,fetchPolicy:"store-and-network"}),t=u.useCallback(()=>{a(i=>i+1)},[a]);return s(k,{direction:"column",height:"100%",children:[e(x,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",flex:"none",children:s(k,{direction:"row",justifyContent:"space-between",children:[e(te,{level:1,children:"Datasets"}),e(Yc,{onDatasetCreated:t})]})}),e(Zc,{query:l})]})}function Yc({onDatasetCreated:n}){const a=le(),l=pe(),t=Ln(),[i,r]=u.useState(null),o=()=>{r(e(j,{size:"S",title:"New Dataset",children:e(Ra,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))},c=()=>{r(e(j,{size:"M",title:"New Dataset from CSV",children:e(Bc,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))};return s(W,{children:[s(Be,{buttonText:"Create Dataset",align:"end",icon:e(w,{svg:e(A.DatabaseOutline,{})}),onAction:d=>{switch(d){case"newDataset":o();break;case"datasetFromCSV":c();break}},children:[e(G,{children:"New Dataset"},"newDataset"),e(G,{children:"Dataset from CSV"},"datasetFromCSV")]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const $i=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"datasetId"}],a=[{kind:"Variable",name:"id",variableName:"datasetId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"d7075240e4dae8871997e57616c05302",id:null,metadata:{},name:"datasetStore_latestVersionQuery",operationKind:"query",text:`query datasetStore_latestVersionQuery(
2483
2521
  $datasetId: GlobalID!
2484
2522
  ) {
2485
2523
  dataset: node(id: $datasetId) {
@@ -2498,17 +2536,17 @@ fragment DatasetsTable_datasets_dWkdd on Query {
2498
2536
  }
2499
2537
  }
2500
2538
  }
2501
- `}}}();$i.hash="a1349b92d8b0c745f5e8039c55b048c7";const Uc=n=>{const a=(l,t)=>({...n,isRefreshingLatestVersion:!1,refreshLatestVersion:async()=>{const i=t();l({isRefreshingLatestVersion:!0});const r=await Wc({datasetId:i.datasetId});l({latestVersion:r,isRefreshingLatestVersion:!1})}});return Ir()(Lr(a))};async function Wc({datasetId:n}){var i;const a=await I.fetchQuery(Te,$i,{datasetId:n}).toPromise(),l=(i=a==null?void 0:a.dataset.latestVersions)==null?void 0:i.edges;return l&&l.length&&l[0].version||null}const zi=u.createContext(null);function Jc({children:n,...a}){const l=u.useRef();return l.current||(l.current=Uc(a)),e(zi.Provider,{value:l.current,children:n})}function dn(n,a){const l=u.useContext(zi);if(!l)throw new Error("Missing DatasetContext.Provider in the tree");return dl(l,n,a)}const Qi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addExamplesToDataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"AddDatasetExampleDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"AddDatasetExampleDialogMutation",selections:a},params:{cacheID:"718cf02ccb39b279132822bf503e51e6",id:null,metadata:{},name:"AddDatasetExampleDialogMutation",operationKind:"mutation",text:`mutation AddDatasetExampleDialogMutation(
2539
+ `}}}();$i.hash="a1349b92d8b0c745f5e8039c55b048c7";const eu=n=>{const a=(l,t)=>({...n,isRefreshingLatestVersion:!1,refreshLatestVersion:async()=>{const i=t();l({isRefreshingLatestVersion:!0});const r=await nu({datasetId:i.datasetId});l({latestVersion:r,isRefreshingLatestVersion:!1})}});return Lr()(_r(a))};async function nu({datasetId:n}){var i;const a=await I.fetchQuery(Te,$i,{datasetId:n}).toPromise(),l=(i=a==null?void 0:a.dataset.latestVersions)==null?void 0:i.edges;return l&&l.length&&l[0].version||null}const zi=u.createContext(null);function au({children:n,...a}){const l=u.useRef();return l.current||(l.current=eu(a)),e(zi.Provider,{value:l.current,children:n})}function dn(n,a){const l=u.useContext(zi);if(!l)throw new Error("Missing DatasetContext.Provider in the tree");return dl(l,n,a)}const Qi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addExamplesToDataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"AddDatasetExampleDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"AddDatasetExampleDialogMutation",selections:a},params:{cacheID:"718cf02ccb39b279132822bf503e51e6",id:null,metadata:{},name:"AddDatasetExampleDialogMutation",operationKind:"mutation",text:`mutation AddDatasetExampleDialogMutation(
2502
2540
  $input: AddExamplesToDatasetInput!
2503
2541
  ) {
2504
2542
  addExamplesToDataset(input: $input) {
2505
2543
  __typename
2506
2544
  }
2507
2545
  }
2508
- `}}}();Qi.hash="8d99470f590cd5d28701fa6e3c0330e6";const va={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Zc(n){const{datasetId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=I.useMutation(Qi),{control:c,setError:d,handleSubmit:m,formState:{isValid:y}}=qe({defaultValues:{input:"{}",output:"{}",metadata:"{}"}}),g=u.useCallback(f=>{if(i(null),!Ae(f==null?void 0:f.input))return d("input",{message:"Input must be a valid JSON object"});if(!Ae(f==null?void 0:f.output))return d("output",{message:"Output must be a valid JSON object"});if(!Ae(f==null?void 0:f.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{datasetId:a,examples:[{input:JSON.parse(f.input),output:JSON.parse(f.output),metadata:JSON.parse(f.metadata)}],datasetVersionDescription:f.description}},onCompleted:()=>{l()},onError:p=>{i(p.message)}})},[r,a,d,l]);return s(j,{size:"L",title:"Add Example",children:[e("div",{css:C`
2546
+ `}}}();Qi.hash="8d99470f590cd5d28701fa6e3c0330e6";const va={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function lu(n){const{datasetId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=I.useMutation(Qi),{control:c,setError:d,handleSubmit:m,formState:{isValid:y}}=qe({defaultValues:{input:"{}",output:"{}",metadata:"{}"}}),g=u.useCallback(f=>{if(i(null),!Ee(f==null?void 0:f.input))return d("input",{message:"Input must be a valid JSON object"});if(!Ee(f==null?void 0:f.output))return d("output",{message:"Output must be a valid JSON object"});if(!Ee(f==null?void 0:f.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{datasetId:a,examples:[{input:JSON.parse(f.input),output:JSON.parse(f.output),metadata:JSON.parse(f.metadata)}],datasetVersionDescription:f.description}},onCompleted:()=>{l()},onError:p=>{i(p.message)}})},[r,a,d,l]);return s(j,{size:"L",title:"Add Example",children:[e("div",{css:C`
2509
2547
  overflow-y: auto;
2510
2548
  padding: var(--ac-global-dimension-size-400);
2511
- `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(k,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(B,{control:c,name:"input",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...va,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ee,{value:b,onChange:f,onBlur:p})]})}),e(B,{control:c,name:"output",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...va,backgroundColor:"green-100",borderColor:"green-700",children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ee,{value:b,onChange:f,onBlur:p})]})}),e(B,{control:c,name:"metadata",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...va,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ee,{value:b,onChange:f,onBlur:p})]})}),e(B,{control:c,name:"description",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(Jn,{label:"Version Description",value:b,onChange:f,onBlur:p,errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",placeholder:"A description of the changes made. Will be displayed in the version history.",height:100})})]})})})}),e(x,{padding:"size-200",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",gap:"size-100",children:e(V,{variant:"primary",size:"compact",disabled:!y||o,loading:o,onClick:m(g),children:"Add Example"})})})]})}function Xc(n){const{datasetId:a,onAddExampleCompleted:l}=n,[t,i]=u.useState(null),r=u.useCallback(()=>{i(e(Zc,{datasetId:a,onCompleted:()=>{l(),i(null)}}))},[a,l]);return s(W,{children:[e(V,{icon:e(w,{svg:e(E.PlusCircleOutline,{})}),size:"compact",variant:"default",onClick:r,children:"Add Example"}),e(J,{isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function Yc(){const n=dn(i=>i.datasetId),a=dn(i=>i.latestVersion);let l=`${Ta}/v1/datasets/${n}/examples`;a&&(l+=`?version-id=${a.id}`);const t=u.useMemo(()=>`import phoenix as px
2549
+ `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(k,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(H,{control:c,name:"input",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...va,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ae,{value:b,onChange:f,onBlur:p})]})}),e(H,{control:c,name:"output",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...va,backgroundColor:"green-100",borderColor:"green-700",children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ae,{value:b,onChange:f,onBlur:p})]})}),e(H,{control:c,name:"metadata",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...va,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ae,{value:b,onChange:f,onBlur:p})]})}),e(H,{control:c,name:"description",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(Jn,{label:"Version Description",value:b,onChange:f,onBlur:p,errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",placeholder:"A description of the changes made. Will be displayed in the version history.",height:100})})]})})})}),e(x,{padding:"size-200",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",gap:"size-100",children:e(V,{variant:"primary",size:"compact",disabled:!y||o,loading:o,onClick:m(g),children:"Add Example"})})})]})}function tu(n){const{datasetId:a,onAddExampleCompleted:l}=n,[t,i]=u.useState(null),r=u.useCallback(()=>{i(e(lu,{datasetId:a,onCompleted:()=>{l(),i(null)}}))},[a,l]);return s(W,{children:[e(V,{icon:e(w,{svg:e(A.PlusCircleOutline,{})}),size:"compact",variant:"default",onClick:r,children:"Add Example"}),e(J,{isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function iu(){const n=dn(i=>i.datasetId),a=dn(i=>i.latestVersion);let l=`${Ta}/v1/datasets/${n}/examples`;a&&(l+=`?version-id=${a.id}`);const t=u.useMemo(()=>`import phoenix as px
2512
2550
  client = px.Client()
2513
2551
  # Get the current dataset version
2514
2552
  dataset = client.get_dataset(id="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return e("div",{css:C`
@@ -2518,7 +2556,7 @@ dataset = client.get_dataset(id="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);
2518
2556
  padding-right: 10px;
2519
2557
  }
2520
2558
  }
2521
- `,children:s(gn,{placement:"bottom right",children:[e(Rl,{addonBefore:e(w,{svg:e(E.Code,{})}),children:"Code"}),e(Va,{children:s("section",{css:C`
2559
+ `,children:s(gn,{placement:"bottom right",children:[e(Rl,{addonBefore:e(w,{svg:e(A.Code,{})}),children:"Code"}),e(Va,{children:s("section",{css:C`
2522
2560
  width: 500px;
2523
2561
  .ac-field {
2524
2562
  flex: 1 1 auto;
@@ -2586,31 +2624,31 @@ fragment DatasetHistoryTable_versions_2HEEH6 on Dataset {
2586
2624
  }
2587
2625
  id
2588
2626
  }
2589
- `}}}();ji.hash="37e453bc58759a1e89bc5862c460de6b";const qi=function(){var n=["versions"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:ji,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"DatasetHistoryTable_versions",selections:[{alias:"versions",args:null,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"__DatasetHistoryTable_versions_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},a],type:"Dataset",abstractKey:null}}();qi.hash="37e453bc58759a1e89bc5862c460de6b";const eu=100;function nu(n){const a=u.useRef(null),{data:l,loadNext:t,hasNext:i,isLoadingNext:r}=I.usePaginationFragment(qi,n.dataset),o=u.useMemo(()=>l.versions.edges.map(g=>g.node),[l]),c=De.useCallback(g=>{if(g){const{scrollHeight:f,scrollTop:p,clientHeight:b}=g;f-p-b<300&&!r&&i&&t(eu)}},[i,r,t]),d=me({columns:[{header:"version ID",accessorKey:"id"},{header:"description",accessorKey:"description"},{header:"created at",accessorKey:"createdAt",cell:Pe}],data:o,getCoreRowModel:ge(),getSortedRowModel:Kn()}),m=d.getRowModel().rows,y=m.length===0;return e("div",{css:C`
2627
+ `}}}();ji.hash="37e453bc58759a1e89bc5862c460de6b";const qi=function(){var n=["versions"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:ji,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"DatasetHistoryTable_versions",selections:[{alias:"versions",args:null,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"__DatasetHistoryTable_versions_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},a],type:"Dataset",abstractKey:null}}();qi.hash="37e453bc58759a1e89bc5862c460de6b";const ru=100;function su(n){const a=u.useRef(null),{data:l,loadNext:t,hasNext:i,isLoadingNext:r}=I.usePaginationFragment(qi,n.dataset),o=u.useMemo(()=>l.versions.edges.map(g=>g.node),[l]),c=De.useCallback(g=>{if(g){const{scrollHeight:f,scrollTop:p,clientHeight:b}=g;f-p-b<300&&!r&&i&&t(ru)}},[i,r,t]),d=me({columns:[{header:"version ID",accessorKey:"id"},{header:"description",accessorKey:"description"},{header:"created at",accessorKey:"createdAt",cell:Pe}],data:o,getCoreRowModel:ge(),getSortedRowModel:Kn()}),m=d.getRowModel().rows,y=m.length===0;return e("div",{css:C`
2590
2628
  flex: 1 1 auto;
2591
2629
  overflow: auto;
2592
- `,onScroll:g=>c(g.target),ref:a,children:s("table",{css:cn,children:[e("thead",{children:d.getHeaderGroups().map(g=>e("tr",{children:g.headers.map(f=>e("th",{colSpan:f.colSpan,children:f.isPlaceholder?null:s("div",{className:f.column.getCanSort()?"cursor-pointer":"",onClick:f.column.getToggleSortingHandler(),style:{left:f.getStart(),width:f.getSize()},children:[U(f.column.columnDef.header,f.getContext()),f.column.getIsSorted()?e(w,{className:"sort-icon",svg:f.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},f.id))},g.id))}),y?e(mn,{}):e("tbody",{children:m.map(g=>e("tr",{children:g.getVisibleCells().map(f=>e("td",{children:U(f.column.columnDef.cell,f.getContext())},f.id))},g.id))})]})})}function au(n){const{datasetId:a}=n,l=I.useLazyLoadQuery(Oi,{datasetId:a});return e(j,{size:"L",title:"Dataset History",children:e("div",{css:C`
2630
+ `,onScroll:g=>c(g.target),ref:a,children:s("table",{css:cn,children:[e("thead",{children:d.getHeaderGroups().map(g=>e("tr",{children:g.headers.map(f=>e("th",{colSpan:f.colSpan,children:f.isPlaceholder?null:s("div",{className:f.column.getCanSort()?"cursor-pointer":"",onClick:f.column.getToggleSortingHandler(),style:{left:f.getStart(),width:f.getSize()},children:[U(f.column.columnDef.header,f.getContext()),f.column.getIsSorted()?e(w,{className:"sort-icon",svg:f.column.getIsSorted()==="asc"?e(A.ArrowUpFilled,{}):e(A.ArrowDownFilled,{})}):null]})},f.id))},g.id))}),y?e(mn,{}):e("tbody",{children:m.map(g=>e("tr",{children:g.getVisibleCells().map(f=>e("td",{children:U(f.column.columnDef.cell,f.getContext())},f.id))},g.id))})]})})}function ou(n){const{datasetId:a}=n,l=I.useLazyLoadQuery(Oi,{datasetId:a});return e(j,{size:"L",title:"Dataset History",children:e("div",{css:C`
2593
2631
  height: 500px;
2594
- `,children:e(nu,{dataset:l.dataset})})})}function lu(n){const{datasetId:a}=n,[l,t]=u.useState(null);return s(W,{children:[s(Ce,{children:[e(V,{variant:"default",icon:e(w,{svg:e(E.ClockOutline,{})}),"aria-label":"Version History",onClick:()=>{t(e(au,{datasetId:a}))}}),e(Qn,{children:"Dataset Version History"})]}),e(u.Suspense,{fallback:null,children:e(J,{type:"modal",isDismissable:!0,onDismiss:()=>{t(null)},children:l})})]})}const tu=`pip install arize-phoenix>=${window.Config.platformVersion}`,iu=`import os
2632
+ `,children:e(su,{dataset:l.dataset})})})}function du(n){const{datasetId:a}=n,[l,t]=u.useState(null);return s(W,{children:[s(Ce,{children:[e(V,{variant:"default",icon:e(w,{svg:e(A.ClockOutline,{})}),"aria-label":"Version History",onClick:()=>{t(e(ou,{datasetId:a}))}}),e(Qn,{children:"Dataset Version History"})]}),e(u.Suspense,{fallback:null,children:e(J,{type:"modal",isDismissable:!0,onDismiss:()=>{t(null)},children:l})})]})}const cu=`pip install arize-phoenix>=${window.Config.platformVersion}`,uu=`import os
2595
2633
  # Set the phoenix collector endpoint. Commonly http://localhost:6060
2596
- os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"`,ru=`from phoenix.experiments.types import Example
2634
+ os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"`,mu=`from phoenix.experiments.types import Example
2597
2635
  # Define your task
2598
2636
  # Typically should be an LLM call or a call to your application
2599
2637
  def my_task(example: Example) -> str:
2600
2638
  # This is just an example of how to return a JSON serializable value
2601
- return f"Hello {example.input["person"]}"`,su=`# Define an evaluator. This just an example.
2639
+ return f"Hello {example.input["person"]}"`,gu=`# Define an evaluator. This just an example.
2602
2640
  def exact_match(input, output) -> float:
2603
2641
  return 1.0 if output is f"Hello {input}" else 0.0
2604
2642
 
2605
2643
  # Store the evaluators for later use
2606
- evaluators = [exact_match]`,ou=`# Run an experiment
2644
+ evaluators = [exact_match]`,pu=`# Run an experiment
2607
2645
  from phoenix.experiments import run_experiment
2608
2646
 
2609
- experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function Bi(){const[n,a]=u.useState(null),l=u.useCallback(()=>{a(e(j,{title:"Run Experiment",size:"XL",children:e(du,{})}))},[]);return s(W,{children:[e(V,{size:"compact",variant:"default",icon:e(w,{svg:e(E.ExperimentOutline,{})}),onClick:l,children:"Run Experiment"}),e(J,{isDismissable:!0,type:"slideOver",onDismiss:()=>{a(null)},children:n})]})}function du(){const n=dn(t=>t.datasetName),a=dn(t=>t.latestVersion),l=u.useMemo(()=>`import phoenix as px
2647
+ experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function Hi(){const[n,a]=u.useState(null),l=u.useCallback(()=>{a(e(j,{title:"Run Experiment",size:"XL",children:e(yu,{})}))},[]);return s(W,{children:[e(V,{size:"compact",variant:"default",icon:e(w,{svg:e(A.ExperimentOutline,{})}),onClick:l,children:"Run Experiment"}),e(J,{isDismissable:!0,type:"slideOver",onDismiss:()=>{a(null)},children:n})]})}function yu(){const n=dn(t=>t.datasetName),a=dn(t=>t.latestVersion),l=u.useMemo(()=>`import phoenix as px
2610
2648
  # Initialize a phoenix client
2611
2649
  client = px.Client()
2612
2650
  # Get the current dataset version. You can omit the version for the latest.
2613
- dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(K,{children:"Install Phoenix"})}),e(yn,{children:e(Ye,{value:tu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Point to a running instance of Phoenix"})}),e(yn,{children:e(Ye,{value:iu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Pull down this dataset"})}),e(yn,{children:e(Ye,{value:l})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define your task"})}),e(yn,{children:e(Ye,{value:ru})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define evaluators"})}),e(yn,{children:e(Ye,{value:su})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Run an experiment"})}),e(yn,{children:e(Ye,{value:ou})})]})}function bm(){const n=qn(),a=u.useMemo(()=>{const l=n.dataset.latestVersions;return l!=null&&l.edges&&l.edges.length?l.edges[0].version:null},[n]);return e(Jc,{datasetId:n.dataset.id,datasetName:n.dataset.name,latestVersion:a,children:e(u.Suspense,{fallback:e(se,{}),children:e(uu,{dataset:n.dataset})})})}const cu=C`
2651
+ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(K,{children:"Install Phoenix"})}),e(yn,{children:e(Ye,{value:cu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Point to a running instance of Phoenix"})}),e(yn,{children:e(Ye,{value:uu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Pull down this dataset"})}),e(yn,{children:e(Ye,{value:l})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define your task"})}),e(yn,{children:e(Ye,{value:mu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define evaluators"})}),e(yn,{children:e(Ye,{value:gu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Run an experiment"})}),e(yn,{children:e(Ye,{value:pu})})]})}function xm(){const n=qn(),a=u.useMemo(()=>{const l=n.dataset.latestVersions;return l!=null&&l.edges&&l.edges.length?l.edges[0].version:null},[n]);return e(au,{datasetId:n.dataset.id,datasetName:n.dataset.name,latestVersion:a,children:e(u.Suspense,{fallback:e(se,{}),children:e(hu,{dataset:n.dataset})})})}const fu=C`
2614
2652
  flex: 1 1 auto;
2615
2653
  display: flex;
2616
2654
  flex-direction: column;
@@ -2636,7 +2674,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
2636
2674
  }
2637
2675
  }
2638
2676
  }
2639
- `;function uu({dataset:n}){const a=n.id,l=dn(d=>d.refreshLatestVersion),t=pe(),i=le(),r=u.useCallback(d=>{d===0?i(`/datasets/${a}/experiments`):d===1&&i(`/datasets/${a}/examples`)},[i,a]),c=_r().pathname.includes("examples")?1:0;return s("main",{css:cu,children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(k,{direction:"column",justifyContent:"space-between",children:e(k,{direction:"row",gap:"size-200",alignItems:"center",children:s(k,{direction:"column",children:[e(K,{elementType:"h1",textSize:"xlarge",weight:"heavy",children:n.name}),e(K,{color:"text-700",children:n.description||"--"})]})})}),s(k,{direction:"row",gap:"size-100",children:[s(He,{align:"end",icon:e(w,{svg:e(E.DownloadOutline,{})}),onAction:d=>{switch(d){case"csv":window.open(`/v1/datasets/${n.id}/csv`,"_blank");break;case"openai-ft":window.open(`/v1/datasets/${n.id}/jsonl/openai_ft`,"_blank");break;case"openai-evals":window.open(`/v1/datasets/${n.id}/jsonl/openai_evals`,"_blank");break}},children:[e(G,{children:"Download CSV"},"csv"),e(G,{children:"Download OpenAI Fine-Tuning JSONL"},"openai-ft"),e(G,{children:"Download OpenAI Evals JSONL"},"openai-evals")]}),e(lu,{datasetId:n.id}),e(Yc,{}),e(Bi,{}),e(Xc,{datasetId:n.id,onAddExampleCompleted:()=>{t({title:"Example added",message:"The example has been added successfully and the version has been updated."}),l()}})]})]})}),s(he,{onChange:r,defaultIndex:c,children:[e(q,{name:"Experiments",extra:e($e,{children:n.experimentCount}),children:e(u.Suspense,{children:e(Fe,{})})}),e(q,{name:"Examples",extra:e($e,{children:n.exampleCount}),children:e(u.Suspense,{children:e(Fe,{})})})]})]})}const Hi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},i={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,i],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,i],storageKey:null}]},params:{cacheID:"5b221627cf7e63f41fbec41027cc0951",id:null,metadata:{},name:"datasetLoaderQuery",operationKind:"query",text:`query datasetLoaderQuery(
2677
+ `;function hu({dataset:n}){const a=n.id,l=dn(d=>d.refreshLatestVersion),t=pe(),i=le(),r=u.useCallback(d=>{d===0?i(`/datasets/${a}/experiments`):d===1&&i(`/datasets/${a}/examples`)},[i,a]),c=Er().pathname.includes("examples")?1:0;return s("main",{css:fu,children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(k,{direction:"column",justifyContent:"space-between",children:e(k,{direction:"row",gap:"size-200",alignItems:"center",children:s(k,{direction:"column",children:[e(K,{elementType:"h1",textSize:"xlarge",weight:"heavy",children:n.name}),e(K,{color:"text-700",children:n.description||"--"})]})})}),s(k,{direction:"row",gap:"size-100",children:[s(Be,{align:"end",icon:e(w,{svg:e(A.DownloadOutline,{})}),onAction:d=>{switch(d){case"csv":window.open(`/v1/datasets/${n.id}/csv`,"_blank");break;case"openai-ft":window.open(`/v1/datasets/${n.id}/jsonl/openai_ft`,"_blank");break;case"openai-evals":window.open(`/v1/datasets/${n.id}/jsonl/openai_evals`,"_blank");break}},children:[e(G,{children:"Download CSV"},"csv"),e(G,{children:"Download OpenAI Fine-Tuning JSONL"},"openai-ft"),e(G,{children:"Download OpenAI Evals JSONL"},"openai-evals")]}),e(du,{datasetId:n.id}),e(iu,{}),e(Hi,{}),e(tu,{datasetId:n.id,onAddExampleCompleted:()=>{t({title:"Example added",message:"The example has been added successfully and the version has been updated."}),l()}})]})]})}),s(he,{onChange:r,defaultIndex:c,children:[e(q,{name:"Experiments",extra:e($e,{children:n.experimentCount}),children:e(u.Suspense,{children:e(Fe,{})})}),e(q,{name:"Examples",extra:e($e,{children:n.exampleCount}),children:e(u.Suspense,{children:e(Fe,{})})})]})]})}const Bi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},i={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,i],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,i],storageKey:null}]},params:{cacheID:"5b221627cf7e63f41fbec41027cc0951",id:null,metadata:{},name:"datasetLoaderQuery",operationKind:"query",text:`query datasetLoaderQuery(
2640
2678
  $id: GlobalID!
2641
2679
  ) {
2642
2680
  dataset: node(id: $id) {
@@ -2660,7 +2698,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
2660
2698
  }
2661
2699
  }
2662
2700
  }
2663
- `}}}();Hi.hash="469da2debdebd608c88a6ef83c2540aa";async function Sm(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,Hi,{id:a}).toPromise()}const Gi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"exampleId"}],a=[{kind:"Variable",name:"id",variableName:"exampleId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},i={alias:"latestRevision",args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},o={alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[l,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[r],storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null}],storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},d=[{kind:"Literal",name:"first",value:100}],m={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,i,o],type:"DatasetExample",abstractKey:null},{args:null,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[c,{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[i,o,{alias:null,args:d,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},t,m,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},m],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[c],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"experimentRuns(first:100)"},{alias:null,args:d,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"6fa23dc80c23ecdf48e57d139d76a721",id:null,metadata:{},name:"ExampleDetailsDialogQuery",operationKind:"query",text:`query ExampleDetailsDialogQuery(
2701
+ `}}}();Bi.hash="469da2debdebd608c88a6ef83c2540aa";async function Dm(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,Bi,{id:a}).toPromise()}const Gi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"exampleId"}],a=[{kind:"Variable",name:"id",variableName:"exampleId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},i={alias:"latestRevision",args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},o={alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[l,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[r],storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null}],storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},d=[{kind:"Literal",name:"first",value:100}],m={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,i,o],type:"DatasetExample",abstractKey:null},{args:null,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[c,{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[i,o,{alias:null,args:d,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},t,m,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},m],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[c],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"experimentRuns(first:100)"},{alias:null,args:d,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"6fa23dc80c23ecdf48e57d139d76a721",id:null,metadata:{},name:"ExampleDetailsDialogQuery",operationKind:"query",text:`query ExampleDetailsDialogQuery(
2664
2702
  $exampleId: GlobalID!
2665
2703
  ) {
2666
2704
  example: node(id: $exampleId) {
@@ -2737,7 +2775,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
2737
2775
  __typename
2738
2776
  }
2739
2777
  }
2740
- `}}}();Ui.hash="a5e0e601ed24ffaa37a99ba358f960d3";const Ca={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function mu(n){const{exampleId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=I.useMutation(Ui),{control:c,setError:d,handleSubmit:m,formState:{isValid:y}}=qe({defaultValues:n.currentRevision}),g=u.useCallback(f=>{if(i(null),!Ae(f==null?void 0:f.input))return d("input",{message:"Input must be a valid JSON object"});if(!Ae(f==null?void 0:f.output))return d("output",{message:"Output must be a valid JSON object"});if(!Ae(f==null?void 0:f.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{patches:[{exampleId:a,input:JSON.parse(f.input),output:JSON.parse(f.output),metadata:JSON.parse(f.metadata)}],versionDescription:f.description}},onCompleted:()=>{l()},onError:p=>{i(p.message)}})},[r,a,d,l]);return e(j,{size:"fullscreen",title:`Edit Example: ${a}`,extra:e(V,{variant:"primary",size:"compact",disabled:!y||o,loading:o,onClick:m(g),children:"Save Changes"}),children:e("div",{css:C`
2778
+ `}}}();Ui.hash="a5e0e601ed24ffaa37a99ba358f960d3";const Ca={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function ku(n){const{exampleId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=I.useMutation(Ui),{control:c,setError:d,handleSubmit:m,formState:{isValid:y}}=qe({defaultValues:n.currentRevision}),g=u.useCallback(f=>{if(i(null),!Ee(f==null?void 0:f.input))return d("input",{message:"Input must be a valid JSON object"});if(!Ee(f==null?void 0:f.output))return d("output",{message:"Output must be a valid JSON object"});if(!Ee(f==null?void 0:f.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{patches:[{exampleId:a,input:JSON.parse(f.input),output:JSON.parse(f.output),metadata:JSON.parse(f.metadata)}],versionDescription:f.description}},onCompleted:()=>{l()},onError:p=>{i(p.message)}})},[r,a,d,l]);return e(j,{size:"fullscreen",title:`Edit Example: ${a}`,extra:e(V,{variant:"primary",size:"compact",disabled:!y||o,loading:o,onClick:m(g),children:"Save Changes"}),children:e("div",{css:C`
2741
2779
  overflow-y: auto;
2742
2780
  padding: var(--ac-global-dimension-size-400);
2743
2781
  /* Make widths configurable */
@@ -2748,7 +2786,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
2748
2786
  width: 100%;
2749
2787
  }
2750
2788
  }
2751
- `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(k,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(B,{control:c,name:"input",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Ca,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ee,{value:b,onChange:f,onBlur:p})]})}),e(B,{control:c,name:"output",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Ca,backgroundColor:"green-100",borderColor:"green-700",children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ee,{value:b,onChange:f,onBlur:p})]})}),e(B,{control:c,name:"metadata",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Ca,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ee,{value:b,onChange:f,onBlur:p})]})}),e(B,{control:c,name:"description",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(Jn,{label:"Revision Description",value:b,onChange:f,onBlur:p,errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",placeholder:"A description of the changes made in this revision. Will be displayed in the version history.",height:100})})]})})})})})}function gu(n){const{onCompleted:a,...l}=n,[t,i]=u.useState(null);return s(W,{children:[e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(E.EditOutline,{})}),onClick:()=>i(e(mu,{...l,onCompleted:()=>{i(null),a()}})),children:"Edit Example"}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const Wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},r,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},r],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ec7ead16e6df0877bc47db0ed7c7553",id:null,metadata:{},name:"ExampleExperimentRunsTableQuery",operationKind:"query",text:`query ExampleExperimentRunsTableQuery(
2789
+ `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(k,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(H,{control:c,name:"input",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Ca,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ae,{value:b,onChange:f,onBlur:p})]})}),e(H,{control:c,name:"output",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Ca,backgroundColor:"green-100",borderColor:"green-700",children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ae,{value:b,onChange:f,onBlur:p})]})}),e(H,{control:c,name:"metadata",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>s(Q,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Ca,children:[S?e(Y,{variant:"danger",banner:!0,children:h==null?void 0:h.message}):null,e(Ae,{value:b,onChange:f,onBlur:p})]})}),e(H,{control:c,name:"description",render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(Jn,{label:"Revision Description",value:b,onChange:f,onBlur:p,errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",placeholder:"A description of the changes made in this revision. Will be displayed in the version history.",height:100})})]})})})})})}function bu(n){const{onCompleted:a,...l}=n,[t,i]=u.useState(null);return s(W,{children:[e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(A.EditOutline,{})}),onClick:()=>i(e(ku,{...l,onCompleted:()=>{i(null),a()}})),children:"Edit Example"}),e(J,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const Wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},r,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},r],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ec7ead16e6df0877bc47db0ed7c7553",id:null,metadata:{},name:"ExampleExperimentRunsTableQuery",operationKind:"query",text:`query ExampleExperimentRunsTableQuery(
2752
2790
  $after: String = null
2753
2791
  $first: Int = 100
2754
2792
  $id: GlobalID!
@@ -2803,22 +2841,22 @@ fragment ExampleExperimentRunsTableFragment_2HEEH6 on DatasetExample {
2803
2841
  }
2804
2842
  id
2805
2843
  }
2806
- `}}}();Wi.hash="6ca0f938b309407e8c184a1c13d1c52d";const Ji=function(){var n=["experimentRuns"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Wi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExampleExperimentRunsTableFragment",selections:[{alias:"experimentRuns",args:null,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"__ExampleExperimentRunsTable_experimentRuns_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},l,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},l],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},a],type:"DatasetExample",abstractKey:null}}();Ji.hash="6ca0f938b309407e8c184a1c13d1c52d";const pu=100;function yu(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
2844
+ `}}}();Wi.hash="6ca0f938b309407e8c184a1c13d1c52d";const Ji=function(){var n=["experimentRuns"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Wi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExampleExperimentRunsTableFragment",selections:[{alias:"experimentRuns",args:null,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"__ExampleExperimentRunsTable_experimentRuns_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},l,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},l],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},a],type:"DatasetExample",abstractKey:null}}();Ji.hash="6ca0f938b309407e8c184a1c13d1c52d";const Su=100;function vu(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
2807
2845
  text-align: center;
2808
2846
  padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
2809
- `,children:"No experiments have been run for this example."})})})}const fu=C`
2847
+ `,children:"No experiments have been run for this example."})})})}const Cu=C`
2810
2848
  display: flex;
2811
2849
  flex-direction: row;
2812
2850
  align-items: center;
2813
2851
  color: var(--ac-global-color-primary);
2814
2852
  gap: var(--ac-global-dimension-size-50);
2815
- `;function hu({example:n}){const a=u.useRef(null),l=le(),{data:t,loadNext:i,hasNext:r,isLoadingNext:o}=I.usePaginationFragment(Ji,n),c=u.useMemo(()=>t.experimentRuns.edges.map(p=>{let b=null;return p.run.startTime&&p.run.endTime&&(b=new Date(p.run.endTime).getTime()-new Date(p.run.startTime).getTime()),{...p.run,output:JSON.stringify(p.run.output),latencyMs:b}}),[t]),m=me({columns:[{header:"start time",accessorKey:"startTime",cell:Pe},{header:"output",accessorKey:"output",cell:p=>{var S;const b=(S=p.row.original)==null?void 0:S.error;return b!==null?e(K,{color:"danger",children:b}):e(be,{...p})}},{header:"latency",accessorKey:"latencyMs",cell:({getValue:p})=>{const b=p();return b===null||typeof b!="number"?"--":e(Ke,{latencyMs:b})}},{header:"evaluations",accessorKey:"annotations",cell:({row:p})=>e(k,{direction:"row",gap:"size-50",wrap:"wrap",children:p.original.annotations.edges.map((b,S)=>{const h=b.annotation;return e(Gn,{annotation:h,extra:h.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:fu,children:[e(w,{svg:e(E.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(un,{annotation:h,onClick:()=>{h.trace&&l(`/projects/${h.trace.projectId}/traces/${h.trace.traceId}`)}},S)},S)})})},{id:"actions",cell:({row:p})=>{const b=p.original.trace;if(b)return e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(E.Trace,{})}),onClick:()=>{l(`/projects/${b.projectId}/traces/${b.traceId}`)},"aria-label":"view trace"})}}],data:c,getCoreRowModel:ge()}),y=m.getRowModel().rows,g=y.length===0,f=u.useCallback(p=>{if(p){const{scrollHeight:b,scrollTop:S,clientHeight:h}=p;b-S-h<300&&!o&&r&&i(pu)}},[r,o,i]);return e("div",{css:C`
2853
+ `;function Fu({example:n}){const a=u.useRef(null),l=le(),{data:t,loadNext:i,hasNext:r,isLoadingNext:o}=I.usePaginationFragment(Ji,n),c=u.useMemo(()=>t.experimentRuns.edges.map(p=>{let b=null;return p.run.startTime&&p.run.endTime&&(b=new Date(p.run.endTime).getTime()-new Date(p.run.startTime).getTime()),{...p.run,output:JSON.stringify(p.run.output),latencyMs:b}}),[t]),m=me({columns:[{header:"start time",accessorKey:"startTime",cell:Pe},{header:"output",accessorKey:"output",cell:p=>{var S;const b=(S=p.row.original)==null?void 0:S.error;return b!==null?e(K,{color:"danger",children:b}):e(be,{...p})}},{header:"latency",accessorKey:"latencyMs",cell:({getValue:p})=>{const b=p();return b===null||typeof b!="number"?"--":e(Ke,{latencyMs:b})}},{header:"evaluations",accessorKey:"annotations",cell:({row:p})=>e(k,{direction:"row",gap:"size-50",wrap:"wrap",children:p.original.annotations.edges.map((b,S)=>{const h=b.annotation;return e(Gn,{annotation:h,extra:h.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:Cu,children:[e(w,{svg:e(A.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(un,{annotation:h,onClick:()=>{h.trace&&l(`/projects/${h.trace.projectId}/traces/${h.trace.traceId}`)}},S)},S)})})},{id:"actions",cell:({row:p})=>{const b=p.original.trace;if(b)return e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(A.Trace,{})}),onClick:()=>{l(`/projects/${b.projectId}/traces/${b.traceId}`)},"aria-label":"view trace"})}}],data:c,getCoreRowModel:ge()}),y=m.getRowModel().rows,g=y.length===0,f=u.useCallback(p=>{if(p){const{scrollHeight:b,scrollTop:S,clientHeight:h}=p;b-S-h<300&&!o&&r&&i(Su)}},[r,o,i]);return e("div",{css:C`
2816
2854
  flex: 1 1 auto;
2817
2855
  overflow: auto;
2818
- `,ref:a,onScroll:p=>f(p.target),children:s("table",{css:_n,children:[e("thead",{children:m.getHeaderGroups().map(p=>e("tr",{children:p.headers.map(b=>e("th",{children:e("div",{children:U(b.column.columnDef.header,b.getContext())})},b.id))},p.id))}),g?e(yu,{}):e("tbody",{children:y.map(p=>e("tr",{children:p.getVisibleCells().map(b=>e("td",{children:U(b.column.columnDef.cell,b.getContext())},b.id))},p.id))})]})})}function Zi({exampleId:n,onDismiss:a}){const[l,t]=u.useState(0),i=I.useLazyLoadQuery(Gi,{exampleId:n},{fetchKey:l,fetchPolicy:"store-and-network"}),r=u.useMemo(()=>{const f=i.example.latestRevision;return{input:JSON.stringify(f==null?void 0:f.input,null,2),output:JSON.stringify(f==null?void 0:f.output,null,2),metadata:JSON.stringify(f==null?void 0:f.metadata,null,2)}},[i]),o=u.useMemo(()=>{const f=i.example.span;return f?{id:f.id,traceId:f.context.traceId,projectId:f.project.id}:null},[i]),{input:c,output:d,metadata:m}=r,y=le(),g=pe();return e(J,{type:"slideOver",isDismissable:!0,onDismiss:a,children:e(j,{size:"XL",title:`Example: ${n}`,extra:s(k,{direction:"row",gap:"size-100",children:[o?e(V,{variant:"default",size:"compact",onClick:()=>{y(`/projects/${o.projectId}/traces/${o.traceId}?selectedSpanNodeId=${o.id}`)},children:"View Source Span"}):null,e(gu,{exampleId:n,currentRevision:r,onCompleted:()=>{g({title:"Example updated",message:`Example ${n} has been updated.`}),t(f=>f+1)}})]}),children:s(ln,{direction:"vertical",autoSaveId:"example-panel-group",children:[e(ce,{defaultSize:200,children:e("div",{css:C`
2856
+ `,ref:a,onScroll:p=>f(p.target),children:s("table",{css:_n,children:[e("thead",{children:m.getHeaderGroups().map(p=>e("tr",{children:p.headers.map(b=>e("th",{children:e("div",{children:U(b.column.columnDef.header,b.getContext())})},b.id))},p.id))}),g?e(vu,{}):e("tbody",{children:y.map(p=>e("tr",{children:p.getVisibleCells().map(b=>e("td",{children:U(b.column.columnDef.cell,b.getContext())},b.id))},p.id))})]})})}function Zi({exampleId:n,onDismiss:a}){const[l,t]=u.useState(0),i=I.useLazyLoadQuery(Gi,{exampleId:n},{fetchKey:l,fetchPolicy:"store-and-network"}),r=u.useMemo(()=>{const f=i.example.latestRevision;return{input:JSON.stringify(f==null?void 0:f.input,null,2),output:JSON.stringify(f==null?void 0:f.output,null,2),metadata:JSON.stringify(f==null?void 0:f.metadata,null,2)}},[i]),o=u.useMemo(()=>{const f=i.example.span;return f?{id:f.id,traceId:f.context.traceId,projectId:f.project.id}:null},[i]),{input:c,output:d,metadata:m}=r,y=le(),g=pe();return e(J,{type:"slideOver",isDismissable:!0,onDismiss:a,children:e(j,{size:"XL",title:`Example: ${n}`,extra:s(k,{direction:"row",gap:"size-100",children:[o?e(V,{variant:"default",size:"compact",onClick:()=>{y(`/projects/${o.projectId}/traces/${o.traceId}?selectedSpanNodeId=${o.id}`)},children:"View Source Span"}):null,e(bu,{exampleId:n,currentRevision:r,onCompleted:()=>{g({title:"Example updated",message:`Example ${n} has been updated.`}),t(f=>f+1)}})]}),children:s(ln,{direction:"vertical",autoSaveId:"example-panel-group",children:[e(ce,{defaultSize:200,children:e("div",{css:C`
2819
2857
  overflow-y: auto;
2820
2858
  height: 100%;
2821
- `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",paddingTop:"size-200",paddingBottom:"size-200",children:s(k,{direction:"column",gap:"size-200",children:[e(Q,{title:"Input",...Fa,extra:e(X,{text:c}),children:e(en,{value:c})}),e(Q,{title:"Output",...Fa,extra:e(X,{text:d}),children:e(en,{value:d})}),e(Q,{title:"Metadata",...Fa,extra:e(X,{text:m}),children:e(en,{value:m})})]})})})})}),e(tn,{css:In}),e(ce,{defaultSize:100,children:s(k,{direction:"column",height:"100%",children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(te,{level:3,children:"Experiment Runs"})}),e(hu,{example:i.example})]})})]})})})}const Fa={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}};function vm(){const{exampleId:n,datasetId:a}=je(),l=le();return e(Zi,{exampleId:n,onDismiss:()=>{l(`/datasets/${a}/examples`)}})}const Xi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{args:null,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"examples(first:100)"},{alias:null,args:i,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e303fa9a3c09ccd6a3dc1f3dbb2afb3",id:null,metadata:{},name:"examplesLoaderQuery",operationKind:"query",text:`query examplesLoaderQuery(
2859
+ `,children:e(k,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",paddingTop:"size-200",paddingBottom:"size-200",children:s(k,{direction:"column",gap:"size-200",children:[e(Q,{title:"Input",...Fa,extra:e(X,{text:c}),children:e(en,{value:c})}),e(Q,{title:"Output",...Fa,extra:e(X,{text:d}),children:e(en,{value:d})}),e(Q,{title:"Metadata",...Fa,extra:e(X,{text:m}),children:e(en,{value:m})})]})})})})}),e(tn,{css:In}),e(ce,{defaultSize:100,children:s(k,{direction:"column",height:"100%",children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(te,{level:3,children:"Experiment Runs"})}),e(Fu,{example:i.example})]})})]})})})}const Fa={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}};function Tm(){const{exampleId:n,datasetId:a}=je(),l=le();return e(Zi,{exampleId:n,onDismiss:()=>{l(`/datasets/${a}/examples`)}})}const Xi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{args:null,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"examples(first:100)"},{alias:null,args:i,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e303fa9a3c09ccd6a3dc1f3dbb2afb3",id:null,metadata:{},name:"examplesLoaderQuery",operationKind:"query",text:`query examplesLoaderQuery(
2822
2860
  $id: GlobalID!
2823
2861
  ) {
2824
2862
  dataset: node(id: $id) {
@@ -2851,7 +2889,7 @@ fragment ExamplesTableFragment on Dataset {
2851
2889
  }
2852
2890
  id
2853
2891
  }
2854
- `}}}();Xi.hash="6406bbf43a2e850b384ba9573d8e69de";async function Cm(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,Xi,{id:a}).toPromise()}const Yi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"datasetVersionId"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"datasetVersionId",variableName:"datasetVersionId"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"ca59c018695d41ca01b5f9d453386886",id:null,metadata:{},name:"ExamplesTableQuery",operationKind:"query",text:`query ExamplesTableQuery(
2892
+ `}}}();Xi.hash="6406bbf43a2e850b384ba9573d8e69de";async function Im(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,Xi,{id:a}).toPromise()}const Yi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"datasetVersionId"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"datasetVersionId",variableName:"datasetVersionId"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"ca59c018695d41ca01b5f9d453386886",id:null,metadata:{},name:"ExamplesTableQuery",operationKind:"query",text:`query ExamplesTableQuery(
2855
2893
  $after: String = null
2856
2894
  $datasetVersionId: GlobalID
2857
2895
  $first: Int = 100
@@ -2897,15 +2935,15 @@ fragment ExamplesTableFragment_4a6F8Z on Dataset {
2897
2935
  }
2898
2936
  }
2899
2937
  }
2900
- `}}}();nr.hash="455bf9e5dc4b9cc655095dc829ef7e12";function ku(n){const a=dn(p=>p.refreshLatestVersion),{selectedExamples:l,onExamplesDeleted:t,onClearSelection:i}=n,[r,o]=u.useState(null),c=pe(),d=Ln(),[m,y]=I.useMutation(nr),g=l.length!==1,f=u.useCallback(()=>{m({variables:{input:{exampleIds:l.map(p=>p.id)}},onCompleted:()=>{c({title:"Examples Deleted",message:`${l.length} example${g?"s":""} have been deleted.`}),t(),i(),a()},onError:p=>{d({title:"An error occurred",message:`Failed to delete examples: ${p.message}`})}})},[m,l,c,g,t,i,a,d]);return s("div",{css:C`
2938
+ `}}}();nr.hash="455bf9e5dc4b9cc655095dc829ef7e12";function Ku(n){const a=dn(p=>p.refreshLatestVersion),{selectedExamples:l,onExamplesDeleted:t,onClearSelection:i}=n,[r,o]=u.useState(null),c=pe(),d=Ln(),[m,y]=I.useMutation(nr),g=l.length!==1,f=u.useCallback(()=>{m({variables:{input:{exampleIds:l.map(p=>p.id)}},onCompleted:()=>{c({title:"Examples Deleted",message:`${l.length} example${g?"s":""} have been deleted.`}),t(),i(),a()},onError:p=>{d({title:"An error occurred",message:`Failed to delete examples: ${p.message}`})}})},[m,l,c,g,t,i,a,d]);return s("div",{css:C`
2901
2939
  position: absolute;
2902
2940
  bottom: var(--ac-global-dimension-size-400);
2903
2941
  left: 50%;
2904
2942
  transform: translateX(-50%);
2905
- `,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${l.length} example${g?"s":""} selected`}),s(k,{direction:"row",gap:"size-100",children:[e(V,{variant:"default",size:"compact",onClick:i,children:"Cancel"}),e(V,{variant:"danger",size:"compact",icon:e(w,{svg:e(E.TrashOutline,{})}),loading:y,disabled:y,onClick:f,children:y?"Deleting...":"Delete Example"+(g?"s":"")})]})]})}),e(J,{onDismiss:()=>{o(null)},children:r})]})}const bu=100;function Su({dataset:n}){const a=dn(T=>T.latestVersion),l=u.useRef(null),[t,i]=De.useState({}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:m}=I.usePaginationFragment(er,n);u.useEffect(()=>{u.startTransition(()=>{m({datasetVersionId:(a==null?void 0:a.id)||null},{fetchPolicy:"store-and-network"})})},[a,m]);const y=u.useMemo(()=>r.examples.edges.map(T=>{const F=T.example,D=F.revision;return{id:F.id,input:D.input,output:D.output,metadata:D.metadata}}),[r]),f=me({columns:[{id:"select",header:({table:T})=>e(Ve,{checked:T.getIsAllRowsSelected(),indeterminate:T.getIsSomeRowsSelected(),onChange:T.getToggleAllRowsSelectedHandler()}),cell:({row:T})=>e(Ve,{checked:T.getIsSelected(),disabled:!T.getCanSelect(),indeterminate:T.getIsSomeSelected(),onChange:T.getToggleSelectedHandler()})},{header:"example id",accessorKey:"id",cell:({getValue:T,row:F})=>{const D=F.original.id;return e(An,{to:`${D}`,children:T()})}},{header:"input",accessorKey:"input",cell:vn},{header:"output",accessorKey:"output",cell:vn},{header:"metadata",accessorKey:"metadata",cell:vn}],data:y,state:{rowSelection:t},onRowSelectionChange:i,getCoreRowModel:ge()}),p=f.getRowModel().rows,b=p.length===0,S=f.getSelectedRowModel().rows,h=S.map(T=>T.original),v=u.useCallback(()=>{i({})},[i]),_=u.useCallback(T=>{if(T){const{scrollHeight:F,scrollTop:D,clientHeight:M}=T;F-D-M<300&&!d&&c&&o(bu)}},[c,d,o]),L=le();return s("div",{css:C`
2943
+ `,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${l.length} example${g?"s":""} selected`}),s(k,{direction:"row",gap:"size-100",children:[e(V,{variant:"default",size:"compact",onClick:i,children:"Cancel"}),e(V,{variant:"danger",size:"compact",icon:e(w,{svg:e(A.TrashOutline,{})}),loading:y,disabled:y,onClick:f,children:y?"Deleting...":"Delete Example"+(g?"s":"")})]})]})}),e(J,{onDismiss:()=>{o(null)},children:r})]})}const xu=100;function Du({dataset:n}){const a=dn(T=>T.latestVersion),l=u.useRef(null),[t,i]=De.useState({}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:m}=I.usePaginationFragment(er,n);u.useEffect(()=>{u.startTransition(()=>{m({datasetVersionId:(a==null?void 0:a.id)||null},{fetchPolicy:"store-and-network"})})},[a,m]);const y=u.useMemo(()=>r.examples.edges.map(T=>{const F=T.example,D=F.revision;return{id:F.id,input:D.input,output:D.output,metadata:D.metadata}}),[r]),f=me({columns:[{id:"select",header:({table:T})=>e(Ve,{checked:T.getIsAllRowsSelected(),indeterminate:T.getIsSomeRowsSelected(),onChange:T.getToggleAllRowsSelectedHandler()}),cell:({row:T})=>e(Ve,{checked:T.getIsSelected(),disabled:!T.getCanSelect(),indeterminate:T.getIsSomeSelected(),onChange:T.getToggleSelectedHandler()})},{header:"example id",accessorKey:"id",cell:({getValue:T,row:F})=>{const D=F.original.id;return e(En,{to:`${D}`,children:T()})}},{header:"input",accessorKey:"input",cell:vn},{header:"output",accessorKey:"output",cell:vn},{header:"metadata",accessorKey:"metadata",cell:vn}],data:y,state:{rowSelection:t},onRowSelectionChange:i,getCoreRowModel:ge()}),p=f.getRowModel().rows,b=p.length===0,S=f.getSelectedRowModel().rows,h=S.map(T=>T.original),v=u.useCallback(()=>{i({})},[i]),_=u.useCallback(T=>{if(T){const{scrollHeight:F,scrollTop:D,clientHeight:M}=T;F-D-M<300&&!d&&c&&o(xu)}},[c,d,o]),L=le();return s("div",{css:C`
2906
2944
  flex: 1 1 auto;
2907
2945
  overflow: auto;
2908
- `,ref:l,onScroll:T=>_(T.target),children:[s("table",{css:_n,children:[e("thead",{children:f.getHeaderGroups().map(T=>e("tr",{children:T.headers.map(F=>e("th",{children:e("div",{children:U(F.column.columnDef.header,F.getContext())})},F.id))},T.id))}),b?e(mn,{}):e("tbody",{children:p.map(T=>e("tr",{onClick:()=>{L(`${T.original.id}`)},children:T.getVisibleCells().map(F=>e("td",{children:U(F.column.columnDef.cell,F.getContext())},F.id))},T.id))})]}),S.length?e(ku,{selectedExamples:h,onClearSelection:v,onExamplesDeleted:()=>{m({},{fetchPolicy:"store-and-network"})}}):null]})}function Fm(){const n=qn();return s(W,{children:[e(Su,{dataset:n.dataset})," ",e(u.Suspense,{children:e(Fe,{})})]})}const ar=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},r=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:r,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"experiments(first:100)"},{alias:null,args:r,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"91f92395f5df4858554b124deed3f47a",id:null,metadata:{},name:"experimentsLoaderQuery",operationKind:"query",text:`query experimentsLoaderQuery(
2946
+ `,ref:l,onScroll:T=>_(T.target),children:[s("table",{css:_n,children:[e("thead",{children:f.getHeaderGroups().map(T=>e("tr",{children:T.headers.map(F=>e("th",{children:e("div",{children:U(F.column.columnDef.header,F.getContext())})},F.id))},T.id))}),b?e(mn,{}):e("tbody",{children:p.map(T=>e("tr",{onClick:()=>{L(`${T.original.id}`)},children:T.getVisibleCells().map(F=>e("td",{children:U(F.column.columnDef.cell,F.getContext())},F.id))},T.id))})]}),S.length?e(Ku,{selectedExamples:h,onClearSelection:v,onExamplesDeleted:()=>{m({},{fetchPolicy:"store-and-network"})}}):null]})}function Lm(){const n=qn();return s(W,{children:[e(Du,{dataset:n.dataset})," ",e(u.Suspense,{children:e(Fe,{})})]})}const ar=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},r=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:r,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"experiments(first:100)"},{alias:null,args:r,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"91f92395f5df4858554b124deed3f47a",id:null,metadata:{},name:"experimentsLoaderQuery",operationKind:"query",text:`query experimentsLoaderQuery(
2909
2947
  $id: GlobalID!
2910
2948
  ) {
2911
2949
  dataset: node(id: $id) {
@@ -2955,7 +2993,7 @@ fragment ExperimentsTableFragment on Dataset {
2955
2993
  }
2956
2994
  id
2957
2995
  }
2958
- `}}}();ar.hash="1461484d9e1232cbb99e1251edabbec3";async function Km(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,ar,{id:a}).toPromise()}const lr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:l,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[i],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"1db5ce5523fa9a472c91d093b0e6160e",id:null,metadata:{},name:"ExperimentsTableQuery",operationKind:"query",text:`query ExperimentsTableQuery(
2996
+ `}}}();ar.hash="1461484d9e1232cbb99e1251edabbec3";async function _m(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,ar,{id:a}).toPromise()}const lr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:l,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[i],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"1db5ce5523fa9a472c91d093b0e6160e",id:null,metadata:{},name:"ExperimentsTableQuery",operationKind:"query",text:`query ExperimentsTableQuery(
2959
2997
  $after: String = null
2960
2998
  $first: Int = 100
2961
2999
  $id: GlobalID!
@@ -3006,19 +3044,19 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
3006
3044
  }
3007
3045
  id
3008
3046
  }
3009
- `}}}();lr.hash="c7c7580fe40888ceb86a1701fe4eedf4";const tr=function(){var n=["experiments"],a={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:lr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExperimentsTableFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:"experiments",args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"__ExperimentsTable_experiments_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Dataset",abstractKey:null}}();tr.hash="c7c7580fe40888ceb86a1701fe4eedf4";function vu({getValue:n}){const a=n(),l=a!==null?a*100:null,t=u.useMemo(()=>{if(l!==null)return l>=80?"red-1100":l>0?"orange-1100":"green-1100"},[l]);return e(K,{color:t,children:Da(l)})}const ir=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"ExperimentMutationPayload",kind:"LinkedField",name:"deleteExperiments",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a},params:{cacheID:"3af24cbaf3208c0d5ad1cd9313dd3823",id:null,metadata:{},name:"ExperimentSelectionToolbarDeleteExperimentsMutation",operationKind:"mutation",text:`mutation ExperimentSelectionToolbarDeleteExperimentsMutation(
3047
+ `}}}();lr.hash="c7c7580fe40888ceb86a1701fe4eedf4";const tr=function(){var n=["experiments"],a={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:lr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExperimentsTableFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:"experiments",args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"__ExperimentsTable_experiments_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Dataset",abstractKey:null}}();tr.hash="c7c7580fe40888ceb86a1701fe4eedf4";function Tu({getValue:n}){const a=n(),l=a!==null?a*100:null,t=u.useMemo(()=>{if(l!==null)return l>=80?"red-1100":l>0?"orange-1100":"green-1100"},[l]);return e(K,{color:t,children:Da(l)})}const ir=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"ExperimentMutationPayload",kind:"LinkedField",name:"deleteExperiments",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a},params:{cacheID:"3af24cbaf3208c0d5ad1cd9313dd3823",id:null,metadata:{},name:"ExperimentSelectionToolbarDeleteExperimentsMutation",operationKind:"mutation",text:`mutation ExperimentSelectionToolbarDeleteExperimentsMutation(
3010
3048
  $input: DeleteExperimentsInput!
3011
3049
  ) {
3012
3050
  deleteExperiments(input: $input) {
3013
3051
  __typename
3014
3052
  }
3015
3053
  }
3016
- `}}}();ir.hash="4ab310746eb51c6a3fcb799d2c972762";function Cu(n){const a=le(),[l,t]=u.useState(null),[i,r]=I.useMutation(ir),{datasetId:o,selectedExperiments:c,onClearSelection:d,onExperimentsDeleted:m}=n,y=c.length!==1,g=pe(),f=Ln(),p=u.useCallback(()=>{i({variables:{input:{experimentIds:c.map(S=>S.id)}},onCompleted:()=>{g({title:"Examples Deleted",message:`${c.length} experiment${y?"s":""} have been deleted.`}),m(),d()},onError:S=>{f({title:"An error occurred",message:`Failed to delete examples: ${S.message}`})}})},[i,y,f,g,d,m,c]),b=u.useCallback(()=>{t(s(j,{size:"S",title:"Delete Experiments",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:"Are you sure you want to delete these experiments? This will also delete all associated annotations and traces, and it cannot be undone."})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{p(),t(null)},children:"Delete Experiments"})})})]}))},[p]);return s("div",{css:C`
3054
+ `}}}();ir.hash="4ab310746eb51c6a3fcb799d2c972762";function Iu(n){const a=le(),[l,t]=u.useState(null),[i,r]=I.useMutation(ir),{datasetId:o,selectedExperiments:c,onClearSelection:d,onExperimentsDeleted:m}=n,y=c.length!==1,g=pe(),f=Ln(),p=u.useCallback(()=>{i({variables:{input:{experimentIds:c.map(S=>S.id)}},onCompleted:()=>{g({title:"Examples Deleted",message:`${c.length} experiment${y?"s":""} have been deleted.`}),m(),d()},onError:S=>{f({title:"An error occurred",message:`Failed to delete examples: ${S.message}`})}})},[i,y,f,g,d,m,c]),b=u.useCallback(()=>{t(s(j,{size:"S",title:"Delete Experiments",children:[e(x,{padding:"size-200",children:e(K,{color:"danger",children:"Are you sure you want to delete these experiments? This will also delete all associated annotations and traces, and it cannot be undone."})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(k,{direction:"row",justifyContent:"end",children:e(V,{variant:"danger",onClick:()=>{p(),t(null)},children:"Delete Experiments"})})})]}))},[p]);return s("div",{css:C`
3017
3055
  position: absolute;
3018
3056
  bottom: var(--ac-global-dimension-size-400);
3019
3057
  left: 50%;
3020
3058
  transform: translateX(-50%);
3021
- `,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:"size-100",children:[e(K,{children:`${c.length} experiment${y?"s":""} selected`}),s(k,{direction:"row",gap:"size-100",children:[e(V,{variant:"default",size:"compact",onClick:d,children:"Cancel"}),e(V,{variant:"danger",size:"compact",icon:e(w,{svg:e(E.TrashOutline,{})}),loading:r,disabled:r,onClick:b,children:r?"Deleting...":"Delete"}),e(V,{variant:"primary",size:"compact",onClick:()=>{a(`/datasets/${o}/compare?${c.map(S=>`experimentId=${S.id}`).join("&")}`)},icon:e(w,{svg:e(E.ArrowCompareOutline,{})}),children:"Compare Experiments"})]})]})}),e(J,{onDismiss:()=>{t(null)},children:l})]})}const Fu=100;function Ku(){return e("tbody",{className:"is-empty",children:e("tr",{children:s("td",{colSpan:100,css:C`
3059
+ `,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(k,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:"size-100",children:[e(K,{children:`${c.length} experiment${y?"s":""} selected`}),s(k,{direction:"row",gap:"size-100",children:[e(V,{variant:"default",size:"compact",onClick:d,children:"Cancel"}),e(V,{variant:"danger",size:"compact",icon:e(w,{svg:e(A.TrashOutline,{})}),loading:r,disabled:r,onClick:b,children:r?"Deleting...":"Delete"}),e(V,{variant:"primary",size:"compact",onClick:()=>{a(`/datasets/${o}/compare?${c.map(S=>`experimentId=${S.id}`).join("&")}`)},icon:e(w,{svg:e(A.ArrowCompareOutline,{})}),children:"Compare Experiments"})]})]})}),e(J,{onDismiss:()=>{t(null)},children:l})]})}const Lu=100;function _u(){return e("tbody",{className:"is-empty",children:e("tr",{children:s("td",{colSpan:100,css:C`
3022
3060
  text-align: center;
3023
3061
  padding: var(--ac-global-dimension-size-400) !important;
3024
3062
  .ac-button {
@@ -3026,20 +3064,20 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
3026
3064
  margin-left: auto;
3027
3065
  margin-right: auto;
3028
3066
  }
3029
- `,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(Bi,{})]})})})}function xu({dataset:n}){const a=u.useRef(null),[l,t]=u.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:c,refetch:d}=I.usePaginationFragment(tr,n),m=u.useMemo(()=>i.experiments.edges.map(F=>{const D=F.experiment.annotationSummaries.reduce((M,R)=>(M[R.annotationName]=R,M),{});return{...F.experiment,annotationSummaryMap:D}}),[i]),y=[{id:"select",header:({table:F})=>e(Ve,{checked:F.getIsAllRowsSelected(),indeterminate:F.getIsSomeRowsSelected(),onChange:F.getToggleAllRowsSelectedHandler()}),cell:({row:F})=>e(Ve,{checked:F.getIsSelected(),disabled:!F.getCanSelect(),indeterminate:F.getIsSomeSelected(),onChange:F.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:F,row:D})=>{const M=D.original.id,R=D.original.sequenceNumber;return s(k,{direction:"row",gap:"size-100",children:[e(da,{sequenceNumber:R}),e(An,{to:`/datasets/${n.id}/compare?experimentId=${M}`,children:F()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:be},{header:"created at",accessorKey:"createdAt",cell:Pe}],g=i.experimentAnnotationSummaries.map(F=>{const{annotationName:D,minScore:M,maxScore:R}=F;return{header:()=>s(k,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(K,{children:D}),e(Cs,{annotationName:D})]}),id:`annotation-${D}`,meta:{textAlign:"right"},cell:({row:O})=>{const Z=O.original.annotationSummaryMap[D];return!Z||Z.meanScore==null?e("span",{css:C`
3067
+ `,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(Hi,{})]})})})}function Eu({dataset:n}){const a=u.useRef(null),[l,t]=u.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:c,refetch:d}=I.usePaginationFragment(tr,n),m=u.useMemo(()=>i.experiments.edges.map(F=>{const D=F.experiment.annotationSummaries.reduce((M,R)=>(M[R.annotationName]=R,M),{});return{...F.experiment,annotationSummaryMap:D}}),[i]),y=[{id:"select",header:({table:F})=>e(Ve,{checked:F.getIsAllRowsSelected(),indeterminate:F.getIsSomeRowsSelected(),onChange:F.getToggleAllRowsSelectedHandler()}),cell:({row:F})=>e(Ve,{checked:F.getIsSelected(),disabled:!F.getCanSelect(),indeterminate:F.getIsSomeSelected(),onChange:F.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:F,row:D})=>{const M=D.original.id,R=D.original.sequenceNumber;return s(k,{direction:"row",gap:"size-100",children:[e(da,{sequenceNumber:R}),e(En,{to:`/datasets/${n.id}/compare?experimentId=${M}`,children:F()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:be},{header:"created at",accessorKey:"createdAt",cell:Pe}],g=i.experimentAnnotationSummaries.map(F=>{const{annotationName:D,minScore:M,maxScore:R}=F;return{header:()=>s(k,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(K,{children:D}),e(Fs,{annotationName:D})]}),id:`annotation-${D}`,meta:{textAlign:"right"},cell:({row:O})=>{const Z=O.original.annotationSummaryMap[D];return!Z||Z.meanScore==null?e("span",{css:C`
3030
3068
  float: right;
3031
- `,children:"--"}):e(Du,{annotationName:D,value:Z.meanScore,min:M,max:R})}}}),f=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:Fs},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:F})=>{const D=F();return D===null||typeof D!="number"?"--":e(Ke,{latencyMs:D})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:vu},{header:"metadata",accessorKey:"metadata",minSize:200,cell:vn},{id:"actions",cell:({row:F})=>{const D=F.original.project,M=F.original.metadata;return e(Tu,{projectId:(D==null?void 0:D.id)||null,experimentId:F.original.id,metadata:M})}}],p=me({columns:[...y,...g,...f],data:m,getCoreRowModel:ge(),state:{rowSelection:l},onRowSelectionChange:t}),b=p.getRowModel().rows,S=p.getSelectedRowModel().rows,h=S.map(F=>F.original),v=u.useCallback(()=>{t({})},[t]),_=b.length===0,L=u.useCallback(F=>{if(F){const{scrollHeight:D,scrollTop:M,clientHeight:R}=F;D-M-R<300&&!c&&o&&r(Fu)}},[o,c,r]),T=le();return s("div",{css:C`
3069
+ `,children:"--"}):e(Au,{annotationName:D,value:Z.meanScore,min:M,max:R})}}}),f=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:Ks},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:F})=>{const D=F();return D===null||typeof D!="number"?"--":e(Ke,{latencyMs:D})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:Tu},{header:"metadata",accessorKey:"metadata",minSize:200,cell:vn},{id:"actions",cell:({row:F})=>{const D=F.original.project,M=F.original.metadata;return e(wu,{projectId:(D==null?void 0:D.id)||null,experimentId:F.original.id,metadata:M})}}],p=me({columns:[...y,...g,...f],data:m,getCoreRowModel:ge(),state:{rowSelection:l},onRowSelectionChange:t}),b=p.getRowModel().rows,S=p.getSelectedRowModel().rows,h=S.map(F=>F.original),v=u.useCallback(()=>{t({})},[t]),_=b.length===0,L=u.useCallback(F=>{if(F){const{scrollHeight:D,scrollTop:M,clientHeight:R}=F;D-M-R<300&&!c&&o&&r(Lu)}},[o,c,r]),T=le();return s("div",{css:C`
3032
3070
  flex: 1 1 auto;
3033
3071
  overflow: auto;
3034
3072
  width: table.getTotalSize();
3035
- `,ref:a,onScroll:F=>L(F.target),children:[s("table",{css:_n,children:[e("thead",{children:p.getHeaderGroups().map(F=>e("tr",{children:F.headers.map(D=>{var M,R;return e("th",{align:(R=(M=D.column.columnDef)==null?void 0:M.meta)==null?void 0:R.textAlign,children:e("div",{children:U(D.column.columnDef.header,D.getContext())})},D.id)})},F.id))}),_?e(Ku,{}):e("tbody",{children:b.map(F=>e("tr",{onClick:()=>{T(`/datasets/${n.id}/compare?experimentId=${F.original.id}`)},children:F.getVisibleCells().map(D=>e("td",{children:U(D.column.columnDef.cell,D.getContext())},D.id))},F.id))})]}),S.length?e(Cu,{datasetId:n.id,selectedExperiments:h,onClearSelection:v,onExperimentsDeleted:()=>{d({},{fetchPolicy:"store-and-network"})}}):null]})}function Du({annotationName:n,value:a,min:l,max:t}){const i=Fl(n),r=u.useMemo(()=>{const o=typeof l=="number"?l:0,c=typeof t=="number"?t:1;if(o===c&&c===a)return 100;const d=c-o||1;return(a-o)/d*100},[a,l,t]);return s(Ce,{children:[e(Cn,{children:s("div",{css:C`
3073
+ `,ref:a,onScroll:F=>L(F.target),children:[s("table",{css:_n,children:[e("thead",{children:p.getHeaderGroups().map(F=>e("tr",{children:F.headers.map(D=>{var M,R;return e("th",{align:(R=(M=D.column.columnDef)==null?void 0:M.meta)==null?void 0:R.textAlign,children:e("div",{children:U(D.column.columnDef.header,D.getContext())})},D.id)})},F.id))}),_?e(_u,{}):e("tbody",{children:b.map(F=>e("tr",{onClick:()=>{T(`/datasets/${n.id}/compare?experimentId=${F.original.id}`)},children:F.getVisibleCells().map(D=>e("td",{children:U(D.column.columnDef.cell,D.getContext())},D.id))},F.id))})]}),S.length?e(Iu,{datasetId:n.id,selectedExperiments:h,onClearSelection:v,onExperimentsDeleted:()=>{d({},{fetchPolicy:"store-and-network"})}}):null]})}function Au({annotationName:n,value:a,min:l,max:t}){const i=Fl(n),r=u.useMemo(()=>{const o=typeof l=="number"?l:0,c=typeof t=="number"?t:1;if(o===c&&c===a)return 100;const d=c-o||1;return(a-o)/d*100},[a,l,t]);return s(Ce,{children:[e(Cn,{children:s("div",{css:C`
3036
3074
  float: right;
3037
3075
  --mod-barloader-fill-color: ${i};
3038
3076
  display: flex;
3039
3077
  flex-direction: row;
3040
3078
  align-items: center;
3041
3079
  gap: var(--ac-global-dimension-size-100);
3042
- `,children:[Sn(a),e(As,{width:"40px",value:r,"aria-label":"where the mean score lands between overall min max"})]})}),e(Wn,{children:s(x,{width:"size-2400",children:[e(te,{level:3,weight:"heavy",children:n}),s(k,{direction:"column",children:[s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score"}),e(K,{textSize:"small",children:Sn(a)})]}),s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Min"}),e(K,{textSize:"small",children:Sn(l)})]}),s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Max"}),e(K,{textSize:"small",children:Sn(t)})]}),s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score Percentile"}),e(K,{textSize:"small",children:Kl(r)})]})]})]})})]})}function Tu(n){const{projectId:a}=n,l=le(),[t,i]=u.useState(null),r=pe();return s("div",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:[s(He,{buttonSize:"compact",align:"end",disabledKeys:a?[]:["GO_TO_EXPERIMENT_RUN_TRACES"],onAction:o=>{switch(o){case"GO_TO_EXPERIMENT_RUN_TRACES":return l(`/projects/${a}`);case"VIEW_METADATA":{i(e(j,{title:"Metadata",onDismiss:()=>i(null),children:e(en,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{Ar(n.experimentId),r({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}default:ke()}},children:[e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.Trace,{})}),e(K,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.InfoOutline,{})}),e(K,{children:"View metadata"})]})},"VIEW_METADATA"),e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.ClipboardCopy,{})}),e(K,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function xm(){const n=qn();return s(W,{children:[e(xu,{dataset:n.dataset}),e(u.Suspense,{children:e(Fe,{})})]})}const rr=function(){var n={defaultValue:null,kind:"LocalArgument",name:"datasetId"},a={defaultValue:null,kind:"LocalArgument",name:"experimentIds"},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={alias:"comparisons",args:[{kind:"Variable",name:"experimentIds",variableName:"experimentIds"}],concreteType:"ExperimentComparison",kind:"LinkedField",name:"compareExperiments",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"example",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:"referenceOutput",args:null,kind:"ScalarField",name:"output",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"RunComparisonItem",kind:"LinkedField",name:"runComparisonItems",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"experimentId",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"runs",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},t,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},t],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},o=[{kind:"Variable",name:"id",variableName:"datasetId"}],c={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,c],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,c],storageKey:null}]},params:{cacheID:"97e80c617426f75b81affa68e276b3d8",id:null,metadata:{},name:"ExperimentCompareTableQuery",operationKind:"query",text:`query ExperimentCompareTableQuery(
3080
+ `,children:[Sn(a),e(As,{width:"40px",value:r,"aria-label":"where the mean score lands between overall min max"})]})}),e(Wn,{children:s(x,{width:"size-2400",children:[e(te,{level:3,weight:"heavy",children:n}),s(k,{direction:"column",children:[s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score"}),e(K,{textSize:"small",children:Sn(a)})]}),s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Min"}),e(K,{textSize:"small",children:Sn(l)})]}),s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Max"}),e(K,{textSize:"small",children:Sn(t)})]}),s(k,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score Percentile"}),e(K,{textSize:"small",children:Kl(r)})]})]})]})})]})}function wu(n){const{projectId:a}=n,l=le(),[t,i]=u.useState(null),r=pe();return s("div",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:[s(Be,{buttonSize:"compact",align:"end",disabledKeys:a?[]:["GO_TO_EXPERIMENT_RUN_TRACES"],onAction:o=>{switch(o){case"GO_TO_EXPERIMENT_RUN_TRACES":return l(`/projects/${a}`);case"VIEW_METADATA":{i(e(j,{title:"Metadata",onDismiss:()=>i(null),children:e(en,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{Ar(n.experimentId),r({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}default:ke()}},children:[e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.Trace,{})}),e(K,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.InfoOutline,{})}),e(K,{children:"View metadata"})]})},"VIEW_METADATA"),e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.ClipboardCopy,{})}),e(K,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")]}),e(J,{type:"modal",isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function Em(){const n=qn();return s(W,{children:[e(Eu,{dataset:n.dataset}),e(u.Suspense,{children:e(Fe,{})})]})}const rr=function(){var n={defaultValue:null,kind:"LocalArgument",name:"datasetId"},a={defaultValue:null,kind:"LocalArgument",name:"experimentIds"},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={alias:"comparisons",args:[{kind:"Variable",name:"experimentIds",variableName:"experimentIds"}],concreteType:"ExperimentComparison",kind:"LinkedField",name:"compareExperiments",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"example",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:"referenceOutput",args:null,kind:"ScalarField",name:"output",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"RunComparisonItem",kind:"LinkedField",name:"runComparisonItems",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"experimentId",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"runs",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},t,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},t],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},o=[{kind:"Variable",name:"id",variableName:"datasetId"}],c={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,c],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,c],storageKey:null}]},params:{cacheID:"97e80c617426f75b81affa68e276b3d8",id:null,metadata:{},name:"ExperimentCompareTableQuery",operationKind:"query",text:`query ExperimentCompareTableQuery(
3043
3081
  $experimentIds: [GlobalID!]!
3044
3082
  $datasetId: GlobalID!
3045
3083
  ) {
@@ -3097,7 +3135,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
3097
3135
  }
3098
3136
  }
3099
3137
  }
3100
- `}}}();rr.hash="e6132b301f6d80be7f5c5b0653e25178";const Ka={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}},Iu=C`
3138
+ `}}}();rr.hash="e6132b301f6d80be7f5c5b0653e25178";const Ka={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}},Ru=C`
3101
3139
  flex: 1 1 auto;
3102
3140
  overflow: auto;
3103
3141
  // Make sure the table fills up the remaining space
@@ -3131,22 +3169,22 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
3131
3169
  display: flex;
3132
3170
  flex-direction: row;
3133
3171
  gap: var(--ac-global-dimension-static-size-100);
3134
- `,Lu=C`
3172
+ `,Pu=C`
3135
3173
  display: flex;
3136
3174
  flex-direction: row;
3137
3175
  align-items: center;
3138
3176
  color: var(--ac-global-color-primary);
3139
3177
  gap: var(--ac-global-dimension-size-50);
3140
- `;function _u(n){const{datasetId:a,experimentIds:l,displayFullText:t}=n,i=I.useLazyLoadQuery(rr,{experimentIds:l,datasetId:a}),r=u.useMemo(()=>{var h,v;return((v=(h=i.dataset)==null?void 0:h.experiments)==null?void 0:v.edges.reduce((_,L)=>(_[L.experiment.id]={...L.experiment},_),{}))||{}},[i]),o=u.useMemo(()=>i.comparisons.map(h=>{const v=h.runComparisonItems.reduce((_,L)=>(_[L.experimentId]=L,_),{});return{...h,id:h.example.id,input:h.example.revision.input,referenceOutput:h.example.revision.referenceOutput,runComparisonMap:v}}),[i]),[c,d]=u.useState(null),m=u.useMemo(()=>[{header:"input",accessorKey:"input",minWidth:500,cell:({row:h})=>s("div",{css:sr,children:[e(ja,{children:e(Ma,{json:h.original.input,disableTitle:!0,space:t?2:0})}),e("div",{className:"controls",css:or,children:s(Ce,{children:[e(V,{variant:"default",size:"compact","aria-label":"View example details",icon:e(w,{svg:e(E.ExpandOutline,{})}),onClick:()=>{u.startTransition(()=>{d(e(u.Suspense,{children:e(Zi,{exampleId:h.original.example.id,onDismiss:()=>{d(null)}})}))})}}),e(Qn,{children:"View Example"})]})})]})},{header:"reference output",accessorKey:"referenceOutput",minWidth:500,cell:t?Pu:vn}],[t]),y=u.useMemo(()=>l.map(h=>({header:()=>{var L,T;const v=(L=r[h])==null?void 0:L.name,_=((T=r[h])==null?void 0:T.sequenceNumber)||0;return s(k,{direction:"row",gap:"size-100",wrap:!0,children:[e(da,{sequenceNumber:_}),e(K,{children:v})]})},accessorKey:h,minSize:500,cell:({row:v})=>{var O,Z;const _=v.original.runComparisonMap[h],L=(_==null?void 0:_.runs.length)||0;if(L===0)return e(tl,{});if(L>1)return e(K,{color:"warning",children:`${L} runs`});const T=_==null?void 0:_.runs[0];let F=null;const D=(O=T==null?void 0:T.trace)==null?void 0:O.traceId,M=(Z=T==null?void 0:T.trace)==null?void 0:Z.projectId;D&&M&&(F=s(Ce,{children:[e(V,{variant:"default",className:"trace-button",size:"compact","aria-label":"View run trace",icon:e(w,{svg:e(E.Trace,{})}),onClick:ee=>{ee.preventDefault(),ee.stopPropagation(),u.startTransition(()=>{d(e(mr,{traceId:D,projectId:M,title:"Experiment Run Trace"}))})}}),e(Qn,{children:"View Trace"})]}));const R=s(W,{children:[s(Ce,{children:[e(V,{variant:"default",className:"expand-button",size:"compact","aria-label":"View example run details",icon:e(w,{svg:e(E.ExpandOutline,{})}),onClick:ee=>{ee.preventDefault(),ee.stopPropagation(),u.startTransition(()=>{d(e(Mu,{selectedExample:v.original,datasetId:a,experimentInfoById:r}))})}}),e(Qn,{children:"View run details"})]}),F]});return T?e(Ru,{controls:R,children:e(wu,{...T,displayFullText:t,setDialog:d})}):e(tl,{})}})),[l,r,a,t]),g=u.useMemo(()=>[...m,...y,{id:"tail",minSize:500}],[m,y]),f=me({columns:g,data:o,getCoreRowModel:ge(),columnResizeMode:"onChange"}),p=De.useMemo(()=>{const h=f.getFlatHeaders(),v={};for(let _=0;_<h.length;_++){const L=h[_];v[`--header-${L.id}-size`]=L.getSize(),v[`--col-${L.column.id}-size`]=L.column.getSize()}return v},[f.getState().columnSizingInfo,f.getState().columnSizing]),S=f.getRowModel().rows.length===0;return s("div",{css:Iu,children:[s("table",{css:h=>C(cn(h),Ks),style:{...p,width:f.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:f.getHeaderGroups().map(h=>e("tr",{children:h.headers.map(v=>s("th",{style:{width:`calc(var(--header-${v==null?void 0:v.id}-size) * 1px)`},children:[e("div",{children:U(v.column.columnDef.header,v.getContext())}),e("div",{onMouseDown:v.getResizeHandler(),onTouchStart:v.getResizeHandler(),className:`resizer ${v.column.getIsResizing()?"isResizing":""}`})]},v.id))},h.id))}),S?e(mn,{}):f.getState().columnSizingInfo.isResizingColumn?e(Au,{table:f}):e(dr,{table:f})]}),e(J,{isDismissable:!0,type:"slideOver",onDismiss:()=>{d(null)},children:c})]})}function dr({table:n}){return e("tbody",{children:n.getRowModel().rows.map(a=>e("tr",{children:a.getVisibleCells().map(l=>e("td",{style:{width:`calc(var(--col-${l.column.id}-size) * 1px)`},children:U(l.column.columnDef.cell,l.getContext())},l.id))},a.id))})}const Au=De.memo(dr,(n,a)=>n.table.options.data===a.table.options.data);function Eu(n){const{datasetId:a,exampleId:l}=n,t=le();return e("div",{onClick:i=>{i.preventDefault(),i.stopPropagation()},children:e(He,{buttonSize:"compact",align:"end",onAction:i=>{switch(i){case"gotoExample":return t(`/datasets/${a}/examples/${l}`);default:ke()}},children:e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(E.ExternalLinkOutline,{})}),e(K,{children:"Go to example"})]})},"gotoExample")})})}function wu(n){const{output:a,error:l,startTime:t,endTime:i,annotations:r,displayFullText:o,setDialog:c}=n;if(l)return e(cr,{error:l});const d=r!=null&&r.edges.length?r.edges.map(m=>m.annotation):[];return s(k,{direction:"column",gap:"size-100",height:"100%",justifyContent:"space-between",children:[e(ja,{children:e(Ma,{json:a,disableTitle:!0,space:o?2:0})}),s("ul",{css:C`
3178
+ `;function Mu(n){const{datasetId:a,experimentIds:l,displayFullText:t}=n,i=I.useLazyLoadQuery(rr,{experimentIds:l,datasetId:a}),r=u.useMemo(()=>{var h,v;return((v=(h=i.dataset)==null?void 0:h.experiments)==null?void 0:v.edges.reduce((_,L)=>(_[L.experiment.id]={...L.experiment},_),{}))||{}},[i]),o=u.useMemo(()=>i.comparisons.map(h=>{const v=h.runComparisonItems.reduce((_,L)=>(_[L.experimentId]=L,_),{});return{...h,id:h.example.id,input:h.example.revision.input,referenceOutput:h.example.revision.referenceOutput,runComparisonMap:v}}),[i]),[c,d]=u.useState(null),m=u.useMemo(()=>[{header:"input",accessorKey:"input",minWidth:500,cell:({row:h})=>s("div",{css:sr,children:[e(ja,{children:e(Ma,{json:h.original.input,disableTitle:!0,space:t?2:0})}),e("div",{className:"controls",css:or,children:s(Ce,{children:[e(V,{variant:"default",size:"compact","aria-label":"View example details",icon:e(w,{svg:e(A.ExpandOutline,{})}),onClick:()=>{u.startTransition(()=>{d(e(u.Suspense,{children:e(Zi,{exampleId:h.original.example.id,onDismiss:()=>{d(null)}})}))})}}),e(Qn,{children:"View Example"})]})})]})},{header:"reference output",accessorKey:"referenceOutput",minWidth:500,cell:t?Qu:vn}],[t]),y=u.useMemo(()=>l.map(h=>({header:()=>{var L,T;const v=(L=r[h])==null?void 0:L.name,_=((T=r[h])==null?void 0:T.sequenceNumber)||0;return s(k,{direction:"row",gap:"size-100",wrap:!0,children:[e(da,{sequenceNumber:_}),e(K,{children:v})]})},accessorKey:h,minSize:500,cell:({row:v})=>{var O,Z;const _=v.original.runComparisonMap[h],L=(_==null?void 0:_.runs.length)||0;if(L===0)return e(tl,{});if(L>1)return e(K,{color:"warning",children:`${L} runs`});const T=_==null?void 0:_.runs[0];let F=null;const D=(O=T==null?void 0:T.trace)==null?void 0:O.traceId,M=(Z=T==null?void 0:T.trace)==null?void 0:Z.projectId;D&&M&&(F=s(Ce,{children:[e(V,{variant:"default",className:"trace-button",size:"compact","aria-label":"View run trace",icon:e(w,{svg:e(A.Trace,{})}),onClick:ee=>{ee.preventDefault(),ee.stopPropagation(),u.startTransition(()=>{d(e(mr,{traceId:D,projectId:M,title:"Experiment Run Trace"}))})}}),e(Qn,{children:"View Trace"})]}));const R=s(W,{children:[s(Ce,{children:[e(V,{variant:"default",className:"expand-button",size:"compact","aria-label":"View example run details",icon:e(w,{svg:e(A.ExpandOutline,{})}),onClick:ee=>{ee.preventDefault(),ee.stopPropagation(),u.startTransition(()=>{d(e(Ou,{selectedExample:v.original,datasetId:a,experimentInfoById:r}))})}}),e(Qn,{children:"View run details"})]}),F]});return T?e(zu,{controls:R,children:e($u,{...T,displayFullText:t,setDialog:d})}):e(tl,{})}})),[l,r,a,t]),g=u.useMemo(()=>[...m,...y,{id:"tail",minSize:500}],[m,y]),f=me({columns:g,data:o,getCoreRowModel:ge(),columnResizeMode:"onChange"}),p=De.useMemo(()=>{const h=f.getFlatHeaders(),v={};for(let _=0;_<h.length;_++){const L=h[_];v[`--header-${L.id}-size`]=L.getSize(),v[`--col-${L.column.id}-size`]=L.column.getSize()}return v},[f.getState().columnSizingInfo,f.getState().columnSizing]),S=f.getRowModel().rows.length===0;return s("div",{css:Ru,children:[s("table",{css:h=>C(cn(h),xs),style:{...p,width:f.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:f.getHeaderGroups().map(h=>e("tr",{children:h.headers.map(v=>s("th",{style:{width:`calc(var(--header-${v==null?void 0:v.id}-size) * 1px)`},children:[e("div",{children:U(v.column.columnDef.header,v.getContext())}),e("div",{onMouseDown:v.getResizeHandler(),onTouchStart:v.getResizeHandler(),className:`resizer ${v.column.getIsResizing()?"isResizing":""}`})]},v.id))},h.id))}),S?e(mn,{}):f.getState().columnSizingInfo.isResizingColumn?e(Nu,{table:f}):e(dr,{table:f})]}),e(J,{isDismissable:!0,type:"slideOver",onDismiss:()=>{d(null)},children:c})]})}function dr({table:n}){return e("tbody",{children:n.getRowModel().rows.map(a=>e("tr",{children:a.getVisibleCells().map(l=>e("td",{style:{width:`calc(var(--col-${l.column.id}-size) * 1px)`},children:U(l.column.columnDef.cell,l.getContext())},l.id))},a.id))})}const Nu=De.memo(dr,(n,a)=>n.table.options.data===a.table.options.data);function Vu(n){const{datasetId:a,exampleId:l}=n,t=le();return e("div",{onClick:i=>{i.preventDefault(),i.stopPropagation()},children:e(Be,{buttonSize:"compact",align:"end",onAction:i=>{switch(i){case"gotoExample":return t(`/datasets/${a}/examples/${l}`);default:ke()}},children:e(G,{children:s(k,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(w,{svg:e(A.ExternalLinkOutline,{})}),e(K,{children:"Go to example"})]})},"gotoExample")})})}function $u(n){const{output:a,error:l,startTime:t,endTime:i,annotations:r,displayFullText:o,setDialog:c}=n;if(l)return e(cr,{error:l});const d=r!=null&&r.edges.length?r.edges.map(m=>m.annotation):[];return s(k,{direction:"column",gap:"size-100",height:"100%",justifyContent:"space-between",children:[e(ja,{children:e(Ma,{json:a,disableTitle:!0,space:o?2:0})}),s("ul",{css:C`
3141
3179
  display: flex;
3142
3180
  flex-direction: row;
3143
3181
  gap: var(--ac-global-dimension-static-size-100);
3144
3182
  align-items: center;
3145
3183
  flex-wrap: wrap;
3146
- `,children:[e("li",{children:e(ur,{startTime:t,endTime:i})},"run-latency"),d.map(m=>e("li",{children:e(Gn,{annotation:m,extra:m.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:Lu,children:[e(w,{svg:e(E.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(un,{annotation:m,onClick:()=>{const y=m.trace;y&&u.startTransition(()=>{c(e(mr,{traceId:y.traceId,projectId:y.projectId,title:`Evaluator Trace: ${m.name}`}))})}})})},m.id))]})]})}function Ru(n){return s("div",{css:sr,children:[n.children,e("div",{css:or,className:"controls",children:n.controls})]})}function cr({error:n}){return s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(w,{svg:e(E.AlertCircleOutline,{}),color:"danger"}),e(K,{color:"danger",children:n})]})}function ur({startTime:n,endTime:a}){const l=u.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(Ke,{latencyMs:l})}function tl(){return s(k,{direction:"row",gap:"size-50",children:[e(w,{svg:e(E.MinusCircleOutline,{}),color:"grey-800"}),e(K,{color:"text-700",children:"not run"})]})}function Pu({getValue:n}){const a=n();return e(ja,{children:e(Ma,{json:a,space:2})})}function ja({children:n}){return e("div",{css:C`
3184
+ `,children:[e("li",{children:e(ur,{startTime:t,endTime:i})},"run-latency"),d.map(m=>e("li",{children:e(Gn,{annotation:m,extra:m.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:Pu,children:[e(w,{svg:e(A.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(un,{annotation:m,onClick:()=>{const y=m.trace;y&&u.startTransition(()=>{c(e(mr,{traceId:y.traceId,projectId:y.projectId,title:`Evaluator Trace: ${m.name}`}))})}})})},m.id))]})]})}function zu(n){return s("div",{css:sr,children:[n.children,e("div",{css:or,className:"controls",children:n.controls})]})}function cr({error:n}){return s(k,{direction:"row",gap:"size-50",alignItems:"center",children:[e(w,{svg:e(A.AlertCircleOutline,{}),color:"danger"}),e(K,{color:"danger",children:n})]})}function ur({startTime:n,endTime:a}){const l=u.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(Ke,{latencyMs:l})}function tl(){return s(k,{direction:"row",gap:"size-50",children:[e(w,{svg:e(A.MinusCircleOutline,{}),color:"grey-800"}),e(K,{color:"text-700",children:"not run"})]})}function Qu({getValue:n}){const a=n();return e(ja,{children:e(Ma,{json:a,space:2})})}function ja({children:n}){return e("div",{css:C`
3147
3185
  max-height: 300px;
3148
3186
  overflow-y: auto;
3149
- `,children:n})}function Mu({selectedExample:n,datasetId:a,experimentInfoById:l}){return e(j,{title:`Comparing Experiments for Example: ${n.id}`,size:"fullscreen",extra:e(Eu,{datasetId:a,exampleId:n.id}),children:s(ln,{direction:"vertical",autoSaveId:"example-compare-panel-group",children:[e(ce,{defaultSize:100,children:e("div",{css:C`
3187
+ `,children:n})}function Ou({selectedExample:n,datasetId:a,experimentInfoById:l}){return e(j,{title:`Comparing Experiments for Example: ${n.id}`,size:"fullscreen",extra:e(Vu,{datasetId:a,exampleId:n.id}),children:s(ln,{direction:"vertical",autoSaveId:"example-compare-panel-group",children:[e(ce,{defaultSize:100,children:e("div",{css:C`
3150
3188
  overflow-y: auto;
3151
3189
  height: 100%;
3152
3190
  `,children:e(x,{overflow:"hidden",padding:"size-200",children:s(k,{direction:"row",gap:"size-200",flex:"1 1 auto",children:[e(x,{width:"50%",children:e(Q,{title:"Input",...Ka,bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},extra:e(X,{text:JSON.stringify(n.input)}),children:e(en,{value:JSON.stringify(n.input,null,2)})})}),e(x,{width:"50%",children:e(Q,{title:"Reference Output",...Ka,extra:e(X,{text:JSON.stringify(n.input)}),bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},children:e(en,{value:JSON.stringify(n.referenceOutput,null,2)})})})]})})})}),e(tn,{css:In}),e(ce,{defaultSize:200,children:s(k,{direction:"column",height:"100%",children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(te,{level:2,children:"Experiments"})}),e("div",{css:C`
@@ -3168,12 +3206,12 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
3168
3206
  gap: var(
3169
3207
  --ac-global-dimension-static-size-100
3170
3208
  );
3171
- `,children:(c=r.annotations)==null?void 0:c.edges.map(d=>e("li",{children:e(un,{annotation:d.annotation})},d.annotation.id))})]})]})},o)})})})},t.experimentId)})})})]})})]})})}function mr({traceId:n,projectId:a,title:l}){const t=le();return e(j,{title:l,size:"fullscreen",extra:e(V,{variant:"default",onClick:()=>t(`/projects/${a}/traces/${n}`),children:"View Trace in Project"}),children:e(Qt,{traceId:n,projectId:a})})}const gr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExperimentMultiSelector__experiments",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};gr.hash="1aa376b1e9425f49268ac231dc2c0412";function Nu(n){const{dataset:a,selectedExperimentIds:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,m=I.useFragment(gr,a),y=u.useMemo(()=>m.experiments.edges.map(p=>p.experiment),[m]),g=y.length===0,f=u.useMemo(()=>{if(g)return"No experiments";const p=l.length;return p>0?`${p} experiment${p>1?"s":""}`:"No experiments selected"},[l,g]);return e(ua,{label:i,isDisabled:g,validationState:r,description:o,errorMessage:c,children:e(za,{isDisabled:g,...d,menu:e(Un,{selectionMode:"multiple",onSelectionChange:p=>{t(Array.from(p))},selectedKeys:new Set(l),children:y.map(p=>e(G,{textValue:p.name,children:s(k,{direction:"column",gap:"size-50",children:[s(k,{direction:"row",gap:"size-100",children:[e(da,{sequenceNumber:p.sequenceNumber}),e(K,{children:p.name})]}),e(K,{textSize:"small",color:"text-700",children:new Date(p.createdAt).toLocaleString()})]})},p.id))}),triggerProps:{placement:"bottom start"},children:f})})}function Dm(){const n=qn(),[a,l]=u.useState(!1),[t,i]=ol(),r=t.getAll("experimentId"),o=r.length>0;return s("main",{css:C`
3209
+ `,children:(c=r.annotations)==null?void 0:c.edges.map(d=>e("li",{children:e(un,{annotation:d.annotation})},d.annotation.id))})]})]})},o)})})})},t.experimentId)})})})]})})]})})}function mr({traceId:n,projectId:a,title:l}){const t=le();return e(j,{title:l,size:"fullscreen",extra:e(V,{variant:"default",onClick:()=>t(`/projects/${a}/traces/${n}`),children:"View Trace in Project"}),children:e(Qt,{traceId:n,projectId:a})})}const gr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExperimentMultiSelector__experiments",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};gr.hash="1aa376b1e9425f49268ac231dc2c0412";function ju(n){const{dataset:a,selectedExperimentIds:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,m=I.useFragment(gr,a),y=u.useMemo(()=>m.experiments.edges.map(p=>p.experiment),[m]),g=y.length===0,f=u.useMemo(()=>{if(g)return"No experiments";const p=l.length;return p>0?`${p} experiment${p>1?"s":""}`:"No experiments selected"},[l,g]);return e(ua,{label:i,isDisabled:g,validationState:r,description:o,errorMessage:c,children:e(za,{isDisabled:g,...d,menu:e(Un,{selectionMode:"multiple",onSelectionChange:p=>{t(Array.from(p))},selectedKeys:new Set(l),children:y.map(p=>e(G,{textValue:p.name,children:s(k,{direction:"column",gap:"size-50",children:[s(k,{direction:"row",gap:"size-100",children:[e(da,{sequenceNumber:p.sequenceNumber}),e(K,{children:p.name})]}),e(K,{textSize:"small",color:"text-700",children:new Date(p.createdAt).toLocaleString()})]})},p.id))}),triggerProps:{placement:"bottom start"},children:f})})}function Am(){const n=qn(),[a,l]=u.useState(!1),[t,i]=ol(),r=t.getAll("experimentId"),o=r.length>0;return s("main",{css:C`
3172
3210
  height: 100%;
3173
3211
  display: flex;
3174
3212
  flex-direction: column;
3175
3213
  overflow: hidden;
3176
- `,children:[e(x,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(k,{direction:"column",gap:"size-100",children:[e(te,{level:1,children:"Compare Experiments"}),s(k,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e(Nu,{dataset:n.dataset,selectedExperimentIds:r,label:"experiments",onChange:c=>{u.startTransition(()=>{t.delete("experimentId"),c.forEach(d=>{t.append("experimentId",d)}),i(t)})}}),e($a,{onChange:c=>{l(c)},defaultSelected:!1,labelPlacement:"start",children:"Full Text"})]})]})}),o?e(u.Suspense,{fallback:e(se,{}),children:e(_u,{datasetId:n.dataset.id,experimentIds:r,displayFullText:a})}):e(x,{padding:"size-200",children:e(Y,{variant:"info",title:"No Experiment Selected",children:"Please select one or more experiments."})})]})}const pr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,{args:null,kind:"FragmentSpread",name:"ExperimentMultiSelector__experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"InlineFragment",selections:[t,{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e89f99f940098a21985137aae870de7",id:null,metadata:{},name:"experimentCompareLoaderQuery",operationKind:"query",text:`query experimentCompareLoaderQuery(
3214
+ `,children:[e(x,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(k,{direction:"column",gap:"size-100",children:[e(te,{level:1,children:"Compare Experiments"}),s(k,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e(ju,{dataset:n.dataset,selectedExperimentIds:r,label:"experiments",onChange:c=>{u.startTransition(()=>{t.delete("experimentId"),c.forEach(d=>{t.append("experimentId",d)}),i(t)})}}),e($a,{onChange:c=>{l(c)},defaultSelected:!1,labelPlacement:"start",children:"Full Text"})]})]})}),o?e(u.Suspense,{fallback:e(se,{}),children:e(Mu,{datasetId:n.dataset.id,experimentIds:r,displayFullText:a})}):e(x,{padding:"size-200",children:e(Y,{variant:"info",title:"No Experiment Selected",children:"Please select one or more experiments."})})]})}const pr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,{args:null,kind:"FragmentSpread",name:"ExperimentMultiSelector__experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"InlineFragment",selections:[t,{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e89f99f940098a21985137aae870de7",id:null,metadata:{},name:"experimentCompareLoaderQuery",operationKind:"query",text:`query experimentCompareLoaderQuery(
3177
3215
  $id: GlobalID!
3178
3216
  ) {
3179
3217
  dataset: node(id: $id) {
@@ -3199,7 +3237,7 @@ fragment ExperimentMultiSelector__experiments on Dataset {
3199
3237
  }
3200
3238
  }
3201
3239
  }
3202
- `}}}();pr.hash="fa02088830fd16688f0f2fba9a0009eb";async function Tm(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,pr,{id:a}).toPromise()}const yr={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"APIKeysCardQuery",selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"APIKeysCardQuery",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}]},params:{cacheID:"07048107c95469bc12ff425c6ba264ea",id:null,metadata:{},name:"APIKeysCardQuery",operationKind:"query",text:`query APIKeysCardQuery {
3240
+ `}}}();pr.hash="fa02088830fd16688f0f2fba9a0009eb";async function wm(n){const{datasetId:a}=n.params;return await I.fetchQuery(Te,pr,{id:a}).toPromise()}const yr={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"APIKeysCardQuery",selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"APIKeysCardQuery",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}]},params:{cacheID:"07048107c95469bc12ff425c6ba264ea",id:null,metadata:{},name:"APIKeysCardQuery",operationKind:"query",text:`query APIKeysCardQuery {
3203
3241
  ...SystemAPIKeysTableFragment
3204
3242
  }
3205
3243
 
@@ -3237,7 +3275,7 @@ fragment SystemAPIKeysTableFragment on Query {
3237
3275
  expiresAt
3238
3276
  }
3239
3277
  }
3240
- `}}}();fr.hash="8e8563676b39f1e44ef4bac4057ef7e3";function Vu(n){const{onSystemKeyCreated:a}=n,[l,t]=u.useState(null),{control:i,handleSubmit:r,formState:{isDirty:o,isValid:c},setError:d}=qe({defaultValues:{name:"System",description:"",expiresAt:""}}),[m,y]=I.useMutation(fr),g=u.useCallback(f=>{if(f.expiresAt){const p=cl(f.expiresAt);if(!ul(p))return d("expiresAt",{message:"Date is not in a valid format"});if(p<new Date)return d("expiresAt",{message:"Date must be in the future"})}t(null),m({variables:{...f,expiresAt:f.expiresAt||null},onCompleted:p=>{a(p.createSystemApiKey.jwt)},onError:p=>{t(p.message)}})},[m,a,d]);return s(j,{title:"Create a System Key",isDismissable:!0,children:[l&&e(Y,{variant:"danger",banner:!0,children:l}),s(Er,{onSubmit:r(g),children:[s(x,{padding:"size-200",children:[e(B,{name:"name",control:i,rules:{required:"System key name is required"},render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(ae,{label:"Name",description:"A short name to identify this key",errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",onChange:f,onBlur:p,value:b.toString()})}),e(B,{name:"description",control:i,render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(Jn,{label:"description",description:"A description of the system key",isRequired:!1,height:100,errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",onChange:f,onBlur:p,value:b==null?void 0:b.toString()})}),e(B,{name:"expiresAt",control:i,render:({field:{name:f,onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(ae,{label:"Expires At",type:"datetime-local",name:f,description:"The date at which the key will expire. Optional",errorMessage:v==null?void 0:v.message,validationState:h?"invalid":"valid",onChange:p,onBlur:b,defaultValue:S})})]}),e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderColor:"dark",borderTopWidth:"thin",children:e(k,{direction:"row",gap:"size-100",justifyContent:"end",children:e(V,{variant:o?"primary":"default",type:"submit",size:"compact",disabled:!c||y,children:y?"Creating...":"Create Key"})})})]})]})}const hr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SystemAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};hr.hash="74b725ff0b7b3ce3015ff314e8606cb7";function $u({query:n}){const a=I.useFragment(hr,n),l=u.useMemo(()=>[...a.systemApiKeys],[a]),t=me({columns:[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:be},{header:"Created At",accessorKey:"createdAt",cell:Pe},{header:"Expires At",accessorKey:"expiresAt",cell:Pe}],data:l,getCoreRowModel:ge()}),i=t.getRowModel().rows,r=t.getRowModel().rows.length===0;return s("table",{css:cn,children:[e("thead",{children:t.getHeaderGroups().map(o=>e("tr",{children:o.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:s("div",{className:c.column.getCanSort()?"cursor-pointer":"",onClick:c.column.getToggleSortingHandler(),style:{left:c.getStart(),width:c.getSize()},children:[U(c.column.columnDef.header,c.getContext()),c.column.getIsSorted()?e(w,{className:"sort-icon",svg:c.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},c.id))},o.id))}),r?e(mn,{message:"No Keys"}):e("tbody",{children:i.map(o=>e("tr",{children:o.getVisibleCells().map(c=>e("td",{children:U(c.column.columnDef.cell,c.getContext())},c.id))},o.id))})]})}function zu(){const n=I.useLazyLoadQuery(yr,{});return s(he,{children:[e(q,{title:"System Keys",name:"System Keys",children:e($u,{query:n})}),e(q,{title:"User Keys",name:"User Keys",children:e("p",{children:"Coming Soon"})})]})}function Qu(){const[n,a]=u.useState(null),l=i=>{a(e(Ou,{jwt:i}))},t=()=>{a(e(Vu,{onSystemKeyCreated:l}))};return s("div",{children:[e(Na,{title:"API Keys",variant:"compact",extra:e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(E.PlusCircleOutline,{})}),onClick:t,children:"System Key"}),children:e(u.Suspense,{fallback:e(se,{}),children:e(zu,{})})}),e(J,{onDismiss:()=>{a(null)},children:n})]})}function Ou(n){const{jwt:a}=n;return s(j,{title:"New API Key Created",isDismissable:!0,children:[e(Y,{variant:"success",banner:!0,children:"You have successfully created a new API key. The API key will only be displayed once below. Please copy and save it in a secure location."}),e("div",{css:C`
3278
+ `}}}();fr.hash="8e8563676b39f1e44ef4bac4057ef7e3";function qu(n){const{onSystemKeyCreated:a}=n,[l,t]=u.useState(null),{control:i,handleSubmit:r,formState:{isDirty:o,isValid:c},setError:d}=qe({defaultValues:{name:"System",description:"",expiresAt:""}}),[m,y]=I.useMutation(fr),g=u.useCallback(f=>{if(f.expiresAt){const p=cl(f.expiresAt);if(!ul(p))return d("expiresAt",{message:"Date is not in a valid format"});if(p<new Date)return d("expiresAt",{message:"Date must be in the future"})}t(null),m({variables:{...f,expiresAt:f.expiresAt||null},onCompleted:p=>{a(p.createSystemApiKey.jwt)},onError:p=>{t(p.message)}})},[m,a,d]);return s(j,{title:"Create a System Key",isDismissable:!0,children:[l&&e(Y,{variant:"danger",banner:!0,children:l}),s(wr,{onSubmit:r(g),children:[s(x,{padding:"size-200",children:[e(H,{name:"name",control:i,rules:{required:"System key name is required"},render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(ae,{label:"Name",description:"A short name to identify this key",errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",onChange:f,onBlur:p,value:b.toString()})}),e(H,{name:"description",control:i,render:({field:{onChange:f,onBlur:p,value:b},fieldState:{invalid:S,error:h}})=>e(Jn,{label:"description",description:"A description of the system key",isRequired:!1,height:100,errorMessage:h==null?void 0:h.message,validationState:S?"invalid":"valid",onChange:f,onBlur:p,value:b==null?void 0:b.toString()})}),e(H,{name:"expiresAt",control:i,render:({field:{name:f,onChange:p,onBlur:b,value:S},fieldState:{invalid:h,error:v}})=>e(ae,{label:"Expires At",type:"datetime-local",name:f,description:"The date at which the key will expire. Optional",errorMessage:v==null?void 0:v.message,validationState:h?"invalid":"valid",onChange:p,onBlur:b,defaultValue:S})})]}),e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderColor:"dark",borderTopWidth:"thin",children:e(k,{direction:"row",gap:"size-100",justifyContent:"end",children:e(V,{variant:o?"primary":"default",type:"submit",size:"compact",disabled:!c||y,children:y?"Creating...":"Create Key"})})})]})]})}const hr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SystemAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};hr.hash="74b725ff0b7b3ce3015ff314e8606cb7";function Hu({query:n}){const a=I.useFragment(hr,n),l=u.useMemo(()=>[...a.systemApiKeys],[a]),t=me({columns:[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:be},{header:"Created At",accessorKey:"createdAt",cell:Pe},{header:"Expires At",accessorKey:"expiresAt",cell:Pe}],data:l,getCoreRowModel:ge()}),i=t.getRowModel().rows,r=t.getRowModel().rows.length===0;return s("table",{css:cn,children:[e("thead",{children:t.getHeaderGroups().map(o=>e("tr",{children:o.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:s("div",{className:c.column.getCanSort()?"cursor-pointer":"",onClick:c.column.getToggleSortingHandler(),style:{left:c.getStart(),width:c.getSize()},children:[U(c.column.columnDef.header,c.getContext()),c.column.getIsSorted()?e(w,{className:"sort-icon",svg:c.column.getIsSorted()==="asc"?e(A.ArrowUpFilled,{}):e(A.ArrowDownFilled,{})}):null]})},c.id))},o.id))}),r?e(mn,{message:"No Keys"}):e("tbody",{children:i.map(o=>e("tr",{children:o.getVisibleCells().map(c=>e("td",{children:U(c.column.columnDef.cell,c.getContext())},c.id))},o.id))})]})}function Bu(){const n=I.useLazyLoadQuery(yr,{});return s(he,{children:[e(q,{title:"System Keys",name:"System Keys",children:e(Hu,{query:n})}),e(q,{title:"User Keys",name:"User Keys",children:e("p",{children:"Coming Soon"})})]})}function Gu(){const[n,a]=u.useState(null),l=i=>{a(e(Uu,{jwt:i}))},t=()=>{a(e(qu,{onSystemKeyCreated:l}))};return s("div",{children:[e(Na,{title:"API Keys",variant:"compact",extra:e(V,{variant:"default",size:"compact",icon:e(w,{svg:e(A.PlusCircleOutline,{})}),onClick:t,children:"System Key"}),children:e(u.Suspense,{fallback:e(se,{}),children:e(Bu,{})})}),e(J,{onDismiss:()=>{a(null)},children:n})]})}function Uu(n){const{jwt:a}=n;return s(j,{title:"New API Key Created",isDismissable:!0,children:[e(Y,{variant:"success",banner:!0,children:"You have successfully created a new API key. The API key will only be displayed once below. Please copy and save it in a secure location."}),e("div",{css:C`
3241
3279
  padding: var(--ac-global-dimension-size-200);
3242
3280
  .ac-field {
3243
3281
  width: 100%;
@@ -3270,9 +3308,9 @@ fragment UsersTable_users on Query {
3270
3308
  }
3271
3309
  }
3272
3310
  }
3273
- `}}}();br.hash="97d1aefa41e8831e57b6bb0d1a078a7c";function ju({onNewUserCreated:n,onNewUserCreationError:a,onDismiss:l}){const[t,i]=I.useMutation(br),r=u.useCallback(o=>{t({variables:{input:o},onCompleted:c=>{n(c.createUser.user.email)},onError:c=>{a(c)}})},[t,n,a]);return e(J,{onDismiss:l,isDismissable:!0,type:"modal",isKeyboardDismissDisabled:!0,children:e(j,{title:"Add user",children:e(xs,{onSubmit:r,isSubmitting:i})})})}const Sr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UsersTable_users",selections:[{alias:null,args:null,concreteType:"UserConnection",kind:"LinkedField",name:"users",plural:!1,selections:[{alias:null,args:null,concreteType:"UserEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"user",args:null,concreteType:"User",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Sr.hash="a87302705dfc7b091db312313f46ec4f";function qu({query:n}){const a=I.useFragment(Sr,n),l=u.useMemo(()=>a.users.edges.map(({user:o})=>({email:o.email,username:o.username,createdAt:o.createdAt,roleName:o.role.name.toLocaleLowerCase()})),[a]),t=me({columns:[{header:"email",accessorKey:"email"},{header:"username",accessorKey:"username"},{header:"role",accessorKey:"roleName"},{header:"created at",accessorKey:"createdAt",cell:Pe}],data:l,getCoreRowModel:ge(),getSortedRowModel:Kn()}),i=t.getRowModel().rows,r=t.getRowModel().rows.length===0;return s("table",{css:cn,children:[e("thead",{children:t.getHeaderGroups().map(o=>e("tr",{children:o.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:s("div",{className:c.column.getCanSort()?"cursor-pointer":"",onClick:c.column.getToggleSortingHandler(),style:{left:c.getStart(),width:c.getSize()},children:[U(c.column.columnDef.header,c.getContext()),c.column.getIsSorted()?e(w,{className:"sort-icon",svg:c.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},c.id))},o.id))}),r?e(mn,{}):e("tbody",{children:i.map(o=>e("tr",{children:o.getVisibleCells().map(c=>e("td",{children:U(c.column.columnDef.cell,c.getContext())},c.id))},o.id))})]})}function Bu(){const[n,a]=u.useState(0),[l,t]=u.useState(null),i=pe(),r=Ln(),o=I.useLazyLoadQuery(kr,{},{fetchKey:n,fetchPolicy:"store-and-network"});return s(Q,{title:"Users",variant:"compact",bodyStyle:{padding:0},extra:e(V,{onClick:()=>{t(e(ju,{onDismiss:()=>{t(null)},onNewUserCreated:c=>{i({title:"User added",message:`User ${c} has been added.`}),a(d=>d+1),t(null)},onNewUserCreationError:c=>{r({title:"Error adding user",message:c.message})}}))},variant:"default",size:"compact",icon:e(w,{svg:e(E.PlusCircleOutline,{})}),children:"Add User"}),children:[e(u.Suspense,{fallback:e(se,{}),children:e(qu,{query:o})}),e(J,{onDismiss:()=>{t(null)},children:l})]})}const Hu=C`
3311
+ `}}}();br.hash="97d1aefa41e8831e57b6bb0d1a078a7c";function Wu({onNewUserCreated:n,onNewUserCreationError:a,onDismiss:l}){const[t,i]=I.useMutation(br),r=u.useCallback(o=>{t({variables:{input:o},onCompleted:c=>{n(c.createUser.user.email)},onError:c=>{a(c)}})},[t,n,a]);return e(J,{onDismiss:l,isDismissable:!0,type:"modal",isKeyboardDismissDisabled:!0,children:e(j,{title:"Add user",children:e(Ds,{onSubmit:r,isSubmitting:i})})})}const Sr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UsersTable_users",selections:[{alias:null,args:null,concreteType:"UserConnection",kind:"LinkedField",name:"users",plural:!1,selections:[{alias:null,args:null,concreteType:"UserEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"user",args:null,concreteType:"User",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Sr.hash="a87302705dfc7b091db312313f46ec4f";function Ju({query:n}){const a=I.useFragment(Sr,n),l=u.useMemo(()=>a.users.edges.map(({user:o})=>({email:o.email,username:o.username,createdAt:o.createdAt,roleName:o.role.name.toLocaleLowerCase()})),[a]),t=me({columns:[{header:"email",accessorKey:"email"},{header:"username",accessorKey:"username"},{header:"role",accessorKey:"roleName"},{header:"created at",accessorKey:"createdAt",cell:Pe}],data:l,getCoreRowModel:ge(),getSortedRowModel:Kn()}),i=t.getRowModel().rows,r=t.getRowModel().rows.length===0;return s("table",{css:cn,children:[e("thead",{children:t.getHeaderGroups().map(o=>e("tr",{children:o.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:s("div",{className:c.column.getCanSort()?"cursor-pointer":"",onClick:c.column.getToggleSortingHandler(),style:{left:c.getStart(),width:c.getSize()},children:[U(c.column.columnDef.header,c.getContext()),c.column.getIsSorted()?e(w,{className:"sort-icon",svg:c.column.getIsSorted()==="asc"?e(A.ArrowUpFilled,{}):e(A.ArrowDownFilled,{})}):null]})},c.id))},o.id))}),r?e(mn,{}):e("tbody",{children:i.map(o=>e("tr",{children:o.getVisibleCells().map(c=>e("td",{children:U(c.column.columnDef.cell,c.getContext())},c.id))},o.id))})]})}function Zu(){const[n,a]=u.useState(0),[l,t]=u.useState(null),i=pe(),r=Ln(),o=I.useLazyLoadQuery(kr,{},{fetchKey:n,fetchPolicy:"store-and-network"});return s(Q,{title:"Users",variant:"compact",bodyStyle:{padding:0},extra:e(V,{onClick:()=>{t(e(Wu,{onDismiss:()=>{t(null)},onNewUserCreated:c=>{i({title:"User added",message:`User ${c} has been added.`}),a(d=>d+1),t(null)},onNewUserCreationError:c=>{r({title:"Error adding user",message:c.message})}}))},variant:"default",size:"compact",icon:e(w,{svg:e(A.PlusCircleOutline,{})}),children:"Add User"}),children:[e(u.Suspense,{fallback:e(se,{}),children:e(Ju,{query:o})}),e(J,{onDismiss:()=>{t(null)},children:l})]})}const Xu=C`
3274
3312
  overflow-y: auto;
3275
- `,Gu=C`
3313
+ `,Yu=C`
3276
3314
  padding: var(--ac-global-dimension-size-400);
3277
3315
  max-width: 800px;
3278
3316
  min-width: 500px;
@@ -3280,12 +3318,12 @@ fragment UsersTable_users on Query {
3280
3318
  width: 100%;
3281
3319
  margin-left: auto;
3282
3320
  margin-right: auto;
3283
- `,Uu=C`
3321
+ `,em=C`
3284
3322
  .ac-field {
3285
3323
  // Hacky solution to make the text fields fill the remaining space
3286
3324
  width: calc(100% - var(--ac-global-dimension-size-600));
3287
3325
  }
3288
- `;function Im(){const{authenticationEnabled:n}=zs();return e("main",{css:Hu,children:e("div",{css:Gu,children:s(k,{direction:"column",gap:"size-200",width:"100%",children:[e(Q,{title:"Platform Settings",variant:"compact",children:s("form",{css:Uu,children:[s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Hostname",value:Ta,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(xa,{text:Ta})]}),s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Platform Version",isReadOnly:!0,value:na,description:"The version of the Phoenix server"}),e(xa,{text:na})]}),s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${na}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(xa,{text:na})]})]})}),n&&e(Qu,{}),n&&e(Bu,{})]})})})}function xa(n){return e(x,{paddingBottom:"19px",children:e(X,{text:n.text,size:"normal"})})}const il=window.Config.basename,rl={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function Lm(){return s("div",{css:C`
3326
+ `;function Rm(){const{authenticationEnabled:n}=Qs();return e("main",{css:Xu,children:e("div",{css:Yu,children:s(k,{direction:"column",gap:"size-200",width:"100%",children:[e(Q,{title:"Platform Settings",variant:"compact",children:s("form",{css:em,children:[s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Hostname",value:Ta,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(xa,{text:Ta})]}),s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Platform Version",isReadOnly:!0,value:na,description:"The version of the Phoenix server"}),e(xa,{text:na})]}),s(k,{direction:"row",gap:"size-100",alignItems:"end",children:[e(ae,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${na}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(xa,{text:na})]})]})}),n&&e(Gu,{}),n&&e(Zu,{})]})})})}function xa(n){return e(x,{paddingBottom:"19px",children:e(X,{text:n.text,size:"normal"})})}const il=window.Config.basename,rl={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function Pm(){return s("div",{css:C`
3289
3327
  display: flex;
3290
3328
  flex-direction: column;
3291
3329
  flex: 1 1 auto;
@@ -3298,19 +3336,19 @@ fragment UsersTable_users on Query {
3298
3336
  flex: 1 1 auto;
3299
3337
  height: 100%;
3300
3338
  }
3301
- `,children:[e(Y,{variant:"info",banner:!0,icon:e(w,{svg:e(E.InfoFilled,{})}),children:"These APIs are under active development and are subject to change."}),s(he,{children:[e(q,{name:"REST",children:({isSelected:n})=>n&&e("iframe",{src:`${il}/docs`,style:rl})}),e(q,{name:"GraphQL",children:({isSelected:n})=>n&&e("iframe",{src:`${il}/graphql`,style:rl})})]})]})}const vr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"email"},{defaultValue:null,kind:"LocalArgument",name:"password"}],a=[{alias:null,args:[{fields:[{kind:"Variable",name:"email",variableName:"email"},{kind:"Variable",name:"password",variableName:"password"}],kind:"ObjectValue",name:"input"}],kind:"ScalarField",name:"login",storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"LoginFormMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"LoginFormMutation",selections:a},params:{cacheID:"3028737b93cf12e20a73e49ca3c4ba84",id:null,metadata:{},name:"LoginFormMutation",operationKind:"mutation",text:`mutation LoginFormMutation(
3339
+ `,children:[e(Y,{variant:"info",banner:!0,icon:e(w,{svg:e(A.InfoFilled,{})}),children:"These APIs are under active development and are subject to change."}),s(he,{children:[e(q,{name:"REST",children:({isSelected:n})=>n&&e("iframe",{src:`${il}/docs`,style:rl})}),e(q,{name:"GraphQL",children:({isSelected:n})=>n&&e("iframe",{src:`${il}/graphql`,style:rl})})]})]})}const vr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"email"},{defaultValue:null,kind:"LocalArgument",name:"password"}],a=[{alias:null,args:[{fields:[{kind:"Variable",name:"email",variableName:"email"},{kind:"Variable",name:"password",variableName:"password"}],kind:"ObjectValue",name:"input"}],kind:"ScalarField",name:"login",storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"LoginFormMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"LoginFormMutation",selections:a},params:{cacheID:"3028737b93cf12e20a73e49ca3c4ba84",id:null,metadata:{},name:"LoginFormMutation",operationKind:"mutation",text:`mutation LoginFormMutation(
3302
3340
  $email: String!
3303
3341
  $password: String!
3304
3342
  ) {
3305
3343
  login(input: {email: $email, password: $password})
3306
3344
  }
3307
- `}}}();vr.hash="88ab683f7b6bd5c87e77fe2751da8d4c";function Wu(){const[n,a]=I.useMutation(vr),l=u.useCallback(r=>{n({variables:r,onCompleted:()=>{}})},[n]),{control:t,handleSubmit:i}=qe({defaultValues:{email:"",password:""}});return s(on,{children:[e(B,{name:"email",control:t,render:({field:{onChange:r,value:o}})=>e(ae,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:r,value:o,placeholder:"your email address"})}),e(B,{name:"password",control:t,render:({field:{onChange:r,value:o}})=>e(ae,{label:"Password",name:"password",type:"password",isRequired:!0,onChange:r,value:o,placeholder:"your password"})}),e("div",{css:C`
3345
+ `}}}();vr.hash="88ab683f7b6bd5c87e77fe2751da8d4c";function nm(){const[n,a]=I.useMutation(vr),l=u.useCallback(r=>{n({variables:r,onCompleted:()=>{}})},[n]),{control:t,handleSubmit:i}=qe({defaultValues:{email:"",password:""}});return s(on,{children:[e(H,{name:"email",control:t,render:({field:{onChange:r,value:o}})=>e(ae,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:r,value:o,placeholder:"your email address"})}),e(H,{name:"password",control:t,render:({field:{onChange:r,value:o}})=>e(ae,{label:"Password",name:"password",type:"password",isRequired:!0,onChange:r,value:o,placeholder:"your password"})}),e("div",{css:C`
3308
3346
  margin-top: var(--ac-global-dimension-size-400);
3309
3347
  margin-bottom: var(--ac-global-dimension-size-50);
3310
3348
  button {
3311
3349
  width: 100%;
3312
3350
  }
3313
- `,children:e(V,{variant:"primary",loading:a,onClick:i(l),children:"Login"})})]})}function Ju(){return s("svg",{width:"253",height:"63",viewBox:"0 0 682 169",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_290_1904)",children:[e("path",{d:"M147.458 105.593C147.022 103.63 146.028 101.824 144.492 100.222C143.901 99.6064 143.244 99.0233 142.529 98.4978C142.184 98.2432 141.815 98.005 141.437 97.7669C140.969 97.4712 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3897 133.699 92.9299 133.157 92.4535C131.851 91.312 130.972 90.3348 130.315 89.3C130.102 88.9715 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8957C129.173 87.7233 128.869 87.6494 128.565 87.6986C128.097 87.789 127.736 88.1667 127.678 88.6431C127.637 89.0126 127.637 89.4068 127.687 89.8092C127.719 90.0474 127.588 90.2773 127.366 90.3758C127.317 90.4005 127.259 90.4087 127.21 90.4169C126.898 90.4498 126.619 90.6222 126.438 90.885C126.257 91.1478 126.208 91.4681 126.282 91.7719C126.348 92.0347 126.438 92.2236 126.512 92.3714L126.578 92.5028C126.627 92.5931 126.676 92.6917 126.726 92.782C126.873 93.0612 127.021 93.3405 127.202 93.6033C127.547 94.1042 127.933 94.6052 128.393 95.1389C128.541 95.3114 128.565 95.5578 128.459 95.7549C128.352 95.952 128.13 96.0669 127.908 96.0341C125.321 95.681 122.996 95.0979 120.836 94.3013C120.59 94.211 120.335 94.1206 120.097 94.0221C118.158 93.2009 121.658 89.7189 123.259 87.247C130.282 76.4479 131.736 64.0802 131.794 51.5647C131.851 39.4681 130.545 27.5357 128.138 15.7593V15.7429C126.569 5.87173 125.239 2.168 124.401 0.796558C124.22 0.435219 124.023 0.205276 123.818 0.0985162C123.588 -0.0575166 123.465 0.0163937 123.465 0.0163937C123.013 0.0328182 122.495 0.435219 121.871 1.08399C119.251 3.83509 119.399 7.11178 120.122 10.5363C123.432 26.0903 125.921 41.7346 124.787 57.7157C124.007 68.7365 121.953 79.3468 114.248 87.9779C113.789 88.4952 113.287 88.9798 112.786 89.4725C112.211 90.0391 111.316 91.1396 110.651 90.6797C109.764 90.0638 110.552 88.7991 110.831 88.1421C115.341 77.5729 116.639 66.5275 115.949 55.1453C115.932 54.8825 115.908 54.6197 115.891 54.3569V54.3405C115.883 54.1269 115.858 53.9298 115.842 53.7245C115.727 52.2217 115.587 50.7189 115.398 49.2242C113.46 31.1655 111.127 29.9911 111.127 29.9911C110.971 29.8515 110.782 29.7448 110.528 29.6955C109.304 29.4409 108.638 30.5167 108.096 31.3297C105.648 34.9924 106.733 38.8932 107.521 42.753C110.289 56.2703 110.33 69.6645 105.583 82.8124C105.147 84.0113 104.63 85.1775 104.08 86.3272C103.496 87.5508 103.119 89.0783 101.131 88.4213C99.2662 87.8054 99.7918 86.3929 100.03 85.1036C100.654 81.8269 101.155 78.542 101.467 75.2489V75.2653C101.509 74.9368 101.525 74.6247 101.55 74.3127C101.599 73.746 101.632 73.1712 101.665 72.6045C101.689 72.1282 101.714 71.6601 101.739 71.2002C101.747 70.9621 101.763 70.7321 101.763 70.494C102.141 60.0562 100.383 55.3095 99.7179 53.9052C99.644 53.7328 99.5619 53.5767 99.4715 53.4371C98.7815 52.4024 97.6398 52.5256 96.6541 53.5028C94.8388 55.2931 93.8367 57.4118 94.2967 60.0808C95.6438 67.8496 94.8552 75.5445 93.4096 83.1983C93.2124 84.2249 92.7524 86.0973 90.5593 85.6127C89.0644 85.2842 88.7194 84.6437 88.6372 83.3461C88.6537 82.3689 88.6372 81.3916 88.6044 80.4144C88.6044 80.3897 88.6044 80.3651 88.6044 80.3405C88.6044 80.2009 88.588 80.0612 88.588 79.9299C88.588 79.8559 88.5797 79.7902 88.5715 79.7245C88.5058 78.3942 88.399 77.0556 88.2347 75.717C88.2183 75.5856 88.1937 75.4624 88.1773 75.331C87.3394 67.7921 86.247 67.0612 86.247 67.0612C85.5488 66.1497 84.4563 66.3057 83.5117 67.2419C81.6964 69.0322 80.7764 71.1427 81.1543 73.8199C81.4336 75.7745 81.3596 75.175 81.5568 76.8831C81.7128 77.7618 81.8771 79.3632 81.8935 79.8724C81.8525 80.324 81.7375 80.7182 81.4582 81.0139C80.53 82.0076 79.0351 80.9892 77.9015 80.5211C55.9209 71.4302 37.1108 58.6683 20.691 42.523C14.2513 35.945 3.25273 22.6329 3.25273 22.6329C2.84203 22.1566 2.33276 21.8856 1.55243 22.2223C0.114982 22.8383 0.156052 24.6778 0.0246278 26.2217C-0.23822 29.3177 1.42101 31.5597 3.21987 33.662C28.0179 62.5856 58.2783 83.3708 94.8059 93.7675L101.377 95.5085C101.451 95.5249 101.533 95.5496 101.607 95.566C101.624 95.566 101.632 95.566 101.64 95.5742L107.299 97.077L107.456 97.1181C107.267 97.1756 107.061 97.2167 106.839 97.2577C100.613 98.4895 88.2923 96.223 78.3944 93.9153C73.4988 92.8888 68.6854 91.6405 63.9788 90.1541C63.7653 90.0884 63.642 90.0556 63.642 90.0556C45.3577 84.2331 28.6093 74.7972 13.9556 60.4093C12.5674 59.0461 11.286 57.5761 10.0211 56.0897C8.86289 54.71 6.47262 51.8275 5.643 50.8338C5.55265 50.7024 5.45408 50.5875 5.35551 50.4807C5.10909 50.2261 4.80517 50.0619 4.36983 50.1604C3.3513 50.3986 3.05559 51.4498 2.86667 52.3367C2.1192 55.9008 3.25273 58.8983 5.65122 61.5755C20.6582 78.3942 39.4929 89.1358 60.6439 96.1819C72.6528 100.181 85.0067 102.612 97.6069 104.164C90.0911 106.595 82.3617 107.334 74.5667 107.137C59.4775 106.759 45.3248 103.138 32.0264 96.6746C27.1226 94.1535 22.5556 91.3449 21.3564 90.5894C20.6664 90.1213 19.9518 89.8338 19.2454 90.3758C17.9229 91.4024 18.8347 93.2009 19.2618 94.6051C20.075 97.307 21.956 99.1712 24.3956 100.46C46.0641 111.917 68.9401 116.499 93.2946 112.434C95.7588 112.023 98.0998 111.572 100.679 110.701C96.6048 114.224 91.89 116.524 86.9369 118.339C71.6835 123.915 56.5287 123.693 41.4314 119.915C36.5851 118.618 30.9668 116.507 30.9668 116.507C30.1536 116.154 29.3486 116.031 28.7243 116.926C27.6237 118.503 28.5847 120.145 29.5375 121.632C31.7882 125.138 36.1416 125.483 39.5832 126.674C40.7578 127.052 37.5544 129.187 36.5276 129.975C31.5335 133.794 26.6462 137.284 21.6767 140.98L18.424 143.378C17.8654 143.764 17.3726 144.199 17.6272 145.004C17.9229 145.915 18.8675 146.08 19.7875 146.268C23.3442 147.008 26.3833 145.825 29.1925 143.723C35.2134 139.214 41.3493 134.837 47.2387 130.156C49.4811 128.374 51.5182 128.522 54.582 129.31C46.9183 135.083 39.7475 140.495 32.5685 145.899C25.2827 151.376 17.9969 156.854 10.711 162.323L5.89764 165.888C5.82371 165.937 5.758 165.986 5.69229 166.044L5.61836 166.093C5.20766 166.421 4.90374 166.791 4.9941 167.267C5.19123 168.351 6.4644 168.622 7.50758 168.803C11.8117 169.542 14.4813 167.924 17.4219 165.715C32.1496 154.661 46.9266 143.682 61.5721 132.521C64.8577 130.016 68.2337 128.604 72.9731 129.138C68.9401 132.152 65.0631 135.051 61.2436 137.908L50.8611 145.587C50.7871 145.636 50.7132 145.694 50.6475 145.751C50.0972 146.186 49.7111 146.695 49.9247 147.451C50.3189 148.822 51.97 148.987 53.3745 149.2C55.9537 149.586 58.1387 148.675 60.1675 147.164C61.3339 146.293 62.5085 145.439 63.6831 144.593L79.5361 132.004C79.5361 132.004 83.2817 129.327 87.6187 126.871C88.0048 126.633 88.3908 126.387 88.7851 126.148C88.9494 126.075 89.3601 125.886 89.9843 125.59C90.4525 125.352 90.9207 125.114 91.3807 124.892C92.0625 124.547 92.851 124.128 93.7381 123.644C96.2927 122.584 103.611 119.168 109.657 112.73C112.532 110.512 116.581 107.613 119.735 106.217H119.752C119.99 106.111 120.228 106.012 120.458 105.93C120.458 105.93 120.475 105.93 120.483 105.922C120.639 105.864 120.787 105.815 120.935 105.766L121.337 105.61C122.479 105.289 124.335 105.166 124.582 107.679C124.623 108.295 124.615 108.927 124.541 109.593C124.491 110.093 124.393 110.627 124.319 111.054C124.245 111.465 124.417 111.876 124.746 112.122C124.795 112.163 124.853 112.196 124.91 112.22C125.346 112.434 125.871 112.335 126.2 111.974C126.323 111.834 126.446 111.703 126.569 111.572C128.122 109.937 129.699 108.804 131.375 108.114C133.822 107.104 136.303 107.096 138.94 108.106C140.197 108.582 141.379 109.239 142.554 110.102C143.055 110.471 143.556 110.882 144.057 111.334C144.353 111.605 144.648 111.9 144.911 112.163L144.952 112.204L145.166 112.418C145.166 112.418 145.248 112.491 145.289 112.524C145.536 112.705 145.856 112.779 146.168 112.713C146.529 112.631 146.825 112.376 146.957 112.032C146.981 111.966 147.006 111.9 147.031 111.834C147.778 109.617 147.934 107.581 147.499 105.593H147.458Z",fill:"url(#paint0_linear_290_1904)"}),e("path",{d:"M120.113 94.0303C120.195 94.0632 120.269 94.096 120.351 94.1207C120.269 94.0878 120.187 94.0632 120.113 94.0303Z",fill:"#FEDBB5"}),e("path",{d:"M111.283 87.1238C111.283 87.1238 111.267 87.1567 111.267 87.1731C111.267 87.1567 111.283 87.1402 111.283 87.1238Z",fill:"#FEDBB5"}),e("path",{d:"M123.383 87.1074C123.383 87.1074 123.358 87.1487 123.341 87.1652C123.358 87.1487 123.366 87.1239 123.383 87.1074Z",fill:"#FEDBB5"}),e("path",{d:"M104.104 86.3354C103.965 86.6229 103.841 86.9267 103.71 87.2142C103.85 86.9267 103.973 86.6229 104.104 86.3354Z",fill:"#FEDBB5"}),e("path",{d:"M89.0233 84.7422C89.0233 84.7422 89.0233 84.7505 89.0316 84.7588C89.0316 84.7588 89.0316 84.7505 89.0233 84.7422Z",fill:"#FEDBB5"}),e("path",{d:"M89.0644 84.7998C89.1876 84.964 89.3437 85.1118 89.5408 85.235C89.3437 85.1118 89.1876 84.9722 89.0644 84.7998ZM89.0644 84.7833C89.0644 84.7833 89.0644 84.7833 89.0644 84.7915C89.0644 84.7915 89.0644 84.7915 89.0644 84.7833ZM89.0562 84.7751C89.0562 84.7751 89.0562 84.7751 89.0562 84.7833C89.0562 84.7833 89.0562 84.7833 89.0562 84.7751ZM88.6947 83.3626C88.6947 83.3626 88.6947 83.3708 88.6947 83.379C88.6947 83.379 88.6947 83.3708 88.6947 83.3626ZM79.1665 81.0878C79.1665 81.0878 79.1829 81.0878 79.1829 81.096C79.6429 81.2931 80.1029 81.4492 80.53 81.4492C80.7107 81.4492 80.8832 81.4245 81.0393 81.3588C80.875 81.4245 80.7025 81.4492 80.53 81.4492C80.0947 81.4492 79.6265 81.2849 79.1665 81.0878ZM88.629 79.6507C88.629 79.6507 88.629 79.6507 88.629 79.6589C88.629 79.6589 88.629 79.6589 88.629 79.6507Z",fill:"#E5B4A6"}),e("path",{d:"M120.36 94.1206C120.36 94.1206 120.434 94.1535 120.475 94.1617C120.475 94.1617 120.401 94.1289 120.36 94.1206ZM110.273 89.8749C110.273 90.187 110.38 90.4662 110.684 90.6797C110.79 90.7536 110.905 90.7865 111.029 90.7865C111.209 90.7865 111.398 90.7126 111.595 90.5894C111.406 90.7126 111.218 90.7865 111.029 90.7865C110.905 90.7865 110.79 90.7536 110.684 90.6797C110.38 90.4744 110.273 90.187 110.273 89.8749ZM110.914 88.0189C110.914 88.0189 110.881 88.1011 110.864 88.1421C110.881 88.1011 110.897 88.06 110.914 88.0189ZM111.226 87.2798C111.127 87.5262 111.02 87.7726 110.914 88.0189C111.02 87.7726 111.119 87.5262 111.226 87.2798ZM111.267 87.1731C111.267 87.1731 111.234 87.2388 111.226 87.2798C111.242 87.247 111.259 87.2141 111.267 87.1731ZM123.341 87.1731C123.341 87.1731 123.341 87.1813 123.333 87.1895C123.333 87.1895 123.333 87.1813 123.341 87.1731ZM123.391 87.0992C123.391 87.0992 123.391 87.1074 123.382 87.1156C123.382 87.1156 123.382 87.1074 123.391 87.0992ZM111.308 87.0992C111.308 87.0992 111.3 87.132 111.291 87.1402C111.291 87.1238 111.3 87.1074 111.308 87.0992ZM99.8001 86.7707C99.8001 87.4769 100.079 88.0928 101.155 88.446C101.484 88.5527 101.771 88.602 102.026 88.602C102.93 88.602 103.365 87.9615 103.71 87.2306C103.357 87.9697 102.921 88.602 102.026 88.602C101.78 88.602 101.492 88.5527 101.155 88.446C100.088 88.0928 99.8001 87.4769 99.8001 86.7707ZM92.7689 84.9886C92.4486 85.4074 91.9722 85.7195 91.2575 85.7195C91.1836 85.7195 91.1097 85.7195 91.0358 85.7113C91.1097 85.7113 91.1836 85.7195 91.2575 85.7195C91.9722 85.7195 92.4486 85.4157 92.7689 84.9886ZM106.651 79.7081C106.651 79.7081 106.651 79.7081 106.642 79.7081C106.322 80.7511 105.985 81.8023 105.616 82.8452C105.993 81.8023 106.338 80.7593 106.659 79.7081M94.1571 79.1251C93.9846 80.2748 93.7875 81.4163 93.5739 82.566C93.7875 81.4245 93.9846 80.2748 94.1571 79.1251ZM122.191 73.6311C120.623 78.7884 118.175 83.65 114.29 88.0025C113.83 88.5199 113.329 89.0044 112.828 89.4972C113.329 89.0126 113.821 88.5199 114.29 88.0025C118.175 83.65 120.623 78.7884 122.2 73.6311",fill:"#E5B4A6"}),e("path",{opacity:"0.4",d:"M2.20136 22.0745C2.00423 22.0745 1.79066 22.1238 1.55246 22.2223C0.53392 22.6658 0.254644 23.7252 0.139648 24.8503C5.61017 32.0196 27.213 58.4548 61.1943 76.5875C61.1943 76.5875 94.4692 94.1453 127.933 96.0423C125.346 95.6892 123.021 95.1061 120.861 94.3095C120.729 94.2602 120.606 94.2192 120.475 94.1699C108.318 91.542 97.9519 88.2571 90.6168 85.6292C90.7565 85.662 90.8961 85.6784 91.0193 85.6949C90.8879 85.6867 90.7401 85.662 90.5922 85.6292C90.1486 85.5306 89.8037 85.4074 89.5408 85.2432C83.7417 83.1244 80.0454 81.4984 79.1583 81.096C78.7312 80.9153 78.3123 80.6936 77.9344 80.5376C55.9538 71.4466 37.1437 58.6848 20.7239 42.5395C14.2513 35.945 3.25275 22.633 3.25275 22.633C2.97348 22.3045 2.6367 22.0745 2.20136 22.0745Z",fill:"url(#paint1_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M4.62448 50.1358C4.55056 50.1358 4.46842 50.144 4.37806 50.1687C3.35953 50.4068 3.06382 51.458 2.8749 52.3449C2.84204 52.5009 2.80919 52.6652 2.78455 52.8212C19.7711 75.832 42.5732 85.235 42.5732 85.235C65.3341 95.952 84.0128 98.12 95.3892 98.12C100.096 98.12 103.554 97.7505 105.533 97.463C104.63 97.5616 103.636 97.6109 102.568 97.6109C95.8984 97.6109 86.362 95.7795 78.4026 93.9235C73.5071 92.897 68.6937 91.6488 63.987 90.1623C63.7735 90.0966 63.6503 90.0638 63.6503 90.0638C45.3659 84.2413 28.6176 74.8054 13.9638 60.4175C12.5756 59.0543 11.2942 57.5843 10.0293 56.0979C8.87112 54.7182 6.48084 51.8357 5.65123 50.8421C5.56088 50.7107 5.46231 50.5957 5.36374 50.4889C5.16661 50.2836 4.9284 50.1358 4.62448 50.1358Z",fill:"url(#paint2_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M20.0669 90.1049C19.7958 90.1049 19.5247 90.187 19.2537 90.4005C18.1037 91.2874 18.6458 92.7738 19.0812 94.0632C27.5991 99.2287 47.132 109.289 70.2626 109.289C79.0023 109.289 88.243 107.86 97.607 104.189C90.8469 106.382 83.9061 107.195 76.9077 107.195C76.1274 107.195 75.3471 107.186 74.5667 107.162C59.4776 106.784 45.3249 103.162 32.0264 96.6993C27.1227 94.1781 22.5557 91.3695 21.3565 90.614C20.9293 90.3266 20.5022 90.1049 20.0669 90.1049Z",fill:"url(#paint3_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M99.1759 111.949C95.4632 114.791 91.2987 116.762 86.937 118.355C78.7559 121.344 70.5994 122.666 62.4675 122.666C55.4363 122.666 48.4298 121.681 41.4315 119.932C36.5852 118.634 30.9668 116.524 30.9668 116.524C30.6136 116.368 30.2604 116.261 29.9237 116.261C29.4883 116.261 29.0776 116.442 28.7326 116.951C28.2234 117.682 28.1577 118.429 28.3219 119.168C33.6939 121.665 45.2181 126.099 59.2723 126.099C71.4536 126.099 85.5406 122.765 99.1759 111.949Z",fill:"url(#paint4_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M62.9356 129.368C49.7358 129.368 39.7557 126.699 38.4908 126.346C38.8604 126.452 39.2218 126.567 39.5833 126.69C40.7579 127.068 37.5544 129.203 36.5276 129.992C32.8396 132.817 29.2008 135.461 25.5537 138.138H36.7576C40.2897 135.527 43.8052 132.907 47.2387 130.172C48.5119 129.154 49.7275 128.768 51.0993 128.768C52.1342 128.768 53.2678 128.99 54.582 129.335C46.9184 135.108 39.7475 140.52 32.5685 145.924C28.3711 149.077 24.1738 152.231 19.9764 155.384H31.246C41.3821 147.804 51.51 140.216 61.5721 132.546C63.8967 130.78 66.2623 129.557 69.1208 129.179C67.0016 129.318 64.9316 129.376 62.9439 129.376L62.9356 129.368Z",fill:"url(#paint5_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M60.5782 138.409H71.47L79.5115 132.02C79.5115 132.02 83.2571 129.343 87.5941 126.888C87.9801 126.649 88.3662 126.403 88.7605 126.165C88.9248 126.091 89.3354 125.902 89.9597 125.606C90.4279 125.368 90.8961 125.13 91.3561 124.908C92.0625 124.547 92.8921 124.112 93.8121 123.603C86.0499 126.855 78.0987 128.44 70.739 129.056C70.8375 129.056 70.9443 129.056 71.0429 129.056C71.6589 129.056 72.2996 129.088 72.965 129.162C68.9319 132.176 65.0549 135.075 61.2354 137.933L60.5782 138.418V138.409Z",fill:"url(#paint6_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M88.6701 83.3544C88.6865 82.3771 88.6701 81.3999 88.6373 80.4226V80.3487C88.6373 80.2091 88.6208 80.0695 88.6208 79.9381L88.6044 79.7328C88.5633 78.9115 88.4976 78.0903 88.4237 77.2609C85.8281 76.1687 83.3803 74.7726 81.1215 73.1301C81.1379 73.3601 81.1461 73.59 81.179 73.8364C81.4582 75.7909 81.3843 75.1914 81.5814 76.8995C81.7375 77.7783 81.9018 79.3797 81.9182 79.8888C81.8771 80.3405 81.7621 80.7347 81.4829 81.0303C81.1954 81.3342 80.8586 81.4491 80.4972 81.4491C80.0619 81.4491 79.5937 81.2849 79.1337 81.0878C79.9961 81.4738 83.7007 83.108 89.5408 85.2432C88.9165 84.8572 88.7194 84.2742 88.6619 83.3626L88.6701 83.3544Z",fill:"url(#paint7_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M131.022 64.885C128.59 68.2685 125.6 71.2331 122.175 73.6146C120.606 78.7719 118.158 83.6336 114.273 87.9861C113.813 88.5035 113.312 88.988 112.811 89.4807C112.326 89.9488 111.628 90.8029 111.02 90.8029C110.897 90.8029 110.782 90.77 110.675 90.6961C109.788 90.0802 110.577 88.8155 110.856 88.1585C112.31 84.7505 113.427 81.2931 114.257 77.7865C111.825 78.698 109.271 79.3386 106.634 79.6999C106.314 80.7429 105.977 81.794 105.607 82.837C105.172 84.036 104.655 85.2021 104.104 86.3518C103.62 87.3702 103.275 88.602 102.018 88.602C101.771 88.602 101.484 88.5527 101.147 88.446C99.2827 87.83 99.8084 86.4175 100.047 85.1282C100.367 83.4201 100.663 81.7119 100.909 79.9956C98.5927 79.9217 96.3256 79.626 94.1325 79.1168C93.9271 80.4883 93.6889 81.8515 93.4261 83.2148C93.2536 84.1263 92.8675 85.7113 91.2412 85.7113C91.044 85.7113 90.8305 85.6867 90.6005 85.6374C97.9356 88.2735 108.293 91.5584 120.458 94.1863C120.335 94.1371 120.22 94.096 120.105 94.0467C118.167 93.2255 121.666 89.7435 123.268 87.2716C127.777 80.3323 129.987 72.7523 131.005 64.8932L131.022 64.885Z",fill:"url(#paint8_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M129.206 102.497C127.687 102.497 126.151 102.645 124.647 102.916C124.36 102.965 124.081 102.99 123.818 102.99C123.391 102.99 122.988 102.924 122.61 102.809C122.668 102.883 122.734 102.957 122.791 103.039C123.448 103.959 123.793 104.961 123.925 106.004C124.089 106.184 124.229 106.406 124.344 106.694C124.344 106.694 124.344 106.694 124.344 106.71C124.344 106.71 124.344 106.71 124.344 106.718C124.344 106.718 124.344 106.718 124.344 106.726C124.344 106.726 124.344 106.726 124.344 106.735C124.344 106.735 124.344 106.735 124.344 106.743C124.344 106.743 124.344 106.743 124.344 106.751C124.344 106.751 124.344 106.751 124.344 106.759C124.344 106.759 124.344 106.759 124.344 106.768V106.784C124.344 106.784 124.344 106.784 124.344 106.792C124.344 106.792 124.344 106.792 124.344 106.8C124.344 106.8 124.344 106.8 124.344 106.809C124.344 106.809 124.344 106.809 124.344 106.817C124.344 106.817 124.344 106.817 124.344 106.825C124.344 106.825 124.344 106.833 124.344 106.841C124.344 106.841 124.344 106.841 124.344 106.858C124.344 106.858 124.344 106.858 124.344 106.866C124.344 106.866 124.344 106.866 124.344 106.874C124.344 106.874 124.344 106.874 124.344 106.882C124.344 106.882 124.344 106.883 124.344 106.891C124.344 106.891 124.344 106.891 124.344 106.899C124.344 106.899 124.344 106.899 124.344 106.907C124.344 106.907 124.344 106.907 124.344 106.915C124.344 106.915 124.344 106.915 124.344 106.924C124.344 106.924 124.344 106.924 124.344 106.932C124.344 106.932 124.344 106.932 124.344 106.94C124.344 106.94 124.344 106.94 124.344 106.948C124.344 106.948 124.344 106.948 124.344 106.965C124.344 106.965 124.344 106.973 124.344 106.981C124.344 106.981 124.344 106.989 124.344 106.997V107.014C124.344 107.014 124.344 107.022 124.344 107.03C124.344 107.03 124.344 107.039 124.344 107.047C124.344 107.047 124.344 107.055 124.344 107.063C124.344 107.063 124.344 107.071 124.344 107.08C124.344 107.08 124.344 107.088 124.344 107.096C124.344 107.096 124.344 107.104 124.344 107.112C124.344 107.112 124.344 107.121 124.344 107.129C124.344 107.145 124.344 107.162 124.344 107.178C124.344 107.178 124.344 107.186 124.344 107.195C124.344 107.195 124.344 107.227 124.344 107.244C124.344 107.244 124.344 107.252 124.344 107.26V107.277C124.344 107.277 124.344 107.301 124.344 107.31C124.344 107.31 124.344 107.318 124.344 107.326V107.342V107.359C124.36 107.597 124.368 107.843 124.368 108.09C124.368 108.476 124.344 108.87 124.302 109.272C124.253 109.773 124.155 110.307 124.081 110.734C124.072 110.8 124.064 110.865 124.064 110.923C124.064 111.268 124.229 111.588 124.508 111.793L124.672 111.892C124.828 111.966 124.992 112.007 125.157 112.007C125.461 112.007 125.748 111.884 125.962 111.654C126.085 111.514 126.208 111.383 126.331 111.251C127.884 109.617 129.461 108.484 131.136 107.794C132.369 107.285 133.601 107.03 134.857 107.03C136.114 107.03 137.387 107.285 138.702 107.786C139.958 108.262 141.141 108.919 142.316 109.781C142.817 110.151 143.318 110.562 143.819 111.013C144.115 111.284 144.41 111.58 144.673 111.843L144.714 111.884L144.928 112.097L145.051 112.204C145.232 112.335 145.453 112.409 145.675 112.418C144.632 110.192 143.318 108.123 141.461 106.513C137.946 103.466 133.51 102.177 129.001 102.177",fill:"url(#paint9_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M128.779 87.6905L128.582 87.7069C128.114 87.7972 127.752 88.175 127.695 88.6513C127.654 89.0208 127.654 89.415 127.703 89.8174C127.72 89.9488 127.687 90.072 127.629 90.1706C129.51 92.9627 133.584 97.9065 139.769 99.7789C139.769 99.7789 149.331 104.78 146.916 112.032L146.99 111.834C147.737 109.617 147.893 107.581 147.458 105.593C147.022 103.63 146.029 101.824 144.492 100.222C143.901 99.6064 143.244 99.0234 142.529 98.4978C142.184 98.2432 141.815 98.0051 141.437 97.7669C140.969 97.4713 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3898 133.699 92.9299 133.157 92.4536C131.851 91.3121 130.972 90.3348 130.315 89.3001C130.102 88.9716 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8958C129.231 87.7562 129.001 87.6823 128.763 87.6823",fill:"url(#paint10_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M116.647 107.893L118.586 106.768L126.734 95.8535C126.734 95.8535 122.274 95.0076 120.122 94.0303C120.122 94.0303 117.887 104.222 109.632 112.738L112.672 110.488C113.887 109.634 114.988 108.903 116.647 107.893Z",fill:"url(#paint11_linear_290_1904)"}),e("path",{d:"M209.416 49.9962H230.197C245.221 49.9962 252.104 57.7157 252.104 73.5818V81.4409C252.104 97.307 245.221 105.027 230.197 105.027H218.123V148.264H209.416V49.9962ZM230.197 97.0196C239.323 97.0196 243.397 92.9463 243.397 81.8598V73.0152C243.397 62.0682 239.323 57.8553 230.197 57.8553H218.123V97.0196H230.197Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M284.114 49.9962H292.821V93.0941H319.64V49.9962H328.346V148.256H319.64V100.953H292.821V148.256H284.114V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M362.451 125.656V72.5963C362.451 57.0177 370.312 48.5919 384.497 48.5919C398.683 48.5919 406.544 57.0177 406.544 72.5963V125.656C406.544 141.234 398.683 149.66 384.497 149.66C370.312 149.66 362.451 141.234 362.451 125.656ZM397.829 126.214V72.0297C397.829 61.5016 393.056 56.451 384.489 56.451C375.922 56.451 371.15 61.5016 371.15 72.0297V126.214C371.15 136.742 375.922 141.653 384.489 141.653C393.056 141.653 397.829 136.742 397.829 126.214Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M440.796 49.9962H480.108V57.8553H449.503V93.0859H474.638V100.945H449.503V140.249H480.108V148.248H440.796V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M511.56 49.9962H523.076L548.629 125.935V49.9962H556.769V148.256H547.504L519.56 64.458V148.256H511.56V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M592.007 49.9962H600.714V148.256H592.007V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M651.674 98.1447L632.437 49.9962H641.702L657.144 89.0209L672.726 49.9962H681.154L661.917 98.1447L681.992 148.256H672.726L656.438 106.989L640.01 148.256H631.591L651.666 98.1447H651.674Z",fill:"var(--ac-global-text-color-900)"})]}),s("defs",{children:[s("linearGradient",{id:"paint0_linear_290_1904",x1:"22.0956",y1:"10.3474",x2:"97.4433",y2:"140.879",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#14BAB6"}),e("stop",{offset:"0.5",stopColor:"#00ADEE"}),e("stop",{offset:"1",stopColor:"#0095C4"})]}),s("linearGradient",{id:"paint1_linear_290_1904",x1:"95.422",y1:"114.807",x2:"31.8741",y2:"4.70214",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint2_linear_290_1904",x1:"76.6695",y1:"114.126",x2:"30.8746",y2:"34.7951",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint3_linear_290_1904",x1:"70.3612",y1:"119.915",x2:"44.7991",y2:"75.6384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint4_linear_290_1904",x1:"71.4208",y1:"128.85",x2:"55.5071",y2:"101.279",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint5_linear_290_1904",x1:"44.5363",y1:"126.346",x2:"44.5363",y2:"155.384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.9"}),e("stop",{offset:"0.22",stopColor:"#231F20",stopOpacity:"0.4"}),e("stop",{offset:"0.42",stopColor:"#231F20",stopOpacity:"0.1"}),e("stop",{offset:"0.65",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint6_linear_290_1904",x1:"77.1952",y1:"123.603",x2:"77.1952",y2:"138.409",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint7_linear_290_1904",x1:"84.3413",y1:"85.235",x2:"84.3413",y2:"73.1301",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.95"}),e("stop",{offset:"0.51",stopColor:"#231F20",stopOpacity:"0.26"}),e("stop",{offset:"0.81",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint8_linear_290_1904",x1:"110.815",y1:"94.1699",x2:"110.815",y2:"64.885",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.18",stopColor:"#231F20",stopOpacity:"0.48"}),e("stop",{offset:"0.38",stopColor:"#231F20",stopOpacity:"0.12"}),e("stop",{offset:"0.58",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint9_linear_290_1904",x1:"138.077",y1:"117.246",x2:"127.969",y2:"99.7278",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint10_linear_290_1904",x1:"146.226",y1:"112.434",x2:"131.084",y2:"86.1931",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint11_linear_290_1904",x1:"106.889",y1:"107.999",x2:"128.941",y2:"95.2581",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.31",stopColor:"#231F20",stopOpacity:"0.5"}),e("stop",{offset:"0.67",stopColor:"#231F20",stopOpacity:"0.13"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),e("clipPath",{id:"clip0_290_1904",children:e("rect",{width:"682",height:"169",fill:"white"})})]})]})}function _m(){return s("main",{css:C`
3351
+ `,children:e(V,{variant:"primary",loading:a,onClick:i(l),children:"Login"})})]})}function am(){return s("svg",{width:"253",height:"63",viewBox:"0 0 682 169",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_290_1904)",children:[e("path",{d:"M147.458 105.593C147.022 103.63 146.028 101.824 144.492 100.222C143.901 99.6064 143.244 99.0233 142.529 98.4978C142.184 98.2432 141.815 98.005 141.437 97.7669C140.969 97.4712 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3897 133.699 92.9299 133.157 92.4535C131.851 91.312 130.972 90.3348 130.315 89.3C130.102 88.9715 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8957C129.173 87.7233 128.869 87.6494 128.565 87.6986C128.097 87.789 127.736 88.1667 127.678 88.6431C127.637 89.0126 127.637 89.4068 127.687 89.8092C127.719 90.0474 127.588 90.2773 127.366 90.3758C127.317 90.4005 127.259 90.4087 127.21 90.4169C126.898 90.4498 126.619 90.6222 126.438 90.885C126.257 91.1478 126.208 91.4681 126.282 91.7719C126.348 92.0347 126.438 92.2236 126.512 92.3714L126.578 92.5028C126.627 92.5931 126.676 92.6917 126.726 92.782C126.873 93.0612 127.021 93.3405 127.202 93.6033C127.547 94.1042 127.933 94.6052 128.393 95.1389C128.541 95.3114 128.565 95.5578 128.459 95.7549C128.352 95.952 128.13 96.0669 127.908 96.0341C125.321 95.681 122.996 95.0979 120.836 94.3013C120.59 94.211 120.335 94.1206 120.097 94.0221C118.158 93.2009 121.658 89.7189 123.259 87.247C130.282 76.4479 131.736 64.0802 131.794 51.5647C131.851 39.4681 130.545 27.5357 128.138 15.7593V15.7429C126.569 5.87173 125.239 2.168 124.401 0.796558C124.22 0.435219 124.023 0.205276 123.818 0.0985162C123.588 -0.0575166 123.465 0.0163937 123.465 0.0163937C123.013 0.0328182 122.495 0.435219 121.871 1.08399C119.251 3.83509 119.399 7.11178 120.122 10.5363C123.432 26.0903 125.921 41.7346 124.787 57.7157C124.007 68.7365 121.953 79.3468 114.248 87.9779C113.789 88.4952 113.287 88.9798 112.786 89.4725C112.211 90.0391 111.316 91.1396 110.651 90.6797C109.764 90.0638 110.552 88.7991 110.831 88.1421C115.341 77.5729 116.639 66.5275 115.949 55.1453C115.932 54.8825 115.908 54.6197 115.891 54.3569V54.3405C115.883 54.1269 115.858 53.9298 115.842 53.7245C115.727 52.2217 115.587 50.7189 115.398 49.2242C113.46 31.1655 111.127 29.9911 111.127 29.9911C110.971 29.8515 110.782 29.7448 110.528 29.6955C109.304 29.4409 108.638 30.5167 108.096 31.3297C105.648 34.9924 106.733 38.8932 107.521 42.753C110.289 56.2703 110.33 69.6645 105.583 82.8124C105.147 84.0113 104.63 85.1775 104.08 86.3272C103.496 87.5508 103.119 89.0783 101.131 88.4213C99.2662 87.8054 99.7918 86.3929 100.03 85.1036C100.654 81.8269 101.155 78.542 101.467 75.2489V75.2653C101.509 74.9368 101.525 74.6247 101.55 74.3127C101.599 73.746 101.632 73.1712 101.665 72.6045C101.689 72.1282 101.714 71.6601 101.739 71.2002C101.747 70.9621 101.763 70.7321 101.763 70.494C102.141 60.0562 100.383 55.3095 99.7179 53.9052C99.644 53.7328 99.5619 53.5767 99.4715 53.4371C98.7815 52.4024 97.6398 52.5256 96.6541 53.5028C94.8388 55.2931 93.8367 57.4118 94.2967 60.0808C95.6438 67.8496 94.8552 75.5445 93.4096 83.1983C93.2124 84.2249 92.7524 86.0973 90.5593 85.6127C89.0644 85.2842 88.7194 84.6437 88.6372 83.3461C88.6537 82.3689 88.6372 81.3916 88.6044 80.4144C88.6044 80.3897 88.6044 80.3651 88.6044 80.3405C88.6044 80.2009 88.588 80.0612 88.588 79.9299C88.588 79.8559 88.5797 79.7902 88.5715 79.7245C88.5058 78.3942 88.399 77.0556 88.2347 75.717C88.2183 75.5856 88.1937 75.4624 88.1773 75.331C87.3394 67.7921 86.247 67.0612 86.247 67.0612C85.5488 66.1497 84.4563 66.3057 83.5117 67.2419C81.6964 69.0322 80.7764 71.1427 81.1543 73.8199C81.4336 75.7745 81.3596 75.175 81.5568 76.8831C81.7128 77.7618 81.8771 79.3632 81.8935 79.8724C81.8525 80.324 81.7375 80.7182 81.4582 81.0139C80.53 82.0076 79.0351 80.9892 77.9015 80.5211C55.9209 71.4302 37.1108 58.6683 20.691 42.523C14.2513 35.945 3.25273 22.6329 3.25273 22.6329C2.84203 22.1566 2.33276 21.8856 1.55243 22.2223C0.114982 22.8383 0.156052 24.6778 0.0246278 26.2217C-0.23822 29.3177 1.42101 31.5597 3.21987 33.662C28.0179 62.5856 58.2783 83.3708 94.8059 93.7675L101.377 95.5085C101.451 95.5249 101.533 95.5496 101.607 95.566C101.624 95.566 101.632 95.566 101.64 95.5742L107.299 97.077L107.456 97.1181C107.267 97.1756 107.061 97.2167 106.839 97.2577C100.613 98.4895 88.2923 96.223 78.3944 93.9153C73.4988 92.8888 68.6854 91.6405 63.9788 90.1541C63.7653 90.0884 63.642 90.0556 63.642 90.0556C45.3577 84.2331 28.6093 74.7972 13.9556 60.4093C12.5674 59.0461 11.286 57.5761 10.0211 56.0897C8.86289 54.71 6.47262 51.8275 5.643 50.8338C5.55265 50.7024 5.45408 50.5875 5.35551 50.4807C5.10909 50.2261 4.80517 50.0619 4.36983 50.1604C3.3513 50.3986 3.05559 51.4498 2.86667 52.3367C2.1192 55.9008 3.25273 58.8983 5.65122 61.5755C20.6582 78.3942 39.4929 89.1358 60.6439 96.1819C72.6528 100.181 85.0067 102.612 97.6069 104.164C90.0911 106.595 82.3617 107.334 74.5667 107.137C59.4775 106.759 45.3248 103.138 32.0264 96.6746C27.1226 94.1535 22.5556 91.3449 21.3564 90.5894C20.6664 90.1213 19.9518 89.8338 19.2454 90.3758C17.9229 91.4024 18.8347 93.2009 19.2618 94.6051C20.075 97.307 21.956 99.1712 24.3956 100.46C46.0641 111.917 68.9401 116.499 93.2946 112.434C95.7588 112.023 98.0998 111.572 100.679 110.701C96.6048 114.224 91.89 116.524 86.9369 118.339C71.6835 123.915 56.5287 123.693 41.4314 119.915C36.5851 118.618 30.9668 116.507 30.9668 116.507C30.1536 116.154 29.3486 116.031 28.7243 116.926C27.6237 118.503 28.5847 120.145 29.5375 121.632C31.7882 125.138 36.1416 125.483 39.5832 126.674C40.7578 127.052 37.5544 129.187 36.5276 129.975C31.5335 133.794 26.6462 137.284 21.6767 140.98L18.424 143.378C17.8654 143.764 17.3726 144.199 17.6272 145.004C17.9229 145.915 18.8675 146.08 19.7875 146.268C23.3442 147.008 26.3833 145.825 29.1925 143.723C35.2134 139.214 41.3493 134.837 47.2387 130.156C49.4811 128.374 51.5182 128.522 54.582 129.31C46.9183 135.083 39.7475 140.495 32.5685 145.899C25.2827 151.376 17.9969 156.854 10.711 162.323L5.89764 165.888C5.82371 165.937 5.758 165.986 5.69229 166.044L5.61836 166.093C5.20766 166.421 4.90374 166.791 4.9941 167.267C5.19123 168.351 6.4644 168.622 7.50758 168.803C11.8117 169.542 14.4813 167.924 17.4219 165.715C32.1496 154.661 46.9266 143.682 61.5721 132.521C64.8577 130.016 68.2337 128.604 72.9731 129.138C68.9401 132.152 65.0631 135.051 61.2436 137.908L50.8611 145.587C50.7871 145.636 50.7132 145.694 50.6475 145.751C50.0972 146.186 49.7111 146.695 49.9247 147.451C50.3189 148.822 51.97 148.987 53.3745 149.2C55.9537 149.586 58.1387 148.675 60.1675 147.164C61.3339 146.293 62.5085 145.439 63.6831 144.593L79.5361 132.004C79.5361 132.004 83.2817 129.327 87.6187 126.871C88.0048 126.633 88.3908 126.387 88.7851 126.148C88.9494 126.075 89.3601 125.886 89.9843 125.59C90.4525 125.352 90.9207 125.114 91.3807 124.892C92.0625 124.547 92.851 124.128 93.7381 123.644C96.2927 122.584 103.611 119.168 109.657 112.73C112.532 110.512 116.581 107.613 119.735 106.217H119.752C119.99 106.111 120.228 106.012 120.458 105.93C120.458 105.93 120.475 105.93 120.483 105.922C120.639 105.864 120.787 105.815 120.935 105.766L121.337 105.61C122.479 105.289 124.335 105.166 124.582 107.679C124.623 108.295 124.615 108.927 124.541 109.593C124.491 110.093 124.393 110.627 124.319 111.054C124.245 111.465 124.417 111.876 124.746 112.122C124.795 112.163 124.853 112.196 124.91 112.22C125.346 112.434 125.871 112.335 126.2 111.974C126.323 111.834 126.446 111.703 126.569 111.572C128.122 109.937 129.699 108.804 131.375 108.114C133.822 107.104 136.303 107.096 138.94 108.106C140.197 108.582 141.379 109.239 142.554 110.102C143.055 110.471 143.556 110.882 144.057 111.334C144.353 111.605 144.648 111.9 144.911 112.163L144.952 112.204L145.166 112.418C145.166 112.418 145.248 112.491 145.289 112.524C145.536 112.705 145.856 112.779 146.168 112.713C146.529 112.631 146.825 112.376 146.957 112.032C146.981 111.966 147.006 111.9 147.031 111.834C147.778 109.617 147.934 107.581 147.499 105.593H147.458Z",fill:"url(#paint0_linear_290_1904)"}),e("path",{d:"M120.113 94.0303C120.195 94.0632 120.269 94.096 120.351 94.1207C120.269 94.0878 120.187 94.0632 120.113 94.0303Z",fill:"#FEDBB5"}),e("path",{d:"M111.283 87.1238C111.283 87.1238 111.267 87.1567 111.267 87.1731C111.267 87.1567 111.283 87.1402 111.283 87.1238Z",fill:"#FEDBB5"}),e("path",{d:"M123.383 87.1074C123.383 87.1074 123.358 87.1487 123.341 87.1652C123.358 87.1487 123.366 87.1239 123.383 87.1074Z",fill:"#FEDBB5"}),e("path",{d:"M104.104 86.3354C103.965 86.6229 103.841 86.9267 103.71 87.2142C103.85 86.9267 103.973 86.6229 104.104 86.3354Z",fill:"#FEDBB5"}),e("path",{d:"M89.0233 84.7422C89.0233 84.7422 89.0233 84.7505 89.0316 84.7588C89.0316 84.7588 89.0316 84.7505 89.0233 84.7422Z",fill:"#FEDBB5"}),e("path",{d:"M89.0644 84.7998C89.1876 84.964 89.3437 85.1118 89.5408 85.235C89.3437 85.1118 89.1876 84.9722 89.0644 84.7998ZM89.0644 84.7833C89.0644 84.7833 89.0644 84.7833 89.0644 84.7915C89.0644 84.7915 89.0644 84.7915 89.0644 84.7833ZM89.0562 84.7751C89.0562 84.7751 89.0562 84.7751 89.0562 84.7833C89.0562 84.7833 89.0562 84.7833 89.0562 84.7751ZM88.6947 83.3626C88.6947 83.3626 88.6947 83.3708 88.6947 83.379C88.6947 83.379 88.6947 83.3708 88.6947 83.3626ZM79.1665 81.0878C79.1665 81.0878 79.1829 81.0878 79.1829 81.096C79.6429 81.2931 80.1029 81.4492 80.53 81.4492C80.7107 81.4492 80.8832 81.4245 81.0393 81.3588C80.875 81.4245 80.7025 81.4492 80.53 81.4492C80.0947 81.4492 79.6265 81.2849 79.1665 81.0878ZM88.629 79.6507C88.629 79.6507 88.629 79.6507 88.629 79.6589C88.629 79.6589 88.629 79.6589 88.629 79.6507Z",fill:"#E5B4A6"}),e("path",{d:"M120.36 94.1206C120.36 94.1206 120.434 94.1535 120.475 94.1617C120.475 94.1617 120.401 94.1289 120.36 94.1206ZM110.273 89.8749C110.273 90.187 110.38 90.4662 110.684 90.6797C110.79 90.7536 110.905 90.7865 111.029 90.7865C111.209 90.7865 111.398 90.7126 111.595 90.5894C111.406 90.7126 111.218 90.7865 111.029 90.7865C110.905 90.7865 110.79 90.7536 110.684 90.6797C110.38 90.4744 110.273 90.187 110.273 89.8749ZM110.914 88.0189C110.914 88.0189 110.881 88.1011 110.864 88.1421C110.881 88.1011 110.897 88.06 110.914 88.0189ZM111.226 87.2798C111.127 87.5262 111.02 87.7726 110.914 88.0189C111.02 87.7726 111.119 87.5262 111.226 87.2798ZM111.267 87.1731C111.267 87.1731 111.234 87.2388 111.226 87.2798C111.242 87.247 111.259 87.2141 111.267 87.1731ZM123.341 87.1731C123.341 87.1731 123.341 87.1813 123.333 87.1895C123.333 87.1895 123.333 87.1813 123.341 87.1731ZM123.391 87.0992C123.391 87.0992 123.391 87.1074 123.382 87.1156C123.382 87.1156 123.382 87.1074 123.391 87.0992ZM111.308 87.0992C111.308 87.0992 111.3 87.132 111.291 87.1402C111.291 87.1238 111.3 87.1074 111.308 87.0992ZM99.8001 86.7707C99.8001 87.4769 100.079 88.0928 101.155 88.446C101.484 88.5527 101.771 88.602 102.026 88.602C102.93 88.602 103.365 87.9615 103.71 87.2306C103.357 87.9697 102.921 88.602 102.026 88.602C101.78 88.602 101.492 88.5527 101.155 88.446C100.088 88.0928 99.8001 87.4769 99.8001 86.7707ZM92.7689 84.9886C92.4486 85.4074 91.9722 85.7195 91.2575 85.7195C91.1836 85.7195 91.1097 85.7195 91.0358 85.7113C91.1097 85.7113 91.1836 85.7195 91.2575 85.7195C91.9722 85.7195 92.4486 85.4157 92.7689 84.9886ZM106.651 79.7081C106.651 79.7081 106.651 79.7081 106.642 79.7081C106.322 80.7511 105.985 81.8023 105.616 82.8452C105.993 81.8023 106.338 80.7593 106.659 79.7081M94.1571 79.1251C93.9846 80.2748 93.7875 81.4163 93.5739 82.566C93.7875 81.4245 93.9846 80.2748 94.1571 79.1251ZM122.191 73.6311C120.623 78.7884 118.175 83.65 114.29 88.0025C113.83 88.5199 113.329 89.0044 112.828 89.4972C113.329 89.0126 113.821 88.5199 114.29 88.0025C118.175 83.65 120.623 78.7884 122.2 73.6311",fill:"#E5B4A6"}),e("path",{opacity:"0.4",d:"M2.20136 22.0745C2.00423 22.0745 1.79066 22.1238 1.55246 22.2223C0.53392 22.6658 0.254644 23.7252 0.139648 24.8503C5.61017 32.0196 27.213 58.4548 61.1943 76.5875C61.1943 76.5875 94.4692 94.1453 127.933 96.0423C125.346 95.6892 123.021 95.1061 120.861 94.3095C120.729 94.2602 120.606 94.2192 120.475 94.1699C108.318 91.542 97.9519 88.2571 90.6168 85.6292C90.7565 85.662 90.8961 85.6784 91.0193 85.6949C90.8879 85.6867 90.7401 85.662 90.5922 85.6292C90.1486 85.5306 89.8037 85.4074 89.5408 85.2432C83.7417 83.1244 80.0454 81.4984 79.1583 81.096C78.7312 80.9153 78.3123 80.6936 77.9344 80.5376C55.9538 71.4466 37.1437 58.6848 20.7239 42.5395C14.2513 35.945 3.25275 22.633 3.25275 22.633C2.97348 22.3045 2.6367 22.0745 2.20136 22.0745Z",fill:"url(#paint1_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M4.62448 50.1358C4.55056 50.1358 4.46842 50.144 4.37806 50.1687C3.35953 50.4068 3.06382 51.458 2.8749 52.3449C2.84204 52.5009 2.80919 52.6652 2.78455 52.8212C19.7711 75.832 42.5732 85.235 42.5732 85.235C65.3341 95.952 84.0128 98.12 95.3892 98.12C100.096 98.12 103.554 97.7505 105.533 97.463C104.63 97.5616 103.636 97.6109 102.568 97.6109C95.8984 97.6109 86.362 95.7795 78.4026 93.9235C73.5071 92.897 68.6937 91.6488 63.987 90.1623C63.7735 90.0966 63.6503 90.0638 63.6503 90.0638C45.3659 84.2413 28.6176 74.8054 13.9638 60.4175C12.5756 59.0543 11.2942 57.5843 10.0293 56.0979C8.87112 54.7182 6.48084 51.8357 5.65123 50.8421C5.56088 50.7107 5.46231 50.5957 5.36374 50.4889C5.16661 50.2836 4.9284 50.1358 4.62448 50.1358Z",fill:"url(#paint2_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M20.0669 90.1049C19.7958 90.1049 19.5247 90.187 19.2537 90.4005C18.1037 91.2874 18.6458 92.7738 19.0812 94.0632C27.5991 99.2287 47.132 109.289 70.2626 109.289C79.0023 109.289 88.243 107.86 97.607 104.189C90.8469 106.382 83.9061 107.195 76.9077 107.195C76.1274 107.195 75.3471 107.186 74.5667 107.162C59.4776 106.784 45.3249 103.162 32.0264 96.6993C27.1227 94.1781 22.5557 91.3695 21.3565 90.614C20.9293 90.3266 20.5022 90.1049 20.0669 90.1049Z",fill:"url(#paint3_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M99.1759 111.949C95.4632 114.791 91.2987 116.762 86.937 118.355C78.7559 121.344 70.5994 122.666 62.4675 122.666C55.4363 122.666 48.4298 121.681 41.4315 119.932C36.5852 118.634 30.9668 116.524 30.9668 116.524C30.6136 116.368 30.2604 116.261 29.9237 116.261C29.4883 116.261 29.0776 116.442 28.7326 116.951C28.2234 117.682 28.1577 118.429 28.3219 119.168C33.6939 121.665 45.2181 126.099 59.2723 126.099C71.4536 126.099 85.5406 122.765 99.1759 111.949Z",fill:"url(#paint4_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M62.9356 129.368C49.7358 129.368 39.7557 126.699 38.4908 126.346C38.8604 126.452 39.2218 126.567 39.5833 126.69C40.7579 127.068 37.5544 129.203 36.5276 129.992C32.8396 132.817 29.2008 135.461 25.5537 138.138H36.7576C40.2897 135.527 43.8052 132.907 47.2387 130.172C48.5119 129.154 49.7275 128.768 51.0993 128.768C52.1342 128.768 53.2678 128.99 54.582 129.335C46.9184 135.108 39.7475 140.52 32.5685 145.924C28.3711 149.077 24.1738 152.231 19.9764 155.384H31.246C41.3821 147.804 51.51 140.216 61.5721 132.546C63.8967 130.78 66.2623 129.557 69.1208 129.179C67.0016 129.318 64.9316 129.376 62.9439 129.376L62.9356 129.368Z",fill:"url(#paint5_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M60.5782 138.409H71.47L79.5115 132.02C79.5115 132.02 83.2571 129.343 87.5941 126.888C87.9801 126.649 88.3662 126.403 88.7605 126.165C88.9248 126.091 89.3354 125.902 89.9597 125.606C90.4279 125.368 90.8961 125.13 91.3561 124.908C92.0625 124.547 92.8921 124.112 93.8121 123.603C86.0499 126.855 78.0987 128.44 70.739 129.056C70.8375 129.056 70.9443 129.056 71.0429 129.056C71.6589 129.056 72.2996 129.088 72.965 129.162C68.9319 132.176 65.0549 135.075 61.2354 137.933L60.5782 138.418V138.409Z",fill:"url(#paint6_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M88.6701 83.3544C88.6865 82.3771 88.6701 81.3999 88.6373 80.4226V80.3487C88.6373 80.2091 88.6208 80.0695 88.6208 79.9381L88.6044 79.7328C88.5633 78.9115 88.4976 78.0903 88.4237 77.2609C85.8281 76.1687 83.3803 74.7726 81.1215 73.1301C81.1379 73.3601 81.1461 73.59 81.179 73.8364C81.4582 75.7909 81.3843 75.1914 81.5814 76.8995C81.7375 77.7783 81.9018 79.3797 81.9182 79.8888C81.8771 80.3405 81.7621 80.7347 81.4829 81.0303C81.1954 81.3342 80.8586 81.4491 80.4972 81.4491C80.0619 81.4491 79.5937 81.2849 79.1337 81.0878C79.9961 81.4738 83.7007 83.108 89.5408 85.2432C88.9165 84.8572 88.7194 84.2742 88.6619 83.3626L88.6701 83.3544Z",fill:"url(#paint7_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M131.022 64.885C128.59 68.2685 125.6 71.2331 122.175 73.6146C120.606 78.7719 118.158 83.6336 114.273 87.9861C113.813 88.5035 113.312 88.988 112.811 89.4807C112.326 89.9488 111.628 90.8029 111.02 90.8029C110.897 90.8029 110.782 90.77 110.675 90.6961C109.788 90.0802 110.577 88.8155 110.856 88.1585C112.31 84.7505 113.427 81.2931 114.257 77.7865C111.825 78.698 109.271 79.3386 106.634 79.6999C106.314 80.7429 105.977 81.794 105.607 82.837C105.172 84.036 104.655 85.2021 104.104 86.3518C103.62 87.3702 103.275 88.602 102.018 88.602C101.771 88.602 101.484 88.5527 101.147 88.446C99.2827 87.83 99.8084 86.4175 100.047 85.1282C100.367 83.4201 100.663 81.7119 100.909 79.9956C98.5927 79.9217 96.3256 79.626 94.1325 79.1168C93.9271 80.4883 93.6889 81.8515 93.4261 83.2148C93.2536 84.1263 92.8675 85.7113 91.2412 85.7113C91.044 85.7113 90.8305 85.6867 90.6005 85.6374C97.9356 88.2735 108.293 91.5584 120.458 94.1863C120.335 94.1371 120.22 94.096 120.105 94.0467C118.167 93.2255 121.666 89.7435 123.268 87.2716C127.777 80.3323 129.987 72.7523 131.005 64.8932L131.022 64.885Z",fill:"url(#paint8_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M129.206 102.497C127.687 102.497 126.151 102.645 124.647 102.916C124.36 102.965 124.081 102.99 123.818 102.99C123.391 102.99 122.988 102.924 122.61 102.809C122.668 102.883 122.734 102.957 122.791 103.039C123.448 103.959 123.793 104.961 123.925 106.004C124.089 106.184 124.229 106.406 124.344 106.694C124.344 106.694 124.344 106.694 124.344 106.71C124.344 106.71 124.344 106.71 124.344 106.718C124.344 106.718 124.344 106.718 124.344 106.726C124.344 106.726 124.344 106.726 124.344 106.735C124.344 106.735 124.344 106.735 124.344 106.743C124.344 106.743 124.344 106.743 124.344 106.751C124.344 106.751 124.344 106.751 124.344 106.759C124.344 106.759 124.344 106.759 124.344 106.768V106.784C124.344 106.784 124.344 106.784 124.344 106.792C124.344 106.792 124.344 106.792 124.344 106.8C124.344 106.8 124.344 106.8 124.344 106.809C124.344 106.809 124.344 106.809 124.344 106.817C124.344 106.817 124.344 106.817 124.344 106.825C124.344 106.825 124.344 106.833 124.344 106.841C124.344 106.841 124.344 106.841 124.344 106.858C124.344 106.858 124.344 106.858 124.344 106.866C124.344 106.866 124.344 106.866 124.344 106.874C124.344 106.874 124.344 106.874 124.344 106.882C124.344 106.882 124.344 106.883 124.344 106.891C124.344 106.891 124.344 106.891 124.344 106.899C124.344 106.899 124.344 106.899 124.344 106.907C124.344 106.907 124.344 106.907 124.344 106.915C124.344 106.915 124.344 106.915 124.344 106.924C124.344 106.924 124.344 106.924 124.344 106.932C124.344 106.932 124.344 106.932 124.344 106.94C124.344 106.94 124.344 106.94 124.344 106.948C124.344 106.948 124.344 106.948 124.344 106.965C124.344 106.965 124.344 106.973 124.344 106.981C124.344 106.981 124.344 106.989 124.344 106.997V107.014C124.344 107.014 124.344 107.022 124.344 107.03C124.344 107.03 124.344 107.039 124.344 107.047C124.344 107.047 124.344 107.055 124.344 107.063C124.344 107.063 124.344 107.071 124.344 107.08C124.344 107.08 124.344 107.088 124.344 107.096C124.344 107.096 124.344 107.104 124.344 107.112C124.344 107.112 124.344 107.121 124.344 107.129C124.344 107.145 124.344 107.162 124.344 107.178C124.344 107.178 124.344 107.186 124.344 107.195C124.344 107.195 124.344 107.227 124.344 107.244C124.344 107.244 124.344 107.252 124.344 107.26V107.277C124.344 107.277 124.344 107.301 124.344 107.31C124.344 107.31 124.344 107.318 124.344 107.326V107.342V107.359C124.36 107.597 124.368 107.843 124.368 108.09C124.368 108.476 124.344 108.87 124.302 109.272C124.253 109.773 124.155 110.307 124.081 110.734C124.072 110.8 124.064 110.865 124.064 110.923C124.064 111.268 124.229 111.588 124.508 111.793L124.672 111.892C124.828 111.966 124.992 112.007 125.157 112.007C125.461 112.007 125.748 111.884 125.962 111.654C126.085 111.514 126.208 111.383 126.331 111.251C127.884 109.617 129.461 108.484 131.136 107.794C132.369 107.285 133.601 107.03 134.857 107.03C136.114 107.03 137.387 107.285 138.702 107.786C139.958 108.262 141.141 108.919 142.316 109.781C142.817 110.151 143.318 110.562 143.819 111.013C144.115 111.284 144.41 111.58 144.673 111.843L144.714 111.884L144.928 112.097L145.051 112.204C145.232 112.335 145.453 112.409 145.675 112.418C144.632 110.192 143.318 108.123 141.461 106.513C137.946 103.466 133.51 102.177 129.001 102.177",fill:"url(#paint9_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M128.779 87.6905L128.582 87.7069C128.114 87.7972 127.752 88.175 127.695 88.6513C127.654 89.0208 127.654 89.415 127.703 89.8174C127.72 89.9488 127.687 90.072 127.629 90.1706C129.51 92.9627 133.584 97.9065 139.769 99.7789C139.769 99.7789 149.331 104.78 146.916 112.032L146.99 111.834C147.737 109.617 147.893 107.581 147.458 105.593C147.022 103.63 146.029 101.824 144.492 100.222C143.901 99.6064 143.244 99.0234 142.529 98.4978C142.184 98.2432 141.815 98.0051 141.437 97.7669C140.969 97.4713 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3898 133.699 92.9299 133.157 92.4536C131.851 91.3121 130.972 90.3348 130.315 89.3001C130.102 88.9716 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8958C129.231 87.7562 129.001 87.6823 128.763 87.6823",fill:"url(#paint10_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M116.647 107.893L118.586 106.768L126.734 95.8535C126.734 95.8535 122.274 95.0076 120.122 94.0303C120.122 94.0303 117.887 104.222 109.632 112.738L112.672 110.488C113.887 109.634 114.988 108.903 116.647 107.893Z",fill:"url(#paint11_linear_290_1904)"}),e("path",{d:"M209.416 49.9962H230.197C245.221 49.9962 252.104 57.7157 252.104 73.5818V81.4409C252.104 97.307 245.221 105.027 230.197 105.027H218.123V148.264H209.416V49.9962ZM230.197 97.0196C239.323 97.0196 243.397 92.9463 243.397 81.8598V73.0152C243.397 62.0682 239.323 57.8553 230.197 57.8553H218.123V97.0196H230.197Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M284.114 49.9962H292.821V93.0941H319.64V49.9962H328.346V148.256H319.64V100.953H292.821V148.256H284.114V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M362.451 125.656V72.5963C362.451 57.0177 370.312 48.5919 384.497 48.5919C398.683 48.5919 406.544 57.0177 406.544 72.5963V125.656C406.544 141.234 398.683 149.66 384.497 149.66C370.312 149.66 362.451 141.234 362.451 125.656ZM397.829 126.214V72.0297C397.829 61.5016 393.056 56.451 384.489 56.451C375.922 56.451 371.15 61.5016 371.15 72.0297V126.214C371.15 136.742 375.922 141.653 384.489 141.653C393.056 141.653 397.829 136.742 397.829 126.214Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M440.796 49.9962H480.108V57.8553H449.503V93.0859H474.638V100.945H449.503V140.249H480.108V148.248H440.796V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M511.56 49.9962H523.076L548.629 125.935V49.9962H556.769V148.256H547.504L519.56 64.458V148.256H511.56V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M592.007 49.9962H600.714V148.256H592.007V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M651.674 98.1447L632.437 49.9962H641.702L657.144 89.0209L672.726 49.9962H681.154L661.917 98.1447L681.992 148.256H672.726L656.438 106.989L640.01 148.256H631.591L651.666 98.1447H651.674Z",fill:"var(--ac-global-text-color-900)"})]}),s("defs",{children:[s("linearGradient",{id:"paint0_linear_290_1904",x1:"22.0956",y1:"10.3474",x2:"97.4433",y2:"140.879",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#14BAB6"}),e("stop",{offset:"0.5",stopColor:"#00ADEE"}),e("stop",{offset:"1",stopColor:"#0095C4"})]}),s("linearGradient",{id:"paint1_linear_290_1904",x1:"95.422",y1:"114.807",x2:"31.8741",y2:"4.70214",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint2_linear_290_1904",x1:"76.6695",y1:"114.126",x2:"30.8746",y2:"34.7951",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint3_linear_290_1904",x1:"70.3612",y1:"119.915",x2:"44.7991",y2:"75.6384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint4_linear_290_1904",x1:"71.4208",y1:"128.85",x2:"55.5071",y2:"101.279",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint5_linear_290_1904",x1:"44.5363",y1:"126.346",x2:"44.5363",y2:"155.384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.9"}),e("stop",{offset:"0.22",stopColor:"#231F20",stopOpacity:"0.4"}),e("stop",{offset:"0.42",stopColor:"#231F20",stopOpacity:"0.1"}),e("stop",{offset:"0.65",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint6_linear_290_1904",x1:"77.1952",y1:"123.603",x2:"77.1952",y2:"138.409",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint7_linear_290_1904",x1:"84.3413",y1:"85.235",x2:"84.3413",y2:"73.1301",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.95"}),e("stop",{offset:"0.51",stopColor:"#231F20",stopOpacity:"0.26"}),e("stop",{offset:"0.81",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint8_linear_290_1904",x1:"110.815",y1:"94.1699",x2:"110.815",y2:"64.885",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.18",stopColor:"#231F20",stopOpacity:"0.48"}),e("stop",{offset:"0.38",stopColor:"#231F20",stopOpacity:"0.12"}),e("stop",{offset:"0.58",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint9_linear_290_1904",x1:"138.077",y1:"117.246",x2:"127.969",y2:"99.7278",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint10_linear_290_1904",x1:"146.226",y1:"112.434",x2:"131.084",y2:"86.1931",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint11_linear_290_1904",x1:"106.889",y1:"107.999",x2:"128.941",y2:"95.2581",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.31",stopColor:"#231F20",stopOpacity:"0.5"}),e("stop",{offset:"0.67",stopColor:"#231F20",stopOpacity:"0.13"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),e("clipPath",{id:"clip0_290_1904",children:e("rect",{width:"682",height:"169",fill:"white"})})]})]})}function Mm(){return s("main",{css:C`
3314
3352
  padding-top: 200px;
3315
3353
  width: 100%;
3316
3354
  height: 100vh;
@@ -3324,7 +3362,7 @@ fragment UsersTable_users on Query {
3324
3362
  flex-direction: column;
3325
3363
  justify-content: space-between;
3326
3364
  box-sizing: border-box;
3327
- `,children:[s(x,{borderColor:"light",borderWidth:"thin",width:"size-5000",padding:"size-400",backgroundColor:"dark",marginStart:"auto",marginEnd:"auto",borderRadius:"medium",children:[e(k,{direction:"column",gap:"size-200",alignItems:"center",children:e(x,{paddingBottom:"size-200",children:e(Ju,{})})}),e(Wu,{})]}),s("footer",{css:C`
3365
+ `,children:[s(x,{borderColor:"light",borderWidth:"thin",width:"size-5000",padding:"size-400",backgroundColor:"dark",marginStart:"auto",marginEnd:"auto",borderRadius:"medium",children:[e(k,{direction:"column",gap:"size-200",alignItems:"center",children:e(x,{paddingBottom:"size-200",children:e(am,{})})}),e(nm,{})]}),s("footer",{css:C`
3328
3366
  display: flex;
3329
3367
  justify-content: center;
3330
3368
  padding: var(--ac-global-dimension-size-400);
@@ -3338,4 +3376,4 @@ fragment UsersTable_users on Query {
3338
3376
  text-decoration: underline;
3339
3377
  }
3340
3378
  }
3341
- `,children:[e("a",{href:"https://docs.arize.com/phoenix",children:"Documentation"}),"|",e("a",{href:"https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q",children:"Community"}),"|",e("a",{href:"https://twitter.com/ArizePhoenix",children:"Social"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix",children:"GitHub"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix/releases",children:`arize-phoenix v${window.Config.platformVersion}`})]})]})}export{Lm as A,sm as D,gm as E,am as F,_m as L,pm as M,fm as P,Im as S,ym as T,mm as a,tm as b,im as c,om as d,rm as e,hm as f,cm as g,lm as h,dm as i,km as j,Sm as k,bm as l,xm as m,Km as n,Fm as o,um as p,Cm as q,vm as r,Tm as s,Dm as t,Qs as u};
3379
+ `,children:[e("a",{href:"https://docs.arize.com/phoenix",children:"Documentation"}),"|",e("a",{href:"https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q",children:"Community"}),"|",e("a",{href:"https://twitter.com/ArizePhoenix",children:"Social"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix",children:"GitHub"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix/releases",children:`arize-phoenix v${window.Config.platformVersion}`})]})]})}export{Pm as A,gm as D,bm as E,om as F,Mm as L,Sm as M,Cm as P,Rm as S,vm as T,km as a,cm as b,um as c,pm as d,mm as e,Fm as f,fm as g,dm as h,ym as i,Km as j,Dm as k,xm as l,Em as m,_m as n,Lm as o,hm as p,Im as q,Tm as r,wm as s,Am as t,Os as u};