From 4866d65cd2725599b4fe241002a2c772079c7de5 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Tue, 23 Jun 2026 20:11:59 -0700 Subject: [PATCH] chore: update Next.js build artifacts (2026-06-24 03:11 UTC, node v20.20.2) --- litellm/proxy/_experimental/out/404.html | 2 +- .../_experimental/out/__next.__PAGE__.txt | 48 +- .../proxy/_experimental/out/__next._full.txt | 121 ++-- .../proxy/_experimental/out/__next._head.txt | 8 +- .../proxy/_experimental/out/__next._index.txt | 14 +- .../proxy/_experimental/out/__next._tree.txt | 10 +- .../_buildManifest.js | 0 .../_clientMiddlewareManifest.js | 1 + .../_ssgManifest.js | 0 .../out/_next/static/chunks/0-2-9tcizw.kv.js | 1 + .../out/_next/static/chunks/0-4-0.z8w6y27.js | 1 + .../out/_next/static/chunks/0-_2om65ot6fh.js | 1 + .../{659ce28f2cb74401.js => 0-dwjzo6mg1t7.js} | 2 +- .../out/_next/static/chunks/0-mwvwyjihtq6.js | 3 + .../out/_next/static/chunks/0.6dhordmknmz.js | 1 + .../{a1ef280b7ad5ae6a.js => 0.75_v4.brf7u.js} | 0 .../out/_next/static/chunks/0.d2a_5_6-5pn.js | 2 + .../out/_next/static/chunks/0.je~3iy~k4ss.js | 1 + .../out/_next/static/chunks/0.kfwj93~uvc5.js | 8 + .../out/_next/static/chunks/0.u~fsd.paivu.js | 1 + .../_next/static/chunks/003f1ffc5817ab83.js | 1 - .../out/_next/static/chunks/00dq_sa6qt2eg.js | 1 + .../_next/static/chunks/00ff280cdb7d7ee5.js | 1 - .../out/_next/static/chunks/00mx~d442jr~o.js | 8 + .../{67570d9401e62846.js => 00p.gft-l.6p..js} | 4 +- .../{3b30ab8eaa03bc21.js => 00q4mtjboprhm.js} | 2 +- .../out/_next/static/chunks/00rvson..zjub.js | 10 + .../out/_next/static/chunks/00ym60oj49oo5.js | 1 + .../out/_next/static/chunks/00~.g-t.r9f51.js | 1 + .../out/_next/static/chunks/015yfy38oh-h8.js | 1 + .../out/_next/static/chunks/01apu~bleut.l.js | 40 ++ .../out/_next/static/chunks/01eoe.0n-q6.q.js | 1 + .../out/_next/static/chunks/01g5ls2__cy9q.js | 1 + .../out/_next/static/chunks/01n1bg17oxp8l.js | 12 + .../{754fc49bd90d2980.js => 01ne7gi3z97di.js} | 0 .../out/_next/static/chunks/01pr-g28x~.uu.js | 14 + .../out/_next/static/chunks/01qt_ege01u28.js | 1 + .../out/_next/static/chunks/01u0i~l49qpdz.js | 1 + .../out/_next/static/chunks/01xm1xt.gmrff.js | 3 + .../out/_next/static/chunks/01y._o853f7le.js | 4 + .../out/_next/static/chunks/022.sz94ycw4x.js | 4 + .../out/_next/static/chunks/0229ic_5ff586.js | 7 + .../{542a1a209eb732c6.js => 02_ols0zt.cn1.js} | 2 +- .../out/_next/static/chunks/02c9zh-2~xg8x.js | 8 + .../{7b788dd93ad868b3.js => 02ihc5xweq16v.js} | 0 .../{b1c98cc932a0ab19.js => 02v412-qgvyfr.js} | 0 .../{99cf9cf99df5ccfc.js => 036wlkuzplhfz.js} | 2 +- .../_next/static/chunks/0377ae18aae60c57.js | 1 - .../out/_next/static/chunks/03kdcij4tsege.js | 1 + .../{23bfdf9b0544f0b1.js => 03sse9mrz7omx.js} | 6 +- .../{a6dad97d9634a72d.js => 03~yq9q893hmn.js} | 0 .../out/_next/static/chunks/04.aj3k78v7ut.js | 8 + .../_next/static/chunks/048f065ef4eab631.js | 1 - .../_next/static/chunks/0493aafc4891dd29.js | 1 - .../out/_next/static/chunks/04advy-tbv1za.js | 420 ++++++++++++ .../out/_next/static/chunks/04jvxoid~vpxj.js | 1 + .../out/_next/static/chunks/04o4lz~y91s1r.css | 1 + .../{0c3e8651e0e97232.js => 05b_~th4crri2.js} | 0 .../_next/static/chunks/05fcbaa2a2d4ce24.js | 1 - .../out/_next/static/chunks/05iha4cgkkxu1.js | 7 + .../{9cca003867a68aa9.js => 05nip7kd~pjv1.js} | 2 +- .../out/_next/static/chunks/05qmwjqau64bz.css | 1 + .../out/_next/static/chunks/0634irnh4hmq6.js | 98 +++ .../out/_next/static/chunks/06gao0u0xy9th.js | 1 + .../out/_next/static/chunks/06l162pg8h_k5.js | 2 + .../out/_next/static/chunks/06uhwq-x7qrqc.js | 72 +++ .../out/_next/static/chunks/06vhmp61k2a89.js | 1 + .../out/_next/static/chunks/06~kt_oo6pz6v.js | 68 ++ .../out/_next/static/chunks/07.fwfv-sinb5.js | 4 + .../out/_next/static/chunks/070q-kt12zun~.js | 1 + .../out/_next/static/chunks/0746reu0n0hsv.js | 1 + .../out/_next/static/chunks/07dccx1d3kvno.js | 98 +++ .../{eea976cf4a05fc92.js => 07m0uxheepw8a.js} | 2 +- .../out/_next/static/chunks/07mja78mwknmt.js | 3 + .../out/_next/static/chunks/07ok39ppl.vl1.js | 1 + .../out/_next/static/chunks/082z.k8xhplq6.js | 1 + .../out/_next/static/chunks/08whp29_bth56.js | 98 +++ .../out/_next/static/chunks/09.lm5dax~l7e.js | 2 + .../out/_next/static/chunks/092z01ntb5nu~.js | 1 + .../_next/static/chunks/0974abc09c5e7ada.js | 1 - .../out/_next/static/chunks/098j5eweuy__x.js | 8 + .../out/_next/static/chunks/09h04rv0~.g9j.js | 10 + .../{c847ecdf8c790b0b.js => 09n64dqzn.le~.js} | 2 +- .../out/_next/static/chunks/09o_h3e0fwffd.js | 1 + .../out/_next/static/chunks/09w4-jcbs0w0w.js | 1 + .../out/_next/static/chunks/0_0ll_gosf9qi.js | 1 + .../{631b1874cba557c9.js => 0_2kvss2-vfen.js} | 2 +- .../out/_next/static/chunks/0_7p_0twqq2dv.js | 8 + .../{adb8beb738574863.js => 0_p625as00xbq.js} | 0 .../out/_next/static/chunks/0_wp7tq3f6six.js | 8 + .../out/_next/static/chunks/0_yxv247snpzp.js | 1 + .../_next/static/chunks/0a65da2cd24e2ab6.js | 3 - .../{ce44d74054c76c03.js => 0aa08wo9_4k-o.js} | 4 +- .../out/_next/static/chunks/0aivi0og~sj6k.js | 1 + .../out/_next/static/chunks/0b376ph2~1g5l.js | 1 + .../_next/static/chunks/0b3d09ff6c6e4335.js | 1 - .../_next/static/chunks/0b470ffc60999bf4.js | 1 - .../out/_next/static/chunks/0b5g~_decuer~.js | 1 + .../out/_next/static/chunks/0bcquh4rttjuy.js | 420 ++++++++++++ .../out/_next/static/chunks/0bzika30gg9sv.js | 1 + .../out/_next/static/chunks/0c.egkkrwi~pa.js | 1 + .../out/_next/static/chunks/0c20.u.cu4ruj.js | 8 + .../out/_next/static/chunks/0c4pfjjue0uc-.js | 86 +++ .../out/_next/static/chunks/0cb-3v6e0w~9w.js | 1 + .../out/_next/static/chunks/0cv239bgotud_.js | 1 + .../out/_next/static/chunks/0d__7i4f3uvws.js | 1 + .../out/_next/static/chunks/0da~.l_uihpug.js | 1 + .../{7b6bca6d63438103.js => 0dlrukrl-wbwl.js} | 0 .../out/_next/static/chunks/0dmfhvqon~mn~.js | 1 + .../out/_next/static/chunks/0dt4fjjwbrov2.js | 1 + .../out/_next/static/chunks/0dwmw2cspsg2a.js | 98 +++ .../out/_next/static/chunks/0dz69vhu32vzp.js | 1 + .../{cbfd53da3104be2a.js => 0e7nuqlfah86n.js} | 4 +- .../out/_next/static/chunks/0eeoyv3fh--5v.js | 14 + .../out/_next/static/chunks/0ek7vfd1hrb4_.js | 7 + .../out/_next/static/chunks/0em0654rb513m.js | 4 + .../out/_next/static/chunks/0f6t.sli9v9zt.js | 8 + .../out/_next/static/chunks/0fnkbcxr~4hwq.js | 1 + .../out/_next/static/chunks/0gb9pui.r~-sy.js | 1 + .../{403c4d96324c23a6.js => 0gqqvjn11_pp3.js} | 0 .../{1bc2898be56acd1b.js => 0gs8.sc1ds7.w.js} | 4 +- .../out/_next/static/chunks/0gszmhudlm6lw.js | 46 ++ .../out/_next/static/chunks/0h8dqeg931c1f.js | 8 + .../out/_next/static/chunks/0hb6gdno.2mf_.js | 8 + .../{84dd260c7412819c.js => 0hjh1x7qo041f.js} | 0 .../{68e50a37159f7d9a.js => 0hmiwn2p8zrxp.js} | 2 +- .../out/_next/static/chunks/0hpcwzoygs-ke.js | 8 + .../out/_next/static/chunks/0i._fjbrwi_m_.js | 14 + .../out/_next/static/chunks/0i7ndeqr5w1sc.js | 7 + .../{ca22b37c24b4d34a.js => 0igutkl9r09kl.js} | 2 +- .../out/_next/static/chunks/0ivj_wax-joap.js | 31 + .../out/_next/static/chunks/0j.~bvp831kae.js | 1 + .../out/_next/static/chunks/0je63_yy.8i72.js | 1 + .../out/_next/static/chunks/0jg_5ratzsghh.js | 1 + ...3f3fa56b5786d58c.css => 0jib1e4hgitwz.css} | 0 .../out/_next/static/chunks/0kf8wlk637e6v.js | 1 + .../out/_next/static/chunks/0ks4zvc_6qump.js | 1 + .../out/_next/static/chunks/0kwtf_ed0mkvx.js | 40 ++ .../out/_next/static/chunks/0lkwlvo53lk5c.js | 8 + .../out/_next/static/chunks/0lo51j3d423yv.js | 1 + .../out/_next/static/chunks/0lp0qkj93s9n6.js | 1 + .../out/_next/static/chunks/0m._ijxus~ryi.js | 4 + .../out/_next/static/chunks/0m6zdocif1gl4.js | 1 + .../{d3ac82723ec9e30d.js => 0mb3erwqomzal.js} | 2 +- .../out/_next/static/chunks/0mh1wnrvmv_y7.js | 4 + .../out/_next/static/chunks/0mzw3maijoev6.js | 1 + .../out/_next/static/chunks/0nfpc775w0b8-.js | 2 + .../{0549bc9afa7d4888.js => 0niabq1py.bpc.js} | 0 .../{4980372eaa37b78b.js => 0nnx~7-7e5t~1.js} | 5 +- .../out/_next/static/chunks/0o7mue3uybfhi.js | 1 + .../out/_next/static/chunks/0oefy62cva53s.js | 8 + .../out/_next/static/chunks/0pa20qk5s3rkt.js | 598 ++++++++++++++++++ .../out/_next/static/chunks/0pelwlztq2kwy.js | 7 + .../{c3c84f2fc1b1e9db.js => 0pfc18cphnnhd.js} | 2 +- .../out/_next/static/chunks/0pg.kj49bd73_.js | 1 + .../out/_next/static/chunks/0pidya1qvuvx8.js | 1 + .../out/_next/static/chunks/0pqu561k2bu1d.js | 1 + .../out/_next/static/chunks/0puul31_.zeq6.js | 10 + .../out/_next/static/chunks/0q250n2j99yss.js | 11 + .../out/_next/static/chunks/0q6~n4y84cejn.js | 1 + .../out/_next/static/chunks/0qbj1ah~dky~p.js | 98 +++ .../out/_next/static/chunks/0qikgxv.u0j9d.js | 1 + .../out/_next/static/chunks/0qoc_o8x~wqc6.js | 1 + .../out/_next/static/chunks/0rcz4p-.4b6cs.js | 420 ++++++++++++ .../out/_next/static/chunks/0r~kstxebvx-3.js | 2 + .../out/_next/static/chunks/0s-tn5h6qpp6i.js | 15 + .../out/_next/static/chunks/0sbwfmr31.cvw.js | 8 + .../out/_next/static/chunks/0sleuh3e9q.ww.js | 17 + .../out/_next/static/chunks/0szdm0s3h~vby.js | 1 + .../out/_next/static/chunks/0t0d45r_tvt4i.js | 1 + .../{f739f683b0e3528d.js => 0t5fhk-lwg.m_.js} | 0 .../out/_next/static/chunks/0t9.6.et.-spq.js | 1 + .../out/_next/static/chunks/0t_2obde5n17h.js | 7 + .../out/_next/static/chunks/0ta1ffddte5~e.js | 9 + .../out/_next/static/chunks/0tn9xeci9ulk~.js | 31 + .../{ca5fbafaf3826374.js => 0ttl0__m~5i8a.js} | 0 .../out/_next/static/chunks/0txi1wfn0-01d.js | 1 + .../out/_next/static/chunks/0tz7rml6rolh7.js | 14 + .../{ae420624472238ad.js => 0t~fchw5zb-4r.js} | 4 +- .../out/_next/static/chunks/0ugell4._eyay.js | 13 + .../out/_next/static/chunks/0uha0pnzl-vec.js | 1 + .../out/_next/static/chunks/0un2--nwsw-uk.js | 1 + .../{70591b116c194481.js => 0upl0pr28-8_j.js} | 0 .../out/_next/static/chunks/0usxgadggtc52.js | 1 + .../out/_next/static/chunks/0uuau~7-2j4eb.js | 1 + .../out/_next/static/chunks/0v-.p0q481gjy.js | 1 + .../out/_next/static/chunks/0v.0z34os-hl7.js | 1 + .../out/_next/static/chunks/0v1rxqc1hqmrl.js | 4 + .../out/_next/static/chunks/0v3d9_8xkvq3w.js | 39 ++ .../out/_next/static/chunks/0vawigy~j_gsx.js | 3 + .../out/_next/static/chunks/0vkkv~m8z3lv~.js | 1 + .../out/_next/static/chunks/0w0.ow0kdhtb-.js | 420 ++++++++++++ .../{43a9809839de4e6f.js => 0w9a1yg0dlbiw.js} | 0 .../out/_next/static/chunks/0wgk2liq6dqky.js | 1 + .../{0a6c418370a8c183.js => 0whkizop7gd0~.js} | 0 .../out/_next/static/chunks/0w~oa2pli-t56.js | 1 + .../out/_next/static/chunks/0x.73w57rn4ou.js | 1 + .../out/_next/static/chunks/0xqg~rk67rumc.js | 2 + .../out/_next/static/chunks/0x~b7xip-yufi.js | 8 + .../{fcad393dcc862a21.js => 0yblb2-hdk~lt.js} | 6 +- .../out/_next/static/chunks/0ybvtcd~xp-mx.js | 167 +++++ .../{134f728fa7099e3e.js => 0ylz5md8p6x7z.js} | 14 +- .../out/_next/static/chunks/0ys10755n8os_.js | 1 + .../out/_next/static/chunks/0zmz_tmhm2hsa.js | 7 + .../{5f9c3b92a016f382.js => 0zrbitbm~0koh.js} | 0 .../out/_next/static/chunks/0zxb95ki25y8w.js | 7 + .../{54563d12ee8915f4.js => 0~ozahatcu75y.js} | 0 .../out/_next/static/chunks/100mcnex8yqiz.js | 1 + .../_next/static/chunks/102e659fcec2585e.js | 8 - .../out/_next/static/chunks/102xsbbp.u4ar.js | 8 + .../out/_next/static/chunks/10aj2k~llf~ks.js | 20 + .../out/_next/static/chunks/10q34c2t7--5-.js | 1 + .../out/_next/static/chunks/10x7z8jgppbtw.js | 8 + .../out/_next/static/chunks/11ibt3khr2hk3.js | 1 + .../{26542a70b9512f71.js => 121g1kmcll0g6.js} | 8 +- .../_next/static/chunks/1251d58bd3ba113b.js | 98 --- .../out/_next/static/chunks/129bujhdmi9ce.js | 4 + .../out/_next/static/chunks/12w.m0_zg8wpq.js | 8 + .../_next/static/chunks/1300460219810c10.js | 4 - .../out/_next/static/chunks/137i07xf5e.xc.js | 1 + .../{3c2d67ecf9619f2b.js => 13br-6l.k_pmg.js} | 0 .../out/_next/static/chunks/13jg16smls48s.js | 7 + .../out/_next/static/chunks/13lfiw5-3ktce.js | 1 + .../out/_next/static/chunks/13ycgm4g26ez_.js | 1 + .../out/_next/static/chunks/13ysooad2u4zz.js | 1 + .../_next/static/chunks/140cf81b356b3239.js | 1 - .../out/_next/static/chunks/141iiyyx.5_qm.js | 8 + .../_next/static/chunks/1461020743acb21c.js | 1 - .../_next/static/chunks/14891020b3fb2fc3.js | 8 - .../out/_next/static/chunks/14f-vkwg4e_k..js | 98 +++ .../out/_next/static/chunks/14twssk6nf2_p.js | 1 + .../{878832edb30e99a4.js => 14ut9b-iwzfct.js} | 0 .../out/_next/static/chunks/15.9ylrtxojbj.js | 4 + .../{46d42331373d9805.js => 15b5n8fnfc228.js} | 0 .../out/_next/static/chunks/15cawsx7ayjee.js | 8 + .../out/_next/static/chunks/15fosz6-y91je.js | 1 + .../out/_next/static/chunks/15g0xeupk30ip.js | 8 + .../{54da342a06baf122.js => 15hm8gokjq2uu.js} | 2 +- .../out/_next/static/chunks/166fc~7u39du3.js | 1 + .../_next/static/chunks/16a1651c0b3e7c8e.js | 17 - .../_next/static/chunks/16c0e58809eaf2b5.js | 72 --- .../out/_next/static/chunks/17-i5j54jkv5l.js | 1 + .../out/_next/static/chunks/17.q2iay6h4dm.js | 2 + .../_next/static/chunks/175814061abf2c71.js | 1 - .../out/_next/static/chunks/177i7u.kpukgd.js | 1 + .../out/_next/static/chunks/17ia_4rs4y3n4.js | 420 ++++++++++++ .../{9955c118354ef6cc.js => 17u8.w6s717n2.js} | 2 +- .../out/_next/static/chunks/181y.ii57q7gs.js | 1 + .../out/_next/static/chunks/186viidwrwv_o.js | 1 + .../_next/static/chunks/18a9536fce05dc33.js | 1 - .../out/_next/static/chunks/18b1-~305a__9.js | 1 + .../_next/static/chunks/1a656c00638be9c7.js | 8 - .../_next/static/chunks/1a9ab640dd574eca.js | 1 - .../_next/static/chunks/1ab44e07f0b1cd5e.js | 1 - .../_next/static/chunks/1abad0fb1abdc83c.js | 2 - .../_next/static/chunks/1bfc3425410625f3.js | 1 - .../_next/static/chunks/1c881baaaa68b7a5.js | 98 --- .../_next/static/chunks/222fa988d93d834f.js | 1 - .../_next/static/chunks/23491c78faf959c9.js | 1 - .../_next/static/chunks/25d8f4225095b808.js | 1 - .../_next/static/chunks/27c7596aa0326b71.js | 4 - .../_next/static/chunks/28e332ef9497a292.js | 1 - .../_next/static/chunks/2971c4658f1bcd7d.js | 1 - .../_next/static/chunks/2a5f4a7388e54210.js | 68 -- .../_next/static/chunks/2b682a7f2932def8.js | 11 - .../_next/static/chunks/2bca6e6a96b0858a.js | 1 - .../_next/static/chunks/3310f8d28e1d8cfa.js | 8 - .../_next/static/chunks/3356ae3643d24081.js | 3 - .../_next/static/chunks/35c3d528354208f4.js | 1 - .../_next/static/chunks/3648e0a5f38c5d36.js | 1 - .../_next/static/chunks/36ccc2b555a26ad4.js | 4 - .../_next/static/chunks/3ba782adb71e77d0.js | 7 - .../_next/static/chunks/42a4beeb4aa01eba.js | 1 - .../_next/static/chunks/4869cdb44fe43698.js | 1 - .../_next/static/chunks/496b84010c33cf69.js | 1 - .../_next/static/chunks/4e06277331e725da.js | 167 ----- .../_next/static/chunks/4e17b625d75327a7.js | 7 - .../_next/static/chunks/4e20891f2fd03463.css | 1 - .../_next/static/chunks/4e3eafbea2035508.js | 98 --- .../_next/static/chunks/5181a28310842d3d.js | 3 - .../_next/static/chunks/518eb8c7598afad6.js | 1 - .../_next/static/chunks/5282ed7355826608.js | 1 - .../_next/static/chunks/5387bd8bd4bcf195.js | 14 - .../_next/static/chunks/5489ec6b9761f819.js | 1 - .../_next/static/chunks/570b2e10aa856e54.js | 1 - .../_next/static/chunks/570d770996d98e0f.js | 1 - .../_next/static/chunks/57a2860decebc0b6.js | 1 - .../_next/static/chunks/59e0c0c187697b37.js | 14 - .../_next/static/chunks/5a69756708c8900c.js | 1 - .../_next/static/chunks/5aa498497363ab6c.js | 1 - .../_next/static/chunks/5b2b7fd4dd9a44f3.js | 4 - .../_next/static/chunks/5b9c0b6d6c814e58.js | 1 - .../_next/static/chunks/5c9bf87d25400872.js | 1 - .../_next/static/chunks/60d3701e4f82c4ff.js | 1 - .../_next/static/chunks/6764a89c3c614835.js | 4 - .../_next/static/chunks/679dbd657c8b5aef.js | 31 - .../_next/static/chunks/6ac5e2383054326d.js | 10 - .../_next/static/chunks/6c4c97f1ea6e7d77.js | 4 - .../_next/static/chunks/6df5e16ab3d367ef.js | 17 - .../_next/static/chunks/6edd697afbcf3405.js | 1 - .../_next/static/chunks/71dc4f719feed2c0.js | 1 - .../_next/static/chunks/71f6f0fcaef91598.js | 1 - .../_next/static/chunks/726579f2940c2a2f.js | 1 - .../_next/static/chunks/726bebeef472c6cb.js | 1 - .../_next/static/chunks/738c339383c3b4b6.js | 1 - .../_next/static/chunks/73b7998f9fa9c4c2.js | 1 - .../_next/static/chunks/7425e467262c0658.js | 14 - .../_next/static/chunks/76d25012c7da52a0.js | 8 - .../_next/static/chunks/7a9066dcd4a390ff.js | 1 - .../_next/static/chunks/7b46d83da0ba9049.js | 1 - .../_next/static/chunks/7c552f88245cdd96.js | 1 - .../_next/static/chunks/7e417dd24c8becd0.js | 1 - .../_next/static/chunks/7e5fe5584502da06.js | 46 -- .../_next/static/chunks/7f7819822e72bcae.js | 2 - .../_next/static/chunks/80749a6dab9b96b4.js | 14 - .../_next/static/chunks/80fc3fb8d0c44655.js | 1 - .../_next/static/chunks/827c38ee3538aeb8.js | 1 - .../_next/static/chunks/8489ea6f0be86483.js | 1 - .../_next/static/chunks/87573aaa9c57fc3a.js | 98 --- .../_next/static/chunks/88001a7ecaf7b1af.js | 1 - .../_next/static/chunks/88c74f8b4b20d25a.js | 1 - .../_next/static/chunks/8c4d9ca78c194144.js | 8 - .../_next/static/chunks/8f3bf592254c6c3b.js | 1 - .../_next/static/chunks/908828a91f602d8b.js | 86 --- .../_next/static/chunks/91037395c95e366d.css | 1 - .../_next/static/chunks/928d0c629f28babb.js | 14 - .../_next/static/chunks/92cf5d832080641f.js | 13 - .../_next/static/chunks/939e8a7d52fbe9ce.js | 8 - .../_next/static/chunks/93c3938d8d8704b3.js | 38 -- .../_next/static/chunks/95b1023fa868f012.js | 14 - .../_next/static/chunks/975f380f5d2c2b7d.js | 2 - .../_next/static/chunks/98efd843bd5a0758.js | 1 - .../_next/static/chunks/993822065369ee18.js | 14 - .../_next/static/chunks/9e09de50158b3159.js | 1 - .../_next/static/chunks/a06cc76a774dd182.js | 13 - .../_next/static/chunks/a09028cd611c08ef.js | 2 - .../_next/static/chunks/a0ce6f40daef039a.js | 1 - .../_next/static/chunks/a0f302271a793712.js | 4 - .../_next/static/chunks/a3af1b3a5c791b3e.js | 1 - .../static/chunks/a6dad97d9634a72d.js.map | 1 - .../_next/static/chunks/a8f7c8c5eeb6e042.js | 1 - .../_next/static/chunks/aaa545ba3e90f434.js | 1 - .../_next/static/chunks/aac7c99aa647e49d.js | 9 - .../_next/static/chunks/aba51a6559eb06c7.js | 14 - .../_next/static/chunks/abf1a802816f8f5a.js | 1 - .../_next/static/chunks/ac3eece174ae3ee9.js | 98 --- .../_next/static/chunks/ad02f56c287539eb.js | 1 - .../_next/static/chunks/adbc9cda75866ec1.js | 8 - .../_next/static/chunks/adf8db17652cf9aa.js | 1 - .../_next/static/chunks/adfd07c864335b45.js | 1 - .../_next/static/chunks/ae625aa52246581e.js | 598 ------------------ .../_next/static/chunks/af6fc0727c3097de.js | 1 - .../_next/static/chunks/b3d198d6c56a21b8.js | 13 - .../_next/static/chunks/b4505a784b9b23e6.js | 98 --- .../_next/static/chunks/b9341b4c942e3943.js | 14 - .../_next/static/chunks/baadbd26839e7b66.js | 1 - .../_next/static/chunks/bd31e2f87615de8b.js | 1 - .../_next/static/chunks/bd799dc9aa7f786a.js | 420 ------------ .../_next/static/chunks/bde2340071127430.js | 1 - .../_next/static/chunks/bf30ce92e35d0d54.js | 8 - .../_next/static/chunks/bfbc736ab510b9aa.js | 2 - .../_next/static/chunks/c058ac3e89dc33df.js | 1 - .../_next/static/chunks/c1efd92d6b02ddc9.js | 1 - .../_next/static/chunks/c24ccfc46ac95900.js | 1 - .../_next/static/chunks/c439a1e9093448b5.js | 1 - .../_next/static/chunks/c77d417e8a84d57c.js | 17 - .../_next/static/chunks/c7db6d1325b26f45.js | 1 - .../_next/static/chunks/c93d5122cac84bc6.js | 14 - .../_next/static/chunks/cb8e6ba28461af15.js | 4 - .../_next/static/chunks/cbc99c8fae110c02.js | 17 - .../_next/static/chunks/cbdff18b8d0102ff.js | 2 - .../_next/static/chunks/ccd21850ee94c92e.js | 1 - .../_next/static/chunks/cfa0acae44b4288b.js | 7 - .../_next/static/chunks/d3d0acca9a72b37a.js | 1 - .../_next/static/chunks/d720c3179e45c754.js | 420 ------------ .../_next/static/chunks/d7798a4e148be3fe.js | 1 - .../_next/static/chunks/d7aa89e52e3d1758.js | 1 - .../_next/static/chunks/d84d93ec5e05aece.js | 1 - .../_next/static/chunks/d96012bcfc98706a.js | 1 - .../_next/static/chunks/da505418e8e8af34.js | 20 - .../_next/static/chunks/dae72c93f180b49f.js | 1 - .../_next/static/chunks/dbca964212122d58.js | 1 - .../_next/static/chunks/dbf6a58fdc648c8d.js | 1 - .../_next/static/chunks/dc8c6d1742643c95.js | 1 - .../_next/static/chunks/e03c46f5f6c919c6.js | 1 - .../_next/static/chunks/e099566e8bd4ee4e.js | 1 - .../_next/static/chunks/e1f23fd814ac3500.js | 4 - .../_next/static/chunks/e29e363f6c8abbd7.js | 420 ------------ .../_next/static/chunks/e2e17b99dc4f7bfa.js | 1 - .../_next/static/chunks/e619760a0baf9a7e.js | 1 - .../_next/static/chunks/e620284e1d071312.js | 1 - .../_next/static/chunks/e96398764f77c728.js | 2 - .../_next/static/chunks/ead0794ce27b66ce.js | 1 - .../_next/static/chunks/eaeb6c071ee29f14.js | 3 - .../_next/static/chunks/ee5f9a39a526e423.js | 1 - .../_next/static/chunks/f3fbc1bcf9fcd444.js | 1 - .../_next/static/chunks/f48aa7c7bdc85371.js | 1 - .../_next/static/chunks/f6fe773610e02694.js | 420 ------------ .../_next/static/chunks/f7e1d08418645368.js | 1 - .../_next/static/chunks/fa11bea8d4771df2.js | 420 ------------ .../_next/static/chunks/fc5911e3a3caa8aa.js | 1 - .../_next/static/chunks/fcdf7322b0aa3e2e.js | 1 - .../static/chunks/turbopack-11jy90nmmzlgr.js | 1 + .../chunks/turbopack-ddedb29a5eb0118f.js | 4 - ...=> 1bffadaabf893a1e-s.16ipb6fqu393i.woff2} | Bin ...=> 2bbe8d2671613f1f-s.067x_6k0k23tk.woff2} | Bin ...=> 2c55a0e60120577a-s.0bjc5tiuqdqro.woff2} | Bin ...=> 5476f68d60460930-s.0wxq9webf.ew4.woff2} | Bin ... 83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2} | Bin ...=> 9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2} | Bin ...=> ad66f9afd8947f86-s.11u06r12fd6v_.woff2} | Bin ...1d32c690.ico => favicon.0~dgapwhi~75y.ico} | Bin .../_clientMiddlewareManifest.json | 1 - .../proxy/_experimental/out/_not-found.html | 2 +- .../proxy/_experimental/out/_not-found.txt | 30 +- .../out/_not-found/__next._full.txt | 30 +- .../out/_not-found/__next._head.txt | 8 +- .../out/_not-found/__next._index.txt | 14 +- .../_not-found/__next._not-found.__PAGE__.txt | 4 +- .../out/_not-found/__next._not-found.txt | 7 +- .../out/_not-found/__next._tree.txt | 6 +- .../_experimental/out/api-reference.html | 2 +- .../proxy/_experimental/out/api-reference.txt | 54 +- ...KGRhc2hib2FyZCk.api-reference.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.api-reference.txt | 7 +- .../api-reference/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/api-reference/__next._full.txt | 54 +- .../out/api-reference/__next._head.txt | 8 +- .../out/api-reference/__next._index.txt | 14 +- .../out/api-reference/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/chat.html | 2 +- litellm/proxy/_experimental/out/chat.txt | 37 +- .../_experimental/out/chat/__next._full.txt | 37 +- .../_experimental/out/chat/__next._head.txt | 8 +- .../_experimental/out/chat/__next._index.txt | 14 +- .../_experimental/out/chat/__next._tree.txt | 8 +- .../out/chat/__next.chat.__PAGE__.txt | 8 +- .../_experimental/out/chat/__next.chat.txt | 7 +- .../out/experimental/api-playground.html | 2 +- .../out/experimental/api-playground.txt | 56 +- ...k.experimental.api-playground.__PAGE__.txt | 10 +- ...2hib2FyZCk.experimental.api-playground.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../api-playground/__next._full.txt | 56 +- .../api-playground/__next._head.txt | 8 +- .../api-playground/__next._index.txt | 14 +- .../api-playground/__next._tree.txt | 8 +- .../out/experimental/budgets.html | 2 +- .../out/experimental/budgets.txt | 54 +- ...ib2FyZCk.experimental.budgets.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.experimental.budgets.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../budgets/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/experimental/budgets/__next._full.txt | 54 +- .../out/experimental/budgets/__next._head.txt | 8 +- .../experimental/budgets/__next._index.txt | 14 +- .../out/experimental/budgets/__next._tree.txt | 8 +- .../out/experimental/caching.html | 2 +- .../out/experimental/caching.txt | 54 +- ...ib2FyZCk.experimental.caching.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.experimental.caching.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../caching/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/experimental/caching/__next._full.txt | 54 +- .../out/experimental/caching/__next._head.txt | 8 +- .../experimental/caching/__next._index.txt | 14 +- .../out/experimental/caching/__next._tree.txt | 8 +- .../out/experimental/claude-code-plugins.html | 2 +- .../out/experimental/claude-code-plugins.txt | 56 +- ...erimental.claude-code-plugins.__PAGE__.txt | 10 +- ...FyZCk.experimental.claude-code-plugins.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../claude-code-plugins/__next._full.txt | 56 +- .../claude-code-plugins/__next._head.txt | 8 +- .../claude-code-plugins/__next._index.txt | 14 +- .../claude-code-plugins/__next._tree.txt | 8 +- .../out/experimental/old-usage.html | 2 +- .../out/experimental/old-usage.txt | 54 +- ...2FyZCk.experimental.old-usage.__PAGE__.txt | 10 +- ...KGRhc2hib2FyZCk.experimental.old-usage.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../old-usage/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../experimental/old-usage/__next._full.txt | 54 +- .../experimental/old-usage/__next._head.txt | 8 +- .../experimental/old-usage/__next._index.txt | 14 +- .../experimental/old-usage/__next._tree.txt | 8 +- .../out/experimental/prompts.html | 2 +- .../out/experimental/prompts.txt | 54 +- ...ib2FyZCk.experimental.prompts.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.experimental.prompts.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../prompts/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/experimental/prompts/__next._full.txt | 54 +- .../out/experimental/prompts/__next._head.txt | 8 +- .../experimental/prompts/__next._index.txt | 14 +- .../out/experimental/prompts/__next._tree.txt | 8 +- .../out/experimental/tag-management.html | 2 +- .../out/experimental/tag-management.txt | 56 +- ...k.experimental.tag-management.__PAGE__.txt | 10 +- ...2hib2FyZCk.experimental.tag-management.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../tag-management/__next._full.txt | 56 +- .../tag-management/__next._head.txt | 8 +- .../tag-management/__next._index.txt | 14 +- .../tag-management/__next._tree.txt | 8 +- .../proxy/_experimental/out/guardrails.html | 2 +- .../proxy/_experimental/out/guardrails.txt | 55 +- ...t.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.guardrails.txt | 7 +- .../guardrails/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/guardrails/__next._full.txt | 55 +- .../out/guardrails/__next._head.txt | 8 +- .../out/guardrails/__next._index.txt | 14 +- .../out/guardrails/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 121 ++-- litellm/proxy/_experimental/out/login.html | 2 +- litellm/proxy/_experimental/out/login.txt | 36 +- .../_experimental/out/login/__next._full.txt | 36 +- .../_experimental/out/login/__next._head.txt | 8 +- .../_experimental/out/login/__next._index.txt | 14 +- .../_experimental/out/login/__next._tree.txt | 8 +- .../out/login/__next.login.__PAGE__.txt | 8 +- .../_experimental/out/login/__next.login.txt | 7 +- litellm/proxy/_experimental/out/logs.html | 2 +- litellm/proxy/_experimental/out/logs.txt | 57 +- .../__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt | 12 +- .../out/logs/__next.!KGRhc2hib2FyZCk.logs.txt | 7 +- .../out/logs/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../_experimental/out/logs/__next._full.txt | 57 +- .../_experimental/out/logs/__next._head.txt | 8 +- .../_experimental/out/logs/__next._index.txt | 14 +- .../_experimental/out/logs/__next._tree.txt | 10 +- .../_experimental/out/mcp/oauth/callback.html | 2 +- .../_experimental/out/mcp/oauth/callback.txt | 36 +- .../out/mcp/oauth/callback/__next._full.txt | 36 +- .../out/mcp/oauth/callback/__next._head.txt | 8 +- .../out/mcp/oauth/callback/__next._index.txt | 14 +- .../out/mcp/oauth/callback/__next._tree.txt | 8 +- .../__next.mcp.oauth.callback.__PAGE__.txt | 8 +- .../callback/__next.mcp.oauth.callback.txt | 7 +- .../mcp/oauth/callback/__next.mcp.oauth.txt | 7 +- .../out/mcp/oauth/callback/__next.mcp.txt | 7 +- .../proxy/_experimental/out/model-hub.html | 2 +- litellm/proxy/_experimental/out/model-hub.txt | 55 +- ...xt.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.model-hub.txt | 7 +- .../out/model-hub/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/model-hub/__next._full.txt | 55 +- .../out/model-hub/__next._head.txt | 8 +- .../out/model-hub/__next._index.txt | 14 +- .../out/model-hub/__next._tree.txt | 8 +- .../proxy/_experimental/out/model_hub.html | 2 +- litellm/proxy/_experimental/out/model_hub.txt | 44 +- .../out/model_hub/__next._full.txt | 44 +- .../out/model_hub/__next._head.txt | 8 +- .../out/model_hub/__next._index.txt | 14 +- .../out/model_hub/__next._tree.txt | 8 +- .../model_hub/__next.model_hub.__PAGE__.txt | 8 +- .../out/model_hub/__next.model_hub.txt | 7 +- .../_experimental/out/model_hub_table.html | 2 +- .../_experimental/out/model_hub_table.txt | 53 +- .../out/model_hub_table/__next._full.txt | 53 +- .../out/model_hub_table/__next._head.txt | 8 +- .../out/model_hub_table/__next._index.txt | 14 +- .../out/model_hub_table/__next._tree.txt | 8 +- .../__next.model_hub_table.__PAGE__.txt | 8 +- .../__next.model_hub_table.txt | 7 +- .../out/models-and-endpoints.html | 2 +- .../out/models-and-endpoints.txt | 54 +- ...ib2FyZCk.models-and-endpoints.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.models-and-endpoints.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/models-and-endpoints/__next._full.txt | 54 +- .../out/models-and-endpoints/__next._head.txt | 8 +- .../models-and-endpoints/__next._index.txt | 14 +- .../out/models-and-endpoints/__next._tree.txt | 8 +- .../proxy/_experimental/out/onboarding.html | 2 +- .../proxy/_experimental/out/onboarding.txt | 36 +- .../out/onboarding/__next._full.txt | 36 +- .../out/onboarding/__next._head.txt | 8 +- .../out/onboarding/__next._index.txt | 14 +- .../out/onboarding/__next._tree.txt | 8 +- .../onboarding/__next.onboarding.__PAGE__.txt | 8 +- .../out/onboarding/__next.onboarding.txt | 7 +- .../_experimental/out/organizations.html | 2 +- .../proxy/_experimental/out/organizations.txt | 54 +- ...KGRhc2hib2FyZCk.organizations.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.organizations.txt | 7 +- .../organizations/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/organizations/__next._full.txt | 54 +- .../out/organizations/__next._head.txt | 8 +- .../out/organizations/__next._index.txt | 14 +- .../out/organizations/__next._tree.txt | 8 +- .../proxy/_experimental/out/playground.html | 2 +- .../proxy/_experimental/out/playground.txt | 55 +- ...t.!KGRhc2hib2FyZCk.playground.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.playground.txt | 7 +- .../playground/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/playground/__next._full.txt | 55 +- .../out/playground/__next._head.txt | 8 +- .../out/playground/__next._index.txt | 14 +- .../out/playground/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/policies.html | 2 +- litellm/proxy/_experimental/out/policies.txt | 55 +- ...ext.!KGRhc2hib2FyZCk.policies.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.policies.txt | 7 +- .../out/policies/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/policies/__next._full.txt | 55 +- .../out/policies/__next._head.txt | 8 +- .../out/policies/__next._index.txt | 14 +- .../out/policies/__next._tree.txt | 8 +- .../out/settings/admin-settings.html | 2 +- .../out/settings/admin-settings.txt | 54 +- ...FyZCk.settings.admin-settings.__PAGE__.txt | 10 +- ...GRhc2hib2FyZCk.settings.admin-settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../settings/admin-settings/__next._full.txt | 54 +- .../settings/admin-settings/__next._head.txt | 8 +- .../settings/admin-settings/__next._index.txt | 14 +- .../settings/admin-settings/__next._tree.txt | 8 +- .../out/settings/logging-and-alerts.html | 2 +- .../out/settings/logging-and-alerts.txt | 56 +- ...k.settings.logging-and-alerts.__PAGE__.txt | 10 +- ...2hib2FyZCk.settings.logging-and-alerts.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../logging-and-alerts/__next._full.txt | 56 +- .../logging-and-alerts/__next._head.txt | 8 +- .../logging-and-alerts/__next._index.txt | 14 +- .../logging-and-alerts/__next._tree.txt | 8 +- .../out/settings/router-settings.html | 2 +- .../out/settings/router-settings.txt | 54 +- ...yZCk.settings.router-settings.__PAGE__.txt | 10 +- ...Rhc2hib2FyZCk.settings.router-settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../settings/router-settings/__next._full.txt | 54 +- .../settings/router-settings/__next._head.txt | 8 +- .../router-settings/__next._index.txt | 14 +- .../settings/router-settings/__next._tree.txt | 8 +- .../_experimental/out/settings/ui-theme.html | 2 +- .../_experimental/out/settings/ui-theme.txt | 54 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- ...c2hib2FyZCk.settings.ui-theme.__PAGE__.txt | 10 +- ...ext.!KGRhc2hib2FyZCk.settings.ui-theme.txt | 7 +- .../ui-theme/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/settings/ui-theme/__next._full.txt | 54 +- .../out/settings/ui-theme/__next._head.txt | 8 +- .../out/settings/ui-theme/__next._index.txt | 14 +- .../out/settings/ui-theme/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/skills.html | 2 +- litellm/proxy/_experimental/out/skills.txt | 55 +- ..._next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt | 10 +- .../skills/__next.!KGRhc2hib2FyZCk.skills.txt | 7 +- .../out/skills/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../_experimental/out/skills/__next._full.txt | 55 +- .../_experimental/out/skills/__next._head.txt | 8 +- .../out/skills/__next._index.txt | 14 +- .../_experimental/out/skills/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/teams.html | 2 +- litellm/proxy/_experimental/out/teams.txt | 55 +- ...__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt | 10 +- .../teams/__next.!KGRhc2hib2FyZCk.teams.txt | 7 +- .../out/teams/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../_experimental/out/teams/__next._full.txt | 55 +- .../_experimental/out/teams/__next._head.txt | 8 +- .../_experimental/out/teams/__next._index.txt | 14 +- .../_experimental/out/teams/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/test-key.html | 2 +- litellm/proxy/_experimental/out/test-key.txt | 55 +- ...ext.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.test-key.txt | 7 +- .../out/test-key/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/test-key/__next._full.txt | 55 +- .../out/test-key/__next._head.txt | 8 +- .../out/test-key/__next._index.txt | 14 +- .../out/test-key/__next._tree.txt | 8 +- .../_experimental/out/tools/mcp-servers.html | 2 +- .../_experimental/out/tools/mcp-servers.txt | 54 +- ...c2hib2FyZCk.tools.mcp-servers.__PAGE__.txt | 10 +- ...ext.!KGRhc2hib2FyZCk.tools.mcp-servers.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 7 +- .../mcp-servers/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/tools/mcp-servers/__next._full.txt | 54 +- .../out/tools/mcp-servers/__next._head.txt | 8 +- .../out/tools/mcp-servers/__next._index.txt | 14 +- .../out/tools/mcp-servers/__next._tree.txt | 8 +- .../out/tools/vector-stores.html | 2 +- .../_experimental/out/tools/vector-stores.txt | 54 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 7 +- ...hib2FyZCk.tools.vector-stores.__PAGE__.txt | 10 +- ...t.!KGRhc2hib2FyZCk.tools.vector-stores.txt | 7 +- .../vector-stores/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/tools/vector-stores/__next._full.txt | 54 +- .../out/tools/vector-stores/__next._head.txt | 8 +- .../out/tools/vector-stores/__next._index.txt | 14 +- .../out/tools/vector-stores/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/usage.html | 2 +- litellm/proxy/_experimental/out/usage.txt | 55 +- .../out/usage/__next.!KGRhc2hib2FyZCk.txt | 10 +- ...__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt | 10 +- .../usage/__next.!KGRhc2hib2FyZCk.usage.txt | 7 +- .../_experimental/out/usage/__next._full.txt | 55 +- .../_experimental/out/usage/__next._head.txt | 8 +- .../_experimental/out/usage/__next._index.txt | 14 +- .../_experimental/out/usage/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/users.html | 2 +- litellm/proxy/_experimental/out/users.txt | 55 +- .../out/users/__next.!KGRhc2hib2FyZCk.txt | 10 +- ...__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt | 10 +- .../users/__next.!KGRhc2hib2FyZCk.users.txt | 7 +- .../_experimental/out/users/__next._full.txt | 55 +- .../_experimental/out/users/__next._head.txt | 8 +- .../_experimental/out/users/__next._index.txt | 14 +- .../_experimental/out/users/__next._tree.txt | 8 +- .../proxy/_experimental/out/virtual-keys.html | 2 +- .../proxy/_experimental/out/virtual-keys.txt | 55 +- .../virtual-keys/__next.!KGRhc2hib2FyZCk.txt | 10 +- ...!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.virtual-keys.txt | 7 +- .../out/virtual-keys/__next._full.txt | 55 +- .../out/virtual-keys/__next._head.txt | 8 +- .../out/virtual-keys/__next._index.txt | 14 +- .../out/virtual-keys/__next._tree.txt | 8 +- 729 files changed, 7616 insertions(+), 7155 deletions(-) rename litellm/proxy/_experimental/out/_next/static/{wnL6e5S6xaG1UdkxtYrTo => PZDanZV-ljBIcZvhlqMk5}/_buildManifest.js (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_clientMiddlewareManifest.js rename litellm/proxy/_experimental/out/_next/static/{wnL6e5S6xaG1UdkxtYrTo => PZDanZV-ljBIcZvhlqMk5}/_ssgManifest.js (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-_2om65ot6fh.js rename litellm/proxy/_experimental/out/_next/static/chunks/{659ce28f2cb74401.js => 0-dwjzo6mg1t7.js} (75%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-mwvwyjihtq6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js rename litellm/proxy/_experimental/out/_next/static/chunks/{a1ef280b7ad5ae6a.js => 0.75_v4.brf7u.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.je~3iy~k4ss.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.kfwj93~uvc5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.u~fsd.paivu.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/003f1ffc5817ab83.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00dq_sa6qt2eg.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00ff280cdb7d7ee5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00mx~d442jr~o.js rename litellm/proxy/_experimental/out/_next/static/chunks/{67570d9401e62846.js => 00p.gft-l.6p..js} (97%) rename litellm/proxy/_experimental/out/_next/static/chunks/{3b30ab8eaa03bc21.js => 00q4mtjboprhm.js} (93%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00rvson..zjub.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00ym60oj49oo5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00~.g-t.r9f51.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/015yfy38oh-h8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01apu~bleut.l.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01eoe.0n-q6.q.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01g5ls2__cy9q.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01n1bg17oxp8l.js rename litellm/proxy/_experimental/out/_next/static/chunks/{754fc49bd90d2980.js => 01ne7gi3z97di.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01pr-g28x~.uu.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01qt_ege01u28.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01u0i~l49qpdz.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01xm1xt.gmrff.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01y._o853f7le.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/022.sz94ycw4x.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0229ic_5ff586.js rename litellm/proxy/_experimental/out/_next/static/chunks/{542a1a209eb732c6.js => 02_ols0zt.cn1.js} (94%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/02c9zh-2~xg8x.js rename litellm/proxy/_experimental/out/_next/static/chunks/{7b788dd93ad868b3.js => 02ihc5xweq16v.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{b1c98cc932a0ab19.js => 02v412-qgvyfr.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{99cf9cf99df5ccfc.js => 036wlkuzplhfz.js} (95%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0377ae18aae60c57.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/03kdcij4tsege.js rename litellm/proxy/_experimental/out/_next/static/chunks/{23bfdf9b0544f0b1.js => 03sse9mrz7omx.js} (62%) rename litellm/proxy/_experimental/out/_next/static/chunks/{a6dad97d9634a72d.js => 03~yq9q893hmn.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/04.aj3k78v7ut.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/048f065ef4eab631.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0493aafc4891dd29.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/04advy-tbv1za.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/04o4lz~y91s1r.css rename litellm/proxy/_experimental/out/_next/static/chunks/{0c3e8651e0e97232.js => 05b_~th4crri2.js} (100%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05fcbaa2a2d4ce24.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05iha4cgkkxu1.js rename litellm/proxy/_experimental/out/_next/static/chunks/{9cca003867a68aa9.js => 05nip7kd~pjv1.js} (52%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05qmwjqau64bz.css create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0634irnh4hmq6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06gao0u0xy9th.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06l162pg8h_k5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06uhwq-x7qrqc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06vhmp61k2a89.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06~kt_oo6pz6v.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/07.fwfv-sinb5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/070q-kt12zun~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0746reu0n0hsv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/07dccx1d3kvno.js rename litellm/proxy/_experimental/out/_next/static/chunks/{eea976cf4a05fc92.js => 07m0uxheepw8a.js} (91%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/07mja78mwknmt.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/07ok39ppl.vl1.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/082z.k8xhplq6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/08whp29_bth56.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09.lm5dax~l7e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/092z01ntb5nu~.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0974abc09c5e7ada.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/098j5eweuy__x.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09h04rv0~.g9j.js rename litellm/proxy/_experimental/out/_next/static/chunks/{c847ecdf8c790b0b.js => 09n64dqzn.le~.js} (89%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09o_h3e0fwffd.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09w4-jcbs0w0w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_0ll_gosf9qi.js rename litellm/proxy/_experimental/out/_next/static/chunks/{631b1874cba557c9.js => 0_2kvss2-vfen.js} (96%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_7p_0twqq2dv.js rename litellm/proxy/_experimental/out/_next/static/chunks/{adb8beb738574863.js => 0_p625as00xbq.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_wp7tq3f6six.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_yxv247snpzp.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0a65da2cd24e2ab6.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ce44d74054c76c03.js => 0aa08wo9_4k-o.js} (55%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0aivi0og~sj6k.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b376ph2~1g5l.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b3d09ff6c6e4335.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b470ffc60999bf4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b5g~_decuer~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0bcquh4rttjuy.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0bzika30gg9sv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0c.egkkrwi~pa.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0c20.u.cu4ruj.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0cb-3v6e0w~9w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0cv239bgotud_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0d__7i4f3uvws.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0da~.l_uihpug.js rename litellm/proxy/_experimental/out/_next/static/chunks/{7b6bca6d63438103.js => 0dlrukrl-wbwl.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dmfhvqon~mn~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dt4fjjwbrov2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dwmw2cspsg2a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dz69vhu32vzp.js rename litellm/proxy/_experimental/out/_next/static/chunks/{cbfd53da3104be2a.js => 0e7nuqlfah86n.js} (60%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0eeoyv3fh--5v.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ek7vfd1hrb4_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0em0654rb513m.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0f6t.sli9v9zt.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0fnkbcxr~4hwq.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0gb9pui.r~-sy.js rename litellm/proxy/_experimental/out/_next/static/chunks/{403c4d96324c23a6.js => 0gqqvjn11_pp3.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{1bc2898be56acd1b.js => 0gs8.sc1ds7.w.js} (61%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0gszmhudlm6lw.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0h8dqeg931c1f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0hb6gdno.2mf_.js rename litellm/proxy/_experimental/out/_next/static/chunks/{84dd260c7412819c.js => 0hjh1x7qo041f.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{68e50a37159f7d9a.js => 0hmiwn2p8zrxp.js} (75%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0hpcwzoygs-ke.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0i._fjbrwi_m_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0i7ndeqr5w1sc.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ca22b37c24b4d34a.js => 0igutkl9r09kl.js} (94%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ivj_wax-joap.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0j.~bvp831kae.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0je63_yy.8i72.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0jg_5ratzsghh.js rename litellm/proxy/_experimental/out/_next/static/chunks/{3f3fa56b5786d58c.css => 0jib1e4hgitwz.css} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0kf8wlk637e6v.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ks4zvc_6qump.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0kwtf_ed0mkvx.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0lkwlvo53lk5c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0lo51j3d423yv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0lp0qkj93s9n6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0m._ijxus~ryi.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0m6zdocif1gl4.js rename litellm/proxy/_experimental/out/_next/static/chunks/{d3ac82723ec9e30d.js => 0mb3erwqomzal.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0mh1wnrvmv_y7.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0mzw3maijoev6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0nfpc775w0b8-.js rename litellm/proxy/_experimental/out/_next/static/chunks/{0549bc9afa7d4888.js => 0niabq1py.bpc.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{4980372eaa37b78b.js => 0nnx~7-7e5t~1.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0o7mue3uybfhi.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0oefy62cva53s.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pa20qk5s3rkt.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pelwlztq2kwy.js rename litellm/proxy/_experimental/out/_next/static/chunks/{c3c84f2fc1b1e9db.js => 0pfc18cphnnhd.js} (90%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pg.kj49bd73_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pidya1qvuvx8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pqu561k2bu1d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0puul31_.zeq6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0q250n2j99yss.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0q6~n4y84cejn.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0qbj1ah~dky~p.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0qikgxv.u0j9d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0qoc_o8x~wqc6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0rcz4p-.4b6cs.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0r~kstxebvx-3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0s-tn5h6qpp6i.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0sbwfmr31.cvw.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0sleuh3e9q.ww.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0szdm0s3h~vby.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0t0d45r_tvt4i.js rename litellm/proxy/_experimental/out/_next/static/chunks/{f739f683b0e3528d.js => 0t5fhk-lwg.m_.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0t9.6.et.-spq.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0t_2obde5n17h.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ta1ffddte5~e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0tn9xeci9ulk~.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ca5fbafaf3826374.js => 0ttl0__m~5i8a.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0txi1wfn0-01d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0tz7rml6rolh7.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ae420624472238ad.js => 0t~fchw5zb-4r.js} (85%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ugell4._eyay.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0uha0pnzl-vec.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0un2--nwsw-uk.js rename litellm/proxy/_experimental/out/_next/static/chunks/{70591b116c194481.js => 0upl0pr28-8_j.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0usxgadggtc52.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0uuau~7-2j4eb.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v-.p0q481gjy.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v.0z34os-hl7.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v1rxqc1hqmrl.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v3d9_8xkvq3w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0vawigy~j_gsx.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0vkkv~m8z3lv~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0w0.ow0kdhtb-.js rename litellm/proxy/_experimental/out/_next/static/chunks/{43a9809839de4e6f.js => 0w9a1yg0dlbiw.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0wgk2liq6dqky.js rename litellm/proxy/_experimental/out/_next/static/chunks/{0a6c418370a8c183.js => 0whkizop7gd0~.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0w~oa2pli-t56.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0x.73w57rn4ou.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0xqg~rk67rumc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0x~b7xip-yufi.js rename litellm/proxy/_experimental/out/_next/static/chunks/{fcad393dcc862a21.js => 0yblb2-hdk~lt.js} (61%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ybvtcd~xp-mx.js rename litellm/proxy/_experimental/out/_next/static/chunks/{134f728fa7099e3e.js => 0ylz5md8p6x7z.js} (60%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0zmz_tmhm2hsa.js rename litellm/proxy/_experimental/out/_next/static/chunks/{5f9c3b92a016f382.js => 0zrbitbm~0koh.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0zxb95ki25y8w.js rename litellm/proxy/_experimental/out/_next/static/chunks/{54563d12ee8915f4.js => 0~ozahatcu75y.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/100mcnex8yqiz.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/102e659fcec2585e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/102xsbbp.u4ar.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10aj2k~llf~ks.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10q34c2t7--5-.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10x7z8jgppbtw.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js rename litellm/proxy/_experimental/out/_next/static/chunks/{26542a70b9512f71.js => 121g1kmcll0g6.js} (66%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1251d58bd3ba113b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/129bujhdmi9ce.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/12w.m0_zg8wpq.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1300460219810c10.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/137i07xf5e.xc.js rename litellm/proxy/_experimental/out/_next/static/chunks/{3c2d67ecf9619f2b.js => 13br-6l.k_pmg.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13jg16smls48s.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13lfiw5-3ktce.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13ycgm4g26ez_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13ysooad2u4zz.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/140cf81b356b3239.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/141iiyyx.5_qm.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1461020743acb21c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/14891020b3fb2fc3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/14f-vkwg4e_k..js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/14twssk6nf2_p.js rename litellm/proxy/_experimental/out/_next/static/chunks/{878832edb30e99a4.js => 14ut9b-iwzfct.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15.9ylrtxojbj.js rename litellm/proxy/_experimental/out/_next/static/chunks/{46d42331373d9805.js => 15b5n8fnfc228.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15cawsx7ayjee.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15fosz6-y91je.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15g0xeupk30ip.js rename litellm/proxy/_experimental/out/_next/static/chunks/{54da342a06baf122.js => 15hm8gokjq2uu.js} (89%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/166fc~7u39du3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/16a1651c0b3e7c8e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/16c0e58809eaf2b5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/17-i5j54jkv5l.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/17.q2iay6h4dm.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/175814061abf2c71.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/177i7u.kpukgd.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/17ia_4rs4y3n4.js rename litellm/proxy/_experimental/out/_next/static/chunks/{9955c118354ef6cc.js => 17u8.w6s717n2.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/181y.ii57q7gs.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/186viidwrwv_o.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/18a9536fce05dc33.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/18b1-~305a__9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1a656c00638be9c7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1a9ab640dd574eca.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1ab44e07f0b1cd5e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1abad0fb1abdc83c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1bfc3425410625f3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1c881baaaa68b7a5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/222fa988d93d834f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/23491c78faf959c9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/25d8f4225095b808.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/27c7596aa0326b71.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/28e332ef9497a292.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2971c4658f1bcd7d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2a5f4a7388e54210.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2b682a7f2932def8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2bca6e6a96b0858a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3310f8d28e1d8cfa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3356ae3643d24081.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/35c3d528354208f4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3648e0a5f38c5d36.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/36ccc2b555a26ad4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3ba782adb71e77d0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/42a4beeb4aa01eba.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4869cdb44fe43698.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/496b84010c33cf69.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e06277331e725da.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e17b625d75327a7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e20891f2fd03463.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e3eafbea2035508.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5181a28310842d3d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/518eb8c7598afad6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5282ed7355826608.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5387bd8bd4bcf195.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5489ec6b9761f819.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/570b2e10aa856e54.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/570d770996d98e0f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/57a2860decebc0b6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/59e0c0c187697b37.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5a69756708c8900c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5aa498497363ab6c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b2b7fd4dd9a44f3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b9c0b6d6c814e58.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5c9bf87d25400872.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/60d3701e4f82c4ff.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6764a89c3c614835.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/679dbd657c8b5aef.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6ac5e2383054326d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6c4c97f1ea6e7d77.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6df5e16ab3d367ef.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6edd697afbcf3405.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/71dc4f719feed2c0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/71f6f0fcaef91598.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/726579f2940c2a2f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/726bebeef472c6cb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/738c339383c3b4b6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/73b7998f9fa9c4c2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7425e467262c0658.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/76d25012c7da52a0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7a9066dcd4a390ff.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7b46d83da0ba9049.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7c552f88245cdd96.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e417dd24c8becd0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e5fe5584502da06.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7f7819822e72bcae.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/80749a6dab9b96b4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/80fc3fb8d0c44655.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/827c38ee3538aeb8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8489ea6f0be86483.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/87573aaa9c57fc3a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/88001a7ecaf7b1af.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/88c74f8b4b20d25a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8c4d9ca78c194144.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8f3bf592254c6c3b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/908828a91f602d8b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/91037395c95e366d.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/928d0c629f28babb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/92cf5d832080641f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/939e8a7d52fbe9ce.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/93c3938d8d8704b3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/95b1023fa868f012.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/975f380f5d2c2b7d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/98efd843bd5a0758.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/993822065369ee18.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9e09de50158b3159.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a06cc76a774dd182.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a09028cd611c08ef.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a0ce6f40daef039a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a0f302271a793712.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a3af1b3a5c791b3e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a6dad97d9634a72d.js.map delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a8f7c8c5eeb6e042.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aaa545ba3e90f434.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aac7c99aa647e49d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aba51a6559eb06c7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/abf1a802816f8f5a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ac3eece174ae3ee9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ad02f56c287539eb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adbc9cda75866ec1.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adf8db17652cf9aa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adfd07c864335b45.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ae625aa52246581e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/af6fc0727c3097de.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b3d198d6c56a21b8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b4505a784b9b23e6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b9341b4c942e3943.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/baadbd26839e7b66.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bd31e2f87615de8b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bd799dc9aa7f786a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bde2340071127430.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bf30ce92e35d0d54.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bfbc736ab510b9aa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c058ac3e89dc33df.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c1efd92d6b02ddc9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c24ccfc46ac95900.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c439a1e9093448b5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c77d417e8a84d57c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c7db6d1325b26f45.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c93d5122cac84bc6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cb8e6ba28461af15.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cbc99c8fae110c02.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cbdff18b8d0102ff.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ccd21850ee94c92e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cfa0acae44b4288b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d3d0acca9a72b37a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d720c3179e45c754.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d7798a4e148be3fe.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d7aa89e52e3d1758.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d84d93ec5e05aece.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d96012bcfc98706a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/da505418e8e8af34.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dae72c93f180b49f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dbca964212122d58.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dbf6a58fdc648c8d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dc8c6d1742643c95.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e03c46f5f6c919c6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e099566e8bd4ee4e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e1f23fd814ac3500.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e29e363f6c8abbd7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e2e17b99dc4f7bfa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e619760a0baf9a7e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e620284e1d071312.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e96398764f77c728.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ead0794ce27b66ce.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/eaeb6c071ee29f14.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ee5f9a39a526e423.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f3fbc1bcf9fcd444.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f48aa7c7bdc85371.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f6fe773610e02694.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f7e1d08418645368.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fa11bea8d4771df2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fc5911e3a3caa8aa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fcdf7322b0aa3e2e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/turbopack-11jy90nmmzlgr.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/turbopack-ddedb29a5eb0118f.js rename litellm/proxy/_experimental/out/_next/static/media/{1bffadaabf893a1e-s.7cd81963.woff2 => 1bffadaabf893a1e-s.16ipb6fqu393i.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{2bbe8d2671613f1f-s.76dcb0b2.woff2 => 2bbe8d2671613f1f-s.067x_6k0k23tk.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{2c55a0e60120577a-s.2a48534a.woff2 => 2c55a0e60120577a-s.0bjc5tiuqdqro.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{5476f68d60460930-s.c995e352.woff2 => 5476f68d60460930-s.0wxq9webf.ew4.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{83afe278b6a6bb3c-s.p.3a6ba036.woff2 => 83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{9c72aa0f40e4eef8-s.18a48cbc.woff2 => 9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{ad66f9afd8947f86-s.7a40eb73.woff2 => ad66f9afd8947f86-s.11u06r12fd6v_.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{favicon.1d32c690.ico => favicon.0~dgapwhi~75y.ico} (100%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/wnL6e5S6xaG1UdkxtYrTo/_clientMiddlewareManifest.json diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html index 38a2c3bd836..3169104aaee 100644 --- a/litellm/proxy/_experimental/out/404.html +++ b/litellm/proxy/_experimental/out/404.html @@ -1 +1 @@ -404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/__next.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.__PAGE__.txt index 18bda7f1065..73b84849ffa 100644 --- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt @@ -1,30 +1,30 @@ 1:"$Sreact.fragment" -2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0493aafc4891dd29.js","/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/0974abc09c5e7ada.js","/litellm-asset-prefix/_next/static/chunks/ae625aa52246581e.js","/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/679dbd657c8b5aef.js","/litellm-asset-prefix/_next/static/chunks/88001a7ecaf7b1af.js","/litellm-asset-prefix/_next/static/chunks/cbc99c8fae110c02.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/1c881baaaa68b7a5.js","/litellm-asset-prefix/_next/static/chunks/9955c118354ef6cc.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","/litellm-asset-prefix/_next/static/chunks/5181a28310842d3d.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/16a1651c0b3e7c8e.js","/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/631b1874cba557c9.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/003f1ffc5817ab83.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/23bfdf9b0544f0b1.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/726bebeef472c6cb.js","/litellm-asset-prefix/_next/static/chunks/8f3bf592254c6c3b.js","/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","/litellm-asset-prefix/_next/static/chunks/16c0e58809eaf2b5.js"],"default"] -1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +2:I[347257,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ClientPageRoot"] +3:I[952683,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js","/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","/litellm-asset-prefix/_next/static/chunks/0tn9xeci9ulk~.js","/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","/litellm-asset-prefix/_next/static/chunks/177i7u.kpukgd.js","/litellm-asset-prefix/_next/static/chunks/0pa20qk5s3rkt.js","/litellm-asset-prefix/_next/static/chunks/14twssk6nf2_p.js","/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","/litellm-asset-prefix/_next/static/chunks/0-_2om65ot6fh.js","/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","/litellm-asset-prefix/_next/static/chunks/0634irnh4hmq6.js","/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","/litellm-asset-prefix/_next/static/chunks/01apu~bleut.l.js","/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","/litellm-asset-prefix/_next/static/chunks/0-mwvwyjihtq6.js","/litellm-asset-prefix/_next/static/chunks/03sse9mrz7omx.js","/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","/litellm-asset-prefix/_next/static/chunks/0c.egkkrwi~pa.js","/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","/litellm-asset-prefix/_next/static/chunks/17u8.w6s717n2.js","/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","/litellm-asset-prefix/_next/static/chunks/0_0ll_gosf9qi.js","/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","/litellm-asset-prefix/_next/static/chunks/0_2kvss2-vfen.js","/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","/litellm-asset-prefix/_next/static/chunks/06uhwq-x7qrqc.js"],"default"] +1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"OutletBoundary"] 1b:"$Sreact.suspense" -:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"wnL6e5S6xaG1UdkxtYrTo","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0493aafc4891dd29.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0974abc09c5e7ada.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/ae625aa52246581e.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/679dbd657c8b5aef.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/88001a7ecaf7b1af.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/cbc99c8fae110c02.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/1c881baaaa68b7a5.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/9955c118354ef6cc.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/5181a28310842d3d.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18"],"$L19"]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","style"] +0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/0tn9xeci9ulk~.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/177i7u.kpukgd.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/0pa20qk5s3rkt.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/14twssk6nf2_p.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/0-_2om65ot6fh.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/0634irnh4hmq6.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/01apu~bleut.l.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/0-mwvwyjihtq6.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/03sse9mrz7omx.js","async":true}],["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18"],"$L19"]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"PZDanZV-ljBIcZvhlqMk5"} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" -6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}] -7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/16a1651c0b3e7c8e.js","async":true}] -8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","async":true}] -9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}] -a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}] -b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/631b1874cba557c9.js","async":true}] -c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}] -d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}] -e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true}] -f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}] -10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/003f1ffc5817ab83.js","async":true}] -11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}] -12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}] -13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/23bfdf9b0544f0b1.js","async":true}] -14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}] -15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/726bebeef472c6cb.js","async":true}] -16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/8f3bf592254c6c3b.js","async":true}] -17:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","async":true}] -18:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/16c0e58809eaf2b5.js","async":true}] +6:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","async":true}] +7:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","async":true}] +8:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/0c.egkkrwi~pa.js","async":true}] +9:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","async":true}] +a:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/17u8.w6s717n2.js","async":true}] +b:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","async":true}] +c:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","async":true}] +d:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","async":true}] +e:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","async":true}] +f:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/0_0ll_gosf9qi.js","async":true}] +10:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","async":true}] +11:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","async":true}] +12:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/0_2kvss2-vfen.js","async":true}] +13:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","async":true}] +14:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","async":true}] +15:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","async":true}] +16:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","async":true}] +17:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","async":true}] +18:["$","script","script-53",{"src":"/litellm-asset-prefix/_next/static/chunks/06uhwq-x7qrqc.js","async":true}] 19:["$","$L1a",null,{"children":["$","$1b",null,{"name":"Next.MetadataOutlet","children":"$@1c"}]}] 1c:null diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index d213f7190c4..7d990013426 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -1,62 +1,65 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] -4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0493aafc4891dd29.js","/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/0974abc09c5e7ada.js","/litellm-asset-prefix/_next/static/chunks/ae625aa52246581e.js","/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/679dbd657c8b5aef.js","/litellm-asset-prefix/_next/static/chunks/88001a7ecaf7b1af.js","/litellm-asset-prefix/_next/static/chunks/cbc99c8fae110c02.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/1c881baaaa68b7a5.js","/litellm-asset-prefix/_next/static/chunks/9955c118354ef6cc.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","/litellm-asset-prefix/_next/static/chunks/5181a28310842d3d.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/16a1651c0b3e7c8e.js","/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/631b1874cba557c9.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/003f1ffc5817ab83.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/23bfdf9b0544f0b1.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/726bebeef472c6cb.js","/litellm-asset-prefix/_next/static/chunks/8f3bf592254c6c3b.js","/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","/litellm-asset-prefix/_next/static/chunks/16c0e58809eaf2b5.js"],"default"] -31:I[168027,[],"default"] -:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.css","style"] -:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"wnL6e5S6xaG1UdkxtYrTo","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0493aafc4891dd29.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c","$L2d","$L2e"],"$L2f"]}],{},null,false,false]},null,false,false],"$L30",false]],"m":"$undefined","G":["$31",[]],"S":true} -32:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -33:"$Sreact.suspense" -35:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -37:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0974abc09c5e7ada.js","async":true,"nonce":"$undefined"}] -b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/ae625aa52246581e.js","async":true,"nonce":"$undefined"}] -c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","async":true,"nonce":"$undefined"}] -d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true,"nonce":"$undefined"}] -e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] -f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}] -10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/679dbd657c8b5aef.js","async":true,"nonce":"$undefined"}] -11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/88001a7ecaf7b1af.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/cbc99c8fae110c02.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true,"nonce":"$undefined"}] -14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] -15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/1c881baaaa68b7a5.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/9955c118354ef6cc.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] -18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/5181a28310842d3d.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/16a1651c0b3e7c8e.js","async":true,"nonce":"$undefined"}] -1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","async":true,"nonce":"$undefined"}] -1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] -20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] -21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/631b1874cba557c9.js","async":true,"nonce":"$undefined"}] -22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}] -23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/003f1ffc5817ab83.js","async":true,"nonce":"$undefined"}] -27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/23bfdf9b0544f0b1.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/726bebeef472c6cb.js","async":true,"nonce":"$undefined"}] -2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/8f3bf592254c6c3b.js","async":true,"nonce":"$undefined"}] -2d:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","async":true,"nonce":"$undefined"}] -2e:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/16c0e58809eaf2b5.js","async":true,"nonce":"$undefined"}] -2f:["$","$L32",null,{"children":["$","$33",null,{"name":"Next.MetadataOutlet","children":"$@34"}]}] -30:["$","$1","h",{"children":[null,["$","$L35",null,{"children":"$L36"}],["$","div",null,{"hidden":true,"children":["$","$L37",null,{"children":["$","$33",null,{"name":"Next.Metadata","children":"$L38"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +6:I[347257,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ClientPageRoot"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js","/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","/litellm-asset-prefix/_next/static/chunks/0tn9xeci9ulk~.js","/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","/litellm-asset-prefix/_next/static/chunks/177i7u.kpukgd.js","/litellm-asset-prefix/_next/static/chunks/0pa20qk5s3rkt.js","/litellm-asset-prefix/_next/static/chunks/14twssk6nf2_p.js","/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","/litellm-asset-prefix/_next/static/chunks/0-_2om65ot6fh.js","/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","/litellm-asset-prefix/_next/static/chunks/0634irnh4hmq6.js","/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","/litellm-asset-prefix/_next/static/chunks/01apu~bleut.l.js","/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","/litellm-asset-prefix/_next/static/chunks/0-mwvwyjihtq6.js","/litellm-asset-prefix/_next/static/chunks/03sse9mrz7omx.js","/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","/litellm-asset-prefix/_next/static/chunks/0c.egkkrwi~pa.js","/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","/litellm-asset-prefix/_next/static/chunks/17u8.w6s717n2.js","/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","/litellm-asset-prefix/_next/static/chunks/0_0ll_gosf9qi.js","/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","/litellm-asset-prefix/_next/static/chunks/0_2kvss2-vfen.js","/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","/litellm-asset-prefix/_next/static/chunks/06uhwq-x7qrqc.js"],"default"] +32:I[168027,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default",1] +:HL["/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +:HL["/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","style"] +0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/0tn9xeci9ulk~.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c","$L2d","$L2e","$L2f"],"$L30"]}],{},null,false,null]},null,false,null],"$L31",false]],"m":"$undefined","G":["$32",["$L33","$L34"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"PZDanZV-ljBIcZvhlqMk5"} +35:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"OutletBoundary"] +36:"$Sreact.suspense" +38:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ViewportBoundary"] +3a:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"MetadataBoundary"] +a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","async":true,"nonce":"$undefined"}] +b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/177i7u.kpukgd.js","async":true,"nonce":"$undefined"}] +c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/0pa20qk5s3rkt.js","async":true,"nonce":"$undefined"}] +d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/14twssk6nf2_p.js","async":true,"nonce":"$undefined"}] +e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","async":true,"nonce":"$undefined"}] +f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","async":true,"nonce":"$undefined"}] +10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","async":true,"nonce":"$undefined"}] +11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/0-_2om65ot6fh.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","async":true,"nonce":"$undefined"}] +14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","async":true,"nonce":"$undefined"}] +15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/0634irnh4hmq6.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/01apu~bleut.l.js","async":true,"nonce":"$undefined"}] +18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/0-mwvwyjihtq6.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/03sse9mrz7omx.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","async":true,"nonce":"$undefined"}] +1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","async":true,"nonce":"$undefined"}] +1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/0c.egkkrwi~pa.js","async":true,"nonce":"$undefined"}] +20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","async":true,"nonce":"$undefined"}] +21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/17u8.w6s717n2.js","async":true,"nonce":"$undefined"}] +22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","async":true,"nonce":"$undefined"}] +23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","async":true,"nonce":"$undefined"}] +24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","async":true,"nonce":"$undefined"}] +26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/0_0ll_gosf9qi.js","async":true,"nonce":"$undefined"}] +27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/0_2kvss2-vfen.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","async":true,"nonce":"$undefined"}] +2d:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","async":true,"nonce":"$undefined"}] +2e:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","async":true,"nonce":"$undefined"}] +2f:["$","script","script-53",{"src":"/litellm-asset-prefix/_next/static/chunks/06uhwq-x7qrqc.js","async":true,"nonce":"$undefined"}] +30:["$","$L35",null,{"children":["$","$36",null,{"name":"Next.MetadataOutlet","children":"$@37"}]}] +31:["$","$1","h",{"children":[null,["$","$L38",null,{"children":"$L39"}],["$","div",null,{"hidden":true,"children":["$","$L3a",null,{"children":["$","$36",null,{"name":"Next.Metadata","children":"$L3b"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +33:["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}] +34:["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}] 8:{} 9:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" -36:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -39:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -34:null -38:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L39","4",{}]] +39:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +3c:I[27201,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"IconMark"] +37:null +3b:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0~dgapwhi~75y.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L3c","4",{}]] diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index 82758aa5c3f..149dd95eeb9 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -1,6 +1,6 @@ 1:"$Sreact.fragment" -2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +2:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ViewportBoundary"] +3:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"MetadataBoundary"] 4:"$Sreact.suspense" -5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"wnL6e5S6xaG1UdkxtYrTo","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +5:I[27201,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"IconMark"] +0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0~dgapwhi~75y.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"PZDanZV-ljBIcZvhlqMk5"} diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt index 545ff2e55cc..cd8591794e2 100644 --- a/litellm/proxy/_experimental/out/__next._index.txt +++ b/litellm/proxy/_experimental/out/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] -4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.css","style"] -0:{"buildId":"wnL6e5S6xaG1UdkxtYrTo","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +:HL["/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","style"] +0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"PZDanZV-ljBIcZvhlqMk5"} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index 10f5e5c2721..44c9aad6a0b 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -1,5 +1,5 @@ -:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.css","style"] -:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"wnL6e5S6xaG1UdkxtYrTo","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +:HL["/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +:HL["/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","style"] +0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"PZDanZV-ljBIcZvhlqMk5"} diff --git a/litellm/proxy/_experimental/out/_next/static/wnL6e5S6xaG1UdkxtYrTo/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_buildManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/wnL6e5S6xaG1UdkxtYrTo/_buildManifest.js rename to litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_buildManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_clientMiddlewareManifest.js b/litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_clientMiddlewareManifest.js new file mode 100644 index 00000000000..a8acaffa33a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_clientMiddlewareManifest.js @@ -0,0 +1 @@ +self.__MIDDLEWARE_MATCHERS = [];self.__MIDDLEWARE_MATCHERS_CB && self.__MIDDLEWARE_MATCHERS_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/wnL6e5S6xaG1UdkxtYrTo/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_ssgManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/wnL6e5S6xaG1UdkxtYrTo/_ssgManifest.js rename to litellm/proxy/_experimental/out/_next/static/PZDanZV-ljBIcZvhlqMk5/_ssgManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js new file mode 100644 index 00000000000..5e8e78991b9 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let n=void 0!==r,[a,s]=(0,t.useState)(e);return[n?r:a,e=>{n||s(e)}]}])},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);e.s(["default",0,e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),n=e.i(271645);e.s(["default",0,e=>{var t=(0,r.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}],446428);var a=e.i(746725),s=e.i(914189),i=e.i(553521),l=e.i(835696),o=e.i(941444),u=e.i(178677),c=e.i(294316),d=e.i(83733),m=e.i(233137),f=e.i(732607),h=e.i(397701),v=e.i(700020);function g(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:j)!==n.Fragment||1===n.default.Children.count(e.children)}let p=(0,n.createContext)(null);p.displayName="TransitionContext";var b=((t=b||{}).Visible="visible",t.Hidden="hidden",t);let x=(0,n.createContext)(null);function y(e){return"children"in e?y(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function w(e,t){let r=(0,o.useLatestValue)(e),l=(0,n.useRef)([]),u=(0,i.useIsMounted)(),c=(0,a.useDisposables)(),d=(0,s.useEvent)((e,t=v.RenderStrategy.Hidden)=>{let n=l.current.findIndex(({el:t})=>t===e);-1!==n&&((0,h.match)(t,{[v.RenderStrategy.Unmount](){l.current.splice(n,1)},[v.RenderStrategy.Hidden](){l.current[n].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&u.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,s.useEvent)(e=>{let t=l.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):l.current.push({el:e,state:"visible"}),()=>d(e,v.RenderStrategy.Unmount)}),f=(0,n.useRef)([]),g=(0,n.useRef)(Promise.resolve()),p=(0,n.useRef)({enter:[],leave:[]}),b=(0,s.useEvent)((e,r,n)=>{f.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(([t])=>t!==e)),null==t||t.chains.current[r].push([e,new Promise(e=>{f.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(p.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?g.current=g.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),x=(0,s.useEvent)((e,t,r)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=f.current.shift())||e()}).then(()=>r(t))});return(0,n.useMemo)(()=>({children:l,register:m,unregister:d,onStart:b,onStop:x,wait:g,chains:p}),[m,d,l,b,x,p,g])}x.displayName="NestingContext";let j=n.Fragment,M=v.RenderFeatures.RenderStrategy,C=(0,v.forwardRefWithAs)(function(e,t){let{show:r,appear:a=!1,unmount:i=!0,...o}=e,d=(0,n.useRef)(null),f=g(e),h=(0,c.useSyncRefs)(...f?[d,t]:null===t?[]:[t]);(0,u.useServerHandoffComplete)();let b=(0,m.useOpenClosed)();if(void 0===r&&null!==b&&(r=(b&m.State.Open)===m.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,C]=(0,n.useState)(r?"visible":"hidden"),T=w(()=>{r||C("hidden")}),[$,k]=(0,n.useState)(!0),N=(0,n.useRef)([r]);(0,l.useIsoMorphicEffect)(()=>{!1!==$&&N.current[N.current.length-1]!==r&&(N.current.push(r),k(!1))},[N,r]);let E=(0,n.useMemo)(()=>({show:r,appear:a,initial:$}),[r,a,$]);(0,l.useIsoMorphicEffect)(()=>{r?C("visible"):y(T)||null===d.current||C("hidden")},[r,T]);let _={unmount:i},D=(0,s.useEvent)(()=>{var t;$&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),O=(0,s.useEvent)(()=>{var t;$&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),L=(0,v.useRender)();return n.default.createElement(x.Provider,{value:T},n.default.createElement(p.Provider,{value:E},L({ourProps:{..._,as:n.Fragment,children:n.default.createElement(S,{ref:h,..._,...o,beforeEnter:D,beforeLeave:O})},theirProps:{},defaultTag:n.Fragment,features:M,visible:"visible"===j,name:"Transition"})))}),S=(0,v.forwardRefWithAs)(function(e,t){var r,a;let{transition:i=!0,beforeEnter:o,afterEnter:b,beforeLeave:C,afterLeave:S,enter:T,enterFrom:$,enterTo:k,entered:N,leave:E,leaveFrom:_,leaveTo:D,...O}=e,[L,R]=(0,n.useState)(null),z=(0,n.useRef)(null),H=g(e),A=(0,c.useSyncRefs)(...H?[z,t,R]:null===t?[]:[t]),V=null==(r=O.unmount)||r?v.RenderStrategy.Unmount:v.RenderStrategy.Hidden,{show:B,appear:F,initial:P}=function(){let e=(0,n.useContext)(p);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[I,W]=(0,n.useState)(B?"visible":"hidden"),Y=function(){let e=(0,n.useContext)(x);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:U,unregister:Z}=Y;(0,l.useIsoMorphicEffect)(()=>U(z),[U,z]),(0,l.useIsoMorphicEffect)(()=>{if(V===v.RenderStrategy.Hidden&&z.current)return B&&"visible"!==I?void W("visible"):(0,h.match)(I,{hidden:()=>Z(z),visible:()=>U(z)})},[I,z,U,Z,B,V]);let q=(0,u.useServerHandoffComplete)();(0,l.useIsoMorphicEffect)(()=>{if(H&&q&&"visible"===I&&null===z.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[z,I,q,H]);let J=P&&!F,K=F&&B&&P,G=(0,n.useRef)(!1),Q=w(()=>{G.current||(W("hidden"),Z(z))},Y),X=(0,s.useEvent)(e=>{G.current=!0,Q.onStart(z,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==C||C())})}),ee=(0,s.useEvent)(e=>{let t=e?"enter":"leave";G.current=!1,Q.onStop(z,t,e=>{"enter"===e?null==b||b():"leave"===e&&(null==S||S())}),"leave"!==t||y(Q)||(W("hidden"),Z(z))});(0,n.useEffect)(()=>{H&&i||(X(B),ee(B))},[B,H,i]);let et=!(!i||!H||!q||J),[,er]=(0,d.useTransition)(et,L,B,{start:X,end:ee}),en=(0,v.compact)({ref:A,className:(null==(a=(0,f.classNames)(O.className,K&&T,K&&$,er.enter&&T,er.enter&&er.closed&&$,er.enter&&!er.closed&&k,er.leave&&E,er.leave&&!er.closed&&_,er.leave&&er.closed&&D,!er.transition&&B&&N))?void 0:a.trim())||void 0,...(0,d.transitionDataAttributes)(er)}),ea=0;"visible"===I&&(ea|=m.State.Open),"hidden"===I&&(ea|=m.State.Closed),er.enter&&(ea|=m.State.Opening),er.leave&&(ea|=m.State.Closing);let es=(0,v.useRender)();return n.default.createElement(x.Provider,{value:Q},n.default.createElement(m.OpenClosedProvider,{value:ea},es({ourProps:en,theirProps:O,defaultTag:j,features:M,visible:"visible"===I,name:"Transition.Child"})))}),T=(0,v.forwardRefWithAs)(function(e,t){let r=null!==(0,n.useContext)(p),a=null!==(0,m.useOpenClosed)();return n.default.createElement(n.default.Fragment,null,!r&&a?n.default.createElement(C,{ref:t,...e}):n.default.createElement(S,{ref:t,...e}))}),$=Object.assign(C,{Child:T,Root:C});e.s(["Transition",0,$],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),n=e.i(271645),a=e.i(446428),s=e.i(444755),i=e.i(673706),l=e.i(103471),o=e.i(495470),u=e.i(854056),c=e.i(888288);let d=(0,i.makeClassName)("Select"),m=n.default.forwardRef((e,i)=>{let{defaultValue:m="",value:f,onValueChange:h,placeholder:v="Select...",disabled:g=!1,icon:p,enableClear:b=!1,required:x,children:y,name:w,error:j=!1,errorMessage:M,className:C,id:S}=e,T=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),$=(0,n.useRef)(null),k=n.Children.toArray(y),[N,E]=(0,c.default)(m,f),_=(0,n.useMemo)(()=>{let e=n.default.Children.toArray(y).filter(n.isValidElement);return(0,l.constructValueToNameMapping)(e)},[y]);return n.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",C)},n.default.createElement("div",{className:"relative"},n.default.createElement("select",{title:"select-hidden",required:x,className:(0,s.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:N,onChange:e=>{e.preventDefault()},name:w,disabled:g,id:S,onFocus:()=>{let e=$.current;e&&e.focus()}},n.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},v),k.map(e=>{let t=e.props.value,r=e.props.children;return n.default.createElement("option",{className:"hidden",key:t,value:t},r)})),n.default.createElement(o.Listbox,Object.assign({as:"div",ref:i,defaultValue:N,value:N,onChange:e=>{null==h||h(e),E(e)},disabled:g,id:S},T),({value:e})=>{var t;return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.ListboxButton,{ref:$,className:(0,s.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,l.getSelectButtonColors)((0,l.hasValue)(e),g,j))},p&&n.default.createElement("span",{className:(0,s.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.default.createElement(p,{className:(0,s.tremorTwMerge)(d("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=_.get(e))?t:v),n.default.createElement("span",{className:(0,s.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},n.default.createElement(r.default,{className:(0,s.tremorTwMerge)(d("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&N?n.default.createElement("button",{type:"button",className:(0,s.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==h||h("")}},n.default.createElement(a.default,{className:(0,s.tremorTwMerge)(d("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.default.createElement(u.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},n.default.createElement(o.ListboxOptions,{anchor:"bottom start",className:(0,s.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},y)))})),j&&M?n.default.createElement("p",{className:(0,s.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},M):null)});m.displayName="Select",e.s(["Select",0,m],206929)},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["GlobalOutlined",0,s],160818)},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",n="hour",a="week",s="month",i="quarter",l="year",o="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},f="en",h={};h[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var v="$isDayjsObject",g=function(e){return e instanceof y||!(!e||!e[v])},p=function e(t,r,n){var a;if(!t)return f;if("string"==typeof t){var s=t.toLowerCase();h[s]&&(a=s),r&&(h[s]=r,a=s);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var l=t.name;h[l]=t,a=l}return!n&&a&&(f=a),a||!n&&f},b=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new y(r)},x={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(r/60),2,"0")+":"+m(r%60,2,"0")},m:function e(t,r){if(t.date(){"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["MinusCircleOutlined",0,s],564897)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let r=async(e,r,n,a,s)=>{let i;i="Admin"!=n&&"Admin Viewer"!=n?await (0,t.teamListCall)(e,a?.organization_id||null,r):await (0,t.teamListCall)(e,a?.organization_id||null),console.log(`givenTeams: ${i}`),s(i)};e.s(["fetchTeams",0,r])},468133,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(175712),a=e.i(464571),s=e.i(28651),i=e.i(898586),l=e.i(482725),o=e.i(199133),u=e.i(262218),c=e.i(621192),d=e.i(178654),m=e.i(751904),f=e.i(987432),h=e.i(764205),v=e.i(860585),g=e.i(355619),p=e.i(727749),b=e.i(162386);let{Title:x,Text:y}=i.Typography,w=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],j=({label:e,description:r,isEditing:n,viewContent:a,editContent:s})=>(0,t.jsxs)(c.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(d.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:r})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:n?s:a})})]}),M=()=>(0,t.jsx)(y,{className:"text-gray-400 italic",children:"Not set"}),C=(e,r)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(u.Tag,{color:"blue",children:r?r(e):e},e))}):(0,t.jsx)(M,{}),S={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[i,c]=(0,r.useState)(!0),[d,T]=(0,r.useState)(S),[$,k]=(0,r.useState)(!1),[N,E]=(0,r.useState)(S),[_,D]=(0,r.useState)(!1),[O,L]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(!e)return c(!1);try{let t=await (0,h.getDefaultTeamSettings)(e),r={...S,...t.values||{}};T(r),E(r)}catch(e){console.error("Error fetching team SSO settings:",e),L(!0),p.default.fromBackend("Failed to fetch team settings")}finally{c(!1)}})()},[e]);let R=async()=>{if(e){D(!0);try{let t=await (0,h.updateDefaultTeamSettings)(e,N),r={...S,...t.settings||{}};T(r),E(r),k(!1),p.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),p.default.fromBackend("Failed to update team settings")}finally{D(!1)}}},z=(e,t)=>{E(r=>({...r,[e]:t}))};return i?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(l.Spin,{size:"large"})}):O?(0,t.jsx)(n.Card,{children:(0,t.jsx)(y,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(n.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(y,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:$?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(a.Button,{onClick:()=>{k(!1),E(d)},disabled:_,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"primary",onClick:R,loading:_,icon:(0,t.jsx)(f.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(a.Button,{onClick:()=>k(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(j,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:$,viewContent:null!=d.max_budget?(0,t.jsxs)(y,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.max_budget,onChange:e=>z("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(j,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:$,viewContent:d.budget_duration?(0,t.jsx)(y,{children:(0,v.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(v.default,{value:N.budget_duration||null,onChange:e=>z("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(j,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:$,viewContent:null!=d.tpm_limit?(0,t.jsx)(y,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.tpm_limit,onChange:e=>z("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(j,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:$,viewContent:null!=d.rpm_limit?(0,t.jsx)(y,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.rpm_limit,onChange:e=>z("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(j,{label:"Models",description:"Default list of models that new teams can access.",isEditing:$,viewContent:C(d.models,g.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:N.models||[],onChange:e=>z("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(j,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:$,viewContent:C(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:N.team_member_permissions||[],onChange:e=>z("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:r,onClose:n})=>(0,t.jsx)(u.Tag,{color:"blue",closable:r,onClose:n,className:"mr-1 mt-1 mb-1",children:e}),children:w.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(269200),a=e.i(942232),s=e.i(977572),i=e.i(427612),l=e.i(64848),o=e.i(496020),u=e.i(304967),c=e.i(994388),d=e.i(599724),m=e.i(389083),f=e.i(764205),h=e.i(727749);e.s(["default",0,({accessToken:e,userID:v})=>{let[g,p]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(e&&v)try{let t=await (0,f.availableTeamListCall)(e);p(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,v]);let b=async t=>{if(e&&v)try{await (0,f.teamMemberAddCall)(e,t,{user_id:v,role:"user"}),h.default.success("Successfully joined team"),p(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),h.default.fromBackend("Failed to join team")}};return(0,t.jsx)(u.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(i.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(l.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(l.TableHeaderCell,{children:"Description"}),(0,t.jsx)(l.TableHeaderCell,{children:"Members"}),(0,t.jsx)(l.TableHeaderCell,{children:"Models"}),(0,t.jsx)(l.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(a.TableBody,{children:[g.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,r)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(d.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},r)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(c.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===g.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(d.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js new file mode 100644 index 00000000000..1254d125f9a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["LinkOutlined",0,o],596239)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,r]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;r(`${e}//${t}`)}},[]),e}])},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",0,t])},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},688511,823429,e=>{"use strict";let t=(0,e.i(475254).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["default",0,t],823429),e.s(["Edit",0,t],688511)},114600,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),l=e.i(271645);let o=(0,a.makeClassName)("Divider"),s=l.default.forwardRef((e,a)=>{let{className:s,children:i}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(o("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",s)},d),i?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,r.tremorTwMerge)("text-inherit whitespace-nowrap")},i),l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});s.displayName="Divider",e.s(["Divider",0,s],114600)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),l=e.i(444755),o=e.i(673706);let s=(0,o.makeClassName)("Callout"),i=r.default.forwardRef((e,i)=>{let{title:d,icon:c,color:n,className:u,children:f}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,l.tremorTwMerge)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",n?(0,l.tremorTwMerge)((0,o.getColorClassNames)(n,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(n,a.colorPalette.darkBorder).borderColor,(0,o.getColorClassNames)(n,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},m),r.default.createElement("div",{className:(0,l.tremorTwMerge)(s("header"),"flex items-start")},c?r.default.createElement(c,{className:(0,l.tremorTwMerge)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,l.tremorTwMerge)(s("title"),"font-semibold")},d)),r.default.createElement("p",{className:(0,l.tremorTwMerge)(s("body"),"overflow-y-auto",f?"mt-2":"")},f))});i.displayName="Callout",e.s(["Callout",0,i],366283)},475647,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["PlusCircleOutlined",0,o],475647)},153472,e=>{"use strict";var t,r,a=e.i(266027),l=e.i(954616),o=e.i(912598),s=e.i(243652),i=e.i(135214),d=e.i(764205),c=((t={}).GENERAL_SETTINGS="general_settings",t),n=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let u=async(e,t)=>{try{let r=d.proxyBaseUrl?`${d.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},f=(0,s.createQueryKeys)("proxyConfig"),m=async(e,t)=>{try{let r=d.proxyBaseUrl?`${d.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>c,"GeneralSettingsFieldName",()=>n,"proxyConfigKeys",0,f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,i.default)(),t=(0,o.useQueryClient)();return(0,l.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await m(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:f.all})}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,i.default)();return(0,a.useQuery)({queryKey:f.list({filters:{configType:e}}),queryFn:async()=>await u(t,e),enabled:!!t})}])},286536,77705,e=>{"use strict";var t=e.i(475254);let r=(0,t.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,r],286536);let a=(0,t.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,a],77705)},514236,e=>{"use strict";var t=e.i(843476),r=e.i(105278);e.s(["default",0,()=>(0,t.jsx)(r.default,{})])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0-_2om65ot6fh.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-_2om65ot6fh.js new file mode 100644 index 00000000000..ee1052662c8 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-_2om65ot6fh.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,s)=>{let a=void 0!==s,[l,r]=(0,t.useState)(e);return[a?s:l,e=>{a||r(e)}]}])},757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);e.s(["default",0,e=>{var a=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),a=e.i(271645);e.s(["default",0,e=>{var t=(0,s.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}],446428);var l=e.i(746725),r=e.i(914189),i=e.i(553521),n=e.i(835696),d=e.i(941444),o=e.i(178677),c=e.i(294316),u=e.i(83733),m=e.i(233137),h=e.i(732607),x=e.i(397701),g=e.i(700020);function f(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:_)!==a.Fragment||1===a.default.Children.count(e.children)}let p=(0,a.createContext)(null);p.displayName="TransitionContext";var b=((t=b||{}).Visible="visible",t.Hidden="hidden",t);let j=(0,a.createContext)(null);function v(e){return"children"in e?v(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function y(e,t){let s=(0,d.useLatestValue)(e),n=(0,a.useRef)([]),o=(0,i.useIsMounted)(),c=(0,l.useDisposables)(),u=(0,r.useEvent)((e,t=g.RenderStrategy.Hidden)=>{let a=n.current.findIndex(({el:t})=>t===e);-1!==a&&((0,x.match)(t,{[g.RenderStrategy.Unmount](){n.current.splice(a,1)},[g.RenderStrategy.Hidden](){n.current[a].state="hidden"}}),c.microTask(()=>{var e;!v(n)&&o.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,r.useEvent)(e=>{let t=n.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>u(e,g.RenderStrategy.Unmount)}),h=(0,a.useRef)([]),f=(0,a.useRef)(Promise.resolve()),p=(0,a.useRef)({enter:[],leave:[]}),b=(0,r.useEvent)((e,s,a)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?f.current=f.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(s)):a(s)}),j=(0,r.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,a.useMemo)(()=>({children:n,register:m,unregister:u,onStart:b,onStop:j,wait:f,chains:p}),[m,u,n,b,j,p,f])}j.displayName="NestingContext";let _=a.Fragment,S=g.RenderFeatures.RenderStrategy,w=(0,g.forwardRefWithAs)(function(e,t){let{show:s,appear:l=!1,unmount:i=!0,...d}=e,u=(0,a.useRef)(null),h=f(e),x=(0,c.useSyncRefs)(...h?[u,t]:null===t?[]:[t]);(0,o.useServerHandoffComplete)();let b=(0,m.useOpenClosed)();if(void 0===s&&null!==b&&(s=(b&m.State.Open)===m.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[_,w]=(0,a.useState)(s?"visible":"hidden"),C=y(()=>{s||w("hidden")}),[T,k]=(0,a.useState)(!0),I=(0,a.useRef)([s]);(0,n.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,a.useMemo)(()=>({show:s,appear:l,initial:T}),[s,l,T]);(0,n.useIsoMorphicEffect)(()=>{s?w("visible"):v(C)||null===u.current||w("hidden")},[s,C]);let U={unmount:i},R=(0,r.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,r.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,g.useRender)();return a.default.createElement(j.Provider,{value:C},a.default.createElement(p.Provider,{value:E},M({ourProps:{...U,as:a.Fragment,children:a.default.createElement(N,{ref:x,...U,...d,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:a.Fragment,features:S,visible:"visible"===_,name:"Transition"})))}),N=(0,g.forwardRefWithAs)(function(e,t){var s,l;let{transition:i=!0,beforeEnter:d,afterEnter:b,beforeLeave:w,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,a.useState)(null),D=(0,a.useRef)(null),A=f(e),L=(0,c.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?g.RenderStrategy.Unmount:g.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,a.useContext)(p);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,a.useState)(P?"visible":"hidden"),H=function(){let e=(0,a.useContext)(j);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,n.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,n.useIsoMorphicEffect)(()=>{if(O===g.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,x.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,o.useServerHandoffComplete)();(0,n.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,a.useRef)(!1),Y=y(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,r.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==d||d():"leave"===e&&(null==w||w())})}),ee=(0,r.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==b||b():"leave"===e&&(null==N||N())}),"leave"!==t||v(Y)||(K("hidden"),G(D))});(0,a.useEffect)(()=>{A&&i||(X(P),ee(P))},[P,A,i]);let et=!(!i||!A||!W||J),[,es]=(0,u.useTransition)(et,M,P,{start:X,end:ee}),ea=(0,g.compact)({ref:L,className:(null==(l=(0,h.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:l.trim())||void 0,...(0,u.transitionDataAttributes)(es)}),el=0;"visible"===$&&(el|=m.State.Open),"hidden"===$&&(el|=m.State.Closed),es.enter&&(el|=m.State.Opening),es.leave&&(el|=m.State.Closing);let er=(0,g.useRender)();return a.default.createElement(j.Provider,{value:Y},a.default.createElement(m.OpenClosedProvider,{value:el},er({ourProps:ea,theirProps:B,defaultTag:_,features:S,visible:"visible"===$,name:"Transition.Child"})))}),C=(0,g.forwardRefWithAs)(function(e,t){let s=null!==(0,a.useContext)(p),l=null!==(0,m.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!s&&l?a.default.createElement(w,{ref:t,...e}):a.default.createElement(N,{ref:t,...e}))}),T=Object.assign(w,{Child:C,Root:w});e.s(["Transition",0,T],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),a=e.i(271645),l=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:g="Select...",disabled:f=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:S,className:w,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,a.useRef)(null),k=a.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",w)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},g),k.map(e=>{let t=e.props.value,s=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},s)})),a.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:f,id:N},C),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,_))},p&&a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:g),a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?a.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},a.default.createElement(l.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&S?a.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",0,m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),a=e.i(888288),l=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=l.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:g,onChange:f,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,a.default)(c,o),_=(0,l.useRef)(null),S=(0,s.hasValue)(v);return(0,l.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),l.default.createElement(l.default.Fragment,null,l.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,s.getSelectButtonColors)(S,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",g),"data-testid":"text-area",onChange:e=>{null==f||f(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?l.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",0,d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),a=e.i(673706),l=e.i(271645);let r=(0,a.makeClassName)("Divider"),i=l.default.forwardRef((e,a)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",0,i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),a=e.i(653824),l=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),g=e.i(175712),f=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),S=e.i(78085),w=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:a,teams:l,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=w.Form.useForm(),[x,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;g(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(w.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),a(e)},layout:"vertical",children:[!u&&(0,t.jsx)(w.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(w.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;g(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:a,possibleUIRoles:l,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[S,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{w([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=a.map(e=>e.user_id),l={};e.user_role&&""!==e.user_role&&(l.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(l.max_budget=e.max_budget),e.models&&e.models.length>0&&(l.models=e.models),e.budget_duration&&""!==e.budget_duration&&(l.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(l.metadata=e.metadata);let n=Object.keys(l).length>0,d=T&&S.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,l,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,l,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of S)try{let s=null;s=I?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let l=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",l),e.push({teamId:t,success:!0,successfulAdditions:l.successful_additions,failedAdditions:l.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),w([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${a.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:l?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(f.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:w,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:l,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":a.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:a,user:l,onSubmit:r})=>{let[i,c]=(0,n.useState)(l),[u]=w.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[l]);let m=async()=>{u.resetFields(),a()},g=async e=>{r(e),u.resetFields(),a()};return l?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+l.user_id,width:1e3,children:(0,t.jsx)(w.Form,{form:u,onFinish:g,initialValues:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:a,userRole:l})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),{Paragraph:w}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,a,l);if(t&&t.data){let e=t.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(f).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{g(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(w,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:a}=o;return a&&a.properties?Object.entries(a.properties).map(([a,l])=>{let r=e[a],i=a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(w,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,a)=>{let l=a.type;if("teams"===e){let s,a;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(f[e]||[]),a=(e,t,a)=>{let l=[...s];l[e]={...l[e],[t]:a},I("teams",l)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,l)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",l+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==l))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>a(l,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>a(l,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>a(l,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},l)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:f[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===l)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!f[e],onChange:t=>I(e,t)})});if("array"===l&&a.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:a.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===l&&a.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:a.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==f[e]?String(f[e]):"",onChange:t=>I(e,t.target.value),placeholder:a.description||"",className:"mt-2"})})(a,l)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,a)=>{if(null==a)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(a)){if(0===a.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(a);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[a]){let{ui_label:e,description:l}=s[a];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(a)});if("boolean"==typeof a)return(0,t.jsx)("span",{children:a?"Enabled":"Disabled"});if("models"===e&&Array.isArray(a))return 0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof a)return Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(a,null,2)});return(0,t.jsx)("span",{children:String(a)})})(a,r)})]},a)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(262218),ea=e.i(591935),el=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,s,a,l,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(en.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,t.jsx)(N.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,t.jsx)(es.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,t.jsx)(es.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:ea.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>a(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>l(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:a,isAllSelected:l,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:l,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:a(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),eh=e.i(64848),ex=e.i(942232),eg=e.i(496020),ef=e.i(977572),ep=e.i(206929),eb=e.i(94629),ej=e.i(360820),ev=e.i(871943),ey=e.i(981339),e_=e.i(530212),eS=e.i(988297),ew=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:g,initialTab:f=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(f),[et,es]=(0,n.useState)({}),[ea,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[ey,eT]=(0,n.useState)(!1),[ek,eI]=(0,n.useState)([]),[eE,eU]=(0,n.useState)(""),[eR,eB]=(0,n.useState)("user"),[eM,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);S(s)}catch{S(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eD="proxy_admin"===m||"Admin"===m,eA=async()=>{if(u){eF(!0);try{let e=await (0,b.teamListCall)(u,null);eI((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eL=async()=>{if(u&&eE){ev(!0);try{await (0,b.teamMemberAddCall)(u,eE,{role:eR,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eO=async()=>{if(u&&ep){eT(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),ec(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eT(!1)}}},eP=ek.filter(e=>!_.some(t=>t.team_id===e.team_id)),ez=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eV=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},e$=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eH={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>eK(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:ez,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&g?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:eV,confirmLoading:R}),(0,t.jsxs)(a.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eD&&(0,t.jsx)(v.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eB("user"),ed(!0),eA()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(eu.Table,{children:[(0,t.jsx)(em.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Team Name"}),eD&&(0,t.jsx)(eh.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(ex.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eD&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),ec(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eH,onCancel:()=>A(!1),onSubmit:e$,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:g}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>eK(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{ec(!1),eb(null)},onOk:eO,confirmLoading:ey}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(w.Form,{layout:"vertical",onFinish:eL,children:[(0,t.jsx)(w.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eE||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,t)=>{let s=eP.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eM,children:eP.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(w.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eR,onChange:eB,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eE,children:ej?"Adding...":"Add to Team"})})]})})]})}var eT=e.i(655913),ek=e.i(38419),eI=e.i(78334),eE=e.i(555436),eU=e.i(284614);let eR=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eB({data:e=[],columns:s,isLoading:a=!1,onSortChange:l,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:g=!1,filters:f,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:S}){let[w,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?ed(o,c,u,m,R,g?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,g,h,D,A]),O=(0,eo.useReactTable)({data:e,columns:L,state:{sorting:w},onSortingChange:e=>{let t="function"==typeof e?e(w):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";l?.(t,s)}}else l?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eC,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Search by email...",value:f.email,onChange:e=>p({email:e}),icon:eE.Search}),(0,t.jsx)(ek.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(f.user_id||f.user_role||f.team)}),(0,t.jsx)(eI.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by User ID",value:f.user_id,onChange:e=>p({user_id:e}),icon:eU.User}),(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by SSO ID",value:f.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eR}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(em.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eh.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(ej.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ev.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(ex.TableBody,{children:a?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eM,Title:eF}=c.Typography,eD={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),g=(0,V.useQueryClient)(),[f,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[S,w]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eD),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),w(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),en(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{w(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},eg=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},ef=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:f,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,f,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ev=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=ed(ev,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[x&&(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ev}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!el),et([])},type:el?"primary":"default",className:"flex items-center",children:el?"Cancel Selection":"Select Users"}),x&&el&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):ea(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(a.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:el,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ev,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ev,onCancel:ex,user:y,onSubmit:eg}),(0,t.jsx)($.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ev?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{w(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>ea(!1),selectedUsers:ee,possibleUIRoles:ev,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/659ce28f2cb74401.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-dwjzo6mg1t7.js similarity index 75% rename from litellm/proxy/_experimental/out/_next/static/chunks/659ce28f2cb74401.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0-dwjzo6mg1t7.js index 0a391e55fc2..cf3ed7a2028 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/659ce28f2cb74401.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-dwjzo6mg1t7.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:T}=n.Select,P=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(T,{value:"BLOCK",children:"Block"}),(0,l.jsx)(T,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,T]=m.default.useState(""),[P,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void T(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}T(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),T("")}).finally(()=>{L(!1)})}else T(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),T(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),P?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:q,Text:H}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(H,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(H,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:T,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,q]=(0,m.useState)(!1),[H,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>q(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(P,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:T,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:H,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!H)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===H);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:H,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),q(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{q(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard",QostodianNexus:"qostodian_nexus"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`,"Qostodian Nexus":`${en}qohash.jpg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}function eu(e){return!0===e?"yes":!1===e?"no":"inherit"}function ep(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"choiceToSkipToolForCreate",()=>ep,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec,"skipToolMessageToChoice",()=>eu],180766);var eg=e.i(435451);let{Title:ex}=d.Typography,eh=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eg.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ef=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ex,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eh,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var ey=e.i(482725),ej=e.i(850627);let e_=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(ey.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ej.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var eb=e.i(592968),ev=e.i(750113);let ew=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(eb.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(eb.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(eb.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(eb.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(eb.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var eN=e.i(536916),eC=e.i(149192),eS=e.i(741585),eS=eS,ek=e.i(724154);e.i(247167);var eI=e.i(931067);let eA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eO=e.i(9583),eT=m.forwardRef(function(e,t){return m.createElement(eO.default,(0,eI.default)({},e,{ref:t,icon:eA}))});let{Text:eP}=d.Typography,{Option:eL}=n.Select,eB=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eT,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eP,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eL,{value:e.category,children:e.category},e.category))})]}),eF=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eP,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(eb.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(eC.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eS.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(ek.StopOutlined,{}),children:"Select All & Block"})]})]}),e$=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eP,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eP,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(eN.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eP,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eL,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eS.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(ek.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eE,Text:eM}=d.Typography,eR=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eE,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(eM,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eB,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eF,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(e$,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eG=e.i(304967),ez=e.i(599724),eD=e.i(312361),eK=e.i(21548),eq=e.i(827252);let eH={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eJ=({value:e,onChange:t,disabled:a=!1})=>{let r={...eH,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eG.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(ez.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eD.Divider,{}),0===r.rules.length?(0,l.jsx)(eK.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eG.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(ez.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eD.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(ez.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(eb.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eq.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eU,Text:eW,Link:eV}=d.Typography,{Option:eY}=n.Select,eQ={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,T]=(0,m.useState)([]),[P,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[q,H]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,eg]=(0,m.useState)(!1),[ex,eh]=(0,m.useState)([]),[ey,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),eb=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),H(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},eN=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eC=(e,t)=>{C(a=>({...a,[e]:t}))},eS=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},ek=()=>{x.resetFields(),j(null),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),eg(!1),k(0)},eI=()=>{ek(),t()},eA=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i);let s=ep(e.skip_tool_message_choice);if(void 0!==s&&(r.litellm_params.skip_tool_message_in_guardrail=s),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=q&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),q&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ey.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ey.rules,r.litellm_params.default_action=ey.default_action,r.litellm_params.on_disallowed_action=ey.on_disallowed_action,ey.violation_message_template&&(r.litellm_params.violation_message_template=ey.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),ek(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eO=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:q,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{H(e),U(t)}}):null},eT=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:eI,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:eI,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"},children:eT.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eY,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eY,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eY,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.pre_call})]})}),(0,l.jsx)(eY,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.during_call})]})}),(0,l.jsx)(eY,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.post_call})]})}),(0,l.jsx)(eY,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: omit role: tool from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!eb&&!ei(y)&&!es(y)&&(0,l.jsx)(e_,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:eN,onActionSelect:eC,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eO("categories");if(es(y))return(0,l.jsx)(ew,{availableModels:ex,form:x});if(!y)return null;if(eb)return(0,l.jsx)(eJ,{value:ey,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ef,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eO("patterns");return null;case 3:if(ei(y))return eO("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),eg(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eg(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:eI,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s=e.skip_tool_message_choice;"yes"===s?r.skip_tool_message_in_guardrail=!0:"no"===s?r.skip_tool_message_in_guardrail=!1:delete r.skip_tool_message_in_guardrail;let n={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):n=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let m={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:n}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(m));let g=`/guardrails/${d}`,h=await fetch(g,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(m)});if(!h.ok){let e=await h.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tl.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(ts,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(ts,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ts,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(ts,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: whether role: tool content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:T}=n.Select,P=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(T,{value:"BLOCK",children:"Block"}),(0,l.jsx)(T,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,T]=m.default.useState(""),[P,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void T(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}T(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),T("")}).finally(()=>{L(!1)})}else T(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),T(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),P?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:q,Text:H}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(H,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(H,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:T,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,q]=(0,m.useState)(!1),[H,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>q(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(P,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:T,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:H,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!H)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===H);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:H,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),q(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{q(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard",QostodianNexus:"qostodian_nexus"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`,"Qostodian Nexus":`${en}qohash.jpg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}function eu(e){return!0===e?"yes":!1===e?"no":"inherit"}function ep(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",0,em,"choiceToSkipToolForCreate",0,ep,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",0,ec,"skipToolMessageToChoice",0,eu],180766);var eg=e.i(435451);let{Title:ex}=d.Typography,eh=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eg.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ef=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ex,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eh,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var ey=e.i(482725),ej=e.i(850627);let e_=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(ey.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ej.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var eb=e.i(592968),ev=e.i(750113);let ew=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(eb.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(eb.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(eb.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(eb.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(eb.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var eN=e.i(536916),eC=e.i(149192),eS=e.i(741585),eS=eS,ek=e.i(724154);e.i(247167);var eI=e.i(931067);let eA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eO=e.i(9583),eT=m.forwardRef(function(e,t){return m.createElement(eO.default,(0,eI.default)({},e,{ref:t,icon:eA}))});let{Text:eP}=d.Typography,{Option:eL}=n.Select,eB=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eT,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eP,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eL,{value:e.category,children:e.category},e.category))})]}),eF=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eP,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(eb.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(eC.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eS.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(ek.StopOutlined,{}),children:"Select All & Block"})]})]}),e$=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eP,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eP,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(eN.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eP,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eL,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eS.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(ek.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eE,Text:eM}=d.Typography,eR=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eE,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(eM,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eB,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eF,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(e$,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eG=e.i(304967),ez=e.i(599724),eD=e.i(312361),eK=e.i(21548),eq=e.i(827252);let eH={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eJ=({value:e,onChange:t,disabled:a=!1})=>{let r={...eH,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eG.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(ez.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eD.Divider,{}),0===r.rules.length?(0,l.jsx)(eK.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eG.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(ez.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eD.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(ez.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(eb.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eq.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eU,Text:eW,Link:eV}=d.Typography,{Option:eY}=n.Select,eQ={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,T]=(0,m.useState)([]),[P,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[q,H]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,eg]=(0,m.useState)(!1),[ex,eh]=(0,m.useState)([]),[ey,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),eb=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),H(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},eN=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eC=(e,t)=>{C(a=>({...a,[e]:t}))},eS=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},ek=()=>{x.resetFields(),j(null),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),eg(!1),k(0)},eI=()=>{ek(),t()},eA=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i);let s=ep(e.skip_tool_message_choice);if(void 0!==s&&(r.litellm_params.skip_tool_message_in_guardrail=s),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=q&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),q&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ey.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ey.rules,r.litellm_params.default_action=ey.default_action,r.litellm_params.on_disallowed_action=ey.on_disallowed_action,ey.violation_message_template&&(r.litellm_params.violation_message_template=ey.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),ek(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eO=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:q,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{H(e),U(t)}}):null},eT=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:eI,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:eI,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"},children:eT.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eY,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eY,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eY,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.pre_call})]})}),(0,l.jsx)(eY,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.during_call})]})}),(0,l.jsx)(eY,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.post_call})]})}),(0,l.jsx)(eY,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: omit role: tool from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!eb&&!ei(y)&&!es(y)&&(0,l.jsx)(e_,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:eN,onActionSelect:eC,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eO("categories");if(es(y))return(0,l.jsx)(ew,{availableModels:ex,form:x});if(!y)return null;if(eb)return(0,l.jsx)(eJ,{value:ey,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ef,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eO("patterns");return null;case 3:if(ei(y))return eO("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),eg(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eg(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:eI,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s=e.skip_tool_message_choice;"yes"===s?r.skip_tool_message_in_guardrail=!0:"no"===s?r.skip_tool_message_in_guardrail=!1:delete r.skip_tool_message_in_guardrail;let n={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):n=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let m={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:n}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(m));let g=`/guardrails/${d}`,h=await fetch(g,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(m)});if(!h.ok){let e=await h.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tl.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(ts,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(ts,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ts,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(ts,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: whether role: tool content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ "api_key": "your_aporia_api_key", "project_name": "your_project_name" }`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0-mwvwyjihtq6.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-mwvwyjihtq6.js new file mode 100644 index 00000000000..ad697286e5a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-mwvwyjihtq6.js @@ -0,0 +1,3 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let l=(0,s.default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",0,l],283086);let a=(0,s.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,a],195116)},97859,e=>{"use strict";e.s(["AGENT_CALL_TYPES",0,["asend_message"],"ERROR_CODE_OPTIONS",0,[{label:"400 - Bad Request",value:"400"},{label:"401 - Invalid Authentication",value:"401"},{label:"403 - Permission Denied",value:"403"},{label:"404 - Not Found",value:"404"},{label:"408 - Request Timeout",value:"408"},{label:"422 - Unprocessable Entity",value:"422"},{label:"429 - Rate Limited",value:"429"},{label:"500 - Internal Server Error",value:"500"},{label:"502 - Bad Gateway",value:"502"},{label:"503 - Service Unavailable",value:"503"},{label:"529 - Overloaded",value:"529"}],"MCP_CALL_TYPES",0,["call_mcp_tool","list_mcp_tools"],"QUICK_SELECT_OPTIONS",0,[{label:"Last Minute",value:1,unit:"minutes"},{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}]])},3565,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(464571),a=e.i(608856),r=e.i(492030),n=e.i(166406),i=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(770914),p=e.i(262218),h=e.i(592968),g=e.i(898586),f=e.i(149192),y=e.i(536591),y=y,j=e.i(755151),b=e.i(166540),v=e.i(916925);let _="24px",N="request",w="response",S="monospace",k="#f0f0f0",{Text:C}=g.Typography;function T({log:e,onClose:s,onPrevious:l,onNext:a,statusLabel:r,statusColor:n,environment:i}){let o=e.custom_llm_provider||"",d=o?(0,v.getProviderLogoAndName)(o):null;return(0,t.jsxs)("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${k}`,backgroundColor:"#fff",position:"sticky",top:0,zIndex:10},children:[(0,t.jsx)(L,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,t.jsx)(M,{requestId:e.request_id}),(0,t.jsx)(D,{onPrevious:l,onNext:a,onClose:s})]}),(0,t.jsx)(E,{log:e,statusLabel:r,statusColor:n,environment:i})]})}function L({model:e,providerLogo:s,providerName:l}){return(0,t.jsxs)(u.Space,{size:8,style:{marginBottom:8},children:[s&&(0,t.jsx)("img",{src:s,alt:l||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,t.jsxs)(u.Space,{size:8,direction:"horizontal",children:[(0,t.jsx)(C,{strong:!0,style:{fontSize:14},children:e}),l&&(0,t.jsx)(C,{type:"secondary",style:{fontSize:12},children:l})]})]})}function M({requestId:e}){return(0,t.jsx)("div",{style:{flex:1,minWidth:0},children:(0,t.jsx)(h.Tooltip,{title:e,children:(0,t.jsx)(C,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:S,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function D({onPrevious:e,onNext:s,onClose:a}){let r={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,t.jsxs)(u.Space,{size:4,split:(0,t.jsx)("div",{style:{width:1,height:20,background:k}}),children:[(0,t.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,t.jsx)(y.default,{}),(0,t.jsx)("span",{style:r,children:"K"})]}),(0,t.jsxs)(l.Button,{type:"text",size:"small",onClick:s,children:[(0,t.jsx)(j.DownOutlined,{}),(0,t.jsx)("span",{style:r,children:"J"})]}),(0,t.jsx)(h.Tooltip,{title:"ESC to close",children:(0,t.jsx)(l.Button,{type:"text",icon:(0,t.jsx)(f.CloseOutlined,{}),onClick:a})})]})}function E({log:e,statusLabel:s,statusColor:l,environment:a}){return(0,t.jsxs)(u.Space,{size:12,children:[(0,t.jsx)(p.Tag,{color:l,children:s}),(0,t.jsxs)(p.Tag,{children:["Env: ",a]}),(0,t.jsxs)(u.Space,{size:8,children:[(0,t.jsx)(C,{type:"secondary",style:{fontSize:13},children:(0,b.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,t.jsxs)(C,{type:"secondary",style:{fontSize:13},children:["(",(0,b.default)(e.startTime).fromNow(),")"]})]})]})}var A=e.i(869216),z=e.i(175712),I=e.i(653496),O=e.i(560445),R=e.i(362024),P=e.i(91739),B=e.i(482725),F=e.i(500330);let q=e=>e>=.8?"text-green-600":"text-yellow-600",$=({entities:e})=>{let[l,a]=(0,s.useState)(!0),[r,n]=(0,s.useState)({});return e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>a(!l),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${l?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",e.length,")"]})]}),l&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let l=r[s]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>{n(e=>({...e,[s]:!e[s]}))},children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${l?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,t.jsxs)("span",{className:`font-mono ${q(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),l&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,t.jsx)("span",{children:e.entity_type})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,t.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,t.jsx)("span",{className:q(e.score),children:e.score.toFixed(2)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,t.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,t.jsxs)("div",{className:"flex overflow-hidden",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,t.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,t.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null},H=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),K=e=>e?H("detected","red"):H("not detected","slate"),Y=({title:e,count:l,defaultOpen:a=!0,right:r,children:n})=>{let[i,o]=(0,s.useState)(a);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof l&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",l,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:n})]})},V=({label:e,children:s,mono:l})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:l?"font-mono text-sm break-all":"",children:s})]}),U=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),W=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],l="GUARDRAIL_INTERVENED"===e.action?"red":"green",a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&H(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&H(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=e.usage&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)});return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V,{label:"Action:",children:H(e.action??"N/A",l)}),e.actionReason&&(0,t.jsx)(V,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(V,{label:"Blocked Response:",children:(0,t.jsx)("span",{className:"italic",children:e.blockedResponse})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V,{label:"Coverage:",children:a}),(0,t.jsx)(V,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,t.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text??(0,t.jsx)("em",{children:"(non-text output)"})})},s))})]})]}),e.assessments?.length?(0,t.jsx)("div",{className:"space-y-3",children:e.assessments.map((e,s)=>{let l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&H("word","slate"),e.contentPolicy&&H("content","slate"),e.topicPolicy&&H("topic","slate"),e.sensitiveInformationPolicy&&H("sensitive-info","slate"),e.contextualGroundingPolicy&&H("contextual-grounding","slate"),e.automatedReasoningPolicy&&H("automated-reasoning","slate")]});return(0,t.jsxs)(Y,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&H(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),l]}),children:[e.wordPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(e.wordPolicy.customWords?.length??0)>0&&(0,t.jsx)(Y,{title:"Custom Words",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[H(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),K(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(Y,{title:"Managed Word Lists",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[H(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&H(e.type,"slate")]}),K(e.detected)]},s))})})]}),e.contentPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,t.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:H(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:K(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.filterStrength??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.confidence??"—"})]},s))})]})})]}):null,e.contextualGroundingPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,t.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:H(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:K(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.score??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.threshold??"—"})]},s))})]})})]}):null,e.sensitiveInformationPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(e.sensitiveInformationPolicy.piiEntities?.length??0)>0&&(0,t.jsx)(Y,{title:"PII Entities",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[H(e.action??"N/A",e.detected?"red":"slate"),e.type&&H(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),K(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(Y,{title:"Custom Regexes",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[H(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"regex"}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[K(e.detected),e.match&&(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s))})})]}),e.topicPolicy?.topics?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>(0,t.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[H(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&H(e.type,"slate"),K(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(Y,{title:"Invocation Metrics",defaultOpen:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(V,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&H(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&H(`images ${e.invocationMetrics.guardrailCoverage.images.guarded??0}/${e.invocationMetrics.guardrailCoverage.images.total??0}`,"blue")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(V,{label:"Usage:",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)})})})]})}),e.automatedReasoningPolicy?.findings?.length?(0,t.jsx)(Y,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(Y,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},J=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),G=({title:e,count:l,defaultOpen:a=!0,children:r})=>{let[n,i]=(0,s.useState)(a);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>i(e=>!e),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof l&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",l,")"]})]})]})}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},Q=({label:e,children:s,mono:l})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:l?"font-mono text-sm break-all":"",children:s})]}),X=({response:e})=>{if(!e||"string"==typeof e)return"string"==typeof e&&e?(0,t.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,t.jsxs)("div",{className:"text-red-800",children:[(0,t.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,t.jsx)("p",{className:"text-sm",children:e})]})}):null;let s=Array.isArray(e)?e:[];if(0===s.length)return(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let l=s.filter(e=>"pattern"===e.type),a=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),n=s.filter(e=>"BLOCK"===e.action).length,i=s.filter(e=>"MASK"===e.action).length,o=s.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(Q,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(Q,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[n>0&&J(`${n} blocked`,"red"),i>0&&J(`${i} masked`,"blue"),0===n&&0===i&&J("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(Q,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[l.length>0&&J(`${l.length} patterns`,"slate"),a.length>0&&J(`${a.length} keywords`,"slate"),r.length>0&&J(`${r.length} categories`,"slate")]})})})]})}),l.length>0&&(0,t.jsx)(G,{title:"Patterns Matched",count:l.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(Q,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(Q,{label:"Action:",children:J(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),a.length>0&&(0,t.jsx)(G,{title:"Blocked Words Detected",count:a.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(Q,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(Q,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(Q,{label:"Action:",children:J(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(G,{title:"Category Keywords Detected",count:r.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(Q,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(Q,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(Q,{label:"Severity:",children:J(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(Q,{label:"Action:",children:J(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(G,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var Z=e.i(764205);let ee=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M5 8l2 2 4-4",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),et=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),es=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"animate-spin",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"#D1D5DB",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2a6 6 0 0 1 6 6",stroke:"#6366F1",strokeWidth:"2",strokeLinecap:"round"})]}),el=({title:e,data:l,loading:a,error:r})=>{let[n,i]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>i(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a?(0,t.jsx)(es,{}):r?(0,t.jsx)(h.Tooltip,{title:r,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(ee,{}):(0,t.jsx)(et,{}),(0,t.jsx)("span",{className:"font-medium text-sm text-gray-900",children:e})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!a&&!r&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),r&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded text-[11px] font-medium bg-gray-100 text-gray-500 border border-gray-200",children:"UNAVAILABLE"}),(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${n?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[a&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),r&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:r}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(ee,{}):(0,t.jsx)(et,{})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.check_name}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-gray-400",children:e.article})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:e.detail})]})]},s))})]})]})},ea=({accessToken:e,logEntry:l})=>{let[a,r]=(0,s.useState)(null),[n,i]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!l.request_id)return;let t={request_id:l.request_id,user_id:l.user,model:l.model,timestamp:l.startTime,guardrail_information:l.metadata?.guardrail_information};d(!0),u(null),(0,Z.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,Z.checkGdprCompliance)(e,t).then(i).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,l]),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Regulatory Compliance"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(el,{title:"EU AI Act",data:a,loading:o,error:m}),(0,t.jsx)(el,{title:"GDPR",data:n,loading:c,error:p})]})]})},er=new Set(["presidio","bedrock","litellm_content_filter"]),en=(e,t)=>{if(null==e)return!1;if("string"==typeof e)return e===t;if(Array.isArray(e))return e.includes(t);if("object"==typeof e&&"default"in e){let s=e.default;if("string"==typeof s)return s===t;if(Array.isArray(s))return s.some(e=>"string"==typeof e&&e===t)}return!1},ei=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),eo=e=>"success"===(e.guardrail_status??"").toLowerCase(),ed=e=>e.policy_template||e.guardrail_name,ec=()=>(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,t.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"#EEF2FF"}),(0,t.jsx)("path",{d:"M20 10l8 4v6c0 5.25-3.4 10.15-8 11.5C15.4 30.15 12 25.25 12 20v-6l8-4z",stroke:"#6366F1",strokeWidth:"1.5",fill:"none"}),(0,t.jsx)("path",{d:"M16 20l3 3 5-6",stroke:"#6366F1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),ex=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M7 11l3 3 5-6",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),em=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),eu=()=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#3B82F6",strokeWidth:"1.5",fill:"#EFF6FF"}),(0,t.jsx)("path",{d:"M9 7.5l6 3.5-6 3.5V7.5z",fill:"#3B82F6"})]}),ep=()=>(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,t.jsx)("circle",{cx:"11",cy:"11",r:"5",fill:"#9CA3AF"})}),eh=({expanded:e})=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${e?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),eg=()=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ef=({matchDetails:e})=>e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Match Details (",e.length,")"]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-gray-500",children:[(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Type"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Method"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Action"}),(0,t.jsx)("th",{className:"pb-2 font-medium",children:"Detail"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"border-b border-gray-100",children:[(0,t.jsx)("td",{className:"py-2 pr-4",children:e.type}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 rounded text-xs",children:e.detection_method??"-"})}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${"BLOCK"===e.action_taken?"bg-red-100 text-red-800":"bg-blue-50 text-blue-700"}`,children:e.action_taken??"-"})}),(0,t.jsxs)("td",{className:"py-2 font-mono text-xs text-gray-600 break-all",children:[e.category?`[${e.category}] `:"",e.snippet??"-"]})]},s))})]})})]}):null,ey=({response:e})=>{let[l,a]=(0,s.useState)(!1);return(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>a(!l),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(eh,{expanded:l}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),l&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},ej=({entries:e})=>{let l=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),a=(0,s.useMemo)(()=>{if(0===l.length)return[];let e=l[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=l.filter(e=>en(e.guardrail_mode,"pre_call")),a=l.filter(e=>en(e.guardrail_mode,"post_call")||en(e.guardrail_mode,"logging_only")),r=l.filter(e=>en(e.guardrail_mode,"during_call"));for(let l of s){let s=Math.round((l.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${ed(l)}`,offsetMs:s,status:eo(l)?"PASSED":"FAILED",isSuccess:eo(l)})}let n=s.length>0?Math.max(...s.map(e=>e.end_time)):e,i=Math.round((((a.length>0?Math.min(...a.map(e=>e.start_time)):void 0)??n+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:i}),r)){let l=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${ed(s)}`,offsetMs:l,status:eo(s)?"PASSED":"FAILED",isSuccess:eo(s)})}for(let s of a){let l=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${ed(s)}`,offsetMs:l,status:eo(s)?"PASSED":"FAILED",isSuccess:eo(s)})}let o=Math.round((Math.max(...l.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[l]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Request Lifecycle"}),(0,t.jsx)("div",{className:"relative",children:a.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-3 relative",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(ep,{}):"llm"===e.type?(0,t.jsx)(eu,{}):e.isSuccess?(0,t.jsx)(ex,{}):(0,t.jsx)(em,{})}),s{let l,a,[r,n]=(0,s.useState)(!1),i=eo(e),o=ei(e),d=ed(e),c=(l=Math.round(1e3*e.duration),`${l}ms`),x=null==(a=(e=>{if(null==e)return null;if("string"==typeof e)return e;if(Array.isArray(e)){let t=e[0];return"string"==typeof t?t:null}if("object"==typeof e&&"default"in e){let t=e.default;if("string"==typeof t)return t;if(Array.isArray(t)){let e=t[0];return"string"==typeof e?e:null}}return null})(e.guardrail_mode))||""===a?"—":a.replace(/_/g,"-").toUpperCase(),m=(e=>{if(!eo(e))return null;if(null!=e.risk_score)return e.risk_score;let t=ei(e),s=e.patterns_checked??0,l=e.confidence_score??0;if(0===s&&0===l)return 0;let a=7*(s>0?t/s:0)+3*l;return t>0&&a<2&&(a=2),Math.min(10,Math.round(10*a)/10)})(e),u=e.guardrail_provider??"presidio",p=e.guardrail_response,g=Array.isArray(p)?p:[],f="bedrock"!==u||null===p||"object"!=typeof p||Array.isArray(p)?void 0:p,y=null!=e.patterns_checked?`${o}/${e.patterns_checked} matched`:o>0?`${o} matched`:null;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>n(!r),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:i?(0,t.jsx)(ex,{}):(0,t.jsx)(em,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm truncate",children:d}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:x}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${i?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:i?"PASSED":"FAILED"}),y&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===o?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:y}),null!=e.confidence_score&&(0,t.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=m&&i&&(0,t.jsx)(h.Tooltip,{title:`Risk score: ${m}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${m<=3?"text-green-600 bg-green-50 border-green-200":m<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",m,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:c}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(eh,{expanded:r})]})]}),r&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[e.classification&&(0,t.jsxs)("div",{className:"mb-3 bg-gray-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Classification"}),e.classification.category&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Category:"}),(0,t.jsx)("span",{children:e.classification.category})]}),e.classification.article_reference&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reference:"}),(0,t.jsx)("span",{className:"font-mono",children:e.classification.article_reference})]}),null!=e.classification.confidence&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Confidence:"}),(0,t.jsxs)("span",{children:[(100*e.classification.confidence).toFixed(0),"%"]})]}),e.classification.reason&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reason:"}),(0,t.jsx)("span",{children:e.classification.reason})]})]}),e.match_details&&e.match_details.length>0&&(0,t.jsx)(ef,{matchDetails:e.match_details}),o>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Masked Entities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.masked_entity_count||{}).map(([e,s])=>(0,t.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===u&&g.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)($,{entities:g})}),"bedrock"===u&&f&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(W,{response:f})}),"litellm_content_filter"===u&&p&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(X,{response:p})}),u&&!er.has(u)&&p&&(0,t.jsx)(ey,{response:p})]})]})},ev=({data:e,accessToken:l,logEntry:a})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),n=r.filter(eo).length,i=n===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm w-full max-w-full overflow-hidden mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(ec,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Guardrails & Policy Compliance"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:[r.length," guardrail",1!==r.length?"s":""," evaluated"]}),(0,t.jsx)("span",{className:"text-gray-300",children:"|"}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold ${i?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[i?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 6l2.5 2.5L9 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,n," Passed"]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsx)("div",{className:"text-right",children:(0,t.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["Total: ",o,"ms overhead"]})}),(0,t.jsxs)("button",{onClick:()=>{let e=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`guardrail-compliance-log-${new Date().toISOString().slice(0,10)}.json`,s.click(),URL.revokeObjectURL(t)},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(eg,{}),"Export Compliance Log"]})]})]}),l&&a&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(ea,{accessToken:l,logEntry:a})}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-6 py-5",children:(0,t.jsx)(ej,{entries:r})}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Evaluation Details"}),(0,t.jsx)("div",{className:"space-y-3",children:r.map((e,s)=>(0,t.jsx)(eb,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})};var e_=e.i(291542),eN=e.i(245704),ew=e.i(518617),eS=e.i(19732);let{Text:ek}=g.Typography;function eC({data:e}){let s=Array.isArray(e)?e:[e];return s.length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[(0,t.jsx)(eS.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(ek,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(eT,{entry:e},e.eval_id||s))]}):null}function eT({entry:e}){let s=e.passed,l=s?"#52c41a":"#ff4d4f",a=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),r=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(ek,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(ek,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(h.Tooltip,{title:"Score × Weight — how much each criterion contributes to the final score",children:(0,t.jsx)("span",{style:{borderBottom:"1px dashed #aaa",cursor:"help"},children:"Weighted"})}),key:"weighted",width:75,render:(e,s)=>{if(null==s.weight)return null;let l=s.score*s.weight/100;return(0,t.jsx)(ek,{type:"secondary",style:{fontSize:12},children:l%1==0?l:l.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(h.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(z.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${l}`},title:(0,t.jsxs)(u.Space,{children:[s?(0,t.jsx)(eN.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(ew.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(ek,{strong:!0,children:e.eval_name}),(0,t.jsx)(p.Tag,{color:s?"success":"error",children:s?"PASSED":"FAILED"}),(0,t.jsx)(h.Tooltip,{title:"Weighted average of all criterion scores. Each criterion has a weight (%) set when the eval was created — higher-weight criteria count more toward the final score.",children:(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:12,cursor:"help",borderBottom:"1px dashed #aaa"},children:[e.overall_score?.toFixed(0)," / 100",null!=e.threshold&&` (threshold: ${e.threshold})`]})})]}),extra:(0,t.jsxs)(u.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(ek,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),a.length>0?(0,t.jsx)(e_.Table,{dataSource:a,columns:r,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!a.some(e=>null!=e.weight))return null;let e=a.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(e_.Table.Summary.Row,{children:[(0,t.jsx)(e_.Table.Summary.Cell,{index:0,children:(0,t.jsx)(ek,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(e_.Table.Summary.Cell,{index:1}),(0,t.jsx)(e_.Table.Summary.Cell,{index:2}),(0,t.jsx)(e_.Table.Summary.Cell,{index:3,children:(0,t.jsx)(ek,{strong:!0,style:{fontSize:12,color:l},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(e_.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}let eL=e=>null==e?"-":`$${(0,F.formatNumberWithCommas)(e,8)}`,eM=e=>null==e?"-":`${(100*e).toFixed(2)}%`,eD=({costBreakdown:e,totalSpend:s,promptTokens:l,completionTokens:a,cacheHit:r,rawInputTokens:n,cacheReadTokens:i,cacheCreationTokens:o})=>{let d=r?.toLowerCase()==="true",c=void 0!==l||void 0!==a,x=e?.input_cost!==void 0||e?.output_cost!==void 0,m=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(x||c||m||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let u=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),p=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),h=d?0:e?.input_cost,g=d?0:e?.output_cost,f=d?0:e?.original_cost,y=d?0:e?.total_cost??s;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(R.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[eL(s),d&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(()=>{if(e?.cache_read_cost!==void 0||e?.cache_creation_cost!==void 0){let s=d?0:(h??0)-(e?.cache_read_cost??0)-(e?.cache_creation_cost??0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eL(s),null!=n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," tokens)"]})]})]}),(e?.cache_read_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eL(d?0:e?.cache_read_cost),(i??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(i??0).toLocaleString()," tokens)"]})]})]}),(e?.cache_creation_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eL(d?0:e?.cache_creation_cost),(o??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(o??0).toLocaleString()," tokens)"]})]})]})]})}return(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eL(h),void 0!==l&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",l.toLocaleString()," prompt tokens)"]})]})]})})(),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[eL(g),void 0!==a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",a.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:eL(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:eL(s)})]},e))]}),!d&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:eL(f)})]})}),(u||p)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[u&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",eM(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",eL(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",eL(e.discount_amount)]})]})]}),p&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",eM(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",eL((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",eL(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[eL(y),d&&" (Cached)"]})]})})]})}]})})},eE=({show:e})=>e?(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,t.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,t.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file, or toggle the setting in ",(0,t.jsx)("strong",{children:"Admin Settings → Logging Settings"}),"."]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: + store_model_in_db: true + store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null;function eA({data:e}){let[l,a]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(R.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var n,i;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:l}=(0,v.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${l} logo`,className:"h-5 w-5 mr-2"}),l]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(n=e.start_time,i=e.end_time,`${((i-n)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let n=l[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void a(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}let{Text:ez}=g.Typography;function eI({value:e,maxWidth:s=180}){return e?(0,t.jsx)(h.Tooltip,{title:e,children:(0,t.jsx)(ez,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:S,fontSize:12},ellipsis:!0,children:e})}):(0,t.jsx)(ez,{type:"secondary",children:"-"})}let{Text:eO}=g.Typography;function eR({prompt:e=0,completion:s=0,total:l=0}){return(0,t.jsxs)(eO,{children:[l.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let eP=e=>!!e&&e instanceof Date,eB=e=>"object"==typeof e&&null!==e,eF=e=>!!e&&e instanceof Object&&"function"==typeof e;function eq(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function e$(e){let{field:t,value:l,data:a,lastElement:r,openBracket:n,closeBracket:i,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,l,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,l,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===a.length)return function(e){let{field:t,openBracket:l,closeBracket:a,lastElement:r,style:n}=e;return(0,s.createElement)("div",{className:n.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:n.label},eq(t,n.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n.punctuation},l),(0,s.createElement)("span",{className:n.punctuation},a),!r&&(0,s.createElement)("span",{className:n.punctuation},","))}({field:t,openBracket:n,closeBracket:i,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=a.length-1,N=e=>{h!==e&&(!u||u({level:o,value:l,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),l=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},eq(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},eq(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},n),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},a.map((e,t)=>(0,s.createElement)(eV,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},i),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function eH(e){let{field:t,value:s,style:l,lastElement:a,shouldExpandNode:r,clickToExpandNode:n,level:i,outerRef:o,beforeExpandChange:d}=e;return e$({field:t,value:s,lastElement:a||!1,level:i,openBracket:"{",closeBracket:"}",style:l,shouldExpandNode:r,clickToExpandNode:n,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function eK(e){let{field:t,value:s,style:l,lastElement:a,level:r,shouldExpandNode:n,clickToExpandNode:i,outerRef:o,beforeExpandChange:d}=e;return e$({field:t,value:s,lastElement:a||!1,level:r,openBracket:"[",closeBracket:"]",style:l,shouldExpandNode:n,clickToExpandNode:i,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function eY(e){let t,{field:l,value:a,style:r,lastElement:n}=e,i=r.otherValue;if(null===a)t="null",i=r.nullValue;else if(void 0===a)t="undefined",i=r.undefinedValue;else if("string"==typeof a||a instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(a):o?`"${a}"`:a,i=r.stringValue}else if("boolean"==typeof a||a instanceof Boolean)t=a?"true":"false",i=r.booleanValue;else if("number"==typeof a||a instanceof Number)t=a.toString(),i=r.numberValue;else"bigint"==typeof a||a instanceof BigInt?(t=`${a.toString()}n`,i=r.numberValue):t=eP(a)?a.toISOString():eF(a)?"function() { }":a.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(l||""===l)&&(0,s.createElement)("span",{className:r.label},eq(l,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i},t),!n&&(0,s.createElement)("span",{className:r.punctuation},","))}function eV(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(eK,Object.assign({},e)):!eB(t)||eP(t)||eF(t)?(0,s.createElement)(eY,Object.assign({},e)):(0,s.createElement)(eH,Object.assign({},e))}let eU={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},eW=()=>!0,eJ=e=>{let{data:t,style:l=eU,shouldExpandNode:a=eW,clickToExpandNode:r=!1,beforeExpandChange:n,compactTopLevel:i,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:l.container,ref:d,role:"tree"}),i&&eB(t)?Object.entries(t).map(e=>{let[t,i]=e;return(0,s.createElement)(eV,{key:t,field:t,value:i,style:{...eU,...l},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:r,beforeExpandChange:n,outerRef:d})}):(0,s.createElement)(eV,{value:t,style:{...eU,...l},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:r,outerRef:d,beforeExpandChange:n}))},{Text:eG}=g.Typography;function eQ({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:400,overflow:"auto",background:"#fafafa",padding:12,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(eJ,{data:e,style:eU,clickToExpandNode:!0})})}):(0,t.jsx)(eG,{type:"secondary",children:"No data"})}function eX(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function eZ(e){return Array.isArray(e)?e:e?[e]:[]}function e0(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var e1=e.i(366308);let{Text:e2}=g.Typography;function e5({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),l=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(e2,{code:!0,children:[e,s.required&&(0,t.jsx)(e2,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(e2,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(e2,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(e2,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e2,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(e_.Table,{dataSource:s,columns:l,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(e2,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function e4({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:e6}=g.Typography;function e3({tool:e}){let[l,a]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(e6,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(P.Radio.Group,{size:"small",value:l,onChange:e=>a(e.target.value),children:[(0,t.jsx)(P.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(P.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===l?(0,t.jsx)(e5,{tool:e}):(0,t.jsx)(e4,{tool:e})]})}let{Text:e8}=g.Typography;function e7({tool:e}){let[l,a]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>a(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:l?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(e1.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(e8,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(p.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),l?(0,t.jsx)(j.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),l&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(e3,{tool:e})})]})}let{Text:e9}=g.Typography;function te({log:e}){let s=function(e){let t,s=!(t=e0(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let l=function(e){let t=e0(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),a=new Set(l.map(e=>e.function?.name).filter(Boolean)),r=new Map;return l.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:a.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let l=s.length,a=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),n=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(R.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(e9,{type:"secondary",style:{fontSize:14},children:[l," provided, ",a," called"]}),(0,t.jsxs)(e9,{type:"secondary",style:{fontSize:14},children:["• ",r,n&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(e7,{tool:e},e.name))})}]})})}let tt=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var ts=e.i(888259),tl=e.i(264843),y=y;let{Text:ta}=g.Typography;function tr({type:e,tokens:s,cost:a,onCopy:r,isCollapsed:i,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:i?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:i?(0,t.jsx)(j.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(y.default,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(tl.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ta,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ta,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==a&&(0,t.jsxs)(ta,{type:"secondary",style:{fontSize:12},children:["Cost: $",a.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ta,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(h.Tooltip,{title:"Copy",children:(0,t.jsx)(l.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:tn}=g.Typography;function ti({label:e,content:l,defaultExpanded:a=!1}){let[r,n]=(0,s.useState)(a),[i,d]=(0,s.useState)(!1),c=l?.length||0;return l&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>n(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:i?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(j.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(tn,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(tn,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:l})})]}):null}let{Text:to}=g.Typography;function td({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(to,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(to,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(to,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:tc}=g.Typography;function tx({label:e,content:s,toolCalls:l,isCompact:a=!1}){let r=s&&"null"!==s&&s.length>0?s:null,n=l&&l.length>0;return r||n?(0,t.jsxs)("div",{style:{marginBottom:8*!!a},children:[(0,t.jsx)(tc,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!n},children:r}),n&&(0,t.jsx)("div",{children:l.map((e,s)=>(0,t.jsx)(td,{tool:e,compact:a},e.id||s))})]}):null}let{Text:tm}=g.Typography;function tu({messages:e}){let[l,a]=(0,s.useState)(!1),[r,n]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>a(!l),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!l},children:[l?(0,t.jsx)(j.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(tm,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:l?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!l},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(tx,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function tp({messages:e,promptTokens:l,inputCost:a}){let[r,n]=(0,s.useState)(!1);if(0===e.length)return null;let i=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(tr,{type:"input",tokens:l,cost:a,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),ts.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>n(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[i&&(0,t.jsx)(ti,{label:"SYSTEM",content:i.content,defaultExpanded:!!(i.content&&i.content.length<200)}),c.length>0&&(0,t.jsx)(tu,{messages:c}),d&&(0,t.jsx)(tx,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:th}=g.Typography;function tg({message:e,completionTokens:l,outputCost:a}){let[r,n]=(0,s.useState)(!1),i=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),ts.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(tr,{type:"output",tokens:l,cost:a,onCopy:i,isCollapsed:r,onToggleCollapse:()=>n(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(tx,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(tr,{type:"output",tokens:l,cost:a,onCopy:i,isCollapsed:r,onToggleCollapse:()=>n(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(th,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var tf=e.i(782273),ty=e.i(313603),tj=e.i(793916),y=y;let{Text:tb}=g.Typography;function tv({response:e,metrics:s}){let l=e?.results||[],a=e?.usage,r=l.find(e=>"session.created"===e.type||"session.updated"===e.type),n=l.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(t_,{session:r.session,turnCount:n.length}),n.length>0&&(0,t.jsx)(tN,{responses:n.map(e=>e.response).filter(Boolean),totalUsage:a,metrics:s}),!r&&0===n.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function t_({session:e,turnCount:l}){let[a,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:a?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:a?(0,t.jsx)(j.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(y.default,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(ty.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(tb,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(tb,{type:"secondary",style:{fontSize:12},children:e.model}),l>0&&(0,t.jsxs)(p.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[l," ",1===l?"turn":"turns"]}),e.voice&&(0,t.jsxs)(p.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(tf.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(p.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(tj.AudioOutlined,{}):(0,t.jsx)(tl.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:a?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!a},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(tC,{label:"Model",value:e.model}),(0,t.jsx)(tC,{label:"Voice",value:e.voice}),(0,t.jsx)(tC,{label:"Temperature",value:e.temperature}),(0,t.jsx)(tC,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(tC,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(tC,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(tC,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(tC,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(tb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function tN({responses:e,totalUsage:l,metrics:a}){let[r,n]=(0,s.useState)(!1),i=l?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(tr,{type:"output",tokens:a?.completion_tokens??i,cost:a?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>n(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(tw,{response:e,index:s},e.id||s))})})]})}function tw({response:e,index:s}){let l=e.output||[],a=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(p.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),a&&(0,t.jsxs)(tb,{type:"secondary",style:{fontSize:11},children:[a.input_tokens??0," in / ",a.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(h.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(tb,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),l.map((e,s)=>(0,t.jsx)(tS,{output:e},e.id||s)),a?.input_token_details&&(0,t.jsx)(tk,{label:"Input",details:a.input_token_details}),a?.output_token_details&&(0,t.jsx)(tk,{label:"Output",details:a.output_token_details})]})}function tS({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(tb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let l=e.transcript||e.text;return l?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(tj.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(tl.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:l})]},s):null})]}):null}function tk({label:e,details:s}){let l=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===l.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(tb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:l.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(p.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function tC({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(tb,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function tT({request:e,response:s,metrics:l}){let a,r,n;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(tv,{response:s,metrics:l});let{requestMessages:i,responseMessage:o}=(a=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;a.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(n=s?.choices?.[0]?.message)&&(r={role:n.role||"assistant",content:n.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:tt(e.function?.arguments)}))})(n.tool_calls)}),{requestMessages:a,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(tp,{messages:i,promptTokens:l?.prompt_tokens,inputCost:l?.input_cost}),(0,t.jsx)(tg,{message:o,completionTokens:l?.completion_tokens,outputCost:l?.output_cost})]})}let{Text:tL}=g.Typography;function tM({logEntry:e,isLoadingDetails:s=!1,accessToken:l}){var a,r;let n=e.metadata||{},i="failure"===n.status,o=i?n.error_information:null,d=!!(a=e.messages)&&(Array.isArray(a)?a.length>0:"object"==typeof a&&Object.keys(a).length>0),c=!!(r=e.response)&&Object.keys(eX(r)).length>0,x=!d&&!c&&!i&&!s,m=n?.guardrail_information,u=eZ(m),p=u.length>0,h=u.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),g=0===u.length?"-":1===u.length?u[0]?.guardrail_name??"-":`${u.length} guardrails`,f=n?.eval_information,y=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${_} ${_} 0`},children:[i&&o&&(0,t.jsx)(O.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(tD,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(tE,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(z.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(A.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(A.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(A.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(A.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(A.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(eI,{value:e.model_id})}),(0,t.jsx)(A.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(eI,{value:e.api_base,maxWidth:200})}),e.requester_ip_address&&(0,t.jsx)(A.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(A.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(tA,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(tz,{logEntry:e,metadata:n}),(0,t.jsx)(eD,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:n?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:n?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:n?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(te,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(eE,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(B.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(tI,{hasResponse:c,hasError:i,getRawRequest:()=>eX(e.proxy_server_request||e.messages),getFormattedResponse:()=>i&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:eX(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(ev,{data:m,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=f&&(0,t.jsx)(eC,{data:f}),y&&(0,t.jsx)(eA,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(tR,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:_}})]})}function tD({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(tL,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(tL,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function tE({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(tL,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(u.Space,{size:8,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(p.Tag,{children:[e,": ",String(s)]},e))})]})}function tA({label:e,maskedCount:s}){return(0,t.jsxs)(u.Space,{size:8,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(p.Tag,{color:"blue",children:[s," masked"]})]})}function tz({logEntry:e,metadata:s}){let l=e.completionStartTime,a=l&&l!==e.endTime?new Date(l).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,n=String(e.cache_hit??"None"),i="true"===n.toLowerCase()?"green":"false"===n.toLowerCase()?"red":"default",o=function(e){let t=e?.additional_usage_values?.prompt_tokens_details?.text_tokens??e?.usage_object?.prompt_tokens_details?.text_tokens;if(null==t)return;let s=Number(t);return Number.isFinite(s)?s:void 0}(s),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(z.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(A.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Descriptions.Item,{label:"Input Tokens",children:(0,F.formatNumberWithCommas)(o)}),(0,t.jsx)(A.Descriptions.Item,{label:"Output Tokens",children:(0,F.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(A.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(eR,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(A.Descriptions.Item,{label:"Cost",children:["$",(0,F.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(A.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=a&&a>0&&(0,t.jsxs)(A.Descriptions.Item,{label:"Time to First Token",children:[(a/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(p.Tag,{color:i,children:n})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(A.Descriptions.Item,{label:"Cache Read Tokens",children:(0,F.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(A.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,F.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(A.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(A.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(p.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(A.Descriptions.Item,{label:"Start Time",children:(0,b.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(A.Descriptions.Item,{label:"End Time",children:(0,b.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function tI({hasResponse:e,hasError:l,getRawRequest:a,getFormattedResponse:r,logEntry:n}){let[i,o]=(0,s.useState)(N),[d,c]=(0,s.useState)("pretty"),x=n.spend??0,m=n.prompt_tokens||0,u=n.completion_tokens||0,p=m+u,h=n.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(R.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(P.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(P.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(P.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(tT,{request:a(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(I.Tabs,{activeKey:i,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(tL,{copyable:{text:JSON.stringify(i===N?a():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:i===w&&!e&&!l}),items:[{key:N,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:16,paddingBottom:16},children:(0,t.jsx)(eQ,{data:a(),mode:"formatted"})})},{key:w,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:16,paddingBottom:16},children:e||l?(0,t.jsx)(eQ,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function tO({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function tR({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(R.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(tL,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:300,overflowY:"auto",fontSize:12,fontFamily:S,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var tP=e.i(266027),tB=e.i(135214);function tF({row:e,isSelected:s,onClick:l}){let a=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),n=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:l,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[a?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:function(e,t){let s=(t||"").trim();if(m.MCP_CALL_TYPES.includes(e))return s.replace(/^mcp:\s*/i,"").split("/").pop()||s||"mcp_tool";let l=(s.split("/").pop()||s).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),a=l.match(/claude-[a-z0-9-]+/i);return a?a[0]:l||"llm_call"}(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[n,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,F.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}e.s(["LogDetailsDrawer",0,function({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:p=[],onSelectLog:h,startTime:g}){let f=!!x,[y,j]=(0,s.useState)(null),[b,v]=(0,s.useState)(!1),[_,N]=(0,s.useState)(!1),{data:w=[]}=(0,tP.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,Z.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),l=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==l?s-l:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&f&&x&&u)}),S=(0,s.useMemo)(()=>f?w.length?y?w.find(e=>e.request_id===y)||w[0]:c?.request_id&&w.find(e=>e.request_id===c.request_id)||w[0]:null:c,[f,c,y,w]);(0,s.useEffect)(()=>{f&&w.length&&(y&&w.some(e=>e.request_id===y)||j(c?.request_id&&w.some(e=>e.request_id===c.request_id)?c.request_id:w[0].request_id))},[f,c,y,w]),(0,s.useEffect)(()=>{e?v(!1):(f&&j(null),N(!1))},[e,f]);let{selectNextLog:k,selectPreviousLog:C}=function({isOpen:e,currentLog:t,allLogs:l,onClose:a,onSelectLog:r}){(0,s.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case"Escape":a();break;case"j":case"J":n();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,l]);let n=()=>{if(!t||!l.length||!r)return;let e=l.findIndex(e=>e.request_id===t.request_id);e{if(!t||!l.length||!r)return;let e=l.findIndex(e=>e.request_id===t.request_id);e>0&&r(l[e-1])};return{selectNextLog:n,selectPreviousLog:i}}({isOpen:e,currentLog:S,allLogs:f?w:p,onClose:d,onSelectLog:e=>{f&&j(e.request_id),h?.(e)}}),L=((e,t,s)=>{let{accessToken:l}=(0,tB.default)();return(0,tP.useQuery)({queryKey:["logDetails",e,t,l],queryFn:async()=>l&&e&&t?await (0,Z.uiSpendLogDetailsCall)(l,e,t):null,enabled:s&&!!l&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(S?.request_id,g,e&&!!S?.request_id),M=L.data,D=L.isLoading,E=(0,s.useMemo)(()=>S?{...S,messages:M?.messages||S.messages,response:M?.response||S.response,proxy_server_request:M?.proxy_server_request||S.proxy_server_request}:null,[S,M]),A=S?.metadata||{},z="failure"===A.status?"Failure":"Success",I="failure"===A.status?"error":"success",O=A?.user_api_key_team_alias||"default",R=w.reduce((e,t)=>e+(t.spend||0),0),P=w.length>0?new Date(Math.min(...w.map(e=>new Date(e.startTime).getTime()))):null,B=w.length>0?new Date(Math.max(...w.map(e=>new Date(e.endTime).getTime()))):null,q=P&&B?((B.getTime()-P.getTime())/1e3).toFixed(2):"0.00",$=w.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,H=w.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,K=w.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,Y=f?w:S?[S]:[],V=f?x||"":S?.request_id||"",U=V.length>14?`${V.slice(0,11)}...`:V,W=async()=>{if(V)try{await navigator.clipboard.writeText(V),N(!0),setTimeout(()=>N(!1),1200)}catch{}};return S&&E?(0,t.jsx)(a.Drawer,{title:null,placement:"right",onClose:d,open:e,width:"60%",closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[b?(0,t.jsx)(l.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>v(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(l.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.LeftOutlined,{}),onClick:()=>v(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!b&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:f?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:U}),(0,t.jsx)("button",{type:"button",onClick:W,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:_?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(n.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[Y.length," req",[f?$:Y.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,f?H:Y.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,f?K:Y.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let l=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,l]},l):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),f?(0,F.getSpendString)(R):(0,F.getSpendString)(S.spend||0),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),q,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[eZ(A?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(tO,{guardrailEntries:eZ(A?.guardrail_information)})}),f?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),Y.map((e,s)=>{let l=s===Y.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),l&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(tF,{row:e,isSelected:e.request_id===S.request_id,onClick:()=>{j(e.request_id),h?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:Y.map(e=>(0,t.jsx)(tF,{row:e,isSelected:e.request_id===S.request_id,onClick:()=>h?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(T,{log:S,onClose:d,onPrevious:C,onNext:k,statusLabel:z,statusColor:I,environment:O}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(tM,{logEntry:E,isLoadingDetails:D,accessToken:u??null})})]})]})}):null}],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},86827,e=>{"use strict";var t=e.i(843476),s=e.i(482725),l=e.i(56456);e.s(["AntDLoadingSpinner",0,function({size:e,fontSize:a}){let r=(0,t.jsx)(l.LoadingOutlined,{style:a?{fontSize:a}:void 0,spin:!0});return(0,t.jsx)(s.Spin,{indicator:r,size:e})}])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(560445),a=e.i(207082),r=e.i(135214),n=e.i(500330),i=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:l,isLoading:a,isFetching:r,pageIndex:b,pageSize:v,onPageChange:_}){let[N,w]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[S,k]=(0,s.useState)({pageIndex:b,pageSize:v});s.default.useEffect(()=>{k({pageIndex:b,pageSize:v})},[b,v]);let C=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,n.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,n.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],T=(0,c.useReactTable)({data:e,columns:C,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:N,pagination:S},onSortingChange:w,onPaginationChange:e=>{let t="function"==typeof e?e(S):e;k(t),_(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(l/v)}),{pageIndex:L}=T.getState().pagination,M=L*v+1,D=Math.min((L+1)*v,l),E=`${M} - ${D}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[a||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",E," of ",l," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[a||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",L+1," of ",T.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>T.previousPage(),disabled:a||r||!T.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>T.nextPage(),disabled:a||r||!T.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:T.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:T.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(i.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${T.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:C.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?T.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:C.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}e.s(["default",0,function(){let{premiumUser:e}=(0,r.default)(),[n,i]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,a.useDeletedKeys)(n+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(l.Alert,{type:"info",banner:!0,showIcon:!0,message:"Coming soon to Enterprise",description:"Deleted key auditing is graduating from beta into our Enterprise audit & compliance suite."}),(0,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:n,pageSize:o,onPageChange:i})]})}],93648);var b=e.i(785242),v=e.i(389083),_=e.i(599724),N=e.i(355619);function w({teams:e,isLoading:l,isFetching:a}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,n.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,n.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(v.Badge,{size:"xs",color:"red",children:(0,t.jsx)(_.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(v.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(_.Text,{children:e.length>30?`${(0,N.getModelDisplayName)(e).slice(0,30)}...`:(0,N.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(v.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(_.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(v.Badge,{size:"xs",color:"red",children:(0,t.jsx)(_.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],S=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:l||a?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:S.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:S.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(i.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${S.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||a?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?S.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}e.s(["default",0,function(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:a,isFetching:n}=(0,b.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(l.Alert,{type:"info",banner:!0,showIcon:!0,message:"Coming soon to Enterprise",description:"Deleted team auditing is graduating from beta into our Enterprise audit & compliance suite."}),(0,t.jsx)(w,{teams:s||[],isLoading:a,isFetching:n})]})}],245767)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(266027),a=e.i(619273),r=e.i(291542),n=e.i(262218),i=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:l}){let[a,r]=(0,s.useState)(!1),n=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(l,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[l]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:n,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:a?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(l,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:l,before_value:a,updated_values:r}=e,n="LiteLLM_VerificationToken"===l,i="updated"===s||"rotated"===s,o=a,d=r;if(i&&a&&r){let e={},t={};new Set([...Object.keys(a),...Object.keys(r)]).forEach(s=>{JSON.stringify(a[s])!==JSON.stringify(r[s])&&(s in a&&(e[s]=a[s]),s in r&&(t[s]=r[s]))}),Object.keys(a).forEach(s=>{s in r||s in e||(e[s]=a[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in a||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(n&&i){let l=["token","spend","max_budget"];if(Object.keys(s).every(e=>l.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:l}){if(!l)return null;let a=N[l.table_name]??l.table_name,r=w[l.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(n.Tag,{color:r,className:"capitalize m-0",children:l.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(l.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:a}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:l.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:l.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:l.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:l.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:l})]})]})}let{Search:L}=i.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},D={created:"green",updated:"blue",deleted:"red",rotated:"orange"};e.s(["default",0,function({userID:e,userRole:i,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[A,z]=(0,s.useState)(""),[I,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,$]=(0,s.useState)(!1),H=(0,l.useQuery)({queryKey:["audit_logs",b,50,N,S,C,A,I,R],queryFn:async()=>f&&g&&i&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:A||void 0,action:I||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!i&&!!e&&y,placeholderData:a.keepPreviousData}),K=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(n.Tag,{color:D[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../ui/assets/audit-logs-preview.png",alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]});let Y=H.data?.audit_logs??[],V=H.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{z(e),_(1)},onChange:e=>{e.target.value||(z(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:H.isFetching}),onClick:()=>H.refetch(),disabled:H.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:K,dataSource:Y,rowKey:"id",loading:{spinning:H.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),$(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>$(!1),log:B})]})}],942161)},245099,504809,15374,e=>{"use strict";var t=e.i(843476),s=e.i(500330),l=(e.i(389083),e.i(994388)),a=e.i(592968),r=e.i(271645),n=e.i(916925),i=e.i(446891),o=e.i(307582),d=e.i(97859);let c=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),x=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),u=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),null!=e?e:"LLM"]}),p=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(x,{}),null!=e?e:"MCP"]}),h=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(m,{}),null!=e?e:"Agent"]}),g=({label:e,field:s,sortBy:l,sortOrder:a,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:l===s&&a,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),f=e=>[{header:e?()=>(0,t.jsx)(g,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(o.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,l=s.session_total_count||1,r=d.MCP_CALL_TYPES.includes(s.call_type),n=d.AGENT_CALL_TYPES.includes(s.call_type),i=s.session_llm_count??(r||n?0:l),o=s.session_agent_count??(n?l:0),g=s.session_mcp_count??(r?l:0);if(r)return(0,t.jsx)(p,{});if(n&&l<=1)return(0,t.jsx)(h,{});if(l<=1)return(0,t.jsx)(u,{});let f=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),(0,t.jsx)("span",{children:l}),o>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{})]})]}),y=[i>0&&`${i} LLM`,o>0&&`${o} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(a.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(a.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(a.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(g,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let l=e.row.original,r=l.mcp_tool_call_count||0,n=l.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(a.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&n>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(n)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(g,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let l=(s/1e3).toFixed(2);return(0,t.jsx)(a.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:l})})}},{header:e?()=>(0,t.jsx)(g,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,l=e.getValue();if(!l||l===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(l).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let n=(r/1e3).toFixed(2);return(0,t.jsx)(a.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:n})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(a.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),l=e.row.original.onKeyHashClick;return(0,t.jsx)(a.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>l?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(a.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(g,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,l=s.custom_llm_provider,r=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[l&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:l?(0,n.getProviderLogoAndName)(l).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(a.Tooltip,{title:r,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:r})})]})}},{header:e?()=>(0,t.jsx)(g,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(a.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(a.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let l=Object.entries(s),r=l[0],n=l.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(a.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:l.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),n.length>0&&` +${n.length}`]})})})}}];f(),e.s(["createColumns",0,f],245099);var y=e.i(663435);let j=({value:e,onChange:s})=>(0,t.jsx)(y.default,{value:e,onChange:s});var b=e.i(50882),v=e.i(625901),_=e.i(56456),N=e.i(152473),w=e.i(199133),S=e.i(770914);let{Text:k}=e.i(898586).Typography,C=({value:e,onChange:s,placeholder:l="Select a model",style:a,pageSize:n=50,allowClear:i=!0,disabled:o=!1})=>{let[d,c]=(0,r.useState)(""),[x,m]=(0,N.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,v.useInfiniteModelInfo)(n,x||void 0),y=(0,r.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let l of s.data){let s=l.model_info?.id??"",a=l.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:a?`${a} (${s})`:s,value:s,modelName:a,modelId:s}))}return t},[u]);return(0,t.jsx)(w.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";s?.(t)},placeholder:l,style:{width:"100%",...a},allowClear:i,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(_.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:l}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(S.Space,{direction:"vertical",children:[(0,t.jsxs)(S.Space,{direction:"horizontal",children:[(0,t.jsx)(k,{strong:!0,children:"Model name:"}),(0,t.jsx)(k,{ellipsis:!0,children:s})]}),(0,t.jsxs)(k,{ellipsis:!0,type:"secondary",children:["Model ID: ",l]})]}):(0,t.jsxs)(k,{ellipsis:!0,type:"secondary",children:["Model ID: ",l]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(_.LoadingOutlined,{spin:!0})})]})})};var T=e.i(764205),L=e.i(166540),M=e.i(619273),D=e.i(266027),E=e.i(633627),A=e.i(700514);let z={TEAM_ID:"Team ID",KEY_HASH:"Key Hash",REQUEST_ID:"Request ID",MODEL:"Model",PUBLIC_MODEL_OR_SEARCH_TOOL:"Public model / search tool",USER_ID:"User ID",END_USER:"End User",STATUS:"Status",KEY_ALIAS:"Key Alias",ERROR_CODE:"Error Code",ERROR_MESSAGE:"Error Message"},I=[z.KEY_HASH,z.ERROR_MESSAGE,z.REQUEST_ID,z.USER_ID,z.PUBLIC_MODEL_OR_SEARCH_TOOL],O={[z.TEAM_ID]:"",[z.KEY_HASH]:"",[z.REQUEST_ID]:"",[z.MODEL]:"",[z.PUBLIC_MODEL_OR_SEARCH_TOOL]:"",[z.USER_ID]:"",[z.END_USER]:"",[z.STATUS]:"",[z.KEY_ALIAS]:"",[z.ERROR_CODE]:"",[z.ERROR_MESSAGE]:""};e.s(["FILTER_KEYS",0,z,"defaultFilters",0,O,"useLogFilterLogic",0,function({accessToken:e,token:t,userRole:s,userID:l,filters:a,setFilters:n,filterByCurrentUser:i,activeTab:o,isLiveTail:d,startTime:c,endTime:x,pageSize:m=A.defaultPageSize,isCustomDate:u,setCurrentPage:p,sortBy:h="startTime",sortOrder:g="desc",currentPage:f=1}){let[y,j]=function(e){let[t,s]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let t=setTimeout(()=>s(e),300);return()=>clearTimeout(t)},[e,300]),[t,s]}(a),b=(0,r.useMemo)(()=>{let e={...a};for(let t of I)e[t]=y[t];return e},[a,y]),v=(0,D.useQuery)({queryKey:["logs","table",f,m,c,x,u,b,i?l:null,h,g],queryFn:async()=>{if(!e||!t||!s||!l)return{data:[],total:0,page:1,page_size:m,total_pages:0};let a=(0,L.default)(c).utc().format("YYYY-MM-DD HH:mm:ss"),r=u?(0,L.default)(x).utc().format("YYYY-MM-DD HH:mm:ss"):(0,L.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,T.uiSpendLogsCall)({accessToken:e,start_date:a,end_date:r,page:f,page_size:m,params:{api_key:b[z.KEY_HASH]||void 0,team_id:b[z.TEAM_ID]||void 0,request_id:b[z.REQUEST_ID]||void 0,user_id:b[z.USER_ID]||(i?l??void 0:void 0),end_user:b[z.END_USER]||void 0,status_filter:b[z.STATUS]||void 0,model_id:b[z.MODEL]||void 0,model:b[z.PUBLIC_MODEL_OR_SEARCH_TOOL]||void 0,key_alias:b[z.KEY_ALIAS]||void 0,error_code:b[z.ERROR_CODE]||void 0,error_message:b[z.ERROR_MESSAGE]||void 0,sort_by:h,sort_order:g}})},enabled:!!e&&!!t&&!!s&&!!l&&"request logs"===o,refetchInterval:!!d&&1===f&&15e3,placeholderData:M.keepPreviousData,refetchIntervalInBackground:!1}),_=v.data??{data:[],total:0,page:1,page_size:m,total_pages:0},{data:N}=(0,D.useQuery)({queryKey:["allTeamsForLogFilters",e],queryFn:async()=>e&&await (0,E.fetchAllTeams)(e)||[],enabled:!!e});return{logsQuery:v,filteredLogs:_,allTeams:N,handleFilterChange:e=>{n(t=>{let s={...t,...e};for(let e of Object.keys(O))e in s||(s[e]=O[e]);return JSON.stringify(s)!==JSON.stringify(t)&&p(1),s})},handleFilterReset:()=>{n(O),j(O),p(1)}}}],504809),e.s(["getLogFilterOptions",0,function(e){return[{name:"Team ID",label:"Team ID",customComponent:j},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:C},{name:z.PUBLIC_MODEL_OR_SEARCH_TOOL,label:"Public model / search tool",isSearchable:!1},{name:"Key Alias",label:"Key Alias",customComponent:b.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{let s=await (0,T.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return d.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=d.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!d.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}]}],15374)},909778,e=>{"use strict";var t=e.i(843476),s=e.i(166540),l=e.i(271645),a=e.i(772345),r=e.i(464571),n=e.i(790848),i=e.i(97859);e.s(["LogsTableToolbar",0,function({searchTerm:e,onSearchChange:o,startTime:d,onStartTimeChange:c,endTime:x,onEndTimeChange:m,isCustomDate:u,onIsCustomDateChange:p,selectedTimeInterval:h,onSelectedTimeIntervalChange:g,isLiveTail:f,onIsLiveTailChange:y,currentPage:j,onCurrentPageChange:b,pageSize:v,isLoading:_,isButtonLoading:N,onRefetch:w,filteredLogs:S}){let[k,C]=(0,l.useState)(!1),T=(0,l.useRef)(null);(0,l.useEffect)(()=>{function e(e){T.current&&!T.current.contains(e.target)&&C(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let L=i.QUICK_SELECT_OPTIONS.find(e=>e.value===h.value&&e.unit===h.unit),M=u?((e,t,l)=>{if(e)return`${(0,s.default)(t).format("MMM D, h:mm A")} - ${(0,s.default)(l).format("MMM D, h:mm A")}`;let a=(0,s.default)(),r=(0,s.default)(t),n=a.diff(r,"minutes");if(n>=0&&n<2)return"Last 1 Minute";if(n>=2&&n<16)return"Last 15 Minutes";if(n>=16&&n<61)return"Last Hour";let i=a.diff(r,"hours");return i>=1&&i<5?"Last 4 Hours":i>=5&&i<25?"Last 24 Hours":i>=25&&i<169?"Last 7 Days":`${r.format("MMM D")} - ${a.format("MMM D")}`})(u,d,x):L?.label;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e,onChange:e=>o(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:T,children:[(0,t.jsxs)("button",{onClick:()=>C(!k),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),M]}),k&&(0,t.jsx)("div",{className:"absolute left-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[i.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${M===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{b(1),m((0,s.default)().format("YYYY-MM-DDTHH:mm")),c((0,s.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),g({value:e.value,unit:e.unit}),p(!1),C(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${u?"bg-blue-50 text-blue-600":""}`,onClick:()=>p(!u),children:"Custom Range"})]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(n.Switch,{checked:f,defaultChecked:!0,onChange:y})]}),(0,t.jsx)(r.Button,{type:"default",icon:(0,t.jsx)(a.SyncOutlined,{spin:N}),onClick:w,disabled:N,title:"Fetch data",children:N?"Fetching":"Fetch"})]}),u&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:d,onChange:e=>{c(e.target.value),b(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:x,onChange:e=>{m(e.target.value),b(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",_?"...":S?(j-1)*v+1:0," -"," ",_?"...":S?Math.min(j*v,S.total):0," ","of ",_?"...":S?S.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",_?"...":j," of"," ",_?"...":S?S.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>b(e=>Math.max(1,e-1)),disabled:_||1===j,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>b(e=>Math.min(S.total_pages||1,e+1)),disabled:_||j===(S.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),f&&1===j&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-green-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>y(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]})]})}],909778)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(166540),l=e.i(271645),a=e.i(197647),r=e.i(653824),n=e.i(881073),i=e.i(404206),o=e.i(723731),d=e.i(708347),c=e.i(93648),x=e.i(245767),m=e.i(969550),u=e.i(764205),p=e.i(20147),h=e.i(942161),g=e.i(245099),f=e.i(97859),y=e.i(15374),j=e.i(504809);e.i(3565);var b=e.i(502626),v=e.i(909778),_=e.i(149121),N=e.i(86827);e.s(["default",0,function({accessToken:e,token:w,userRole:S,userID:k,premiumUser:C}){let[T,L]=(0,l.useState)(""),[M,D]=(0,l.useState)(1),[E]=(0,l.useState)(50),[A,z]=(0,l.useState)((0,s.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[I,O]=(0,l.useState)((0,s.default)().format("YYYY-MM-DDTHH:mm")),[R,P]=(0,l.useState)(!1),[B,F]=(0,l.useState)(j.defaultFilters),[q,$]=(0,l.useState)(null),[H,K]=(0,l.useState)(null),[Y,V]=(0,l.useState)(S&&d.internalUserRoles.includes(S)),[U,W]=(0,l.useState)("request logs"),[J,G]=(0,l.useState)(null),[Q,X]=(0,l.useState)(!1),[Z,ee]=(0,l.useState)(null),[et,es]=(0,l.useState)("startTime"),[el,ea]=(0,l.useState)("desc"),[er,en]=(0,l.useState)({value:24,unit:"hours"}),[ei,eo]=(0,l.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,l.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(ei))},[ei]),(0,l.useEffect)(()=>{(async()=>{H&&e&&$({...(await (0,u.keyInfoV1Call)(e,H)).info,token:H,api_key:H})})()},[H,e]),(0,l.useEffect)(()=>{S&&d.internalUserRoles.includes(S)&&V(!0)},[S]);let{logsQuery:ed,filteredLogs:ec,allTeams:ex,handleFilterChange:em,handleFilterReset:eu}=(0,j.useLogFilterLogic)({accessToken:e,token:w,userRole:S,userID:k,filters:B,setFilters:F,filterByCurrentUser:!!Y,activeTab:U,isLiveTail:ei,startTime:A,endTime:I,pageSize:E,isCustomDate:R,setCurrentPage:D,sortBy:et,sortOrder:el,currentPage:M}),ep=(0,l.useCallback)(()=>{eu(),z((0,s.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),O((0,s.default)().format("YYYY-MM-DDTHH:mm")),P(!1),en({value:24,unit:"hours"}),D(1)},[eu]),eh=(0,l.useCallback)((e,t)=>{es(e),ea(t),D(1)},[]),eg=(0,l.useMemo)(()=>(0,g.createColumns)({sortBy:et,sortOrder:el,onSortChange:eh}),[et,el,eh]),ef=(0,l.useMemo)(()=>{let e=ec.data.filter(e=>!T||e.request_id.includes(T)||e.model.includes(T)||e.user&&e.user.includes(T)),t=e.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),f.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:f.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),s=new Map;for(let t of e){if(!t.session_id||1>=(t.session_total_count||1))continue;let e=f.MCP_CALL_TYPES.includes(t.call_type),l=s.get(t.session_id);l&&(!l.isMcp||e)||s.set(t.session_id,{requestId:t.request_id,isMcp:e})}return e.map(e=>{let s=e.session_id?t[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:s?.llm??void 0,session_mcp_count:s?.mcp??void 0,session_agent_count:s?.agent??void 0,onKeyHashClick:e=>K(e),onSessionClick:t=>{t&&(ee(t),G(e),X(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||s.get(e.session_id)?.requestId===e.request_id)},[ec.data,T]),ey=(0,l.useDeferredValue)(ef),ej=ey!==ef,eb=ed.isFetching||ej,ev=ed.isPlaceholderData,e_=ed.isLoading||ev;return e&&w&&S&&k?(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(r.TabGroup,{defaultIndex:0,onIndexChange:e=>W(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(n.TabList,{children:[(0,t.jsx)(a.Tab,{children:"Request Logs"}),(0,t.jsx)(a.Tab,{children:"Audit Logs"}),(0,t.jsx)(a.Tab,{children:"Deleted Keys"}),(0,t.jsx)(a.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(o.TabPanels,{children:[(0,t.jsxs)(i.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),q&&H&&q.api_key===H?(0,t.jsx)(p.default,{keyId:H,keyData:q,teams:ex??[],onClose:()=>K(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.default,{options:(0,y.getLogFilterOptions)(e),onApplyFilters:em,onResetFilters:ep}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)(v.LogsTableToolbar,{searchTerm:T,onSearchChange:L,startTime:A,onStartTimeChange:z,endTime:I,onEndTimeChange:O,isCustomDate:R,onIsCustomDateChange:P,selectedTimeInterval:er,onSelectedTimeIntervalChange:en,isLiveTail:ei,onIsLiveTailChange:eo,currentPage:M,onCurrentPageChange:D,pageSize:E,isLoading:e_,isButtonLoading:eb,onRefetch:()=>ed.refetch(),filteredLogs:ec}),(0,t.jsx)(_.DataTable,{columns:eg,data:ey,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){ee(e.session_id),G(e),X(!0);return}ee(null),G(e),X(!0)},isLoading:e_})]})]})]}),(0,t.jsx)(i.TabPanel,{children:(0,t.jsx)(h.default,{userID:k,userRole:S,token:w,accessToken:e,isActive:"audit logs"===U,premiumUser:C})}),(0,t.jsx)(i.TabPanel,{children:(0,t.jsx)(c.default,{})}),(0,t.jsx)(i.TabPanel,{children:(0,t.jsx)(x.default,{})})]})]}),(0,t.jsx)(b.LogDetailsDrawer,{open:Q,onClose:()=>{X(!1),ee(null)},logEntry:J,sessionId:Z,accessToken:e,allLogs:ef,onSelectLog:G,startTime:(0,s.default)(A).utc().format("YYYY-MM-DD HH:mm:ss")})]}):(0,t.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,t.jsx)(N.AntDLoadingSpinner,{size:"large"})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js b/litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js new file mode 100644 index 00000000000..8c670536145 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,a.getProxyBaseUrl)(),s=`${t}/project/list`,l=await fetch(s,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:`${t}langfuse.png`,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:`${t}langfuse.png`,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:`${t}langsmith.png`,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:`${t}openmeter.png`,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],a=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,a,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,s],810757);let a=t.forwardRef(function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),a=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("keys"),n=async(e,t,s,a={})=>{try{let r=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:s,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let c=await o.json();return console.log("/key/list API Response:",c),c}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,a,l={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:a,...l}),queryFn:async()=>await n(i,e,a,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,l={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:a,...l}),queryFn:async()=>await n(o,e,a,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},234713,e=>{"use strict";e.s(["NO_MCP_SERVERS_SENTINEL",0,"no-mcp-servers"])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:c=!1})=>{let[d,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...d.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:c,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(981339),l=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),c=e.i(708347),d=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,a=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return a.json()},p=()=>{let{accessToken:e,userRole:t}=(0,d.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&c.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:c,className:d,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...c}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...c},className:`rounded-md ${d??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),c=e.i(779241);let{Option:d}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,j]=(0,s.useState)(f),[b,v]=(0,s.useState)(f?p:""),[N,w]=(0,s.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(l.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(w(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(c.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:N,onValueChange:t=>{w(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?j(!0):(j(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(d,{value:"7d",children:"7 days"}),(0,t.jsx)(d,{value:"30d",children:"30 days"}),(0,t.jsx)(d,{value:"90d",children:"90 days"}),(0,t.jsx)(d,{value:"180d",children:"180 days"}),(0,t.jsx)(d,{value:"365d",children:"365 days"}),(0,t.jsx)(d,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:b,onChange:e=>{let t=e.target.value;v(t),g(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:c=!1,teamId:d})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,d);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,d]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),a=e.i(199133),l=e.i(592968),r=e.i(827252);let{Option:i}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:c="",initialValue:d=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:d,className:c,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let a=e?.find(e=>e.organization_id===s.key);if(!a)return!1;let l=t.toLowerCase().trim(),r=(a.organization_alias||"").toLowerCase(),i=(a.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),a=e.i(28651),l=e.i(199133);let r=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:i}){let n=(t,s,a)=>{i(e.map((e,l)=>l===t?{...e,[s]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((o,c)=>{let d=r.find(e=>e.value===o.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(l.Select,{value:o.budget_duration,onChange:e=>n(c,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(a.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(c,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==c))},style:{padding:"0 4px"},children:"✕"})]}),d&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",d]})]},c)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}])},101837,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let r=(0,s.createQueryKeys)("mcpAccessGroups");e.s(["useMCPAccessGroups",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})}])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(101837),a=e.i(500727),l=e.i(699857),r=e.i(199133),i=e.i(234713);let n="toolset:";e.s(["default",0,({onChange:e,value:o,className:c,accessToken:d,placeholder:u="Select MCP servers",disabled:m=!1,teamId:p,allowNoMcpServers:g=!1})=>{let{data:h=[],isLoading:x}=(0,a.useMCPServers)(p),{data:y=[],isLoading:f}=(0,s.useMCPAccessGroups)(),{data:_=[],isLoading:j}=(0,l.useMCPToolsets)(),b=new Set(y),v=[...y.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...h.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),..._.map(e=>({label:e.toolset_name,value:`${n}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},w={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},k=[...o?.servers||[],...o?.accessGroups||[],...(o?.toolsets||[]).map(e=>`${n}${e}`)],S=g&&k.includes(i.NO_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(r.Select,{mode:"multiple",placeholder:u,onChange:t=>{if(g&&t.includes(i.NO_MCP_SERVERS_SENTINEL))return void e({servers:[i.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let s=t.filter(e=>e.startsWith(n)).map(e=>e.slice(n.length)),a=t.filter(e=>!e.startsWith(n));e({servers:a.filter(e=>!b.has(e)),accessGroups:a.filter(e=>b.has(e)),toolsets:s})},value:k,loading:x||f||j,className:c,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:m,filterOption:(e,t)=>t?.value===i.NO_MCP_SERVERS_SENTINEL||(v.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[g&&(0,t.jsx)(r.Select.Option,{value:i.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},i.NO_MCP_SERVERS_SENTINEL),v.map(e=>(0,t.jsx)(r.Select.Option,{value:e.value,label:e.label,disabled:S,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:w[e.type]})]})},e.value))]})})}])},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(764205),l=e.i(599724),r=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),c=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:d,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,j]=(0,s.useState)({}),[b,v]=(0,s.useState)({}),N=(0,s.useRef)(u);(0,s.useEffect)(()=>{N.current=u},[u]);let w=(0,s.useMemo)(()=>0===d.length?[]:g.filter(e=>d.includes(e.server_id)),[g,d]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let s=await (0,a.listMCPTools)(t,e);if(s.error)j(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let a=N.current;if(!a[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,c.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===d.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let s=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],c=y[e.server_id],d=_[e.server_id],g=b[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&a.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.map(e=>e.name)})},disabled:c,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:c,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[c&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(r.Spin,{size:"large"}),(0,t.jsx)(l.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),d&&!c&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:d})]}),!c&&!d&&a.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!c&&!d&&a.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(s=>{let a=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(p)return;let t=a?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!c&&!d&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(250980),l=e.i(797672),r=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),c=e.i(269200),d=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[j,b]=(0,s.useState)([]),[v,N]=(0,s.useState)({aliasName:"",targetModel:""}),[w,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{b(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);b(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>N({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>N({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];b(e),N({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:w&&w.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=s.id,b(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===j.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(592968),l=e.i(312361),r=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),c=e.i(988297),d=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),j=Object.keys(p.callbackInfo),b=e=>{x?.(e)},v=(t,s,a)=>{let l=[...e];if("callback_name"===s){let e=p.callback_map[a]||a;l[t]={...l[t],[s]:e,callback_vars:{}}}else l[t]={...l[t],[s]:a};b(l)},N=(t,s,a)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[s]:a}},b(l)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:j.map(e=>{let s=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(l.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{b([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:c.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((l,c)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{b(e.filter((e,t)=>t!==c))},icon:d.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(c,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(s.Select,{value:l.callback_type,onChange:e=>v(c,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(h,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(h,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,s)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([l,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:l.replace(/_/g," ")}),(0,t.jsx)(a.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>N(s,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>N(s,l,e.target.value)})]},l))})]})})(l,c)]})]},c)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(a.default,{value:e,onChange:l,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(s.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(404206),l=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),c=e.i(158392),d=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[j,b]=(0,s.useState)([]),[v,N]=(0,s.useState)([]),[w,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];_(a),b(a&&0!==a.length?a.map((e,t)=>{let[s,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),b([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);N(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let E=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,a])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let l=document.querySelector(`input[name="${s}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((s,a,l)=>{if(null==a)return l;let r=String(a).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,l.value,a);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(s.routing_strategy),allowed_fails:a(s.allowed_fails,!0),cooldown_time:a(s.cooldown_time,!0),num_retries:a(s.num_retries,!0),timeout:a(s.timeout,!0),retry_after:a(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:a(s.context_window_fallbacks),retry_policy:a(s.retry_policy),model_group_alias:a(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:a(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:E()})},100);return()=>clearTimeout(e)},[x,f]);let F=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:E()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:w,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(d.FallbackSelectionForm,{groups:j,onGroupsChange:e=>{b(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:F,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:c})=>{let d=c?e?.filter(e=>e.team_id===c):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=d?.find(e=>e.project_id===t.key);if(!s)return!1;let a=e.toLowerCase().trim(),l=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return l.includes(a)||r.includes(a)},optionFilterProp:"children",children:!o&&d?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),a=e.i(109799),l=e.i(510674),r=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),c=e.i(827252),d=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),j=e.i(464571),b=e.i(808613),v=e.i(311451),N=e.i(212931),w=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(898586),A=e.i(374009),L=e.i(271645),E=e.i(708347),F=e.i(552130),M=e.i(557662),O=e.i(9314),P=e.i(860585),$=e.i(82946),R=e.i(392110),V=e.i(533882),B=e.i(844565),G=e.i(651904),z=e.i(939510),D=e.i(460285),K=e.i(663435),U=e.i(363256),q=e.i(575260),W=e.i(371455),H=e.i(319312),Q=e.i(355619),J=e.i(75921),Y=e.i(234713),X=e.i(390605),Z=e.i(727749),ee=e.i(764205),et=e.i(237016),es=e.i(888259);let ea=({apiKey:e})=>{let[s,a]=(0,L.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(et.CopyToClipboard,{text:e,onCopy:()=>{a(!0),es.default.success("Key copied to clipboard"),setTimeout(()=>a(!1),2e3)},children:(0,t.jsx)(j.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,ea],364769);var el=e.i(435451),er=e.i(916940);let{Option:ei}=k.Select,en=async(e,t,s,a)=>{try{if(null===e||null===t)return[];if(null!==s){let l=(await (0,ee.modelAvailableCall)(s,e,t,!0,a,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},eo=async(e,t,s,a)=>{try{if(null===e||null===t)return;if(null!==s){let l=(await (0,ee.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),a(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:et,data:es,addKey:ec,autoOpenCreate:ed,prefillData:eu})=>{let{accessToken:em,userId:ep,userRole:eg,premiumUser:eh}=(0,n.default)(),ex=eh||null!=eg&&E.rolesWithWriteAccess.includes(eg),{data:ey,isLoading:ef}=(0,a.useOrganizations)(),{data:e_,isLoading:ej}=(0,l.useProjects)(),{data:eb}=(0,i.useUISettings)(),{data:ev}=(0,r.useTags)(),eN=!!eb?.values?.enable_projects_ui,ew=!!eb?.values?.disable_custom_api_keys,ek=ev?Object.values(ev).map(e=>({value:e.name,label:e.name})):[],eS=(0,d.useQueryClient)(),[eC]=b.Form.useForm(),[eT,eI]=(0,L.useState)(!1),[eA,eL]=(0,L.useState)(null),[eE,eF]=(0,L.useState)(null),[eM,eO]=(0,L.useState)([]),[eP,e$]=(0,L.useState)([]),[eR,eV]=(0,L.useState)("you"),[eB,eG]=(0,L.useState)(!1),[ez,eD]=(0,L.useState)(null),[eK,eU]=(0,L.useState)([]),[eq,eW]=(0,L.useState)([]),[eH,eQ]=(0,L.useState)([]),[eJ,eY]=(0,L.useState)([]),[eX,eZ]=(0,L.useState)(e),[e0,e1]=(0,L.useState)(null),[e2,e4]=(0,L.useState)(null),[e5,e3]=(0,L.useState)(!1),[e6,e7]=(0,L.useState)(null),[e8,e9]=(0,L.useState)({}),[te,tt]=(0,L.useState)([]),[ts,ta]=(0,L.useState)(!1),[tl,tr]=(0,L.useState)([]),[ti,tn]=(0,L.useState)([]),[to,tc]=(0,L.useState)("llm_api"),[td,tu]=(0,L.useState)({}),[tm,tp]=(0,L.useState)(!1),[tg,th]=(0,L.useState)("30d"),[tx,ty]=(0,L.useState)(null),[tf,t_]=(0,L.useState)([]),[tj,tb]=(0,L.useState)(0),[tv,tN]=(0,L.useState)([]),[tw,tk]=(0,L.useState)(null),tS=()=>{eI(!1),eC.resetFields(),eY([]),tn([]),tc("llm_api"),tu({}),tp(!1),th("30d"),ty(null),tb(e=>e+1),tk(null),e1(null),e4(null),t_([])},tC=()=>{eI(!1),eL(null),eZ(null),eC.resetFields(),eY([]),tn([]),tc("llm_api"),tu({}),tp(!1),th("30d"),ty(null),tb(e=>e+1),tk(null),e1(null),e4(null),t_([])};(0,L.useEffect)(()=>{ep&&eg&&em&&eo(ep,eg,em,eO)},[em,ep,eg]),(0,L.useEffect)(()=>{em&&(0,ee.getAgentsList)(em).then(e=>tN(e?.agents||[])).catch(()=>tN([]))},[em]),(0,L.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ee.getPoliciesList)(em)).policies.map(e=>e.policy_name);eW(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ee.getPromptsList)(em);eQ(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ee.getGuardrailsList)(em)).guardrails.map(e=>e.guardrail_name);eU(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[em]),(0,L.useEffect)(()=>{(async()=>{try{if(em){let e=sessionStorage.getItem("possibleUserRoles");if(e)e9(JSON.parse(e));else{let e=await (0,ee.getPossibleUserRoles)(em);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e9(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[em]),(0,L.useEffect)(()=>{if(ed&&!eB&&et&&eg&&E.rolesWithWriteAccess.includes(eg)&&(eI(!0),eG(!0),eu)){if(eu.owned_by&&("another_user"===eu.owned_by&&"Admin"!==eg?eV("you"):eV(eu.owned_by)),eu.team_id){let e=et?.find(e=>e.team_id===eu.team_id)||null;e&&(eZ(e),eC.setFieldsValue({team_id:eu.team_id}))}eu.key_alias&&eC.setFieldsValue({key_alias:eu.key_alias}),eu.models&&eu.models.length>0&&eD(eu.models),eu.key_type&&(tc(eu.key_type),eC.setFieldsValue({key_type:eu.key_type}))}},[ed,eu,et,eB,eC,eg]);let tT=eP.includes("no-default-models")&&!eX,tI=async e=>{try{let t,a=e?.key_alias??"",l=e?.team_id??null;if((es?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${l}, please provide another key alias`);if(Z.default.info("Making API Call"),eI(!0),"you"===eR)e.user_id=ep;else if("agent"===eR){if(!tw)return void Z.default.fromBackend("Please select an agent");e.agent_id=tw}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eR&&(r.service_account_id=e.key_alias),eJ.length>0&&(r={...r,logging:eJ.filter(e=>e.callback_name)}),ti.length>0){let e=(0,M.mapDisplayToInternalNames)(ti);r={...r,litellm_disabled_callbacks:e}}if(tm&&(e.auto_rotate=!0,e.rotation_interval=tg),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(td).length>0&&(e.aliases=JSON.stringify(td)),tx?.router_settings&&Object.values(tx.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tx.router_settings);let n=tf.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eR?await (0,ee.keyCreateServiceAccountCall)(em,e):await (0,ee.keyCreateCall)(em,ep,e),console.log("key create Response:",t),ec(t),eS.invalidateQueries({queryKey:s.keyKeys.lists()}),eL(t.key),eF(t.soft_budget),Z.default.success("Virtual Key Created"),eC.resetFields(),t_([]),localStorage.removeItem("userData"+ep)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(s=a.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);Z.default.fromBackend(e)}};(0,L.useEffect)(()=>{if(e2){let e=e_?.find(e=>e.project_id===e2);e$(e?.models??[]),eC.setFieldValue("models",[]);return}ep&&eg&&em&&en(ep,eg,em,eX?.team_id??null).then(e=>{e$(Array.from(new Set([...eX?.models??[],...e])))}),ez||eC.setFieldValue("models",[]),eC.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eX,e2,em,ep,eg,eC]),(0,L.useEffect)(()=>{if(!ez||0===ez.length||!eP||0===eP.length)return;let e=ez.filter(e=>eP.includes(e));e.length>0&&eC.setFieldsValue({models:e}),eD(null)},[ez,eP,eC]),(0,L.useEffect)(()=>{if(!e2||!et)return;let e=e_?.find(e=>e.project_id===e2);if(!e?.team_id||eX?.team_id===e.team_id)return;let t=et.find(t=>t.team_id===e.team_id)||null;t&&(eZ(t),eC.setFieldValue("team_id",t.team_id))},[et,e2,e_]);let tA=async e=>{if(!e)return void tt([]);ta(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==em)return;let s=(await (0,ee.userFilterUICall)(em,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));tt(s)}catch(e){console.error("Error fetching users:",e),Z.default.fromBackend("Failed to search for users")}finally{ta(!1)}},tL=(0,L.useCallback)((0,A.default)(e=>tA(e),300),[em]);return(0,t.jsxs)("div",{children:[eg&&E.rolesWithWriteAccess.includes(eg)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eI(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(N.Modal,{open:eT,width:1e3,footer:null,onOk:tS,onCancel:tC,children:(0,t.jsxs)(b.Form,{form:eC,onFinish:tI,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:eR,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===eg&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eR&&(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eR,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tL(e)},onSelect:(e,t)=>{let s;return s=t.user,void eC.setFieldsValue({user_id:s.user_id})},options:te,loading:ts,allowClear:!0,style:{width:"100%"},notFoundContent:ts?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e3(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eR&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tw,onChange:e=>tk(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tv.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(U.default,{organizations:ey,loading:ef,disabled:"Admin"!==eg,onChange:e=>{e1(e||null),eZ(null),e4(null),eC.setFieldValue("team_id",void 0),eC.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eR,message:"Please select a team for the service account"}],help:"service_account"===eR?"required":"",children:(0,t.jsx)(K.default,{disabled:null!==e2,organizationId:e0,onTeamSelect:e=>{eZ(e),e4(null),eC.setFieldValue("project_id",void 0),e?.organization_id?(e1(e.organization_id),eC.setFieldValue("organization_id",e.organization_id)):e||(e1(null),eC.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(q.default,{projects:e_,teamId:eX?.team_id,loading:ej||!et,onChange:e=>{if(!e){e4(null),eZ(null),eC.setFieldValue("team_id",void 0);return}e4(e)}})})]}),tT&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tT&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eR||"another_user"===eR?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eR||"another_user"===eR?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eR?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===to||"read_only"===to?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===to||"read_only"===to,onChange:e=>{e.includes("all-team-models")&&eC.setFieldsValue({models:["all-team-models"]})},children:[!e2&&(0,t.jsx)(ei,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eP.map(e=>(0,t.jsx)(ei,{value:e,children:(0,Q.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tc(e),("management"===e||"read_only"===e)&&eC.setFieldsValue({models:[]})},children:[(0,t.jsx)(ei,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ei,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(ei,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tT&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(el.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(P.default,{onChange:e=>eC.setFieldValue("budget_duration",e)})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(H.BudgetWindowsEditor,{value:tf,onChange:t_})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(el.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eC,showDetailedDescriptions:!0}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(el.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eC,showDetailedDescriptions:!0}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ex?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ex,placeholder:ex?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ex?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!ex,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:eh?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eh,placeholder:eh?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:eh?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eh,placeholder:eh?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(O.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:eh?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(B.default,{onChange:e=>eC.setFieldValue("allowed_passthrough_routes",e),value:eC.getFieldValue("allowed_passthrough_routes"),accessToken:em,placeholder:eh?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!eh,teamId:eX?eX.team_id:null})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eC.setFieldValue("allowed_vector_store_ids",e),value:eC.getFieldValue("allowed_vector_store_ids"),accessToken:em,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ek})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(J.default,{onChange:e=>eC.setFieldValue("allowed_mcp_servers_and_groups",e),value:eC.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:em,teamId:eX?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(X.default,{accessToken:em,selectedServers:(eC.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==Y.NO_MCP_SERVERS_SENTINEL),toolPermissions:eC.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eC.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eC.setFieldValue("allowed_agents_and_groups",e),value:eC.getFieldValue("allowed_agents_and_groups"),accessToken:em,placeholder:"Select agents or access groups (optional)"})})})]}),eh?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(G.default,{value:eJ,onChange:eY,premiumUser:!0,disabledCallbacks:ti,onDisabledCallbacksChange:tn})})})]}):(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(G.default,{value:eJ,onChange:eY,premiumUser:!1,disabledCallbacks:ti,onDisabledCallbacksChange:tn})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(D.default,{accessToken:em||"",value:tx||void 0,onChange:ty,modelData:eM.length>0?{data:eM.map(e=>({model_name:e}))}:void 0},tj)})})]},`router-settings-accordion-${tj}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(V.default,{accessToken:em,initialModelAliases:td,onAliasUpdate:tu,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{form:eC,autoRotationEnabled:tm,onAutoRotationChange:tp,rotationInterval:tg,onRotationIntervalChange:th,isCreateMode:!0})})}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ee.proxyBaseUrl?`${ee.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(c.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)($.default,{schemaComponent:"GenerateKeyRequest",form:eC,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ew?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tT,style:{opacity:tT?.5:1},children:"Create Key"})})]})}),e5&&(0,t.jsx)(N.Modal,{title:"Create New User",open:e5,onCancel:()=>e3(!1),footer:null,width:800,children:(0,t.jsx)(W.CreateUserButton,{userID:ep,accessToken:em,teams:et,possibleUIRoles:e8,onUserCreated:e=>{e7(e),eC.setFieldsValue({user_id:e}),e3(!1)},isEmbedded:!0})}),eA&&(0,t.jsx)(N.Modal,{open:eT,onOk:tS,onCancel:tC,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eA?(0,t.jsx)(ea,{apiKey:eA}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,en,"fetchUserModels",0,eo],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a1ef280b7ad5ae6a.js b/litellm/proxy/_experimental/out/_next/static/chunks/0.75_v4.brf7u.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/chunks/a1ef280b7ad5ae6a.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0.75_v4.brf7u.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js b/litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js new file mode 100644 index 00000000000..9086fa0c010 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js @@ -0,0 +1,2 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,220508,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,r],220508)},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),r=e.i(914189);e.s(["useControllable",0,function(e,n,i){let[o,s]=(0,t.useState)(i),a=void 0!==e,l=(0,t.useRef)(a),u=(0,t.useRef)(!1),c=(0,t.useRef)(!1);return!a||l.current||u.current?a||!l.current||c.current||(c.current=!0,l.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,l.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:o,(0,r.useEvent)(e=>(a||s(e),null==n?void 0:n(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[r]=(0,t.useState)(e);return r}],214520);let n=(0,t.createContext)(void 0);function i(){return(0,t.useContext)(n)}e.s(["useDisabled",0,i],601893);var o=e.i(174080),s=e.i(746725);function a(e={},t=null,r=[]){for(let[n,i]of Object.entries(e))!function e(t,r,n){if(Array.isArray(n))for(let[i,o]of n.entries())e(t,l(r,i.toString()),o);else n instanceof Date?t.push([r,n.toISOString()]):"boolean"==typeof n?t.push([r,n?"1":"0"]):"string"==typeof n?t.push([r,n]):"number"==typeof n?t.push([r,`${n}`]):null==n?t.push([r,""]):a(n,r,t)}(r,l(t,n),i);return r}function l(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,r;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n){for(let t of n.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(r=n.requestSubmit)||r.call(n)}},"objectToFormEntries",0,a],694421);var u=e.i(700020),c=e.i(2788);let d=(0,t.createContext)(null);function f({children:e}){let r=(0,t.useContext)(d);if(!r)return t.default.createElement(t.default.Fragment,null,e);let{target:n}=r;return n?(0,o.createPortal)(t.default.createElement(t.default.Fragment,null,e),n):null}function p({setForm:e,formId:r}){return(0,t.useEffect)(()=>{if(r){let t=document.getElementById(r);t&&e(t)}},[e,r]),r?null:t.default.createElement(c.Hidden,{features:c.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}e.s(["FormFields",0,function({data:e,form:r,disabled:n,onReset:i,overrides:o}){let[l,d]=(0,t.useState)(null),h=(0,s.useDisposables)();return(0,t.useEffect)(()=>{if(i&&l)return h.addEventListener(l,"reset",i)},[l,r,i]),t.default.createElement(f,null,t.default.createElement(p,{setForm:d,formId:r}),a(e).map(([e,i])=>t.default.createElement(c.Hidden,{features:c.HiddenFeatures.Hidden,...(0,u.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:n,name:e,value:i,...o})})))}],140721);let h=(0,t.createContext)(void 0);function m(){return(0,t.useContext)(h)}e.s(["useProvidedId",0,m],942803);var g=e.i(835696),v=e.i(294316);let b=(0,t.createContext)(null);b.displayName="DescriptionContext";let y=Object.assign((0,u.forwardRefWithAs)(function(e,r){let n=(0,t.useId)(),o=i(),{id:s=`headlessui-description-${n}`,...a}=e,l=function e(){let r=(0,t.useContext)(b);if(null===r){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return r}(),c=(0,v.useSyncRefs)(r);(0,g.useIsoMorphicEffect)(()=>l.register(s),[s,l.register]);let d=o||!1,f=(0,t.useMemo)(()=>({...l.slot,disabled:d}),[l.slot,d]),p={ref:c,...l.props,id:s};return(0,u.useRender)()({ourProps:p,theirProps:a,slot:f,defaultTag:"p",name:l.name||"Description"})}),{});e.s(["Description",0,y,"useDescribedBy",0,function(){var e,r;return null!=(r=null==(e=(0,t.useContext)(b))?void 0:e.value)?r:void 0},"useDescriptions",0,function(){let[e,n]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let i=(0,r.useEvent)(e=>(n(t=>[...t,e]),()=>n(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),o=(0,t.useMemo)(()=>({register:i,slot:e.slot,name:e.name,props:e.props,value:e.value}),[i,e.slot,e.name,e.props,e.value]);return t.default.createElement(b.Provider,{value:o},e.children)},[n])]}],35889);let _=(0,t.createContext)(null);function E(e){var r,n,i;let o=null!=(n=null==(r=(0,t.useContext)(_))?void 0:r.value)?n:void 0;return(null!=(i=null==e?void 0:e.length)?i:0)>0?[o,...e].filter(Boolean).join(" "):o}_.displayName="LabelContext";let C=Object.assign((0,u.forwardRefWithAs)(function(e,n){var o;let s=(0,t.useId)(),a=function e(){let r=(0,t.useContext)(_);if(null===r){let t=Error("You used a