"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83],{16826:function(e,r,t){t.d(r,{Z:function(){return n}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let n=(0,t(60998).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},88507:function(e,r,t){t.d(r,{Z:function(){return n}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let n=(0,t(60998).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},13626:function(e,r,t){t.d(r,{Z:function(){return n}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let n=(0,t(60998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},28586:function(e,r,t){t.d(r,{Z:function(){return n}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let n=(0,t(60998).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},99307:function(e,r,t){t.d(r,{Cl:function(){return u},OE:function(){return o}});var n=t(85893);t(67294);var s=t(55739),c=t(470),a=t(53850);let u=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":case"IN_USE":case"READY":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":case"PENDING":case"UNKNOWN":default:return"bg-gray-100 text-gray-800";case"SUCCEEDED":case"PROVISIONING":case"CONTROLLER_INIT":case"REPLICA_INIT":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":case"FAILED_INITIAL_DELAY":case"FAILED_PROBING":case"FAILED_PROVISION":case"FAILED_CLEANUP":case"CONTROLLER_FAILED":return"bg-red-50 text-red-700";case"CANCELLED":case"CANCELLING":case"NOT_READY":return"bg-yellow-50 text-yellow-700";case"RECOVERING":case"SHUTTING_DOWN":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700";case"PREEMPTED":case"NO_REPLICA":return"bg-purple-50 text-purple-700"}},l=e=>{switch(e){case"LAUNCHING":case"STARTING":case"PROVISIONING":case"SHUTTING_DOWN":return(0,n.jsx)(s.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":case"IN_USE":default:return(0,n.jsx)(a.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":case"PREEMPTED":return(0,n.jsx)(a.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":case"FAILED_INITIAL_DELAY":case"FAILED_PROBING":case"FAILED_PROVISION":case"FAILED_CLEANUP":case"CONTROLLER_FAILED":case"UNKNOWN":return(0,n.jsx)(a.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,n.jsx)(a.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":case"READY":case"NOT_READY":case"CONTROLLER_INIT":case"REPLICA_INIT":case"NO_REPLICA":return(0,n.jsx)(a.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let r=u(e),t=l(e);return(0,n.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(r),children:[t,e]})},o=e=>{let{status:r,statusTooltip:t}=e,s=t||r;return(0,n.jsx)(c.WH,{content:s,className:"text-muted-foreground text-sm",children:(0,n.jsx)("span",{children:i(r)})})}},20546:function(e,r,t){t.d(r,{H:function(){return o}});var n=t(85893);t(67294);var s=t(41664),c=t.n(s),a=t(45697),u=t.n(a);function l(e){return!!e&&"string"==typeof e&&e.toLowerCase().startsWith("sa-")}let i=()=>(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium ml-1",children:"SA"}),o=e=>{let{username:r,userHash:t,className:s="flex items-center gap-1",linkClassName:a="text-gray-700 hover:text-blue-600 hover:underline",showBadge:u=!0}=e,o=l(t),d=l(t)?"/users?tab=service-accounts":"/users";return(0,n.jsxs)("div",{className:s,children:[(0,n.jsx)(c(),{href:d,className:a,children:r}),u&&o&&(0,n.jsx)(i,{})]})};o.propTypes={username:u().string.isRequired,userHash:u().string,className:u().string,linkClassName:u().string,showBadge:u().bool}},37673:function(e,r,t){t.d(r,{Ol:function(){return i},Zb:function(){return l},aY:function(){return N},ll:function(){return o}});var n=t(85893),s=t(67294),c=t(45697),a=t.n(c),u=t(46990);let l=s.forwardRef((e,r)=>{let{className:t,children:s,...c}=e;return(0,n.jsx)("div",{ref:r,className:(0,u.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...c,children:s})});l.displayName="Card",l.propTypes={className:a().string,children:a().node};let i=s.forwardRef((e,r)=>{let{className:t,children:s,...c}=e;return(0,n.jsx)("div",{ref:r,className:(0,u.cn)("flex flex-col space-y-1.5 p-6",t),...c,children:s})});i.displayName="CardHeader",i.propTypes={className:a().string,children:a().node};let o=s.forwardRef((e,r)=>{let{className:t,children:s,...c}=e;return(0,n.jsx)("h3",{ref:r,className:(0,u.cn)("text-2xl font-semibold leading-none tracking-tight",t),...c,children:s})});o.displayName="CardTitle",o.propTypes={className:a().string,children:a().node};let d=s.forwardRef((e,r)=>{let{className:t,children:s,...c}=e;return(0,n.jsx)("p",{ref:r,className:(0,u.cn)("text-sm text-muted-foreground",t),...c,children:s})});d.displayName="CardDescription",d.propTypes={className:a().string,children:a().node};let N=s.forwardRef((e,r)=>{let{className:t,children:s,...c}=e;return(0,n.jsx)("div",{ref:r,className:(0,u.cn)("p-6 pt-0",t),...c,children:s})});N.displayName="CardContent",N.propTypes={className:a().string,children:a().node};let E=s.forwardRef((e,r)=>{let{className:t,children:s,...c}=e;return(0,n.jsx)("div",{ref:r,className:(0,u.cn)("flex items-center p-6 pt-0",t),...c,children:s})});E.displayName="CardFooter",E.propTypes={className:a().string,children:a().node}},21494:function(e,r,t){t.d(r,{V:function(){return c}});var n=t(67294),s=t(470);function c(e){let{streamFn:r,streamArgs:t,enabled:c=!0,refreshTrigger:a=0,maxLineChars:u=2e3,maxRenderLines:l=5e3,flushIntervalMs:i=100,onError:o=e=>{}}=e,[d,N]=(0,n.useState)([]),[E,f]=(0,n.useState)(!1),[p,I]=(0,n.useState)(!1),[h,g]=(0,n.useState)(0),m=(0,n.useRef)([]),R=(0,n.useRef)(""),L=(0,n.useRef)(new Map),x=(0,n.useRef)(null),C=(0,n.useRef)(null),A=(0,n.useRef)(!1),D=(0,n.useRef)(o);(0,n.useEffect)(()=>{D.current=o},[o]);let T=(0,n.useCallback)(()=>{m.current=[],R.current="",L.current=new Map,A.current=!1,N([]),I(!1)},[]),y=(0,n.useMemo)(()=>[...d,...Array.from(L.current.values())],[d,h]),O=(0,n.useCallback)(()=>{0!==m.current.length&&N(e=>{let r=[...e,...m.current];return m.current=[],r.length>l?r.slice(r.length-l):r})},[l]);return(0,n.useEffect)(()=>{let e=!0;if(T(),!c||!r)return f(!1),()=>{};let n=new AbortController;C.current=n;let a=()=>{x.current||(x.current=setTimeout(()=>{x.current=null,O()},i))},o=e=>{let r=e.match(/^\(([^)]+)\)/);if(r){L.current.set(r[1],e),g(e=>e+1);return}m.current.push(e),m.current.length>2*l&&(m.current=m.current.slice(m.current.length-l))},d=e=>{let r=e.split("\n");r[0]=R.current+r[0];let t=e.endsWith("\n");R.current=t?"":r.pop()||"";let n=r.filter(e=>e.trim());for(let e of(!A.current&&n.length>0&&(A.current=!0,I(!0)),n)){let r=(0,s.Zn)(e);!(0,s.Zt)(r)&&(r.length>u&&(r=r.slice(0,u)+" … [truncated]"),/\d+%\s*\|/.test(r)?o(r):(m.current.push(r),m.current.length>2*l&&(m.current=m.current.slice(m.current.length-l))))}a()};return f(!0),r({...t,onNewLog:r=>{e&&d(r)},signal:n.signal}).then(()=>{e&&(R.current&&(m.current.push(R.current),R.current=""),O(),f(!1))}).catch(r=>{if(!e||"AbortError"===r.name)return;let t=D.current;t&&t(r),N(e=>[...e,"Error fetching logs: ".concat(r.message)]),f(!1)}),()=>{e=!1,x.current&&(clearTimeout(x.current),x.current=null),C.current&&(C.current.abort(),C.current=null),m.current=[],R.current="",L.current.clear()}},[r,t,c,a,O,i,u,l,T]),{lines:y,isLoading:E,hasReceivedFirstChunk:p}}},23001:function(e,r,t){t.d(r,{X:function(){return s}});var n=t(67294);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[r,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let r=()=>{t(window.innerWidth<e)};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e]),r}}}]);