PageSourceSearch

https://ai-search-intelligence-frontend.vercel.app/_next/static/chunks/9245.63cbea1e78020ae3.js

js ai-search-intelligence-frontend.vercel.app collected 2026-10-03 06:14:52 UTC 24,312 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9245],{6191:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},16757:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History")},21190:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])},25929:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M3 13h8V3H3zm0 8h8v-6H3zm10 0h8V11h-8zm0-18v6h8V3z"}),"Dashboard")},26922:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)([(0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,s.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule")},26983:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},40596:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard")},42529:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},46283:(e,t,a)=>{a.d(t,{default:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"}),"Article")},50906:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},52056:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},56154:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},57828:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},62659:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"}),"Web")},69125:(e,t,a)=>{a.r(t),a.d(t,{default:()=>N});var r=a(95155),s=a(12115),l=a(85269),i=a(72728),c=a(52056),n=a(85921),d=a(6191),o=a(42529),h=a(78874),m=a(86651),x=a(89559),y=a(26983),p=a(50906),u=a(56154);let g=(0,a(71847).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var v=a(21190),b=a(71360),j=a(70532),f=a(57828);let A="https://ai-search-intelligence-backend.vercel.app/api";function N(){let{hasPermission:e}
1=(0,i.z8)(),[t,a]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[w,L]=(0,s.useState)([]),[M,P]=(0,s.useState)(!0),[C,S]=(0,s.useState)(null),[z,E]=(0,s.useState)(""),[H,I]=(0,s.useState)(""),[K,V]=(0,s.useState)(!1),[T,D]=(0,s.useState)(null),[q,O]=(0,s.useState)(null),[_,R]=(0,s.useState)(null),[B,U]=(0,s.useState)({provider:"",name:"",apiKey:"",priority:0,rateLimitPerMin:"",rateLimitPerDay:""}),[F,J]=(0,s.useState)(!1),W=e("settings:write"),G=async()=>{P(!0),S(null);try{let e=localStorage.getItem("auth_token"),t={"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},[r,s,l]=await Promise.all([fetch("".concat(A,"/admin/api-keys"),{headers:t}),fetch("".concat(A,"/admin/api-keys/health"),{headers:t}),fetch("".concat(A,"/admin/api-keys/providers"),{headers:t})]);if(!r.ok||!s.ok||!l.ok)throw Error("Failed to fetch data");let i=await r.json(),c=await s.json(),n=await l.json();a(i.keys||[]),k(c.providers||[]),L(n.providers||[])}catch(e){S(e.message||"Failed to load API keys")}finally{P(!1)}};(0,s.useEffect)(()=>{G()},[]);let Q=t.filter(e=>{let t=e.name.toLowerCase().includes(z.toLowerCase()),a=!H||e.provider===H;return t&&a}),X=async()=>{try{let e=localStorage.getItem("auth_token"),t=!!T,a=t?"".concat(A,"/admin/api-keys/").concat(T.id):"".concat(A,"/admin/api-keys"),r={name:B.name,priority:B.priority};t?B.apiKey&&(r.apiKey=B.apiKey):(r.provider=B.provider,r.apiKey=B.apiKey),B.rateLimitPerMin&&(r.rateLimitPerMin=parseInt(B.rateLimitPerMin)),B.rateLimitPerDay&&(r.rateLimitPerDay=parseInt(B.rateLimitPerDay));let s=await fetch(a,{method:t?"PUT":"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(r)});if(!s.ok){let e=await s.json();throw Error(e.error||"Failed to save key")}V(!1),D(null),U({provider:"",name:"",apiKey:"",priority:0,rateLimitPerMin:"",rateLimitPerDay:""}),G()}catch(e){alert(e.message)}},Z=async e=>{if(confirm("Are you sure you want to delete this API key?"))try{let t=localStorage.getItem("auth_token");if(!(await fetch("".concat(A,"/admin/api-keys/").concat(e),{method:"DELETE",headers:{Authorization:"Bearer ".concat(t)}})).ok)throw Error("Failed to delete key");G()}catch(e){alert(e.message)}},$=async e=>{try{let t=localStorage.getItem("auth_token");if(!(await fetch("".concat(A,"/admin/api-keys/").concat(e.id),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({isActive:!e.isActive})})).ok)throw Error("Failed to update key");G()}catch(e){alert(e.message)}},Y=async e=>{try{let t=localStorage.getItem("auth_token");if(!(await fetch("".concat(A,"/admin/api-keys/").concat(e,"/reset"),{method:"POST",headers:{Authorization:"Bearer ".concat(t)}})).ok)throw Error("Failed to reset key");G()}catch(e){alert(e.message)}},ee=async e=>{O(e),R(null);try{var t,a;let r=localStorage.getItem("auth_token"),s=await fetch("".concat(A,"/admin/api-keys/").concat(e,"/test"),{method:"POST",headers:{Authorization:"Bearer ".concat(r)}}),l=await s.json();R({success:l.success,message:l.success?"Success! Model: ".concat(null==(t=l.result)?void 0:t.model,", Latency: ").concat(null==(a=l.result)?void 0:a.latencyMs,"ms"):l.error||"Test failed"})}catch(e){R({success:!1,message:e.message})}finally{O(null)}},et=async()=>{if(confirm("Execute queries now? This will use API credits."))try{let e=localStorage.getItem("auth_token"),t=await fetch("".concat(A,"/admin/api-keys/execute"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({maxQueries:10})}),a=await t.json();if(a.success)alert("Executed ".concat(a.result.queriesExecuted," queries, created ").concat(a.result.responsesCreated," responses")),G();else throw Error(a.error)}catch(e){alert(e.message)}},ea={CHATGPT:"bg-green-500/20 text-green-400 border-green-500/30",CLAUDE:"bg-orange-500/20 text-orange-400 border-orange-500/30",PERPLEXITY:"bg-blue-500/20 text-blue-400 border-blue-500/30",GEMINI:"bg-purple-500/20 text-purple-400 border-purple-500/30",COPILOT:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30"};return M?(0,r.jsx)(l.A,{requiredPermissions:["settings:read"],children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Keys"}),(0,r.jsx)("p",{className:"text-gray-400 mt-1",children:"Manage AI provider API keys"})]}),(0,r.jsx)("div",{className:"animate-pulse space-y-4",children:[1,2,3].map(e=>(0,r.jsx)("div",{className:"h-20 bg-gray-800 rounded-lg"},e))})]})}):C?(0,r.jsx)(l.A,{requiredPermissions:["settings:read"],children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)(c.A,{className:"w-12 h-12 text-red-400 mx-auto mb-4"}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Error Loading API Keys"}),(0,r.jsx)("p",{className:"text-gray-400 mb-4",children:C}),(0,r.jsx)("button",{onClick:G,className:"px-4 py-2 bg-amber-500 text-black rounded-lg hover:bg-amber-400",children:"Retry"})]})}):(0,r.jsx)(l.A,{requiredPermissions:["settings:read"],children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Keys"}),(0,r.jsx)("p",{className:"text-gray-400 mt-1",children:"Manage AI provider API keys with auto-rotation"})]}),(0,r.jsx)("div",{className:"flex items-center gap-3",children:W&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:et,className:"flex items-center gap-2 px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-500",children:[(0,r.jsx)(n.A,{className:"w-4 h-4"}),"Execute Queries"]}),(0,r.jsxs)("button",{onClick:()=>{D(null),U({provider:"",name:"",apiKey:"",priority:0,rateLimitPerMin:"",rateLimitPerDay:""}),V(!0)},className:"flex items-center gap-2 px-4 py-2 bg-amber-500 text-black rounded-lg hover:bg-amber-400",children:[(0,r.jsx)(d.A,{className:"w-4 h-4"}),"Add Key"]})]})})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-5 ga
1p-4",children:N.map(e=>{var t;return(0,r.jsxs)("div",{className:"p-4 rounded-lg border ".concat(e.isHealthy?"bg-gray-800/50 border-gray-700":"bg-red-900/20 border-red-500/30"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium ".concat((null==(t=ea[e.provider])?void 0:t.split(" ")[1])||"text-white"),children:e.provider}),e.isHealthy?(0,r.jsx)(o.A,{className:"w-4 h-4 text-green-400"}):(0,r.jsx)(h.A,{className:"w-4 h-4 text-red-400"})]}),(0,r.jsxs)("div",{className:"text-2xl font-bold text-white",children:[e.availableKeys,"/",e.totalKeys]}),(0,r.jsx)("div",{className:"text-xs text-gray-400",children:"keys available"})]},e.provider)})}),_&&(0,r.jsxs)("div",{className:"p-4 rounded-lg flex items-center justify-between ".concat(_.success?"bg-green-900/30 border border-green-500/30":"bg-red-900/30 border border-red-500/30"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[_.success?(0,r.jsx)(o.A,{className:"w-5 h-5 text-green-400"}):(0,r.jsx)(h.A,{className:"w-5 h-5 text-red-400"}),(0,r.jsx)("span",{className:_.success?"text-green-300":"text-red-300",children:_.message})]}),(0,r.jsx)("button",{onClick:()=>R(null),className:"text-gray-400 hover:text-white",children:"\xd7"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,r.jsx)(m.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,r.jsx)("input",{type:"text",placeholder:"Search keys...",value:z,onChange:e=>E(e.target.value),className:"w-full pl-10 pr-4 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-amber-500"})]}),(0,r.jsxs)("select",{value:H,onChange:e=>I(e.target.value),className:"px-4 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-amber-500",children:[(0,r.jsx)("option",{value:"",children:"All Providers"}),w.map(e=>(0,r.jsx)("option",{value:e.name,children:e.name},e.name))]}),(0,r.jsx)("button",{onClick:G,className:"p-2 bg-gray-800 border border-gray-700 rounded-lg text-gray-400 hover:text-white hover:bg-gray-700",children:(0,r.jsx)(x.A,{className:"w-4 h-4"})})]}),(0,r.jsx)("div",{className:"bg-gray-800/50 rounded-lg border border-gray-700 overflow-hidden",children:(0,r.jsxs)("table",{className:"w-full",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-700",children:[(0,r.jsx)("th",{className:"text-left px-4 py-3 text-sm font-medium text-gray-400",children:"Provider"}),(0,r.jsx)("th",{className:"text-left px-4 py-3 text-sm font-medium text-gray-400",children:"Name"}),(0,r.jsx)("th",{className:"text-left px-4 py-3 text-sm font-medium text-gray-400",children:"Status"}),(0,r.jsx)("th",{className:"text-left px-4 py-3 text-sm font-medium text-gray-400",children:"Usage"}),(0,r.jsx)("th",{className:"text-left px-4 py-3 text-sm font-medium text-gray-400",children:"Rate Limit"}),(0,r.jsx)("th",{className:"text-left px-4 py-3 text-sm font-medium text-gray-400",children:"Last Used"}),(0,r.jsx)("th",{className:"text-right px-4 py-3 text-sm font-medium text-gray-400",children:"Actions"})]})}),(0,r.jsx)("tbody",{children:0===Q.length?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:7,className:"px-4 py-8 text-center text-gray-400",children:"No API keys found. Add one to get started."})}):Q.map(e=>(0,r.jsxs)("tr",{className:"border-b border-gray-700/50 hover:bg-gray-800/30",children:[(0,r.jsx)("td",{className:"px-4 py-3",children:(0,r.jsx)("span",{className:"px-2 py-1 text-xs font-medium rounded border ".concat(ea[e.provider]||"bg-gray-500/20 text-gray-400 border-gray-500/30"),children:e.provider})}),(0,r.jsxs)("td",{className:"px-4 py-3",children:[(0,r.jsx)("div",{className:"text-white font-medium",children:e.name}),(0,r.jsxs)("div",{className:"text-xs text-gray-400",children:["Priority: ",e.priority]})]}),(0,r.jsxs)("td",{className:"px-4 py-3",children:[(0,r.jsx)("div",{className:"flex items-center gap-2",children:e.isActive?e.isAvailable?(0,r.jsxs)("span",{className:"flex items-center gap-1 text-green-400 text-sm",children:[(0,r.jsx)(o.A,{className:"w-4 h-4"})," Available"]}):e.cooldownUntil?(0,r.jsxs)("span",{className:"flex items-center gap-1 text-yellow-400 text-sm",children:[(0,r.jsx)(y.A,{className:"w-4 h-4"})," Cooldown"]}):(0,r.jsxs)("span",{className:"flex items-center gap-1 text-red-400 text-sm",children:[(0,r.jsx)(c.A,{className:"w-4 h-4"})," Errors: ",e.consecutiveErrors]}):(0,r.jsxs)("span",{className:"flex items-center gap-1 text-gray-400 text-sm",children:[(0,r.jsx)(h.A,{className:"w-4 h-4"})," Disabled"]})}),e.lastError&&(0,r.jsx)("div",{className:"text-xs text-red-400 mt-1 truncate max-w-[200px]",title:e.lastError,children:e.lastError})]}),(0,r.jsx)("td",{className:"px-4 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-1 text-white",children:[(0,r.jsx)(p.A,{className:"w-4 h-4 text-gray-400"}
1),e.usageCount.toLocaleString()]})}),(0,r.jsxs)("td",{className:"px-4 py-3 text-gray-300 text-sm",children:[e.rateLimitPerMin||"—","/min"]}),(0,r.jsx)("td",{className:"px-4 py-3 text-gray-400 text-sm",children:e.lastUsedAt?new Date(e.lastUsedAt).toLocaleDateString():"Never"}),(0,r.jsx)("td",{className:"px-4 py-3",children:(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,r.jsx)("button",{onClick:()=>ee(e.id),disabled:q===e.id,className:"p-1.5 text-gray-400 hover:text-green-400 hover:bg-green-400/10 rounded disabled:opacity-50",title:"Test key",children:q===e.id?(0,r.jsx)(x.A,{className:"w-4 h-4 animate-spin"}):(0,r.jsx)(u.A,{className:"w-4 h-4"})}),e.consecutiveErrors>0&&(0,r.jsx)("button",{onClick:()=>Y(e.id),className:"p-1.5 text-gray-400 hover:text-yellow-400 hover:bg-yellow-400/10 rounded",title:"Reset errors",children:(0,r.jsx)(g,{className:"w-4 h-4"})}),W&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>$(e),className:"p-1.5 rounded ".concat(e.isActive?"text-gray-400 hover:text-red-400 hover:bg-red-400/10":"text-gray-400 hover:text-green-400 hover:bg-green-400/10"),title:e.isActive?"Disable":"Enable",children:e.isActive?(0,r.jsx)(h.A,{className:"w-4 h-4"}):(0,r.jsx)(o.A,{className:"w-4 h-4"})}),(0,r.jsx)("button",{onClick:()=>{var t,a;D(e),U({provider:e.provider,name:e.name,apiKey:"",priority:e.priority,rateLimitPerMin:(null==(t=e.rateLimitPerMin)?void 0:t.toString())||"",rateLimitPerDay:(null==(a=e.rateLimitPerDay)?void 0:a.toString())||""}),V(!0)},className:"p-1.5 text-gray-400 hover:text-amber-400 hover:bg-amber-400/10 rounded",title:"Edit",children:(0,r.jsx)(v.A,{className:"w-4 h-4"})}),(0,r.jsx)("button",{onClick:()=>Z(e.id),className:"p-1.5 text-gray-400 hover:text-red-400 hover:bg-red-400/10 rounded",title:"Delete",children:(0,r.jsx)(b.A,{className:"w-4 h-4"})})]})]})})]},e.id))})]})}),K&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",children:(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-700 rounded-xl p-6 w-full max-w-md",children:[(0,r.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:T?"Edit API Key":"Add API Key"}),(0,r.jsxs)("div",{className:"space-y-4",children:[!T&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Provider"}),(0,r.jsxs)("select",{value:B.provider,onChange:e=>U({...B,provider:e.target.value}),className:"w-full px-3 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-amber-500",children:[(0,r.jsx)("option",{value:"",children:"Select provider"}),w.map(e=>(0,r.jsxs)("option",{value:e.name,children:[e.name," (default: ",e.rateLimitPerMin,"/min)"]},e.name))]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Name"}),(0,r.jsx)("input",{type:"text",value:B.name,onChange:e=>U({...B,name:e.target.value}),placeholder:"e.g., OpenAI Key 1",className:"w-full px-3 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:["API Key ",T&&"(leave blank to keep current)"]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:F?"text":"password",value:B.apiKey,onChange:e=>U({...B,apiKey:e.target.value}),placeholder:"sk-...",className:"w-full px-3 py-2 pr-10 bg-gray-800 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500"}),(0,r.jsx)("button",{type:"button",onClick:()=>J(!F),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-white",children:F?(0,r.jsx)(j.A,{className:"w-4 h-4"}):(0,r.jsx)(f.A,{className:"w-4 h-4"})})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Priority"}),(0,r.jsx)("input",{type:"number",value:B.priority,onChange:e=>U({...B,priority:parseInt(e.target.value)||0}),className:"w-full px-3 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-amber-500"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-400 mb-1",children:"Rate Limit/Min"}),(0,r.jsx)("input",{type:"number",value:B.rateLimitPerMin,onChange:e=>U({...B,rateLimitPerMin:e.target.value}),placeholder:"Default",className:"w-full px-3 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-amber-500"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-3 mt-6",children:[(0,r.jsx)("button",{onClick:()=>{V(!1),D(null)},className:"px-4 py-2 text-gray-400 hover:text-white",children:"Cancel"}),(0,r.jsxs)("button",{onClick:X,disabled:!B.name||!T&&(!B.provider||!B.apiKey),className:"px-4 py-2 bg-amber-500 text-black rounded-lg hover:bg-amber-400 disabled:opacity-50 disabled:cursor-not-allowed",children:[T?"Update":"Add"," Ke
1y"]})]})]})})]})})}},70262:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5z"}),"Shield")},70532:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},71360:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("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"}]])},71847:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(12115);let s=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:a="currentColor",size:i=24,strokeWidth:c=2,absoluteStrokeWidth:n,className:d="",children:o,iconNode:h,...m}=e;return(0,r.createElement)("svg",{ref:t,...l,width:i,height:i,stroke:a,strokeWidth:n?24*Number(c)/Number(i):c,className:s("lucide",d),...m},[...h.map(e=>{let[t,a]=e;return(0,r.createElement)(t,a)}),...Array.isArray(o)?o:[o]])}),c=(e,t)=>{let a=(0,r.forwardRef)((a,l)=>{let{className:c,...n}=a;return(0,r.createElement)(i,{ref:l,iconNode:t,className:s("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),c),...n})});return a.displayName="".concat(e),a}},72308:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image")},78784:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People")},78874:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},82021:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-5 12H9v-2h6zm5-7H4V4l16-.02z"}),"Inventory")},85921:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},86651:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},89559:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(71847).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},90426:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key")},91393:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(15485),s=a(95155);let l=(0,r.A)((0,s.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt")}}]);

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.