arize-phoenix 11.12.0__py3-none-any.whl → 11.13.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.
- {arize_phoenix-11.12.0.dist-info → arize_phoenix-11.13.0.dist-info}/METADATA +1 -1
- {arize_phoenix-11.12.0.dist-info → arize_phoenix-11.13.0.dist-info}/RECORD +12 -12
- phoenix/server/api/types/Dataset.py +9 -1
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-E49JuzFB.js → components-CTjLYQx7.js} +8 -8
- phoenix/server/static/assets/{index-CUhYDnlT.js → index-CtWu3zfM.js} +1 -10
- phoenix/server/static/assets/{pages-C-8lZ5cv.js → pages-D0FD65Uw.js} +317 -316
- phoenix/version.py +1 -1
- {arize_phoenix-11.12.0.dist-info → arize_phoenix-11.13.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-11.12.0.dist-info → arize_phoenix-11.13.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-11.12.0.dist-info → arize_phoenix-11.13.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-11.12.0.dist-info → arize_phoenix-11.13.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,7 +6,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
|
6
6
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
7
|
phoenix/services.py,sha256=ngkyKGVatX3cO2WJdo2hKdaVKP-xJCMvqthvga6kJss,5196
|
|
8
8
|
phoenix/settings.py,sha256=2kHfT3BNOVd4dAO1bq-syEQbHSG8oX2-7NhOwK2QREk,896
|
|
9
|
-
phoenix/version.py,sha256
|
|
9
|
+
phoenix/version.py,sha256=-aDEPEFWRXJyu-sS4wTYLcwVPVvwj_N1hsCNjmXhiA4,24
|
|
10
10
|
phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
|
|
12
12
|
phoenix/core/model.py,sha256=qBFraOtmwCCnWJltKNP18DDG0mULXigytlFsa6YOz6k,4837
|
|
@@ -283,7 +283,7 @@ phoenix/server/api/types/CostBreakdown.py,sha256=yw9dlb0blGIB_dWNP8yEvDHJztHjpiV
|
|
|
283
283
|
phoenix/server/api/types/CreateDatasetPayload.py,sha256=R-6zCmuD0f76RU9Giu78xwTHlASQs6Aq8yzvX1Kxc3g,140
|
|
284
284
|
phoenix/server/api/types/CronExpression.py,sha256=R7oxuSSX_eTUHQWaoaSueQqWDmkkHr5dBKRN6q-6ROk,331
|
|
285
285
|
phoenix/server/api/types/DataQualityMetric.py,sha256=Aieg3bHeBFaAf4mqeRcH1zT04sXAtQD8ATSHJt7FaBQ,1538
|
|
286
|
-
phoenix/server/api/types/Dataset.py,sha256=
|
|
286
|
+
phoenix/server/api/types/Dataset.py,sha256=WBgZORzdwjWjNsX5suSmPt0x7IwKY0jA_BdZt2nsrYA,12186
|
|
287
287
|
phoenix/server/api/types/DatasetExample.py,sha256=_9byxGpXfYb-hmFMUJeG7Bw1wsRKSJaHwF2IPAbFpFw,3115
|
|
288
288
|
phoenix/server/api/types/DatasetExampleRevision.py,sha256=c-jWR6dTguEZTm54IMlFr0Ic84I3nefyDnZb7nF5hnI,874
|
|
289
289
|
phoenix/server/api/types/DatasetValues.py,sha256=7VbCOLlzOXpZN80-zYF2UGuafRcPsZF-8WQNc0YsKFc,1119
|
|
@@ -389,10 +389,10 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
|
|
|
389
389
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
390
390
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
391
391
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
392
|
-
phoenix/server/static/.vite/manifest.json,sha256=
|
|
393
|
-
phoenix/server/static/assets/components-
|
|
394
|
-
phoenix/server/static/assets/index-
|
|
395
|
-
phoenix/server/static/assets/pages-
|
|
392
|
+
phoenix/server/static/.vite/manifest.json,sha256=PfxB9UNQXV87iwYpg-bIZZx9w7K8OPrrcePWs8hFtO8,2165
|
|
393
|
+
phoenix/server/static/assets/components-CTjLYQx7.js,sha256=bwMd-ODRg1ynE-Cu3YgybSR_8Fi6YhOefMFO57vNQMA,642457
|
|
394
|
+
phoenix/server/static/assets/index-CtWu3zfM.js,sha256=iz_8fjDgi_n-38bTJQlsDfpC4aiFYbDpl6bEzyExcRc,62951
|
|
395
|
+
phoenix/server/static/assets/pages-D0FD65Uw.js,sha256=dI6U1cH9EuQEEzNkm7_xF8OWVYjGNUtZqio_Pt0fjlo,1203565
|
|
396
396
|
phoenix/server/static/assets/vendor-CqDb5u4o.css,sha256=zIyFiNJKxMaQk8AvtLgt1rR01oO10d1MFndSDKH9Clw,5517
|
|
397
397
|
phoenix/server/static/assets/vendor-_6rG8OMg.js,sha256=stdw5w5Q5kJ0EkGpzu_f_IYaEEwKHkn3eNDZSxBRQUE,2682340
|
|
398
398
|
phoenix/server/static/assets/vendor-arizeai-BznCmJFh.js,sha256=qFSHnyPDSh4mml_O0oiMaCmZv2e9E3VQXPxzySPABWA,151750
|
|
@@ -439,9 +439,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
|
|
|
439
439
|
phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
|
|
440
440
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
441
441
|
phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
|
|
442
|
-
arize_phoenix-11.
|
|
443
|
-
arize_phoenix-11.
|
|
444
|
-
arize_phoenix-11.
|
|
445
|
-
arize_phoenix-11.
|
|
446
|
-
arize_phoenix-11.
|
|
447
|
-
arize_phoenix-11.
|
|
442
|
+
arize_phoenix-11.13.0.dist-info/METADATA,sha256=4RAatO1qVYMnSGbj-pRT3qw2bZvtBPsJErRdvd_UFrc,30851
|
|
443
|
+
arize_phoenix-11.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
444
|
+
arize_phoenix-11.13.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
|
|
445
|
+
arize_phoenix-11.13.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
446
|
+
arize_phoenix-11.13.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
447
|
+
arize_phoenix-11.13.0.dist-info/RECORD,,
|
|
@@ -3,7 +3,7 @@ from datetime import datetime
|
|
|
3
3
|
from typing import ClassVar, Optional, cast
|
|
4
4
|
|
|
5
5
|
import strawberry
|
|
6
|
-
from sqlalchemy import and_, func, select
|
|
6
|
+
from sqlalchemy import and_, func, or_, select
|
|
7
7
|
from sqlalchemy.sql.functions import count
|
|
8
8
|
from strawberry import UNSET
|
|
9
9
|
from strawberry.relay import Connection, GlobalID, Node, NodeID
|
|
@@ -216,6 +216,7 @@ class Dataset(Node):
|
|
|
216
216
|
last: Optional[int] = UNSET,
|
|
217
217
|
after: Optional[CursorString] = UNSET,
|
|
218
218
|
before: Optional[CursorString] = UNSET,
|
|
219
|
+
filter_condition: Optional[str] = UNSET,
|
|
219
220
|
) -> Connection[Experiment]:
|
|
220
221
|
args = ConnectionArgs(
|
|
221
222
|
first=first,
|
|
@@ -230,6 +231,13 @@ class Dataset(Node):
|
|
|
230
231
|
.where(models.Experiment.dataset_id == dataset_id)
|
|
231
232
|
.order_by(models.Experiment.id.desc())
|
|
232
233
|
)
|
|
234
|
+
if filter_condition is not UNSET and filter_condition:
|
|
235
|
+
# Search both name and description columns with case-insensitive partial matching
|
|
236
|
+
search_filter = or_(
|
|
237
|
+
models.Experiment.name.ilike(f"%{filter_condition}%"),
|
|
238
|
+
models.Experiment.description.ilike(f"%{filter_condition}%"),
|
|
239
|
+
)
|
|
240
|
+
query = query.where(search_filter)
|
|
233
241
|
async with info.context.db() as session:
|
|
234
242
|
experiments = [
|
|
235
243
|
to_gql_experiment(experiment, sequence_number)
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-CTjLYQx7.js": {
|
|
3
|
+
"file": "assets/components-CTjLYQx7.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-_6rG8OMg.js",
|
|
7
|
-
"_pages-
|
|
7
|
+
"_pages-D0FD65Uw.js",
|
|
8
8
|
"_vendor-arizeai-BznCmJFh.js",
|
|
9
9
|
"_vendor-codemirror-29fWLPAy.js",
|
|
10
10
|
"_vendor-three-C5WAXd5r.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-D0FD65Uw.js": {
|
|
14
|
+
"file": "assets/pages-D0FD65Uw.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-_6rG8OMg.js",
|
|
18
18
|
"_vendor-arizeai-BznCmJFh.js",
|
|
19
|
-
"_components-
|
|
19
|
+
"_components-CTjLYQx7.js",
|
|
20
20
|
"_vendor-codemirror-29fWLPAy.js",
|
|
21
21
|
"_vendor-recharts-Cu431IpB.js"
|
|
22
22
|
]
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"name": "vendor-three"
|
|
70
70
|
},
|
|
71
71
|
"index.tsx": {
|
|
72
|
-
"file": "assets/index-
|
|
72
|
+
"file": "assets/index-CtWu3zfM.js",
|
|
73
73
|
"name": "index",
|
|
74
74
|
"src": "index.tsx",
|
|
75
75
|
"isEntry": true,
|
|
76
76
|
"imports": [
|
|
77
77
|
"_vendor-_6rG8OMg.js",
|
|
78
78
|
"_vendor-arizeai-BznCmJFh.js",
|
|
79
|
-
"_pages-
|
|
80
|
-
"_components-
|
|
79
|
+
"_pages-D0FD65Uw.js",
|
|
80
|
+
"_components-CTjLYQx7.js",
|
|
81
81
|
"_vendor-three-C5WAXd5r.js",
|
|
82
82
|
"_vendor-codemirror-29fWLPAy.js",
|
|
83
83
|
"_vendor-shiki-Ce9e01lU.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,j as e,u as Xa,a as en,e as $n,s as ya,b as va,c as kn,d as Va,f as eo,g as He,h as no,i as ao,k as Oa,l as s,m as cn,p as na,n as Fn,R as Xe,o as E,q as Ya,t as Ln,v as to,C as Un,w as lo,x as io,L as kl,y as Ll,z as wl,A as De,B as k,D as dn,E as fn,F as aa,G as m,H as Sl,$ as U,I as ro,J as xl,K as N,M as Tl,N as we,O as oo,P as so,Q as un,S as co,T as H,U as rn,V,W as G,X as J,Y as Al,Z as Il,_ as uo,a0 as Ml,a1 as go,a2 as zl,a3 as mo,a4 as po,a5 as ho,a6 as fo,a7 as bo,a8 as Fl,a9 as yo,aa as vo,ab as Co,ac as Le,ad as El,ae as Ce,af as ko,ag as Lo,ah as $e,ai as Ra,aj as Na,ak as $a,al as Z,am as gn,an as Kt,ao as wo,ap as So,aq as xo,ar as To,as as Ao,at as Io,au as Mo,av as zo,aw as Dl,ax as Fo,ay as Eo,az as Do,aA as _o,aB as Ko,aC as Po,aD as Vo,aE as Ja,aF as se,aG as Oo,aH as Ro,aI as _l,aJ as No,aK as $o,aL as ze,aM as Kl,aN as Pt,aO as Bo,aP as Pl,aQ as
|
|
1
|
+
import{r as p,j as e,u as Xa,a as en,e as $n,s as ya,b as va,c as kn,d as Va,f as eo,g as He,h as no,i as ao,k as Oa,l as s,m as cn,p as na,n as Fn,R as Xe,o as E,q as Ya,t as Ln,v as to,C as Un,w as lo,x as io,L as kl,y as Ll,z as wl,A as De,B as k,D as dn,E as fn,F as aa,G as m,H as Sl,$ as U,I as ro,J as xl,K as N,M as Tl,N as we,O as oo,P as so,Q as un,S as co,T as H,U as rn,V,W as G,X as J,Y as Al,Z as Il,_ as uo,a0 as Ml,a1 as go,a2 as zl,a3 as mo,a4 as po,a5 as ho,a6 as fo,a7 as bo,a8 as Fl,a9 as yo,aa as vo,ab as Co,ac as Le,ad as El,ae as Ce,af as ko,ag as Lo,ah as $e,ai as Ra,aj as Na,ak as $a,al as Z,am as gn,an as Kt,ao as wo,ap as So,aq as xo,ar as To,as as Ao,at as Io,au as Mo,av as zo,aw as Dl,ax as Fo,ay as Eo,az as Do,aA as _o,aB as Ko,aC as Po,aD as Vo,aE as Ja,aF as se,aG as Oo,aH as Ro,aI as _l,aJ as No,aK as $o,aL as ze,aM as Kl,aN as Pt,aO as Bo,aP as Pl,aQ as ge,aR as Ho,aS as et,aT as jo,aU as Zo,aV as Uo,aW as Go,aX as Vt,aY as Vl,aZ as Qo,a_ as Wo,a$ as qo,b0 as nt,b1 as Xo,b2 as Yo,b3 as ta,b4 as Jo,b5 as e1,b6 as n1,b7 as a1,b8 as Ol,b9 as t1,ba as l1,bb as i1,bc as r1,bd as o1,be as s1,bf as c1,bg as Ot,bh as d1,bi as u1,bj as Ca,bk as g1,bl as m1,bm as p1,bn as h1,bo as f1,bp as b1,bq as y1,br as v1,bs as C1,bt as Bn}from"./vendor-_6rG8OMg.js";import{a as Rt,R as k1,b as L1,c as w1,m as S1,T as x1,A as T1,S as A1,d as I1,e as M1,f as z1,u as F1}from"./pages-D0FD65Uw.js";import{u as E1,E as Rl,_ as D1,C as Nl,F as $l,I as _1,a as K1,b as P1,c as V1,d as O1,e as R1,f as N1,P as $1,g as B1,h as H1,i as j1,T as Z1,j as U1}from"./vendor-arizeai-BznCmJFh.js";import{L as Bl,a as Hl,j as jl,E as at,k as Zl,d as Ul,l as Ba,b as Gl,h as G1,c as Q1,e as W1,f as q1,g as X1,i as Y1,s as J1,m as En,n as Dn,R as _n,p as es,o as ns}from"./vendor-codemirror-29fWLPAy.js";import{V as as}from"./vendor-three-C5WAXd5r.js";const Ql=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},a={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},l={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},i={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},r=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],o=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:r,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:r,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,t,l,i],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:o,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,t,a,l,i],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:o},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
|
|
2
2
|
$clusters: [ClusterInput!]!
|
|
3
3
|
$fetchDataQualityMetric: Boolean!
|
|
4
4
|
$dataQualityMetricColumnName: String
|
|
@@ -145,7 +145,7 @@ import{r as p,j as e,u as Xa,a as en,e as $n,s as ya,b as va,c as kn,d as Va,f a
|
|
|
145
145
|
id
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
`}}}();Xl.hash="2d61766d79c27d5fe1d17dba940dfe52";const ts=30,ka=5,La=100,ls=0,wa=0,Sa=.99,is=500,Nt=300,$t=1e5,rs=10,Bt=1,os=2,ss=1,cs=0;var $=(n=>(n.inferences="inferences",n.correctness="correctness",n.dimension="dimension",n))($||{}),on=(n=>(n.list="list",n.gallery="gallery",n))(on||{}),tn=(n=>(n.small="small",n.medium="medium",n.large="large",n))(tn||{}),j=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(j||{}),le=(n=>(n.correct="correct",n.incorrect="incorrect",n.unknown="unknown",n))(le||{});const ds=["#05fbff","#cb8afd"],us=["#00add0","#4500d9"],_e="#a5a5a5",nn=_e;var ve=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(ve||{});function P(n){throw new Error("Unreachable")}function tt(n){return typeof n=="number"||n===null}function gs(n){return typeof n=="string"||n===null}function ms(n){return gs(n)||n===void 0}function o6(n){return Array.isArray(n)?n.every(a=>typeof a=="string"):!1}function
|
|
148
|
+
`}}}();Xl.hash="2d61766d79c27d5fe1d17dba940dfe52";const ts=30,ka=5,La=100,ls=0,wa=0,Sa=.99,is=500,Nt=300,$t=1e5,rs=10,Bt=1,os=2,ss=1,cs=0;var $=(n=>(n.inferences="inferences",n.correctness="correctness",n.dimension="dimension",n))($||{}),on=(n=>(n.list="list",n.gallery="gallery",n))(on||{}),tn=(n=>(n.small="small",n.medium="medium",n.large="large",n))(tn||{}),j=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(j||{}),le=(n=>(n.correct="correct",n.incorrect="incorrect",n.unknown="unknown",n))(le||{});const ds=["#05fbff","#cb8afd"],us=["#00add0","#4500d9"],_e="#a5a5a5",nn=_e;var ve=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(ve||{});function P(n){throw new Error("Unreachable")}function tt(n){return typeof n=="number"||n===null}function gs(n){return typeof n=="string"||n===null}function ms(n){return gs(n)||n===void 0}function o6(n){return Array.isArray(n)?n.every(a=>typeof a=="string"):!1}function me(n){return typeof n=="object"&&n!==null}function s6(n){return me(n)&&Object.keys(n).every(a=>typeof a=="string")}const ps=()=>n=>n,lt=p.createContext(null);function la(){const n=p.useContext(lt);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function c6(n){return e(lt.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:a=>{var t,l;switch(a){case ve.primary:return n.primaryInferences.name;case ve.reference:return((t=n.referenceInferences)==null?void 0:t.name)??"reference";case ve.corpus:return((l=n.corpusInferences)==null?void 0:l.name)??"corpus";default:P()}}},children:n.children})}const it=p.createContext(null);function d6({children:n,...a}){const[t]=p.useState(()=>_s(a));return e(it.Provider,{value:t,children:n})}function I(n,a){const t=p.useContext(it);if(!t)throw new Error("Missing PointCloudContext.Provider in the tree");return Xa(t,n,a)}var X=(n=>(n.last_hour="Last Hour",n.last_day="Last Day",n.last_week="Last Week",n.last_month="Last Month",n.last_3_months="Last 3 Months",n.first_hour="First Hour",n.first_day="First Day",n.first_week="First Week",n.first_month="First Month",n.all="All",n))(X||{});const Yl=p.createContext(null);function hs(){const n=p.useContext(Yl);if(n===null)throw new Error("useTimeRange must be used within a TimeRangeProvider");return n}function fs(n,a){return p.useMemo(()=>{switch(n){case"Last Hour":{const l=en(ao(a.end),{roundingMethod:"ceil"});return{start:Oa(l,1),end:l}}case"Last Day":{const l=en(no(a.end),{roundingMethod:"ceil"});return{start:He(l,1),end:l}}case"Last Week":{const l=en($n(a.end),{roundingMethod:"ceil"});return{start:He(l,7),end:l}}case"Last Month":{const l=en($n(a.end),{roundingMethod:"ceil"});return{start:He(l,30),end:l}}case"Last 3 Months":{const l=en($n(a.end),{roundingMethod:"ceil"});return{start:He(l,90),end:l}}case"First Hour":{const l=Va(a.start);return{start:l,end:eo(l,1)}}case"First Day":{const l=kn(a.start);return{start:l,end:va(l,1)}}case"First Week":{const l=ya(a.start);return{start:l,end:va(l,7)}}case"First Month":{const l=ya(a.start);return{start:l,end:va(l,30)}}case"All":{const l=en($n(a.end),{roundingMethod:"floor"});return{start:ya(a.start),end:l}}default:P()}},[n,a])}function u6(n){const[a,t]=p.useState("Last Month"),l=fs(a,n.timeRangeBounds),i=p.useCallback(r=>{p.startTransition(()=>{t(r)})},[]);return e(Yl.Provider,{value:{timeRange:l,timePreset:a,setTimePreset:i},children:n.children})}const Jl=p.createContext(null);function g6({children:n}){const[a,t]=E1({style:{zIndex:100001}}),l=p.useCallback(r=>{a({variant:"danger",...r})},[a]),i=p.useCallback(r=>{a({variant:"success",...r})},[a]);return s(Jl.Provider,{value:{notify:a,notifyError:l,notifySuccess:i},children:[n,t]})}function ei(){const n=p.useContext(Jl);if(n===null)throw new Error("useGlobalNotification must be used within a NotificationProvider");return n}function ni(){return ei().notifyError}function rt(){return ei().notifySuccess}const ai="arize-phoenix-theme";function ti(){return localStorage.getItem(ai)==="light"?"light":"dark"}const ot=p.createContext(null);function ae(){const n=p.useContext(ot);if(n===null)throw new Error("useTheme must be used within a ThemeProvider");return n}function m6(n){const[a,t]=p.useState(()=>n.theme||ti()),l=p.useCallback(i=>{localStorage.setItem(ai,i),t(i)},[]);return p.useEffect(()=>{n.theme&&t(n.theme)},[n.theme,l]),p.useEffect(()=>(document.body.classList.add(`ac-theme--${a}`),()=>{document.body.classList.remove(`ac-theme--${a}`)}),[a]),e(ot.Provider,{value:{theme:a,setTheme:l},children:n.children})}const li=p.createContext({size:"M"});function ia({size:n="M",children:a}){return e(li.Provider,{value:{size:n},children:a})}function st(){return p.useContext(li).size}const bs=n=>`arize-phoenix-project-${n}`;function ys({projectId:n}){return{state:cn()(na(t=>({defaultTab:"spans",setDefaultTab:l=>{t({defaultTab:l})},treatOrphansAsRoots:!1,setTreatOrphansAsRoots:l=>{t({treatOrphansAsRoots:l})}}),{name:bs(n)}))}}const ii=p.createContext(null);function p6({children:n,projectId:a}){const[t]=p.useState(()=>ys({projectId:a}));return e(ii.Provider,{value:t,children:n})}function h6(n,a){const t=p.useContext(ii);if(!t)throw new Error("Missing ProjectContext.Provider in the tree");return Xa(t.state,n,a)}const vs=n=>{const a=t=>({markdownDisplayMode:"text",setMarkdownDisplayMode:l=>{t({markdownDisplayMode:l})},traceStreamingEnabled:!0,setTraceStreamingEnabled:l=>{t({traceStreamingEnabled:l})},lastNTimeRangeKey:"7d",setLastNTimeRangeKey:l=>{t({lastNTimeRangeKey:l})},projectsAutoRefreshEnabled:!0,setProjectAutoRefreshEnabled:l=>{t({projectsAutoRefreshEnabled:l})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:l=>{t({showMetricsInTraceTree:l})},modelConfigByProvider:{},setModelConfigForProvider:({provider:l,modelConfig:i})=>{t(r=>({modelConfigByProvider:{...r.modelConfigByProvider,[l]:i}}))},playgroundStreamingEnabled:!0,setPlaygroundStreamingEnabled:l=>{t({playgroundStreamingEnabled:l})},isAnnotatingSpans:!0,setIsAnnotatingSpans:l=>{t({isAnnotatingSpans:l})},projectViewMode:"grid",setProjectViewMode:l=>{t({projectViewMode:l})},projectSortOrder:{column:"endTime",direction:"desc"},setProjectSortOrder:l=>{t({projectSortOrder:l})},...n});return cn()(na(Fn(a),{name:"arize-phoenix-preferences"}))},ri=p.createContext(null);function f6({children:n,...a}){const[t]=p.useState(()=>vs(a));return e(ri.Provider,{value:t,children:n})}function Qe(n,a){const t=p.useContext(ri);if(!t)throw new Error("Missing PreferencesContext.Provider in the tree");return Xa(t,n,a)}const oi=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ViewerContextRefetchQuery",selections:[{args:null,kind:"FragmentSpread",name:"ViewerContext_viewer"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"ViewerContextRefetchQuery",selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"viewer",plural:!1,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isManagementUser",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[a,n],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"authMethod",storageKey:null},{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKeys",plural:!0,selections:[n,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:"expiresAt",storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"79221da09cbb1334cb0c446af434f607",id:null,metadata:{},name:"ViewerContextRefetchQuery",operationKind:"query",text:`query ViewerContextRefetchQuery {
|
|
149
149
|
...ViewerContext_viewer
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -175,7 +175,7 @@ fragment ViewerContext_viewer on Query {
|
|
|
175
175
|
...APIKeysTableFragment
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
`}}}();oi.hash="d85505e5f9dffd2a1c791f8e0007ab61";const si={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:oi}},name:"ViewerContext_viewer",selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"viewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isManagementUser",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},{alias:null,args:null,kind:"ScalarField",name:"authMethod",storageKey:null},{args:null,kind:"FragmentSpread",name:"APIKeysTableFragment"}],storageKey:null}],type:"Query",abstractKey:null};si.hash="d85505e5f9dffd2a1c791f8e0007ab61";const ci=Xe.createContext({viewer:null,refetchViewer:()=>{}});function mn(){const n=Xe.useContext(ci);if(n==null)throw new Error("useViewer must be used within a ViewerProvider");return n}function Cs(){var a;const{viewer:n}=mn();return!(n&&((a=n==null?void 0:n.role)==null?void 0:a.name)!=="ADMIN")}function b6({query:n,children:a}){const[t,l]=E.useRefetchableFragment(si,n),i=()=>{p.startTransition(()=>{l({},{fetchPolicy:"network-only"})})};return e(ci.Provider,{value:{viewer:t.viewer,refetchViewer:i},children:a})}function ks(n){return n.endsWith("/")?n.slice(0,-1):n}const Ls=ks(window.Config.basename),Kn=`${window.location.protocol}//${window.location.host}${Ls}`,y6=window.Config.platformVersion,xn="returnUrl";function Ht(n,a){const t=new URL(n,window.location.origin);return a.forEach((l,i)=>{t.searchParams.append(i,l)}),t.pathname+t.search}function di(){const n=window.Config.basename,a=n==null||n===""||n==="/",t=n!=null&&n.startsWith("/")&&!n.endsWith("/");if(!(a||t))throw new Error(`Invalid basename: ${n}`);const l=window.location.pathname,i=window.location.origin,r=new URLSearchParams(window.location.search);if(a){const o=new URL("/login",i);return o.searchParams.set(xn,Ht(l,r)),o.pathname+o.search}if(l.startsWith(n)){const o=l.slice(n.length);if(o===""||o.startsWith("/")){const d=new URL(n+"/login",i);return d.searchParams.set(xn,Ht(o,r)),d.pathname+d.search}}return n+"/login"}function v6(n){const a=window.Config.basename,t=a==null||a===""||a==="/",l=a!=null&&a.startsWith("/")&&!a.endsWith("/");if(!(t||l))throw new Error(`Invalid basename: ${a}`);return t?n:a+n}const C6=({path:n,searchParams:a})=>{const l=new URL(window.location.href).searchParams.get(xn),i=new URLSearchParams(a||{});l&&i.set(xn,l);const r=i.toString();return`${n}${r?`?${r}`:""}`},ws=n=>!(typeof n!="string"||!n.startsWith("/")||n.replace(/\\/g,"/").startsWith("//")),Ss=n=>ws(n)?n:"/",k6=()=>{const n=new URL(window.location.href);return Ss(n.searchParams.get(xn))},xs=Kn+"/auth/refresh";class jt extends Error{constructor(){super("Unauthorized")}}async function Ts(n,a){try{return await fetch(n,a).then(t=>{if(t.status===401)throw new jt;return t})}catch(t){if(t instanceof jt){const l=await As();return Ya(l.ok,`Failed to authenticate. Please visit ${di()} to login.`),fetch(n,a)}if(t instanceof Error&&t.name==="AbortError")throw t}throw new Error("An unexpected error occurred while fetching data")}let bn=null;async function As(){return bn||(bn=fetch(xs,{method:"POST"}).then(n=>n.ok?(bn=null,Promise.resolve(n)):(window.location.href=di(),new Promise(()=>{}))),bn)}const ui=Kn+"/graphql",Is=window.Config.authenticationEnabled,gi=Is?Ts:fetch;function Ms(n,a,t){return Ln.Observable.create(l=>{const i=new AbortController;return gi(n,{...a,signal:i.signal}).then(r=>(Ya(r instanceof Response),r.json())).then(r=>{const o=t==null?void 0:t(r);if(o)throw o;l.next(r),l.complete()}).catch(r=>{r.name==="AbortError"?l.complete():l.error(r)}),()=>{i.abort()}})}const zs=(n,a,t)=>Ms(ui,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n.text,variables:a})},l=>{if(!(!ge(l)||!("errors"in l))&&Array.isArray(l.errors))return new Error(`Error fetching GraphQL query '${n.name}' with variables '${JSON.stringify(a)}': ${JSON.stringify(l.errors)}`)}),Fs=to(ui,{fetch:gi}),Pn=new Ln.Environment({network:Ln.Network.create(zs,Fs),store:new Ln.Store(new Ln.RecordSource,{gcReleaseBufferSize:20})});function mi(n){return n.includes("PRIMARY")?ve.primary:n.includes("CORPUS")?ve.corpus:ve.reference}function ct(n){const a=[],t=[],l=[];return n.forEach(i=>{const r=mi(i);r==ve.primary?a.push(i):r==ve.corpus?l.push(i):t.push(i)}),{primaryEventIds:a,referenceEventIds:t,corpusEventIds:l}}const Gn=10,wn="unknown",pi=io,hi=lo,Es=n=>hi[n],Ds=n=>pi(n/Gn);var sn=(n=>(n.move="move",n.select="select",n))(sn||{}),dt=(n=>(n.default="default",n.highlight="highlight",n))(dt||{});const an=()=>ti()==="light"?us:ds;function L6(){const n=an();return{coloringStrategy:$.inferences,pointGroupVisibility:{[j.primary]:!0,[j.reference]:!0},pointGroupColors:{[j.primary]:n[0],[j.reference]:n[1],[j.corpus]:_e},metric:{type:"drift",metric:"euclideanDistance"}}}function w6(){const n=an();return{coloringStrategy:$.inferences,pointGroupVisibility:{[j.primary]:!0,[j.corpus]:!0},pointGroupColors:{[j.primary]:n[0],[j.corpus]:_e},metric:{type:"retrieval",metric:"queryDistance"},clusterSort:{dir:"desc",column:"primaryMetricValue"}}}function S6(){return{coloringStrategy:$.correctness,pointGroupVisibility:{[le.correct]:!0,[le.incorrect]:!0,[le.unknown]:!0},pointGroupColors:{[le.correct]:Un.Discrete2.LightBlueOrange[0],[le.incorrect]:Un.Discrete2.LightBlueOrange[1],[le.unknown]:nn},metric:{type:"performance",metric:"accuracyScore"},clusterSort:{dir:"asc",column:"primaryMetricValue"}}}const _s=n=>{const a={loading:!1,errorMessage:null,points:[],eventIdToDataMap:new Map,clusters:[],clusterSort:{dir:"desc",column:"driftRatio"},pointData:null,selectedEventIds:new Set,hoveredEventId:null,highlightedClusterId:null,selectedClusterId:null,canvasMode:"move",pointSizeScale:1,clusterColorMode:"default",coloringStrategy:$.inferences,inferencesVisibility:{primary:!0,reference:!0,corpus:!0},pointGroupVisibility:{[j.primary]:!0,[j.reference]:!0,[j.corpus]:!0},pointGroupColors:{[j.primary]:an()[0],[j.reference]:an()[1],[j.corpus]:_e},eventIdToGroup:{},selectionDisplay:on.gallery,selectionGridSize:tn.large,dimension:null,dimensionMetadata:null,umapParameters:{minDist:ls,nNeighbors:ts,nSamples:is},hdbscanParameters:{minClusterSize:rs,clusterMinSamples:ss,clusterSelectionEpsilon:cs},clustersLoading:!1,metric:{type:"drift",metric:"euclideanDistance"},selectionSearchText:""},t=(l,i)=>({...a,...n,setInitialData:async({points:r,clusters:o,retrievals:c})=>{const d=i(),u=new Map,g=c.reduce((b,y)=>{const{queryId:C}=y;return b[C]?b[C].push(y):b[C]=[y],b},{});r.forEach(b=>{b={...b,retrievals:g[b.eventId]??[]},u.set(b.eventId,b)});const h=o.map(Ut).sort(Ta(d.clusterSort));l({loading:!1,points:r,eventIdToDataMap:u,clusters:h,clustersLoading:!1,selectedEventIds:new Set,selectedClusterId:null,pointData:null,eventIdToGroup:Be({points:r,coloringStrategy:d.coloringStrategy,pointsData:d.pointData??{},dimension:d.dimension||null,dimensionMetadata:d.dimensionMetadata})});const f=await Vs(r.map(b=>b.eventId)).catch(()=>l({errorMessage:"Failed to load the point events"}));f&&l({pointData:f,clusters:h,clustersLoading:!1,eventIdToGroup:Be({points:r,coloringStrategy:d.coloringStrategy,pointsData:f??{},dimension:d.dimension||null,dimensionMetadata:d.dimensionMetadata})})},setClusters:r=>{const o=i(),c=r.map(Ut).sort(Ta(o.clusterSort));l({clusters:c,clustersLoading:!1,selectedClusterId:null,highlightedClusterId:null})},setClusterSort:r=>{const c=[...i().clusters].sort(Ta(r));l({clusterSort:r,clusters:c})},setSelectedEventIds:r=>l({selectedEventIds:r,selectionSearchText:""}),setHoveredEventId:r=>l({hoveredEventId:r}),setHighlightedClusterId:r=>l({highlightedClusterId:r}),setSelectedClusterId:r=>l({selectedClusterId:r,highlightedClusterId:null}),setPointSizeScale:r=>l({pointSizeScale:r}),setCanvasMode:r=>l({canvasMode:r}),setClusterColorMode:r=>l({clusterColorMode:r}),setColoringStrategy:r=>{const o=i();switch(l({coloringStrategy:r}),r){case $.correctness:l({pointGroupVisibility:{[le.correct]:!0,[le.incorrect]:!0,[le.unknown]:!0},pointGroupColors:{[le.correct]:Un.Discrete2.LightBlueOrange[0],[le.incorrect]:Un.Discrete2.LightBlueOrange[1],[le.unknown]:nn},dimension:null,dimensionMetadata:null,eventIdToGroup:Be({points:o.points,coloringStrategy:r,pointsData:o.pointData??{},dimension:o.dimension||null,dimensionMetadata:o.dimensionMetadata})});break;case $.inferences:{l({pointGroupVisibility:{[j.primary]:!0,[j.reference]:!0,[j.corpus]:!0},pointGroupColors:{[j.primary]:an()[0],[j.reference]:an()[1],[j.corpus]:_e},dimension:null,dimensionMetadata:null,eventIdToGroup:Be({points:o.points,coloringStrategy:r,pointsData:o.pointData??{},dimension:o.dimension||null,dimensionMetadata:o.dimensionMetadata})});break}case $.dimension:{l({pointGroupVisibility:{unknown:!0},pointGroupColors:{unknown:nn},dimension:null,dimensionMetadata:null,eventIdToGroup:Be({points:o.points,coloringStrategy:r,pointsData:o.pointData??{},dimension:o.dimension||null,dimensionMetadata:o.dimensionMetadata})});break}default:P()}},inferencesVisibility:{primary:!0,reference:!0,corpus:!0},setInferencesVisibility:r=>l({inferencesVisibility:r}),setPointGroupVisibility:r=>l({pointGroupVisibility:r}),selectionDisplay:on.gallery,setSelectionDisplay:r=>l({selectionDisplay:r}),setSelectionGridSize:r=>l({selectionGridSize:r}),reset:()=>{l({points:[],clusters:[],selectedEventIds:new Set,selectedClusterId:null,eventIdToGroup:{}})},setDimension:async r=>{const o=i();l({dimension:r,dimensionMetadata:null});const c=await Ps(r).catch(()=>l({errorMessage:"Failed to load the dimension metadata"}));if(c){if(l({dimensionMetadata:c}),c.categories&&c.categories.length){const d=c.categories.length,g=d<=hi.length?Es:h=>pi(h/d);l({pointGroupVisibility:{...c.categories.reduce((h,f)=>({...h,[f]:!0}),{}),unknown:!0},pointGroupColors:{...c.categories.reduce((h,f,b)=>({...h,[f]:g(b)}),{}),unknown:nn},eventIdToGroup:Be({points:o.points,coloringStrategy:o.coloringStrategy,pointsData:o.pointData??{},dimension:r,dimensionMetadata:c})})}else if(c.interval!==null){const d=fi(c.interval);l({pointGroupVisibility:{...d.reduce((u,g)=>({...u,[g.name]:!0}),{}),unknown:!0},pointGroupColors:{...d.reduce((u,g,h)=>({...u,[g.name]:Ds(h)}),{}),unknown:nn},eventIdToGroup:Be({points:o.points,coloringStrategy:o.coloringStrategy,pointsData:o.pointData??{},dimension:r,dimensionMetadata:c})})}}},setDimensionMetadata:r=>l({dimensionMetadata:r}),setUMAPParameters:r=>l({umapParameters:r}),setHDBSCANParameters:async r=>{const o=i();l({hdbscanParameters:r,clustersLoading:!0});const c=await Os({metric:o.metric,points:o.points,hdbscanParameters:r});o.setClusters(c)},getHDSCANParameters:()=>i().hdbscanParameters,getMetric:()=>i().metric,setErrorMessage:r=>l({errorMessage:r}),setLoading:r=>l({loading:r}),setMetric:async r=>{const o=i();l({metric:r,clustersLoading:!0});const c=await Rs({metric:r,clusters:o.clusters,hdbscanParameters:o.hdbscanParameters});o.setClusters(c)},setSelectionSearchText:r=>l({selectionSearchText:r})});return cn()(Fn(t))},Zt=new Intl.NumberFormat([],{maximumFractionDigits:2});function Ks({min:n,max:a}){return`${Zt.format(n)} - ${Zt.format(a)}`}function fi({min:n,max:a}){const l=(a-n)/Gn,i=[];for(let r=0;r<Gn;r++){const o=n+r*l,c=n+(r+1)*l;i.push({min:o,max:c,name:Ks({min:o,max:c})})}return i}function xa({numericGroupIntervals:n,numericValue:a}){let t=wn,l=n.findIndex(i=>a>=i.min&&a<i.max);return l=l===-1?Gn-1:l,t=n[l].name,t}function Be(n){const{points:a,coloringStrategy:t,pointsData:l,dimension:i,dimensionMetadata:r}=n,o={},c=a.map(d=>d.eventId);switch(t){case $.inferences:{const{primaryEventIds:d,referenceEventIds:u,corpusEventIds:g}=ct(c);d.forEach(h=>{o[h]=j.primary}),u.forEach(h=>{o[h]=j.reference}),g.forEach(h=>{o[h]=j.corpus});break}case $.correctness:{a.forEach(d=>{let u=le.unknown;const{predictionLabel:g,actualLabel:h}=d.eventMetadata;g!==null&&h!==null&&(u=g===h?le.correct:le.incorrect),o[d.eventId]=u});break}case $.dimension:{let d;r&&(r==null?void 0:r.interval)!==null&&(d=fi(r.interval));const u=(i==null?void 0:i.type)==="prediction"&&(i==null?void 0:i.dataType)==="categorical",g=(i==null?void 0:i.type)==="prediction"&&(i==null?void 0:i.dataType)==="numeric",h=(i==null?void 0:i.type)==="actual"&&(i==null?void 0:i.dataType)==="categorical",f=(i==null?void 0:i.type)==="actual"&&(i==null?void 0:i.dataType)==="numeric";a.forEach(b=>{let y=wn;const C=l[b.eventId];if(i!=null&&C!=null)if(u)y=C.eventMetadata.predictionLabel??wn;else if(g){if(d==null)throw new Error("Cannot color by prediction score without numeric group intervals");const w=C.eventMetadata.predictionScore;typeof w=="number"&&(y=xa({numericGroupIntervals:d,numericValue:w}))}else if(f){if(d==null)throw new Error("Cannot color by actual score without numeric group intervals");const w=C.eventMetadata.actualScore;typeof w=="number"&&(y=xa({numericGroupIntervals:d,numericValue:w}))}else if(h)y=C.eventMetadata.actualLabel??wn;else{const w=C.dimensions.find(D=>D.dimension.name===i.name);if(w!=null&&i.dataType==="categorical")y=w.value??wn;else if(w!=null&&i.dataType==="numeric"&&d!=null){const D=typeof(w==null?void 0:w.value)=="string"?parseFloat(w.value):null;typeof D=="number"&&(y=xa({numericGroupIntervals:d,numericValue:D}))}}o[b.eventId]=y});break}default:P()}return o}async function Ps(n){const a=await E.fetchQuery(Pn,Xl,{id:n.id,getDimensionMinMax:n.dataType==="numeric",getDimensionCategories:n.dataType==="categorical"}).toPromise(),t=a==null?void 0:a.dimension;if(!n)throw new Error("Dimension not found");let l=null;return typeof(t==null?void 0:t.min)=="number"&&typeof(t==null?void 0:t.max)=="number"&&(l={min:t.min,max:t.max}),{interval:l,categories:(t==null?void 0:t.categories)??null}}async function Vs(n){var u,g,h,f,b,y;const{primaryEventIds:a,referenceEventIds:t,corpusEventIds:l}=ct([...n]),i=await E.fetchQuery(Pn,ql,{primaryEventIds:a,referenceEventIds:t,corpusEventIds:l}).toPromise(),r=((g=(u=i==null?void 0:i.model)==null?void 0:u.primaryInferences)==null?void 0:g.events)??[],o=((f=(h=i==null?void 0:i.model)==null?void 0:h.referenceInferences)==null?void 0:f.events)??[],c=((y=(b=i==null?void 0:i.model)==null?void 0:b.corpusInferences)==null?void 0:y.events)??[];return[...r,...o,...c].reduce((C,L)=>(C[L.id]=L,C),{})}async function Os({metric:n,points:a,hdbscanParameters:t}){const l=await E.fetchQuery(Pn,Wl,{eventIds:a.map(i=>i.eventId),coordinates:a.map(i=>({x:i.position[0],y:i.position[1],z:i.position[2]})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...t},{fetchPolicy:"network-only"}).toPromise();return(l==null?void 0:l.hdbscanClustering)??[]}async function Rs({metric:n,clusters:a,hdbscanParameters:t}){const l=await E.fetchQuery(Pn,Ql,{clusters:a.map(i=>({id:i.id,eventIds:i.eventIds})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...t},{fetchPolicy:"network-only"}).toPromise();return(l==null?void 0:l.clusters)??[]}const Ta=n=>(a,t)=>{const{dir:l,column:i}=n,r=l==="asc",o=a[i],c=t[i];return o==null?1:c==null?-1:o>c?r?1:-1:o<c?r?-1:1:0};function Ut(n){let a=n.driftRatio,t=null;return n.dataQualityMetric?(a=n.dataQualityMetric.primaryValue,t=n.dataQualityMetric.referenceValue):n.performanceMetric?(a=n.performanceMetric.primaryValue,t=n.performanceMetric.referenceValue):n.primaryToCorpusRatio!=null&&(a=(n.primaryToCorpusRatio+1)/2*100),{...n,size:n.eventIds.length,primaryMetricValue:a,referenceMetricValue:t}}const Ns=({projectId:n,tableId:a})=>`arize-phoenix-tracing-${n}-${a}`,x6=n=>{const a=t=>({...n,columnVisibility:{metadata:!1},columnSizing:{metadata:200},annotationColumnVisibility:{},setColumnVisibility:l=>{t({columnVisibility:l})},setAnnotationColumnVisibility:l=>{t({annotationColumnVisibility:l})},setColumnSizing:l=>{t(typeof l=="function"?i=>({columnSizing:l(i.columnSizing)}):{columnSizing:l})}});return cn()(na(Fn(a),{name:Ns(n)}))},Ke={NONE:"NONE",FString:"F_STRING",Mustache:"MUSTACHE"},T6={OPENAI:"OpenAI",AZURE_OPENAI:"Azure OpenAI",ANTHROPIC:"Anthropic",GOOGLE:"Google",DEEPSEEK:"DeepSeek",XAI:"xAI",OLLAMA:"Ollama",AWS:"AWS Bedrock"},bi="OPENAI",$s="gpt-4o",Bs="user",A6=["2024-10-01-preview","2024-09-01-preview","2024-08-01-preview","2024-07-01-preview","2024-06-01","2024-05-01-preview","2024-04-01-preview","2024-03-01-preview","2024-02-15-preview","2024-02-01","2023-10-01-preview","2023-09-01-preview","2023-08-01-preview","2023-07-01-preview","2023-06-01-preview","2023-05-15","2023-03-15-preview"],I6={user:["user","human"],ai:["assistant","bot","ai","model"],system:["system","developer"],tool:["tool"]},Ha={OPENAI:[{envVarName:"OPENAI_API_KEY",isRequired:!0}],AZURE_OPENAI:[{envVarName:"AZURE_OPENAI_API_KEY",isRequired:!0}],ANTHROPIC:[{envVarName:"ANTHROPIC_API_KEY",isRequired:!0}],GOOGLE:[{envVarName:"GEMINI_API_KEY",isRequired:!0}],DEEPSEEK:[{envVarName:"DEEPSEEK_API_KEY",isRequired:!0}],XAI:[{envVarName:"XAI_API_KEY",isRequired:!0}],OLLAMA:[],AWS:[{envVarName:"AWS_ACCESS_KEY_ID",isRequired:!0},{envVarName:"AWS_SECRET_ACCESS_KEY",isRequired:!0},{envVarName:"AWS_SESSION_TOKEN",isRequired:!1}]},yi=({parser:n,text:a})=>{const t=n.parse(a),l=[],i=t.cursor();do if(i.name==="Variable"){const r=a.slice(i.node.from,i.node.to).trim();l.push(r)}while(i.next());return l},vi=({parser:n,text:a,variables:t,postFormat:l})=>{if(!a)return"";let i=a,r=n.parse(i),o=r.cursor();do if(o.name==="Variable"){const c=i.slice(o.node.from,o.node.to).trim(),d=o.node.parent;c in t&&(i=`${i.slice(0,d.from)}${t[c]}${i.slice(d.to)}`,r=n.parse(i),o=r.cursor())}while(o.next());return l&&(i=l(i)),i},Hs=kl.deserialize({version:14,states:"!WQQOPOOOcOQO'#C^OOOO'#Cb'#CbQQOPOOOOOO'#Cc'#CcOhOQO,58xOOOO-E6`-E6`OOOO-E6a-E6aOOOO1G.d1G.d",stateData:"v~ORPOXQOYQOZQO[QO~OSSO~OSSOTWO~OZRX[X~",goto:"iWPPXPPP]cTQORQRORURQTPRVT",nodeNames:"⚠ FStringTemplate Template LBrace Variable RBrace",maxTerm:12,skippedNodes:[0],repeatNodeCount:2,tokenData:"%[~RaXY!WYZ!W]^!Wpq!Wqr!Wrs!]sw!Wwx!bx#O!W#O#P!i#P#o!W#o#p$c#p#q!W#q#r$|#r;'S!W;'S;=`%U<%lO!W~!]OX~~!bO[~~!iOX~[~~!lYrs!W!P!Q!W#O#P!W#U#V!W#Y#Z!W#b#c!W#f#g!W#h#i!W#i#j#[#o#p$^~#_R!Q![#h!c!i#h#T#Z#h~#kR!Q![#t!c!i#t#T#Z#t~#wR!Q![$Q!c!i$Q#T#Z$Q~$TR!Q![!W!c!i!W#T#Z!W~$cOZ~~$jQR~X~#o#p$p#q#r$w~$wOZ~[~~$|OY~~%RPX~#q#r!]~%XP;=`<%l!W",tokenizers:[1,new Ll("!p~RVO#Oh#O#P!P#P#qh#q#r!j#r;'Sh;'S;=`y<%lOh~mSS~O#qh#r;'Sh;'S;=`y<%lOh~|P;=`<%lh~!UTS~O#qh#q#r!e#r;'Sh;'S;=`y<%lOh~!jOS~~!oOT~~",77)],topRules:{FStringTemplate:[0,1]},tokenPrec:32}),ut=Bl.define({parser:Hs.configure({props:[wl({"Template/LBrace":De.quote,"Template/RBrace":De.quote,"Template/Variable":De.variableName,"⚠":De.invalid})]}),languageData:{}}),js=({text:n,variables:a})=>vi({parser:ut.parser,text:n,variables:a,postFormat:t=>t.replaceAll("\\{","{").replaceAll("{{","{").replaceAll("}}","}")}),Zs=n=>yi({parser:ut.parser,text:n});function Us(){return new Hl(ut)}const Gs=kl.deserialize({version:14,states:"!WQQOPOOOcOQO'#C^OOOO'#Cb'#CbQQOPOOOOOO'#Cc'#CcOhOQO,58xOOOO-E6`-E6`OOOO-E6a-E6aOOOO1G.d1G.d",stateData:"v~ORPOXQOYQOZQO[QO~OSSO~OSSOTWO~OZRX[X~",goto:"iWPPXPPP]cTQORQRORURQTPRVT",nodeNames:"⚠ MustacheLikeTemplate Template LBrace Variable RBrace",maxTerm:12,skippedNodes:[0],repeatNodeCount:2,tokenData:"%W~RaXY!WYZ!W]^!Wpq!Wqr!Wrs!]sw!Wwx!bx#O!W#O#P!i#P#o!W#o#p$c#p#q!W#q#r!b#r;'S!W;'S;=`%Q<%lO!W~!]OX~~!bO[~~!iOX~[~~!lYrs!W!P!Q!W#O#P!W#U#V!W#Y#Z!W#b#c!W#f#g!W#h#i!W#i#j#[#o#p$^~#_R!Q![#h!c!i#h#T#Z#h~#kR!Q![#t!c!i#t#T#Z#t~#wR!Q![$Q!c!i$Q#T#Z$Q~$TR!Q![!W!c!i!W#T#Z!W~$cOZ~~$jPX~[~#o#p$m~$rPR~#q#r$u~$xP#q#r${~%QOY~~%TP;=`<%l!W",tokenizers:[1,new Ll("#e~RVO#oh#o#p!P#p#qh#q#r#X#r;'Sh;'S;=`y<%lOh~mSS~O#qh#r;'Sh;'S;=`y<%lOh~|P;=`<%lh~!USS~O#q!b#r;'S!b;'S;=`#R<%lO!b~!gVS~O#O!b#O#P!b#P#q!b#q#r!|#r;'S!b;'S;=`#R<%lO!b~#ROS~~#UP;=`<%l!b~#[P#q#r#_~#dOT~~",112)],topRules:{MustacheLikeTemplate:[0,1]},tokenPrec:32}),gt=Bl.define({parser:Gs.configure({props:[wl({"Template/LBrace":De.quote,"Template/RBrace":De.quote,"Template/Variable":De.variableName,"Template/⚠":De.invalid})]}),languageData:{}}),Qs=({text:n,variables:a})=>vi({parser:gt.parser,text:n,variables:a,postFormat:t=>t.replaceAll("\\{{","{{")}),Ws=n=>yi({parser:gt.parser,text:n});function qs(){return new Hl(gt)}const M6=n=>{switch(n){case Ke.FString:return{format:js,extractVariables:Zs};case Ke.Mustache:return{format:Qs,extractVariables:Ws};case Ke.NONE:return{format:({text:a})=>a,extractVariables:()=>[]};default:P()}},Xs=k.union([k.string(),k.number(),k.boolean(),k.null()]),Qn=k.lazy(()=>k.union([Xs,k.array(Qn),k.record(Qn)])),Gt=k.object({type:k.enum(["string","number","boolean","object","array","null","integer"]).describe("The type of the parameter"),description:k.string().optional().describe("A description of the parameter"),enum:k.array(k.string()).optional().describe("The allowed values")}).passthrough().describe("A map of parameter names to their definitions"),mt=k.object({type:k.literal("object"),properties:k.record(k.union([Gt,k.object({anyOf:k.array(Gt)}).describe("A list of possible parameter names to their definitions")])).optional(),required:k.array(k.string()).optional().describe("The required parameters"),additionalProperties:k.boolean().optional().describe("Whether or not additional properties are allowed in the schema")}).passthrough(),Vn=k.object({type:k.literal("function").describe("The type of the tool"),function:k.object({name:k.string().describe("The name of the function"),description:k.string().optional().describe("A description of the function"),parameters:mt.extend({strict:k.boolean().optional().describe("Whether or not the arguments should exactly match the function definition, only supported for OpenAI models")}).describe("The parameters that the function accepts")}).passthrough().describe("The function definition")}).passthrough(),z6=dn(Vn,{removeAdditionalStrategy:"passthrough"}),ra=k.object({name:k.string(),description:k.string(),input_schema:mt}),F6=dn(ra,{removeAdditionalStrategy:"passthrough"}),oa=k.object({toolSpec:k.object({name:k.string(),description:k.string().min(1),inputSchema:k.object({json:mt})})}),E6=dn(oa,{removeAdditionalStrategy:"passthrough"}),Ys=oa.transform(n=>({type:"function",function:{name:n.toolSpec.name,description:n.toolSpec.description,parameters:n.toolSpec.inputSchema.json}})),Js=Vn.transform(n=>({toolSpec:{name:n.function.name,description:n.function.description??n.function.name,inputSchema:{json:n.function.parameters}}})),e0=ra.transform(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.input_schema}})),n0=Vn.transform(n=>({name:n.function.name,description:n.function.description??n.function.name,input_schema:n.function.parameters})),Ci=k.union([Vn,ra,oa,Qn]),a0=n=>{const{success:a,data:t}=Vn.safeParse(n);if(a)return{provider:"OPENAI",validatedToolDefinition:t};const{success:l,data:i}=ra.safeParse(n);if(l)return{provider:"ANTHROPIC",validatedToolDefinition:i};const{success:r,data:o}=oa.safeParse(n);return r?{provider:"AWS",validatedToolDefinition:o}:{provider:"UNKNOWN",validatedToolDefinition:null}},Aa=n=>{const{provider:a,validatedToolDefinition:t}=a0(n);switch(a){case"AZURE_OPENAI":case"OPENAI":return t;case"ANTHROPIC":return e0.parse(t);case"AWS":return Ys.parse(t);case"UNKNOWN":return null;default:P()}},Qt=({toolDefinition:n,targetProvider:a})=>{switch(a){case"AZURE_OPENAI":case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":return n;case"ANTHROPIC":return n0.parse(n);case"AWS":return Js.parse(n);case"GOOGLE":return n;default:P()}};function D6(n){return{type:"function",function:{name:`new_function_${n}`,description:"a description",parameters:{type:"object",properties:{new_arg:{type:"string"}},required:[]}}}}function _6(n){return{name:`new_function_${n}`,description:"a description",input_schema:{type:"object",properties:{new_arg:{type:"string"}},required:[]}}}function K6(n){return{toolSpec:{name:`new_function_${n}`,description:"a description",inputSchema:{json:{type:"object",properties:{new_arg:{type:"string"}},required:[]}}}}}const P6=n=>{const a=Ci.safeParse(n);return!a.success||a.data===null||!ge(a.data)?null:"function"in a.data&&ge(a.data.function)&&"name"in a.data.function&&typeof a.data.function.name=="string"?a.data.function.name:"name"in a.data&&typeof a.data.name=="string"?a.data.name:null},V6=n=>{const a=Ci.safeParse(n);return!a.success||a.data===null||!ge(a.data)?null:"function"in a.data&&ge(a.data.function)&&"description"in a.data.function&&typeof a.data.function.description=="string"?a.data.function.description:"description"in a.data&&typeof a.data.description=="string"?a.data.description:null};function t0({str:n,excludePrimitives:a=!1,excludeArray:t=!1,excludeNull:l=!1}){try{const i=JSON.parse(n);if(a&&typeof i!="object"||t&&Array.isArray(i)||l&&i===null)return!1}catch{return!1}return!0}function l0(n){return t0({str:n,excludeArray:!0,excludePrimitives:!0})}function sa(n){try{return{json:JSON.parse(n)}}catch(a){return{json:null,parseError:a}}}function O6(...n){try{return{json:JSON.stringify(...n)}}catch(a){return{json:null,stringifyError:a}}}function ki(n,a="",t="."){const l={};for(const[i,r]of Object.entries(n)){const o=a?`${a}${t}${i}`:i;r&&typeof r=="object"?Object.assign(l,ki(r,o,t)):l[o]=r}return l}function R6(n,a="."){try{const t=JSON.parse(n);return typeof t!="object"?{}:ki(t,"",a)}catch{}return{}}const On=k.object({id:k.string().describe("The ID of the tool call"),type:k.literal("function").describe("The type of the tool call").default("function"),function:k.object({name:k.string().describe("The name of the function"),arguments:k.record(k.unknown()).describe("The arguments for the function")}).describe("The function that is being called").passthrough()}),i0=k.array(On),N6=dn(i0,{removeAdditionalStrategy:"passthrough"}),ca=k.object({toolUse:k.object({toolUseId:k.string().describe("The ID of the tool call"),name:k.string().describe("The name of the tool"),input:k.record(k.unknown()).describe("The input for the tool")})}),r0=k.array(ca),$6=dn(r0,{removeAdditionalStrategy:"passthrough"}),o0=On.transform(n=>({toolUse:{toolUseId:n.id,name:n.function.name,input:n.function.arguments}})),s0=ca.transform(n=>({id:n.toolUse.toolUseId,type:"function",function:{name:n.toolUse.name,arguments:n.toolUse.input}})),da=k.object({id:k.string().describe("The ID of the tool call"),type:k.literal("tool_use"),name:k.string().describe("The name of the tool"),input:k.record(k.unknown()).describe("The input for the tool")}).passthrough(),c0=k.array(da),B6=dn(c0,{removeAdditionalStrategy:"passthrough"}),d0=da.transform(n=>({id:n.id,type:"function",function:{name:n.name,arguments:n.input}})),u0=On.transform(n=>({id:n.id,type:"tool_use",name:n.function.name,input:typeof n.function.arguments=="string"?{[n.function.arguments]:n.function.arguments}:n.function.arguments??{}})),g0=k.union([On,da,ca,Qn]);k.array(g0);const m0=n=>{const{success:a,data:t}=On.safeParse(n);if(a)return{provider:"OPENAI",validatedToolCall:t};const{success:l,data:i}=da.safeParse(n);if(l)return{provider:"ANTHROPIC",validatedToolCall:i};const{success:r,data:o}=ca.safeParse(n);return r?{provider:"AWS",validatedToolCall:o}:{provider:"UNKNOWN",validatedToolCall:null}},Ue=n=>{const{provider:a,validatedToolCall:t}=m0(n);switch(a){case"AZURE_OPENAI":case"OPENAI":return t;case"ANTHROPIC":return d0.parse(t);case"AWS":return s0.parse(t);case"UNKNOWN":return null;default:P()}},ja=({toolCall:n,targetProvider:a})=>{switch(a){case"AZURE_OPENAI":case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":return n;case"AWS":return o0.parse(n);case"ANTHROPIC":return u0.parse(n);case"GOOGLE":return n;default:P()}},H6=(n,a)=>{const t=Ue({id:n.toolCall.toolCallId,function:{name:n.toolCall.toolCall.name,arguments:sa(n.toolCall.toolCall.arguments).json||""}});return t?ja({toolCall:t,targetProvider:a}):null};function j6(){return{id:"",type:"function",function:{name:"",arguments:{}}}}function Z6(){return{id:"",type:"tool_use",name:"",input:{}}}const pt=k.object({id:k.string().optional(),name:k.string().optional(),arguments:k.record(k.unknown()).optional(),function:k.object({name:k.string().optional(),arguments:k.record(k.unknown()).optional()}).optional()});function U6(n){let a=n;typeof n=="string"&&(a=sa(n).json);const t=Ue(a);if(t)return t.id;const l=pt.safeParse(a);return l.success?l.data.id??l.data.name??null:null}function G6(n){var i;let a=n;typeof n=="string"&&(a=sa(n).json);const t=Ue(a);if(t)return t.function.name;const l=pt.safeParse(a);return l.success?((i=l.data.function)==null?void 0:i.name)??l.data.name??l.data.id??null:null}function Q6(n){var i;let a=n;typeof n=="string"&&(a=sa(n).json);const t=Ue(a);if(t)return t.function.arguments;const l=pt.safeParse(a);return l.success?l.data.arguments??((i=l.data.function)==null?void 0:i.arguments)??null:null}const ua=ps()(k.union([k.literal("auto"),k.literal("none"),k.literal("required"),k.object({type:k.literal("function"),function:k.object({name:k.string()})})]));k.discriminatedUnion("type",[k.object({type:k.literal("auto")}),k.object({type:k.literal("any")}),k.object({type:k.literal("tool"),name:k.string()}),k.object({type:k.literal("none")})]);const ht=k.discriminatedUnion("type",[k.object({type:k.literal("none")}),k.object({type:k.literal("auto"),disable_parallel_tool_use:k.boolean().optional()}),k.object({type:k.literal("any"),disable_parallel_tool_use:k.boolean().optional()}),k.object({type:k.literal("tool"),name:k.string(),disable_parallel_tool_use:k.boolean().optional()})]),p0=ht.transform(n=>{switch(n.type){case"any":return"required";case"auto":return"auto";case"tool":return n.name?{type:"function",function:{name:n.name}}:"auto";case"none":return"none";default:return"auto"}}),h0=ua.transform(n=>{if(ge(n))return{type:"tool",name:n.function.name};switch(n){case"none":return{type:"none"};case"auto":return{type:"auto"};case"required":return{type:"any"};default:P()}}),f0=ua.transform(n=>{if(ge(n))return{type:"tool",name:n.function.name};switch(n){case"none":return{type:"none"};case"auto":return{type:"auto"};case"required":return{type:"any"};default:P()}});k.union([ua,ht]);const b0=n=>{const{success:a,data:t}=ua.safeParse(n);if(a)return{provider:"OPENAI",toolChoice:t};const{success:l,data:i}=ht.safeParse(n);return l?{provider:"ANTHROPIC",toolChoice:i}:{provider:null,toolChoice:null}},y0=n=>{const{provider:a,toolChoice:t}=b0(n);if(a==null||t==null)throw new Error("Could not detect provider of tool choice");switch(a){case"AZURE_OPENAI":case"OPENAI":return t;case"ANTHROPIC":return p0.parse(t);default:P()}},v0=({toolChoice:n,targetProvider:a})=>{switch(a){case"AZURE_OPENAI":case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":return n;case"AWS":return h0.parse(n);case"ANTHROPIC":return f0.parse(n);case"GOOGLE":return n;default:P()}},C0=({toolChoice:n,targetProvider:a})=>{try{const t=y0(n);return v0({toolChoice:t,targetProvider:a})}catch{return null}},Wt=n=>n,qt=n=>n,Xt=n=>n,k0=n=>ge(n)?"function"in n&&ge(n.function)&&"name"in n.function&&typeof n.function.name=="string"?n.function.name:"name"in n&&typeof n.name=="string"?n.name:null:null,L0=({instanceTools:n,provider:a})=>n.map(t=>{switch(a){case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"AZURE_OPENAI":{const l=Aa(t.definition);return{...t,definition:l??t.definition}}case"ANTHROPIC":{const l=Aa(t.definition),i=l?Qt({toolDefinition:l,targetProvider:a}):t.definition;return{...t,definition:i}}case"AWS":{const l=Aa(t.definition),i=l?Qt({toolDefinition:l,targetProvider:a}):t.definition;return{...t,definition:i}}case"GOOGLE":return t;default:P()}}),w0=({toolCalls:n,provider:a})=>{if(n!=null)return n.map(t=>{switch(a){case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"AZURE_OPENAI":return Ue(t)??t;case"ANTHROPIC":{const l=Ue(t);return l!=null?ja({toolCall:l,targetProvider:a}):t}case"AWS":{const l=Ue(t);return l!=null?ja({toolCall:l,targetProvider:a}):t}case"GOOGLE":return t;default:P()}})};let S0=0,x0=0,T0=1,A0=0;const Li=()=>S0++,Wn=()=>T0++,W6=()=>A0++,I0=()=>x0++,wi=()=>({__type:"chat",messages:[{id:Wn(),role:"system",content:"You are a chatbot"},{id:Wn(),role:"user",content:"{{question}}"}]}),ft=n=>({template:{__type:"chat",messageIds:n.messages.map(a=>a.id)},messages:n.messages.reduce((a,t)=>(a[t.id]=t,a),{})}),M0={__type:"text_completion",prompt:"{{question}}"},z0=()=>({model:{provider:bi,modelName:$s,invocationParameters:[],supportedInvocationParameters:[]},tools:[],toolChoice:"auto",output:void 0,spanId:null,activeRunId:null});function F0(){const n=wi(),a=ft(n);return{instance:{id:Li(),template:a.template,...z0()},instanceMessages:a.messages}}function q6(){return{type:"json_schema",json_schema:{name:"response",schema:{type:"object",properties:{},required:[],additionalProperties:!1},strict:!0}}}function E0(n){if(n.instances!=null&&n.instances.length>0){let o={};return{instances:n.instances.map(d=>{if(d.template.__type==="chat"){const u=ft(d.template);return o={...o,...u.messages},{...d,template:u.template}}return d}),instanceMessages:o}}const{instance:a,instanceMessages:t}=F0(),l=Object.values(n.modelConfigByProvider);if(!(l.length>0))return{instances:[a],instanceMessages:t};const r=l.find(o=>o.provider===bi)??l[0];return a.model={...a.model,...r},{instances:[a],instanceMessages:t}}const X6=n=>{const{instances:a,instanceMessages:t}=E0(n);return cn(Fn((i,r)=>({streaming:!0,operationType:"chat",inputMode:"manual",dirtyInstances:{},input:{variablesValueCache:{}},templateFormat:Ke.Mustache,...n,instances:a,allInstanceMessages:t,setInput:o=>{i({input:o})},setOperationType:o=>{if(o==="chat"){const c=[];let d={};r().instances.forEach(u=>{const g=wi(),h=ft(g);d={...d,...h.messages},c.push({...u,template:h.template})}),i({instances:c,allInstanceMessages:d})}else i({instances:r().instances.map(c=>({...c,template:M0}))});i({operationType:o})},addInstance:()=>{const o=r().instances,c=r().allInstanceMessages,d=r().instances[0];if(!d)return;let u=[],g={};if(d.template.__type==="chat"){const f=d.template.messageIds.map(b=>c[b]).map(b=>({...b,id:Wn()}));u=f.map(b=>b.id),g=f.reduce((b,y)=>(b[y.id]=y,b),{})}i({allInstanceMessages:{...c,...g},instances:[...o,{...d,...d.template.__type==="chat"?{template:{...d.template,messageIds:u}}:{},id:Li(),activeRunId:null,experimentId:null,spanId:null}]})},updateModelSupportedInvocationParameters:({instanceId:o,supportedInvocationParameters:c,modelConfigByProvider:d})=>{const u=r().instances;i({instances:u.map(g=>{if(g.id===o){const{baseUrl:h,endpoint:f,apiVersion:b,region:y}=d[g.model.provider]??{},C=w1(g.model.invocationParameters,c),L=S1(C,c);return{...g,model:{...g.model,baseUrl:g.model.baseUrl??h,endpoint:g.model.endpoint??f,apiVersion:g.model.apiVersion??b,region:g.model.region??y,supportedInvocationParameters:c,invocationParameters:L},tools:c.find(w=>w.canonicalName===x1)?g.tools:[]}}return g})})},updateProvider:({instanceId:o,provider:c,modelConfigByProvider:d})=>{const u=r().instances,g=u.find(L=>L.id===o);if(!g||g.model.provider===c)return;const h=d[c],f=g.model.invocationParameters.find(L=>L.canonicalName===k1||L.invocationName===L1),b=L=>L==="OLLAMA"?"http://localhost:11434/v1":null,y={model:h?{...g.model,...h,invocationParameters:[...h.invocationParameters,...f?[f]:[]],provider:c}:{...g.model,modelName:null,baseUrl:b(c),apiVersion:null,endpoint:null,region:null,provider:c},toolChoice:C0({toolChoice:g.toolChoice,targetProvider:c})??void 0,tools:L0({instanceTools:g.tools,provider:c})},C={};g.template.__type==="chat"&&g.template.messageIds.forEach(L=>{const w=r().allInstanceMessages[L];w&&(C[L]={...w,toolCalls:w0({toolCalls:w.toolCalls,provider:c})})}),i({allInstanceMessages:{...r().allInstanceMessages,...C},dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:u.map(L=>L.id===o?{...L,...y}:L)})},updateModel:({instanceId:o,patch:c})=>{const d=r().instances;d.find(g=>g.id===o)&&i({dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:d.map(g=>g.id===o?{...g,model:{...g.model,...c}}:g)})},deleteInstance:o=>{const c=r().instances;i({instances:c.filter(d=>d.id!==o),dirtyInstances:{...r().dirtyInstances,[o]:!1}})},addMessage:({playgroundInstanceId:o,messages:c})=>{const d=r().instances;let u=[];Array.isArray(c)?u=c:c?u=[c]:u=[{id:Wn(),role:Bs,content:""}],i({allInstanceMessages:{...r().allInstanceMessages,...u.reduce((g,h)=>(g[h.id]=h,g),{})},dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:d.map(g=>g.id===o&&(g!=null&&g.template)&&(g==null?void 0:g.template.__type)==="chat"?{...g,template:{...g.template,messageIds:[...g.template.messageIds,...u.map(h=>h.id)]}}:g)})},updateMessage:({messageId:o,patch:c,instanceId:d})=>{const u=r().allInstanceMessages;i({allInstanceMessages:{...u,[o]:{...u[o],...c}},dirtyInstances:{...r().dirtyInstances,[d]:!0}})},deleteMessage:({instanceId:o,messageId:c})=>{const d=r().instances,u=r().allInstanceMessages;i({allInstanceMessages:Object.fromEntries(Object.entries(u).filter(([,{id:g}])=>g!==c)),dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:d.map(g=>g.id===o&&(g!=null&&g.template)&&(g==null?void 0:g.template.__type)==="chat"?{...g,template:{...g.template,messageIds:g.template.messageIds.filter(h=>h!==c)}}:g)})},updateInstance:({instanceId:o,patch:c,dirty:d})=>{const u=r().instances;i({dirtyInstances:{...r().dirtyInstances,...d!=null?{[o]:d}:{}},instances:u.map(g=>g.id===o?{...g,...c}:g)})},runPlaygroundInstances:()=>{const o=r().instances;i({instances:o.map(c=>({...c,activeRunId:I0(),spanId:null}))})},cancelPlaygroundInstances:()=>{const o=r().instances;i({instances:o.map(c=>({...c,activeRunId:null,spanId:null}))})},markPlaygroundInstanceComplete:o=>{const c=r().instances;i({instances:c.map(d=>d.id===o?{...d,activeRunId:null}:d)})},setTemplateFormat:o=>{i({templateFormat:o})},setVariableValue:(o,c)=>{const d=r().input;i({input:{...d,variablesValueCache:{...d.variablesValueCache,[o]:c}}})},setStreaming:o=>{i({streaming:o})},updateInstanceModelInvocationParameters:({instanceId:o,invocationParameters:c})=>{r().instances.find(u=>u.id===o)&&i({dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(u=>u.id===o?{...u,model:{...u.model,invocationParameters:c}}:u)})},upsertInvocationParameterInput:({instanceId:o,invocationParameterInput:c})=>{const d=r().instances.find(g=>g.id===o);if(!d)return;const u=d.model.invocationParameters.find(g=>Rt(g,c));i(u?{dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(g=>g.id===o?{...g,model:{...g.model,invocationParameters:g.model.invocationParameters.map(h=>Rt(h,c)?c:h)}}:g)}:{dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(g=>g.id===o?{...g,model:{...g.model,invocationParameters:[...g.model.invocationParameters,c]}}:g)})},deleteInvocationParameterInput:({instanceId:o,invocationParameterInputInvocationName:c})=>{r().instances.find(u=>u.id===o)&&i({dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(u=>u.id===o?{...u,model:{...u.model,invocationParameters:u.model.invocationParameters.filter(g=>g.invocationName!==c)}}:u)})},setDirty:(o,c)=>{i({dirtyInstances:{...r().dirtyInstances,[o]:c}})}})))};function D0(n){return n==="OPENAI"||n==="AZURE_OPENAI"||n==="ANTHROPIC"||n==="GOOGLE"||n==="DEEPSEEK"||n==="XAI"||n==="OLLAMA"||n==="AWS"}function Y6(n){switch(n){case"OPENAI":return"OpenAI";case"AZURE_OPENAI":return"Azure OpenAI";case"ANTHROPIC":return"Anthropic";case"GOOGLE":return"Google";case"DEEPSEEK":return"DeepSeek";case"XAI":return"XAI";case"OLLAMA":return"Ollama";case"AWS":return"AWS";default:P()}}function J6(n){switch(n){case"OPENAI":return fn.OPENAI.toString();case"AZURE_OPENAI":return fn.AZURE.toString();case"ANTHROPIC":return fn.ANTHROPIC.toString();case"GOOGLE":return fn.GOOGLE.toString();case"AWS":return fn.AWS.toString();case"DEEPSEEK":return"deepseek";case"XAI":return"xai";case"OLLAMA":throw new Error("Ollama is not supported");default:P()}}function _0(n){return typeof n=="object"&&n!==null&&Object.keys(n).length>0&&Object.keys(n).every(a=>a in Ha)&&Object.values(n).every(a=>typeof a=="string")}function K0(n){const a={};for(const t of Object.keys(n))D0(t)&&Ha[t].length===1&&(a[t]={[Ha[t][0].envVarName]:n[t]});return a}const e7=n=>{const a=t=>({setCredential:({provider:l,envVarName:i,value:r})=>{t(o=>({[l]:{...o[l],[i]:r}}))},...n});return cn()(na(Fn(a),{version:1,name:"arize-phoenix-credentials",migrate:t=>{if(_0(t))return K0(t)}}))};function ga(n){return e("div",{onClick:a=>a.stopPropagation(),css:m`
|
|
178
|
+
`}}}();oi.hash="d85505e5f9dffd2a1c791f8e0007ab61";const si={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:oi}},name:"ViewerContext_viewer",selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"viewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isManagementUser",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},{alias:null,args:null,kind:"ScalarField",name:"authMethod",storageKey:null},{args:null,kind:"FragmentSpread",name:"APIKeysTableFragment"}],storageKey:null}],type:"Query",abstractKey:null};si.hash="d85505e5f9dffd2a1c791f8e0007ab61";const ci=Xe.createContext({viewer:null,refetchViewer:()=>{}});function mn(){const n=Xe.useContext(ci);if(n==null)throw new Error("useViewer must be used within a ViewerProvider");return n}function Cs(){var a;const{viewer:n}=mn();return!(n&&((a=n==null?void 0:n.role)==null?void 0:a.name)!=="ADMIN")}function b6({query:n,children:a}){const[t,l]=E.useRefetchableFragment(si,n),i=()=>{p.startTransition(()=>{l({},{fetchPolicy:"network-only"})})};return e(ci.Provider,{value:{viewer:t.viewer,refetchViewer:i},children:a})}function ks(n){return n.endsWith("/")?n.slice(0,-1):n}const Ls=ks(window.Config.basename),Kn=`${window.location.protocol}//${window.location.host}${Ls}`,y6=window.Config.platformVersion,xn="returnUrl";function Ht(n,a){const t=new URL(n,window.location.origin);return a.forEach((l,i)=>{t.searchParams.append(i,l)}),t.pathname+t.search}function di(){const n=window.Config.basename,a=n==null||n===""||n==="/",t=n!=null&&n.startsWith("/")&&!n.endsWith("/");if(!(a||t))throw new Error(`Invalid basename: ${n}`);const l=window.location.pathname,i=window.location.origin,r=new URLSearchParams(window.location.search);if(a){const o=new URL("/login",i);return o.searchParams.set(xn,Ht(l,r)),o.pathname+o.search}if(l.startsWith(n)){const o=l.slice(n.length);if(o===""||o.startsWith("/")){const d=new URL(n+"/login",i);return d.searchParams.set(xn,Ht(o,r)),d.pathname+d.search}}return n+"/login"}function v6(n){const a=window.Config.basename,t=a==null||a===""||a==="/",l=a!=null&&a.startsWith("/")&&!a.endsWith("/");if(!(t||l))throw new Error(`Invalid basename: ${a}`);return t?n:a+n}const C6=({path:n,searchParams:a})=>{const l=new URL(window.location.href).searchParams.get(xn),i=new URLSearchParams(a||{});l&&i.set(xn,l);const r=i.toString();return`${n}${r?`?${r}`:""}`},ws=n=>!(typeof n!="string"||!n.startsWith("/")||n.replace(/\\/g,"/").startsWith("//")),Ss=n=>ws(n)?n:"/",k6=()=>{const n=new URL(window.location.href);return Ss(n.searchParams.get(xn))},xs=Kn+"/auth/refresh";class jt extends Error{constructor(){super("Unauthorized")}}async function Ts(n,a){try{return await fetch(n,a).then(t=>{if(t.status===401)throw new jt;return t})}catch(t){if(t instanceof jt){const l=await As();return Ya(l.ok,`Failed to authenticate. Please visit ${di()} to login.`),fetch(n,a)}if(t instanceof Error&&t.name==="AbortError")throw t}throw new Error("An unexpected error occurred while fetching data")}let bn=null;async function As(){return bn||(bn=fetch(xs,{method:"POST"}).then(n=>n.ok?(bn=null,Promise.resolve(n)):(window.location.href=di(),new Promise(()=>{}))),bn)}const ui=Kn+"/graphql",Is=window.Config.authenticationEnabled,gi=Is?Ts:fetch;function Ms(n,a,t){return Ln.Observable.create(l=>{const i=new AbortController;return gi(n,{...a,signal:i.signal}).then(r=>(Ya(r instanceof Response),r.json())).then(r=>{const o=t==null?void 0:t(r);if(o)throw o;l.next(r),l.complete()}).catch(r=>{r.name==="AbortError"?l.complete():l.error(r)}),()=>{i.abort()}})}const zs=(n,a,t)=>Ms(ui,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n.text,variables:a})},l=>{if(!(!me(l)||!("errors"in l))&&Array.isArray(l.errors))return new Error(`Error fetching GraphQL query '${n.name}' with variables '${JSON.stringify(a)}': ${JSON.stringify(l.errors)}`)}),Fs=to(ui,{fetch:gi}),Pn=new Ln.Environment({network:Ln.Network.create(zs,Fs),store:new Ln.Store(new Ln.RecordSource,{gcReleaseBufferSize:20})});function mi(n){return n.includes("PRIMARY")?ve.primary:n.includes("CORPUS")?ve.corpus:ve.reference}function ct(n){const a=[],t=[],l=[];return n.forEach(i=>{const r=mi(i);r==ve.primary?a.push(i):r==ve.corpus?l.push(i):t.push(i)}),{primaryEventIds:a,referenceEventIds:t,corpusEventIds:l}}const Gn=10,wn="unknown",pi=io,hi=lo,Es=n=>hi[n],Ds=n=>pi(n/Gn);var sn=(n=>(n.move="move",n.select="select",n))(sn||{}),dt=(n=>(n.default="default",n.highlight="highlight",n))(dt||{});const an=()=>ti()==="light"?us:ds;function L6(){const n=an();return{coloringStrategy:$.inferences,pointGroupVisibility:{[j.primary]:!0,[j.reference]:!0},pointGroupColors:{[j.primary]:n[0],[j.reference]:n[1],[j.corpus]:_e},metric:{type:"drift",metric:"euclideanDistance"}}}function w6(){const n=an();return{coloringStrategy:$.inferences,pointGroupVisibility:{[j.primary]:!0,[j.corpus]:!0},pointGroupColors:{[j.primary]:n[0],[j.corpus]:_e},metric:{type:"retrieval",metric:"queryDistance"},clusterSort:{dir:"desc",column:"primaryMetricValue"}}}function S6(){return{coloringStrategy:$.correctness,pointGroupVisibility:{[le.correct]:!0,[le.incorrect]:!0,[le.unknown]:!0},pointGroupColors:{[le.correct]:Un.Discrete2.LightBlueOrange[0],[le.incorrect]:Un.Discrete2.LightBlueOrange[1],[le.unknown]:nn},metric:{type:"performance",metric:"accuracyScore"},clusterSort:{dir:"asc",column:"primaryMetricValue"}}}const _s=n=>{const a={loading:!1,errorMessage:null,points:[],eventIdToDataMap:new Map,clusters:[],clusterSort:{dir:"desc",column:"driftRatio"},pointData:null,selectedEventIds:new Set,hoveredEventId:null,highlightedClusterId:null,selectedClusterId:null,canvasMode:"move",pointSizeScale:1,clusterColorMode:"default",coloringStrategy:$.inferences,inferencesVisibility:{primary:!0,reference:!0,corpus:!0},pointGroupVisibility:{[j.primary]:!0,[j.reference]:!0,[j.corpus]:!0},pointGroupColors:{[j.primary]:an()[0],[j.reference]:an()[1],[j.corpus]:_e},eventIdToGroup:{},selectionDisplay:on.gallery,selectionGridSize:tn.large,dimension:null,dimensionMetadata:null,umapParameters:{minDist:ls,nNeighbors:ts,nSamples:is},hdbscanParameters:{minClusterSize:rs,clusterMinSamples:ss,clusterSelectionEpsilon:cs},clustersLoading:!1,metric:{type:"drift",metric:"euclideanDistance"},selectionSearchText:""},t=(l,i)=>({...a,...n,setInitialData:async({points:r,clusters:o,retrievals:c})=>{const d=i(),u=new Map,g=c.reduce((b,y)=>{const{queryId:C}=y;return b[C]?b[C].push(y):b[C]=[y],b},{});r.forEach(b=>{b={...b,retrievals:g[b.eventId]??[]},u.set(b.eventId,b)});const h=o.map(Ut).sort(Ta(d.clusterSort));l({loading:!1,points:r,eventIdToDataMap:u,clusters:h,clustersLoading:!1,selectedEventIds:new Set,selectedClusterId:null,pointData:null,eventIdToGroup:Be({points:r,coloringStrategy:d.coloringStrategy,pointsData:d.pointData??{},dimension:d.dimension||null,dimensionMetadata:d.dimensionMetadata})});const f=await Vs(r.map(b=>b.eventId)).catch(()=>l({errorMessage:"Failed to load the point events"}));f&&l({pointData:f,clusters:h,clustersLoading:!1,eventIdToGroup:Be({points:r,coloringStrategy:d.coloringStrategy,pointsData:f??{},dimension:d.dimension||null,dimensionMetadata:d.dimensionMetadata})})},setClusters:r=>{const o=i(),c=r.map(Ut).sort(Ta(o.clusterSort));l({clusters:c,clustersLoading:!1,selectedClusterId:null,highlightedClusterId:null})},setClusterSort:r=>{const c=[...i().clusters].sort(Ta(r));l({clusterSort:r,clusters:c})},setSelectedEventIds:r=>l({selectedEventIds:r,selectionSearchText:""}),setHoveredEventId:r=>l({hoveredEventId:r}),setHighlightedClusterId:r=>l({highlightedClusterId:r}),setSelectedClusterId:r=>l({selectedClusterId:r,highlightedClusterId:null}),setPointSizeScale:r=>l({pointSizeScale:r}),setCanvasMode:r=>l({canvasMode:r}),setClusterColorMode:r=>l({clusterColorMode:r}),setColoringStrategy:r=>{const o=i();switch(l({coloringStrategy:r}),r){case $.correctness:l({pointGroupVisibility:{[le.correct]:!0,[le.incorrect]:!0,[le.unknown]:!0},pointGroupColors:{[le.correct]:Un.Discrete2.LightBlueOrange[0],[le.incorrect]:Un.Discrete2.LightBlueOrange[1],[le.unknown]:nn},dimension:null,dimensionMetadata:null,eventIdToGroup:Be({points:o.points,coloringStrategy:r,pointsData:o.pointData??{},dimension:o.dimension||null,dimensionMetadata:o.dimensionMetadata})});break;case $.inferences:{l({pointGroupVisibility:{[j.primary]:!0,[j.reference]:!0,[j.corpus]:!0},pointGroupColors:{[j.primary]:an()[0],[j.reference]:an()[1],[j.corpus]:_e},dimension:null,dimensionMetadata:null,eventIdToGroup:Be({points:o.points,coloringStrategy:r,pointsData:o.pointData??{},dimension:o.dimension||null,dimensionMetadata:o.dimensionMetadata})});break}case $.dimension:{l({pointGroupVisibility:{unknown:!0},pointGroupColors:{unknown:nn},dimension:null,dimensionMetadata:null,eventIdToGroup:Be({points:o.points,coloringStrategy:r,pointsData:o.pointData??{},dimension:o.dimension||null,dimensionMetadata:o.dimensionMetadata})});break}default:P()}},inferencesVisibility:{primary:!0,reference:!0,corpus:!0},setInferencesVisibility:r=>l({inferencesVisibility:r}),setPointGroupVisibility:r=>l({pointGroupVisibility:r}),selectionDisplay:on.gallery,setSelectionDisplay:r=>l({selectionDisplay:r}),setSelectionGridSize:r=>l({selectionGridSize:r}),reset:()=>{l({points:[],clusters:[],selectedEventIds:new Set,selectedClusterId:null,eventIdToGroup:{}})},setDimension:async r=>{const o=i();l({dimension:r,dimensionMetadata:null});const c=await Ps(r).catch(()=>l({errorMessage:"Failed to load the dimension metadata"}));if(c){if(l({dimensionMetadata:c}),c.categories&&c.categories.length){const d=c.categories.length,g=d<=hi.length?Es:h=>pi(h/d);l({pointGroupVisibility:{...c.categories.reduce((h,f)=>({...h,[f]:!0}),{}),unknown:!0},pointGroupColors:{...c.categories.reduce((h,f,b)=>({...h,[f]:g(b)}),{}),unknown:nn},eventIdToGroup:Be({points:o.points,coloringStrategy:o.coloringStrategy,pointsData:o.pointData??{},dimension:r,dimensionMetadata:c})})}else if(c.interval!==null){const d=fi(c.interval);l({pointGroupVisibility:{...d.reduce((u,g)=>({...u,[g.name]:!0}),{}),unknown:!0},pointGroupColors:{...d.reduce((u,g,h)=>({...u,[g.name]:Ds(h)}),{}),unknown:nn},eventIdToGroup:Be({points:o.points,coloringStrategy:o.coloringStrategy,pointsData:o.pointData??{},dimension:r,dimensionMetadata:c})})}}},setDimensionMetadata:r=>l({dimensionMetadata:r}),setUMAPParameters:r=>l({umapParameters:r}),setHDBSCANParameters:async r=>{const o=i();l({hdbscanParameters:r,clustersLoading:!0});const c=await Os({metric:o.metric,points:o.points,hdbscanParameters:r});o.setClusters(c)},getHDSCANParameters:()=>i().hdbscanParameters,getMetric:()=>i().metric,setErrorMessage:r=>l({errorMessage:r}),setLoading:r=>l({loading:r}),setMetric:async r=>{const o=i();l({metric:r,clustersLoading:!0});const c=await Rs({metric:r,clusters:o.clusters,hdbscanParameters:o.hdbscanParameters});o.setClusters(c)},setSelectionSearchText:r=>l({selectionSearchText:r})});return cn()(Fn(t))},Zt=new Intl.NumberFormat([],{maximumFractionDigits:2});function Ks({min:n,max:a}){return`${Zt.format(n)} - ${Zt.format(a)}`}function fi({min:n,max:a}){const l=(a-n)/Gn,i=[];for(let r=0;r<Gn;r++){const o=n+r*l,c=n+(r+1)*l;i.push({min:o,max:c,name:Ks({min:o,max:c})})}return i}function xa({numericGroupIntervals:n,numericValue:a}){let t=wn,l=n.findIndex(i=>a>=i.min&&a<i.max);return l=l===-1?Gn-1:l,t=n[l].name,t}function Be(n){const{points:a,coloringStrategy:t,pointsData:l,dimension:i,dimensionMetadata:r}=n,o={},c=a.map(d=>d.eventId);switch(t){case $.inferences:{const{primaryEventIds:d,referenceEventIds:u,corpusEventIds:g}=ct(c);d.forEach(h=>{o[h]=j.primary}),u.forEach(h=>{o[h]=j.reference}),g.forEach(h=>{o[h]=j.corpus});break}case $.correctness:{a.forEach(d=>{let u=le.unknown;const{predictionLabel:g,actualLabel:h}=d.eventMetadata;g!==null&&h!==null&&(u=g===h?le.correct:le.incorrect),o[d.eventId]=u});break}case $.dimension:{let d;r&&(r==null?void 0:r.interval)!==null&&(d=fi(r.interval));const u=(i==null?void 0:i.type)==="prediction"&&(i==null?void 0:i.dataType)==="categorical",g=(i==null?void 0:i.type)==="prediction"&&(i==null?void 0:i.dataType)==="numeric",h=(i==null?void 0:i.type)==="actual"&&(i==null?void 0:i.dataType)==="categorical",f=(i==null?void 0:i.type)==="actual"&&(i==null?void 0:i.dataType)==="numeric";a.forEach(b=>{let y=wn;const C=l[b.eventId];if(i!=null&&C!=null)if(u)y=C.eventMetadata.predictionLabel??wn;else if(g){if(d==null)throw new Error("Cannot color by prediction score without numeric group intervals");const w=C.eventMetadata.predictionScore;typeof w=="number"&&(y=xa({numericGroupIntervals:d,numericValue:w}))}else if(f){if(d==null)throw new Error("Cannot color by actual score without numeric group intervals");const w=C.eventMetadata.actualScore;typeof w=="number"&&(y=xa({numericGroupIntervals:d,numericValue:w}))}else if(h)y=C.eventMetadata.actualLabel??wn;else{const w=C.dimensions.find(D=>D.dimension.name===i.name);if(w!=null&&i.dataType==="categorical")y=w.value??wn;else if(w!=null&&i.dataType==="numeric"&&d!=null){const D=typeof(w==null?void 0:w.value)=="string"?parseFloat(w.value):null;typeof D=="number"&&(y=xa({numericGroupIntervals:d,numericValue:D}))}}o[b.eventId]=y});break}default:P()}return o}async function Ps(n){const a=await E.fetchQuery(Pn,Xl,{id:n.id,getDimensionMinMax:n.dataType==="numeric",getDimensionCategories:n.dataType==="categorical"}).toPromise(),t=a==null?void 0:a.dimension;if(!n)throw new Error("Dimension not found");let l=null;return typeof(t==null?void 0:t.min)=="number"&&typeof(t==null?void 0:t.max)=="number"&&(l={min:t.min,max:t.max}),{interval:l,categories:(t==null?void 0:t.categories)??null}}async function Vs(n){var u,g,h,f,b,y;const{primaryEventIds:a,referenceEventIds:t,corpusEventIds:l}=ct([...n]),i=await E.fetchQuery(Pn,ql,{primaryEventIds:a,referenceEventIds:t,corpusEventIds:l}).toPromise(),r=((g=(u=i==null?void 0:i.model)==null?void 0:u.primaryInferences)==null?void 0:g.events)??[],o=((f=(h=i==null?void 0:i.model)==null?void 0:h.referenceInferences)==null?void 0:f.events)??[],c=((y=(b=i==null?void 0:i.model)==null?void 0:b.corpusInferences)==null?void 0:y.events)??[];return[...r,...o,...c].reduce((C,L)=>(C[L.id]=L,C),{})}async function Os({metric:n,points:a,hdbscanParameters:t}){const l=await E.fetchQuery(Pn,Wl,{eventIds:a.map(i=>i.eventId),coordinates:a.map(i=>({x:i.position[0],y:i.position[1],z:i.position[2]})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...t},{fetchPolicy:"network-only"}).toPromise();return(l==null?void 0:l.hdbscanClustering)??[]}async function Rs({metric:n,clusters:a,hdbscanParameters:t}){const l=await E.fetchQuery(Pn,Ql,{clusters:a.map(i=>({id:i.id,eventIds:i.eventIds})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...t},{fetchPolicy:"network-only"}).toPromise();return(l==null?void 0:l.clusters)??[]}const Ta=n=>(a,t)=>{const{dir:l,column:i}=n,r=l==="asc",o=a[i],c=t[i];return o==null?1:c==null?-1:o>c?r?1:-1:o<c?r?-1:1:0};function Ut(n){let a=n.driftRatio,t=null;return n.dataQualityMetric?(a=n.dataQualityMetric.primaryValue,t=n.dataQualityMetric.referenceValue):n.performanceMetric?(a=n.performanceMetric.primaryValue,t=n.performanceMetric.referenceValue):n.primaryToCorpusRatio!=null&&(a=(n.primaryToCorpusRatio+1)/2*100),{...n,size:n.eventIds.length,primaryMetricValue:a,referenceMetricValue:t}}const Ns=({projectId:n,tableId:a})=>`arize-phoenix-tracing-${n}-${a}`,x6=n=>{const a=t=>({...n,columnVisibility:{metadata:!1},columnSizing:{metadata:200},annotationColumnVisibility:{},setColumnVisibility:l=>{t({columnVisibility:l})},setAnnotationColumnVisibility:l=>{t({annotationColumnVisibility:l})},setColumnSizing:l=>{t(typeof l=="function"?i=>({columnSizing:l(i.columnSizing)}):{columnSizing:l})}});return cn()(na(Fn(a),{name:Ns(n)}))},Ke={NONE:"NONE",FString:"F_STRING",Mustache:"MUSTACHE"},T6={OPENAI:"OpenAI",AZURE_OPENAI:"Azure OpenAI",ANTHROPIC:"Anthropic",GOOGLE:"Google",DEEPSEEK:"DeepSeek",XAI:"xAI",OLLAMA:"Ollama",AWS:"AWS Bedrock"},bi="OPENAI",$s="gpt-4o",Bs="user",A6=["2024-10-01-preview","2024-09-01-preview","2024-08-01-preview","2024-07-01-preview","2024-06-01","2024-05-01-preview","2024-04-01-preview","2024-03-01-preview","2024-02-15-preview","2024-02-01","2023-10-01-preview","2023-09-01-preview","2023-08-01-preview","2023-07-01-preview","2023-06-01-preview","2023-05-15","2023-03-15-preview"],I6={user:["user","human"],ai:["assistant","bot","ai","model"],system:["system","developer"],tool:["tool"]},Ha={OPENAI:[{envVarName:"OPENAI_API_KEY",isRequired:!0}],AZURE_OPENAI:[{envVarName:"AZURE_OPENAI_API_KEY",isRequired:!0}],ANTHROPIC:[{envVarName:"ANTHROPIC_API_KEY",isRequired:!0}],GOOGLE:[{envVarName:"GEMINI_API_KEY",isRequired:!0}],DEEPSEEK:[{envVarName:"DEEPSEEK_API_KEY",isRequired:!0}],XAI:[{envVarName:"XAI_API_KEY",isRequired:!0}],OLLAMA:[],AWS:[{envVarName:"AWS_ACCESS_KEY_ID",isRequired:!0},{envVarName:"AWS_SECRET_ACCESS_KEY",isRequired:!0},{envVarName:"AWS_SESSION_TOKEN",isRequired:!1}]},yi=({parser:n,text:a})=>{const t=n.parse(a),l=[],i=t.cursor();do if(i.name==="Variable"){const r=a.slice(i.node.from,i.node.to).trim();l.push(r)}while(i.next());return l},vi=({parser:n,text:a,variables:t,postFormat:l})=>{if(!a)return"";let i=a,r=n.parse(i),o=r.cursor();do if(o.name==="Variable"){const c=i.slice(o.node.from,o.node.to).trim(),d=o.node.parent;c in t&&(i=`${i.slice(0,d.from)}${t[c]}${i.slice(d.to)}`,r=n.parse(i),o=r.cursor())}while(o.next());return l&&(i=l(i)),i},Hs=kl.deserialize({version:14,states:"!WQQOPOOOcOQO'#C^OOOO'#Cb'#CbQQOPOOOOOO'#Cc'#CcOhOQO,58xOOOO-E6`-E6`OOOO-E6a-E6aOOOO1G.d1G.d",stateData:"v~ORPOXQOYQOZQO[QO~OSSO~OSSOTWO~OZRX[X~",goto:"iWPPXPPP]cTQORQRORURQTPRVT",nodeNames:"⚠ FStringTemplate Template LBrace Variable RBrace",maxTerm:12,skippedNodes:[0],repeatNodeCount:2,tokenData:"%[~RaXY!WYZ!W]^!Wpq!Wqr!Wrs!]sw!Wwx!bx#O!W#O#P!i#P#o!W#o#p$c#p#q!W#q#r$|#r;'S!W;'S;=`%U<%lO!W~!]OX~~!bO[~~!iOX~[~~!lYrs!W!P!Q!W#O#P!W#U#V!W#Y#Z!W#b#c!W#f#g!W#h#i!W#i#j#[#o#p$^~#_R!Q![#h!c!i#h#T#Z#h~#kR!Q![#t!c!i#t#T#Z#t~#wR!Q![$Q!c!i$Q#T#Z$Q~$TR!Q![!W!c!i!W#T#Z!W~$cOZ~~$jQR~X~#o#p$p#q#r$w~$wOZ~[~~$|OY~~%RPX~#q#r!]~%XP;=`<%l!W",tokenizers:[1,new Ll("!p~RVO#Oh#O#P!P#P#qh#q#r!j#r;'Sh;'S;=`y<%lOh~mSS~O#qh#r;'Sh;'S;=`y<%lOh~|P;=`<%lh~!UTS~O#qh#q#r!e#r;'Sh;'S;=`y<%lOh~!jOS~~!oOT~~",77)],topRules:{FStringTemplate:[0,1]},tokenPrec:32}),ut=Bl.define({parser:Hs.configure({props:[wl({"Template/LBrace":De.quote,"Template/RBrace":De.quote,"Template/Variable":De.variableName,"⚠":De.invalid})]}),languageData:{}}),js=({text:n,variables:a})=>vi({parser:ut.parser,text:n,variables:a,postFormat:t=>t.replaceAll("\\{","{").replaceAll("{{","{").replaceAll("}}","}")}),Zs=n=>yi({parser:ut.parser,text:n});function Us(){return new Hl(ut)}const Gs=kl.deserialize({version:14,states:"!WQQOPOOOcOQO'#C^OOOO'#Cb'#CbQQOPOOOOOO'#Cc'#CcOhOQO,58xOOOO-E6`-E6`OOOO-E6a-E6aOOOO1G.d1G.d",stateData:"v~ORPOXQOYQOZQO[QO~OSSO~OSSOTWO~OZRX[X~",goto:"iWPPXPPP]cTQORQRORURQTPRVT",nodeNames:"⚠ MustacheLikeTemplate Template LBrace Variable RBrace",maxTerm:12,skippedNodes:[0],repeatNodeCount:2,tokenData:"%W~RaXY!WYZ!W]^!Wpq!Wqr!Wrs!]sw!Wwx!bx#O!W#O#P!i#P#o!W#o#p$c#p#q!W#q#r!b#r;'S!W;'S;=`%Q<%lO!W~!]OX~~!bO[~~!iOX~[~~!lYrs!W!P!Q!W#O#P!W#U#V!W#Y#Z!W#b#c!W#f#g!W#h#i!W#i#j#[#o#p$^~#_R!Q![#h!c!i#h#T#Z#h~#kR!Q![#t!c!i#t#T#Z#t~#wR!Q![$Q!c!i$Q#T#Z$Q~$TR!Q![!W!c!i!W#T#Z!W~$cOZ~~$jPX~[~#o#p$m~$rPR~#q#r$u~$xP#q#r${~%QOY~~%TP;=`<%l!W",tokenizers:[1,new Ll("#e~RVO#oh#o#p!P#p#qh#q#r#X#r;'Sh;'S;=`y<%lOh~mSS~O#qh#r;'Sh;'S;=`y<%lOh~|P;=`<%lh~!USS~O#q!b#r;'S!b;'S;=`#R<%lO!b~!gVS~O#O!b#O#P!b#P#q!b#q#r!|#r;'S!b;'S;=`#R<%lO!b~#ROS~~#UP;=`<%l!b~#[P#q#r#_~#dOT~~",112)],topRules:{MustacheLikeTemplate:[0,1]},tokenPrec:32}),gt=Bl.define({parser:Gs.configure({props:[wl({"Template/LBrace":De.quote,"Template/RBrace":De.quote,"Template/Variable":De.variableName,"Template/⚠":De.invalid})]}),languageData:{}}),Qs=({text:n,variables:a})=>vi({parser:gt.parser,text:n,variables:a,postFormat:t=>t.replaceAll("\\{{","{{")}),Ws=n=>yi({parser:gt.parser,text:n});function qs(){return new Hl(gt)}const M6=n=>{switch(n){case Ke.FString:return{format:js,extractVariables:Zs};case Ke.Mustache:return{format:Qs,extractVariables:Ws};case Ke.NONE:return{format:({text:a})=>a,extractVariables:()=>[]};default:P()}},Xs=k.union([k.string(),k.number(),k.boolean(),k.null()]),Qn=k.lazy(()=>k.union([Xs,k.array(Qn),k.record(Qn)])),Gt=k.object({type:k.enum(["string","number","boolean","object","array","null","integer"]).describe("The type of the parameter"),description:k.string().optional().describe("A description of the parameter"),enum:k.array(k.string()).optional().describe("The allowed values")}).passthrough().describe("A map of parameter names to their definitions"),mt=k.object({type:k.literal("object"),properties:k.record(k.union([Gt,k.object({anyOf:k.array(Gt)}).describe("A list of possible parameter names to their definitions")])).optional(),required:k.array(k.string()).optional().describe("The required parameters"),additionalProperties:k.boolean().optional().describe("Whether or not additional properties are allowed in the schema")}).passthrough(),Vn=k.object({type:k.literal("function").describe("The type of the tool"),function:k.object({name:k.string().describe("The name of the function"),description:k.string().optional().describe("A description of the function"),parameters:mt.extend({strict:k.boolean().optional().describe("Whether or not the arguments should exactly match the function definition, only supported for OpenAI models")}).describe("The parameters that the function accepts")}).passthrough().describe("The function definition")}).passthrough(),z6=dn(Vn,{removeAdditionalStrategy:"passthrough"}),ra=k.object({name:k.string(),description:k.string(),input_schema:mt}),F6=dn(ra,{removeAdditionalStrategy:"passthrough"}),oa=k.object({toolSpec:k.object({name:k.string(),description:k.string().min(1),inputSchema:k.object({json:mt})})}),E6=dn(oa,{removeAdditionalStrategy:"passthrough"}),Ys=oa.transform(n=>({type:"function",function:{name:n.toolSpec.name,description:n.toolSpec.description,parameters:n.toolSpec.inputSchema.json}})),Js=Vn.transform(n=>({toolSpec:{name:n.function.name,description:n.function.description??n.function.name,inputSchema:{json:n.function.parameters}}})),e0=ra.transform(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.input_schema}})),n0=Vn.transform(n=>({name:n.function.name,description:n.function.description??n.function.name,input_schema:n.function.parameters})),Ci=k.union([Vn,ra,oa,Qn]),a0=n=>{const{success:a,data:t}=Vn.safeParse(n);if(a)return{provider:"OPENAI",validatedToolDefinition:t};const{success:l,data:i}=ra.safeParse(n);if(l)return{provider:"ANTHROPIC",validatedToolDefinition:i};const{success:r,data:o}=oa.safeParse(n);return r?{provider:"AWS",validatedToolDefinition:o}:{provider:"UNKNOWN",validatedToolDefinition:null}},Aa=n=>{const{provider:a,validatedToolDefinition:t}=a0(n);switch(a){case"AZURE_OPENAI":case"OPENAI":return t;case"ANTHROPIC":return e0.parse(t);case"AWS":return Ys.parse(t);case"UNKNOWN":return null;default:P()}},Qt=({toolDefinition:n,targetProvider:a})=>{switch(a){case"AZURE_OPENAI":case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":return n;case"ANTHROPIC":return n0.parse(n);case"AWS":return Js.parse(n);case"GOOGLE":return n;default:P()}};function D6(n){return{type:"function",function:{name:`new_function_${n}`,description:"a description",parameters:{type:"object",properties:{new_arg:{type:"string"}},required:[]}}}}function _6(n){return{name:`new_function_${n}`,description:"a description",input_schema:{type:"object",properties:{new_arg:{type:"string"}},required:[]}}}function K6(n){return{toolSpec:{name:`new_function_${n}`,description:"a description",inputSchema:{json:{type:"object",properties:{new_arg:{type:"string"}},required:[]}}}}}const P6=n=>{const a=Ci.safeParse(n);return!a.success||a.data===null||!me(a.data)?null:"function"in a.data&&me(a.data.function)&&"name"in a.data.function&&typeof a.data.function.name=="string"?a.data.function.name:"name"in a.data&&typeof a.data.name=="string"?a.data.name:null},V6=n=>{const a=Ci.safeParse(n);return!a.success||a.data===null||!me(a.data)?null:"function"in a.data&&me(a.data.function)&&"description"in a.data.function&&typeof a.data.function.description=="string"?a.data.function.description:"description"in a.data&&typeof a.data.description=="string"?a.data.description:null};function t0({str:n,excludePrimitives:a=!1,excludeArray:t=!1,excludeNull:l=!1}){try{const i=JSON.parse(n);if(a&&typeof i!="object"||t&&Array.isArray(i)||l&&i===null)return!1}catch{return!1}return!0}function l0(n){return t0({str:n,excludeArray:!0,excludePrimitives:!0})}function sa(n){try{return{json:JSON.parse(n)}}catch(a){return{json:null,parseError:a}}}function O6(...n){try{return{json:JSON.stringify(...n)}}catch(a){return{json:null,stringifyError:a}}}function ki(n,a="",t="."){const l={};for(const[i,r]of Object.entries(n)){const o=a?`${a}${t}${i}`:i;r&&typeof r=="object"?Object.assign(l,ki(r,o,t)):l[o]=r}return l}function R6(n,a="."){try{const t=JSON.parse(n);return typeof t!="object"?{}:ki(t,"",a)}catch{}return{}}const On=k.object({id:k.string().describe("The ID of the tool call"),type:k.literal("function").describe("The type of the tool call").default("function"),function:k.object({name:k.string().describe("The name of the function"),arguments:k.record(k.unknown()).describe("The arguments for the function")}).describe("The function that is being called").passthrough()}),i0=k.array(On),N6=dn(i0,{removeAdditionalStrategy:"passthrough"}),ca=k.object({toolUse:k.object({toolUseId:k.string().describe("The ID of the tool call"),name:k.string().describe("The name of the tool"),input:k.record(k.unknown()).describe("The input for the tool")})}),r0=k.array(ca),$6=dn(r0,{removeAdditionalStrategy:"passthrough"}),o0=On.transform(n=>({toolUse:{toolUseId:n.id,name:n.function.name,input:n.function.arguments}})),s0=ca.transform(n=>({id:n.toolUse.toolUseId,type:"function",function:{name:n.toolUse.name,arguments:n.toolUse.input}})),da=k.object({id:k.string().describe("The ID of the tool call"),type:k.literal("tool_use"),name:k.string().describe("The name of the tool"),input:k.record(k.unknown()).describe("The input for the tool")}).passthrough(),c0=k.array(da),B6=dn(c0,{removeAdditionalStrategy:"passthrough"}),d0=da.transform(n=>({id:n.id,type:"function",function:{name:n.name,arguments:n.input}})),u0=On.transform(n=>({id:n.id,type:"tool_use",name:n.function.name,input:typeof n.function.arguments=="string"?{[n.function.arguments]:n.function.arguments}:n.function.arguments??{}})),g0=k.union([On,da,ca,Qn]);k.array(g0);const m0=n=>{const{success:a,data:t}=On.safeParse(n);if(a)return{provider:"OPENAI",validatedToolCall:t};const{success:l,data:i}=da.safeParse(n);if(l)return{provider:"ANTHROPIC",validatedToolCall:i};const{success:r,data:o}=ca.safeParse(n);return r?{provider:"AWS",validatedToolCall:o}:{provider:"UNKNOWN",validatedToolCall:null}},Ue=n=>{const{provider:a,validatedToolCall:t}=m0(n);switch(a){case"AZURE_OPENAI":case"OPENAI":return t;case"ANTHROPIC":return d0.parse(t);case"AWS":return s0.parse(t);case"UNKNOWN":return null;default:P()}},ja=({toolCall:n,targetProvider:a})=>{switch(a){case"AZURE_OPENAI":case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":return n;case"AWS":return o0.parse(n);case"ANTHROPIC":return u0.parse(n);case"GOOGLE":return n;default:P()}},H6=(n,a)=>{const t=Ue({id:n.toolCall.toolCallId,function:{name:n.toolCall.toolCall.name,arguments:sa(n.toolCall.toolCall.arguments).json||""}});return t?ja({toolCall:t,targetProvider:a}):null};function j6(){return{id:"",type:"function",function:{name:"",arguments:{}}}}function Z6(){return{id:"",type:"tool_use",name:"",input:{}}}const pt=k.object({id:k.string().optional(),name:k.string().optional(),arguments:k.record(k.unknown()).optional(),function:k.object({name:k.string().optional(),arguments:k.record(k.unknown()).optional()}).optional()});function U6(n){let a=n;typeof n=="string"&&(a=sa(n).json);const t=Ue(a);if(t)return t.id;const l=pt.safeParse(a);return l.success?l.data.id??l.data.name??null:null}function G6(n){var i;let a=n;typeof n=="string"&&(a=sa(n).json);const t=Ue(a);if(t)return t.function.name;const l=pt.safeParse(a);return l.success?((i=l.data.function)==null?void 0:i.name)??l.data.name??l.data.id??null:null}function Q6(n){var i;let a=n;typeof n=="string"&&(a=sa(n).json);const t=Ue(a);if(t)return t.function.arguments;const l=pt.safeParse(a);return l.success?l.data.arguments??((i=l.data.function)==null?void 0:i.arguments)??null:null}const ua=ps()(k.union([k.literal("auto"),k.literal("none"),k.literal("required"),k.object({type:k.literal("function"),function:k.object({name:k.string()})})]));k.discriminatedUnion("type",[k.object({type:k.literal("auto")}),k.object({type:k.literal("any")}),k.object({type:k.literal("tool"),name:k.string()}),k.object({type:k.literal("none")})]);const ht=k.discriminatedUnion("type",[k.object({type:k.literal("none")}),k.object({type:k.literal("auto"),disable_parallel_tool_use:k.boolean().optional()}),k.object({type:k.literal("any"),disable_parallel_tool_use:k.boolean().optional()}),k.object({type:k.literal("tool"),name:k.string(),disable_parallel_tool_use:k.boolean().optional()})]),p0=ht.transform(n=>{switch(n.type){case"any":return"required";case"auto":return"auto";case"tool":return n.name?{type:"function",function:{name:n.name}}:"auto";case"none":return"none";default:return"auto"}}),h0=ua.transform(n=>{if(me(n))return{type:"tool",name:n.function.name};switch(n){case"none":return{type:"none"};case"auto":return{type:"auto"};case"required":return{type:"any"};default:P()}}),f0=ua.transform(n=>{if(me(n))return{type:"tool",name:n.function.name};switch(n){case"none":return{type:"none"};case"auto":return{type:"auto"};case"required":return{type:"any"};default:P()}});k.union([ua,ht]);const b0=n=>{const{success:a,data:t}=ua.safeParse(n);if(a)return{provider:"OPENAI",toolChoice:t};const{success:l,data:i}=ht.safeParse(n);return l?{provider:"ANTHROPIC",toolChoice:i}:{provider:null,toolChoice:null}},y0=n=>{const{provider:a,toolChoice:t}=b0(n);if(a==null||t==null)throw new Error("Could not detect provider of tool choice");switch(a){case"AZURE_OPENAI":case"OPENAI":return t;case"ANTHROPIC":return p0.parse(t);default:P()}},v0=({toolChoice:n,targetProvider:a})=>{switch(a){case"AZURE_OPENAI":case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":return n;case"AWS":return h0.parse(n);case"ANTHROPIC":return f0.parse(n);case"GOOGLE":return n;default:P()}},C0=({toolChoice:n,targetProvider:a})=>{try{const t=y0(n);return v0({toolChoice:t,targetProvider:a})}catch{return null}},Wt=n=>n,qt=n=>n,Xt=n=>n,k0=n=>me(n)?"function"in n&&me(n.function)&&"name"in n.function&&typeof n.function.name=="string"?n.function.name:"name"in n&&typeof n.name=="string"?n.name:null:null,L0=({instanceTools:n,provider:a})=>n.map(t=>{switch(a){case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"AZURE_OPENAI":{const l=Aa(t.definition);return{...t,definition:l??t.definition}}case"ANTHROPIC":{const l=Aa(t.definition),i=l?Qt({toolDefinition:l,targetProvider:a}):t.definition;return{...t,definition:i}}case"AWS":{const l=Aa(t.definition),i=l?Qt({toolDefinition:l,targetProvider:a}):t.definition;return{...t,definition:i}}case"GOOGLE":return t;default:P()}}),w0=({toolCalls:n,provider:a})=>{if(n!=null)return n.map(t=>{switch(a){case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"AZURE_OPENAI":return Ue(t)??t;case"ANTHROPIC":{const l=Ue(t);return l!=null?ja({toolCall:l,targetProvider:a}):t}case"AWS":{const l=Ue(t);return l!=null?ja({toolCall:l,targetProvider:a}):t}case"GOOGLE":return t;default:P()}})};let S0=0,x0=0,T0=1,A0=0;const Li=()=>S0++,Wn=()=>T0++,W6=()=>A0++,I0=()=>x0++,wi=()=>({__type:"chat",messages:[{id:Wn(),role:"system",content:"You are a chatbot"},{id:Wn(),role:"user",content:"{{question}}"}]}),ft=n=>({template:{__type:"chat",messageIds:n.messages.map(a=>a.id)},messages:n.messages.reduce((a,t)=>(a[t.id]=t,a),{})}),M0={__type:"text_completion",prompt:"{{question}}"},z0=()=>({model:{provider:bi,modelName:$s,invocationParameters:[],supportedInvocationParameters:[]},tools:[],toolChoice:"auto",output:void 0,spanId:null,activeRunId:null});function F0(){const n=wi(),a=ft(n);return{instance:{id:Li(),template:a.template,...z0()},instanceMessages:a.messages}}function q6(){return{type:"json_schema",json_schema:{name:"response",schema:{type:"object",properties:{},required:[],additionalProperties:!1},strict:!0}}}function E0(n){if(n.instances!=null&&n.instances.length>0){let o={};return{instances:n.instances.map(d=>{if(d.template.__type==="chat"){const u=ft(d.template);return o={...o,...u.messages},{...d,template:u.template}}return d}),instanceMessages:o}}const{instance:a,instanceMessages:t}=F0(),l=Object.values(n.modelConfigByProvider);if(!(l.length>0))return{instances:[a],instanceMessages:t};const r=l.find(o=>o.provider===bi)??l[0];return a.model={...a.model,...r},{instances:[a],instanceMessages:t}}const X6=n=>{const{instances:a,instanceMessages:t}=E0(n);return cn(Fn((i,r)=>({streaming:!0,operationType:"chat",inputMode:"manual",dirtyInstances:{},input:{variablesValueCache:{}},templateFormat:Ke.Mustache,...n,instances:a,allInstanceMessages:t,setInput:o=>{i({input:o})},setOperationType:o=>{if(o==="chat"){const c=[];let d={};r().instances.forEach(u=>{const g=wi(),h=ft(g);d={...d,...h.messages},c.push({...u,template:h.template})}),i({instances:c,allInstanceMessages:d})}else i({instances:r().instances.map(c=>({...c,template:M0}))});i({operationType:o})},addInstance:()=>{const o=r().instances,c=r().allInstanceMessages,d=r().instances[0];if(!d)return;let u=[],g={};if(d.template.__type==="chat"){const f=d.template.messageIds.map(b=>c[b]).map(b=>({...b,id:Wn()}));u=f.map(b=>b.id),g=f.reduce((b,y)=>(b[y.id]=y,b),{})}i({allInstanceMessages:{...c,...g},instances:[...o,{...d,...d.template.__type==="chat"?{template:{...d.template,messageIds:u}}:{},id:Li(),activeRunId:null,experimentId:null,spanId:null}]})},updateModelSupportedInvocationParameters:({instanceId:o,supportedInvocationParameters:c,modelConfigByProvider:d})=>{const u=r().instances;i({instances:u.map(g=>{if(g.id===o){const{baseUrl:h,endpoint:f,apiVersion:b,region:y}=d[g.model.provider]??{},C=w1(g.model.invocationParameters,c),L=S1(C,c);return{...g,model:{...g.model,baseUrl:g.model.baseUrl??h,endpoint:g.model.endpoint??f,apiVersion:g.model.apiVersion??b,region:g.model.region??y,supportedInvocationParameters:c,invocationParameters:L},tools:c.find(w=>w.canonicalName===x1)?g.tools:[]}}return g})})},updateProvider:({instanceId:o,provider:c,modelConfigByProvider:d})=>{const u=r().instances,g=u.find(L=>L.id===o);if(!g||g.model.provider===c)return;const h=d[c],f=g.model.invocationParameters.find(L=>L.canonicalName===k1||L.invocationName===L1),b=L=>L==="OLLAMA"?"http://localhost:11434/v1":null,y={model:h?{...g.model,...h,invocationParameters:[...h.invocationParameters,...f?[f]:[]],provider:c}:{...g.model,modelName:null,baseUrl:b(c),apiVersion:null,endpoint:null,region:null,provider:c},toolChoice:C0({toolChoice:g.toolChoice,targetProvider:c})??void 0,tools:L0({instanceTools:g.tools,provider:c})},C={};g.template.__type==="chat"&&g.template.messageIds.forEach(L=>{const w=r().allInstanceMessages[L];w&&(C[L]={...w,toolCalls:w0({toolCalls:w.toolCalls,provider:c})})}),i({allInstanceMessages:{...r().allInstanceMessages,...C},dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:u.map(L=>L.id===o?{...L,...y}:L)})},updateModel:({instanceId:o,patch:c})=>{const d=r().instances;d.find(g=>g.id===o)&&i({dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:d.map(g=>g.id===o?{...g,model:{...g.model,...c}}:g)})},deleteInstance:o=>{const c=r().instances;i({instances:c.filter(d=>d.id!==o),dirtyInstances:{...r().dirtyInstances,[o]:!1}})},addMessage:({playgroundInstanceId:o,messages:c})=>{const d=r().instances;let u=[];Array.isArray(c)?u=c:c?u=[c]:u=[{id:Wn(),role:Bs,content:""}],i({allInstanceMessages:{...r().allInstanceMessages,...u.reduce((g,h)=>(g[h.id]=h,g),{})},dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:d.map(g=>g.id===o&&(g!=null&&g.template)&&(g==null?void 0:g.template.__type)==="chat"?{...g,template:{...g.template,messageIds:[...g.template.messageIds,...u.map(h=>h.id)]}}:g)})},updateMessage:({messageId:o,patch:c,instanceId:d})=>{const u=r().allInstanceMessages;i({allInstanceMessages:{...u,[o]:{...u[o],...c}},dirtyInstances:{...r().dirtyInstances,[d]:!0}})},deleteMessage:({instanceId:o,messageId:c})=>{const d=r().instances,u=r().allInstanceMessages;i({allInstanceMessages:Object.fromEntries(Object.entries(u).filter(([,{id:g}])=>g!==c)),dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:d.map(g=>g.id===o&&(g!=null&&g.template)&&(g==null?void 0:g.template.__type)==="chat"?{...g,template:{...g.template,messageIds:g.template.messageIds.filter(h=>h!==c)}}:g)})},updateInstance:({instanceId:o,patch:c,dirty:d})=>{const u=r().instances;i({dirtyInstances:{...r().dirtyInstances,...d!=null?{[o]:d}:{}},instances:u.map(g=>g.id===o?{...g,...c}:g)})},runPlaygroundInstances:()=>{const o=r().instances;i({instances:o.map(c=>({...c,activeRunId:I0(),spanId:null}))})},cancelPlaygroundInstances:()=>{const o=r().instances;i({instances:o.map(c=>({...c,activeRunId:null,spanId:null}))})},markPlaygroundInstanceComplete:o=>{const c=r().instances;i({instances:c.map(d=>d.id===o?{...d,activeRunId:null}:d)})},setTemplateFormat:o=>{i({templateFormat:o})},setVariableValue:(o,c)=>{const d=r().input;i({input:{...d,variablesValueCache:{...d.variablesValueCache,[o]:c}}})},setStreaming:o=>{i({streaming:o})},updateInstanceModelInvocationParameters:({instanceId:o,invocationParameters:c})=>{r().instances.find(u=>u.id===o)&&i({dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(u=>u.id===o?{...u,model:{...u.model,invocationParameters:c}}:u)})},upsertInvocationParameterInput:({instanceId:o,invocationParameterInput:c})=>{const d=r().instances.find(g=>g.id===o);if(!d)return;const u=d.model.invocationParameters.find(g=>Rt(g,c));i(u?{dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(g=>g.id===o?{...g,model:{...g.model,invocationParameters:g.model.invocationParameters.map(h=>Rt(h,c)?c:h)}}:g)}:{dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(g=>g.id===o?{...g,model:{...g.model,invocationParameters:[...g.model.invocationParameters,c]}}:g)})},deleteInvocationParameterInput:({instanceId:o,invocationParameterInputInvocationName:c})=>{r().instances.find(u=>u.id===o)&&i({dirtyInstances:{...r().dirtyInstances,[o]:!0},instances:r().instances.map(u=>u.id===o?{...u,model:{...u.model,invocationParameters:u.model.invocationParameters.filter(g=>g.invocationName!==c)}}:u)})},setDirty:(o,c)=>{i({dirtyInstances:{...r().dirtyInstances,[o]:c}})}})))};function D0(n){return n==="OPENAI"||n==="AZURE_OPENAI"||n==="ANTHROPIC"||n==="GOOGLE"||n==="DEEPSEEK"||n==="XAI"||n==="OLLAMA"||n==="AWS"}function Y6(n){switch(n){case"OPENAI":return"OpenAI";case"AZURE_OPENAI":return"Azure OpenAI";case"ANTHROPIC":return"Anthropic";case"GOOGLE":return"Google";case"DEEPSEEK":return"DeepSeek";case"XAI":return"XAI";case"OLLAMA":return"Ollama";case"AWS":return"AWS";default:P()}}function J6(n){switch(n){case"OPENAI":return fn.OPENAI.toString();case"AZURE_OPENAI":return fn.AZURE.toString();case"ANTHROPIC":return fn.ANTHROPIC.toString();case"GOOGLE":return fn.GOOGLE.toString();case"AWS":return fn.AWS.toString();case"DEEPSEEK":return"deepseek";case"XAI":return"xai";case"OLLAMA":throw new Error("Ollama is not supported");default:P()}}function _0(n){return typeof n=="object"&&n!==null&&Object.keys(n).length>0&&Object.keys(n).every(a=>a in Ha)&&Object.values(n).every(a=>typeof a=="string")}function K0(n){const a={};for(const t of Object.keys(n))D0(t)&&Ha[t].length===1&&(a[t]={[Ha[t][0].envVarName]:n[t]});return a}const e7=n=>{const a=t=>({setCredential:({provider:l,envVarName:i,value:r})=>{t(o=>({[l]:{...o[l],[i]:r}}))},...n});return cn()(na(Fn(a),{version:1,name:"arize-phoenix-credentials",migrate:t=>{if(_0(t))return K0(t)}}))};function ga(n){return e("div",{onClick:a=>a.stopPropagation(),css:m`
|
|
179
179
|
display: inline-block;
|
|
180
180
|
`,children:e(aa,{css:m`
|
|
181
181
|
color: var(--ac-global-link-color);
|
|
@@ -2430,7 +2430,7 @@ fragment ViewerContext_viewer on Query {
|
|
|
2430
2430
|
width: 100%;
|
|
2431
2431
|
margin: var(--ac-global-dimension-size-50) 0;
|
|
2432
2432
|
}
|
|
2433
|
-
`;function Ud(n,a){return e($o,{...n,ref:a,css:Zd,className:"ac-separator react-aria-Separator"})}const Gd=p.forwardRef(Ud);Gd.displayName="Separator";const Yn={OPENAI:["required","auto","none"],AZURE_OPENAI:["required","auto","none"],DEEPSEEK:["required","auto","none"],XAI:["required","auto","none"],OLLAMA:["required","auto","none"],ANTHROPIC:["any","auto","none"],AWS:["any","auto","none"]},Qd=(n,a)=>{switch(n){case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"OPENAI":return ge(a)&&"type"in a&&typeof a.type=="string"?a.type:a;case"AWS":return ge(a)&&"type"in a&&typeof a.type=="string"?a.type:a;case"ANTHROPIC":return ge(a)&&"type"in a&&typeof a.type=="string"?a.type:a;case"GOOGLE":return"auto";default:P()}},h8=n=>n in Yn,rl=(n,a)=>{var t;return((t=Yn[n])==null?void 0:t.includes(a))??!1},Jn="tool_",Ea=n=>`${Jn}${n}`,Da=n=>n.startsWith(Jn)?n.slice(Jn.length):n,Wd=({choiceType:n})=>{switch(n){case"any":case"required":return s(x,{gap:"size-100",alignItems:"center",justifyContent:"space-between",width:"100%",children:[e("span",{children:"Use at least one tool"}),e(Ge,{color:"var(--ac-global-color-grey-900)",size:"S",children:n})]});case"none":return s(x,{gap:"size-100",alignItems:"center",justifyContent:"space-between",width:"100%",children:[e("span",{children:"Don't use any tools"}),e(Ge,{color:"var(--ac-global-color-grey-900)",size:"S",children:n})]});case"auto":default:return s(x,{gap:"size-100",alignItems:"center",justifyContent:"space-between",width:"100%",children:[e("span",{children:"Tools auto-selected by LLM"}),e(Ge,{color:"var(--ac-global-color-grey-900)",size:"S",children:n})]})}};function f8({choice:n,onChange:a,toolNames:t,provider:l}){const i=Qd(l,n),o=rl(l,i)?i:Ea(k0(n)??"");return s(Fe,{selectedKey:o,"aria-label":"Tool Choice for an LLM",onSelectionChange:c=>{if(typeof c=="string"){if(c.startsWith(Jn))switch(l){case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"OPENAI":a(Wt({type:"function",function:{name:Da(c)}}));break;case"AWS":a(Xt({type:"tool",name:Da(c)}));break;case"ANTHROPIC":a(qt({type:"tool",name:Da(c)}));break;default:P()}else if(rl(l,c))switch(l){case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"OPENAI":a(Wt(c));break;case"AWS":a(Xt({type:c}));break;case"ANTHROPIC":a(qt({type:c}));break;default:P()}}},children:[e(V,{children:"Tool Choice"}),s(z,{children:[e(ze,{}),e(ke,{})]}),e(ie,{children:e(fe,{children:[...Yn[l]?Yn[l].map(c=>e(Y,{id:c,textValue:c,children:e(Wd,{choiceType:c})},c)):[],...t.map(c=>e(Y,{id:Ea(c),textValue:c,children:c},Ea(c)))]})})]})}const qd=({height:n})=>s("svg",{viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Azure"}),e("path",{d:"M11.49 2H2v9.492h9.492V2h-.002z",fill:"#F25022"}),e("path",{d:"M22 2h-9.492v9.492H22V2z",fill:"#7FBA00"}),e("path",{d:"M11.49 12.508H2V22h9.492v-9.492h-.002z",fill:"#00A4EF"}),e("path",{d:"M22 12.508h-9.492V22H22v-9.492z",fill:"#FFB900"})]}),Xd=({height:n})=>s("svg",{viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Google"}),e("defs",{children:s("linearGradient",{id:"lobe-icons-google-fill",x1:"0%",x2:"68.73%",y1:"100%",y2:"30.395%",children:[e("stop",{offset:"0%",stopColor:"#1C7DFF"}),e("stop",{offset:"52.021%",stopColor:"#1C69FF"}),e("stop",{offset:"100%",stopColor:"#F0DCD6"})]})}),e("path",{d:"M12 24A14.304 14.304 0 000 12 14.304 14.304 0 0012 0a14.305 14.305 0 0012 12 14.305 14.305 0 00-12 12",fill:"url(#lobe-icons-google-fill)",fillRule:"nonzero"})]}),Yd=({height:n})=>s("svg",{fill:"var(--ac-global-text-color-900)",fillRule:"evenodd",viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"OpenAI"}),e("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})]}),Jd=({height:n})=>s("svg",{fill:"var(--ac-global-text-color-900)",fillRule:"evenodd",viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Anthropic"}),e("path",{d:"M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"})]}),e3=({height:n})=>s("svg",{viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"DeepSeek"}),e("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"})]}),n3=({height:n})=>s("svg",{fill:"var(--ac-global-text-color-900)",fillRule:"evenodd",viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"xAI"}),e("path",{d:"M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"})]}),a3=({height:n})=>s("svg",{fill:"currentColor",fillRule:"evenodd",height:n,style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Ollama"}),e("path",{d:"M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"})]}),t3=({height:n})=>s("svg",{height:n,style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Bedrock"}),e("defs",{children:s("linearGradient",{id:"lobe-icons-bedrock-fill",x1:"80%",x2:"20%",y1:"20%",y2:"80%",children:[e("stop",{offset:"0%",stopColor:"#6350FB"}),e("stop",{offset:"50%",stopColor:"#3D8FFF"}),e("stop",{offset:"100%",stopColor:"#9AD8F8"})]})}),e("path",{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z",fill:"url(#lobe-icons-bedrock-fill)",fillRule:"nonzero"})]}),l3={AZURE_OPENAI:qd,GOOGLE:Xd,OPENAI:Yd,ANTHROPIC:Jd,DEEPSEEK:e3,XAI:n3,OLLAMA:a3,AWS:t3};function b8({provider:n,height:a=18}){return l3[n]({height:a})}const At=m`
|
|
2433
|
+
`;function Ud(n,a){return e($o,{...n,ref:a,css:Zd,className:"ac-separator react-aria-Separator"})}const Gd=p.forwardRef(Ud);Gd.displayName="Separator";const Yn={OPENAI:["required","auto","none"],AZURE_OPENAI:["required","auto","none"],DEEPSEEK:["required","auto","none"],XAI:["required","auto","none"],OLLAMA:["required","auto","none"],ANTHROPIC:["any","auto","none"],AWS:["any","auto","none"]},Qd=(n,a)=>{switch(n){case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"OPENAI":return me(a)&&"type"in a&&typeof a.type=="string"?a.type:a;case"AWS":return me(a)&&"type"in a&&typeof a.type=="string"?a.type:a;case"ANTHROPIC":return me(a)&&"type"in a&&typeof a.type=="string"?a.type:a;case"GOOGLE":return"auto";default:P()}},h8=n=>n in Yn,rl=(n,a)=>{var t;return((t=Yn[n])==null?void 0:t.includes(a))??!1},Jn="tool_",Ea=n=>`${Jn}${n}`,Da=n=>n.startsWith(Jn)?n.slice(Jn.length):n,Wd=({choiceType:n})=>{switch(n){case"any":case"required":return s(x,{gap:"size-100",alignItems:"center",justifyContent:"space-between",width:"100%",children:[e("span",{children:"Use at least one tool"}),e(Ge,{color:"var(--ac-global-color-grey-900)",size:"S",children:n})]});case"none":return s(x,{gap:"size-100",alignItems:"center",justifyContent:"space-between",width:"100%",children:[e("span",{children:"Don't use any tools"}),e(Ge,{color:"var(--ac-global-color-grey-900)",size:"S",children:n})]});case"auto":default:return s(x,{gap:"size-100",alignItems:"center",justifyContent:"space-between",width:"100%",children:[e("span",{children:"Tools auto-selected by LLM"}),e(Ge,{color:"var(--ac-global-color-grey-900)",size:"S",children:n})]})}};function f8({choice:n,onChange:a,toolNames:t,provider:l}){const i=Qd(l,n),o=rl(l,i)?i:Ea(k0(n)??"");return s(Fe,{selectedKey:o,"aria-label":"Tool Choice for an LLM",onSelectionChange:c=>{if(typeof c=="string"){if(c.startsWith(Jn))switch(l){case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"OPENAI":a(Wt({type:"function",function:{name:Da(c)}}));break;case"AWS":a(Xt({type:"tool",name:Da(c)}));break;case"ANTHROPIC":a(qt({type:"tool",name:Da(c)}));break;default:P()}else if(rl(l,c))switch(l){case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"OPENAI":a(Wt(c));break;case"AWS":a(Xt({type:c}));break;case"ANTHROPIC":a(qt({type:c}));break;default:P()}}},children:[e(V,{children:"Tool Choice"}),s(z,{children:[e(ze,{}),e(ke,{})]}),e(ie,{children:e(fe,{children:[...Yn[l]?Yn[l].map(c=>e(Y,{id:c,textValue:c,children:e(Wd,{choiceType:c})},c)):[],...t.map(c=>e(Y,{id:Ea(c),textValue:c,children:c},Ea(c)))]})})]})}const qd=({height:n})=>s("svg",{viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Azure"}),e("path",{d:"M11.49 2H2v9.492h9.492V2h-.002z",fill:"#F25022"}),e("path",{d:"M22 2h-9.492v9.492H22V2z",fill:"#7FBA00"}),e("path",{d:"M11.49 12.508H2V22h9.492v-9.492h-.002z",fill:"#00A4EF"}),e("path",{d:"M22 12.508h-9.492V22H22v-9.492z",fill:"#FFB900"})]}),Xd=({height:n})=>s("svg",{viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Google"}),e("defs",{children:s("linearGradient",{id:"lobe-icons-google-fill",x1:"0%",x2:"68.73%",y1:"100%",y2:"30.395%",children:[e("stop",{offset:"0%",stopColor:"#1C7DFF"}),e("stop",{offset:"52.021%",stopColor:"#1C69FF"}),e("stop",{offset:"100%",stopColor:"#F0DCD6"})]})}),e("path",{d:"M12 24A14.304 14.304 0 000 12 14.304 14.304 0 0012 0a14.305 14.305 0 0012 12 14.305 14.305 0 00-12 12",fill:"url(#lobe-icons-google-fill)",fillRule:"nonzero"})]}),Yd=({height:n})=>s("svg",{fill:"var(--ac-global-text-color-900)",fillRule:"evenodd",viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"OpenAI"}),e("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})]}),Jd=({height:n})=>s("svg",{fill:"var(--ac-global-text-color-900)",fillRule:"evenodd",viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Anthropic"}),e("path",{d:"M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"})]}),e3=({height:n})=>s("svg",{viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"DeepSeek"}),e("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"})]}),n3=({height:n})=>s("svg",{fill:"var(--ac-global-text-color-900)",fillRule:"evenodd",viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"xAI"}),e("path",{d:"M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"})]}),a3=({height:n})=>s("svg",{fill:"currentColor",fillRule:"evenodd",height:n,style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Ollama"}),e("path",{d:"M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"})]}),t3=({height:n})=>s("svg",{height:n,style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg",children:[e("title",{children:"Bedrock"}),e("defs",{children:s("linearGradient",{id:"lobe-icons-bedrock-fill",x1:"80%",x2:"20%",y1:"20%",y2:"80%",children:[e("stop",{offset:"0%",stopColor:"#6350FB"}),e("stop",{offset:"50%",stopColor:"#3D8FFF"}),e("stop",{offset:"100%",stopColor:"#9AD8F8"})]})}),e("path",{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z",fill:"url(#lobe-icons-bedrock-fill)",fillRule:"nonzero"})]}),l3={AZURE_OPENAI:qd,GOOGLE:Xd,OPENAI:Yd,ANTHROPIC:Jd,DEEPSEEK:e3,XAI:n3,OLLAMA:a3,AWS:t3};function b8({provider:n,height:a=18}){return l3[n]({height:a})}const At=m`
|
|
2434
2434
|
// fixes table row sizing issues with full height cell children
|
|
2435
2435
|
// this enables features like hovering anywhere on a cell to display controls
|
|
2436
2436
|
height: fit-content;
|
|
@@ -2566,7 +2566,7 @@ fragment ViewerContext_viewer on Query {
|
|
|
2566
2566
|
width: 1rem;
|
|
2567
2567
|
height: 1rem;
|
|
2568
2568
|
}
|
|
2569
|
-
`})}const ol=.05,s3=({word:n,theme:a})=>{const t=n.charCodeAt(0);let l=Kl(t%26/26);const i=a==="light"?3:5,r=a==="light"?"#fdfdfd":"#0E0E0E";let o=Pt(l,r);for(;o<i;)l=a==="light"?Bo(ol,l):Pl(ol,l),o=Pt(l,r);return l},Oi=n=>{const{theme:a}=ae();return p.useMemo(()=>s3({word:n,theme:a}),[n,a])};function Ri({annotationName:n,...a}){const t=Oi(n);return e(o3,{color:t,...a})}function Ni(n){return Math.abs(n)<1e6?
|
|
2569
|
+
`})}const ol=.05,s3=({word:n,theme:a})=>{const t=n.charCodeAt(0);let l=Kl(t%26/26);const i=a==="light"?3:5,r=a==="light"?"#fdfdfd":"#0E0E0E";let o=Pt(l,r);for(;o<i;)l=a==="light"?Bo(ol,l):Pl(ol,l),o=Pt(l,r);return l},Oi=n=>{const{theme:a}=ae();return p.useMemo(()=>s3({word:n,theme:a}),[n,a])};function Ri({annotationName:n,...a}){const t=Oi(n);return e(o3,{color:t,...a})}function Ni(n){return Math.abs(n)<1e6?ge(",")(n):ge("0.2s")(n).replace("G","B").replace("k","K")}function c3(n){return ge("0.2s")(n).replace("G","B").replace("k","K")}function Ne(n){const a=Math.abs(n);return a===0?"0.00":a<.01?ge(".2e")(n):a<1e3?ge("0.2f")(n):ge("0.2s")(n)}function d3(n){const a=Math.abs(n);return a===0?"0.00":a<.01?ge(".2e")(n):a<1e3?ge("0.2f")(n):ge("0.2s")(n).replace("G","B").replace("k","K")}function u3(n){return ge(".2f")(n)+"%"}function In(n){return Number.isInteger(n)?Ni(n):Ne(n)}function g3(n){return n===0?"$0":n<.01?"<$0.01":n<100?`$${ge("0.2f")(n)}`:n<1e4?`$${ge(",")(n)}`:`$${ge("0.2s")(n).replace("G","B").replace("k","K")}`}function Ye(n){return a=>typeof a!="number"?"--":n(a)}const m3=Ye(Ni),k8=Ye(c3),L8=Ye(d3),$i=Ye(Ne),sl=Ye(In),p3=Ye(u3),Bi=Ye(g3),h3=m`
|
|
2570
2570
|
border-radius: var(--ac-global-dimension-size-50);
|
|
2571
2571
|
border: 1px solid var(--ac-global-color-grey-400);
|
|
2572
2572
|
padding: var(--ac-global-dimension-size-50)
|
|
@@ -2669,7 +2669,7 @@ fragment ViewerContext_viewer on Query {
|
|
|
2669
2669
|
margin: 0;
|
|
2670
2670
|
white-space: pre-wrap;
|
|
2671
2671
|
word-wrap: break-word;
|
|
2672
|
-
`;function ul(n,a){return n.length>a?`${n.slice(0,a)}...`:n}function V3({json:n,maxLength:a,space:t=0,disableTitle:l=!1,collapseSingleKey:i=!0}){const r=typeof a=="number",o=p.useMemo(()=>JSON.stringify(n,null,t),[n,t]),c=p.useMemo(()=>JSON.stringify(n,null,2),[n]),d=l?void 0:c;if(!
|
|
2672
|
+
`;function ul(n,a){return n.length>a?`${n.slice(0,a)}...`:n}function V3({json:n,maxLength:a,space:t=0,disableTitle:l=!1,collapseSingleKey:i=!0}){const r=typeof a=="number",o=p.useMemo(()=>JSON.stringify(n,null,t),[n,t]),c=p.useMemo(()=>JSON.stringify(n,null,2),[n]),d=l?void 0:c;if(!me(n))return console.warn("JSONText component received a non-object value",n),e("span",{title:d,children:String(n)});const u=n;if(Object.keys(u).length===0)return e("span",{title:d,children:"--"});if(Object.keys(u).length===1&&i){const b=Object.keys(u)[0],y=u[b];if(typeof y=="string"){const C=r?ul(y,a):y;return e("span",{title:d,children:C})}}const g=r?ul(o,a):o;return e(r?"span":"pre",{title:d,css:r?void 0:P3,children:g})}const O3=100;function D8({getValue:n}){const a=n();return e(V3,{json:a,maxLength:O3})}m`
|
|
2673
2673
|
position: relative;
|
|
2674
2674
|
height: 100%;
|
|
2675
2675
|
min-height: 100%;
|
|
@@ -2842,7 +2842,7 @@ fragment ViewerContext_viewer on Query {
|
|
|
2842
2842
|
errorMessage
|
|
2843
2843
|
}
|
|
2844
2844
|
}
|
|
2845
|
-
`}}}();Yi.hash="588f0ae4347a5d65fd17babc2d6be11f";const ug=({value:n,onChange:a,error:t,isInvalid:l,description:i,label:r,ariaLabel:o,placeholder:c,...d})=>s(Q,{isInvalid:l,"aria-label":o||r,value:n,onChange:a,...d,children:[r&&e(V,{children:r}),e(G,{placeholder:c}),!t&&i&&e(v,{slot:"description",children:i}),t&&e(J,{children:t}),l&&n&&e(M,{style:{color:"var(--ac-global-color-danger)"},svg:e(fc,{})}),!l&&n&&e(M,{style:{color:"var(--ac-global-color-success)"},svg:e(Mi,{})})]}),cu=Yi,gg=({initialValue:n}={initialValue:""})=>{const[a,t]=p.useState(n),[l,i]=p.useState(a),[r,o]=p.useState(void 0),c=E.useRelayEnvironment(),d=p.useMemo(()=>Vl.debounce(u=>{i(u)},500),[]);return p.useEffect(()=>{d(a)},[a,d]),p.useEffect(()=>{if(!l){o(void 0);return}const g=E.fetchQuery(c,cu,{input:l}).subscribe({next:h=>{h.validateRegularExpression.isValid?o(void 0):o(h.validateRegularExpression.errorMessage??"Regular expression is invalid")}});return()=>{g.unsubscribe()}},[l,c]),{value:a,onChange:t,isInvalid:r!=null,error:r}};function du(){const[n,a]=p.useState("--");return p.useEffect(()=>{fetch("https://api.github.com/repos/Arize-ai/phoenix").then(t=>t.json()).then(t=>{a(
|
|
2845
|
+
`}}}();Yi.hash="588f0ae4347a5d65fd17babc2d6be11f";const ug=({value:n,onChange:a,error:t,isInvalid:l,description:i,label:r,ariaLabel:o,placeholder:c,...d})=>s(Q,{isInvalid:l,"aria-label":o||r,value:n,onChange:a,...d,children:[r&&e(V,{children:r}),e(G,{placeholder:c}),!t&&i&&e(v,{slot:"description",children:i}),t&&e(J,{children:t}),l&&n&&e(M,{style:{color:"var(--ac-global-color-danger)"},svg:e(fc,{})}),!l&&n&&e(M,{style:{color:"var(--ac-global-color-success)"},svg:e(Mi,{})})]}),cu=Yi,gg=({initialValue:n}={initialValue:""})=>{const[a,t]=p.useState(n),[l,i]=p.useState(a),[r,o]=p.useState(void 0),c=E.useRelayEnvironment(),d=p.useMemo(()=>Vl.debounce(u=>{i(u)},500),[]);return p.useEffect(()=>{d(a)},[a,d]),p.useEffect(()=>{if(!l){o(void 0);return}const g=E.fetchQuery(c,cu,{input:l}).subscribe({next:h=>{h.validateRegularExpression.isValid?o(void 0):o(h.validateRegularExpression.errorMessage??"Regular expression is invalid")}});return()=>{g.unsubscribe()}},[l,c]),{value:a,onChange:t,isInvalid:r!=null,error:r}};function du(){const[n,a]=p.useState("--");return p.useEffect(()=>{fetch("https://api.github.com/repos/Arize-ai/phoenix").then(t=>t.json()).then(t=>{a(ge(".2s")(t.stargazers_count))})},[]),e(td,{children:n})}function uu(n){const{size:a=28}=n;return s("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 305.92 350.13",width:a,height:a,css:m`
|
|
2846
2846
|
.cls-1 {
|
|
2847
2847
|
fill: url(#linear-gradient);
|
|
2848
2848
|
}
|
|
@@ -5367,4 +5367,4 @@ resource: new Resource({
|
|
|
5367
5367
|
id
|
|
5368
5368
|
}
|
|
5369
5369
|
}
|
|
5370
|
-
`}}}();Jr.hash="7772e95d9d4cf1f8435cb8fcf8e77081";function n6({experimentId:n}){const a=E.useLazyLoadQuery(Jr,{experimentId:n}),t=p.useMemo(()=>{if(a.experiment.__typename==="Experiment"){const l=a.experiment.costSummary.prompt.tokens,i=a.experiment.costSummary.completion.tokens,r=a.experiment.costSummary.total.tokens,o=a.experiment.runCount,c=r==null||o==0?null:r/o,d=l==null||o==0?null:l/o,u=i==null||o==0?null:i/o;return{total:c,prompt:d,completion:u}}return{total:null,prompt:null,completion:null}},[a.experiment]);return e(Je,{...t,label:"Average"})}function xm(n){return n.averageRunTokenCountTotal==null?e(Me,{size:n.size,children:null}):s(U,{children:[e(se,{children:e(Me,{size:n.size,role:"button",children:n.averageRunTokenCountTotal})}),s(re,{children:[e(ne,{}),e(p.Suspense,{fallback:e(ce,{}),children:e(n6,{experimentId:n.experimentId})})]})]})}export{St as $,Oe as A,We as B,I6 as C,bi as D,qe as E,T as F,An as G,b8 as H,x as I,v as J,D0 as K,z as L,M,x7 as N,At as O,Ha as P,e8 as Q,J7 as R,Pn as S,Ke as T,ni as U,rt as V,Q as W,l8 as X,i8 as Y,Di as Z,Tn as _,sa as a,ie as a$,V7 as a0,m7 as a1,d7 as a2,v3 as a3,S8 as a4,Hi as a5,ea as a6,Ge as a7,Pi as a8,Re as a9,mn as aA,Xi as aB,iu as aC,qi as aD,Kn as aE,y6 as aF,bt as aG,Gi as aH,Q7 as aI,G7 as aJ,Y6 as aK,J6 as aL,gg as aM,ug as aN,Ga as aO,xt as aP,S7 as aQ,C8 as aR,Tc as aS,X7 as aT,re as aU,Bi as aV,U3 as aW,Fe as aX,ke as aY,fe as aZ,Y as a_,ne as aa,ji as ab,ee as ac,ce as ad,Fi as ae,Qi as af,Cs as ag,ga as ah,z8 as ai,F8 as aj,P8 as ak,M8 as al,wt as am,T8 as an,I8 as ao,od as ap,il as aq,s8 as ar,id as as,p3 as at,O8 as au,V8 as av,cg as aw,dg as ax,el as ay,lu as az,Ci as b,da as b$,Y3 as b0,X8 as b1,Z8 as b2,U8 as b3,j8 as b4,H8 as b5,je as b6,Ie as b7,t8 as b8,tg as b9,kg as bA,Cg as bB,E7 as bC,yg as bD,c8 as bE,wg as bF,h6 as bG,p6 as bH,m8 as bI,g8 as bJ,U7 as bK,T6 as bL,Z7 as bM,j7 as bN,Zi as bO,V6 as bP,P6 as bQ,l7 as bR,H7 as bS,U6 as bT,G6 as bU,Q6 as bV,xg as bW,Sg as bX,H6 as bY,On as bZ,ca as b_,lg as ba,ig as bb,rg as bc,og as bd,M2 as be,v8 as bf,W7 as bg,p7 as bh,n8 as bi,Lg as bj,bg as bk,v6 as bl,fg as bm,vg as bn,v7 as bo,z7 as bp,L7 as bq,P7 as br,D7 as bs,y7 as bt,pg as bu,$7 as bv,mg as bw,F7 as bx,hg as by,K7 as bz,mt as c,sl as c$,o0 as c0,u0 as c1,A8 as c2,T3 as c3,x3 as c4,T7 as c5,td as c6,z0 as c7,$s as c8,X6 as c9,Hg as cA,K5 as cB,jg as cC,Zg as cD,U5 as cE,G5 as cF,o7 as cG,P5 as cH,$g as cI,q7 as cJ,E8 as cK,Ug as cL,V3 as cM,Gg as cN,k7 as cO,A7 as cP,Wg as cQ,qg as cR,Y0 as cS,i7 as cT,Cu as cU,ae as cV,ic as cW,o6 as cX,Vg as cY,Rg as cZ,Og as c_,l0 as ca,R7 as cb,S3 as cc,ku as cd,w8 as ce,Lt as cf,Oc as cg,Ag as ch,ec as ci,oe as cj,Ct as ck,a7 as cl,a8 as cm,Ne as cn,h3 as co,o3 as cp,Ng as cq,d5 as cr,Ju as cs,Eg as ct,zi as cu,Qe as cv,F5 as cw,u3 as cx,R8 as cy,Oi as cz,s6 as d,B8 as d$,M7 as d0,Hu as d1,Bg as d2,Kg as d3,c5 as d4,Pg as d5,g7 as d6,u7 as d7,Xg as d8,m0 as d9,f8 as dA,Jg as dB,nm as dC,Tg as dD,Mc as dE,Tt as dF,sg as dG,vt as dH,Fg as dI,Dg as dJ,Mg as dK,la as dL,hs as dM,am as dN,tm as dO,lm as dP,rm as dQ,im as dR,us as dS,ds as dT,I as dU,c4 as dV,Q8 as dW,W8 as dX,q8 as dY,N8 as dZ,$8 as d_,K8 as da,Ig as db,y8 as dc,x8 as dd,I7 as de,kt as df,he as dg,w0 as dh,Yg as di,t7 as dj,o8 as dk,r8 as dl,A6 as dm,t0 as dn,$6 as dp,B6 as dq,N6 as dr,fa as ds,q6 as dt,em as du,E6 as dv,F6 as dw,z6 as dx,k0 as dy,h8 as dz,O6 as e,Qg as e$,x4 as e0,T4 as e1,w7 as e2,mi as e3,E4 as e4,Sn as e5,Ze as e6,$r as e7,Qa as e8,on as e9,D3 as eA,_g as eB,R6 as eC,_7 as eD,hm as eE,fm as eF,b7 as eG,s2 as eH,i4 as eI,jd as eJ,p8 as eK,_8 as eL,g5 as eM,bm as eN,zg as eO,G8 as eP,ng as eQ,Y8 as eR,k8 as eS,L8 as eT,
|
|
5370
|
+
`}}}();Jr.hash="7772e95d9d4cf1f8435cb8fcf8e77081";function n6({experimentId:n}){const a=E.useLazyLoadQuery(Jr,{experimentId:n}),t=p.useMemo(()=>{if(a.experiment.__typename==="Experiment"){const l=a.experiment.costSummary.prompt.tokens,i=a.experiment.costSummary.completion.tokens,r=a.experiment.costSummary.total.tokens,o=a.experiment.runCount,c=r==null||o==0?null:r/o,d=l==null||o==0?null:l/o,u=i==null||o==0?null:i/o;return{total:c,prompt:d,completion:u}}return{total:null,prompt:null,completion:null}},[a.experiment]);return e(Je,{...t,label:"Average"})}function xm(n){return n.averageRunTokenCountTotal==null?e(Me,{size:n.size,children:null}):s(U,{children:[e(se,{children:e(Me,{size:n.size,role:"button",children:n.averageRunTokenCountTotal})}),s(re,{children:[e(ne,{}),e(p.Suspense,{fallback:e(ce,{}),children:e(n6,{experimentId:n.experimentId})})]})]})}export{St as $,Oe as A,We as B,I6 as C,bi as D,qe as E,T as F,An as G,b8 as H,x as I,v as J,D0 as K,z as L,M,x7 as N,At as O,Ha as P,e8 as Q,J7 as R,Pn as S,Ke as T,ni as U,rt as V,Q as W,l8 as X,i8 as Y,Di as Z,Tn as _,sa as a,ie as a$,V7 as a0,m7 as a1,d7 as a2,v3 as a3,S8 as a4,Hi as a5,ea as a6,Ge as a7,Pi as a8,Re as a9,mn as aA,Xi as aB,iu as aC,qi as aD,Kn as aE,y6 as aF,bt as aG,Gi as aH,Q7 as aI,G7 as aJ,Y6 as aK,J6 as aL,gg as aM,ug as aN,Ga as aO,xt as aP,S7 as aQ,C8 as aR,Tc as aS,X7 as aT,re as aU,Bi as aV,U3 as aW,Fe as aX,ke as aY,fe as aZ,Y as a_,ne as aa,ji as ab,ee as ac,ce as ad,Fi as ae,Qi as af,Cs as ag,ga as ah,z8 as ai,F8 as aj,P8 as ak,M8 as al,wt as am,T8 as an,I8 as ao,od as ap,il as aq,s8 as ar,id as as,p3 as at,O8 as au,V8 as av,cg as aw,dg as ax,el as ay,lu as az,Ci as b,da as b$,Y3 as b0,X8 as b1,Z8 as b2,U8 as b3,j8 as b4,H8 as b5,je as b6,Ie as b7,t8 as b8,tg as b9,kg as bA,Cg as bB,E7 as bC,yg as bD,c8 as bE,wg as bF,h6 as bG,p6 as bH,m8 as bI,g8 as bJ,U7 as bK,T6 as bL,Z7 as bM,j7 as bN,Zi as bO,V6 as bP,P6 as bQ,l7 as bR,H7 as bS,U6 as bT,G6 as bU,Q6 as bV,xg as bW,Sg as bX,H6 as bY,On as bZ,ca as b_,lg as ba,ig as bb,rg as bc,og as bd,M2 as be,v8 as bf,W7 as bg,p7 as bh,n8 as bi,Lg as bj,bg as bk,v6 as bl,fg as bm,vg as bn,v7 as bo,z7 as bp,L7 as bq,P7 as br,D7 as bs,y7 as bt,pg as bu,$7 as bv,mg as bw,F7 as bx,hg as by,K7 as bz,mt as c,sl as c$,o0 as c0,u0 as c1,A8 as c2,T3 as c3,x3 as c4,T7 as c5,td as c6,z0 as c7,$s as c8,X6 as c9,Hg as cA,K5 as cB,jg as cC,Zg as cD,U5 as cE,G5 as cF,o7 as cG,P5 as cH,$g as cI,q7 as cJ,E8 as cK,Ug as cL,V3 as cM,Gg as cN,k7 as cO,A7 as cP,Wg as cQ,qg as cR,Y0 as cS,i7 as cT,Cu as cU,ae as cV,ic as cW,o6 as cX,Vg as cY,Rg as cZ,Og as c_,l0 as ca,R7 as cb,S3 as cc,ku as cd,w8 as ce,Lt as cf,Oc as cg,Ag as ch,ec as ci,oe as cj,Ct as ck,a7 as cl,a8 as cm,Ne as cn,h3 as co,o3 as cp,Ng as cq,d5 as cr,Ju as cs,Eg as ct,zi as cu,Qe as cv,F5 as cw,u3 as cx,R8 as cy,Oi as cz,s6 as d,B8 as d$,M7 as d0,Hu as d1,Bg as d2,Kg as d3,c5 as d4,Pg as d5,g7 as d6,u7 as d7,Xg as d8,m0 as d9,f8 as dA,Jg as dB,nm as dC,Tg as dD,Mc as dE,Tt as dF,sg as dG,vt as dH,Fg as dI,Dg as dJ,Mg as dK,la as dL,hs as dM,am as dN,tm as dO,lm as dP,rm as dQ,im as dR,us as dS,ds as dT,I as dU,c4 as dV,Q8 as dW,W8 as dX,q8 as dY,N8 as dZ,$8 as d_,K8 as da,Ig as db,y8 as dc,x8 as dd,I7 as de,kt as df,he as dg,w0 as dh,Yg as di,t7 as dj,o8 as dk,r8 as dl,A6 as dm,t0 as dn,$6 as dp,B6 as dq,N6 as dr,fa as ds,q6 as dt,em as du,E6 as dv,F6 as dw,z6 as dx,k0 as dy,h8 as dz,O6 as e,Qg as e$,x4 as e0,T4 as e1,w7 as e2,mi as e3,E4 as e4,Sn as e5,Ze as e6,$r as e7,Qa as e8,on as e9,D3 as eA,_g as eB,R6 as eC,_7 as eD,hm as eE,fm as eF,b7 as eG,s2 as eH,i4 as eI,jd as eJ,p8 as eK,_8 as eL,g5 as eM,bm as eN,zg as eO,G8 as eP,ng as eQ,Y8 as eR,k8 as eS,L8 as eT,ag as eU,u6 as eV,c6 as eW,kc as eX,Sc as eY,ln as eZ,N3 as e_,Y7 as ea,pm as eb,dm as ec,dt as ed,um as ee,mm as ef,w6 as eg,L6 as eh,S6 as ei,d6 as ej,om as ek,n7 as el,ei as em,cm as en,gm as eo,sm as ep,m3 as eq,eg as er,$i as es,J8 as et,r7 as eu,x6 as ev,N7 as ew,C7 as ex,ye as ey,u9 as ez,F0 as f,d8 as f0,sc as f1,O7 as f2,D8 as f3,y3 as f4,Se as f5,pc as f6,F3 as f7,s3 as f8,ym as f9,g6 as fA,f7 as fa,c7 as fb,Ri as fc,u8 as fd,Sm as fe,km as ff,wm as fg,Jt as fh,vm as fi,Me as fj,Cm as fk,xm as fl,Lm as fm,bc as fn,Ai as fo,fd as fp,Lc as fq,k6 as fr,C6 as fs,s7 as ft,b6 as fu,h7 as fv,Cc as fw,B7 as fx,m6 as fy,f6 as fz,Wn as g,W6 as h,me as i,Qn as j,Bs as k,g0 as l,P as m,M6 as n,C0 as o,j6 as p,Z6 as q,D6 as r,ps as s,K6 as t,_6 as u,a0 as v,e7 as w,pe as x,Pe as y,Ve as z};
|