@exulu/frontend 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/app-build-manifest.json +120 -120
  3. package/dist/.next/app-path-routes-manifest.json +1 -1
  4. package/dist/.next/build-manifest.json +2 -2
  5. package/dist/.next/prerender-manifest.json +1 -1
  6. package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
  7. package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
  8. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +1 -1
  9. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
  10. package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
  11. package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
  12. package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
  13. package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
  14. package/dist/.next/server/app/(application)/data/[[...query]]/page.js +1 -1
  15. package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
  16. package/dist/.next/server/app/(application)/evals/[id]/page.js +1 -1
  17. package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
  18. package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
  19. package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
  20. package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
  21. package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
  22. package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
  23. package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
  24. package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
  25. package/dist/.next/server/app/(application)/prompts/page_client-reference-manifest.js +1 -1
  26. package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
  27. package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
  28. package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
  29. package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
  30. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
  31. package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
  32. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
  33. package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
  34. package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
  35. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  36. package/dist/.next/server/app/_not-found.html +1 -1
  37. package/dist/.next/server/app/_not-found.rsc +1 -1
  38. package/dist/.next/server/app-paths-manifest.json +7 -7
  39. package/dist/.next/server/chunks/2270.js +5 -0
  40. package/dist/.next/server/chunks/2948.js +1 -1
  41. package/dist/.next/server/chunks/7471.js +1 -1
  42. package/dist/.next/server/chunks/7958.js +1 -1
  43. package/dist/.next/server/chunks/8286.js +1 -1
  44. package/dist/.next/server/middleware-manifest.json +5 -5
  45. package/dist/.next/server/pages/404.html +1 -1
  46. package/dist/.next/server/pages/500.html +1 -1
  47. package/dist/.next/server/server-reference-manifest.json +1 -1
  48. package/dist/.next/static/chunks/{6373-1e2ef7e1f5217052.js → 6373-7908bd5269f95aa3.js} +2 -2
  49. package/dist/.next/static/chunks/6373-7908bd5269f95aa3.js.map +1 -0
  50. package/dist/.next/static/chunks/{9953-abcb3d5ff5512285.js → 9953-dfb5fc0e5b74ec09.js} +2 -2
  51. package/dist/.next/static/chunks/9953-dfb5fc0e5b74ec09.js.map +1 -0
  52. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/{page-f1f7f053f0aec4f9.js → page-57021bb06089261a.js} +1 -1
  53. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/{page-f1f7f053f0aec4f9.js.map → page-57021bb06089261a.js.map} +1 -1
  54. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/{page-640f50c121655487.js → page-841b2ed48010048e.js} +2 -2
  55. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-841b2ed48010048e.js.map +1 -0
  56. package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
  57. package/package.json +1 -1
  58. package/dist/.next/static/chunks/6373-1e2ef7e1f5217052.js.map +0 -1
  59. package/dist/.next/static/chunks/9953-abcb3d5ff5512285.js.map +0 -1
  60. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-640f50c121655487.js.map +0 -1
  61. /package/dist/.next/static/{2bzL2j5_MmcbjxQ21egBB → J23NmkaMjAJYnE0jX_kO0}/_buildManifest.js +0 -0
  62. /package/dist/.next/static/{2bzL2j5_MmcbjxQ21egBB → J23NmkaMjAJYnE0jX_kO0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=7958,exports.ids=[7958],exports.modules={85060:(e,t,a)=>{a.d(t,{F:()=>k});var s=a(10326),r=a(17577),n=a(39167),l=a(18753),d=a(18019),o=a(40617),i=a(1572),c=a(83855),m=a(87888),u=a(75290),f=a(62288),p=a(90772),x=a(54432),g=a(31048),h=a(87673),N=a(42270),b=a(34789),y=a(79210),v=a(33071),j=a(567),w=a(65685),C=a(77961),R=a(87599),T=a(5354);function k({open:e,onClose:t,evalSetId:a,onSuccess:k,testCase:D}){let{toast:S}=(0,b.pm)(),M=!!D,{data:O}=(0,n.aM)(N.Ul,{variables:{page:1,limit:100}}),{regularTools:_,agentTools:A,knowledgeSourceTools:F}=(0,r.useMemo)(()=>{let e=O?.tools?.items||[];return console.log("tools",e),{regularTools:e.filter(e=>"function"===e.type),agentTools:e.filter(e=>"agent"===e.type),knowledgeSourceTools:e.filter(e=>"context"===e.type)}},[O]),[E,Z]=(0,r.useState)(""),[U,z]=(0,r.useState)(""),[V,I]=(0,r.useState)(""),[P,$]=(0,r.useState)([]),[L,W]=(0,r.useState)(""),[q,Y]=(0,r.useState)(null),[B,H]=(0,r.useState)([]),[K,G]=(0,r.useState)([]),[J,Q]=(0,r.useState)([]),[X,ee]=(0,r.useState)([]),[et,ea]=(0,r.useState)(""),[es,er]=(0,r.useState)(""),[en,el]=(0,r.useState)(""),[ed,{loading:eo}]=(0,l.D)(N.hx,{onCompleted:()=>{S({title:"Test case created",description:"The test case has been successfully created."}),k()},onError:e=>{S({title:"Failed to create test case",description:e.message,variant:"destructive"})}}),[ei,{loading:ec}]=(0,l.D)(N.Mh,{onCompleted:()=>{S({title:"Test case updated",description:"The test case has been successfully updated."}),k()},onError:e=>{S({title:"Failed to update test case",description:e.message,variant:"destructive"})}}),em=()=>{if(!L.trim()&&0===B.length)return;let e=[];L.trim()&&e.push({type:"text",text:L.trim()}),B.length>0&&e.push(...B),$([...P,{id:`msg-${Date.now()}`,role:"user",parts:e},{id:`msg-${Date.now()}`,role:"assistant",metadata:{type:"placeholder"},parts:[{type:"text",text:"\uD83D\uDCAC Placeholder, generated agent response will be added here when the test case is run..."}]}]),W(""),Y(null),H([])},eu=eo||ec;return s.jsx(f.Vq,{open:e,onOpenChange:t,children:(0,s.jsxs)(f.cZ,{className:"max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,s.jsxs)(f.fK,{children:[(0,s.jsxs)(f.$N,{children:[M?"Edit Test Case":"Create Test Case"," ",a?`for Eval Set: ${a}`:""]}),s.jsx(f.Be,{children:M?"Update the test case details.":"Create a new test case with conversation inputs and expected outputs."})]}),(0,s.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!E.trim()||!V.trim()||0===P.length){S({title:"Validation error",description:"Name, at least one input message, and expected output are required.",variant:"destructive"});return}let t={name:E.trim(),description:U.trim()||null,inputs:P,expected_output:V.trim(),expected_tools:K.length>0?K:null,expected_knowledge_sources:J.length>0?J:null,expected_agent_tools:X.length>0?X:null,...a?{eval_set_id:a}:{}};M?ei({variables:{id:D.id,data:t}}):ed({variables:{data:t}})},className:"flex-1 overflow-hidden flex flex-col",children:[(0,s.jsxs)(y.mQ,{defaultValue:"basic",className:"flex-1 overflow-hidden flex flex-col",children:[(0,s.jsxs)(y.dr,{className:"grid w-full grid-cols-2",children:[(0,s.jsxs)(y.SP,{value:"basic",className:"gap-2",children:[s.jsx(d.Z,{className:"h-4 w-4"}),"Basic Info"]}),(0,s.jsxs)(y.SP,{value:"conversation",className:"gap-2",children:[s.jsx(o.Z,{className:"h-4 w-4"}),"Conversation"]})]}),(0,s.jsxs)(w.x,{className:"flex-1",children:[s.jsx(y.nU,{value:"basic",className:"space-y-4 p-1 mt-4",children:(0,s.jsxs)("div",{className:"grid gap-5",children:[(0,s.jsxs)("div",{className:"grid gap-2",children:[s.jsx(g._,{htmlFor:"name",children:"Name *"}),s.jsx(x.I,{id:"name",placeholder:"e.g., Customer Support - Refund Request",value:E,onChange:e=>Z(e.target.value),disabled:eu,required:!0})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[s.jsx(g._,{htmlFor:"description",children:"Description"}),s.jsx(h.g,{id:"description",placeholder:"Describe what this test case evaluates...",value:U,onChange:e=>z(e.target.value),disabled:eu,rows:3})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[s.jsx(g._,{htmlFor:"expectedOutput",children:"Expected Output *"}),s.jsx(h.g,{id:"expectedOutput",placeholder:"Describe the expected final output (e.g., 'A JSON object containing refund details', 'An empathetic response offering alternatives')",value:V,onChange:e=>I(e.target.value),disabled:eu,rows:4,required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This can be an exact expected response or a description of what the output should contain."})]})]})}),s.jsx(y.nU,{value:"conversation",className:"space-y-4 p-1 mt-4",children:(0,s.jsxs)(v.Zb,{children:[s.jsx(v.Ol,{className:"pb-3",children:s.jsx("div",{className:"flex items-start justify-between",children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(v.ll,{className:"text-sm flex items-center gap-2",children:[s.jsx(o.Z,{className:"h-4 w-4"}),"Conversation Flow",P.length>0&&(0,s.jsxs)(j.C,{variant:"secondary",className:"ml-2",children:[P.length," ",1===P.length?"message":"messages"]})]}),s.jsx(v.SZ,{className:"mt-1.5",children:"Add user messages in order. The agent will run through this conversation flow and respond between each message automatically."})]})})}),(0,s.jsxs)(v.aY,{className:"space-y-6",children:[P?.length===0?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center border-2 border-dashed border-muted rounded-lg",children:[s.jsx(i.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No messages yet"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:"Start building your test conversation by adding user messages below."})]}):s.jsx(T.ri,{className:"max-h-[350px] overflow-y-auto border rounded-lg bg-muted/30 transition-all duration-300 ease-in-out",children:s.jsx(T.iG,{className:"px-6 py-4",children:s.jsx("div",{className:"animate-in fade-in duration-500",children:s.jsx(R.K,{messages:P,config:{marginTopFirstMessage:"mt-0",customAssistantClassnames:"bg-secondary/50 rounded-lg px-3 py-1 border-l-2 border-primary/30"},status:"ready",showActions:!1,writeAccess:!1})})})}),(0,s.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[s.jsx(g._,{htmlFor:"currentInput",className:"text-sm font-semibold",children:"Add User Message"}),(0,s.jsxs)("div",{className:"space-y-3",children:[s.jsx(h.g,{id:"currentInput",placeholder:"Type the user's message...",value:L,onChange:e=>W(e.target.value),disabled:eu,rows:2,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),em())}}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[s.jsx(C.ZP,{id:"test-case-files",selectionLimit:10,allowedFileTypes:[".png",".jpg",".jpeg",".gif",".webp",".pdf",".docx",".xlsx",".xls",".csv",".pptx",".ppt",".mp3",".wav",".m4a",".mp4",".mpeg"],dependencies:[],onConfirm:e=>{Y(e)}}),(0,s.jsxs)(p.z,{type:"button",variant:"outline",onClick:em,disabled:eu||!L.trim()&&0===B.length,className:"ml-auto",size:"default",children:[s.jsx(c.Z,{className:"h-4 w-4 mr-2"}),"Add Message"]})]}),q&&q.length>0&&(0,s.jsxs)(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-3 gap-2",children:q.map(e=>s.jsx(C.jU,{s3Key:e,disabled:!0,active:!1,onRemove:()=>{Y(q?.filter(t=>t!==e))}}))}),(0,s.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[s.jsx(m.Z,{className:"h-4 w-4 text-amber-600 dark:text-amber-500 mt-0.5 flex-shrink-0"}),(0,s.jsxs)("p",{className:"text-xs text-amber-900 dark:text-amber-200",children:[s.jsx("strong",{children:"Note:"})," When running this test case, ensure the selected agent supports the file types you've attached here (images, documents, audio, etc.)."]})]})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Press Enter to add, Shift+Enter for new line. You can attach files to messages."})]})]})]})})]})]}),(0,s.jsxs)(f.cN,{className:"mt-4 gap-2",children:[s.jsx(p.z,{type:"button",variant:"outline",onClick:t,disabled:eu,children:"Cancel"}),(0,s.jsxs)(p.z,{type:"submit",disabled:eu||!E.trim()||!V.trim()||0===P.length,className:"shadow-sm hover:shadow-md transition-all",children:[eu&&s.jsx(u.Z,{className:"mr-2 h-4 w-4 animate-spin"}),M?"Update Test Case":"Create Test Case"]})]})]})]})})}},99440:(e,t,a)=>{a.d(t,{OL:()=>g,_T:()=>m,aR:()=>o,f$:()=>p,fY:()=>u,le:()=>h,xo:()=>f,yT:()=>x});var s=a(10326),r=a(12194),n=a(17577),l=a(90772),d=a(77863);let o=r.fC;r.xz;let i=r.h_,c=n.forwardRef(({className:e,...t},a)=>s.jsx(r.aV,{className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));c.displayName=r.aV.displayName;let m=n.forwardRef(({className:e,...t},a)=>(0,s.jsxs)(i,{children:[s.jsx(c,{}),s.jsx(r.VY,{ref:a,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));m.displayName=r.VY.displayName;let u=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...t});u.displayName="AlertDialogHeader";let f=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});f.displayName="AlertDialogFooter";let p=n.forwardRef(({className:e,...t},a)=>s.jsx(r.Dx,{ref:a,className:(0,d.cn)("text-lg font-semibold",e),...t}));p.displayName=r.Dx.displayName;let x=n.forwardRef(({className:e,...t},a)=>s.jsx(r.dk,{ref:a,className:(0,d.cn)("text-sm text-muted-foreground",e),...t}));x.displayName=r.dk.displayName;let g=n.forwardRef(({className:e,...t},a)=>s.jsx(r.aU,{ref:a,className:(0,d.cn)((0,l.d)(),e),...t}));g.displayName=r.aU.displayName;let h=n.forwardRef(({className:e,...t},a)=>s.jsx(r.$j,{ref:a,className:(0,d.cn)((0,l.d)({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));h.displayName=r.$j.displayName},567:(e,t,a)=>{a.d(t,{C:()=>d});var s=a(10326),r=a(79360);a(17577);var n=a(77863);let l=(0,r.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:e,variant:t,...a}){return s.jsx("div",{className:(0,n.cn)(l({variant:t}),e),...a})}},33071:(e,t,a)=>{a.d(t,{Ol:()=>d,SZ:()=>i,Zb:()=>l,aY:()=>c,eW:()=>m,ll:()=>o});var s=a(10326),r=a(17577),n=a(77863);let l=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));l.displayName="Card";let d=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",e),...t}));d.displayName="CardHeader";let o=r.forwardRef(({className:e,...t},a)=>s.jsx("h3",{ref:a,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));o.displayName="CardTitle";let i=r.forwardRef(({className:e,...t},a)=>s.jsx("p",{ref:a,className:(0,n.cn)("text-sm text-muted-foreground",e),...t}));i.displayName="CardDescription";let c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("p-6 pt-0",e),...t}));c.displayName="CardContent";let m=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("flex items-center p-6 pt-0",e),...t}));m.displayName="CardFooter"},62288:(e,t,a)=>{a.d(t,{$N:()=>x,Be:()=>g,Vq:()=>o,cN:()=>p,cZ:()=>u,fK:()=>f,hg:()=>i});var s=a(10326),r=a(98986),n=a(94019),l=a(17577),d=a(77863);let o=r.fC,i=r.xz,c=r.h_;r.x8;let m=l.forwardRef(({className:e,...t},a)=>s.jsx(r.aV,{ref:a,className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));m.displayName=r.aV.displayName;let u=l.forwardRef(({className:e,children:t,...a},l)=>(0,s.jsxs)(c,{children:[s.jsx(m,{}),(0,s.jsxs)(r.VY,{ref:l,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,s.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(n.Z,{className:"size-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=r.VY.displayName;let f=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});f.displayName="DialogHeader";let p=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});p.displayName="DialogFooter";let x=l.forwardRef(({className:e,...t},a)=>s.jsx(r.Dx,{ref:a,className:(0,d.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));x.displayName=r.Dx.displayName;let g=l.forwardRef(({className:e,...t},a)=>s.jsx(r.dk,{ref:a,className:(0,d.cn)("text-sm text-muted-foreground",e),...t}));g.displayName=r.dk.displayName},31048:(e,t,a)=>{a.d(t,{_:()=>i});var s=a(10326),r=a(34478),n=a(79360),l=a(17577),d=a(77863);let o=(0,n.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=l.forwardRef(({className:e,...t},a)=>s.jsx(r.f,{ref:a,className:(0,d.cn)(o(),e),...t}));i.displayName=r.f.displayName},65685:(e,t,a)=>{a.d(t,{B:()=>o,x:()=>d});var s=a(10326),r=a(9261),n=a(17577),l=a(77863);let d=n.forwardRef(({className:e,children:t,...a},n)=>(0,s.jsxs)(r.fC,{ref:n,className:(0,l.cn)("relative overflow-hidden",e),...a,children:[s.jsx(r.l_,{className:"size-full rounded-[inherit]",children:t}),s.jsx(o,{}),s.jsx(r.Ns,{})]}));d.displayName=r.fC.displayName;let o=n.forwardRef(({className:e,orientation:t="vertical",...a},n)=>s.jsx(r.gb,{ref:n,orientation:t,className:(0,l.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:s.jsx(r.q4,{className:"relative flex-1 rounded-full bg-border"})}));o.displayName=r.gb.displayName},15940:(e,t,a)=>{a.d(t,{RM:()=>o,Rn:()=>u,SC:()=>i,iA:()=>l,pj:()=>m,ss:()=>c,xD:()=>d});var s=a(10326),r=a(17577),n=a(77863);let l=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:a,className:(0,n.cn)("w-full caption-bottom text-sm",e),...t})}));l.displayName="Table";let d=r.forwardRef(({className:e,...t},a)=>s.jsx("thead",{ref:a,className:(0,n.cn)("[&_tr]:border-b",e),...t}));d.displayName="TableHeader";let o=r.forwardRef(({className:e,...t},a)=>s.jsx("tbody",{ref:a,className:(0,n.cn)("[&_tr:last-child]:border-0",e),...t}));o.displayName="TableBody",r.forwardRef(({className:e,...t},a)=>s.jsx("tfoot",{ref:a,className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})).displayName="TableFooter";let i=r.forwardRef(({className:e,...t},a)=>s.jsx("tr",{ref:a,className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));i.displayName="TableRow";let c=r.forwardRef(({className:e,...t},a)=>s.jsx("th",{ref:a,className:(0,n.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...t}));c.displayName="TableHead";let m=r.forwardRef(({className:e,...t},a)=>s.jsx("td",{ref:a,className:(0,n.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...t}));m.displayName="TableCell";let u=r.forwardRef(({className:e,...t},a)=>s.jsx("caption",{ref:a,className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...t}));u.displayName="TableCaption"},87673:(e,t,a)=>{a.d(t,{g:()=>l});var s=a(10326),r=a(17577),n=a(77863);let l=r.forwardRef(({className:e,...t},a)=>s.jsx("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));l.displayName="Textarea"},18019:(e,t,a)=>{a.d(t,{Z:()=>s});let s=(0,a(76557).Z)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},75290:(e,t,a)=>{a.d(t,{Z:()=>s});let s=(0,a(76557).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},98091:(e,t,a)=>{a.d(t,{Z:()=>s});let s=(0,a(76557).Z)("Trash2",[["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"}]])},35663:(e,t,a)=>{a.d(t,{zF:()=>N,Fw:()=>j,wy:()=>y,fC:()=>R});var s=a(17577),r=("undefined"!=typeof window&&window.document&&window.document.createElement,a(93095)),n=a(52067),l=a(65819),d=a(48051),o=a(45226),i=e=>{let{present:t,children:a}=e,r=function(e){var t,a;let[r,n]=s.useState(),d=s.useRef(null),o=s.useRef(e),i=s.useRef("none"),[m,u]=(t=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},s.useReducer((e,t)=>a[e][t]??e,t));return s.useEffect(()=>{let e=c(d.current);i.current="mounted"===m?e:"none"},[m]),(0,l.b)(()=>{let t=d.current,a=o.current;if(a!==e){let s=i.current,r=c(t);e?u("MOUNT"):"none"===r||t?.display==="none"?u("UNMOUNT"):a&&s!==r?u("ANIMATION_OUT"):u("UNMOUNT"),o.current=e}},[e,u]),(0,l.b)(()=>{if(r){let e;let t=r.ownerDocument.defaultView??window,a=a=>{let s=c(d.current).includes(CSS.escape(a.animationName));if(a.target===r&&s&&(u("ANIMATION_END"),!o.current)){let a=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=a)})}},s=e=>{e.target===r&&(i.current=c(d.current))};return r.addEventListener("animationstart",s),r.addEventListener("animationcancel",a),r.addEventListener("animationend",a),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",s),r.removeEventListener("animationcancel",a),r.removeEventListener("animationend",a)}}u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:s.useCallback(e=>{d.current=e?getComputedStyle(e):null,n(e)},[])}}(t),n="function"==typeof a?a({present:r.isPresent}):s.Children.only(a),o=(0,d.e)(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(a=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(n));return"function"==typeof a||r.isPresent?s.cloneElement(n,{ref:o}):null};function c(e){return e?.animationName||"none"}i.displayName="Presence";var m=a(88957),u=a(10326),f="Collapsible",[p,x]=(0,r.b)(f),[g,h]=p(f),N=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,open:r,defaultOpen:l,disabled:d,onOpenChange:i,...c}=e,[p,x]=(0,n.T)({prop:r,defaultProp:l??!1,onChange:i,caller:f});return(0,u.jsx)(g,{scope:a,disabled:d,contentId:(0,m.M)(),open:p,onOpenToggle:s.useCallback(()=>x(e=>!e),[x]),children:(0,u.jsx)(o.WV.div,{"data-state":C(p),"data-disabled":d?"":void 0,...c,ref:t})})});N.displayName=f;var b="CollapsibleTrigger",y=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,...s}=e,r=h(b,a);return(0,u.jsx)(o.WV.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":C(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:t,onClick:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(s){if(e?.(s),!1===a||!s.defaultPrevented)return t?.(s)}}(e.onClick,r.onOpenToggle)})});y.displayName=b;var v="CollapsibleContent",j=s.forwardRef((e,t)=>{let{forceMount:a,...s}=e,r=h(v,e.__scopeCollapsible);return(0,u.jsx)(i,{present:a||r.open,children:({present:e})=>(0,u.jsx)(w,{...s,ref:t,present:e})})});j.displayName=v;var w=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,present:r,children:n,...i}=e,c=h(v,a),[m,f]=s.useState(r),p=s.useRef(null),x=(0,d.e)(t,p),g=s.useRef(0),N=g.current,b=s.useRef(0),y=b.current,j=c.open||m,w=s.useRef(j),R=s.useRef(void 0);return s.useEffect(()=>{let e=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.b)(()=>{let e=p.current;if(e){R.current=R.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,b.current=t.width,w.current||(e.style.transitionDuration=R.current.transitionDuration,e.style.animationName=R.current.animationName),f(r)}},[c.open,r]),(0,u.jsx)(o.WV.div,{"data-state":C(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!j,...i,ref:x,style:{"--radix-collapsible-content-height":N?`${N}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:j&&n})});function C(e){return e?"open":"closed"}var R=N}};
1
+ "use strict";exports.id=7958,exports.ids=[7958],exports.modules={85060:(e,t,a)=>{a.d(t,{F:()=>k});var s=a(10326),r=a(17577),n=a(39167),l=a(18753),d=a(18019),o=a(40617),i=a(1572),c=a(83855),m=a(87888),u=a(75290),f=a(62288),p=a(90772),x=a(54432),g=a(31048),h=a(87673),N=a(42270),b=a(34789),y=a(79210),v=a(33071),j=a(567),w=a(65685),C=a(77961),R=a(87599),T=a(15728);function k({open:e,onClose:t,evalSetId:a,onSuccess:k,testCase:D}){let{toast:S}=(0,b.pm)(),M=!!D,{data:O}=(0,n.aM)(N.Ul,{variables:{page:1,limit:100}}),{regularTools:_,agentTools:A,knowledgeSourceTools:F}=(0,r.useMemo)(()=>{let e=O?.tools?.items||[];return console.log("tools",e),{regularTools:e.filter(e=>"function"===e.type),agentTools:e.filter(e=>"agent"===e.type),knowledgeSourceTools:e.filter(e=>"context"===e.type)}},[O]),[E,Z]=(0,r.useState)(""),[U,z]=(0,r.useState)(""),[V,I]=(0,r.useState)(""),[P,$]=(0,r.useState)([]),[L,W]=(0,r.useState)(""),[q,Y]=(0,r.useState)(null),[B,H]=(0,r.useState)([]),[K,G]=(0,r.useState)([]),[J,Q]=(0,r.useState)([]),[X,ee]=(0,r.useState)([]),[et,ea]=(0,r.useState)(""),[es,er]=(0,r.useState)(""),[en,el]=(0,r.useState)(""),[ed,{loading:eo}]=(0,l.D)(N.hx,{onCompleted:()=>{S({title:"Test case created",description:"The test case has been successfully created."}),k()},onError:e=>{S({title:"Failed to create test case",description:e.message,variant:"destructive"})}}),[ei,{loading:ec}]=(0,l.D)(N.Mh,{onCompleted:()=>{S({title:"Test case updated",description:"The test case has been successfully updated."}),k()},onError:e=>{S({title:"Failed to update test case",description:e.message,variant:"destructive"})}}),em=()=>{if(!L.trim()&&0===B.length)return;let e=[];L.trim()&&e.push({type:"text",text:L.trim()}),B.length>0&&e.push(...B),$([...P,{id:`msg-${Date.now()}`,role:"user",parts:e},{id:`msg-${Date.now()}`,role:"assistant",metadata:{type:"placeholder"},parts:[{type:"text",text:"\uD83D\uDCAC Placeholder, generated agent response will be added here when the test case is run..."}]}]),W(""),Y(null),H([])},eu=eo||ec;return s.jsx(f.Vq,{open:e,onOpenChange:t,children:(0,s.jsxs)(f.cZ,{className:"max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,s.jsxs)(f.fK,{children:[(0,s.jsxs)(f.$N,{children:[M?"Edit Test Case":"Create Test Case"," ",a?`for Eval Set: ${a}`:""]}),s.jsx(f.Be,{children:M?"Update the test case details.":"Create a new test case with conversation inputs and expected outputs."})]}),(0,s.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!E.trim()||!V.trim()||0===P.length){S({title:"Validation error",description:"Name, at least one input message, and expected output are required.",variant:"destructive"});return}let t={name:E.trim(),description:U.trim()||null,inputs:P,expected_output:V.trim(),expected_tools:K.length>0?K:null,expected_knowledge_sources:J.length>0?J:null,expected_agent_tools:X.length>0?X:null,...a?{eval_set_id:a}:{}};M?ei({variables:{id:D.id,data:t}}):ed({variables:{data:t}})},className:"flex-1 overflow-hidden flex flex-col",children:[(0,s.jsxs)(y.mQ,{defaultValue:"basic",className:"flex-1 overflow-hidden flex flex-col",children:[(0,s.jsxs)(y.dr,{className:"grid w-full grid-cols-2",children:[(0,s.jsxs)(y.SP,{value:"basic",className:"gap-2",children:[s.jsx(d.Z,{className:"h-4 w-4"}),"Basic Info"]}),(0,s.jsxs)(y.SP,{value:"conversation",className:"gap-2",children:[s.jsx(o.Z,{className:"h-4 w-4"}),"Conversation"]})]}),(0,s.jsxs)(w.x,{className:"flex-1",children:[s.jsx(y.nU,{value:"basic",className:"space-y-4 p-1 mt-4",children:(0,s.jsxs)("div",{className:"grid gap-5",children:[(0,s.jsxs)("div",{className:"grid gap-2",children:[s.jsx(g._,{htmlFor:"name",children:"Name *"}),s.jsx(x.I,{id:"name",placeholder:"e.g., Customer Support - Refund Request",value:E,onChange:e=>Z(e.target.value),disabled:eu,required:!0})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[s.jsx(g._,{htmlFor:"description",children:"Description"}),s.jsx(h.g,{id:"description",placeholder:"Describe what this test case evaluates...",value:U,onChange:e=>z(e.target.value),disabled:eu,rows:3})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[s.jsx(g._,{htmlFor:"expectedOutput",children:"Expected Output *"}),s.jsx(h.g,{id:"expectedOutput",placeholder:"Describe the expected final output (e.g., 'A JSON object containing refund details', 'An empathetic response offering alternatives')",value:V,onChange:e=>I(e.target.value),disabled:eu,rows:4,required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This can be an exact expected response or a description of what the output should contain."})]})]})}),s.jsx(y.nU,{value:"conversation",className:"space-y-4 p-1 mt-4",children:(0,s.jsxs)(v.Zb,{children:[s.jsx(v.Ol,{className:"pb-3",children:s.jsx("div",{className:"flex items-start justify-between",children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(v.ll,{className:"text-sm flex items-center gap-2",children:[s.jsx(o.Z,{className:"h-4 w-4"}),"Conversation Flow",P.length>0&&(0,s.jsxs)(j.C,{variant:"secondary",className:"ml-2",children:[P.length," ",1===P.length?"message":"messages"]})]}),s.jsx(v.SZ,{className:"mt-1.5",children:"Add user messages in order. The agent will run through this conversation flow and respond between each message automatically."})]})})}),(0,s.jsxs)(v.aY,{className:"space-y-6",children:[P?.length===0?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center border-2 border-dashed border-muted rounded-lg",children:[s.jsx(i.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No messages yet"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:"Start building your test conversation by adding user messages below."})]}):s.jsx(T.ri,{className:"max-h-[350px] overflow-y-auto border rounded-lg bg-muted/30 transition-all duration-300 ease-in-out",children:s.jsx(T.iG,{className:"px-6 py-4",children:s.jsx("div",{className:"animate-in fade-in duration-500",children:s.jsx(R.K,{messages:P,config:{marginTopFirstMessage:"mt-0",customAssistantClassnames:"bg-secondary/50 rounded-lg px-3 py-1 border-l-2 border-primary/30"},status:"ready",showActions:!1,writeAccess:!1})})})}),(0,s.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[s.jsx(g._,{htmlFor:"currentInput",className:"text-sm font-semibold",children:"Add User Message"}),(0,s.jsxs)("div",{className:"space-y-3",children:[s.jsx(h.g,{id:"currentInput",placeholder:"Type the user's message...",value:L,onChange:e=>W(e.target.value),disabled:eu,rows:2,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),em())}}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[s.jsx(C.ZP,{id:"test-case-files",selectionLimit:10,allowedFileTypes:[".png",".jpg",".jpeg",".gif",".webp",".pdf",".docx",".xlsx",".xls",".csv",".pptx",".ppt",".mp3",".wav",".m4a",".mp4",".mpeg"],dependencies:[],onConfirm:e=>{Y(e)}}),(0,s.jsxs)(p.z,{type:"button",variant:"outline",onClick:em,disabled:eu||!L.trim()&&0===B.length,className:"ml-auto",size:"default",children:[s.jsx(c.Z,{className:"h-4 w-4 mr-2"}),"Add Message"]})]}),q&&q.length>0&&(0,s.jsxs)(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-3 gap-2",children:q.map(e=>s.jsx(C.jU,{s3Key:e,disabled:!0,active:!1,onRemove:()=>{Y(q?.filter(t=>t!==e))}}))}),(0,s.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[s.jsx(m.Z,{className:"h-4 w-4 text-amber-600 dark:text-amber-500 mt-0.5 flex-shrink-0"}),(0,s.jsxs)("p",{className:"text-xs text-amber-900 dark:text-amber-200",children:[s.jsx("strong",{children:"Note:"})," When running this test case, ensure the selected agent supports the file types you've attached here (images, documents, audio, etc.)."]})]})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Press Enter to add, Shift+Enter for new line. You can attach files to messages."})]})]})]})})]})]}),(0,s.jsxs)(f.cN,{className:"mt-4 gap-2",children:[s.jsx(p.z,{type:"button",variant:"outline",onClick:t,disabled:eu,children:"Cancel"}),(0,s.jsxs)(p.z,{type:"submit",disabled:eu||!E.trim()||!V.trim()||0===P.length,className:"shadow-sm hover:shadow-md transition-all",children:[eu&&s.jsx(u.Z,{className:"mr-2 h-4 w-4 animate-spin"}),M?"Update Test Case":"Create Test Case"]})]})]})]})})}},99440:(e,t,a)=>{a.d(t,{OL:()=>g,_T:()=>m,aR:()=>o,f$:()=>p,fY:()=>u,le:()=>h,xo:()=>f,yT:()=>x});var s=a(10326),r=a(12194),n=a(17577),l=a(90772),d=a(77863);let o=r.fC;r.xz;let i=r.h_,c=n.forwardRef(({className:e,...t},a)=>s.jsx(r.aV,{className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));c.displayName=r.aV.displayName;let m=n.forwardRef(({className:e,...t},a)=>(0,s.jsxs)(i,{children:[s.jsx(c,{}),s.jsx(r.VY,{ref:a,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));m.displayName=r.VY.displayName;let u=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...t});u.displayName="AlertDialogHeader";let f=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});f.displayName="AlertDialogFooter";let p=n.forwardRef(({className:e,...t},a)=>s.jsx(r.Dx,{ref:a,className:(0,d.cn)("text-lg font-semibold",e),...t}));p.displayName=r.Dx.displayName;let x=n.forwardRef(({className:e,...t},a)=>s.jsx(r.dk,{ref:a,className:(0,d.cn)("text-sm text-muted-foreground",e),...t}));x.displayName=r.dk.displayName;let g=n.forwardRef(({className:e,...t},a)=>s.jsx(r.aU,{ref:a,className:(0,d.cn)((0,l.d)(),e),...t}));g.displayName=r.aU.displayName;let h=n.forwardRef(({className:e,...t},a)=>s.jsx(r.$j,{ref:a,className:(0,d.cn)((0,l.d)({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));h.displayName=r.$j.displayName},567:(e,t,a)=>{a.d(t,{C:()=>d});var s=a(10326),r=a(79360);a(17577);var n=a(77863);let l=(0,r.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:e,variant:t,...a}){return s.jsx("div",{className:(0,n.cn)(l({variant:t}),e),...a})}},33071:(e,t,a)=>{a.d(t,{Ol:()=>d,SZ:()=>i,Zb:()=>l,aY:()=>c,eW:()=>m,ll:()=>o});var s=a(10326),r=a(17577),n=a(77863);let l=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));l.displayName="Card";let d=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",e),...t}));d.displayName="CardHeader";let o=r.forwardRef(({className:e,...t},a)=>s.jsx("h3",{ref:a,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));o.displayName="CardTitle";let i=r.forwardRef(({className:e,...t},a)=>s.jsx("p",{ref:a,className:(0,n.cn)("text-sm text-muted-foreground",e),...t}));i.displayName="CardDescription";let c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("p-6 pt-0",e),...t}));c.displayName="CardContent";let m=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:(0,n.cn)("flex items-center p-6 pt-0",e),...t}));m.displayName="CardFooter"},62288:(e,t,a)=>{a.d(t,{$N:()=>x,Be:()=>g,Vq:()=>o,cN:()=>p,cZ:()=>u,fK:()=>f,hg:()=>i});var s=a(10326),r=a(98986),n=a(94019),l=a(17577),d=a(77863);let o=r.fC,i=r.xz,c=r.h_;r.x8;let m=l.forwardRef(({className:e,...t},a)=>s.jsx(r.aV,{ref:a,className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));m.displayName=r.aV.displayName;let u=l.forwardRef(({className:e,children:t,...a},l)=>(0,s.jsxs)(c,{children:[s.jsx(m,{}),(0,s.jsxs)(r.VY,{ref:l,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,s.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(n.Z,{className:"size-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=r.VY.displayName;let f=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});f.displayName="DialogHeader";let p=({className:e,...t})=>s.jsx("div",{className:(0,d.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});p.displayName="DialogFooter";let x=l.forwardRef(({className:e,...t},a)=>s.jsx(r.Dx,{ref:a,className:(0,d.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));x.displayName=r.Dx.displayName;let g=l.forwardRef(({className:e,...t},a)=>s.jsx(r.dk,{ref:a,className:(0,d.cn)("text-sm text-muted-foreground",e),...t}));g.displayName=r.dk.displayName},31048:(e,t,a)=>{a.d(t,{_:()=>i});var s=a(10326),r=a(34478),n=a(79360),l=a(17577),d=a(77863);let o=(0,n.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=l.forwardRef(({className:e,...t},a)=>s.jsx(r.f,{ref:a,className:(0,d.cn)(o(),e),...t}));i.displayName=r.f.displayName},65685:(e,t,a)=>{a.d(t,{B:()=>o,x:()=>d});var s=a(10326),r=a(9261),n=a(17577),l=a(77863);let d=n.forwardRef(({className:e,children:t,...a},n)=>(0,s.jsxs)(r.fC,{ref:n,className:(0,l.cn)("relative overflow-hidden",e),...a,children:[s.jsx(r.l_,{className:"size-full rounded-[inherit]",children:t}),s.jsx(o,{}),s.jsx(r.Ns,{})]}));d.displayName=r.fC.displayName;let o=n.forwardRef(({className:e,orientation:t="vertical",...a},n)=>s.jsx(r.gb,{ref:n,orientation:t,className:(0,l.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:s.jsx(r.q4,{className:"relative flex-1 rounded-full bg-border"})}));o.displayName=r.gb.displayName},15940:(e,t,a)=>{a.d(t,{RM:()=>o,Rn:()=>u,SC:()=>i,iA:()=>l,pj:()=>m,ss:()=>c,xD:()=>d});var s=a(10326),r=a(17577),n=a(77863);let l=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:a,className:(0,n.cn)("w-full caption-bottom text-sm",e),...t})}));l.displayName="Table";let d=r.forwardRef(({className:e,...t},a)=>s.jsx("thead",{ref:a,className:(0,n.cn)("[&_tr]:border-b",e),...t}));d.displayName="TableHeader";let o=r.forwardRef(({className:e,...t},a)=>s.jsx("tbody",{ref:a,className:(0,n.cn)("[&_tr:last-child]:border-0",e),...t}));o.displayName="TableBody",r.forwardRef(({className:e,...t},a)=>s.jsx("tfoot",{ref:a,className:(0,n.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})).displayName="TableFooter";let i=r.forwardRef(({className:e,...t},a)=>s.jsx("tr",{ref:a,className:(0,n.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));i.displayName="TableRow";let c=r.forwardRef(({className:e,...t},a)=>s.jsx("th",{ref:a,className:(0,n.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...t}));c.displayName="TableHead";let m=r.forwardRef(({className:e,...t},a)=>s.jsx("td",{ref:a,className:(0,n.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...t}));m.displayName="TableCell";let u=r.forwardRef(({className:e,...t},a)=>s.jsx("caption",{ref:a,className:(0,n.cn)("mt-4 text-sm text-muted-foreground",e),...t}));u.displayName="TableCaption"},87673:(e,t,a)=>{a.d(t,{g:()=>l});var s=a(10326),r=a(17577),n=a(77863);let l=r.forwardRef(({className:e,...t},a)=>s.jsx("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));l.displayName="Textarea"},18019:(e,t,a)=>{a.d(t,{Z:()=>s});let s=(0,a(76557).Z)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},75290:(e,t,a)=>{a.d(t,{Z:()=>s});let s=(0,a(76557).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},98091:(e,t,a)=>{a.d(t,{Z:()=>s});let s=(0,a(76557).Z)("Trash2",[["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"}]])},35663:(e,t,a)=>{a.d(t,{zF:()=>N,Fw:()=>j,wy:()=>y,fC:()=>R});var s=a(17577),r=("undefined"!=typeof window&&window.document&&window.document.createElement,a(93095)),n=a(52067),l=a(65819),d=a(48051),o=a(45226),i=e=>{let{present:t,children:a}=e,r=function(e){var t,a;let[r,n]=s.useState(),d=s.useRef(null),o=s.useRef(e),i=s.useRef("none"),[m,u]=(t=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},s.useReducer((e,t)=>a[e][t]??e,t));return s.useEffect(()=>{let e=c(d.current);i.current="mounted"===m?e:"none"},[m]),(0,l.b)(()=>{let t=d.current,a=o.current;if(a!==e){let s=i.current,r=c(t);e?u("MOUNT"):"none"===r||t?.display==="none"?u("UNMOUNT"):a&&s!==r?u("ANIMATION_OUT"):u("UNMOUNT"),o.current=e}},[e,u]),(0,l.b)(()=>{if(r){let e;let t=r.ownerDocument.defaultView??window,a=a=>{let s=c(d.current).includes(CSS.escape(a.animationName));if(a.target===r&&s&&(u("ANIMATION_END"),!o.current)){let a=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=a)})}},s=e=>{e.target===r&&(i.current=c(d.current))};return r.addEventListener("animationstart",s),r.addEventListener("animationcancel",a),r.addEventListener("animationend",a),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",s),r.removeEventListener("animationcancel",a),r.removeEventListener("animationend",a)}}u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:s.useCallback(e=>{d.current=e?getComputedStyle(e):null,n(e)},[])}}(t),n="function"==typeof a?a({present:r.isPresent}):s.Children.only(a),o=(0,d.e)(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(a=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(n));return"function"==typeof a||r.isPresent?s.cloneElement(n,{ref:o}):null};function c(e){return e?.animationName||"none"}i.displayName="Presence";var m=a(88957),u=a(10326),f="Collapsible",[p,x]=(0,r.b)(f),[g,h]=p(f),N=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,open:r,defaultOpen:l,disabled:d,onOpenChange:i,...c}=e,[p,x]=(0,n.T)({prop:r,defaultProp:l??!1,onChange:i,caller:f});return(0,u.jsx)(g,{scope:a,disabled:d,contentId:(0,m.M)(),open:p,onOpenToggle:s.useCallback(()=>x(e=>!e),[x]),children:(0,u.jsx)(o.WV.div,{"data-state":C(p),"data-disabled":d?"":void 0,...c,ref:t})})});N.displayName=f;var b="CollapsibleTrigger",y=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,...s}=e,r=h(b,a);return(0,u.jsx)(o.WV.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":C(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:t,onClick:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(s){if(e?.(s),!1===a||!s.defaultPrevented)return t?.(s)}}(e.onClick,r.onOpenToggle)})});y.displayName=b;var v="CollapsibleContent",j=s.forwardRef((e,t)=>{let{forceMount:a,...s}=e,r=h(v,e.__scopeCollapsible);return(0,u.jsx)(i,{present:a||r.open,children:({present:e})=>(0,u.jsx)(w,{...s,ref:t,present:e})})});j.displayName=v;var w=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,present:r,children:n,...i}=e,c=h(v,a),[m,f]=s.useState(r),p=s.useRef(null),x=(0,d.e)(t,p),g=s.useRef(0),N=g.current,b=s.useRef(0),y=b.current,j=c.open||m,w=s.useRef(j),R=s.useRef(void 0);return s.useEffect(()=>{let e=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.b)(()=>{let e=p.current;if(e){R.current=R.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,b.current=t.width,w.current||(e.style.transitionDuration=R.current.transitionDuration,e.style.animationName=R.current.animationName),f(r)}},[c.open,r]),(0,u.jsx)(o.WV.div,{"data-state":C(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!j,...i,ref:x,style:{"--radix-collapsible-content-height":N?`${N}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:j&&n})});function C(e){return e?"open":"closed"}var R=N}};
@@ -1 +1 @@
1
- "use strict";exports.id=8286,exports.ids=[8286],exports.modules={18286:(e,s,a)=>{a.d(s,{f:()=>el,Z:()=>et});var i=a(10326),l=a(39167),n=a(18753),t=a(74064),r=a(35047),d=a(17577),c=a(74723),o=a(770),m=a(98091),x=a(90772),h=a(62288),u=a(54432),j=a(31048),g=a(37859);function p({deleteAgent:e,deleteAgentResult:s,agent:a}){let l="delete this agent",[n,t]=(0,d.useState)("");return(0,i.jsxs)(h.Vq,{children:[i.jsx(h.hg,{asChild:!0,children:i.jsx(x.z,{disabled:!a?.id,variant:"destructive",children:i.jsx(m.Z,{className:"size-4"})})}),(0,i.jsxs)(h.cZ,{className:"sm:max-w-[475px]",children:[i.jsx(h.fK,{children:i.jsx(h.$N,{children:"Delete this agent"})}),i.jsx("div",{className:"grid gap-4 py-4",children:(0,i.jsxs)("div",{className:"grid gap-2",children:[(0,i.jsxs)(j._,{htmlFor:"name",children:['Type "',l,'" to confirm']}),i.jsx(u.I,{onChange:e=>{t(e.target.value)},id:"name",autoFocus:!0})]})}),i.jsx(h.cN,{children:(0,i.jsxs)(x.z,{disabled:n!==l||s.loading,onClick:()=>{e({variables:{id:a.id}})},variant:"destructive",type:"submit",children:["Delete ",s.loading&&i.jsx(g.g,{})]})})]})]})}var f=a(42270),v=a(33071),N=a(55632),b=a(8281),y=a(33261),w=a(79210),C=a(87673),z=a(15211),k=a(567),Z=a(34789);function S(){return i.jsx("svg",{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M3.5 12.5003C2.72343 12.5003 2.33515 12.5003 2.02886 12.3735C1.62048 12.2043 1.29602 11.8798 1.12687 11.4715C1 11.1652 1 10.7769 1 10.0003V4.33366C1 3.40024 1 2.93353 1.18166 2.57701C1.34144 2.2634 1.59641 2.00844 1.91002 1.84865C2.26654 1.66699 2.73325 1.66699 3.66667 1.66699H9.33333C10.1099 1.66699 10.4982 1.66699 10.8045 1.79386C11.2129 1.96302 11.5373 2.28747 11.7065 2.69585C11.8333 3.00214 11.8333 3.39042 11.8333 4.16699M9.5 18.3337H15C15.9334 18.3337 16.4001 18.3337 16.7567 18.152C17.0703 17.9922 17.3252 17.7372 17.485 17.4236C17.6667 17.0671 17.6667 16.6004 17.6667 15.667V10.167C17.6667 9.23357 17.6667 8.76686 17.485 8.41034C17.3252 8.09674 17.0703 7.84177 16.7567 7.68198C16.4001 7.50033 15.9334 7.50033 15 7.50033H9.5C8.56658 7.50033 8.09987 7.50033 7.74335 7.68198C7.42975 7.84177 7.17478 8.09674 7.01499 8.41034C6.83333 8.76686 6.83333 9.23357 6.83333 10.167V15.667C6.83333 16.6004 6.83333 17.0671 7.01499 17.4236C7.17478 17.7372 7.42975 17.9922 7.74335 18.152C8.09987 18.3337 8.56658 18.3337 9.5 18.3337Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var _=a(34474),A=a(30811),F=a(2454),I=a(47206),$=a(32933),D=a(96230),R=a(71709),P=a(36283),O=a(69145),T=a(49758),M=a(83855),V=a(88307),J=a(94019),E=a(87888),B=a(88378),G=a(18019),q=a(77863),Y=a(15286),L=a(24295),U=a(68232),W=a(7890),Q=a(77961),K=a(14331),X=a(30463),H=a(18615),ee=a(86590),es=a(29429),ea=a(52227);let ei=["marketing","sales","finance","hr","coding","support","research","knowledge","product"],el=({configItem:e,currentValue:s,variables:a,onVariableSelect:l})=>{let[n,t]=d.useState(!1),r=a.find(e=>e.name===s);return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{className:"text-sm",children:[i.jsx("div",{className:"font-medium capitalize",children:e.name}),i.jsx("div",{className:"text-muted-foreground text-xs capitalize",children:e.description})]}),(0,i.jsxs)(A.J2,{open:n,onOpenChange:t,modal:!0,children:[i.jsx(A.xo,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"outline",role:"combobox","aria-expanded":n,className:"w-full justify-between text-sm",children:[r?r.name:"Select variable...",i.jsx(I.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),i.jsx(A.yk,{className:"w-full p-0",children:(0,i.jsxs)(F.mY,{children:[i.jsx(F.sZ,{placeholder:"Search variables..."}),(0,i.jsxs)(F.e8,{children:[i.jsx(F.rb,{children:"No variables found."}),i.jsx(F.fu,{children:a.map(e=>(0,i.jsxs)(F.di,{onSelect:()=>{l(e.name),console.log("variable",e),t(!1)},children:[i.jsx($.Z,{className:(0,q.cn)("mr-2 h-4 w-4",s===e.name?"opacity-100":"opacity-0")}),(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.name}),e.encrypted&&i.jsx("span",{className:"text-xs text-muted-foreground",children:"\uD83D\uDD12 Encrypted"})]})]},e.id))})]})]})}),e.default&&(0,i.jsxs)(v.Zb,{children:[i.jsx(v.Ol,{children:i.jsx(v.ll,{className:"text-md",children:"Default value"})}),i.jsx(v.aY,{children:i.jsx(H.J,{text:e.default,sliceLength:200})})]})]})]})},en=o.Ry({name:o.Z_().min(2,{message:"Agent name must be at least 2 characters."}).max(300,{message:"Agent name must not be longer than 300 characters."}),category:o.Z_().optional(),description:o.Z_().max(1e4,{message:"Agent description must not be longer than 10.000 characters."}).nullable().optional(),instructions:o.Z_().max(4e4,{message:"Agent instructions must not be longer than 40.000 characters."}).nullable().optional(),id:o.Z_().or(o.Rx()).nullable().optional(),active:o.Yj(),providerapikey:o.Z_().nullable().optional(),firewall:o.Ry({enabled:o.O7().optional(),scanners:o.Ry({promptGuard:o.O7().optional(),codeShield:o.O7().optional(),agentAlignment:o.O7().optional(),hiddenAscii:o.O7().optional(),piiDetection:o.O7().optional()}).optional()}).optional()});function et({agent:e,refetch:s}){let a=(0,r.useRouter)(),{user:o}=(0,d.useContext)(z.S),m=(0,d.useContext)(X.E),[h,j]=(0,d.useState)(e.tools?e.tools:[]),[H,et]=(0,d.useState)(!1),[er,ed]=(0,d.useState)(""),[ec,eo]=(0,d.useState)("all"),[em,ex]=(0,d.useState)(""),[eh,eu]=(0,d.useState)(new Set),[ej,eg]=(0,d.useState)(!1),[ep,ef]=(0,d.useState)(e.providerapikey||""),[ev,eN]=(0,d.useState)(e.firewall?.enabled||!1),[eb,ey]=(0,d.useState)(e.animation_idle||""),[ew,eC]=(0,d.useState)(e.animation_responding||""),[ez,ek]=(0,d.useState)({rights_mode:e.rights_mode,users:e.RBAC?.users,roles:e.RBAC?.roles,projects:e.RBAC?.projects}),[eZ,eS]=(0,d.useState)({promptGuard:e.firewall?.scanners?.promptGuard||!1,codeShield:e.firewall?.scanners?.codeShield||!1,agentAlignment:e.firewall?.scanners?.agentAlignment||!1,hiddenAscii:e.firewall?.scanners?.hiddenAscii||!1,piiDetection:e.firewall?.scanners?.piiDetection||!1}),{toast:e_}=(0,Z.pm)(),eA=(0,d.useMemo)(()=>({search:em||void 0,category:"all"===ec?void 0:ec,limit:100,page:0}),[em,ec]),{data:eF,loading:eI}=(0,l.aM)(f.Ul,{variables:eA}),{data:e$}=(0,l.aM)(f.Az,{variables:{page:1,limit:100}}),{data:eD}=(0,l.aM)(f.Tp),eR=e$?.variablesPagination?.items||[],{data:eP,loading:eO,refetch:eT}=(0,ea.Sh)({page:1,limit:100,filters:[{assigned_agents:{contains:e.id}}]}),eM=eP?.prompt_libraryPagination?.items||[],eV=(0,d.useMemo)(()=>eF?.tools?.items?.filter(s=>s.id!==e.id)||[],[eF?.tools?.items,e.id]),eJ=(0,d.useMemo)(()=>eV.reduce((e,s)=>(e[s.category]||(e[s.category]=[]),e[s.category].push(s),e),{}),[eV]),eE=eD?.toolCategories||[],eB=()=>{ed(""),eo("all")},eG=e=>{eu(s=>{let a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a})},eq=async()=>{try{await navigator.clipboard.writeText(e.id),e_({title:"Agent ID copied to clipboard"})}catch(e){e_({title:"Failed to copy Agent ID",variant:"destructive"})}},[eY,eL]=(0,n.D)(f.fG,{onCompleted:()=>{a.push("/agents",{scroll:!1})}}),[eU,eW]=(0,n.D)(f.Dt,{refetchQueries:[f.as,"GetAgentById"]}),eQ=(0,c.cI)({resolver:(0,t.F)(en),defaultValues:e??{name:"New agent",instructions:"",steps:[],firewall:{enabled:!1,scanners:{promptGuard:!1,codeShield:!1,agentAlignment:!1,hiddenAscii:!1,piiDetection:!1}}},mode:"onChange"}),[eK]=(0,n.D)(f.fB);return(0,i.jsxs)("div",{className:"h-full flex-col md:flex",children:[i.jsx("div",{className:"container flex flex-col items-start justify-between space-y-2 py-4 sm:flex-row sm:items-center sm:space-y-0 md:h-16",children:(0,i.jsxs)("div",{className:"ml-auto flex w-full space-x-2 sm:justify-end",children:[e?.id&&(0,i.jsxs)(x.z,{onClick:eQ.handleSubmit(async e=>{console.log("data",e),eU({variables:{id:e.id,name:e.name,description:e.description,instructions:e.instructions,category:e.category,active:e.active,providerapikey:ep,animation_idle:eb,animation_responding:ew,rights_mode:ez.rights_mode,RBAC:{users:ez.users||[],roles:ez.roles||[],projects:ez.projects||[]},firewall:JSON.stringify({enabled:ev,scanners:eZ}),tools:JSON.stringify(h)}}),s()},e=>{console.error("form data invalid",e)}),disabled:eW.loading,variant:"secondary",type:"submit",children:["Save ",eW.loading&&i.jsx(g.g,{className:"ml-2"})]}),i.jsx(x.z,{onClick:()=>{a.push("/agents",{scroll:!1})},variant:"secondary",type:"button",children:"Back"}),i.jsx(p,{agent:e,deleteAgent:eY,deleteAgentResult:eL})]})}),i.jsx(b.Z,{}),i.jsx(w.mQ,{defaultValue:"complete",className:"flex-1",children:i.jsx("div",{className:"container py-6",children:i.jsx("div",{className:"grid items-stretch gap-6",children:i.jsx("div",{className:"md:order-1",children:i.jsx("div",{className:"flex flex-col space-y-4",children:i.jsx("div",{className:"h-full",children:i.jsx(N.l0,{...eQ,children:i.jsx("form",{className:"space-y-8",children:(0,i.jsxs)("div",{className:"grid grid-rows-1 grid-flow-col gap-6 lg:grid-cols-2",children:[i.jsx("div",{className:"col",children:i.jsx("div",{className:"flex flex-col space-y-4",children:i.jsx("div",{className:"flex flex-col space-y-2",children:(0,i.jsxs)(v.Zb,{children:[i.jsx(v.Ol,{children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[e.image&&i.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden flex-shrink-0",children:i.jsx("img",{src:e.image,alt:`${e.name} profile`,className:"w-full h-full object-cover"})}),i.jsx(v.ll,{children:"Agent"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,i.jsxs)("span",{children:["ID: ",e.id]}),i.jsx("button",{type:"button",onClick:eq,className:"p-1 hover:bg-muted rounded transition-colors text-muted-foreground",title:"Copy Agent ID",children:i.jsx(S,{})})]})]})}),(0,i.jsxs)(v.aY,{className:"grid gap-4",children:[i.jsx(N.Wi,{control:eQ.control,name:"name",render:({field:e})=>(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Name"}),i.jsx(N.NI,{children:i.jsx(u.I,{type:"text",className:"resize-none",...e})}),i.jsx(N.zG,{})]})}),(0,i.jsxs)("div",{children:[i.jsx("div",{className:"text-sm font-medium mb-2",children:"Modalities"}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mb-2",children:["This agent uses ",i.jsx("b",{children:e.modelName})," from ",i.jsx("b",{children:e.providerName})," and can use the following capabilities:"]}),i.jsx(U.pn,{children:(0,i.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.text?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(D.Z,{className:"h-4 w-4"})}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.images?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(R.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Images: ",e.capabilities?.images?.length?e.capabilities.images.join(", "):"None"]})})]}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.files?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(P.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Files: ",e.capabilities?.files?.length?e.capabilities.files.join(", "):"None"]})})]}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.audio?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(O.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Audio: ",e.capabilities?.audio?.length?e.capabilities.audio.join(", "):"None"]})})]}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.video?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(T.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Video: ",e.capabilities?.video?.length?e.capabilities.video.join(", "):"None"]})})]})]})})]}),i.jsx(N.Wi,{control:eQ.control,name:"category",render:({field:e})=>(e.value||(e.value=""),(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Category"}),i.jsx(N.NI,{children:(0,i.jsxs)(_.Ph,{onValueChange:s=>{e.onChange(s)},children:[i.jsx(_.i4,{children:i.jsx(_.ki,{className:"capitalize",placeholder:e.value||"Select a category"})}),i.jsx(_.Bw,{children:ei.map(e=>i.jsx(_.Ql,{className:"capitalize",value:e,children:e},e))})]})}),i.jsx(N.zG,{})]}))}),i.jsx(N.Wi,{control:eQ.control,name:"description",render:({field:e})=>(e.value||(e.value=""),(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Description"}),i.jsx(N.NI,{children:i.jsx(C.g,{rows:2,className:"resize-none",...e,value:e.value??""})}),i.jsx(N.zG,{})]}))}),i.jsx(N.Wi,{control:eQ.control,name:"instructions",render:({field:e})=>(e.value||(e.value=""),(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Instructions"}),i.jsx(N.NI,{children:i.jsx(C.g,{rows:5,className:"resize-none",...e,value:e.value??""})}),i.jsx(N.zG,{})]}))}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{className:"text-sm",children:[i.jsx("div",{className:"font-medium",children:"Provider API Key"}),i.jsx("div",{className:"text-muted-foreground text-xs",children:"Select a variable containing the API key for the provider"}),e.authenticationInformation&&i.jsx("div",{className:"text-muted-foreground text-xs",children:e.authenticationInformation})]}),(0,i.jsxs)(A.J2,{children:[i.jsx(A.xo,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"outline",role:"combobox",className:"w-full justify-between text-sm",children:[eR.find(e=>e.name===ep)?.name||"Select variable...",i.jsx(I.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),i.jsx(A.yk,{className:"w-full p-0 z-[9999]",children:(0,i.jsxs)(F.mY,{children:[i.jsx(F.sZ,{placeholder:"Search variables..."}),(0,i.jsxs)(F.e8,{children:[i.jsx(F.rb,{children:"No variables found."}),i.jsx(F.fu,{children:eR.map(e=>(0,i.jsxs)(F.di,{onSelect:()=>{ef(e.name)},children:[i.jsx($.Z,{className:(0,q.cn)("mr-2 h-4 w-4",ep===e.name?"opacity-100":"opacity-0")}),(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.name}),e.encrypted&&i.jsx("span",{className:"text-xs text-muted-foreground",children:"\uD83D\uDD12 Encrypted"})]})]},e.id))})]})]})})]})]}),m?.fileUploads?.s3endpoint&&i.jsx(v.Zb,{className:"bg-transparent",children:(0,i.jsxs)(L.zF,{children:[i.jsx(v.Ol,{className:"p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-base",children:"Custom visualizations"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-0",children:"Upload custom Lottie animations for idle and responding states."})]}),i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[i.jsx(I.Z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Toggle"})]})})]})}),i.jsx(L.Fw,{className:"mt-5",children:i.jsx(v.aY,{className:"space-y-4",children:(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{children:[i.jsx("div",{className:"text-sm font-medium",children:"Idle Animation"}),i.jsx("div",{className:"text-xs text-muted-foreground",children:"Animation when agent is waiting"})]}),(0,i.jsxs)(Q.jF,{s3key:eb,children:[i.jsx(Q.ZP,{id:"agent-idle-animation",allowedFileTypes:[".json"],selectionLimit:1,buttonText:"",dependencies:[e.id],onConfirm:e=>{e.length>0&&ey(e[0])}}),eb&&(0,i.jsxs)("div",{className:"mt-2 p-2 border rounded bg-muted/30",children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Preview:"}),i.jsx("div",{className:"w-12 h-12 mx-auto",children:i.jsx(K.Z,{agent:{...e,animation_idle:eb},status:"ready"})})]})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{children:[i.jsx("div",{className:"text-sm font-medium",children:"Responding Animation"}),i.jsx("div",{className:"text-xs text-muted-foreground",children:"Animation when agent is responding"})]}),(0,i.jsxs)(Q.jF,{s3key:ew,children:[i.jsx(Q.ZP,{id:"agent-responding-animation",allowedFileTypes:[".json"],selectionLimit:1,buttonText:"",dependencies:[e.id],onConfirm:e=>{e.length>0&&eC(e[0])}}),ew&&(0,i.jsxs)("div",{className:"mt-2 p-2 border rounded bg-muted/30",children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Preview:"}),i.jsx("div",{className:"w-12 h-12 mx-auto",children:i.jsx(K.Z,{agent:{...e,animation_responding:ew},status:"streaming"})})]})]})]})]})})})]})}),(0,i.jsxs)(i.Fragment,{children:[i.jsx("div",{className:"text-sm font-medium mb-0",children:" You can test this agent using the Exulu UI without activating the agent if you are a super admin:"}),i.jsx(x.z,{className:"mt-0",onClick:async()=>{console.log("agent",e);let s=await eK({variables:{title:"New session",user:o.id,agent:e.id}});console.log("result",s);let i=s?.data?.agent_sessionsCreateOne?.item?.id;a.push(`/chat/${e.id}/${i}`)},type:"button",variant:"default",children:"Go to chat"})]})]})]})})})}),i.jsx("div",{className:"col",children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[i.jsx(N.Wi,{control:eQ.control,name:"active",render:({field:e})=>(0,i.jsxs)(N.xJ,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[(0,i.jsxs)("div",{className:"space-y-0.5",children:[i.jsx(N.lX,{className:"text-base",children:"Is this agent active?"}),i.jsx(N.pf,{children:"When active this agent will be available via the Exulu UI and API endpoint."})]}),i.jsx(N.NI,{children:i.jsx(y.r,{checked:e.value,onCheckedChange:e.onChange})})]})}),i.jsx(v.Zb,{className:"bg-transparent",children:(0,i.jsxs)(L.zF,{children:[i.jsx(v.Ol,{className:"p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-base",children:"Access Control"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-0",children:"Control access to this agent."})]}),i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[i.jsx(I.Z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Toggle"})]})})]})}),i.jsx(L.Fw,{className:"mt-5",children:i.jsx(v.aY,{className:"space-y-4",children:i.jsx(Y.P,{initialRightsMode:e.rights_mode,initialUsers:e.RBAC?.users,initialRoles:e.RBAC?.roles,initialProjects:e.RBAC?.projects,onChange:(e,s,a,i)=>{ek({rights_mode:e,users:s,roles:a,projects:i})}})})})]})}),i.jsx(v.Zb,{className:"bg-transparent",children:(0,i.jsxs)(L.zF,{children:[i.jsx(v.Ol,{className:"p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-base",children:"Prompt Templates"}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mb-0",children:["Manage prompt templates assigned to this agent (",eM.length,")"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)(x.z,{type:"button",variant:"outline",size:"sm",onClick:()=>eg(!0),children:[i.jsx(M.Z,{className:"h-4 w-4 mr-2"}),"New Prompt"]}),i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[i.jsx(I.Z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Toggle"})]})})]})]})}),i.jsx(L.Fw,{className:"mt-5",children:i.jsx(v.aY,{className:"space-y-4",children:eO?i.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading prompts..."}):0===eM.length?(0,i.jsxs)("div",{className:"text-center py-6 border-2 border-dashed rounded-lg",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"No prompts assigned to this agent yet"}),(0,i.jsxs)(x.z,{type:"button",variant:"outline",size:"sm",onClick:()=>eg(!0),children:[i.jsx(M.Z,{className:"h-4 w-4 mr-2"}),"Create First Prompt"]})]}):i.jsx("div",{className:"grid gap-4",children:eM.map(e=>i.jsx(ee.$,{prompt:e,user:o,onUpdate:eT},e.id))})})})]})}),(0,i.jsxs)(v.Zb,{children:[(0,i.jsxs)(v.Ol,{children:[(0,i.jsxs)(v.ll,{className:"flex items-center gap-2",children:["Tools",eI&&i.jsx(g.g,{className:"h-4 w-4"})]}),i.jsx(v.SZ,{children:h.length>0?`${h.length} tool${1===h.length?"":"s"} enabled for this agent`:"No tools enabled for this agent"})]}),i.jsx(v.aY,{children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,i.jsxs)("div",{className:"space-y-3",children:[i.jsx("div",{className:"flex items-center gap-2",children:(0,i.jsxs)("div",{className:"relative flex-1",children:[i.jsx(V.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(u.I,{placeholder:"Search tools by name or description...",value:er,onChange:e=>ed(e.target.value),className:"pl-10 pr-10"}),er&&i.jsx(x.z,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0",onClick:()=>ed(""),children:i.jsx(J.Z,{className:"h-3 w-3"})})]})}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)(_.Ph,{value:ec,onValueChange:eo,children:[i.jsx(_.i4,{className:"w-[200px]",children:i.jsx(_.ki,{placeholder:"Filter by category"})}),(0,i.jsxs)(_.Bw,{children:[i.jsx(_.Ql,{value:"all",children:"All categories"}),eE.map(e=>i.jsx(_.Ql,{value:e,className:"capitalize",children:e},e))]})]}),(er||"all"!==ec)&&(0,i.jsxs)(x.z,{variant:"outline",onClick:eB,children:[i.jsx(J.Z,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Clear filters"})]}),i.jsx(x.z,{type:"button",variant:"outline",onClick:()=>{eu(new Set)},children:"Expand all"}),i.jsx(x.z,{type:"button",variant:"outline",onClick:()=>{eu(new Set(Object.keys(eJ)))},children:"Collapse all"})]}),(0,i.jsxs)("div",{className:"ml-auto text-sm text-muted-foreground",children:[eF?.tools?.total||0," tool",1!==(eF?.tools?.total||0)?"s":"",em||"all"!==ec?" found":" available","."]})]}),(0,i.jsxs)("div",{className:"space-y-6",children:["all"===ec?Object.entries(eJ).map(([e,s])=>{let a=s.filter(e=>h.some(s=>s.id===e.id)).length,l=eh.has(e);return(0,i.jsxs)(L.zF,{open:!l,onOpenChange:()=>eG(e),children:[(0,i.jsxs)("div",{className:"flex items-center justify-between p-3 border rounded-lg bg-muted/30",children:[i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",className:"flex items-center gap-2 p-0 h-auto font-medium",children:[i.jsx(I.Z,{className:"h-4 w-4"}),i.jsx("span",{className:"capitalize",children:e}),(0,i.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[a,"/",s.length]})]})}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[i.jsx(x.z,{variant:"outline",size:"sm",onClick:()=>{let e=s.filter(e=>!h.some(s=>s.id===e.id)).map(e=>({id:e.id,type:e.type,config:e.config?.map(e=>({name:e.name,variable:""}))||[]}));j([...h,...e])},disabled:a===s.length,children:"Enable All"}),i.jsx(x.z,{variant:"outline",size:"sm",onClick:()=>{let e=s.map(e=>e.id);j(h.filter(s=>!e.includes(s.id)))},disabled:0===a,children:"Disable All"})]})]}),i.jsx(L.Fw,{className:"mt-2",children:i.jsx("div",{className:"space-y-2 pl-4",children:s.map(e=>{let s=h.some(s=>s.id===e.id),a=h.find(s=>s.id===e.id),l=e.config?.length||0,n=a?.config?.filter(e=>e.variable&&""!==e.variable.trim()).length||0,t=s&&l>0&&n<l;return i.jsx("div",{className:"rounded-lg border p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center flex-1",children:[(0,i.jsxs)("div",{className:"flex-1",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"font-medium",children:e?.name}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[l>0&&s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[n,"/",l]}),t&&i.jsx(E.Z,{className:"h-4 w-4 text-destructive"})]}),i.jsx(k.C,{variant:"outline",children:e?.category})]})]}),i.jsx("div",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:e?.description})]}),(0,i.jsxs)(W.yo,{open:H===e.id,onOpenChange:()=>{H===e.id?et(!1):et(e.id)},children:[l>0&&!s?i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})})}):i.jsx(x.z,{type:"button",disabled:!0,variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})}),i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{className:"mr-2",variant:"ghost",size:"sm",children:i.jsx(G.Z,{className:"h-4 w-4"})})}),(0,i.jsxs)(W.ue,{className:"w-[400px] sm:w-[540px]",children:[(0,i.jsxs)(W.Tu,{children:[i.jsx(W.bC,{children:e?.name}),i.jsx(W.Ei,{children:e?.description})]}),i.jsx("div",{className:"py-6",children:i.jsx("div",{className:"space-y-4",children:e.config&&e.config.length>0&&(0,i.jsxs)("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-md font-medium",children:"Configuration variables:"}),e.config.map((l,n)=>{let t=a?.config.find(e=>e.name===l.name)?.variable||"";return i.jsx("div",{className:"space-y-2",children:s?i.jsx(el,{configItem:l,currentValue:t,variables:eR,onVariableSelect:s=>{let a=h.map(a=>a.id===e.id?{...a,config:a.config.map(e=>e.name===l.name?{...e,variable:s}:e)}:a);console.log("updated",a),j(a)}}):i.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-muted rounded",children:"Enable this tool to configure"})},n)})]})})})]})]})]}),i.jsx(y.r,{checked:s,onCheckedChange:s=>{let a=[...h];s?(a=[...h,{id:e.id,type:e.type,config:e.config?.map(e=>({name:e.name,variable:""}))||[]}],e.config?.length>0&&et(e.id)):a=h.filter(s=>s.id!==e.id),j(a)}})]})},e?.id)})})})]},e)}):i.jsx("div",{className:"space-y-2",children:eV.map(e=>{let s=h.some(s=>s.id===e.id),a=h.find(s=>s.id===e.id),l=e.config?.length||0,n=a?.config?.filter(e=>e.variable&&""!==e.variable.trim()).length||0,t=s&&l>0&&n<l;return i.jsx("div",{className:"rounded-lg border p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center flex-1",children:[(0,i.jsxs)("div",{className:"flex-1",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"font-medium",children:e?.name}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[l>0&&s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[n,"/",l]}),t&&i.jsx(E.Z,{className:"h-4 w-4 text-destructive"})]}),i.jsx(k.C,{variant:"outline",children:e?.category})]})]}),i.jsx("div",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:e?.description})]}),(0,i.jsxs)(W.yo,{open:H===e.id,onOpenChange:()=>{H===e.id?et(!1):et(e.id)},children:[l>0&&!s?i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})})}):i.jsx(x.z,{type:"button",disabled:!0,variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})}),i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{className:"mr-2",variant:"ghost",size:"sm",children:i.jsx(G.Z,{className:"h-4 w-4"})})}),(0,i.jsxs)(W.ue,{className:"w-[400px] sm:w-[540px]",children:[(0,i.jsxs)(W.Tu,{children:[i.jsx(W.bC,{children:e?.name}),i.jsx(W.Ei,{children:e?.description})]}),i.jsx("div",{className:"py-6",children:i.jsx("div",{className:"space-y-4",children:e.config&&e.config.length>0&&(0,i.jsxs)("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-md font-medium",children:"Configuration variables:"}),e.config.map((l,n)=>{let t=a?.config.find(e=>e.name===l.name)?.variable||"";return i.jsx("div",{className:"space-y-2",children:s?i.jsx(el,{configItem:l,currentValue:t,variables:eR,onVariableSelect:s=>{let a=h.map(a=>a.id===e.id?{...a,config:a.config.map(e=>e.name===l.name?{...e,variable:s}:e)}:a);console.log("updated",a),j(a)}}):i.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-muted rounded",children:"Enable this tool to configure"})},n)})]})})})]})]})]}),i.jsx(y.r,{checked:s,onCheckedChange:s=>{let a=[...h];s?(a=[...h,{id:e.id,type:e.type,config:e.config?.map(e=>({name:e.name,variable:""}))||[]}],e.config?.length>0&&et(e.id)):a=h.filter(s=>s.id!==e.id),j(a)}})]})},e?.id)})}),0===eV.length&&(er||"all"!==ec)&&(0,i.jsxs)("div",{className:"text-center py-8",children:[i.jsx("div",{className:"text-muted-foreground",children:"No tools found matching your criteria."}),i.jsx(x.z,{variant:"outline",size:"sm",className:"mt-2",onClick:eB,children:"Clear filters"})]})]})]})})]})]})})]})})})})})})})})}),i.jsx(es.D,{open:ej,onOpenChange:eg,onSuccess:eT,user:o,defaultAssignedAgents:[e.id]})]})}},51602:(e,s,a)=>{a.d(s,{d:()=>h,f:()=>u});var i=a(10326),l=a(90772),n=a(77863),t=a(32933),r=a(43810),d=a(17577),c=a(54390),o=a(35057),m=a(48818);let x=(0,d.createContext)({code:""}),h=({code:e,language:s,showLineNumbers:a=!1,className:l,children:t,...r})=>i.jsx(x.Provider,{value:{code:e},children:i.jsx("div",{className:(0,n.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",l),...r,children:(0,i.jsxs)("div",{className:"relative",children:[i.jsx(c.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:o.Z,children:e}),i.jsx(c.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:m.Z,children:e}),t&&i.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:t})]})})}),u=({onCopy:e,onError:s,timeout:a=2e3,children:c,className:o,...m})=>{let[h,u]=(0,d.useState)(!1),{code:j}=(0,d.useContext)(x),g=async()=>{s?.(Error("Clipboard API not available"))},p=h?t.Z:r.Z;return i.jsx(l.z,{className:(0,n.cn)("shrink-0",o),onClick:g,size:"icon",variant:"ghost",...m,children:c??i.jsx(p,{size:14})})}},36931:(e,s,a)=>{a.d(s,{H:()=>h});var i=a(10326),l=a(77863),n=a(17577),t=a(16476),r=a(79283),d=a(70285),c=a(7833),o=a(51602);a(32289);let m=(0,a(39499).Z)(t.UG),x={ol:({node:e,children:s,className:a,...n})=>i.jsx("ol",{className:(0,l.cn)("ml-4 list-outside list-decimal",a),...n,children:s}),li:({node:e,children:s,className:a,...n})=>i.jsx("li",{className:(0,l.cn)("py-1",a),...n,children:s}),ul:({node:e,children:s,className:a,...n})=>i.jsx("ul",{className:(0,l.cn)("ml-4 list-outside list-disc",a),...n,children:s}),hr:({node:e,className:s,...a})=>i.jsx("hr",{className:(0,l.cn)("my-6 border-border",s),...a}),strong:({node:e,children:s,className:a,...n})=>i.jsx("span",{className:(0,l.cn)("font-semibold",a),...n,children:s}),a:({node:e,children:s,className:a,...n})=>i.jsx("a",{className:(0,l.cn)("font-medium text-primary underline",a),rel:"noreferrer",target:"_blank",...n,children:s}),h1:({node:e,children:s,className:a,...n})=>i.jsx("h1",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-3xl",a),...n,children:s}),h2:({node:e,children:s,className:a,...n})=>i.jsx("h2",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-2xl",a),...n,children:s}),h3:({node:e,children:s,className:a,...n})=>i.jsx("h3",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-xl",a),...n,children:s}),h4:({node:e,children:s,className:a,...n})=>i.jsx("h4",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-lg",a),...n,children:s}),h5:({node:e,children:s,className:a,...n})=>i.jsx("h5",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-base",a),...n,children:s}),h6:({node:e,children:s,className:a,...n})=>i.jsx("h6",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-sm",a),...n,children:s}),table:({node:e,children:s,className:a,...n})=>i.jsx("div",{className:"my-4 overflow-x-auto",children:i.jsx("table",{className:(0,l.cn)("w-full border-collapse border border-border",a),...n,children:s})}),thead:({node:e,children:s,className:a,...n})=>i.jsx("thead",{className:(0,l.cn)("bg-muted/50",a),...n,children:s}),tbody:({node:e,children:s,className:a,...n})=>i.jsx("tbody",{className:(0,l.cn)("divide-y divide-border",a),...n,children:s}),tr:({node:e,children:s,className:a,...n})=>i.jsx("tr",{className:(0,l.cn)("border-border border-b",a),...n,children:s}),th:({node:e,children:s,className:a,...n})=>i.jsx("th",{className:(0,l.cn)("px-4 py-2 text-left font-semibold text-sm",a),...n,children:s}),td:({node:e,children:s,className:a,...n})=>i.jsx("td",{className:(0,l.cn)("px-4 py-2 text-sm",a),...n,children:s}),blockquote:({node:e,children:s,className:a,...n})=>i.jsx("blockquote",{className:(0,l.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",a),...n,children:s}),code:({node:e,className:s,...a})=>e?.position?.start.line!==e?.position?.end.line?i.jsx("code",{className:s,...a}):i.jsx("code",{className:(0,l.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",s),...a}),pre:({node:e,className:s,children:a})=>{let t="javascript";"string"==typeof e?.properties?.className&&(t=e.properties.className.replace("language-",""));let r="";return(0,n.isValidElement)(a)&&a.props&&"string"==typeof a.props.children?r=a.props.children:"string"==typeof a&&(r=a),i.jsx(o.d,{className:(0,l.cn)("my-4 h-auto",s),code:r,language:t,children:i.jsx(o.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},h=(0,n.memo)(({className:e,options:s,children:a,allowedImagePrefixes:n,allowedLinkPrefixes:t,defaultOrigin:o,parseIncompleteMarkdown:h=!0,...u})=>{let j="string"==typeof a&&h?function(e){if(!e||"string"!=typeof e)return e;let s=e,a=s.match(/(!?\[)([^\]]*?)$/);if(a){let e=s.lastIndexOf(a[1]);s=s.substring(0,e)}if(s.match(/(\*\*)([^*]*?)$/)&&(s.match(/\*\*/g)||[]).length%2==1&&(s=`${s}**`),s.match(/(__)([^_]*?)$/)&&(s.match(/__/g)||[]).length%2==1&&(s=`${s}__`),s.match(/(\*)([^*]*?)$/)&&s.split("").reduce((e,a,i)=>{if("*"===a){let a=s[i-1],l=s[i+1];if("*"!==a&&"*"!==l)return e+1}return e},0)%2==1&&(s=`${s}*`),s.match(/(_)([^_]*?)$/)&&s.split("").reduce((e,a,i)=>{if("_"===a){let a=s[i-1],l=s[i+1];if("_"!==a&&"_"!==l)return e+1}return e},0)%2==1&&(s=`${s}_`),s.match(/(`)([^`]*?)$/)&&(s.includes("```"),(s.match(/```[\s\S]*?```/g)||[]).length,(s.match(/```/g)||[]).length%2!=1)){let e=0;for(let a=0;a<s.length;a++)if("`"===s[a]){let i="```"===s.substring(a,a+3),l=a>0&&"```"===s.substring(a-1,a+2),n=a>1&&"```"===s.substring(a-2,a+1);!(i||l||n)&&e++}e%2==1&&(s=`${s}\``)}return s.match(/(~~)([^~]*?)$/)&&(s.match(/~~/g)||[]).length%2==1&&(s=`${s}~~`),s}(a):a;return i.jsx("div",{className:(0,l.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...u,children:i.jsx(m,{allowedImagePrefixes:n??["*"],allowedLinkPrefixes:t??["*"],components:x,defaultOrigin:o,rehypePlugins:[r.Z],remarkPlugins:[d.Z,c.Z],...s,children:j})})},(e,s)=>e.children===s.children);h.displayName="Response"},18615:(e,s,a)=>{a.d(s,{J:()=>p});var i=a(10326);a(17577);var l=a(62288),n=a(34789),t=a(36931),r=a(90772),d=a(68232),c=a(77863);let o=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",e),...s}),m=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex items-center justify-between border-b bg-muted/50 px-4 py-3",e),...s}),x=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex items-center gap-1",e),...s}),h=({tooltip:e,label:s,icon:a,children:l,className:n,size:t="sm",variant:o="ghost",...m})=>{let x=(0,i.jsxs)(r.z,{className:(0,c.cn)("size-8 p-0 text-muted-foreground hover:text-foreground",n),size:t,type:"button",variant:o,...m,children:[a?i.jsx(a,{className:"size-4"}):l,i.jsx("span",{className:"sr-only",children:s||e})]});return e?i.jsx(d.pn,{children:(0,i.jsxs)(d.u,{children:[i.jsx(d.aJ,{asChild:!0,children:x}),i.jsx(d._v,{children:i.jsx("p",{children:e})})]})}):x},u=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex-1 overflow-auto p-4",e),...s});var j=a(18019),g=a(43810);function p({text:e,sliceLength:s}){let{toast:a}=(0,n.pm)();return(0,i.jsxs)(l.Vq,{children:[i.jsx(l.hg,{asChild:!0,children:(0,i.jsxs)("button",{className:"cursor-pointer text-sm text-left w-full hover:bg-accent/50 transition-colors rounded-md p-2 group",children:[(0,i.jsxs)("span",{className:"block",children:[e?.slice(0,s??200),s&&e.length>s?"...":""]}),(0,i.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1 group-hover:text-foreground transition-colors",children:[i.jsx(j.Z,{className:"w-3 h-3"}),"Click to view full text"]})]})}),i.jsx(l.cZ,{className:"sm:max-w-[800px] max-h-[500px] overflow-y-scroll",children:(0,i.jsxs)(o,{children:[i.jsx(m,{children:i.jsx(x,{children:i.jsx(h,{icon:g.Z,label:"Copy",tooltip:"Copy to clipboard",onClick:async()=>{await navigator.clipboard.writeText(e),a({title:"Copied to clipboard"})}})})}),i.jsx(u,{children:i.jsx(t.H,{children:e})})]})})]})}},14331:(e,s,a)=>{a.d(s,{Z:()=>d});var i=a(10326),l=a(19245),n=a(20108),t=a(77961);let r=({agent:e,status:s,className:a})=>{let{data:r}=(0,n.a)({queryKey:["defaultAnimation","idle"],queryFn:async()=>(await fetch("/agent-idle.json")).json(),staleTime:36e5,enabled:!e.animation_idle}),{data:d}=(0,n.a)({queryKey:["defaultAnimation","responding"],queryFn:async()=>(await fetch("/agent-responding.json")).json(),staleTime:36e5,enabled:!e.animation_responding}),{data:c}=(0,n.a)({queryKey:["customAnimation",e.animation_idle],queryFn:async()=>{if(!e.animation_idle)return null;let s=await (0,t.NF)(e.animation_idle);return(await fetch(s)).json()},enabled:!!e.animation_idle,staleTime:3e5}),{data:o}=(0,n.a)({queryKey:["customAnimation",e.animation_responding],queryFn:async()=>{if(!e.animation_responding)return null;let s=await (0,t.NF)(e.animation_responding);return(await fetch(s)).json()},enabled:!!e.animation_responding,staleTime:3e5}),{View:m}=(0,l.kJ)((()=>{switch(s){case"submitted":case"ready":case"error":default:return{animationData:c||r,loop:!0,autoplay:!0};case"streaming":return{animationData:o||d,loop:!0,autoplay:!0}}})());return i.jsx(i.Fragment,{children:i.jsx("div",{className:"",children:i.jsx("div",{className:a,children:m})})})},d=({agent:e,status:s,className:a})=>i.jsx(r,{className:a,agent:e,status:s})},55632:(e,s,a)=>{a.d(s,{NI:()=>g,Wi:()=>m,l0:()=>c,lX:()=>j,pf:()=>p,xJ:()=>u,zG:()=>f});var i=a(10326),l=a(34214),n=a(17577),t=a(74723),r=a(31048),d=a(77863);let c=t.RV,o=n.createContext({}),m=({...e})=>i.jsx(o.Provider,{value:{name:e.name},children:i.jsx(t.Qr,{...e})}),x=()=>{let e=n.useContext(o),s=n.useContext(h),{getFieldState:a,formState:i}=(0,t.Gc)(),l=a(e.name,i);if(!e)throw Error("useFormField should be used within <FormField>");let{id:r}=s;return{id:r,name:e.name,formItemId:`${r}-form-item`,formDescriptionId:`${r}-form-item-description`,formMessageId:`${r}-form-item-message`,...l}},h=n.createContext({}),u=n.forwardRef(({className:e,...s},a)=>{let l=n.useId();return i.jsx(h.Provider,{value:{id:l},children:i.jsx("div",{ref:a,className:(0,d.cn)("space-y-2",e),...s})})});u.displayName="FormItem";let j=n.forwardRef(({className:e,...s},a)=>{let{error:l,formItemId:n}=x();return i.jsx(r._,{ref:a,className:(0,d.cn)(l&&"text-destructive",e),htmlFor:n,...s})});j.displayName="FormLabel";let g=n.forwardRef(({...e},s)=>{let{error:a,formItemId:n,formDescriptionId:t,formMessageId:r}=x();return i.jsx(l.g7,{ref:s,id:n,"aria-describedby":a?`${t} ${r}`:`${t}`,"aria-invalid":!!a,...e})});g.displayName="FormControl";let p=n.forwardRef(({className:e,...s},a)=>{let{formDescriptionId:l}=x();return i.jsx("p",{ref:a,id:l,className:(0,d.cn)("text-sm text-muted-foreground",e),...s})});p.displayName="FormDescription";let f=n.forwardRef(({className:e,children:s,...a},l)=>{let{error:n,formMessageId:t}=x(),r=n?String(n?.message):s;return r?i.jsx("p",{ref:l,id:t,className:(0,d.cn)("text-sm font-medium text-destructive",e),...a,children:r}):null});f.displayName="FormMessage"},37859:(e,s,a)=>{a.d(s,{g:()=>n});var i=a(10326),l=a(77863);let n=({className:e})=>(0,i.jsxs)("svg",{"aria-hidden":"true",role:"status",className:(0,l.cn)("inline w-4 h-4 text-white animate-spin fill-inherit",e),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",className:"fill-inherit opacity-20"}),i.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",className:"fill-inherit"})]})},33261:(e,s,a)=>{a.d(s,{r:()=>r});var i=a(10326),l=a(41959),n=a(17577),t=a(77863);let r=n.forwardRef(({className:e,...s},a)=>i.jsx(l.fC,{className:(0,t.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...s,ref:a,children:i.jsx(l.bU,{className:(0,t.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));r.displayName=l.fC.displayName},79210:(e,s,a)=>{a.d(s,{SP:()=>c,dr:()=>d,mQ:()=>r,nU:()=>o});var i=a(10326),l=a(28407),n=a(17577),t=a(77863);let r=l.fC,d=n.forwardRef(({className:e,...s},a)=>i.jsx(l.aV,{ref:a,className:(0,t.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...s}));d.displayName=l.aV.displayName;let c=n.forwardRef(({className:e,...s},a)=>i.jsx(l.xz,{ref:a,className:(0,t.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...s}));c.displayName=l.xz.displayName;let o=n.forwardRef(({className:e,...s},a)=>i.jsx(l.VY,{ref:a,className:(0,t.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...s}));o.displayName=l.VY.displayName}};
1
+ "use strict";exports.id=8286,exports.ids=[8286],exports.modules={18286:(e,s,a)=>{a.d(s,{f:()=>en,Z:()=>er});var i=a(10326),l=a(39167),n=a(18753),t=a(74064),r=a(35047),d=a(17577),c=a(74723),o=a(770),m=a(98091),x=a(90772),h=a(62288),u=a(54432),j=a(31048),g=a(37859);function p({deleteAgent:e,deleteAgentResult:s,agent:a}){let l="delete this agent",[n,t]=(0,d.useState)("");return(0,i.jsxs)(h.Vq,{children:[i.jsx(h.hg,{asChild:!0,children:i.jsx(x.z,{disabled:!a?.id,variant:"destructive",children:i.jsx(m.Z,{className:"size-4"})})}),(0,i.jsxs)(h.cZ,{className:"sm:max-w-[475px]",children:[i.jsx(h.fK,{children:i.jsx(h.$N,{children:"Delete this agent"})}),i.jsx("div",{className:"grid gap-4 py-4",children:(0,i.jsxs)("div",{className:"grid gap-2",children:[(0,i.jsxs)(j._,{htmlFor:"name",children:['Type "',l,'" to confirm']}),i.jsx(u.I,{onChange:e=>{t(e.target.value)},id:"name",autoFocus:!0})]})}),i.jsx(h.cN,{children:(0,i.jsxs)(x.z,{disabled:n!==l||s.loading,onClick:()=>{e({variables:{id:a.id}})},variant:"destructive",type:"submit",children:["Delete ",s.loading&&i.jsx(g.g,{})]})})]})]})}var f=a(42270),v=a(33071),N=a(55632),b=a(8281),y=a(33261),w=a(79210),C=a(87673),z=a(15211),k=a(567),Z=a(34789);function S(){return i.jsx("svg",{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M3.5 12.5003C2.72343 12.5003 2.33515 12.5003 2.02886 12.3735C1.62048 12.2043 1.29602 11.8798 1.12687 11.4715C1 11.1652 1 10.7769 1 10.0003V4.33366C1 3.40024 1 2.93353 1.18166 2.57701C1.34144 2.2634 1.59641 2.00844 1.91002 1.84865C2.26654 1.66699 2.73325 1.66699 3.66667 1.66699H9.33333C10.1099 1.66699 10.4982 1.66699 10.8045 1.79386C11.2129 1.96302 11.5373 2.28747 11.7065 2.69585C11.8333 3.00214 11.8333 3.39042 11.8333 4.16699M9.5 18.3337H15C15.9334 18.3337 16.4001 18.3337 16.7567 18.152C17.0703 17.9922 17.3252 17.7372 17.485 17.4236C17.6667 17.0671 17.6667 16.6004 17.6667 15.667V10.167C17.6667 9.23357 17.6667 8.76686 17.485 8.41034C17.3252 8.09674 17.0703 7.84177 16.7567 7.68198C16.4001 7.50033 15.9334 7.50033 15 7.50033H9.5C8.56658 7.50033 8.09987 7.50033 7.74335 7.68198C7.42975 7.84177 7.17478 8.09674 7.01499 8.41034C6.83333 8.76686 6.83333 9.23357 6.83333 10.167V15.667C6.83333 16.6004 6.83333 17.0671 7.01499 17.4236C7.17478 17.7372 7.42975 17.9922 7.74335 18.152C8.09987 18.3337 8.56658 18.3337 9.5 18.3337Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var _=a(34474),A=a(30811),F=a(2454),I=a(47206),$=a(32933),D=a(96230),R=a(71709),P=a(36283),O=a(69145),T=a(49758),M=a(83855),V=a(88307),J=a(94019),E=a(87888),B=a(88378),G=a(18019),q=a(77863),Y=a(15286),L=a(24295),U=a(68232),W=a(7890),Q=a(77961),H=a(14331),K=a(30463),X=a(18615),ee=a(86590),es=a(29429),ea=a(52227),ei=a(36931);let el=["marketing","sales","finance","hr","coding","support","research","knowledge","product"],en=({configItem:e,currentValue:s,variables:a,onVariableSelect:l})=>{let[n,t]=d.useState(!1),r=a.find(e=>e.name===s);return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{className:"text-sm",children:[i.jsx("div",{className:"font-medium capitalize",children:e.name}),i.jsx("div",{className:"text-muted-foreground text-xs capitalize",children:e.description})]}),(0,i.jsxs)(A.J2,{open:n,onOpenChange:t,modal:!0,children:[i.jsx(A.xo,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"outline",role:"combobox","aria-expanded":n,className:"w-full justify-between text-sm",children:[r?r.name:"Select variable...",i.jsx(I.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),i.jsx(A.yk,{className:"w-full p-0",children:(0,i.jsxs)(F.mY,{children:[i.jsx(F.sZ,{placeholder:"Search variables..."}),(0,i.jsxs)(F.e8,{children:[i.jsx(F.rb,{children:"No variables found."}),i.jsx(F.fu,{children:a.map(e=>(0,i.jsxs)(F.di,{onSelect:()=>{l(e.name),console.log("variable",e),t(!1)},children:[i.jsx($.Z,{className:(0,q.cn)("mr-2 h-4 w-4",s===e.name?"opacity-100":"opacity-0")}),(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.name}),e.encrypted&&i.jsx("span",{className:"text-xs text-muted-foreground",children:"\uD83D\uDD12 Encrypted"})]})]},e.id))})]})]})}),e.default&&(0,i.jsxs)(v.Zb,{children:[i.jsx(v.Ol,{children:i.jsx(v.ll,{className:"text-md",children:"Default value"})}),i.jsx(v.aY,{children:i.jsx(X.J,{text:e.default,sliceLength:200})})]})]})]})},et=o.Ry({name:o.Z_().min(2,{message:"Agent name must be at least 2 characters."}).max(300,{message:"Agent name must not be longer than 300 characters."}),category:o.Z_().optional(),description:o.Z_().max(1e4,{message:"Agent description must not be longer than 10.000 characters."}).nullable().optional(),instructions:o.Z_().max(4e4,{message:"Agent instructions must not be longer than 40.000 characters."}).nullable().optional(),id:o.Z_().or(o.Rx()).nullable().optional(),active:o.Yj(),providerapikey:o.Z_().nullable().optional(),firewall:o.Ry({enabled:o.O7().optional(),scanners:o.Ry({promptGuard:o.O7().optional(),codeShield:o.O7().optional(),agentAlignment:o.O7().optional(),hiddenAscii:o.O7().optional(),piiDetection:o.O7().optional()}).optional()}).optional()});function er({agent:e,refetch:s}){let a=(0,r.useRouter)(),{user:o}=(0,d.useContext)(z.S),m=(0,d.useContext)(K.E),[h,j]=(0,d.useState)(e.tools?e.tools:[]),[X,er]=(0,d.useState)(!1),[ed,ec]=(0,d.useState)(""),[eo,em]=(0,d.useState)("all"),[ex,eh]=(0,d.useState)(""),[eu,ej]=(0,d.useState)(new Set),[eg,ep]=(0,d.useState)(!1),[ef,ev]=(0,d.useState)(e.providerapikey||""),[eN,eb]=(0,d.useState)(e.firewall?.enabled||!1),[ey,ew]=(0,d.useState)(e.animation_idle||""),[eC,ez]=(0,d.useState)(e.animation_responding||""),[ek,eZ]=(0,d.useState)({rights_mode:e.rights_mode,users:e.RBAC?.users,roles:e.RBAC?.roles,projects:e.RBAC?.projects}),[eS,e_]=(0,d.useState)({promptGuard:e.firewall?.scanners?.promptGuard||!1,codeShield:e.firewall?.scanners?.codeShield||!1,agentAlignment:e.firewall?.scanners?.agentAlignment||!1,hiddenAscii:e.firewall?.scanners?.hiddenAscii||!1,piiDetection:e.firewall?.scanners?.piiDetection||!1}),{toast:eA}=(0,Z.pm)(),eF=(0,d.useMemo)(()=>({search:ex||void 0,category:"all"===eo?void 0:eo,limit:100,page:0}),[ex,eo]),{data:eI,loading:e$}=(0,l.aM)(f.Ul,{variables:eF}),{data:eD}=(0,l.aM)(f.Az,{variables:{page:1,limit:100}}),{data:eR}=(0,l.aM)(f.Tp),eP=eD?.variablesPagination?.items||[],{data:eO,loading:eT,refetch:eM}=(0,ea.Sh)({page:1,limit:100,filters:[{assigned_agents:{contains:e.id}}]}),eV=eO?.prompt_libraryPagination?.items||[],eJ=(0,d.useMemo)(()=>eI?.tools?.items?.filter(s=>s.id!==e.id)||[],[eI?.tools?.items,e.id]),eE=(0,d.useMemo)(()=>eJ.reduce((e,s)=>(e[s.category]||(e[s.category]=[]),e[s.category].push(s),e),{}),[eJ]),eB=eR?.toolCategories||[],eG=()=>{ec(""),em("all")},eq=e=>{ej(s=>{let a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a})},eY=async()=>{try{await navigator.clipboard.writeText(e.id),eA({title:"Agent ID copied to clipboard"})}catch(e){eA({title:"Failed to copy Agent ID",variant:"destructive"})}},[eL,eU]=(0,n.D)(f.fG,{onCompleted:()=>{a.push("/agents",{scroll:!1})}}),[eW,eQ]=(0,n.D)(f.Dt,{refetchQueries:[f.as,"GetAgentById"]}),eH=(0,c.cI)({resolver:(0,t.F)(et),defaultValues:e??{name:"New agent",instructions:"",steps:[],firewall:{enabled:!1,scanners:{promptGuard:!1,codeShield:!1,agentAlignment:!1,hiddenAscii:!1,piiDetection:!1}}},mode:"onChange"}),[eK]=(0,n.D)(f.fB);return(0,i.jsxs)("div",{className:"h-full flex-col md:flex",children:[i.jsx("div",{className:"container flex flex-col items-start justify-between space-y-2 py-4 sm:flex-row sm:items-center sm:space-y-0 md:h-16",children:(0,i.jsxs)("div",{className:"ml-auto flex w-full space-x-2 sm:justify-end",children:[e?.id&&(0,i.jsxs)(x.z,{onClick:eH.handleSubmit(async e=>{console.log("data",e),eW({variables:{id:e.id,name:e.name,description:e.description,instructions:e.instructions,category:e.category,active:e.active,providerapikey:ef,animation_idle:ey,animation_responding:eC,rights_mode:ek.rights_mode,RBAC:{users:ek.users||[],roles:ek.roles||[],projects:ek.projects||[]},firewall:JSON.stringify({enabled:eN,scanners:eS}),tools:JSON.stringify(h)}}),s()},e=>{console.error("form data invalid",e)}),disabled:eQ.loading,variant:"secondary",type:"submit",children:["Save ",eQ.loading&&i.jsx(g.g,{className:"ml-2"})]}),i.jsx(x.z,{onClick:()=>{a.push("/agents",{scroll:!1})},variant:"secondary",type:"button",children:"Back"}),i.jsx(p,{agent:e,deleteAgent:eL,deleteAgentResult:eU})]})}),i.jsx(b.Z,{}),i.jsx(w.mQ,{defaultValue:"complete",className:"flex-1",children:i.jsx("div",{className:"container py-6",children:i.jsx("div",{className:"grid items-stretch gap-6",children:i.jsx("div",{className:"md:order-1",children:i.jsx("div",{className:"flex flex-col space-y-4",children:i.jsx("div",{className:"h-full",children:i.jsx(N.l0,{...eH,children:i.jsx("form",{className:"space-y-8",children:(0,i.jsxs)("div",{className:"grid grid-rows-1 grid-flow-col gap-6 lg:grid-cols-2",children:[i.jsx("div",{className:"col",children:i.jsx("div",{className:"flex flex-col space-y-4",children:i.jsx("div",{className:"flex flex-col space-y-2",children:(0,i.jsxs)(v.Zb,{children:[i.jsx(v.Ol,{children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[e.image&&i.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden flex-shrink-0",children:i.jsx("img",{src:e.image,alt:`${e.name} profile`,className:"w-full h-full object-cover"})}),i.jsx(v.ll,{children:"Agent"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,i.jsxs)("span",{children:["ID: ",e.id]}),i.jsx("button",{type:"button",onClick:eY,className:"p-1 hover:bg-muted rounded transition-colors text-muted-foreground",title:"Copy Agent ID",children:i.jsx(S,{})})]})]})}),(0,i.jsxs)(v.aY,{className:"grid gap-4",children:[i.jsx(N.Wi,{control:eH.control,name:"name",render:({field:e})=>(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Name"}),i.jsx(N.NI,{children:i.jsx(u.I,{type:"text",className:"resize-none",...e})}),i.jsx(N.zG,{})]})}),(0,i.jsxs)("div",{children:[i.jsx("div",{className:"text-sm font-medium mb-2",children:"Modalities"}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mb-2",children:["This agent uses ",i.jsx("b",{children:e.modelName})," from ",i.jsx("b",{children:e.providerName})," and can use the following capabilities:"]}),i.jsx(U.pn,{children:(0,i.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.text?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(D.Z,{className:"h-4 w-4"})}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.images?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(R.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Images: ",e.capabilities?.images?.length?e.capabilities.images.join(", "):"None"]})})]}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.files?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(P.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Files: ",e.capabilities?.files?.length?e.capabilities.files.join(", "):"None"]})})]}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.audio?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(O.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Audio: ",e.capabilities?.audio?.length?e.capabilities.audio.join(", "):"None"]})})]}),(0,i.jsxs)(U.u,{children:[i.jsx(U.aJ,{asChild:!0,children:i.jsx("div",{className:`p-2 rounded-md ${e.capabilities?.video?.length?"bg-primary text-primary-foreground":"bg-gray-500 text-white"}`,children:i.jsx(T.Z,{className:"h-4 w-4"})})}),i.jsx(U._v,{children:(0,i.jsxs)("p",{children:["Video: ",e.capabilities?.video?.length?e.capabilities.video.join(", "):"None"]})})]})]})})]}),i.jsx(N.Wi,{control:eH.control,name:"category",render:({field:e})=>(e.value||(e.value=""),(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Category"}),i.jsx(N.NI,{children:(0,i.jsxs)(_.Ph,{onValueChange:s=>{e.onChange(s)},children:[i.jsx(_.i4,{children:i.jsx(_.ki,{className:"capitalize",placeholder:e.value||"Select a category"})}),i.jsx(_.Bw,{children:el.map(e=>i.jsx(_.Ql,{className:"capitalize",value:e,children:e},e))})]})}),i.jsx(N.zG,{})]}))}),i.jsx(N.Wi,{control:eH.control,name:"description",render:({field:e})=>(e.value||(e.value=""),(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Description"}),i.jsx(N.NI,{children:i.jsx(C.g,{rows:2,className:"resize-none",...e,value:e.value??""})}),i.jsx(N.zG,{})]}))}),i.jsx(N.Wi,{control:eH.control,name:"instructions",render:({field:e})=>(e.value||(e.value=""),(0,i.jsxs)(N.xJ,{children:[i.jsx(N.lX,{children:"Instructions"}),i.jsx(N.NI,{children:i.jsx(C.g,{rows:5,className:"resize-none",...e,value:e.value??""})}),i.jsx(N.zG,{})]}))}),(0,i.jsxs)("div",{className:"space-y-2 w-full overflow-x-hidden",children:[(0,i.jsxs)("div",{className:"text-sm",children:[i.jsx("div",{className:"font-medium",children:"Provider API Key"}),i.jsx("div",{className:"text-muted-foreground text-xs",children:"Select a variable containing the API key for the provider"}),e.authenticationInformation&&i.jsx("div",{className:"text-muted-foreground text-xs",children:i.jsx(ei.H,{children:e.authenticationInformation})})]}),(0,i.jsxs)(A.J2,{children:[i.jsx(A.xo,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"outline",role:"combobox",className:"w-full justify-between text-sm",children:[eP.find(e=>e.name===ef)?.name||"Select variable...",i.jsx(I.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),i.jsx(A.yk,{className:"w-full p-0 z-[9999]",children:(0,i.jsxs)(F.mY,{children:[i.jsx(F.sZ,{placeholder:"Search variables..."}),(0,i.jsxs)(F.e8,{children:[i.jsx(F.rb,{children:"No variables found."}),i.jsx(F.fu,{children:eP.map(e=>(0,i.jsxs)(F.di,{onSelect:()=>{ev(e.name)},children:[i.jsx($.Z,{className:(0,q.cn)("mr-2 h-4 w-4",ef===e.name?"opacity-100":"opacity-0")}),(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.name}),e.encrypted&&i.jsx("span",{className:"text-xs text-muted-foreground",children:"\uD83D\uDD12 Encrypted"})]})]},e.id))})]})]})})]})]}),m?.fileUploads?.s3endpoint&&i.jsx(v.Zb,{className:"bg-transparent",children:(0,i.jsxs)(L.zF,{children:[i.jsx(v.Ol,{className:"p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-base",children:"Custom visualizations"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-0",children:"Upload custom Lottie animations for idle and responding states."})]}),i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[i.jsx(I.Z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Toggle"})]})})]})}),i.jsx(L.Fw,{className:"mt-5",children:i.jsx(v.aY,{className:"space-y-4",children:(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{children:[i.jsx("div",{className:"text-sm font-medium",children:"Idle Animation"}),i.jsx("div",{className:"text-xs text-muted-foreground",children:"Animation when agent is waiting"})]}),(0,i.jsxs)(Q.jF,{s3key:ey,children:[i.jsx(Q.ZP,{id:"agent-idle-animation",allowedFileTypes:[".json"],selectionLimit:1,buttonText:"",dependencies:[e.id],onConfirm:e=>{e.length>0&&ew(e[0])}}),ey&&(0,i.jsxs)("div",{className:"mt-2 p-2 border rounded bg-muted/30",children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Preview:"}),i.jsx("div",{className:"w-12 h-12 mx-auto",children:i.jsx(H.Z,{agent:{...e,animation_idle:ey},status:"ready"})})]})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{children:[i.jsx("div",{className:"text-sm font-medium",children:"Responding Animation"}),i.jsx("div",{className:"text-xs text-muted-foreground",children:"Animation when agent is responding"})]}),(0,i.jsxs)(Q.jF,{s3key:eC,children:[i.jsx(Q.ZP,{id:"agent-responding-animation",allowedFileTypes:[".json"],selectionLimit:1,buttonText:"",dependencies:[e.id],onConfirm:e=>{e.length>0&&ez(e[0])}}),eC&&(0,i.jsxs)("div",{className:"mt-2 p-2 border rounded bg-muted/30",children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Preview:"}),i.jsx("div",{className:"w-12 h-12 mx-auto",children:i.jsx(H.Z,{agent:{...e,animation_responding:eC},status:"streaming"})})]})]})]})]})})})]})}),(0,i.jsxs)(i.Fragment,{children:[i.jsx("div",{className:"text-sm font-medium mb-0",children:" You can test this agent using the Exulu UI without activating the agent if you are a super admin:"}),i.jsx(x.z,{className:"mt-0",onClick:async()=>{console.log("agent",e);let s=await eK({variables:{title:"New session",user:o.id,agent:e.id}});console.log("result",s);let i=s?.data?.agent_sessionsCreateOne?.item?.id;a.push(`/chat/${e.id}/${i}`)},type:"button",variant:"default",children:"Go to chat"})]})]})]})})})}),i.jsx("div",{className:"col",children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[i.jsx(N.Wi,{control:eH.control,name:"active",render:({field:e})=>(0,i.jsxs)(N.xJ,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[(0,i.jsxs)("div",{className:"space-y-0.5",children:[i.jsx(N.lX,{className:"text-base",children:"Is this agent active?"}),i.jsx(N.pf,{children:"When active this agent will be available via the Exulu UI and API endpoint."})]}),i.jsx(N.NI,{children:i.jsx(y.r,{checked:e.value,onCheckedChange:e.onChange})})]})}),i.jsx(v.Zb,{className:"bg-transparent",children:(0,i.jsxs)(L.zF,{children:[i.jsx(v.Ol,{className:"p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-base",children:"Access Control"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-0",children:"Control access to this agent."})]}),i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[i.jsx(I.Z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Toggle"})]})})]})}),i.jsx(L.Fw,{className:"mt-5",children:i.jsx(v.aY,{className:"space-y-4",children:i.jsx(Y.P,{initialRightsMode:e.rights_mode,initialUsers:e.RBAC?.users,initialRoles:e.RBAC?.roles,initialProjects:e.RBAC?.projects,onChange:(e,s,a,i)=>{eZ({rights_mode:e,users:s,roles:a,projects:i})}})})})]})}),i.jsx(v.Zb,{className:"bg-transparent",children:(0,i.jsxs)(L.zF,{children:[i.jsx(v.Ol,{className:"p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-base",children:"Prompt Templates"}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mb-0",children:["Manage prompt templates assigned to this agent (",eV.length,")"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)(x.z,{type:"button",variant:"outline",size:"sm",onClick:()=>ep(!0),children:[i.jsx(M.Z,{className:"h-4 w-4 mr-2"}),"New Prompt"]}),i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[i.jsx(I.Z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Toggle"})]})})]})]})}),i.jsx(L.Fw,{className:"mt-5",children:i.jsx(v.aY,{className:"space-y-4",children:eT?i.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading prompts..."}):0===eV.length?(0,i.jsxs)("div",{className:"text-center py-6 border-2 border-dashed rounded-lg",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"No prompts assigned to this agent yet"}),(0,i.jsxs)(x.z,{type:"button",variant:"outline",size:"sm",onClick:()=>ep(!0),children:[i.jsx(M.Z,{className:"h-4 w-4 mr-2"}),"Create First Prompt"]})]}):i.jsx("div",{className:"grid gap-4",children:eV.map(e=>i.jsx(ee.$,{prompt:e,user:o,onUpdate:eM},e.id))})})})]})}),(0,i.jsxs)(v.Zb,{children:[(0,i.jsxs)(v.Ol,{children:[(0,i.jsxs)(v.ll,{className:"flex items-center gap-2",children:["Tools",e$&&i.jsx(g.g,{className:"h-4 w-4"})]}),i.jsx(v.SZ,{children:h.length>0?`${h.length} tool${1===h.length?"":"s"} enabled for this agent`:"No tools enabled for this agent"})]}),i.jsx(v.aY,{children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,i.jsxs)("div",{className:"space-y-3",children:[i.jsx("div",{className:"flex items-center gap-2",children:(0,i.jsxs)("div",{className:"relative flex-1",children:[i.jsx(V.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(u.I,{placeholder:"Search tools by name or description...",value:ed,onChange:e=>ec(e.target.value),className:"pl-10 pr-10"}),ed&&i.jsx(x.z,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0",onClick:()=>ec(""),children:i.jsx(J.Z,{className:"h-3 w-3"})})]})}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)(_.Ph,{value:eo,onValueChange:em,children:[i.jsx(_.i4,{className:"w-[200px]",children:i.jsx(_.ki,{placeholder:"Filter by category"})}),(0,i.jsxs)(_.Bw,{children:[i.jsx(_.Ql,{value:"all",children:"All categories"}),eB.map(e=>i.jsx(_.Ql,{value:e,className:"capitalize",children:e},e))]})]}),(ed||"all"!==eo)&&(0,i.jsxs)(x.z,{variant:"outline",onClick:eG,children:[i.jsx(J.Z,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Clear filters"})]}),i.jsx(x.z,{type:"button",variant:"outline",onClick:()=>{ej(new Set)},children:"Expand all"}),i.jsx(x.z,{type:"button",variant:"outline",onClick:()=>{ej(new Set(Object.keys(eE)))},children:"Collapse all"})]}),(0,i.jsxs)("div",{className:"ml-auto text-sm text-muted-foreground",children:[eI?.tools?.total||0," tool",1!==(eI?.tools?.total||0)?"s":"",ex||"all"!==eo?" found":" available","."]})]}),(0,i.jsxs)("div",{className:"space-y-6",children:["all"===eo?Object.entries(eE).map(([e,s])=>{let a=s.filter(e=>h.some(s=>s.id===e.id)).length,l=eu.has(e);return(0,i.jsxs)(L.zF,{open:!l,onOpenChange:()=>eq(e),children:[(0,i.jsxs)("div",{className:"flex items-center justify-between p-3 border rounded-lg bg-muted/30",children:[i.jsx(L.wy,{asChild:!0,children:(0,i.jsxs)(x.z,{variant:"ghost",className:"flex items-center gap-2 p-0 h-auto font-medium",children:[i.jsx(I.Z,{className:"h-4 w-4"}),i.jsx("span",{className:"capitalize",children:e}),(0,i.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[a,"/",s.length]})]})}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[i.jsx(x.z,{variant:"outline",size:"sm",onClick:()=>{let e=s.filter(e=>!h.some(s=>s.id===e.id)).map(e=>({id:e.id,type:e.type,config:e.config?.map(e=>({name:e.name,variable:""}))||[]}));j([...h,...e])},disabled:a===s.length,children:"Enable All"}),i.jsx(x.z,{variant:"outline",size:"sm",onClick:()=>{let e=s.map(e=>e.id);j(h.filter(s=>!e.includes(s.id)))},disabled:0===a,children:"Disable All"})]})]}),i.jsx(L.Fw,{className:"mt-2",children:i.jsx("div",{className:"space-y-2 pl-4",children:s.map(e=>{let s=h.some(s=>s.id===e.id),a=h.find(s=>s.id===e.id),l=e.config?.length||0,n=a?.config?.filter(e=>e.variable&&""!==e.variable.trim()).length||0,t=s&&l>0&&n<l;return i.jsx("div",{className:"rounded-lg border p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center flex-1",children:[(0,i.jsxs)("div",{className:"flex-1",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"font-medium",children:e?.name}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[l>0&&s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[n,"/",l]}),t&&i.jsx(E.Z,{className:"h-4 w-4 text-destructive"})]}),i.jsx(k.C,{variant:"outline",children:e?.category})]})]}),i.jsx("div",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:e?.description})]}),(0,i.jsxs)(W.yo,{open:X===e.id,onOpenChange:()=>{X===e.id?er(!1):er(e.id)},children:[l>0&&!s?i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})})}):i.jsx(x.z,{type:"button",disabled:!0,variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})}),i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{className:"mr-2",variant:"ghost",size:"sm",children:i.jsx(G.Z,{className:"h-4 w-4"})})}),(0,i.jsxs)(W.ue,{className:"w-[400px] sm:w-[540px]",children:[(0,i.jsxs)(W.Tu,{children:[i.jsx(W.bC,{children:e?.name}),i.jsx(W.Ei,{children:e?.description})]}),i.jsx("div",{className:"py-6",children:i.jsx("div",{className:"space-y-4",children:e.config&&e.config.length>0&&(0,i.jsxs)("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-md font-medium",children:"Configuration variables:"}),e.config.map((l,n)=>{let t=a?.config.find(e=>e.name===l.name)?.variable||"";return i.jsx("div",{className:"space-y-2",children:s?i.jsx(en,{configItem:l,currentValue:t,variables:eP,onVariableSelect:s=>{let a=h.map(a=>a.id===e.id?{...a,config:a.config.map(e=>e.name===l.name?{...e,variable:s}:e)}:a);console.log("updated",a),j(a)}}):i.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-muted rounded",children:"Enable this tool to configure"})},n)})]})})})]})]})]}),i.jsx(y.r,{checked:s,onCheckedChange:s=>{let a=[...h];s?(a=[...h,{id:e.id,type:e.type,config:e.config?.map(e=>({name:e.name,variable:""}))||[]}],e.config?.length>0&&er(e.id)):a=h.filter(s=>s.id!==e.id),j(a)}})]})},e?.id)})})})]},e)}):i.jsx("div",{className:"space-y-2",children:eJ.map(e=>{let s=h.some(s=>s.id===e.id),a=h.find(s=>s.id===e.id),l=e.config?.length||0,n=a?.config?.filter(e=>e.variable&&""!==e.variable.trim()).length||0,t=s&&l>0&&n<l;return i.jsx("div",{className:"rounded-lg border p-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center flex-1",children:[(0,i.jsxs)("div",{className:"flex-1",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"font-medium",children:e?.name}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[l>0&&s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[n,"/",l]}),t&&i.jsx(E.Z,{className:"h-4 w-4 text-destructive"})]}),i.jsx(k.C,{variant:"outline",children:e?.category})]})]}),i.jsx("div",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:e?.description})]}),(0,i.jsxs)(W.yo,{open:X===e.id,onOpenChange:()=>{X===e.id?er(!1):er(e.id)},children:[l>0&&!s?i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})})}):i.jsx(x.z,{type:"button",disabled:!0,variant:"ghost",size:"sm",children:i.jsx(B.Z,{className:"h-4 w-4"})}),i.jsx(W.aM,{asChild:!0,children:i.jsx(x.z,{className:"mr-2",variant:"ghost",size:"sm",children:i.jsx(G.Z,{className:"h-4 w-4"})})}),(0,i.jsxs)(W.ue,{className:"w-[400px] sm:w-[540px]",children:[(0,i.jsxs)(W.Tu,{children:[i.jsx(W.bC,{children:e?.name}),i.jsx(W.Ei,{children:e?.description})]}),i.jsx("div",{className:"py-6",children:i.jsx("div",{className:"space-y-4",children:e.config&&e.config.length>0&&(0,i.jsxs)("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-md font-medium",children:"Configuration variables:"}),e.config.map((l,n)=>{let t=a?.config.find(e=>e.name===l.name)?.variable||"";return i.jsx("div",{className:"space-y-2",children:s?i.jsx(en,{configItem:l,currentValue:t,variables:eP,onVariableSelect:s=>{let a=h.map(a=>a.id===e.id?{...a,config:a.config.map(e=>e.name===l.name?{...e,variable:s}:e)}:a);console.log("updated",a),j(a)}}):i.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-muted rounded",children:"Enable this tool to configure"})},n)})]})})})]})]})]}),i.jsx(y.r,{checked:s,onCheckedChange:s=>{let a=[...h];s?(a=[...h,{id:e.id,type:e.type,config:e.config?.map(e=>({name:e.name,variable:""}))||[]}],e.config?.length>0&&er(e.id)):a=h.filter(s=>s.id!==e.id),j(a)}})]})},e?.id)})}),0===eJ.length&&(ed||"all"!==eo)&&(0,i.jsxs)("div",{className:"text-center py-8",children:[i.jsx("div",{className:"text-muted-foreground",children:"No tools found matching your criteria."}),i.jsx(x.z,{variant:"outline",size:"sm",className:"mt-2",onClick:eG,children:"Clear filters"})]})]})]})})]})]})})]})})})})})})})})}),i.jsx(es.D,{open:eg,onOpenChange:ep,onSuccess:eM,user:o,defaultAssignedAgents:[e.id]})]})}},51602:(e,s,a)=>{a.d(s,{d:()=>h,f:()=>u});var i=a(10326),l=a(90772),n=a(77863),t=a(32933),r=a(43810),d=a(17577),c=a(54390),o=a(35057),m=a(48818);let x=(0,d.createContext)({code:""}),h=({code:e,language:s,showLineNumbers:a=!1,className:l,children:t,...r})=>i.jsx(x.Provider,{value:{code:e},children:i.jsx("div",{className:(0,n.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",l),...r,children:(0,i.jsxs)("div",{className:"relative",children:[i.jsx(c.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:o.Z,children:e}),i.jsx(c.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:m.Z,children:e}),t&&i.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:t})]})})}),u=({onCopy:e,onError:s,timeout:a=2e3,children:c,className:o,...m})=>{let[h,u]=(0,d.useState)(!1),{code:j}=(0,d.useContext)(x),g=async()=>{s?.(Error("Clipboard API not available"))},p=h?t.Z:r.Z;return i.jsx(l.z,{className:(0,n.cn)("shrink-0",o),onClick:g,size:"icon",variant:"ghost",...m,children:c??i.jsx(p,{size:14})})}},36931:(e,s,a)=>{a.d(s,{H:()=>h});var i=a(10326),l=a(77863),n=a(17577),t=a(16476),r=a(79283),d=a(70285),c=a(7833),o=a(51602);a(32289);let m=(0,a(39499).Z)(t.UG),x={ol:({node:e,children:s,className:a,...n})=>i.jsx("ol",{className:(0,l.cn)("ml-4 list-outside list-decimal",a),...n,children:s}),li:({node:e,children:s,className:a,...n})=>i.jsx("li",{className:(0,l.cn)("py-1",a),...n,children:s}),ul:({node:e,children:s,className:a,...n})=>i.jsx("ul",{className:(0,l.cn)("ml-4 list-outside list-disc",a),...n,children:s}),hr:({node:e,className:s,...a})=>i.jsx("hr",{className:(0,l.cn)("my-6 border-border",s),...a}),strong:({node:e,children:s,className:a,...n})=>i.jsx("span",{className:(0,l.cn)("font-semibold",a),...n,children:s}),a:({node:e,children:s,className:a,...n})=>i.jsx("a",{className:(0,l.cn)("font-medium text-primary underline",a),rel:"noreferrer",target:"_blank",...n,children:s}),h1:({node:e,children:s,className:a,...n})=>i.jsx("h1",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-3xl",a),...n,children:s}),h2:({node:e,children:s,className:a,...n})=>i.jsx("h2",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-2xl",a),...n,children:s}),h3:({node:e,children:s,className:a,...n})=>i.jsx("h3",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-xl",a),...n,children:s}),h4:({node:e,children:s,className:a,...n})=>i.jsx("h4",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-lg",a),...n,children:s}),h5:({node:e,children:s,className:a,...n})=>i.jsx("h5",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-base",a),...n,children:s}),h6:({node:e,children:s,className:a,...n})=>i.jsx("h6",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-sm",a),...n,children:s}),table:({node:e,children:s,className:a,...n})=>i.jsx("div",{className:"my-4 overflow-x-auto",children:i.jsx("table",{className:(0,l.cn)("w-full border-collapse border border-border",a),...n,children:s})}),thead:({node:e,children:s,className:a,...n})=>i.jsx("thead",{className:(0,l.cn)("bg-muted/50",a),...n,children:s}),tbody:({node:e,children:s,className:a,...n})=>i.jsx("tbody",{className:(0,l.cn)("divide-y divide-border",a),...n,children:s}),tr:({node:e,children:s,className:a,...n})=>i.jsx("tr",{className:(0,l.cn)("border-border border-b",a),...n,children:s}),th:({node:e,children:s,className:a,...n})=>i.jsx("th",{className:(0,l.cn)("px-4 py-2 text-left font-semibold text-sm",a),...n,children:s}),td:({node:e,children:s,className:a,...n})=>i.jsx("td",{className:(0,l.cn)("px-4 py-2 text-sm",a),...n,children:s}),blockquote:({node:e,children:s,className:a,...n})=>i.jsx("blockquote",{className:(0,l.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",a),...n,children:s}),code:({node:e,className:s,...a})=>e?.position?.start.line!==e?.position?.end.line?i.jsx("code",{className:s,...a}):i.jsx("code",{className:(0,l.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",s),...a}),pre:({node:e,className:s,children:a})=>{let t="javascript";"string"==typeof e?.properties?.className&&(t=e.properties.className.replace("language-",""));let r="";return(0,n.isValidElement)(a)&&a.props&&"string"==typeof a.props.children?r=a.props.children:"string"==typeof a&&(r=a),i.jsx(o.d,{className:(0,l.cn)("my-4 h-auto",s),code:r,language:t,children:i.jsx(o.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},h=(0,n.memo)(({className:e,options:s,children:a,allowedImagePrefixes:n,allowedLinkPrefixes:t,defaultOrigin:o,parseIncompleteMarkdown:h=!0,...u})=>{let j="string"==typeof a&&h?function(e){if(!e||"string"!=typeof e)return e;let s=e,a=s.match(/(!?\[)([^\]]*?)$/);if(a){let e=s.lastIndexOf(a[1]);s=s.substring(0,e)}if(s.match(/(\*\*)([^*]*?)$/)&&(s.match(/\*\*/g)||[]).length%2==1&&(s=`${s}**`),s.match(/(__)([^_]*?)$/)&&(s.match(/__/g)||[]).length%2==1&&(s=`${s}__`),s.match(/(\*)([^*]*?)$/)&&s.split("").reduce((e,a,i)=>{if("*"===a){let a=s[i-1],l=s[i+1];if("*"!==a&&"*"!==l)return e+1}return e},0)%2==1&&(s=`${s}*`),s.match(/(_)([^_]*?)$/)&&s.split("").reduce((e,a,i)=>{if("_"===a){let a=s[i-1],l=s[i+1];if("_"!==a&&"_"!==l)return e+1}return e},0)%2==1&&(s=`${s}_`),s.match(/(`)([^`]*?)$/)&&(s.includes("```"),(s.match(/```[\s\S]*?```/g)||[]).length,(s.match(/```/g)||[]).length%2!=1)){let e=0;for(let a=0;a<s.length;a++)if("`"===s[a]){let i="```"===s.substring(a,a+3),l=a>0&&"```"===s.substring(a-1,a+2),n=a>1&&"```"===s.substring(a-2,a+1);!(i||l||n)&&e++}e%2==1&&(s=`${s}\``)}return s.match(/(~~)([^~]*?)$/)&&(s.match(/~~/g)||[]).length%2==1&&(s=`${s}~~`),s}(a):a;return i.jsx("div",{className:(0,l.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...u,children:i.jsx(m,{allowedImagePrefixes:n??["*"],allowedLinkPrefixes:t??["*"],components:x,defaultOrigin:o,rehypePlugins:[r.Z],remarkPlugins:[d.Z,c.Z],...s,children:j})})},(e,s)=>e.children===s.children);h.displayName="Response"},18615:(e,s,a)=>{a.d(s,{J:()=>p});var i=a(10326);a(17577);var l=a(62288),n=a(34789),t=a(36931),r=a(90772),d=a(68232),c=a(77863);let o=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",e),...s}),m=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex items-center justify-between border-b bg-muted/50 px-4 py-3",e),...s}),x=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex items-center gap-1",e),...s}),h=({tooltip:e,label:s,icon:a,children:l,className:n,size:t="sm",variant:o="ghost",...m})=>{let x=(0,i.jsxs)(r.z,{className:(0,c.cn)("size-8 p-0 text-muted-foreground hover:text-foreground",n),size:t,type:"button",variant:o,...m,children:[a?i.jsx(a,{className:"size-4"}):l,i.jsx("span",{className:"sr-only",children:s||e})]});return e?i.jsx(d.pn,{children:(0,i.jsxs)(d.u,{children:[i.jsx(d.aJ,{asChild:!0,children:x}),i.jsx(d._v,{children:i.jsx("p",{children:e})})]})}):x},u=({className:e,...s})=>i.jsx("div",{className:(0,c.cn)("flex-1 overflow-auto p-4",e),...s});var j=a(18019),g=a(43810);function p({text:e,sliceLength:s}){let{toast:a}=(0,n.pm)();return(0,i.jsxs)(l.Vq,{children:[i.jsx(l.hg,{asChild:!0,children:(0,i.jsxs)("button",{className:"cursor-pointer text-sm text-left w-full hover:bg-accent/50 transition-colors rounded-md p-2 group",children:[(0,i.jsxs)("span",{className:"block",children:[e?.slice(0,s??200),s&&e.length>s?"...":""]}),(0,i.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1 group-hover:text-foreground transition-colors",children:[i.jsx(j.Z,{className:"w-3 h-3"}),"Click to view full text"]})]})}),i.jsx(l.cZ,{className:"sm:max-w-[800px] max-h-[500px] overflow-y-scroll",children:(0,i.jsxs)(o,{children:[i.jsx(m,{children:i.jsx(x,{children:i.jsx(h,{icon:g.Z,label:"Copy",tooltip:"Copy to clipboard",onClick:async()=>{await navigator.clipboard.writeText(e),a({title:"Copied to clipboard"})}})})}),i.jsx(u,{children:i.jsx(t.H,{children:e})})]})})]})}},14331:(e,s,a)=>{a.d(s,{Z:()=>d});var i=a(10326),l=a(19245),n=a(20108),t=a(77961);let r=({agent:e,status:s,className:a})=>{let{data:r}=(0,n.a)({queryKey:["defaultAnimation","idle"],queryFn:async()=>(await fetch("/agent-idle.json")).json(),staleTime:36e5,enabled:!e.animation_idle}),{data:d}=(0,n.a)({queryKey:["defaultAnimation","responding"],queryFn:async()=>(await fetch("/agent-responding.json")).json(),staleTime:36e5,enabled:!e.animation_responding}),{data:c}=(0,n.a)({queryKey:["customAnimation",e.animation_idle],queryFn:async()=>{if(!e.animation_idle)return null;let s=await (0,t.NF)(e.animation_idle);return(await fetch(s)).json()},enabled:!!e.animation_idle,staleTime:3e5}),{data:o}=(0,n.a)({queryKey:["customAnimation",e.animation_responding],queryFn:async()=>{if(!e.animation_responding)return null;let s=await (0,t.NF)(e.animation_responding);return(await fetch(s)).json()},enabled:!!e.animation_responding,staleTime:3e5}),{View:m}=(0,l.kJ)((()=>{switch(s){case"submitted":case"ready":case"error":default:return{animationData:c||r,loop:!0,autoplay:!0};case"streaming":return{animationData:o||d,loop:!0,autoplay:!0}}})());return i.jsx(i.Fragment,{children:i.jsx("div",{className:"",children:i.jsx("div",{className:a,children:m})})})},d=({agent:e,status:s,className:a})=>i.jsx(r,{className:a,agent:e,status:s})},55632:(e,s,a)=>{a.d(s,{NI:()=>g,Wi:()=>m,l0:()=>c,lX:()=>j,pf:()=>p,xJ:()=>u,zG:()=>f});var i=a(10326),l=a(34214),n=a(17577),t=a(74723),r=a(31048),d=a(77863);let c=t.RV,o=n.createContext({}),m=({...e})=>i.jsx(o.Provider,{value:{name:e.name},children:i.jsx(t.Qr,{...e})}),x=()=>{let e=n.useContext(o),s=n.useContext(h),{getFieldState:a,formState:i}=(0,t.Gc)(),l=a(e.name,i);if(!e)throw Error("useFormField should be used within <FormField>");let{id:r}=s;return{id:r,name:e.name,formItemId:`${r}-form-item`,formDescriptionId:`${r}-form-item-description`,formMessageId:`${r}-form-item-message`,...l}},h=n.createContext({}),u=n.forwardRef(({className:e,...s},a)=>{let l=n.useId();return i.jsx(h.Provider,{value:{id:l},children:i.jsx("div",{ref:a,className:(0,d.cn)("space-y-2",e),...s})})});u.displayName="FormItem";let j=n.forwardRef(({className:e,...s},a)=>{let{error:l,formItemId:n}=x();return i.jsx(r._,{ref:a,className:(0,d.cn)(l&&"text-destructive",e),htmlFor:n,...s})});j.displayName="FormLabel";let g=n.forwardRef(({...e},s)=>{let{error:a,formItemId:n,formDescriptionId:t,formMessageId:r}=x();return i.jsx(l.g7,{ref:s,id:n,"aria-describedby":a?`${t} ${r}`:`${t}`,"aria-invalid":!!a,...e})});g.displayName="FormControl";let p=n.forwardRef(({className:e,...s},a)=>{let{formDescriptionId:l}=x();return i.jsx("p",{ref:a,id:l,className:(0,d.cn)("text-sm text-muted-foreground",e),...s})});p.displayName="FormDescription";let f=n.forwardRef(({className:e,children:s,...a},l)=>{let{error:n,formMessageId:t}=x(),r=n?String(n?.message):s;return r?i.jsx("p",{ref:l,id:t,className:(0,d.cn)("text-sm font-medium text-destructive",e),...a,children:r}):null});f.displayName="FormMessage"},37859:(e,s,a)=>{a.d(s,{g:()=>n});var i=a(10326),l=a(77863);let n=({className:e})=>(0,i.jsxs)("svg",{"aria-hidden":"true",role:"status",className:(0,l.cn)("inline w-4 h-4 text-white animate-spin fill-inherit",e),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",className:"fill-inherit opacity-20"}),i.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",className:"fill-inherit"})]})},33261:(e,s,a)=>{a.d(s,{r:()=>r});var i=a(10326),l=a(41959),n=a(17577),t=a(77863);let r=n.forwardRef(({className:e,...s},a)=>i.jsx(l.fC,{className:(0,t.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...s,ref:a,children:i.jsx(l.bU,{className:(0,t.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));r.displayName=l.fC.displayName},79210:(e,s,a)=>{a.d(s,{SP:()=>c,dr:()=>d,mQ:()=>r,nU:()=>o});var i=a(10326),l=a(28407),n=a(17577),t=a(77863);let r=l.fC,d=n.forwardRef(({className:e,...s},a)=>i.jsx(l.aV,{ref:a,className:(0,t.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...s}));d.displayName=l.aV.displayName;let c=n.forwardRef(({className:e,...s},a)=>i.jsx(l.xz,{ref:a,className:(0,t.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...s}));c.displayName=l.xz.displayName;let o=n.forwardRef(({className:e,...s},a)=>i.jsx(l.VY,{ref:a,className:(0,t.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...s}));o.displayName=l.VY.displayName}};
@@ -17,11 +17,11 @@
17
17
  "wasm": [],
18
18
  "assets": [],
19
19
  "env": {
20
- "__NEXT_BUILD_ID": "2bzL2j5_MmcbjxQ21egBB",
21
- "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "d1O6DsDxs1k0DaxcWDA7Ha+0sn8tApbaYFBnJ7+4O0w=",
22
- "__NEXT_PREVIEW_MODE_ID": "b4b49115125ce3f2d148c59f35d83079",
23
- "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "e69e15e97dd947b9ec253c3e4e5d36af611ae2e812741d57e985fdc7ee135cdf",
24
- "__NEXT_PREVIEW_MODE_SIGNING_KEY": "06ee15d3856e07bcdbb3414a04c699c9ac5a891c39a5b8c2ab4a7a764b71140c"
20
+ "__NEXT_BUILD_ID": "J23NmkaMjAJYnE0jX_kO0",
21
+ "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "RH33BHGT08dLinjjhsFZaSsR5CH4fKPTsb3Xj2BI3K4=",
22
+ "__NEXT_PREVIEW_MODE_ID": "c7913608ffee224d1eb581e5c6ebee6e",
23
+ "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "a6194b8f916cdb8562104d1a90163f33729e3471581bb4a5a5ea60074365cc90",
24
+ "__NEXT_PREVIEW_MODE_SIGNING_KEY": "cb22045a0e876ae3d175ade08d447aa7efe55b109b4064526d61fd222c486fee"
25
25
  }
26
26
  }
27
27
  },
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js"/><script src="/_next/static/chunks/fd9d1056-f20120f69c10766e.js" async=""></script><script src="/_next/static/chunks/2117-7e0e97ffa5867cf9.js" async=""></script><script src="/_next/static/chunks/main-app-da1df2757744a2ea.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[12846,[],\"\"]\n3:I[4707,[],\"\"]\n4:I[36423,[],\"\"]\na:I[61060,[],\"\"]\n5:{\"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\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"2bzL2j5_MmcbjxQ21egBB\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"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.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"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\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js"/><script src="/_next/static/chunks/fd9d1056-f20120f69c10766e.js" async=""></script><script src="/_next/static/chunks/2117-7e0e97ffa5867cf9.js" async=""></script><script src="/_next/static/chunks/main-app-da1df2757744a2ea.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[12846,[],\"\"]\n3:I[4707,[],\"\"]\n4:I[36423,[],\"\"]\na:I[61060,[],\"\"]\n5:{\"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\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"J23NmkaMjAJYnE0jX_kO0\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"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.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"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\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" defer=""></script><script src="/_next/static/chunks/framework-9317b1ce0f036b87.js" defer=""></script><script src="/_next/static/chunks/main-bf608235d4e99320.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9f5760457b3fbb4c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-daa80f5b4d0fe27d.js" defer=""></script><script src="/_next/static/2bzL2j5_MmcbjxQ21egBB/_buildManifest.js" defer=""></script><script src="/_next/static/2bzL2j5_MmcbjxQ21egBB/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"2bzL2j5_MmcbjxQ21egBB","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" defer=""></script><script src="/_next/static/chunks/framework-9317b1ce0f036b87.js" defer=""></script><script src="/_next/static/chunks/main-bf608235d4e99320.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9f5760457b3fbb4c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-daa80f5b4d0fe27d.js" defer=""></script><script src="/_next/static/J23NmkaMjAJYnE0jX_kO0/_buildManifest.js" defer=""></script><script src="/_next/static/J23NmkaMjAJYnE0jX_kO0/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"J23NmkaMjAJYnE0jX_kO0","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"d1O6DsDxs1k0DaxcWDA7Ha+0sn8tApbaYFBnJ7+4O0w="}
1
+ {"node":{},"edge":{},"encryptionKey":"RH33BHGT08dLinjjhsFZaSsR5CH4fKPTsb3Xj2BI3K4="}