1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31747],{6323:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(95155),l=a(59434),n=a(3131),s=a(83347),o=a(12115),d=a(755),i=a(72711);function c(e){let{children:t,onClick:a,className:c,lightMode:m=!0,loading:x=!1,disabled:b=!1,outlined:h=!1,leftSection:g,variant:u="default",size:v="md",styles:f,...p}=e;(0,n.useMantineTheme)();let{theme:w}=(0,i.Q)(),j="dark"===w;(0,o.useEffect)(()=>{let e=document.createElement("style");return e.textContent="\n @keyframes border-glow {\n 0% {\n border-color: transparent;\n box-shadow: 0 0 0 0 var(--glow-color);\n }\n 25% {\n border-color: var(--glow-color);\n box-shadow: 0 0 15px 5px var(--glow-trail);\n }\n 50% {\n border-color: transparent;\n box-shadow: 0 0 0 0 var(--glow-color);\n }\n 75% {\n border-color: var(--glow-color);\n box-shadow: 0 0 15px 5px var(--glow-trail);\n }\n 100% {\n border-color: transparent;\n box-shadow: 0 0 0 0 var(--glow-color);\n }\n }\n\n .animate-border-glow {\n animation: border-glow 2s linear infinite;\n }\n ",document.head.appendChild(e),()=>{document.head.removeChild(e)}},[]);let y={default:(0,l.cn)("text-[#252525] !bg-white",{"invert hover:invert-0":h},{"text-white !bg-[#252525] !font-thin":j?!m:m},{"!bg-dark-primary cursor-default hover:invert-0 text-white/60":b}),gradient:"bg-gradient-to-r from-[#52FFBA] via-[#23FAEC] to-[#00AAFF] text-black rounded-full text-center"};return(0,r.jsxs)("button",{...p,disabled:b||x,className:(0,l.cn)("relative flex items-center justify-center gap-2 w-full ".concat({sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"}[v]," rounded-full transition-all duration-200 hover:scale-[1.02] hover:opacity-90 ").concat(y[u]," ").concat(c," overflow-hidden"),{"!text-transparent cursor-not-allowed":x}),onClick:a,style:null==f?void 0:f.root,children:["gradient"===u&&(0,r.jsx)("div",{className:"absolute inset-0 border-2 border-transparent rounded-full animate-border-glow",style:{"--glow-color":j?"rgba(255, 255, 255, 0.8)":"rgba(0, 0, 0, 0.8)","--glow-trail":j?"rgba(255, 255, 255, 0.4)":"rgba(0, 0, 0, 0.4)"}}),x&&(0,r.jsx)("div",{className:"absolute w-full -ml-5 flex justify-center",children:(0,r.jsx)(s.Loader,{size:20,bg:"transparent",color:"white"})}),"gradient"===u&&!g&&(0,r.jsx)(d.A,{size:16}),g,(0,r.jsx)("div",{className:j?"!text-black":"",children:t})]})}},31747:(e,t,a)=>{a.r(t),a.d(t,{CreateAgentModal:()=>p});var r=a(95155),l=a(8593),n=a(46132),s=a(755),o=a(12115),d=a(68974),i=a(50351),c=a(59434),m=a(23843),x=a(51624),b=a(62177),h=a(71153),g=a(48778),u=a(6323),v=a(16035);let f=h.z.object({name:h.z.string().min(1,{message:"Name is required."})}),p=e=>{let{isOpen:t,onClose:a}=e,[h,p]=(0,o.useState)(""),[w,j]=(0,o.useState)(!1),{mutate:y}=(0,v.NS)(),{mutate:N}=(0,d.iX)(),{register:k,control:C,watch:A,handleSubmit:E,formState:{errors:S,isSubmitting:M,isDirty:T,isValid:z}}=(0,b.mN)({resolver:(0,g.u)(f),defaultValues:{name:""}}),F=async e=>{try{j(!0),await fetch("/agent/api",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({personaAction:x.bP.CREATE_AGENT,personaName:e.name})}),await Promise.all([N("agents"),N("template agents")]),(0,c.P0)(m.lm.SUCCESS,"".concat(e.name," successfully created")),p("")}catch(e){console.error("error is ",e)}finally{j(!1),a()}};return(0,r.jsx)(i.default,{opened:t,onClose:a,title:"",centered:!0,size:"lg",children:(0,r.jsxs)("form",{className:"px-10",onSubmit:E(F),children:[(0,r.jsx)("div",{className:"pb-2 text-3xl text-black dark:text-white",children:"Blank Agent"}),(0,r.jsx)("div",{className:"pb-10 text-md opacity-60 text-black dark:text-white",children:"Create your AI Agent from scratch."}),(0,r.jsxs)("div",{children:[S.name&&(0,r.jsx)("div",{className:"text-red-500 text-[14px]",children:S.name.message}),(0,r.jsx)(l.TextInput,{label:"",...k("name",{required:!0}),rightSection:(0,r.jsx)(n.A,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),(0,r.jsx)("div",{className:"w-full flex justify-end my-10",children:(0,r.jsxs)(u.A,{type:"submit",loading:w,disabled:w,className:"w-full flex flex-row justify-center items-center gap-2",children:[(0,r.jsx)(s.A,{size:16}),"CREATE AN AGENT"]})})]})})}},50351:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var r=a(95155),l=a(3131),n=a(63617),s=a(49077);a(12115);var o=a(72711),d=a(59434);let i=e=>{let{children:t,className:a="",opened:i,onClose:c,title:m="",size:x,withCloseButton:b=!0,...h}=e;(0,l.useMantineTheme)();let{theme:g}=(0,o.Q)(),u="dark"===g,{withCloseButton:v,...f}=h;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(n.Modal.Root,{opened:i,onClose:c,className:"".concat(a),size:x,...f,children:[(0,r.jsx)(n.Modal.Overlay,{className:"backdrop-blur-sm bg-black/50"}),(0,r.jsx)(n.Modal.Content,{className:"content py-0 !bg-transparent text-[var(--theme-text)] !overflow-visible",children:(0,r.jsxs)("div",{className:(0,d.cn)("bg-[var(--theme-bg)] rounded-2xl border border-[var(--theme-border)] shadow-2xl","backdrop-blur-md",u?"shadow-black/20":"shadow-gray-900/10"),
1children:[m&&(0,r.jsxs)(n.Modal.Header,{className:"relative !flex !items-start bg-[var(--theme-bg)] rounded-t-2xl",style:{overflow:"visible"},children:[(0,r.jsx)("div",{className:"bg-[var(--theme-bg)] p-1.5 shadow-lg rounded-full absolute left-4 -top-5 z-[10000] border border-[var(--theme-border)]",style:{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(s.Image,{src:u?"/images/identica-white.svg":"/images/identica-black.svg",alt:"Identica logo",className:"bg-[var(--theme-bg)] !w-[20px]"})}),(0,r.jsx)(n.Modal.Title,{className:"!pt-8 !text-xl text-[var(--theme-text)] font-semibold",children:m}),b&&(0,r.jsx)(n.Modal.CloseButton,{className:(0,d.cn)("text-[var(--theme-text)] hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","w-8 h-8 flex items-center justify-center")})]}),(0,r.jsx)(n.Modal.Body,{className:(0,d.cn)("pt-0",m?"pt-3":"pt-0"),children:t})]})})]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.