"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{27325:function(e,s,n){n.d(s,{Z:function(){return t}});/**
 * @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 t=(0,n(60998).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},13626:function(e,s,n){n.d(s,{Z:function(){return t}});/**
 * @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 t=(0,n(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"}]])},20546:function(e,s,n){n.d(s,{H:function(){return d}});var t=n(85893);n(67294);var c=n(41664),a=n.n(c),r=n(45697),l=n.n(r);function i(e){return!!e&&"string"==typeof e&&e.toLowerCase().startsWith("sa-")}let o=()=>(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium ml-1",children:"SA"}),d=e=>{let{username:s,userHash:n,className:c="flex items-center gap-1",linkClassName:r="text-gray-700 hover:text-blue-600 hover:underline",showBadge:l=!0}=e,d=i(n),h=i(n)?"/users?tab=service-accounts":"/users";return(0,t.jsxs)("div",{className:c,children:[(0,t.jsx)(a(),{href:h,className:r,children:s}),l&&d&&(0,t.jsx)(o,{})]})};d.propTypes={username:l().string.isRequired,userHash:l().string,className:l().string,linkClassName:l().string,showBadge:l().bool}},92128:function(e,s,n){n.d(s,{Oh:function(){return m},_R:function(){return x},cV:function(){return u}});var t=n(85893),c=n(67294),a=n(91360),r=n(30803),l=n(37673),i=n(27325),o=n(470),d=n(93225),h=n(23001);function m(e){let{isOpen:s,onClose:n,cluster:d}=e,[h,m]=c.useState(!1),x=e=>{navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)},u=["sky status ".concat(d),"ssh ".concat(d)],j=u.join("\n");return(0,t.jsx)(a.Vq,{open:s,onOpenChange:n,children:(0,t.jsxs)(a.cZ,{className:"sm:max-w-md",children:[(0,t.jsxs)(a.fK,{children:[(0,t.jsxs)(a.$N,{children:["Connect to: ",(0,t.jsx)("span",{className:"font-light",children:d})]}),(0,t.jsx)(a.Be,{children:"Use these instructions to connect to your cluster via SSH."})]}),(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium mb-2",children:"SSH Command"}),(0,t.jsx)(l.Zb,{className:"p-3 bg-gray-50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("pre",{className:"text-sm w-full whitespace-pre-wrap",children:u.map((e,s)=>(0,t.jsx)("code",{className:"block",children:e},s))}),(0,t.jsx)(o.WH,{content:h?"Copied!":"Copy command",children:(0,t.jsx)(r.z,{variant:"ghost",size:"icon",onClick:()=>x(j),className:"h-8 w-8 rounded-full",children:(0,t.jsx)(i.Z,{className:"h-4 w-4"})})})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium mb-2",children:"Additional Information"}),(0,t.jsxs)("p",{className:"text-sm text-secondary-foreground",children:["Make sure to run"," ",(0,t.jsxs)("code",{className:"text-sm",children:["sky status ",d]})," first to have SkyPilot set up the SSH access."]})]})]})]})})}function x(e){let{isOpen:s,onClose:n,cluster:c}=e,m=(0,h.X)();return(0,t.jsx)(a.Vq,{open:s,onOpenChange:n,children:(0,t.jsx)(a.cZ,{className:"sm:max-w-3xl",children:(0,t.jsxs)(a.fK,{children:[(0,t.jsxs)(a.$N,{children:["Connect to: ",(0,t.jsx)("span",{className:"font-light",children:c})]}),(0,t.jsx)(a.Be,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Setup SSH access"}),(0,t.jsx)(l.Zb,{className:"p-3 bg-gray-50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("pre",{className:"text-sm",children:(0,t.jsxs)("code",{children:["sky status ",c]})}),(0,t.jsx)(o.WH,{content:"Copy command",children:(0,t.jsx)(r.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("sky status ".concat(c)),className:"h-8 w-8 rounded-full",children:(0,t.jsx)(i.Z,{className:"h-4 w-4"})})})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium mb-2 my-2",children:"Connect with VSCode/Cursor"}),(0,t.jsx)(l.Zb,{className:"p-3 bg-gray-50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("pre",{className:"text-sm",children:(0,t.jsxs)("code",{children:["code --remote ssh-remote+",c,' "/home"']})}),(0,t.jsx)(o.WH,{content:"Copy command",children:(0,t.jsx)(r.z,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText("code --remote ssh-remote+".concat(c,' "/home"')),className:"h-8 w-8 rounded-full",children:(0,t.jsx)(i.Z,{className:"h-4 w-4"})})})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:"Or use the GUI to connect"}),(0,t.jsx)("div",{className:"relative ".concat(m?"-mt-5":"-mt-10"),style:{paddingBottom:"70%"},children:(0,t.jsxs)("video",{className:"absolute top-0 left-0 w-full h-full rounded-lg",controls:!0,autoPlay:!0,muted:!0,preload:"metadata",children:[(0,t.jsx)("source",{src:"".concat(d.GW,"/videos/cursor-small.mp4"),type:"video/mp4"}),"Your browser does not support the video tag."]})})]})]})})]})})})}function u(e){let{isOpen:s,onClose:n,onConfirm:c,title:l,message:i,confirmText:o="Confirm",confirmVariant:d="destructive",confirmClassName:h=null}=e;return(0,t.jsx)(a.Vq,{open:s,onOpenChange:n,children:(0,t.jsxs)(a.cZ,{className:"sm:max-w-md",children:[(0,t.jsxs)(a.fK,{children:[(0,t.jsx)(a.$N,{children:l}),(0,t.jsx)(a.Be,{children:i})]}),(0,t.jsxs)(a.cN,{className:"flex justify-end gap-2 pt-4",children:[(0,t.jsx)(r.z,{variant:"outline",onClick:n,children:"Cancel"}),(0,t.jsx)(r.z,{variant:h?void 0:d,className:h,onClick:()=>{c(),n()},children:o})]})]})})}}}]);