chore: rebuild ui

This commit is contained in:
Julian Sommer
2026-06-05 14:12:47 +10:00
parent 92d76b5bce
commit 0ee9b46e38
106 changed files with 149 additions and 170 deletions
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{V as s,Yo as c,es as l,fo as u,po as d,qo as f,uo as p,vo as m,y as h}from"./index.js";var g=f(),_=l();function v(){let l=(0,g.c)(24),{bucket:f,_splat:v}=h.useParams(),y=u(v??``),{data:b}=t(s(f,y)),x=o(),S;l[0]===b.Contents?S=l[1]:(S=b.Contents??[],l[0]=b.Contents,l[1]=S);let C=S,w;l[2]===b.CommonPrefixes?w=l[3]:(w=b.CommonPrefixes??[],l[2]=b.CommonPrefixes,l[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:f,path:`/s3/ls/${f}`},...E.map((e,t)=>({name:e,path:`/s3/ls/${f}/${`${E.slice(0,t+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${f}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${f}`,k;l[4]===O?k=l[5]:(k=(0,_.jsx)(n,{to:O,children:`Back`}),l[4]=O,l[5]=k);let A;l[6]!==f||l[7]!==y||l[8]!==x.isPending||l[9]!==x.mutateAsync?(A=(0,_.jsx)(a,{bucket:f,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),l[6]=f,l[7]=y,l[8]=x.isPending,l[9]=x.mutateAsync,l[10]=A):A=l[10];let j;l[11]===x.error?j=l[12]:(j=x.error&&(0,_.jsx)(e,{error:x.error,msg:`Failed to upload object`}),l[11]=x.error,l[12]=j);let M;l[13]!==f||l[14]!==T||l[15]!==y?(M=T.length>0&&(0,_.jsxs)(`div`,{className:`mb-6`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,_.jsx)(`div`,{className:`space-y-2`,children:T.map(e=>e.Prefix?(0,_.jsx)(i,{bucketName:f,folderName:m(d(e.Prefix,y)),fullPrefix:p(e.Prefix,y)},e.Prefix):null)})]}),l[13]=f,l[14]=T,l[15]=y,l[16]=M):M=l[16];let N;l[17]!==f||l[18]!==C||l[19]!==y?(N=C.length>0&&(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),C.map(e=>e.Key?(0,_.jsx)(r,{bucketName:f,displayName:d(e.Key,y),fullKey:p(e.Key,y),object:e},e.Key):null)]}),l[17]=f,l[18]=C,l[19]=y,l[20]=N):N=l[20];let P;return l[21]!==T.length||l[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),l[21]=T.length,l[22]=C.length,l[23]=P):P=l[23],(0,_.jsxs)(_.Fragment,{children:[k,(0,_.jsx)(`div`,{className:`mb-6`,children:(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:D.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t>0&&(0,_.jsx)(`span`,{children:`/`}),t===D.length-1?(0,_.jsx)(`span`,{className:`text-foreground`,children:e.name}):(0,_.jsx)(c,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{Fo as s,Ho as c,Lo as l,Qa as u,eo as d,oo as f,to as p,y as m,z as h}from"./index.js";var g=s(),_=c();function v(){let s=(0,g.c)(24),{bucket:c,_splat:v}=m.useParams(),y=d(v??``),{data:b}=t(h(c,y)),x=o(),S;s[0]===b.Contents?S=s[1]:(S=b.Contents??[],s[0]=b.Contents,s[1]=S);let C=S,w;s[2]===b.CommonPrefixes?w=s[3]:(w=b.CommonPrefixes??[],s[2]=b.CommonPrefixes,s[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:c,path:`/s3/ls/${c}`},...E.map((e,t)=>({name:e,path:`/s3/ls/${c}/${`${E.slice(0,t+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${c}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${c}`,k;s[4]===O?k=s[5]:(k=(0,_.jsx)(n,{to:O,children:`Back`}),s[4]=O,s[5]=k);let A;s[6]!==c||s[7]!==y||s[8]!==x.isPending||s[9]!==x.mutateAsync?(A=(0,_.jsx)(a,{bucket:c,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),s[6]=c,s[7]=y,s[8]=x.isPending,s[9]=x.mutateAsync,s[10]=A):A=s[10];let j;s[11]===x.error?j=s[12]:(j=x.error&&(0,_.jsx)(e,{error:x.error,msg:`Failed to upload object`}),s[11]=x.error,s[12]=j);let M;s[13]!==c||s[14]!==T||s[15]!==y?(M=T.length>0&&(0,_.jsxs)(`div`,{className:`mb-6`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,_.jsx)(`div`,{className:`space-y-2`,children:T.map(e=>e.Prefix?(0,_.jsx)(i,{bucketName:c,folderName:f(p(e.Prefix,y)),fullPrefix:u(e.Prefix,y)},e.Prefix):null)})]}),s[13]=c,s[14]=T,s[15]=y,s[16]=M):M=s[16];let N;s[17]!==c||s[18]!==C||s[19]!==y?(N=C.length>0&&(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),C.map(e=>e.Key?(0,_.jsx)(r,{bucketName:c,displayName:p(e.Key,y),fullKey:u(e.Key,y),object:e},e.Key):null)]}),s[17]=c,s[18]=C,s[19]=y,s[20]=N):N=s[20];let P;return s[21]!==T.length||s[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),s[21]=T.length,s[22]=C.length,s[23]=P):P=s[23],(0,_.jsxs)(_.Fragment,{children:[k,(0,_.jsx)(`div`,{className:`mb-6`,children:(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:D.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t>0&&(0,_.jsx)(`span`,{children:`/`}),t===D.length-1?(0,_.jsx)(`span`,{className:`text-foreground`,children:e.name}):(0,_.jsx)(l,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{D as s,V as c,es as l,qo as u,vo as d}from"./index.js";import{t as f}from"./page-heading.js";var p=u(),m=l();function h(){let l=(0,p.c)(31),{bucket:u}=s.useParams(),h;l[0]===u?h=l[1]:(h=c(u),l[0]=u,l[1]=h);let{data:g}=t(h),_=o(),v;l[2]===g.Contents?v=l[3]:(v=g.Contents??[],l[2]=g.Contents,l[3]=v);let y=v,b;l[4]===g.CommonPrefixes?b=l[5]:(b=g.CommonPrefixes??[],l[4]=g.CommonPrefixes,l[5]=b);let x=b,S;l[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(n,{to:`/s3/ls`,children:`Back to buckets`}),l[6]=S):S=l[6];let C;l[7]!==u||l[8]!==_.isPending||l[9]!==_.mutateAsync?(C=(0,m.jsx)(a,{bucket:u,isPending:_.isPending,onUpload:_.mutateAsync}),l[7]=u,l[8]=_.isPending,l[9]=_.mutateAsync,l[10]=C):C=l[10];let w;l[11]!==u||l[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:u}),l[11]=u,l[12]=C,l[13]=w):w=l[13];let T;l[14]===_.error?T=l[15]:(T=_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to upload object`}),l[14]=_.error,l[15]=T);let E;l[16]!==u||l[17]!==x?(E=x.length>0&&(0,m.jsxs)(`div`,{className:`mb-6`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,m.jsx)(`div`,{className:`space-y-2`,children:x.map(e=>e.Prefix?(0,m.jsx)(i,{bucketName:u,folderName:d(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),l[16]=u,l[17]=x,l[18]=E):E=l[18];let D;l[19]!==u||l[20]!==y?(D=y.length>0&&(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),y.map(e=>e.Key?(0,m.jsx)(r,{bucketName:u,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),l[19]=u,l[20]=y,l[21]=D):D=l[21];let O;l[22]!==x.length||l[23]!==y.length?(O=y.length===0&&x.length===0&&(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this bucket.`}),l[22]=x.length,l[23]=y.length,l[24]=O):O=l[24];let k;return l[25]!==w||l[26]!==T||l[27]!==E||l[28]!==D||l[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),l[25]=w,l[26]=T,l[27]=E,l[28]=D,l[29]=O,l[30]=k):k=l[30],k}export{h as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{D as s,Fo as c,Ho as l,oo as u,z as d}from"./index.js";import{t as f}from"./page-heading.js";var p=c(),m=l();function h(){let c=(0,p.c)(31),{bucket:l}=s.useParams(),h;c[0]===l?h=c[1]:(h=d(l),c[0]=l,c[1]=h);let{data:g}=t(h),_=o(),v;c[2]===g.Contents?v=c[3]:(v=g.Contents??[],c[2]=g.Contents,c[3]=v);let y=v,b;c[4]===g.CommonPrefixes?b=c[5]:(b=g.CommonPrefixes??[],c[4]=g.CommonPrefixes,c[5]=b);let x=b,S;c[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(n,{to:`/s3/ls`,children:`Back to buckets`}),c[6]=S):S=c[6];let C;c[7]!==l||c[8]!==_.isPending||c[9]!==_.mutateAsync?(C=(0,m.jsx)(a,{bucket:l,isPending:_.isPending,onUpload:_.mutateAsync}),c[7]=l,c[8]=_.isPending,c[9]=_.mutateAsync,c[10]=C):C=c[10];let w;c[11]!==l||c[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:l}),c[11]=l,c[12]=C,c[13]=w):w=c[13];let T;c[14]===_.error?T=c[15]:(T=_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to upload object`}),c[14]=_.error,c[15]=T);let E;c[16]!==l||c[17]!==x?(E=x.length>0&&(0,m.jsxs)(`div`,{className:`mb-6`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,m.jsx)(`div`,{className:`space-y-2`,children:x.map(e=>e.Prefix?(0,m.jsx)(i,{bucketName:l,folderName:u(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),c[16]=l,c[17]=x,c[18]=E):E=c[18];let D;c[19]!==l||c[20]!==y?(D=y.length>0&&(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),y.map(e=>e.Key?(0,m.jsx)(r,{bucketName:l,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),c[19]=l,c[20]=y,c[21]=D):D=c[21];let O;c[22]!==x.length||c[23]!==y.length?(O=y.length===0&&x.length===0&&(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this bucket.`}),c[22]=x.length,c[23]=y.length,c[24]=O):O=c[24];let k;return c[25]!==w||c[26]!==T||c[27]!==E||c[28]!==D||c[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),c[25]=w,c[26]=T,c[27]=E,c[28]=D,c[29]=O,c[30]=k):k=c[30],k}export{h as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as c}from"./trash-2.js";import{I as l,U as u,n as d}from"./ec2.js";import{U as f,X as p,Xo as m,_o as h,bs as g,co as _,es as v,t as y,ts as b}from"./index.js";import{t as x}from"./page-heading.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=g(b()),E=v();function D(){let{id:g}=y.useParams(),v=m(),{data:b}=t(f(g)),{data:D}=t(p),O=d(),k=l(),A=u(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),F=b.Addresses?.[0],I=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],L=async()=>{try{await A.mutateAsync(g),v({to:`/ec2/describe-addresses`})}finally{M(!1)}},R=async()=>{N&&await O.mutateAsync({allocationId:g,instanceId:N})},z=async()=>{F?.AssociationId&&await k.mutateAsync(F.AssociationId)};if(!F?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(n,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let B=!!F.AssociationId,V=h(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(n,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(e,{error:A.error??O.error??k.error??void 0,msg:`Elastic IP action failed`}),(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(x,{actions:(0,E.jsxs)(_,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(c,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:V?`${F.AllocationId} (${V})`:F.AllocationId}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Elastic IP Information`}),(0,E.jsxs)(C.Content,{children:[(0,E.jsx)(w,{label:`Allocation ID`,value:F.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:F.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:F.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:F.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:F.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:F.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:B?(0,E.jsx)(_,{disabled:k.isPending,onClick:z,size:`sm`,variant:`outline`,children:`Disassociate`}):(0,E.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,E.jsx)(`div`,{className:`flex-1`,children:(0,E.jsxs)(s,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(o,{className:`w-full`,children:(0,E.jsx)(r,{placeholder:`Select an instance`})}),(0,E.jsx)(a,{children:I.map(e=>{let t=h(e.Tags);return(0,E.jsx)(i,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(_,{disabled:!N||O.isPending,onClick:R,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${F.AllocationId}" (${F.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:L,onOpenChange:M,open:j,title:`Release Elastic IP`})]})}export{D as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as c}from"./trash-2.js";import{I as l,U as u,n as d}from"./ec2.js";import{Ho as f,J as p,Ro as m,Uo as h,V as g,Xa as _,ao as v,cs as y,t as b}from"./index.js";import{t as x}from"./page-heading.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=y(h()),E=f();function D(){let{id:f}=b.useParams(),h=m(),{data:y}=t(g(f)),{data:D}=t(p),O=d(),k=l(),A=u(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),F=y.Addresses?.[0],I=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],L=async()=>{try{await A.mutateAsync(f),h({to:`/ec2/describe-addresses`})}finally{M(!1)}},R=async()=>{N&&await O.mutateAsync({allocationId:f,instanceId:N})},z=async()=>{F?.AssociationId&&await k.mutateAsync(F.AssociationId)};if(!F?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(n,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let B=!!F.AssociationId,V=v(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(n,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(e,{error:A.error??O.error??k.error??void 0,msg:`Elastic IP action failed`}),(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(x,{actions:(0,E.jsxs)(_,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(c,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:V?`${F.AllocationId} (${V})`:F.AllocationId}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Elastic IP Information`}),(0,E.jsxs)(C.Content,{children:[(0,E.jsx)(w,{label:`Allocation ID`,value:F.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:F.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:F.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:F.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:F.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:F.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:B?(0,E.jsx)(_,{disabled:k.isPending,onClick:z,size:`sm`,variant:`outline`,children:`Disassociate`}):(0,E.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,E.jsx)(`div`,{className:`flex-1`,children:(0,E.jsxs)(s,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(o,{className:`w-full`,children:(0,E.jsx)(r,{placeholder:`Select an instance`})}),(0,E.jsx)(a,{children:I.map(e=>{let t=v(e.Tags);return(0,E.jsx)(i,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(_,{disabled:!N||O.isPending,onClick:R,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${F.AllocationId}" (${F.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:L,onOpenChange:M,open:j,title:`Release Elastic IP`})]})}export{D as component};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./copy.js";import{t as i}from"./trash-2.js";import{A as a,c as o}from"./ec2.js";import{Xo as s,Yo as c,at as l,bs as u,ca as d,co as f,d as p,es as m,mo as h,ts as g,ut as _}from"./index.js";import{t as v}from"./page-heading.js";import{a as y,t as b}from"./field.js";import{a as x,i as S,l as C,n as w,o as T,r as E,s as D,t as O}from"./alert-dialog.js";import{t as k}from"./delete-confirmation-dialog.js";import{n as A,t as j}from"./detail-row.js";import{t as M}from"./state-badge.js";var N=u(g()),P=m();function F(){let{id:u}=p.useParams(),m=s(),{data:g}=t(_(u)),{data:F}=t(l),I=g.Snapshots?.[0],L=a(),R=o(),[z,B]=(0,N.useState)(!1),[V,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(``),G=F.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(u),m({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:u,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=h(I.StartTime);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,P.jsx)(e,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,P.jsx)(e,{error:R.error,msg:`Failed to copy snapshot`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(v,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(f,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(i,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(f,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,P.jsx)(r,{className:`size-4`}),`Copy Snapshot`]}),(0,P.jsx)(M,{state:I.State})]}),subtitle:`Snapshot Details`,title:I.SnapshotId}),(0,P.jsxs)(A,{children:[(0,P.jsx)(A.Header,{children:`Snapshot Information`}),(0,P.jsxs)(A.Content,{children:[(0,P.jsx)(j,{label:`Snapshot ID`,value:I.SnapshotId}),(0,P.jsx)(j,{label:`Volume ID`,value:I.VolumeId?(0,P.jsx)(c,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,P.jsx)(j,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,P.jsx)(j,{label:`State`,value:I.State}),(0,P.jsx)(j,{label:`Description`,value:I.Description}),(0,P.jsx)(j,{label:`Progress`,value:I.Progress}),(0,P.jsx)(j,{label:`Start Time`,value:Y}),(0,P.jsx)(j,{label:`Owner ID`,value:I.OwnerId}),(0,P.jsx)(j,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,P.jsx)(k,{description:`Are you sure you want to delete the snapshot "${I.SnapshotId}"? This action cannot be undone.`,isPending:L.isPending,onConfirm:q,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,P.jsx)(O,{onOpenChange:H,open:V,children:(0,P.jsxs)(S,{children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(C,{children:`Copy Snapshot`}),(0,P.jsx)(x,{children:`Create a copy of this snapshot in the current region.`})]}),(0,P.jsxs)(b,{children:[(0,P.jsx)(y,{children:(0,P.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,P.jsx)(d,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,P.jsxs)(T,{children:[(0,P.jsx)(E,{children:`Cancel`}),(0,P.jsx)(w,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{F as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./copy.js";import{t as i}from"./trash-2.js";import{A as a,c as o}from"./ec2.js";import{Ho as s,Lo as c,Ro as l,Uo as u,Xa as d,Xi as f,cs as p,ct as m,d as h,no as g,rt as _}from"./index.js";import{t as v}from"./page-heading.js";import{a as y,t as b}from"./field.js";import{a as x,i as S,l as C,n as w,o as T,r as E,s as D,t as O}from"./alert-dialog.js";import{t as k}from"./delete-confirmation-dialog.js";import{n as A,t as j}from"./detail-row.js";import{t as M}from"./state-badge.js";var N=p(u()),P=s();function F(){let{id:s}=h.useParams(),u=l(),{data:p}=t(m(s)),{data:F}=t(_),I=p.Snapshots?.[0],L=a(),R=o(),[z,B]=(0,N.useState)(!1),[V,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(``),G=F.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(s),u({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:s,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=g(I.StartTime);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,P.jsx)(e,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,P.jsx)(e,{error:R.error,msg:`Failed to copy snapshot`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(v,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(d,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(i,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(d,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,P.jsx)(r,{className:`size-4`}),`Copy Snapshot`]}),(0,P.jsx)(M,{state:I.State})]}),subtitle:`Snapshot Details`,title:I.SnapshotId}),(0,P.jsxs)(A,{children:[(0,P.jsx)(A.Header,{children:`Snapshot Information`}),(0,P.jsxs)(A.Content,{children:[(0,P.jsx)(j,{label:`Snapshot ID`,value:I.SnapshotId}),(0,P.jsx)(j,{label:`Volume ID`,value:I.VolumeId?(0,P.jsx)(c,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,P.jsx)(j,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,P.jsx)(j,{label:`State`,value:I.State}),(0,P.jsx)(j,{label:`Description`,value:I.Description}),(0,P.jsx)(j,{label:`Progress`,value:I.Progress}),(0,P.jsx)(j,{label:`Start Time`,value:Y}),(0,P.jsx)(j,{label:`Owner ID`,value:I.OwnerId}),(0,P.jsx)(j,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,P.jsx)(k,{description:`Are you sure you want to delete the snapshot "${I.SnapshotId}"? This action cannot be undone.`,isPending:L.isPending,onConfirm:q,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,P.jsx)(O,{onOpenChange:H,open:V,children:(0,P.jsxs)(S,{children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(C,{children:`Copy Snapshot`}),(0,P.jsx)(x,{children:`Create a copy of this snapshot in the current region.`})]}),(0,P.jsxs)(b,{children:[(0,P.jsx)(y,{children:(0,P.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,P.jsx)(f,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,P.jsxs)(T,{children:[(0,P.jsx)(E,{children:`Cancel`}),(0,P.jsx)(w,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{F as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{j as i}from"./ec2.js";import{Xo as a,Yo as o,_o as s,bs as c,co as l,es as u,f as d,ft as f,ts as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=c(p()),b=u();function x(){let{id:c}=d.useParams(),u=a(),{data:p}=t(f(c)),x=p.Subnets?.[0],S=i(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(c),u({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=s(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(o,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{j as i}from"./ec2.js";import{Ho as a,Lo as o,Ro as s,Uo as c,Xa as l,ao as u,cs as d,f,ut as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=d(c()),b=a();function x(){let{id:a}=f.useParams(),c=s(),{data:d}=t(p(a)),x=d.Subnets?.[0],S=i(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(a),c({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=u(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(o,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{V as r}from"./ec2.js";import{Xo as i,ca as a,es as o,h as s,mt as c,qo as l}from"./index.js";import{i as u,t as d}from"./zod.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{_}from"./ec22.js";var v=l(),y=o();function b(){let o=(0,v.c)(53),{id:l}=s.useParams(),b=i(),x;o[0]===l?x=o[1]:(x=c(l),o[0]=l,o[1]=x);let{data:S}=t(x),C=S.Volumes?.[0],w=C?.VolumeId,T=r(),E=C?.Size??1,D;o[2]===E?D=o[3]:(D=d(_.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),o[2]=E,o[3]=D);let O;o[4]===E?O=o[5]:(O={size:E},o[4]=E,o[5]=O);let k;o[6]!==D||o[7]!==O?(k={resolver:D,defaultValues:O},o[6]=D,o[7]=O,o[8]=k):k=o[8];let{handleSubmit:A,register:j,formState:M}=u(k),{errors:N,isSubmitting:P}=M;if(!w){let e;return o[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),o[9]=e):e=o[9],e}let F;o[10]!==T||o[11]!==b||o[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},o[10]=T,o[11]=b,o[12]=w,o[13]=F):F=o[13];let I=F,L,R;o[14]===w?(L=o[15],R=o[16]):(L=(0,y.jsx)(n,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(p,{subtitle:w,title:`Resize Volume`}),o[14]=w,o[15]=L,o[16]=R);let z;o[17]===T.error?z=o[18]:(z=T.error&&(0,y.jsx)(e,{error:T.error,msg:`Failed to resize volume`}),o[17]=T.error,o[18]=z);let B;o[19]!==A||o[20]!==I?(B=A(I),o[19]=A,o[20]=I,o[21]=B):B=o[21];let V;o[22]===E?V=o[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),o[22]=E,o[23]=V);let H;o[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),o[24]=H):H=o[24];let U=!!N.size,W=E+1,G;o[25]===j?G=o[26]:(G=j(`size`,{valueAsNumber:!0}),o[25]=j,o[26]=G);let K;o[27]!==U||o[28]!==W||o[29]!==G?(K=(0,y.jsx)(a,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),o[27]=U,o[28]=W,o[29]=G,o[30]=K):K=o[30];let q;o[31]===N.size?q=o[32]:(q=(0,y.jsx)(h,{errors:[N.size]}),o[31]=N.size,o[32]=q);let J;o[33]!==K||o[34]!==q?(J=(0,y.jsxs)(g,{children:[H,K,q]}),o[33]=K,o[34]=q,o[35]=J):J=o[35];let Y;o[36]!==b||o[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),o[36]=b,o[37]=w,o[38]=Y):Y=o[38];let X;o[39]!==P||o[40]!==T.isPending||o[41]!==Y?(X=(0,y.jsx)(f,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),o[39]=P,o[40]=T.isPending,o[41]=Y,o[42]=X):X=o[42];let Z;o[43]!==V||o[44]!==J||o[45]!==X||o[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),o[43]=V,o[44]=J,o[45]=X,o[46]=B,o[47]=Z):Z=o[47];let Q;return o[48]!==Z||o[49]!==L||o[50]!==R||o[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),o[48]=Z,o[49]=L,o[50]=R,o[51]=z,o[52]=Q):Q=o[52],Q}export{b as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{V as r}from"./ec2.js";import{Fo as i,Ho as a,Ro as o,Xi as s,ft as c,h as l}from"./index.js";import{i as u,t as d}from"./zod.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{_}from"./ec22.js";var v=i(),y=a();function b(){let i=(0,v.c)(53),{id:a}=l.useParams(),b=o(),x;i[0]===a?x=i[1]:(x=c(a),i[0]=a,i[1]=x);let{data:S}=t(x),C=S.Volumes?.[0],w=C?.VolumeId,T=r(),E=C?.Size??1,D;i[2]===E?D=i[3]:(D=d(_.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),i[2]=E,i[3]=D);let O;i[4]===E?O=i[5]:(O={size:E},i[4]=E,i[5]=O);let k;i[6]!==D||i[7]!==O?(k={resolver:D,defaultValues:O},i[6]=D,i[7]=O,i[8]=k):k=i[8];let{handleSubmit:A,register:j,formState:M}=u(k),{errors:N,isSubmitting:P}=M;if(!w){let e;return i[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),i[9]=e):e=i[9],e}let F;i[10]!==T||i[11]!==b||i[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},i[10]=T,i[11]=b,i[12]=w,i[13]=F):F=i[13];let I=F,L,R;i[14]===w?(L=i[15],R=i[16]):(L=(0,y.jsx)(n,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(p,{subtitle:w,title:`Resize Volume`}),i[14]=w,i[15]=L,i[16]=R);let z;i[17]===T.error?z=i[18]:(z=T.error&&(0,y.jsx)(e,{error:T.error,msg:`Failed to resize volume`}),i[17]=T.error,i[18]=z);let B;i[19]!==A||i[20]!==I?(B=A(I),i[19]=A,i[20]=I,i[21]=B):B=i[21];let V;i[22]===E?V=i[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),i[22]=E,i[23]=V);let H;i[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),i[24]=H):H=i[24];let U=!!N.size,W=E+1,G;i[25]===j?G=i[26]:(G=j(`size`,{valueAsNumber:!0}),i[25]=j,i[26]=G);let K;i[27]!==U||i[28]!==W||i[29]!==G?(K=(0,y.jsx)(s,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),i[27]=U,i[28]=W,i[29]=G,i[30]=K):K=i[30];let q;i[31]===N.size?q=i[32]:(q=(0,y.jsx)(h,{errors:[N.size]}),i[31]=N.size,i[32]=q);let J;i[33]!==K||i[34]!==q?(J=(0,y.jsxs)(g,{children:[H,K,q]}),i[33]=K,i[34]=q,i[35]=J):J=i[35];let Y;i[36]!==b||i[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),i[36]=b,i[37]=w,i[38]=Y):Y=i[38];let X;i[39]!==P||i[40]!==T.isPending||i[41]!==Y?(X=(0,y.jsx)(f,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),i[39]=P,i[40]=T.isPending,i[41]=Y,i[42]=X):X=i[42];let Z;i[43]!==V||i[44]!==J||i[45]!==X||i[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),i[43]=V,i[44]=J,i[45]=X,i[46]=B,i[47]=Z):Z=i[47];let Q;return i[48]!==Z||i[49]!==L||i[50]!==R||i[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),i[48]=Z,i[49]=L,i[50]=R,i[51]=z,i[52]=Q):Q=i[52],Q}export{b as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{N as i}from"./ec2.js";import{Xo as a,Yo as o,_o as s,bs as c,co as l,es as u,g as d,gt as f,pt as p,ts as m}from"./index.js";import{t as h}from"./page-heading.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./state-badge.js";var b=c(m()),x=u();function S(){let{id:c}=d.useParams(),u=a(),{data:m}=t(f(c)),{data:S}=t(p),C=m.Vpcs?.[0],w=i(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(e=>e.VpcId===c)??[],O=async()=>{try{await w.mutateAsync(c),u({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=s(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(e,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(l,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),(0,x.jsx)(y,{state:C.State})]}),subtitle:`VPC Details`,title:k?`${C.VpcId} (${k})`:C.VpcId}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`VPC Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`VPC ID`,value:C.VpcId}),(0,x.jsx)(v,{label:`State`,value:C.State}),(0,x.jsx)(v,{label:`CIDR Block`,value:C.CidrBlock}),(0,x.jsx)(v,{label:`Is Default`,value:C.IsDefault?`Yes`:`No`}),(0,x.jsx)(v,{label:`DHCP Options ID`,value:C.DhcpOptionsId}),(0,x.jsx)(v,{label:`Instance Tenancy`,value:C.InstanceTenancy}),(0,x.jsx)(v,{label:`Owner ID`,value:C.OwnerId})]})]}),D.length>0&&(0,x.jsxs)(_,{children:[(0,x.jsxs)(_.Header,{children:[`Subnets (`,D.length,`)`]}),D.map(e=>e.SubnetId?(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Subnet ID`,value:(0,x.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.SubnetId},to:`/ec2/describe-subnets/$id`,children:e.SubnetId})}),(0,x.jsx)(v,{label:`CIDR Block`,value:e.CidrBlock}),(0,x.jsx)(v,{label:`Availability Zone`,value:e.AvailabilityZone}),(0,x.jsx)(v,{label:`State`,value:e.State})]},e.SubnetId):null)]})]}),(0,x.jsx)(g,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{N as i}from"./ec2.js";import{Ho as a,Lo as o,Ro as s,Uo as c,Xa as l,ao as u,cs as d,dt as f,g as p,mt as m}from"./index.js";import{t as h}from"./page-heading.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./state-badge.js";var b=d(c()),x=a();function S(){let{id:a}=p.useParams(),c=s(),{data:d}=t(m(a)),{data:S}=t(f),C=d.Vpcs?.[0],w=i(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(e=>e.VpcId===a)??[],O=async()=>{try{await w.mutateAsync(a),c({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=u(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(e,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(l,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),(0,x.jsx)(y,{state:C.State})]}),subtitle:`VPC Details`,title:k?`${C.VpcId} (${k})`:C.VpcId}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`VPC Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`VPC ID`,value:C.VpcId}),(0,x.jsx)(v,{label:`State`,value:C.State}),(0,x.jsx)(v,{label:`CIDR Block`,value:C.CidrBlock}),(0,x.jsx)(v,{label:`Is Default`,value:C.IsDefault?`Yes`:`No`}),(0,x.jsx)(v,{label:`DHCP Options ID`,value:C.DhcpOptionsId}),(0,x.jsx)(v,{label:`Instance Tenancy`,value:C.InstanceTenancy}),(0,x.jsx)(v,{label:`Owner ID`,value:C.OwnerId})]})]}),D.length>0&&(0,x.jsxs)(_,{children:[(0,x.jsxs)(_.Header,{children:[`Subnets (`,D.length,`)`]}),D.map(e=>e.SubnetId?(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Subnet ID`,value:(0,x.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.SubnetId},to:`/ec2/describe-subnets/$id`,children:e.SubnetId})}),(0,x.jsx)(v,{label:`CIDR Block`,value:e.CidrBlock}),(0,x.jsx)(v,{label:`Availability Zone`,value:e.AvailabilityZone}),(0,x.jsx)(v,{label:`State`,value:e.State})]},e.SubnetId):null)]})]}),(0,x.jsx)(g,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{t}from"./back-link.js";import{K as n,es as r,n as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./system-managed.js";import{t as l}from"./ami-details.js";var u=a(),d=r();function f(){let r=(0,u.c)(14),{id:a}=i.useParams(),f;r[0]===a?f=r[1]:(f=n(a),r[0]=a,r[1]=f);let{data:p}=e(f),m=p?.Images?.[0];if(!m?.ImageId||c(m)){let e;return r[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),r[2]=e):e=r[2],e}let h;r[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),r[3]=h):h=r[3];let g;r[4]===m.State?g=r[5]:(g=(0,d.jsx)(s,{state:m.State}),r[4]=m.State,r[5]=g);let _;r[6]!==m.ImageId||r[7]!==g?(_=(0,d.jsx)(o,{actions:g,subtitle:`Image Details`,title:m.ImageId}),r[6]=m.ImageId,r[7]=g,r[8]=_):_=r[8];let v;r[9]===m?v=r[10]:(v=(0,d.jsx)(l,{image:m,showExtendedDetails:!0}),r[9]=m,r[10]=v);let y;return r[11]!==_||r[12]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[h,(0,d.jsxs)(`div`,{className:`space-y-6`,children:[_,v]})]}),r[11]=_,r[12]=v,r[13]=y):y=r[13],y}export{f as component};
import{t as e}from"./useSuspenseQuery.js";import{t}from"./back-link.js";import{Fo as n,Ho as r,W as i,n as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./system-managed.js";import{t as l}from"./ami-details.js";var u=n(),d=r();function f(){let n=(0,u.c)(14),{id:r}=a.useParams(),f;n[0]===r?f=n[1]:(f=i(r),n[0]=r,n[1]=f);let{data:p}=e(f),m=p?.Images?.[0];if(!m?.ImageId||c(m)){let e;return n[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),n[2]=e):e=n[2],e}let h;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),n[3]=h):h=n[3];let g;n[4]===m.State?g=n[5]:(g=(0,d.jsx)(s,{state:m.State}),n[4]=m.State,n[5]=g);let _;n[6]!==m.ImageId||n[7]!==g?(_=(0,d.jsx)(o,{actions:g,subtitle:`Image Details`,title:m.ImageId}),n[6]=m.ImageId,n[7]=g,n[8]=_):_=n[8];let v;n[9]===m?v=n[10]:(v=(0,d.jsx)(l,{image:m,showExtendedDetails:!0}),n[9]=m,n[10]=v);let y;return n[11]!==_||n[12]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[h,(0,d.jsxs)(`div`,{className:`space-y-6`,children:[_,v]})]}),n[11]=_,n[12]=v,n[13]=y):y=n[13],y}export{f as component};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as c}from"./trash-2.js";import{C as l,P as u,i as d}from"./ec2.js";import{Xo as f,Yo as p,Z as m,_o as h,_t as g,bs as _,co as v,es as y,i as b,ts as x}from"./index.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=_(x()),D=y();function O(){let{id:_}=b.useParams(),y=f(),{data:x}=t(m(_)),{data:O}=t(g),k=d(),A=u(),j=l(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(``),I=x.InternetGateways?.[0],L=O.Vpcs??[],R=async()=>{try{await j.mutateAsync(_),y({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},z=async()=>{P&&await k.mutateAsync({internetGatewayId:_,vpcId:P})},B=async e=>{await A.mutateAsync({internetGatewayId:_,vpcId:e})};if(!I?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(n,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let V=I.Attachments?.[0],H=!!V?.VpcId,U=h(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(n,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(e,{error:j.error??k.error??A.error??void 0,msg:`Internet Gateway action failed`}),(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsx)(S,{actions:(0,D.jsxs)(v,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:U?`${I.InternetGatewayId} (${U})`:I.InternetGatewayId}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`Internet Gateway Information`}),(0,D.jsxs)(w.Content,{children:[(0,D.jsx)(T,{label:`Internet Gateway ID`,value:I.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:I.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:V?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:H?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(p,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(v,{disabled:A.isPending,onClick:async()=>await B(V.VpcId??``),size:`sm`,variant:`outline`,children:`Detach`})]}):(0,D.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,D.jsx)(`div`,{className:`flex-1`,children:(0,D.jsxs)(s,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(o,{className:`w-full`,children:(0,D.jsx)(r,{placeholder:`Select a VPC`})}),(0,D.jsx)(a,{children:L.map(e=>{let t=h(e.Tags);return(0,D.jsx)(i,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(v,{disabled:!P||k.isPending,onClick:z,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${I.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:R,onOpenChange:N,open:M,title:`Delete Internet Gateway`})]})}export{O as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as c}from"./trash-2.js";import{C as l,P as u,i as d}from"./ec2.js";import{Ho as f,Lo as p,Ro as m,Uo as h,Xa as g,Y as _,ao as v,cs as y,ht as b,i as x}from"./index.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=y(h()),D=f();function O(){let{id:f}=x.useParams(),h=m(),{data:y}=t(_(f)),{data:O}=t(b),k=d(),A=u(),j=l(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(``),I=y.InternetGateways?.[0],L=O.Vpcs??[],R=async()=>{try{await j.mutateAsync(f),h({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},z=async()=>{P&&await k.mutateAsync({internetGatewayId:f,vpcId:P})},B=async e=>{await A.mutateAsync({internetGatewayId:f,vpcId:e})};if(!I?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(n,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let V=I.Attachments?.[0],H=!!V?.VpcId,U=v(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(n,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(e,{error:j.error??k.error??A.error??void 0,msg:`Internet Gateway action failed`}),(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsx)(S,{actions:(0,D.jsxs)(g,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:U?`${I.InternetGatewayId} (${U})`:I.InternetGatewayId}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`Internet Gateway Information`}),(0,D.jsxs)(w.Content,{children:[(0,D.jsx)(T,{label:`Internet Gateway ID`,value:I.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:I.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:V?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:H?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(p,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(g,{disabled:A.isPending,onClick:async()=>await B(V.VpcId??``),size:`sm`,variant:`outline`,children:`Detach`})]}):(0,D.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,D.jsx)(`div`,{className:`flex-1`,children:(0,D.jsxs)(s,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(o,{className:`w-full`,children:(0,D.jsx)(r,{placeholder:`Select a VPC`})}),(0,D.jsx)(a,{children:L.map(e=>{let t=v(e.Tags);return(0,D.jsx)(i,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(g,{disabled:!P||k.isPending,onClick:z,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${I.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:R,onOpenChange:N,open:M,title:`Delete Internet Gateway`})]})}export{O as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{w as i}from"./ec2.js";import{$ as a,Xo as o,a as s,bs as c,co as l,es as u,mo as d,ts as f}from"./index.js";import{t as p}from"./page-heading.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=c(f()),v=u();function y(){let{id:c}=s.useParams(),u=o(),{data:f}=t(a(c)),y=f.KeyPairs?.[0],b=i(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(c),u({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=d(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(e,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(l,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Key Pair Information`}),(0,v.jsxs)(h.Content,{children:[(0,v.jsx)(g,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(g,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(g,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(g,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(g,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Tags`}),(0,v.jsx)(h.Content,{children:y.Tags.map(e=>(0,v.jsx)(g,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(m,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{w as i}from"./ec2.js";import{Ho as a,Ro as o,Uo as s,Xa as c,Z as l,a as u,cs as d,no as f}from"./index.js";import{t as p}from"./page-heading.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=d(s()),v=a();function y(){let{id:a}=u.useParams(),s=o(),{data:d}=t(l(a)),y=d.KeyPairs?.[0],b=i(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(a),s({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=f(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(e,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(c,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Key Pair Information`}),(0,v.jsxs)(h.Content,{children:[(0,v.jsx)(g,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(g,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(g,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(g,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(g,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Tags`}),(0,v.jsx)(h.Content,{children:y.Tags.map(e=>(0,v.jsx)(g,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(m,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{T as i}from"./ec2.js";import{Xo as a,Yo as o,_o as s,bs as c,co as l,es as u,s as d,ts as f,tt as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=c(f()),b=u();function x(){let{id:c}=d.useParams(),u=a(),{data:f}=t(p(c)),x=i(),[S,C]=(0,y.useState)(!1),w=f.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(c),u({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`NAT Gateway not found.`})]});let E=s(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(e,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{disabled:x.isPending,onClick:()=>C(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:w.State})]}),subtitle:`NAT Gateway Details`,title:E?`${w.NatGatewayId} (${E})`:w.NatGatewayId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`NAT Gateway Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`NAT Gateway ID`,value:w.NatGatewayId}),(0,b.jsx)(_,{label:`State`,value:w.State}),(0,b.jsx)(_,{label:`Connectivity`,value:w.ConnectivityType}),(0,b.jsx)(_,{label:`Subnet ID`,value:w.SubnetId?(0,b.jsx)(o,{className:`text-primary hover:underline`,params:{id:w.SubnetId},to:`/ec2/describe-subnets/$id`,children:w.SubnetId}):`—`}),(0,b.jsx)(_,{label:`VPC ID`,value:w.VpcId?(0,b.jsx)(o,{className:`text-primary hover:underline`,params:{id:w.VpcId},to:`/ec2/describe-vpcs/$id`,children:w.VpcId}):`—`}),(0,b.jsx)(_,{label:`Public IP`,value:D?.PublicIp??`—`}),(0,b.jsx)(_,{label:`Allocation ID`,value:D?.AllocationId?(0,b.jsx)(o,{className:`text-primary hover:underline`,params:{id:D.AllocationId},to:`/ec2/describe-addresses/$id`,children:D.AllocationId}):`—`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the NAT Gateway "${w.NatGatewayId}"? This action cannot be undone. The associated Elastic IP is not released.`,isPending:x.isPending,onConfirm:T,onOpenChange:C,open:S,title:`Delete NAT Gateway`})]})}export{x as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{T as i}from"./ec2.js";import{$ as a,Ho as o,Lo as s,Ro as c,Uo as l,Xa as u,ao as d,cs as f,s as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=f(l()),b=o();function x(){let{id:o}=p.useParams(),l=c(),{data:f}=t(a(o)),x=i(),[S,C]=(0,y.useState)(!1),w=f.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(o),l({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`NAT Gateway not found.`})]});let E=d(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(e,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(u,{disabled:x.isPending,onClick:()=>C(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:w.State})]}),subtitle:`NAT Gateway Details`,title:E?`${w.NatGatewayId} (${E})`:w.NatGatewayId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`NAT Gateway Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`NAT Gateway ID`,value:w.NatGatewayId}),(0,b.jsx)(_,{label:`State`,value:w.State}),(0,b.jsx)(_,{label:`Connectivity`,value:w.ConnectivityType}),(0,b.jsx)(_,{label:`Subnet ID`,value:w.SubnetId?(0,b.jsx)(s,{className:`text-primary hover:underline`,params:{id:w.SubnetId},to:`/ec2/describe-subnets/$id`,children:w.SubnetId}):`—`}),(0,b.jsx)(_,{label:`VPC ID`,value:w.VpcId?(0,b.jsx)(s,{className:`text-primary hover:underline`,params:{id:w.VpcId},to:`/ec2/describe-vpcs/$id`,children:w.VpcId}):`—`}),(0,b.jsx)(_,{label:`Public IP`,value:D?.PublicIp??`—`}),(0,b.jsx)(_,{label:`Allocation ID`,value:D?.AllocationId?(0,b.jsx)(s,{className:`text-primary hover:underline`,params:{id:D.AllocationId},to:`/ec2/describe-addresses/$id`,children:D.AllocationId}):`—`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the NAT Gateway "${w.NatGatewayId}"? This action cannot be undone. The associated Elastic IP is not released.`,isPending:x.isPending,onConfirm:T,onOpenChange:C,open:S,title:`Delete NAT Gateway`})]})}export{x as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{E as i}from"./ec2.js";import{X as a,Xo as o,Yo as s,bs as c,c as l,co as u,es as d,rt as f,ts as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=c(p()),b=d();function x(){let{id:c}=l.useParams(),d=o(),{data:p}=t(f(c)),{data:x}=t(a),S=i(),[C,w]=(0,y.useState)(!1),T=p.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(u,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(s,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),d({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{E as i}from"./ec2.js";import{Ho as a,J as o,Lo as s,Ro as c,Uo as l,Xa as u,c as d,cs as f,tt as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=f(l()),b=a();function x(){let{id:a}=d.useParams(),l=c(),{data:f}=t(p(a)),{data:x}=t(o),S=i(),[C,w]=(0,y.useState)(!1),T=f.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(u,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(s,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),l({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{o as i}from"./iam.js";import{C as a,Xo as o,_ as s,bs as c,co as l,es as u,mo as d,qo as f,ts as p,w as m}from"./index.js";import{t as h}from"./page-heading.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";var y=c(p()),b=f(),x=u();function S(e){let t=(0,b.c)(4),{document:n}=e,r;try{let e;t[0]===n?e=t[1]:(e=JSON.stringify(JSON.parse(n),null,2),t[0]=n,t[1]=e),r=e}catch{r=n}let i;return t[2]===r?i=t[3]:(i=(0,x.jsx)(`pre`,{className:`overflow-auto rounded-md border bg-muted p-4 font-mono text-sm`,children:r}),t[2]=r,t[3]=i),i}function C(){let{policyArn:c}=s.useParams(),u=decodeURIComponent(c),f=o(),{data:p}=t(a(u)),b=p.Policy,C=i(),[w,T]=(0,y.useState)(!1),{data:E}=t(m(u,b?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return b?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,x.jsx)(e,{error:C.error,msg:`Failed to delete policy`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(l,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:b.PolicyName??``}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`Policy Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Policy Name`,value:b.PolicyName}),(0,x.jsx)(v,{label:`Policy ID`,value:b.PolicyId}),(0,x.jsx)(v,{label:`ARN`,value:b.Arn}),(0,x.jsx)(v,{label:`Path`,value:b.Path}),(0,x.jsx)(v,{label:`Description`,value:b.Description??`-`}),(0,x.jsx)(v,{label:`Created`,value:d(b.CreateDate)})]})]}),D&&(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`Policy Document`}),(0,x.jsx)(`div`,{className:`p-4`,children:(0,x.jsx)(S,{document:D})})]})]}),(0,x.jsx)(g,{description:`Are you sure you want to delete the policy "${b.PolicyName}"? This action cannot be undone.`,isPending:C.isPending,onConfirm:async()=>{try{await C.mutateAsync(u),f({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{C as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{o as i}from"./iam.js";import{C as a,Fo as o,Ho as s,Ro as c,Uo as l,Xa as u,_ as d,cs as f,no as p,w as m}from"./index.js";import{t as h}from"./page-heading.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";var y=f(l()),b=o(),x=s();function S(e){let t=(0,b.c)(4),{document:n}=e,r;try{let e;t[0]===n?e=t[1]:(e=JSON.stringify(JSON.parse(n),null,2),t[0]=n,t[1]=e),r=e}catch{r=n}let i;return t[2]===r?i=t[3]:(i=(0,x.jsx)(`pre`,{className:`overflow-auto rounded-md border bg-muted p-4 font-mono text-sm`,children:r}),t[2]=r,t[3]=i),i}function C(){let{policyArn:o}=d.useParams(),s=decodeURIComponent(o),l=c(),{data:f}=t(a(s)),b=f.Policy,C=i(),[w,T]=(0,y.useState)(!1),{data:E}=t(m(s,b?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return b?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,x.jsx)(e,{error:C.error,msg:`Failed to delete policy`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(u,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:b.PolicyName??``}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`Policy Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Policy Name`,value:b.PolicyName}),(0,x.jsx)(v,{label:`Policy ID`,value:b.PolicyId}),(0,x.jsx)(v,{label:`ARN`,value:b.Arn}),(0,x.jsx)(v,{label:`Path`,value:b.Path}),(0,x.jsx)(v,{label:`Description`,value:b.Description??`-`}),(0,x.jsx)(v,{label:`Created`,value:p(b.CreateDate)})]})]}),D&&(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`Policy Document`}),(0,x.jsx)(`div`,{className:`p-4`,children:(0,x.jsx)(S,{document:D})})]})]}),(0,x.jsx)(g,{description:`Are you sure you want to delete the policy "${b.PolicyName}"? This action cannot be undone.`,isPending:C.isPending,onConfirm:async()=>{try{await C.mutateAsync(s),l({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{C as component};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{Kr as e,Qo as t,kr as n}from"./index.js";var r=t({queryKey:[`admin`,`nodes`],queryFn:async()=>{let t=e();if(!t)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:t})},staleTime:1e4}),i=t({queryKey:[`admin`,`vms`],queryFn:async()=>{let t=e();if(!t)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:t})},staleTime:1e4}),a=t({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let t=e();if(!t)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:t})},staleTime:1e4});export{a as n,i as r,r as t};
import{Bo as e,Pr as t,_r as n}from"./index.js";var r=e({queryKey:[`admin`,`nodes`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:e})},staleTime:1e4}),i=e({queryKey:[`admin`,`vms`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:e})},staleTime:1e4}),a=e({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:e})},staleTime:1e4});export{a as n,i as r,r as t};
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{t as r}from"./ec2.js";import{Xo as i,ca as a,es as o,qo as s}from"./index.js";import{a as c,i as l,t as u}from"./zod.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{n as h}from"./ec22.js";var g=s(),_=o();function v(){let o=(0,g.c)(36),s=i(),v=r(),b;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},o[0]=b):b=o[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;o[1]===x?E=o[2]:(E={control:x},o[1]=x,o[2]=E);let D=c(E),O;o[3]!==v||o[4]!==s?(O=async e=>{let t=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;s(t?{to:`/ec2/describe-addresses/$id`,params:{id:t}}:{to:`/ec2/describe-addresses`})},o[3]=v,o[4]=s,o[5]=O):O=o[5];let k=O,A,j;o[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(t,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(f,{title:`Allocate Elastic IP`}),o[6]=A,o[7]=j):(A=o[6],j=o[7]);let M;o[8]===v.error?M=o[9]:(M=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to allocate Elastic IP`}),o[8]=v.error,o[9]=M);let N;o[10]!==S||o[11]!==k?(N=S(k),o[10]=S,o[11]=k,o[12]=N):N=o[12];let P;o[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),o[13]=P):P=o[13];let F;o[14]===C?F=o[15]:(F=C(`name`),o[14]=C,o[15]=F);let I;o[16]===F?I=o[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(a,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),o[16]=F,o[17]=I);let L=D.name??``,R;o[18]===L?R=o[19]:(R=y(L),o[18]=L,o[19]=R);let z;o[20]===R?z=o[21]:(z=(0,_.jsx)(n,{commands:R}),o[20]=R,o[21]=z);let B;o[22]===s?B=o[23]:(B=async()=>await s({to:`/ec2/describe-addresses`}),o[22]=s,o[23]=B);let V;o[24]!==v.isPending||o[25]!==T||o[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),o[24]=v.isPending,o[25]=T,o[26]=B,o[27]=V):V=o[27];let H;o[28]!==I||o[29]!==z||o[30]!==V||o[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),o[28]=I,o[29]=z,o[30]=V,o[31]=N,o[32]=H):H=o[32];let U;return o[33]!==H||o[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),o[33]=H,o[34]=M,o[35]=U):U=o[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{t as r}from"./ec2.js";import{Fo as i,Ho as a,Ro as o,Xi as s}from"./index.js";import{a as c,i as l,t as u}from"./zod.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{n as h}from"./ec22.js";var g=i(),_=a();function v(){let i=(0,g.c)(36),a=o(),v=r(),b;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},i[0]=b):b=i[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;i[1]===x?E=i[2]:(E={control:x},i[1]=x,i[2]=E);let D=c(E),O;i[3]!==v||i[4]!==a?(O=async e=>{let t=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;a(t?{to:`/ec2/describe-addresses/$id`,params:{id:t}}:{to:`/ec2/describe-addresses`})},i[3]=v,i[4]=a,i[5]=O):O=i[5];let k=O,A,j;i[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(t,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(f,{title:`Allocate Elastic IP`}),i[6]=A,i[7]=j):(A=i[6],j=i[7]);let M;i[8]===v.error?M=i[9]:(M=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to allocate Elastic IP`}),i[8]=v.error,i[9]=M);let N;i[10]!==S||i[11]!==k?(N=S(k),i[10]=S,i[11]=k,i[12]=N):N=i[12];let P;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),i[13]=P):P=i[13];let F;i[14]===C?F=i[15]:(F=C(`name`),i[14]=C,i[15]=F);let I;i[16]===F?I=i[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(s,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),i[16]=F,i[17]=I);let L=D.name??``,R;i[18]===L?R=i[19]:(R=y(L),i[18]=L,i[19]=R);let z;i[20]===R?z=i[21]:(z=(0,_.jsx)(n,{commands:R}),i[20]=R,i[21]=z);let B;i[22]===a?B=i[23]:(B=async()=>await a({to:`/ec2/describe-addresses`}),i[22]=a,i[23]=B);let V;i[24]!==v.isPending||i[25]!==T||i[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),i[24]=v.isPending,i[25]=T,i[26]=B,i[27]=V):V=i[27];let H;i[28]!==I||i[29]!==z||i[30]!==V||i[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),i[28]=I,i[29]=z,i[30]=V,i[31]=N,i[32]=H):H=i[32];let U;return i[33]!==H||i[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),i[33]=H,i[34]=M,i[35]=U):U=i[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\
--domain`},{type:`value`,value:` vpc`}];return e.trim()&&t.push({type:`flag`,value:` \\
--tag-specifications`},{type:`value`,value:` 'ResourceType=elastic-ip,Tags=[{Key=Name,Value=${e.trim()}}]'`}),[{label:`Allocate Elastic IP`,parts:t}]}export{v as component};
@@ -1 +1 @@
import{Yo as e,es as t,mo as n,qo as r}from"./index.js";import{n as i,t as a}from"./detail-row.js";var o=r(),s=t();function c(t){let r=(0,o.c)(58),{image:c,showExtendedDetails:u}=t,d=u===void 0?!1:u,f;r[0]===c.CreationDate?f=r[1]:(f=n(c.CreationDate),r[0]=c.CreationDate,r[1]=f);let p=f,m=d?`AMI Information`:`AMI Details`,h;r[2]===m?h=r[3]:(h=(0,s.jsx)(i.Header,{children:m}),r[2]=m,r[3]=h);let g;r[4]!==c.ImageId||r[5]!==d?(g=c.ImageId&&!d?(0,s.jsx)(e,{className:`text-primary hover:underline`,params:{id:c.ImageId},to:`/ec2/describe-images/$id`,children:c.ImageId}):c.ImageId,r[4]=c.ImageId,r[5]=d,r[6]=g):g=r[6];let _;r[7]===g?_=r[8]:(_=(0,s.jsx)(a,{label:`AMI ID`,value:g}),r[7]=g,r[8]=_);let v;r[9]===c.Name?v=r[10]:(v=(0,s.jsx)(a,{label:`AMI Name`,value:c.Name}),r[9]=c.Name,r[10]=v);let y;r[11]===c.Description?y=r[12]:(y=(0,s.jsx)(a,{label:`Description`,value:c.Description}),r[11]=c.Description,r[12]=y);let b;r[13]===c.Architecture?b=r[14]:(b=(0,s.jsx)(a,{label:`Architecture`,value:c.Architecture}),r[13]=c.Architecture,r[14]=b);let x;r[15]===c.VirtualizationType?x=r[16]:(x=(0,s.jsx)(a,{label:`Virtualization Type`,value:c.VirtualizationType}),r[15]=c.VirtualizationType,r[16]=x);let S=c.Platform??`Linux`,C;r[17]===S?C=r[18]:(C=(0,s.jsx)(a,{label:`Platform`,value:S}),r[17]=S,r[18]=C);let w;r[19]===c.PlatformDetails?w=r[20]:(w=(0,s.jsx)(a,{label:`Platform Details`,value:c.PlatformDetails}),r[19]=c.PlatformDetails,r[20]=w);let T;r[21]===c.ImageType?T=r[22]:(T=(0,s.jsx)(a,{label:`Image Type`,value:c.ImageType}),r[21]=c.ImageType,r[22]=T);let E;r[23]===c.RootDeviceType?E=r[24]:(E=(0,s.jsx)(a,{label:`Root Device Type`,value:c.RootDeviceType}),r[23]=c.RootDeviceType,r[24]=E);let D;r[25]===c.RootDeviceName?D=r[26]:(D=(0,s.jsx)(a,{label:`Root Device Name`,value:c.RootDeviceName}),r[25]=c.RootDeviceName,r[26]=D);let O;r[27]===c.OwnerId?O=r[28]:(O=(0,s.jsx)(a,{label:`Owner`,value:c.OwnerId}),r[27]=c.OwnerId,r[28]=O);let k;r[29]===c.State?k=r[30]:(k=(0,s.jsx)(a,{label:`State`,value:c.State}),r[29]=c.State,r[30]=k);let A;r[31]!==p||r[32]!==c.Public||r[33]!==d?(A=d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Creation Date`,value:p}),(0,s.jsx)(a,{label:`Public`,value:c.Public?`Yes`:`No`})]}),r[31]=p,r[32]=c.Public,r[33]=d,r[34]=A):A=r[34];let j;r[35]!==x||r[36]!==C||r[37]!==w||r[38]!==T||r[39]!==E||r[40]!==D||r[41]!==O||r[42]!==k||r[43]!==A||r[44]!==_||r[45]!==v||r[46]!==y||r[47]!==b?(j=(0,s.jsxs)(i.Content,{children:[_,v,y,b,x,C,w,T,E,D,O,k,A]}),r[35]=x,r[36]=C,r[37]=w,r[38]=T,r[39]=E,r[40]=D,r[41]=O,r[42]=k,r[43]=A,r[44]=_,r[45]=v,r[46]=y,r[47]=b,r[48]=j):j=r[48];let M;r[49]!==j||r[50]!==h?(M=(0,s.jsxs)(i,{children:[h,j]}),r[49]=j,r[50]=h,r[51]=M):M=r[51];let N;r[52]!==c.BlockDeviceMappings||r[53]!==d?(N=d&&c.BlockDeviceMappings&&c.BlockDeviceMappings.length>0&&c.BlockDeviceMappings.map(l),r[52]=c.BlockDeviceMappings,r[53]=d,r[54]=N):N=r[54];let P;return r[55]!==M||r[56]!==N?(P=(0,s.jsxs)(s.Fragment,{children:[M,N]}),r[55]=M,r[56]=N,r[57]=P):P=r[57],P}function l(t){return(0,s.jsxs)(i,{children:[(0,s.jsxs)(i.Header,{children:[`Block Device: `,t.DeviceName]}),(0,s.jsxs)(i.Content,{children:[(0,s.jsx)(a,{label:`Device Name`,value:t.DeviceName}),t.Ebs&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Volume Size`,value:t.Ebs.VolumeSize?`${t.Ebs.VolumeSize} GB`:void 0}),(0,s.jsx)(a,{label:`Volume Type`,value:t.Ebs.VolumeType}),(0,s.jsx)(a,{label:`Delete On Termination`,value:t.Ebs.DeleteOnTermination?`Yes`:`No`}),(0,s.jsx)(a,{label:`Encrypted`,value:t.Ebs.Encrypted?`Yes`:`No`}),t.Ebs.SnapshotId&&(0,s.jsx)(a,{label:`Snapshot ID`,value:(0,s.jsx)(e,{className:`text-primary hover:underline`,params:{id:t.Ebs.SnapshotId},to:`/ec2/describe-snapshots/$id`,children:t.Ebs.SnapshotId})})]}),t.VirtualName&&(0,s.jsx)(a,{label:`Virtual Name`,value:t.VirtualName})]})]},t.DeviceName)}export{c as t};
import{Fo as e,Ho as t,Lo as n,no as r}from"./index.js";import{n as i,t as a}from"./detail-row.js";var o=e(),s=t();function c(e){let t=(0,o.c)(58),{image:c,showExtendedDetails:u}=e,d=u===void 0?!1:u,f;t[0]===c.CreationDate?f=t[1]:(f=r(c.CreationDate),t[0]=c.CreationDate,t[1]=f);let p=f,m=d?`AMI Information`:`AMI Details`,h;t[2]===m?h=t[3]:(h=(0,s.jsx)(i.Header,{children:m}),t[2]=m,t[3]=h);let g;t[4]!==c.ImageId||t[5]!==d?(g=c.ImageId&&!d?(0,s.jsx)(n,{className:`text-primary hover:underline`,params:{id:c.ImageId},to:`/ec2/describe-images/$id`,children:c.ImageId}):c.ImageId,t[4]=c.ImageId,t[5]=d,t[6]=g):g=t[6];let _;t[7]===g?_=t[8]:(_=(0,s.jsx)(a,{label:`AMI ID`,value:g}),t[7]=g,t[8]=_);let v;t[9]===c.Name?v=t[10]:(v=(0,s.jsx)(a,{label:`AMI Name`,value:c.Name}),t[9]=c.Name,t[10]=v);let y;t[11]===c.Description?y=t[12]:(y=(0,s.jsx)(a,{label:`Description`,value:c.Description}),t[11]=c.Description,t[12]=y);let b;t[13]===c.Architecture?b=t[14]:(b=(0,s.jsx)(a,{label:`Architecture`,value:c.Architecture}),t[13]=c.Architecture,t[14]=b);let x;t[15]===c.VirtualizationType?x=t[16]:(x=(0,s.jsx)(a,{label:`Virtualization Type`,value:c.VirtualizationType}),t[15]=c.VirtualizationType,t[16]=x);let S=c.Platform??`Linux`,C;t[17]===S?C=t[18]:(C=(0,s.jsx)(a,{label:`Platform`,value:S}),t[17]=S,t[18]=C);let w;t[19]===c.PlatformDetails?w=t[20]:(w=(0,s.jsx)(a,{label:`Platform Details`,value:c.PlatformDetails}),t[19]=c.PlatformDetails,t[20]=w);let T;t[21]===c.ImageType?T=t[22]:(T=(0,s.jsx)(a,{label:`Image Type`,value:c.ImageType}),t[21]=c.ImageType,t[22]=T);let E;t[23]===c.RootDeviceType?E=t[24]:(E=(0,s.jsx)(a,{label:`Root Device Type`,value:c.RootDeviceType}),t[23]=c.RootDeviceType,t[24]=E);let D;t[25]===c.RootDeviceName?D=t[26]:(D=(0,s.jsx)(a,{label:`Root Device Name`,value:c.RootDeviceName}),t[25]=c.RootDeviceName,t[26]=D);let O;t[27]===c.OwnerId?O=t[28]:(O=(0,s.jsx)(a,{label:`Owner`,value:c.OwnerId}),t[27]=c.OwnerId,t[28]=O);let k;t[29]===c.State?k=t[30]:(k=(0,s.jsx)(a,{label:`State`,value:c.State}),t[29]=c.State,t[30]=k);let A;t[31]!==p||t[32]!==c.Public||t[33]!==d?(A=d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Creation Date`,value:p}),(0,s.jsx)(a,{label:`Public`,value:c.Public?`Yes`:`No`})]}),t[31]=p,t[32]=c.Public,t[33]=d,t[34]=A):A=t[34];let j;t[35]!==x||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==O||t[42]!==k||t[43]!==A||t[44]!==_||t[45]!==v||t[46]!==y||t[47]!==b?(j=(0,s.jsxs)(i.Content,{children:[_,v,y,b,x,C,w,T,E,D,O,k,A]}),t[35]=x,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=O,t[42]=k,t[43]=A,t[44]=_,t[45]=v,t[46]=y,t[47]=b,t[48]=j):j=t[48];let M;t[49]!==j||t[50]!==h?(M=(0,s.jsxs)(i,{children:[h,j]}),t[49]=j,t[50]=h,t[51]=M):M=t[51];let N;t[52]!==c.BlockDeviceMappings||t[53]!==d?(N=d&&c.BlockDeviceMappings&&c.BlockDeviceMappings.length>0&&c.BlockDeviceMappings.map(l),t[52]=c.BlockDeviceMappings,t[53]=d,t[54]=N):N=t[54];let P;return t[55]!==M||t[56]!==N?(P=(0,s.jsxs)(s.Fragment,{children:[M,N]}),t[55]=M,t[56]=N,t[57]=P):P=t[57],P}function l(e){return(0,s.jsxs)(i,{children:[(0,s.jsxs)(i.Header,{children:[`Block Device: `,e.DeviceName]}),(0,s.jsxs)(i.Content,{children:[(0,s.jsx)(a,{label:`Device Name`,value:e.DeviceName}),e.Ebs&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Volume Size`,value:e.Ebs.VolumeSize?`${e.Ebs.VolumeSize} GB`:void 0}),(0,s.jsx)(a,{label:`Volume Type`,value:e.Ebs.VolumeType}),(0,s.jsx)(a,{label:`Delete On Termination`,value:e.Ebs.DeleteOnTermination?`Yes`:`No`}),(0,s.jsx)(a,{label:`Encrypted`,value:e.Ebs.Encrypted?`Yes`:`No`}),e.Ebs.SnapshotId&&(0,s.jsx)(a,{label:`Snapshot ID`,value:(0,s.jsx)(n,{className:`text-primary hover:underline`,params:{id:e.Ebs.SnapshotId},to:`/ec2/describe-snapshots/$id`,children:e.Ebs.SnapshotId})})]}),e.VirtualName&&(0,s.jsx)(a,{label:`Virtual Name`,value:e.VirtualName})]})]},e.DeviceName)}export{c as t};
@@ -1 +1 @@
import{Io as e,Yo as t,es as n,qo as r}from"./index.js";var i=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=r(),o=n();function s(e){let n=(0,a.c)(7),r,s;n[0]===e?(r=n[1],s=n[2]):({children:r,...s}=e,n[0]=e,n[1]=r,n[2]=s);let c;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),n[3]=c):c=n[3];let l;return n[4]!==r||n[5]!==s?(l=(0,o.jsxs)(t,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),n[4]=r,n[5]=s,n[6]=l):l=n[6],l}export{s as t};
import{Fo as e,Ho as t,Lo as n,wo as r}from"./index.js";var i=r(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=e(),o=t();function s(e){let t=(0,a.c)(7),r,s;t[0]===e?(r=t[1],s=t[2]):({children:r,...s}=e,t[0]=e,t[1]=r,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),t[3]=c):c=t[3];let l;return t[4]!==r||t[5]!==s?(l=(0,o.jsxs)(n,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),t[4]=r,t[5]=s,t[6]=l):l=t[6],l}export{s as t};
+1 -1
View File
@@ -1 +1 @@
import{Ko as e,Lo as t,Ro as n,do as r,qo as i}from"./index.js";var a=i(),o=t(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(t){let i=(0,a.c)(13),s,c,l,u,d;if(i[0]!==t){let{className:a,variant:f,render:p,...m}=t;s=p,d=f===void 0?`default`:f,u=n,c=`span`,l=e({className:r(o({className:a,variant:d}))},m),i[0]=t,i[1]=s,i[2]=c,i[3]=l,i[4]=u,i[5]=d}else s=i[1],c=i[2],l=i[3],u=i[4],d=i[5];let f;i[6]===d?f=i[7]:(f={slot:`badge`,variant:d},i[6]=d,i[7]=f);let p;return i[8]!==s||i[9]!==c||i[10]!==l||i[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},i[8]=s,i[9]=c,i[10]=l,i[11]=f,i[12]=p):p=i[12],u(p)}export{s as t};
import{$a as e,Eo as t,Fo as n,Po as r,To as i}from"./index.js";var a=n(),o=i(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(n){let i=(0,a.c)(13),s,c,l,u,d;if(i[0]!==n){let{className:a,variant:f,render:p,...m}=n;s=p,d=f===void 0?`default`:f,u=t,c=`span`,l=r({className:e(o({className:a,variant:d}))},m),i[0]=n,i[1]=s,i[2]=c,i[3]=l,i[4]=u,i[5]=d}else s=i[1],c=i[2],l=i[3],u=i[4],d=i[5];let f;i[6]===d?f=i[7]:(f={slot:`badge`,variant:d},i[6]=d,i[7]=f);let p;return i[8]!==s||i[9]!==c||i[10]!==l||i[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},i[8]=s,i[9]=c,i[10]=l,i[11]=f,i[12]=p):p=i[12],u(p)}export{s as t};
+1 -1
View File
@@ -1 +1 @@
import{do as e,es as t,qo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(10),a,o,s;n[0]===t?(a=n[1],o=n[2],s=n[3]):({className:a,size:s,...o}=t,n[0]=t,n[1]=a,n[2]=o,n[3]=s);let c=s===void 0?`default`:s,l;n[4]===a?l=n[5]:(l=e(`group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,a),n[4]=a,n[5]=l);let u;return n[6]!==o||n[7]!==c||n[8]!==l?(u=(0,i.jsx)(`div`,{className:l,"data-size":c,"data-slot":`card`,...o}),n[6]=o,n[7]=c,n[8]=l,n[9]=u):u=n[9],u}function o(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-header`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function s(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`text-sm font-medium`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-title`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function c(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-action`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function l(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`px-4 group-data-[size=sm]/card:px-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-content`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function u(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex items-center rounded-b-lg px-4 group-data-[size=sm]/card:px-3 [.border-t]:pt-4 group-data-[size=sm]/card:[.border-t]:pt-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-footer`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{o as a,u as i,c as n,s as o,l as r,a as t};
import{$a as e,Fo as t,Ho as n}from"./index.js";var r=t(),i=n();function a(t){let n=(0,r.c)(10),a,o,s;n[0]===t?(a=n[1],o=n[2],s=n[3]):({className:a,size:s,...o}=t,n[0]=t,n[1]=a,n[2]=o,n[3]=s);let c=s===void 0?`default`:s,l;n[4]===a?l=n[5]:(l=e(`group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,a),n[4]=a,n[5]=l);let u;return n[6]!==o||n[7]!==c||n[8]!==l?(u=(0,i.jsx)(`div`,{className:l,"data-size":c,"data-slot":`card`,...o}),n[6]=o,n[7]=c,n[8]=l,n[9]=u):u=n[9],u}function o(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-header`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function s(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`text-sm font-medium`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-title`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function c(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-action`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function l(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`px-4 group-data-[size=sm]/card:px-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-content`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function u(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex items-center rounded-b-lg px-4 group-data-[size=sm]/card:px-3 [.border-t]:pt-4 group-data-[size=sm]/card:[.border-t]:pt-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-footer`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{o as a,u as i,c as n,s as o,l as r,a as t};
@@ -1 +0,0 @@
import{n as e,t}from"./error-banner.js";import{$o as n,Cr as r,Dr as i,Sr as a,bs as o,bt as s,es as c,qo as l,ts as u,wr as d}from"./index.js";import{a as f,t as p}from"./field.js";import{a as m,i as h,l as g,n as _,o as v,r as y,s as ee,t as te}from"./alert-dialog.js";import{t as b}from"./textarea.js";var x=class extends i.classBuilder().ep(r).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ImportCertificate`,{}).n(`ACMClient`,`ImportCertificateCommand`).sc(a).build(){},S=o(u(),1),C=l(),w=new TextEncoder;function T(){let t=(0,C.c)(2),r=n(),i;return t[0]===r?i=t[1]:(i={mutationFn:E,onSuccess:()=>{r.invalidateQueries({queryKey:[`acm`,`certificates`]})}},t[0]=r,t[1]=i),e(i)}async function E(e){let t=new x({Certificate:w.encode(e.certificate),PrivateKey:w.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?w.encode(e.certificateChain):void 0});return await s().send(t)}var D=c();function O(e){let n=(0,C.c)(54),{open:r,onOpenChange:i,onImported:a}=e,[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),x=T(),w;n[0]===x?w=n[1]:(w=()=>{s(``),l(``),d(``),x.reset()},n[0]=x,n[1]=w);let E=w,O;n[2]!==i||n[3]!==E?(O=e=>{e||E(),i(e)},n[2]=i,n[3]=E,n[4]=O):O=n[4];let k=O,A;n[5]!==o||n[6]!==c?(A=o.trim().length>0&&c.trim().length>0,n[5]=o,n[6]=c,n[7]=A):A=n[7];let j=A,M;n[8]!==j||n[9]!==o||n[10]!==u||n[11]!==x||n[12]!==a||n[13]!==i||n[14]!==c||n[15]!==E?(M=async()=>{if(j)try{let e=await x.mutateAsync({certificate:o,privateKey:c,certificateChain:u});e.CertificateArn&&a(e.CertificateArn),E(),i(!1)}catch{}},n[8]=j,n[9]=o,n[10]=u,n[11]=x,n[12]=a,n[13]=i,n[14]=c,n[15]=E,n[16]=M):M=n[16];let N=M,P;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(P={maxWidth:`36rem`,width:`calc(100vw - 2rem)`},n[17]=P):P=n[17];let F;n[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,D.jsxs)(ee,{children:[(0,D.jsx)(g,{children:`Import certificate`}),(0,D.jsx)(m,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),n[18]=F):F=n[18];let I;n[19]===x.error?I=n[20]:(I=x.error&&(0,D.jsx)(t,{error:x.error,msg:`Failed to import certificate`}),n[19]=x.error,n[20]=I);let L;n[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),n[21]=L):L=n[21];let R;n[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>s(e.target.value),n[22]=R):R=n[22];let z;n[23]===o?z=n[24]:(z=(0,D.jsxs)(p,{children:[L,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:o})]}),n[23]=o,n[24]=z);let B;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),n[25]=B):B=n[25];let V;n[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>l(e.target.value),n[26]=V):V=n[26];let H;n[27]===c?H=n[28]:(H=(0,D.jsxs)(p,{children:[B,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:c})]}),n[27]=c,n[28]=H);let U;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),n[29]=U):U=n[29];let W;n[30]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>d(e.target.value),n[30]=W):W=n[30];let G;n[31]===u?G=n[32]:(G=(0,D.jsxs)(p,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:u})]}),n[31]=u,n[32]=G);let K;n[33]!==z||n[34]!==H||n[35]!==G?(K=(0,D.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),n[33]=z,n[34]=H,n[35]=G,n[36]=K):K=n[36];let q;n[37]===x.isPending?q=n[38]:(q=(0,D.jsx)(y,{disabled:x.isPending,children:`Cancel`}),n[37]=x.isPending,n[38]=q);let J=!j||x.isPending,Y=x.isPending?`Importing…`:`Import`,X;n[39]!==N||n[40]!==J||n[41]!==Y?(X=(0,D.jsx)(_,{disabled:J,onClick:N,children:Y}),n[39]=N,n[40]=J,n[41]=Y,n[42]=X):X=n[42];let Z;n[43]!==q||n[44]!==X?(Z=(0,D.jsxs)(v,{children:[q,X]}),n[43]=q,n[44]=X,n[45]=Z):Z=n[45];let Q;n[46]!==K||n[47]!==Z||n[48]!==I?(Q=(0,D.jsxs)(h,{className:`grid-cols-[minmax(0,1fr)]`,style:P,children:[F,I,K,Z]}),n[46]=K,n[47]=Z,n[48]=I,n[49]=Q):Q=n[49];let $;return n[50]!==k||n[51]!==r||n[52]!==Q?($=(0,D.jsx)(te,{onOpenChange:k,open:r,children:Q}),n[50]=k,n[51]=r,n[52]=Q,n[53]=$):$=n[53],$}export{O as t};
+1 -1
View File
@@ -1 +1 @@
import{Io as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
import{wo as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
@@ -1 +1 @@
import{Io as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
import{wo as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
@@ -1 +1 @@
import{Io as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
import{wo as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
@@ -1,3 +1,3 @@
import{t as e}from"./check.js";import{t}from"./chevron-down.js";import{t as n}from"./copy.js";import{Io as r,bs as i,co as a,do as o,es as s,qo as c,ts as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=r(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=c(),p=i(l(),1),m=s(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(`
import{t as e}from"./check.js";import{t}from"./chevron-down.js";import{t as n}from"./copy.js";import{$a as r,Fo as i,Ho as a,Uo as o,Xa as s,cs as c,wo as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=l(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=i(),p=c(o(),1),m=a(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(`
`)}function _(r){let i=(0,f.c)(18),{commands:s}=r,[c,l]=(0,p.useState)(!1),{copied:h,copy:_}=u();if(s.length===0)return null;let b;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>l(y),i[0]=b):b=i[0];let x,S;i[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(d,{className:`size-3.5`}),S=(0,m.jsx)(`span`,{children:`AWS CLI`}),i[1]=x,i[2]=S):(x=i[1],S=i[2]);let C=c&&`rotate-180`,w;i[3]===C?w=i[4]:(w=o(`ml-auto size-3.5 transition-transform`,C),i[3]=C,i[4]=w);let T;i[5]===w?T=i[6]:(T=(0,m.jsx)(t,{className:w}),i[5]=w,i[6]=T);let E;i[7]!==c||i[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":c,children:[x,S,T]}),i[7]=c,i[8]=T,i[9]=E):E=i[9];let D;i[10]!==s||i[11]!==h||i[12]!==_||i[13]!==c?(D=c&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:s.length>1?`${s.length} commands`:`command`}),(0,m.jsxs)(a,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await _(g(s)),children:[h?(0,m.jsx)(e,{className:`size-2.5`}):(0,m.jsx)(n,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:s.map((e,t)=>(0,m.jsxs)(`div`,{children:[s.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(v)})}),t<s.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),i[10]=s,i[11]=h,i[12]=_,i[13]=c,i[14]=D):D=i[14];let O;return i[15]!==E||i[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),i[15]=E,i[16]=D,i[17]=O):O=i[17],O}function v(e,t){return(0,m.jsx)(`span`,{className:h[e.type],children:e.value},t)}function y(e){return!e}export{_ as t};
`)}function _(i){let a=(0,f.c)(18),{commands:o}=i,[c,l]=(0,p.useState)(!1),{copied:h,copy:_}=u();if(o.length===0)return null;let b;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>l(y),a[0]=b):b=a[0];let x,S;a[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(d,{className:`size-3.5`}),S=(0,m.jsx)(`span`,{children:`AWS CLI`}),a[1]=x,a[2]=S):(x=a[1],S=a[2]);let C=c&&`rotate-180`,w;a[3]===C?w=a[4]:(w=r(`ml-auto size-3.5 transition-transform`,C),a[3]=C,a[4]=w);let T;a[5]===w?T=a[6]:(T=(0,m.jsx)(t,{className:w}),a[5]=w,a[6]=T);let E;a[7]!==c||a[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":c,children:[x,S,T]}),a[7]=c,a[8]=T,a[9]=E):E=a[9];let D;a[10]!==o||a[11]!==h||a[12]!==_||a[13]!==c?(D=c&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:o.length>1?`${o.length} commands`:`command`}),(0,m.jsxs)(s,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await _(g(o)),children:[h?(0,m.jsx)(e,{className:`size-2.5`}):(0,m.jsx)(n,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:o.map((e,t)=>(0,m.jsxs)(`div`,{children:[o.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(v)})}),t<o.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),a[10]=o,a[11]=h,a[12]=_,a[13]=c,a[14]=D):D=a[14];let O;return a[15]!==E||a[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),a[15]=E,a[16]=D,a[17]=O):O=a[17],O}function v(e,t){return(0,m.jsx)(`span`,{className:h[e.type],children:e.value},t)}function y(e){return!e}export{_ as t};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{Io as e}from"./index.js";var t=e(`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`}]]);export{t};
import{wo as e}from"./index.js";var t=e(`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`}]]);export{t};
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{t as r}from"./s3.js";import{$r as i,Xo as a,ca as o,es as s,qo as c,ti as l}from"./index.js";import{a as u,i as d,t as f}from"./zod.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";var v=c(),y=i({bucketName:l().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=s();function x(){let i=(0,v.c)(44),s=a(),c=r(),l;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={resolver:f(y)},i[0]=l):l=i[0];let{handleSubmit:x,register:C,control:w,formState:T}=d(l),{errors:E,isSubmitting:D}=T,O;i[1]===w?O=i[2]:(O={control:w},i[1]=w,i[2]=O);let k=u(O),A;i[3]===k?A=i[4]:(A=e=>e?k[e]:void 0,i[3]=k,i[4]=A);let j=A,M;i[5]!==c||i[6]!==s?(M=async e=>{await c.mutateAsync(e),s({to:`/s3/ls`})},i[5]=c,i[6]=s,i[7]=M):M=i[7];let N=M,P,F;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(t,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(m,{title:`Create Bucket`}),i[8]=P,i[9]=F):(P=i[8],F=i[9]);let I;i[10]===c.error?I=i[11]:(I=c.error&&(0,b.jsx)(e,{error:c.error,msg:`Failed to create bucket`}),i[10]=c.error,i[11]=I);let L;i[12]!==x||i[13]!==N?(L=x(N),i[12]=x,i[13]=N,i[14]=L):L=i[14];let R;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),i[15]=R):R=i[15];let z=!!E.bucketName,B;i[16]===C?B=i[17]:(B=C(`bucketName`),i[16]=C,i[17]=B);let V;i[18]!==z||i[19]!==B?(V=(0,b.jsx)(o,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),i[18]=z,i[19]=B,i[20]=V):V=i[20];let H;i[21]===E.bucketName?H=i[22]:(H=(0,b.jsx)(g,{errors:[E.bucketName]}),i[21]=E.bucketName,i[22]=H);let U;i[23]!==V||i[24]!==H?(U=(0,b.jsxs)(_,{children:[R,V,H]}),i[23]=V,i[24]=H,i[25]=U):U=i[25];let W;i[26]===j?W=i[27]:(W=S(j),i[26]=j,i[27]=W);let G;i[28]===W?G=i[29]:(G=(0,b.jsx)(n,{commands:W}),i[28]=W,i[29]=G);let K;i[30]===s?K=i[31]:(K=async()=>await s({to:`/s3/ls`}),i[30]=s,i[31]=K);let q;i[32]!==c.isPending||i[33]!==D||i[34]!==K?(q=(0,b.jsx)(p,{isPending:c.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),i[32]=c.isPending,i[33]=D,i[34]=K,i[35]=q):q=i[35];let J;i[36]!==U||i[37]!==G||i[38]!==q||i[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),i[36]=U,i[37]=G,i[38]=q,i[39]=L,i[40]=J):J=i[40];let Y;return i[41]!==J||i[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),i[41]=J,i[42]=I,i[43]=Y):Y=i[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<BucketName>`}`}]}]}export{x as component};
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{t as r}from"./s3.js";import{Fo as i,Ho as a,Ro as o,Ur as s,Vr as c,Xi as l}from"./index.js";import{i as u,t as d}from"./zod.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";var _=i(),v=c({bucketName:s().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),y=a();function b(){let i=(0,_.c)(40),a=o(),s=r(),c;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={resolver:d(v)},i[0]=c):c=i[0];let{handleSubmit:b,register:S,watch:C,formState:w}=u(c),{errors:T,isSubmitting:E}=w,D;i[1]!==s||i[2]!==a?(D=async e=>{await s.mutateAsync(e),a({to:`/s3/ls`})},i[1]=s,i[2]=a,i[3]=D):D=i[3];let O=D,k,A;i[4]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,y.jsx)(t,{to:`/s3/ls`,children:`Back to buckets`}),A=(0,y.jsx)(p,{title:`Create Bucket`}),i[4]=k,i[5]=A):(k=i[4],A=i[5]);let j;i[6]===s.error?j=i[7]:(j=s.error&&(0,y.jsx)(e,{error:s.error,msg:`Failed to create bucket`}),i[6]=s.error,i[7]=j);let M;i[8]!==b||i[9]!==O?(M=b(O),i[8]=b,i[9]=O,i[10]=M):M=i[10];let N;i[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),i[11]=N):N=i[11];let P=!!T.bucketName,F;i[12]===S?F=i[13]:(F=S(`bucketName`),i[12]=S,i[13]=F);let I;i[14]!==P||i[15]!==F?(I=(0,y.jsx)(l,{"aria-invalid":P,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...F}),i[14]=P,i[15]=F,i[16]=I):I=i[16];let L;i[17]===T.bucketName?L=i[18]:(L=(0,y.jsx)(h,{errors:[T.bucketName]}),i[17]=T.bucketName,i[18]=L);let R;i[19]!==I||i[20]!==L?(R=(0,y.jsxs)(g,{children:[N,I,L]}),i[19]=I,i[20]=L,i[21]=R):R=i[21];let z;i[22]===C?z=i[23]:(z=x(C),i[22]=C,i[23]=z);let B;i[24]===z?B=i[25]:(B=(0,y.jsx)(n,{commands:z}),i[24]=z,i[25]=B);let V;i[26]===a?V=i[27]:(V=async()=>await a({to:`/s3/ls`}),i[26]=a,i[27]=V);let H;i[28]!==s.isPending||i[29]!==E||i[30]!==V?(H=(0,y.jsx)(f,{isPending:s.isPending,isSubmitting:E,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),i[28]=s.isPending,i[29]=E,i[30]=V,i[31]=H):H=i[31];let U;i[32]!==R||i[33]!==B||i[34]!==H||i[35]!==M?(U=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:M,children:[R,B,H]}),i[32]=R,i[33]=B,i[34]=H,i[35]=M,i[36]=U):U=i[36];let W;return i[37]!==U||i[38]!==j?(W=(0,y.jsxs)(y.Fragment,{children:[k,A,j,U]}),i[37]=U,i[38]=j,i[39]=W):W=i[39],W}function x(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<BucketName>`}`}]}]}export{b as component};
@@ -1,2 +1,2 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{d as r}from"./ec2.js";import{Xo as i,ca as a,es as o,qo as s}from"./index.js";import{a as c,i as l,t as u}from"./zod.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{a as h}from"./ec22.js";var g=s(),_=o();function v(){let o=(0,g.c)(36),s=i(),v=r(),b;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},o[0]=b):b=o[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;o[1]===x?E=o[2]:(E={control:x},o[1]=x,o[2]=E);let D=c(E),O;o[3]!==v||o[4]!==s?(O=async e=>{let t=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;s(t?{to:`/ec2/describe-internet-gateways/$id`,params:{id:t}}:{to:`/ec2/describe-internet-gateways`})},o[3]=v,o[4]=s,o[5]=O):O=o[5];let k=O,A,j;o[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(t,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(f,{title:`Create Internet Gateway`}),o[6]=A,o[7]=j):(A=o[6],j=o[7]);let M;o[8]===v.error?M=o[9]:(M=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create Internet Gateway`}),o[8]=v.error,o[9]=M);let N;o[10]!==S||o[11]!==k?(N=S(k),o[10]=S,o[11]=k,o[12]=N):N=o[12];let P;o[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),o[13]=P):P=o[13];let F;o[14]===C?F=o[15]:(F=C(`name`),o[14]=C,o[15]=F);let I;o[16]===F?I=o[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(a,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),o[16]=F,o[17]=I);let L=D.name??``,R;o[18]===L?R=o[19]:(R=y(L),o[18]=L,o[19]=R);let z;o[20]===R?z=o[21]:(z=(0,_.jsx)(n,{commands:R}),o[20]=R,o[21]=z);let B;o[22]===s?B=o[23]:(B=async()=>await s({to:`/ec2/describe-internet-gateways`}),o[22]=s,o[23]=B);let V;o[24]!==v.isPending||o[25]!==T||o[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),o[24]=v.isPending,o[25]=T,o[26]=B,o[27]=V):V=o[27];let H;o[28]!==I||o[29]!==z||o[30]!==V||o[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),o[28]=I,o[29]=z,o[30]=V,o[31]=N,o[32]=H):H=o[32];let U;return o[33]!==H||o[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),o[33]=H,o[34]=M,o[35]=U):U=o[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-internet-gateway`}];return e.trim()&&t.push({type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{d as r}from"./ec2.js";import{Fo as i,Ho as a,Ro as o,Xi as s}from"./index.js";import{a as c,i as l,t as u}from"./zod.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{a as h}from"./ec22.js";var g=i(),_=a();function v(){let i=(0,g.c)(36),a=o(),v=r(),b;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},i[0]=b):b=i[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;i[1]===x?E=i[2]:(E={control:x},i[1]=x,i[2]=E);let D=c(E),O;i[3]!==v||i[4]!==a?(O=async e=>{let t=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;a(t?{to:`/ec2/describe-internet-gateways/$id`,params:{id:t}}:{to:`/ec2/describe-internet-gateways`})},i[3]=v,i[4]=a,i[5]=O):O=i[5];let k=O,A,j;i[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(t,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(f,{title:`Create Internet Gateway`}),i[6]=A,i[7]=j):(A=i[6],j=i[7]);let M;i[8]===v.error?M=i[9]:(M=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create Internet Gateway`}),i[8]=v.error,i[9]=M);let N;i[10]!==S||i[11]!==k?(N=S(k),i[10]=S,i[11]=k,i[12]=N):N=i[12];let P;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),i[13]=P):P=i[13];let F;i[14]===C?F=i[15]:(F=C(`name`),i[14]=C,i[15]=F);let I;i[16]===F?I=i[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(s,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),i[16]=F,i[17]=I);let L=D.name??``,R;i[18]===L?R=i[19]:(R=y(L),i[18]=L,i[19]=R);let z;i[20]===R?z=i[21]:(z=(0,_.jsx)(n,{commands:R}),i[20]=R,i[21]=z);let B;i[22]===a?B=i[23]:(B=async()=>await a({to:`/ec2/describe-internet-gateways`}),i[22]=a,i[23]=B);let V;i[24]!==v.isPending||i[25]!==T||i[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),i[24]=v.isPending,i[25]=T,i[26]=B,i[27]=V):V=i[27];let H;i[28]!==I||i[29]!==z||i[30]!==V||i[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),i[28]=I,i[29]=z,i[30]=V,i[31]=N,i[32]=H):H=i[32];let U;return i[33]!==H||i[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),i[33]=H,i[34]=M,i[35]=U):U=i[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-internet-gateway`}];return e.trim()&&t.push({type:`flag`,value:` \\
--tag-specifications`},{type:`value`,value:` 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=${e.trim()}}]'`}),[{label:`Create Internet Gateway`,parts:t}]}export{v as component};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as ee}from"./select.js";import{t as o}from"./cli-command-panel.js";import{m as s}from"./ec2.js";import{Xo as c,ca as l,es as u,qo as d}from"./index.js";import{a as f,i as p,n as te,t as ne}from"./zod.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{c as _}from"./ec22.js";var v=d(),y=u();function b(){let u=(0,v.c)(56),d=c(),b=s(),x;u[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:ne(_),defaultValues:{groupName:``,strategy:`spread`}},u[0]=x):x=u[0];let{control:S,handleSubmit:C,register:w,formState:oe}=p(x),{errors:T,isSubmitting:E}=oe,D;u[1]===S?D=u[2]:(D={control:S},u[1]=S,u[2]=D);let O=f(D),k;u[3]===O?k=u[4]:(k=e=>e?O[e]:void 0,u[3]=O,u[4]=k);let A=k,j;u[5]!==b||u[6]!==d?(j=async e=>{d({to:`/ec2/describe-placement-groups/$id`,params:{id:(await b.mutateAsync(e)).PlacementGroup?.GroupId??``}})},u[5]=b,u[6]=d,u[7]=j):j=u[7];let M=j,N,P;u[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(t,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(ie,{title:`Create Placement Group`}),u[8]=N,u[9]=P):(N=u[8],P=u[9]);let F;u[10]===b.error?F=u[11]:(F=b.error&&(0,y.jsx)(e,{error:b.error,msg:`Failed to create placement group`}),u[10]=b.error,u[11]=F);let I;u[12]!==C||u[13]!==M?(I=C(M),u[12]=C,u[13]=M,u[14]=I):I=u[14];let L;u[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),u[15]=L):L=u[15];let R=!!T.groupName,z;u[16]===w?z=u[17]:(z=w(`groupName`),u[16]=w,u[17]=z);let B;u[18]!==R||u[19]!==z?(B=(0,y.jsx)(l,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),u[18]=R,u[19]=z,u[20]=B):B=u[20];let V;u[21]===T.groupName?V=u[22]:(V=(0,y.jsx)(h,{errors:[T.groupName]}),u[21]=T.groupName,u[22]=V);let H;u[23]!==B||u[24]!==V?(H=(0,y.jsxs)(g,{children:[L,B,V]}),u[23]=B,u[24]=V,u[25]=H):H=u[25];let U;u[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),u[26]=U):U=u[26];let W;u[27]===T.strategy?W=u[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(ee,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(a,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(n,{})}),(0,y.jsxs)(i,{children:[(0,y.jsx)(r,{value:`spread`,children:`spread`}),(0,y.jsx)(r,{value:`cluster`,children:`cluster`})]})]})},u[27]=T.strategy,u[28]=W);let G;u[29]!==S||u[30]!==W?(G=(0,y.jsx)(te,{control:S,name:`strategy`,render:W}),u[29]=S,u[30]=W,u[31]=G):G=u[31];let K;u[32]===T.strategy?K=u[33]:(K=(0,y.jsx)(h,{errors:[T.strategy]}),u[32]=T.strategy,u[33]=K);let q;u[34]!==G||u[35]!==K?(q=(0,y.jsxs)(g,{children:[U,G,K]}),u[34]=G,u[35]=K,u[36]=q):q=u[36];let J;u[37]===A?J=u[38]:(J=ae(A),u[37]=A,u[38]=J);let Y;u[39]===J?Y=u[40]:(Y=(0,y.jsx)(o,{commands:J}),u[39]=J,u[40]=Y);let X;u[41]===d?X=u[42]:(X=async()=>await d({to:`/ec2/describe-placement-groups`}),u[41]=d,u[42]=X);let Z;u[43]!==b.isPending||u[44]!==E||u[45]!==X?(Z=(0,y.jsx)(re,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),u[43]=b.isPending,u[44]=E,u[45]=X,u[46]=Z):Z=u[46];let Q;u[47]!==H||u[48]!==q||u[49]!==Y||u[50]!==Z||u[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),u[47]=H,u[48]=q,u[49]=Y,u[50]=Z,u[51]=I,u[52]=Q):Q=u[52];let $;return u[53]!==Q||u[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),u[53]=Q,u[54]=F,u[55]=$):$=u[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\
--group-name`},{type:`value`,value:` ${n?x(n):`<GroupName>`}`},{type:`flag`,value:` \\
--strategy`},{type:`value`,value:` ${i||`spread`}`}]}]}export{b as component};
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as o}from"./select.js";import{t as s}from"./cli-command-panel.js";import{m as c}from"./ec2.js";import{Fo as l,Ho as u,Ro as ee,Xi as te}from"./index.js";import{i as d,n as f,t as p}from"./zod.js";import{t as m}from"./form-actions.js";import{t as ne}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";import{c as v}from"./ec22.js";var y=l(),b=u();function x(){let l=(0,y.c)(52),u=ee(),x=c(),S;l[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:p(v),defaultValues:{groupName:``,strategy:`spread`}},l[0]=S):S=l[0];let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=d(S),{errors:k,isSubmitting:A}=O,j;l[1]!==x||l[2]!==u?(j=async e=>{u({to:`/ec2/describe-placement-groups/$id`,params:{id:(await x.mutateAsync(e)).PlacementGroup?.GroupId??``}})},l[1]=x,l[2]=u,l[3]=j):j=l[3];let M=j,N,P;l[4]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,b.jsx)(t,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,b.jsx)(ne,{title:`Create Placement Group`}),l[4]=N,l[5]=P):(N=l[4],P=l[5]);let F;l[6]===x.error?F=l[7]:(F=x.error&&(0,b.jsx)(e,{error:x.error,msg:`Failed to create placement group`}),l[6]=x.error,l[7]=F);let I;l[8]!==T||l[9]!==M?(I=T(M),l[8]=T,l[9]=M,l[10]=I):I=l[10];let L;l[11]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),l[11]=L):L=l[11];let R=!!k.groupName,z;l[12]===E?z=l[13]:(z=E(`groupName`),l[12]=E,l[13]=z);let B;l[14]!==R||l[15]!==z?(B=(0,b.jsx)(te,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),l[14]=R,l[15]=z,l[16]=B):B=l[16];let V;l[17]===k.groupName?V=l[18]:(V=(0,b.jsx)(g,{errors:[k.groupName]}),l[17]=k.groupName,l[18]=V);let H;l[19]!==B||l[20]!==V?(H=(0,b.jsxs)(_,{children:[L,B,V]}),l[19]=B,l[20]=V,l[21]=H):H=l[21];let U;l[22]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),l[22]=U):U=l[22];let W;l[23]===k.strategy?W=l[24]:(W=e=>{let{field:t}=e;return(0,b.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,b.jsx)(a,{"aria-invalid":!!k.strategy,className:`w-full`,id:`strategy`,children:(0,b.jsx)(n,{})}),(0,b.jsxs)(i,{children:[(0,b.jsx)(r,{value:`spread`,children:`spread`}),(0,b.jsx)(r,{value:`cluster`,children:`cluster`})]})]})},l[23]=k.strategy,l[24]=W);let G;l[25]!==w||l[26]!==W?(G=(0,b.jsx)(f,{control:w,name:`strategy`,render:W}),l[25]=w,l[26]=W,l[27]=G):G=l[27];let K;l[28]===k.strategy?K=l[29]:(K=(0,b.jsx)(g,{errors:[k.strategy]}),l[28]=k.strategy,l[29]=K);let q;l[30]!==G||l[31]!==K?(q=(0,b.jsxs)(_,{children:[U,G,K]}),l[30]=G,l[31]=K,l[32]=q):q=l[32];let J;l[33]===D?J=l[34]:(J=C(D),l[33]=D,l[34]=J);let Y;l[35]===J?Y=l[36]:(Y=(0,b.jsx)(s,{commands:J}),l[35]=J,l[36]=Y);let X;l[37]===u?X=l[38]:(X=async()=>await u({to:`/ec2/describe-placement-groups`}),l[37]=u,l[38]=X);let Z;l[39]!==x.isPending||l[40]!==A||l[41]!==X?(Z=(0,b.jsx)(m,{isPending:x.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),l[39]=x.isPending,l[40]=A,l[41]=X,l[42]=Z):Z=l[42];let Q;l[43]!==H||l[44]!==q||l[45]!==Y||l[46]!==Z||l[47]!==I?(Q=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),l[43]=H,l[44]=q,l[45]=Y,l[46]=Z,l[47]=I,l[48]=Q):Q=l[48];let $;return l[49]!==Q||l[50]!==F?($=(0,b.jsxs)(b.Fragment,{children:[N,P,F,Q]}),l[49]=Q,l[50]=F,l[51]=$):$=l[51],$}function S(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function C(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\
--group-name`},{type:`value`,value:` ${n?S(n):`<GroupName>`}`},{type:`flag`,value:` \\
--strategy`},{type:`value`,value:` ${i||`spread`}`}]}]}export{x as component};
@@ -1,4 +1,4 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{r}from"./iam.js";import{Xo as i,ca as a,es as o,qo as s}from"./index.js";import{a as c,i as ee,t as te}from"./zod.js";import{t as ne}from"./form-actions.js";import{t as re}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ie}from"./textarea.js";import{t as f}from"./iam2.js";var ae=s(),p=o(),oe=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function m(){let o=(0,ae.c)(67),s=i(),m=r(),h;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={resolver:te(f),defaultValues:{policyDocument:oe}},o[0]=h):h=o[0];let{handleSubmit:g,register:_,control:v,formState:ce}=ee(h),{errors:y,isSubmitting:b}=ce,x;o[1]===v?x=o[2]:(x={control:v},o[1]=v,o[2]=x);let S=c(x),C;o[3]===S?C=o[4]:(C=e=>e?S[e]:void 0,o[3]=S,o[4]=C);let w=C,T;o[5]!==m||o[6]!==s?(T=async e=>{await m.mutateAsync(e),s({to:`/iam/list-policies`})},o[5]=m,o[6]=s,o[7]=T):T=o[7];let E=T,D,O;o[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,p.jsx)(t,{to:`/iam/list-policies`,children:`Back to policies`}),O=(0,p.jsx)(re,{title:`Create Policy`}),o[8]=D,o[9]=O):(D=o[8],O=o[9]);let k;o[10]===m.error?k=o[11]:(k=m.error&&(0,p.jsx)(e,{error:m.error,msg:`Failed to create policy`}),o[10]=m.error,o[11]=k);let A;o[12]!==g||o[13]!==E?(A=g(E),o[12]=g,o[13]=E,o[14]=A):A=o[14];let j;o[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),o[15]=j):j=o[15];let M=!!y.policyName,N;o[16]===_?N=o[17]:(N=_(`policyName`),o[16]=_,o[17]=N);let P;o[18]!==M||o[19]!==N?(P=(0,p.jsx)(a,{"aria-invalid":M,id:`policyName`,placeholder:`my-policy...`,...N}),o[18]=M,o[19]=N,o[20]=P):P=o[20];let F;o[21]===y.policyName?F=o[22]:(F=(0,p.jsx)(u,{errors:[y.policyName]}),o[21]=y.policyName,o[22]=F);let I;o[23]!==P||o[24]!==F?(I=(0,p.jsxs)(d,{children:[j,P,F]}),o[23]=P,o[24]=F,o[25]=I):I=o[25];let L;o[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),o[26]=L):L=o[26];let R;o[27]===_?R=o[28]:(R=_(`description`),o[27]=_,o[28]=R);let z;o[29]===R?z=o[30]:(z=(0,p.jsx)(a,{id:`description`,placeholder:`A brief description of this policy...`,...R}),o[29]=R,o[30]=z);let B;o[31]===y.description?B=o[32]:(B=(0,p.jsx)(u,{errors:[y.description]}),o[31]=y.description,o[32]=B);let V;o[33]!==z||o[34]!==B?(V=(0,p.jsxs)(d,{children:[L,z,B]}),o[33]=z,o[34]=B,o[35]=V):V=o[35];let H;o[36]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),o[36]=H):H=o[36];let U=!!y.policyDocument,W;o[37]===_?W=o[38]:(W=_(`policyDocument`),o[37]=_,o[38]=W);let G;o[39]!==U||o[40]!==W?(G=(0,p.jsx)(ie,{"aria-invalid":U,className:`font-mono text-sm`,id:`policyDocument`,rows:15,...W}),o[39]=U,o[40]=W,o[41]=G):G=o[41];let K;o[42]===y.policyDocument?K=o[43]:(K=(0,p.jsx)(u,{errors:[y.policyDocument]}),o[42]=y.policyDocument,o[43]=K);let q;o[44]!==G||o[45]!==K?(q=(0,p.jsxs)(d,{children:[H,G,K]}),o[44]=G,o[45]=K,o[46]=q):q=o[46];let J;o[47]===w?J=o[48]:(J=se(w),o[47]=w,o[48]=J);let Y;o[49]===J?Y=o[50]:(Y=(0,p.jsx)(n,{commands:J}),o[49]=J,o[50]=Y);let X;o[51]===s?X=o[52]:(X=async()=>await s({to:`/iam/list-policies`}),o[51]=s,o[52]=X);let Z;o[53]!==m.isPending||o[54]!==b||o[55]!==X?(Z=(0,p.jsx)(ne,{isPending:m.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),o[53]=m.isPending,o[54]=b,o[55]=X,o[56]=Z):Z=o[56];let Q;o[57]!==I||o[58]!==V||o[59]!==q||o[60]!==Y||o[61]!==Z||o[62]!==A?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,V,q,Y,Z]}),o[57]=I,o[58]=V,o[59]=q,o[60]=Y,o[61]=Z,o[62]=A,o[63]=Q):Q=o[63];let $;return o[64]!==Q||o[65]!==k?($=(0,p.jsxs)(p.Fragment,{children:[D,O,k,Q]}),o[64]=Q,o[65]=k,o[66]=$):$=o[66],$}function se(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{r}from"./iam.js";import{Fo as i,Ho as a,Ro as o,Xi as s}from"./index.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{t as h}from"./textarea.js";import{t as g}from"./iam2.js";var ee=i(),_=a(),te=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function v(){let i=(0,ee.c)(63),a=o(),v=r(),y;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={resolver:l(g),defaultValues:{policyDocument:te}},i[0]=y):y=i[0];let{handleSubmit:b,register:x,watch:S,formState:re}=c(y),{errors:C,isSubmitting:w}=re,T;i[1]!==v||i[2]!==a?(T=async e=>{await v.mutateAsync(e),a({to:`/iam/list-policies`})},i[1]=v,i[2]=a,i[3]=T):T=i[3];let E=T,D,O;i[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,_.jsx)(t,{to:`/iam/list-policies`,children:`Back to policies`}),O=(0,_.jsx)(d,{title:`Create Policy`}),i[4]=D,i[5]=O):(D=i[4],O=i[5]);let k;i[6]===v.error?k=i[7]:(k=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create policy`}),i[6]=v.error,i[7]=k);let A;i[8]!==b||i[9]!==E?(A=b(E),i[8]=b,i[9]=E,i[10]=A):A=i[10];let j;i[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),i[11]=j):j=i[11];let M=!!C.policyName,N;i[12]===x?N=i[13]:(N=x(`policyName`),i[12]=x,i[13]=N);let P;i[14]!==M||i[15]!==N?(P=(0,_.jsx)(s,{"aria-invalid":M,id:`policyName`,placeholder:`my-policy...`,...N}),i[14]=M,i[15]=N,i[16]=P):P=i[16];let F;i[17]===C.policyName?F=i[18]:(F=(0,_.jsx)(p,{errors:[C.policyName]}),i[17]=C.policyName,i[18]=F);let I;i[19]!==P||i[20]!==F?(I=(0,_.jsxs)(m,{children:[j,P,F]}),i[19]=P,i[20]=F,i[21]=I):I=i[21];let L;i[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[22]=L):L=i[22];let R;i[23]===x?R=i[24]:(R=x(`description`),i[23]=x,i[24]=R);let z;i[25]===R?z=i[26]:(z=(0,_.jsx)(s,{id:`description`,placeholder:`A brief description of this policy...`,...R}),i[25]=R,i[26]=z);let B;i[27]===C.description?B=i[28]:(B=(0,_.jsx)(p,{errors:[C.description]}),i[27]=C.description,i[28]=B);let V;i[29]!==z||i[30]!==B?(V=(0,_.jsxs)(m,{children:[L,z,B]}),i[29]=z,i[30]=B,i[31]=V):V=i[31];let H;i[32]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),i[32]=H):H=i[32];let U=!!C.policyDocument,W;i[33]===x?W=i[34]:(W=x(`policyDocument`),i[33]=x,i[34]=W);let G;i[35]!==U||i[36]!==W?(G=(0,_.jsx)(h,{"aria-invalid":U,className:`font-mono text-sm`,id:`policyDocument`,rows:15,...W}),i[35]=U,i[36]=W,i[37]=G):G=i[37];let K;i[38]===C.policyDocument?K=i[39]:(K=(0,_.jsx)(p,{errors:[C.policyDocument]}),i[38]=C.policyDocument,i[39]=K);let q;i[40]!==G||i[41]!==K?(q=(0,_.jsxs)(m,{children:[H,G,K]}),i[40]=G,i[41]=K,i[42]=q):q=i[42];let J;i[43]===S?J=i[44]:(J=ne(S),i[43]=S,i[44]=J);let Y;i[45]===J?Y=i[46]:(Y=(0,_.jsx)(n,{commands:J}),i[45]=J,i[46]=Y);let X;i[47]===a?X=i[48]:(X=async()=>await a({to:`/iam/list-policies`}),i[47]=a,i[48]=X);let Z;i[49]!==v.isPending||i[50]!==w||i[51]!==X?(Z=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),i[49]=v.isPending,i[50]=w,i[51]=X,i[52]=Z):Z=i[52];let Q;i[53]!==I||i[54]!==V||i[55]!==q||i[56]!==Y||i[57]!==Z||i[58]!==A?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,V,q,Y,Z]}),i[53]=I,i[54]=V,i[55]=q,i[56]=Y,i[57]=Z,i[58]=A,i[59]=Q):Q=i[59];let $;return i[60]!==Q||i[61]!==k?($=(0,_.jsxs)(_.Fragment,{children:[D,O,k,Q]}),i[60]=Q,i[61]=k,i[62]=$):$=i[62],$}function ne(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
--policy-name`},{type:`value`,value:` ${n||`<PolicyName>`}`}];return i&&s.push({type:`flag`,value:` \\
--description`},{type:`value`,value:` "${i}"`}),s.push({type:`flag`,value:` \\
--policy-document`},{type:`value`,value:` '${o||`<PolicyDocument>`}'`}),[{label:`Create Policy`,parts:s}]}export{v as component};
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{g as c}from"./ec2.js";import{Xo as l,_o as u,_t as d,ca as f,es as p,qo as m}from"./index.js";import{i as h,n as g,t as _}from"./zod.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{u as C}from"./ec22.js";var w=m(),T=p();function E(){let i=(0,w.c)(44),u=l(),{data:p}=t(d),m=c(),E;i[0]===p.Vpcs?E=i[1]:(E=p.Vpcs??[],i[0]=p.Vpcs,i[1]=E);let O=E,k;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:_(C),defaultValues:{vpcId:``,name:``}},i[2]=k):k=i[2];let{control:A,handleSubmit:j,register:M,formState:N}=h(k),{errors:P,isSubmitting:F}=N,I;i[3]!==m||i[4]!==u?(I=async e=>{let t=(await m.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;u(t?{to:`/ec2/describe-route-tables/$id`,params:{id:t}}:{to:`/ec2/describe-route-tables`})},i[3]=m,i[4]=u,i[5]=I):I=i[5];let L=I,R,z;i[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(n,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(y,{title:`Create Route Table`}),i[6]=R,i[7]=z):(R=i[6],z=i[7]);let B;i[8]===m.error?B=i[9]:(B=m.error&&(0,T.jsx)(e,{error:m.error,msg:`Failed to create Route Table`}),i[8]=m.error,i[9]=B);let V;i[10]!==j||i[11]!==L?(V=j(L),i[10]=j,i[11]=L,i[12]=V):V=i[12];let H;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),i[13]=H):H=i[13];let U;i[14]===M?U=i[15]:(U=M(`name`),i[14]=M,i[15]=U);let W;i[16]===U?W=i[17]:(W=(0,T.jsxs)(S,{children:[H,(0,T.jsx)(f,{id:`name`,placeholder:`my-route-table`,...U})]}),i[16]=U,i[17]=W);let G;i[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),i[18]=G):G=i[18];let K;i[19]!==P.vpcId||i[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(o,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(r,{placeholder:`Select a VPC`})}),(0,T.jsx)(a,{children:O.map(D)})]})},i[19]=P.vpcId,i[20]=O,i[21]=K):K=i[21];let q;i[22]!==A||i[23]!==K?(q=(0,T.jsx)(g,{control:A,name:`vpcId`,render:K}),i[22]=A,i[23]=K,i[24]=q):q=i[24];let J;i[25]===P.vpcId?J=i[26]:(J=(0,T.jsx)(x,{errors:[P.vpcId]}),i[25]=P.vpcId,i[26]=J);let Y;i[27]!==q||i[28]!==J?(Y=(0,T.jsxs)(S,{children:[G,q,J]}),i[27]=q,i[28]=J,i[29]=Y):Y=i[29];let X;i[30]===u?X=i[31]:(X=async()=>await u({to:`/ec2/describe-route-tables`}),i[30]=u,i[31]=X);let Z;i[32]!==m.isPending||i[33]!==F||i[34]!==X?(Z=(0,T.jsx)(v,{isPending:m.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),i[32]=m.isPending,i[33]=F,i[34]=X,i[35]=Z):Z=i[35];let Q;i[36]!==W||i[37]!==Y||i[38]!==Z||i[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),i[36]=W,i[37]=Y,i[38]=Z,i[39]=V,i[40]=Q):Q=i[40];let $;return i[41]!==Q||i[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),i[41]=Q,i[42]=B,i[43]=$):$=i[43],$}function D(e){let t=u(e.Tags);return(0,T.jsx)(i,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component};
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{g as c}from"./ec2.js";import{Fo as l,Ho as u,Ro as d,Xi as f,ao as p,ht as m}from"./index.js";import{i as h,n as g,t as _}from"./zod.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{u as C}from"./ec22.js";var w=l(),T=u();function E(){let i=(0,w.c)(44),l=d(),{data:u}=t(m),p=c(),E;i[0]===u.Vpcs?E=i[1]:(E=u.Vpcs??[],i[0]=u.Vpcs,i[1]=E);let O=E,k;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:_(C),defaultValues:{vpcId:``,name:``}},i[2]=k):k=i[2];let{control:A,handleSubmit:j,register:M,formState:N}=h(k),{errors:P,isSubmitting:F}=N,I;i[3]!==p||i[4]!==l?(I=async e=>{let t=(await p.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;l(t?{to:`/ec2/describe-route-tables/$id`,params:{id:t}}:{to:`/ec2/describe-route-tables`})},i[3]=p,i[4]=l,i[5]=I):I=i[5];let L=I,R,z;i[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(n,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(y,{title:`Create Route Table`}),i[6]=R,i[7]=z):(R=i[6],z=i[7]);let B;i[8]===p.error?B=i[9]:(B=p.error&&(0,T.jsx)(e,{error:p.error,msg:`Failed to create Route Table`}),i[8]=p.error,i[9]=B);let V;i[10]!==j||i[11]!==L?(V=j(L),i[10]=j,i[11]=L,i[12]=V):V=i[12];let H;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),i[13]=H):H=i[13];let U;i[14]===M?U=i[15]:(U=M(`name`),i[14]=M,i[15]=U);let W;i[16]===U?W=i[17]:(W=(0,T.jsxs)(S,{children:[H,(0,T.jsx)(f,{id:`name`,placeholder:`my-route-table`,...U})]}),i[16]=U,i[17]=W);let G;i[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),i[18]=G):G=i[18];let K;i[19]!==P.vpcId||i[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(o,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(r,{placeholder:`Select a VPC`})}),(0,T.jsx)(a,{children:O.map(D)})]})},i[19]=P.vpcId,i[20]=O,i[21]=K):K=i[21];let q;i[22]!==A||i[23]!==K?(q=(0,T.jsx)(g,{control:A,name:`vpcId`,render:K}),i[22]=A,i[23]=K,i[24]=q):q=i[24];let J;i[25]===P.vpcId?J=i[26]:(J=(0,T.jsx)(x,{errors:[P.vpcId]}),i[25]=P.vpcId,i[26]=J);let Y;i[27]!==q||i[28]!==J?(Y=(0,T.jsxs)(S,{children:[G,q,J]}),i[27]=q,i[28]=J,i[29]=Y):Y=i[29];let X;i[30]===l?X=i[31]:(X=async()=>await l({to:`/ec2/describe-route-tables`}),i[30]=l,i[31]=X);let Z;i[32]!==p.isPending||i[33]!==F||i[34]!==X?(Z=(0,T.jsx)(v,{isPending:p.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),i[32]=p.isPending,i[33]=F,i[34]=X,i[35]=Z):Z=i[35];let Q;i[36]!==W||i[37]!==Y||i[38]!==Z||i[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),i[36]=W,i[37]=Y,i[38]=Z,i[39]=V,i[40]=Q):Q=i[40];let $;return i[41]!==Q||i[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),i[41]=Q,i[42]=B,i[43]=$):$=i[43],$}function D(e){let t=p(e.Tags);return(0,T.jsx)(i,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component};
@@ -1,4 +1,4 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as ee}from"./back-link.js";import{c as n,i as r,n as i,s as te,t as a}from"./select.js";import{t as ne}from"./cli-command-panel.js";import{_ as re}from"./ec2.js";import{Xo as ie,_o as o,_t as ae,ca as oe,es as s,qo as c}from"./index.js";import{a as se,i as ce,n as le,t as ue}from"./zod.js";import{t as de}from"./form-actions.js";import{t as fe}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{d as pe}from"./ec22.js";var me=c(),f=s();function p(){let r=(0,me.c)(73),o=ie(),{data:s}=t(ae),c=re(),p;r[0]===s.Vpcs?p=r[1]:(p=s.Vpcs??[],r[0]=s.Vpcs,r[1]=p);let m=p,h;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=ue(pe),r[2]=h):h=r[2];let g=m[0]?.VpcId??``,_;r[3]===g?_=r[4]:(_={resolver:h,defaultValues:{groupName:``,description:``,vpcId:g}},r[3]=g,r[4]=_);let{control:v,handleSubmit:y,register:b,formState:_e}=ce(_),{errors:x,isSubmitting:ve}=_e,S;r[5]===v?S=r[6]:(S={control:v},r[5]=v,r[6]=S);let ye=se(S),C;r[7]===ye?C=r[8]:(C=e=>e?ye[e]:void 0,r[7]=ye,r[8]=C);let w=C,T;r[9]!==c||r[10]!==o?(T=async e=>{let t=(await c.mutateAsync(e)).GroupId;o(t?{to:`/ec2/describe-security-groups/$id`,params:{id:t}}:{to:`/ec2/describe-security-groups`})},r[9]=c,r[10]=o,r[11]=T):T=r[11];let E=T,D,O;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,f.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,f.jsx)(fe,{title:`Create Security Group`}),r[12]=D,r[13]=O):(D=r[12],O=r[13]);let k;r[14]===c.error?k=r[15]:(k=c.error&&(0,f.jsx)(e,{error:c.error,msg:`Failed to create security group`}),r[14]=c.error,r[15]=k);let A;r[16]!==y||r[17]!==E?(A=y(E),r[16]=y,r[17]=E,r[18]=A):A=r[18];let j;r[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),r[19]=j):j=r[19];let M=!!x.groupName,N;r[20]===b?N=r[21]:(N=b(`groupName`),r[20]=b,r[21]=N);let P;r[22]!==M||r[23]!==N?(P=(0,f.jsx)(oe,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),r[22]=M,r[23]=N,r[24]=P):P=r[24];let F;r[25]===x.groupName?F=r[26]:(F=(0,f.jsx)(u,{errors:[x.groupName]}),r[25]=x.groupName,r[26]=F);let I;r[27]!==P||r[28]!==F?(I=(0,f.jsxs)(d,{children:[j,P,F]}),r[27]=P,r[28]=F,r[29]=I):I=r[29];let L;r[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),r[30]=L):L=r[30];let R=!!x.description,z;r[31]===b?z=r[32]:(z=b(`description`),r[31]=b,r[32]=z);let B;r[33]!==R||r[34]!==z?(B=(0,f.jsx)(oe,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),r[33]=R,r[34]=z,r[35]=B):B=r[35];let V;r[36]===x.description?V=r[37]:(V=(0,f.jsx)(u,{errors:[x.description]}),r[36]=x.description,r[37]=V);let H;r[38]!==B||r[39]!==V?(H=(0,f.jsxs)(d,{children:[L,B,V]}),r[38]=B,r[39]=V,r[40]=H):H=r[40];let U;r[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),r[41]=U):U=r[41];let W;r[42]!==x.vpcId||r[43]!==m?(W=e=>{let{field:t}=e;return(0,f.jsxs)(a,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,f.jsx)(te,{"aria-invalid":!!x.vpcId,className:`w-full`,id:`vpcId`,children:(0,f.jsx)(n,{})}),(0,f.jsx)(i,{children:m.map(he)})]})},r[42]=x.vpcId,r[43]=m,r[44]=W):W=r[44];let G;r[45]!==v||r[46]!==W?(G=(0,f.jsx)(le,{control:v,name:`vpcId`,render:W}),r[45]=v,r[46]=W,r[47]=G):G=r[47];let K;r[48]===x.vpcId?K=r[49]:(K=(0,f.jsx)(u,{errors:[x.vpcId]}),r[48]=x.vpcId,r[49]=K);let q;r[50]!==G||r[51]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),r[50]=G,r[51]=K,r[52]=q):q=r[52];let J;r[53]===w?J=r[54]:(J=ge(w),r[53]=w,r[54]=J);let Y;r[55]===J?Y=r[56]:(Y=(0,f.jsx)(ne,{commands:J}),r[55]=J,r[56]=Y);let X;r[57]===o?X=r[58]:(X=async()=>await o({to:`/ec2/describe-security-groups`}),r[57]=o,r[58]=X);let Z;r[59]!==c.isPending||r[60]!==ve||r[61]!==X?(Z=(0,f.jsx)(de,{isPending:c.isPending,isSubmitting:ve,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),r[59]=c.isPending,r[60]=ve,r[61]=X,r[62]=Z):Z=r[62];let Q;r[63]!==A||r[64]!==I||r[65]!==H||r[66]!==q||r[67]!==Y||r[68]!==Z?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),r[63]=A,r[64]=I,r[65]=H,r[66]=q,r[67]=Y,r[68]=Z,r[69]=Q):Q=r[69];let $;return r[70]!==k||r[71]!==Q?($=(0,f.jsxs)(f.Fragment,{children:[D,O,k,Q]}),r[70]=k,r[71]=Q,r[72]=$):$=r[72],$}function he(e){let t=o(e.Tags);return(0,f.jsx)(r,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ge(e){let t=e(`groupName`),ee=typeof t==`string`?t:``,n=e(`description`),r=typeof n==`string`?n:``,i=e(`vpcId`),te=typeof i==`string`?i:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as ee}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{_ as ne}from"./ec2.js";import{Fo as s,Ho as c,Ro as re,Xi as ie,ao as l,ht as ae}from"./index.js";import{i as oe,n as se,t as ce}from"./zod.js";import{t as le}from"./form-actions.js";import{t as ue}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{d as de}from"./ec22.js";var fe=s(),p=c();function m(){let r=(0,fe.c)(69),s=re(),{data:c}=t(ae),l=ne(),m;r[0]===c.Vpcs?m=r[1]:(m=c.Vpcs??[],r[0]=c.Vpcs,r[1]=m);let h=m,g;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=ce(de),r[2]=g):g=r[2];let _=h[0]?.VpcId??``,v;r[3]===_?v=r[4]:(v={resolver:g,defaultValues:{groupName:``,description:``,vpcId:_}},r[3]=_,r[4]=v);let{control:y,handleSubmit:b,register:x,watch:S,formState:he}=oe(v),{errors:C,isSubmitting:w}=he,T;r[5]!==l||r[6]!==s?(T=async e=>{let t=(await l.mutateAsync(e)).GroupId;s(t?{to:`/ec2/describe-security-groups/$id`,params:{id:t}}:{to:`/ec2/describe-security-groups`})},r[5]=l,r[6]=s,r[7]=T):T=r[7];let E=T,D,O;r[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,p.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,p.jsx)(ue,{title:`Create Security Group`}),r[8]=D,r[9]=O):(D=r[8],O=r[9]);let k;r[10]===l.error?k=r[11]:(k=l.error&&(0,p.jsx)(e,{error:l.error,msg:`Failed to create security group`}),r[10]=l.error,r[11]=k);let A;r[12]!==b||r[13]!==E?(A=b(E),r[12]=b,r[13]=E,r[14]=A):A=r[14];let j;r[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),r[15]=j):j=r[15];let M=!!C.groupName,N;r[16]===x?N=r[17]:(N=x(`groupName`),r[16]=x,r[17]=N);let P;r[18]!==M||r[19]!==N?(P=(0,p.jsx)(ie,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),r[18]=M,r[19]=N,r[20]=P):P=r[20];let F;r[21]===C.groupName?F=r[22]:(F=(0,p.jsx)(d,{errors:[C.groupName]}),r[21]=C.groupName,r[22]=F);let I;r[23]!==P||r[24]!==F?(I=(0,p.jsxs)(f,{children:[j,P,F]}),r[23]=P,r[24]=F,r[25]=I):I=r[25];let L;r[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),r[26]=L):L=r[26];let R=!!C.description,z;r[27]===x?z=r[28]:(z=x(`description`),r[27]=x,r[28]=z);let B;r[29]!==R||r[30]!==z?(B=(0,p.jsx)(ie,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),r[29]=R,r[30]=z,r[31]=B):B=r[31];let V;r[32]===C.description?V=r[33]:(V=(0,p.jsx)(d,{errors:[C.description]}),r[32]=C.description,r[33]=V);let H;r[34]!==B||r[35]!==V?(H=(0,p.jsxs)(f,{children:[L,B,V]}),r[34]=B,r[35]=V,r[36]=H):H=r[36];let U;r[37]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),r[37]=U):U=r[37];let W;r[38]!==C.vpcId||r[39]!==h?(W=e=>{let{field:t}=e;return(0,p.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,p.jsx)(a,{"aria-invalid":!!C.vpcId,className:`w-full`,id:`vpcId`,children:(0,p.jsx)(n,{})}),(0,p.jsx)(i,{children:h.map(pe)})]})},r[38]=C.vpcId,r[39]=h,r[40]=W):W=r[40];let G;r[41]!==y||r[42]!==W?(G=(0,p.jsx)(se,{control:y,name:`vpcId`,render:W}),r[41]=y,r[42]=W,r[43]=G):G=r[43];let K;r[44]===C.vpcId?K=r[45]:(K=(0,p.jsx)(d,{errors:[C.vpcId]}),r[44]=C.vpcId,r[45]=K);let q;r[46]!==G||r[47]!==K?(q=(0,p.jsxs)(f,{children:[U,G,K]}),r[46]=G,r[47]=K,r[48]=q):q=r[48];let J;r[49]===S?J=r[50]:(J=me(S),r[49]=S,r[50]=J);let Y;r[51]===J?Y=r[52]:(Y=(0,p.jsx)(te,{commands:J}),r[51]=J,r[52]=Y);let X;r[53]===s?X=r[54]:(X=async()=>await s({to:`/ec2/describe-security-groups`}),r[53]=s,r[54]=X);let Z;r[55]!==l.isPending||r[56]!==w||r[57]!==X?(Z=(0,p.jsx)(le,{isPending:l.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),r[55]=l.isPending,r[56]=w,r[57]=X,r[58]=Z):Z=r[58];let Q;r[59]!==I||r[60]!==H||r[61]!==q||r[62]!==Y||r[63]!==Z||r[64]!==A?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),r[59]=I,r[60]=H,r[61]=q,r[62]=Y,r[63]=Z,r[64]=A,r[65]=Q):Q=r[65];let $;return r[66]!==Q||r[67]!==k?($=(0,p.jsxs)(p.Fragment,{children:[D,O,k,Q]}),r[66]=Q,r[67]=k,r[68]=$):$=r[68],$}function pe(e){let t=l(e.Tags);return(0,p.jsx)(r,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function me(e){let t=e(`groupName`),ee=typeof t==`string`?t:``,n=e(`description`),r=typeof n==`string`?n:``,i=e(`vpcId`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
--group-name`},{type:`value`,value:` ${ee||`<GroupName>`}`},{type:`flag`,value:` \\
--description`},{type:`value`,value:` "${r||`<Description>`}"`}];return te&&a.push({type:`flag`,value:` \\
--vpc-id`},{type:`value`,value:` ${te}`}),[{label:`Create Security Group`,parts:a}]}export{p as component};
--description`},{type:`value`,value:` "${r||`<Description>`}"`}];return a&&o.push({type:`flag`,value:` \\
--vpc-id`},{type:`value`,value:` ${a}`}),[{label:`Create Security Group`,parts:o}]}export{m as component};
@@ -1,3 +1,3 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as ee,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{v as s}from"./ec2.js";import{B as c,Xo as l,es as u,ht as ne,qo as d}from"./index.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./form-actions.js";import{t as ce}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{f as h}from"./ec22.js";import{t as le}from"./textarea.js";var ue=d(),g=u();function _(){let i=(0,ue.c)(55),u=l(),{data:d}=t(ne),_=s(),v;i[0]===d.Volumes?v=i[1]:(v=d.Volumes??[],i[0]=d.Volumes,i[1]=v);let y=v,{volumeId:b}=c.useSearch(),x=b??y[0]?.VolumeId??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=oe(h),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=ie(C),{errors:O,isSubmitting:k}=D,A;i[5]===w?A=i[6]:(A={control:w},i[5]=w,i[6]=A);let j=re(A),M;i[7]===j?M=i[8]:(M=e=>e?j[e]:void 0,i[7]=j,i[8]=M);let N=M,P;i[9]!==_||i[10]!==u?(P=async e=>{await _.mutateAsync(e),u({to:`/ec2/describe-snapshots`})},i[9]=_,i[10]=u,i[11]=P):P=i[11];let F=P,I,L;i[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(ce,{title:`Create Snapshot`}),i[12]=I,i[13]=L):(I=i[12],L=i[13]);let R;i[14]===_.error?R=i[15]:(R=_.error&&(0,g.jsx)(e,{error:_.error,msg:`Failed to create snapshot`}),i[14]=_.error,i[15]=R);let z;i[16]!==T||i[17]!==F?(z=T(F),i[16]=T,i[17]=F,i[18]=z):z=i[18];let B;i[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(f,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),i[19]=B):B=i[19];let V;i[20]!==O.volumeId||i[21]!==y?(V=e=>{let{field:t}=e;return(0,g.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(ee,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(r,{})}),(0,g.jsx)(a,{children:y.map(de)})]})},i[20]=O.volumeId,i[21]=y,i[22]=V):V=i[22];let H;i[23]!==w||i[24]!==V?(H=(0,g.jsx)(ae,{control:w,name:`volumeId`,render:V}),i[23]=w,i[24]=V,i[25]=H):H=i[25];let U;i[26]===O.volumeId?U=i[27]:(U=(0,g.jsx)(p,{errors:[O.volumeId]}),i[26]=O.volumeId,i[27]=U);let W;i[28]!==H||i[29]!==U?(W=(0,g.jsxs)(m,{children:[B,H,U]}),i[28]=H,i[29]=U,i[30]=W):W=i[30];let G;i[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(f,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[31]=G):G=i[31];let K;i[32]===E?K=i[33]:(K=E(`description`),i[32]=E,i[33]=K);let q;i[34]===K?q=i[35]:(q=(0,g.jsxs)(m,{children:[G,(0,g.jsx)(le,{id:`description`,placeholder:`Snapshot description`,...K})]}),i[34]=K,i[35]=q);let J;i[36]===N?J=i[37]:(J=fe(N),i[36]=N,i[37]=J);let Y;i[38]===J?Y=i[39]:(Y=(0,g.jsx)(te,{commands:J}),i[38]=J,i[39]=Y);let X;i[40]===u?X=i[41]:(X=async()=>await u({to:`/ec2/describe-snapshots`}),i[40]=u,i[41]=X);let Z;i[42]!==_.isPending||i[43]!==k||i[44]!==X?(Z=(0,g.jsx)(se,{isPending:_.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),i[42]=_.isPending,i[43]=k,i[44]=X,i[45]=Z):Z=i[45];let Q;i[46]!==z||i[47]!==W||i[48]!==q||i[49]!==Y||i[50]!==Z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),i[46]=z,i[47]=W,i[48]=q,i[49]=Y,i[50]=Z,i[51]=Q):Q=i[51];let $;return i[52]!==Q||i[53]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),i[52]=Q,i[53]=R,i[54]=$):$=i[54],$}function de(e){return(0,g.jsxs)(i,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function fe(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as c}from"./cli-command-panel.js";import{v as l}from"./ec2.js";import{Fo as u,Ho as d,R as f,Ro as p,pt as ee}from"./index.js";import{i as te,n as ne,t as re}from"./zod.js";import{t as ie}from"./form-actions.js";import{t as ae}from"./page-heading.js";import{a as m,r as oe,t as h}from"./field.js";import{f as g}from"./ec22.js";import{t as _}from"./textarea.js";var v=u(),y=d();function b(){let i=(0,v.c)(51),u=p(),{data:d}=t(ee),b=l(),x;i[0]===d.Volumes?x=i[1]:(x=d.Volumes??[],i[0]=d.Volumes,i[1]=x);let S=x,{volumeId:C}=f.useSearch(),w=C??S[0]?.VolumeId??``,T;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=re(g),i[2]=T):T=i[2];let E;i[3]===w?E=i[4]:(E={resolver:T,defaultValues:{volumeId:w,description:``}},i[3]=w,i[4]=E);let{control:D,handleSubmit:O,register:k,watch:A,formState:j}=te(E),{errors:M,isSubmitting:N}=j,P;i[5]!==b||i[6]!==u?(P=async e=>{await b.mutateAsync(e),u({to:`/ec2/describe-snapshots`})},i[5]=b,i[6]=u,i[7]=P):P=i[7];let F=P,I,L;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,y.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,y.jsx)(ae,{title:`Create Snapshot`}),i[8]=I,i[9]=L):(I=i[8],L=i[9]);let R;i[10]===b.error?R=i[11]:(R=b.error&&(0,y.jsx)(e,{error:b.error,msg:`Failed to create snapshot`}),i[10]=b.error,i[11]=R);let z;i[12]!==O||i[13]!==F?(z=O(F),i[12]=O,i[13]=F,i[14]=z):z=i[14];let B;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),i[15]=B):B=i[15];let V;i[16]!==M.volumeId||i[17]!==S?(V=e=>{let{field:t}=e;return(0,y.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(o,{"aria-invalid":!!M.volumeId,className:`w-full`,id:`volumeId`,children:(0,y.jsx)(r,{})}),(0,y.jsx)(a,{children:S.map(se)})]})},i[16]=M.volumeId,i[17]=S,i[18]=V):V=i[18];let H;i[19]!==D||i[20]!==V?(H=(0,y.jsx)(ne,{control:D,name:`volumeId`,render:V}),i[19]=D,i[20]=V,i[21]=H):H=i[21];let U;i[22]===M.volumeId?U=i[23]:(U=(0,y.jsx)(oe,{errors:[M.volumeId]}),i[22]=M.volumeId,i[23]=U);let W;i[24]!==H||i[25]!==U?(W=(0,y.jsxs)(h,{children:[B,H,U]}),i[24]=H,i[25]=U,i[26]=W):W=i[26];let G;i[27]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[27]=G):G=i[27];let K;i[28]===k?K=i[29]:(K=k(`description`),i[28]=k,i[29]=K);let q;i[30]===K?q=i[31]:(q=(0,y.jsxs)(h,{children:[G,(0,y.jsx)(_,{id:`description`,placeholder:`Snapshot description`,...K})]}),i[30]=K,i[31]=q);let J;i[32]===A?J=i[33]:(J=ce(A),i[32]=A,i[33]=J);let Y;i[34]===J?Y=i[35]:(Y=(0,y.jsx)(c,{commands:J}),i[34]=J,i[35]=Y);let X;i[36]===u?X=i[37]:(X=async()=>await u({to:`/ec2/describe-snapshots`}),i[36]=u,i[37]=X);let Z;i[38]!==b.isPending||i[39]!==N||i[40]!==X?(Z=(0,y.jsx)(ie,{isPending:b.isPending,isSubmitting:N,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),i[38]=b.isPending,i[39]=N,i[40]=X,i[41]=Z):Z=i[41];let Q;i[42]!==W||i[43]!==q||i[44]!==Y||i[45]!==Z||i[46]!==z?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),i[42]=W,i[43]=q,i[44]=Y,i[45]=Z,i[46]=z,i[47]=Q):Q=i[47];let $;return i[48]!==Q||i[49]!==R?($=(0,y.jsxs)(y.Fragment,{children:[I,L,R,Q]}),i[48]=Q,i[49]=R,i[50]=$):$=i[50],$}function se(e){return(0,y.jsxs)(i,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function ce(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
--volume-id`},{type:`value`,value:` ${n||`<VolumeId>`}`}];return i&&a.push({type:`flag`,value:` \\
--description`},{type:`value`,value:` "${i}"`}),[{label:`Create Snapshot`,parts:a}]}export{b as component};
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{i}from"./elbv2.js";import{Xo as a,_t as o,es as s}from"./index.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=s();function h(){let s=a(),{data:h}=t(o),_=i(),v=h.Vpcs??[],y=c({resolver:l(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(n,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(d,{title:`Create Target Group`}),_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async e=>{try{let t=(await _.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;s(t?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(r,{commands:g(x)}),(0,m.jsx)(u,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await s({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{i}from"./elbv2.js";import{Ho as a,Ro as o,ht as s}from"./index.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{t as f}from"./target-group-form.js";import{i as p}from"./elbv22.js";var m=a();function h(){let a=o(),{data:h}=t(s),_=i(),v=h.Vpcs??[],y=c({resolver:l(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(n,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(d,{title:`Create Target Group`}),_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async e=>{try{let t=(await _.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;a(t?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(r,{commands:g(x)}),(0,m.jsx)(u,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await a({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\
--name`},{type:`value`,value:` ${r||`<Name>`}`},{type:`flag`,value:` \\
--protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\
--port`},{type:`value`,value:` ${a??80}`},{type:`flag`,value:` \\
@@ -1 +1 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{i as r}from"./iam.js";import{Xo as i,ca as a,es as o,qo as s}from"./index.js";import{a as ee,i as c,t as l}from"./zod.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{n as h}from"./iam2.js";var g=s(),_=o();function v(){let o=(0,g.c)(55),s=i(),v=r(),b;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h)},o[0]=b):b=o[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;o[1]===C?D=o[2]:(D={control:C},o[1]=C,o[2]=D);let O=ee(D),k;o[3]===O?k=o[4]:(k=e=>e?O[e]:void 0,o[3]=O,o[4]=k);let A=k,j;o[5]!==v||o[6]!==s?(j=async e=>{await v.mutateAsync(e),s({to:`/iam/list-users`})},o[5]=v,o[6]=s,o[7]=j):j=o[7];let M=j,N,P;o[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(t,{to:`/iam/list-users`,children:`Back to users`}),P=(0,_.jsx)(d,{title:`Create User`}),o[8]=N,o[9]=P):(N=o[8],P=o[9]);let F;o[10]===v.error?F=o[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create user`}),o[10]=v.error,o[11]=F);let I;o[12]!==x||o[13]!==M?(I=x(M),o[12]=x,o[13]=M,o[14]=I):I=o[14];let L;o[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),o[15]=L):L=o[15];let R=!!T.userName,z;o[16]===S?z=o[17]:(z=S(`userName`),o[16]=S,o[17]=z);let B;o[18]!==R||o[19]!==z?(B=(0,_.jsx)(a,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),o[18]=R,o[19]=z,o[20]=B):B=o[20];let V;o[21]===T.userName?V=o[22]:(V=(0,_.jsx)(p,{errors:[T.userName]}),o[21]=T.userName,o[22]=V);let H;o[23]!==B||o[24]!==V?(H=(0,_.jsxs)(m,{children:[L,B,V]}),o[23]=B,o[24]=V,o[25]=H):H=o[25];let U;o[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),o[26]=U):U=o[26];let W;o[27]===S?W=o[28]:(W=S(`path`),o[27]=S,o[28]=W);let G;o[29]===W?G=o[30]:(G=(0,_.jsx)(a,{id:`path`,placeholder:`/`,...W}),o[29]=W,o[30]=G);let K;o[31]===T.path?K=o[32]:(K=(0,_.jsx)(p,{errors:[T.path]}),o[31]=T.path,o[32]=K);let q;o[33]!==G||o[34]!==K?(q=(0,_.jsxs)(m,{children:[U,G,K]}),o[33]=G,o[34]=K,o[35]=q):q=o[35];let J;o[36]===A?J=o[37]:(J=y(A),o[36]=A,o[37]=J);let Y;o[38]===J?Y=o[39]:(Y=(0,_.jsx)(n,{commands:J}),o[38]=J,o[39]=Y);let X;o[40]===s?X=o[41]:(X=async()=>await s({to:`/iam/list-users`}),o[40]=s,o[41]=X);let Z;o[42]!==v.isPending||o[43]!==E||o[44]!==X?(Z=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),o[42]=v.isPending,o[43]=E,o[44]=X,o[45]=Z):Z=o[45];let Q;o[46]!==H||o[47]!==q||o[48]!==Y||o[49]!==Z||o[50]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),o[46]=H,o[47]=q,o[48]=Y,o[49]=Z,o[50]=I,o[51]=Q):Q=o[51];let $;return o[52]!==Q||o[53]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),o[52]=Q,o[53]=F,o[54]=$):$=o[54],$}function y(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||`<UserName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{v as component};
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{i as r}from"./iam.js";import{Fo as i,Ho as a,Ro as o,Xi as s}from"./index.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{n as h}from"./iam2.js";var g=i(),_=a();function v(){let i=(0,g.c)(51),a=o(),v=r(),b;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h)},i[0]=b):b=i[0];let{handleSubmit:x,register:S,watch:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;i[1]!==v||i[2]!==a?(D=async e=>{await v.mutateAsync(e),a({to:`/iam/list-users`})},i[1]=v,i[2]=a,i[3]=D):D=i[3];let O=D,k,A;i[4]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,_.jsx)(t,{to:`/iam/list-users`,children:`Back to users`}),A=(0,_.jsx)(d,{title:`Create User`}),i[4]=k,i[5]=A):(k=i[4],A=i[5]);let j;i[6]===v.error?j=i[7]:(j=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create user`}),i[6]=v.error,i[7]=j);let M;i[8]!==x||i[9]!==O?(M=x(O),i[8]=x,i[9]=O,i[10]=M):M=i[10];let N;i[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),i[11]=N):N=i[11];let P=!!T.userName,F;i[12]===S?F=i[13]:(F=S(`userName`),i[12]=S,i[13]=F);let I;i[14]!==P||i[15]!==F?(I=(0,_.jsx)(s,{"aria-invalid":P,id:`userName`,placeholder:`my-user...`,...F}),i[14]=P,i[15]=F,i[16]=I):I=i[16];let L;i[17]===T.userName?L=i[18]:(L=(0,_.jsx)(p,{errors:[T.userName]}),i[17]=T.userName,i[18]=L);let R;i[19]!==I||i[20]!==L?(R=(0,_.jsxs)(m,{children:[N,I,L]}),i[19]=I,i[20]=L,i[21]=R):R=i[21];let z;i[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),i[22]=z):z=i[22];let B;i[23]===S?B=i[24]:(B=S(`path`),i[23]=S,i[24]=B);let V;i[25]===B?V=i[26]:(V=(0,_.jsx)(s,{id:`path`,placeholder:`/`,...B}),i[25]=B,i[26]=V);let H;i[27]===T.path?H=i[28]:(H=(0,_.jsx)(p,{errors:[T.path]}),i[27]=T.path,i[28]=H);let U;i[29]!==V||i[30]!==H?(U=(0,_.jsxs)(m,{children:[z,V,H]}),i[29]=V,i[30]=H,i[31]=U):U=i[31];let W;i[32]===C?W=i[33]:(W=y(C),i[32]=C,i[33]=W);let G;i[34]===W?G=i[35]:(G=(0,_.jsx)(n,{commands:W}),i[34]=W,i[35]=G);let K;i[36]===a?K=i[37]:(K=async()=>await a({to:`/iam/list-users`}),i[36]=a,i[37]=K);let q;i[38]!==v.isPending||i[39]!==E||i[40]!==K?(q=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:E,onCancel:K,pendingLabel:`Creating...`,submitLabel:`Create User`}),i[38]=v.isPending,i[39]=E,i[40]=K,i[41]=q):q=i[41];let J;i[42]!==R||i[43]!==U||i[44]!==G||i[45]!==q||i[46]!==M?(J=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:M,children:[R,U,G,q]}),i[42]=R,i[43]=U,i[44]=G,i[45]=q,i[46]=M,i[47]=J):J=i[47];let Y;return i[48]!==J||i[49]!==j?(Y=(0,_.jsxs)(_.Fragment,{children:[k,A,j,J]}),i[48]=J,i[49]=j,i[50]=Y):Y=i[50],Y}function y(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||`<UserName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{v as component};
@@ -1,3 +1,3 @@
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as ee,s as a,t as te}from"./select.js";import{t as o}from"./cli-command-panel.js";import{b as s}from"./ec2.js";import{G as ne,Xo as re,ca as ie,es as c,qo as l}from"./index.js";import{i as u,n as d,t as f}from"./zod.js";import{t as p}from"./form-actions.js";import{t as ae}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{m as oe}from"./ec22.js";var se=l(),_=c();function v(){let i=(0,se.c)(57),c=re(),{data:l}=t(ne),v=s(),y;i[0]===l.AvailabilityZones?y=i[1]:(y=l.AvailabilityZones??[],i[0]=l.AvailabilityZones,i[1]=y);let b=y,x=b[0]?.ZoneName??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=f(oe),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=u(C),{errors:k,isSubmitting:A}=O,j;i[5]!==v||i[6]!==c?(j=async e=>{await v.mutateAsync(e),c({to:`/ec2/describe-volumes`})},i[5]=v,i[6]=c,i[7]=j):j=i[7];let M=j,N,P;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,_.jsx)(ae,{title:`Create Volume`}),i[8]=N,i[9]=P):(N=i[8],P=i[9]);let F;i[10]===v.error?F=i[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create volume`}),i[10]=v.error,i[11]=F);let I;i[12]!==T||i[13]!==M?(I=T(M),i[12]=T,i[13]=M,i[14]=I):I=i[14];let L;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),i[15]=L):L=i[15];let R=!!k.size,z;i[16]===E?z=i[17]:(z=E(`size`,{valueAsNumber:!0}),i[16]=E,i[17]=z);let B;i[18]!==R||i[19]!==z?(B=(0,_.jsx)(ie,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),i[18]=R,i[19]=z,i[20]=B):B=i[20];let V;i[21]===k.size?V=i[22]:(V=(0,_.jsx)(h,{errors:[k.size]}),i[21]=k.size,i[22]=V);let H;i[23]!==B||i[24]!==V?(H=(0,_.jsxs)(g,{children:[L,B,V]}),i[23]=B,i[24]=V,i[25]=H):H=i[25];let U;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),i[26]=U):U=i[26];let W;i[27]!==b||i[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,_.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(a,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,_.jsx)(r,{})}),(0,_.jsx)(ee,{children:b.map(ce)})]})},i[27]=b,i[28]=k.availabilityZone,i[29]=W):W=i[29];let G;i[30]!==w||i[31]!==W?(G=(0,_.jsx)(d,{control:w,name:`availabilityZone`,render:W}),i[30]=w,i[31]=W,i[32]=G):G=i[32];let K;i[33]===k.availabilityZone?K=i[34]:(K=(0,_.jsx)(h,{errors:[k.availabilityZone]}),i[33]=k.availabilityZone,i[34]=K);let q;i[35]!==G||i[36]!==K?(q=(0,_.jsxs)(g,{children:[U,G,K]}),i[35]=G,i[36]=K,i[37]=q):q=i[37];let J;i[38]===D?J=i[39]:(J=le(D),i[38]=D,i[39]=J);let Y;i[40]===J?Y=i[41]:(Y=(0,_.jsx)(o,{commands:J}),i[40]=J,i[41]=Y);let X;i[42]===c?X=i[43]:(X=async()=>await c({to:`/ec2/describe-volumes`}),i[42]=c,i[43]=X);let Z;i[44]!==v.isPending||i[45]!==A||i[46]!==X?(Z=(0,_.jsx)(p,{isPending:v.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),i[44]=v.isPending,i[45]=A,i[46]=X,i[47]=Z):Z=i[47];let Q;i[48]!==H||i[49]!==q||i[50]!==Y||i[51]!==Z||i[52]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),i[48]=H,i[49]=q,i[50]=Y,i[51]=Z,i[52]=I,i[53]=Q):Q=i[53];let $;return i[54]!==Q||i[55]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),i[54]=Q,i[55]=F,i[56]=$):$=i[56],$}function ce(e){return(0,_.jsx)(i,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as ee,s as a,t as te}from"./select.js";import{t as o}from"./cli-command-panel.js";import{b as ne}from"./ec2.js";import{Fo as s,Ho as c,Ro as re,U as ie,Xi as l}from"./index.js";import{i as u,n as d,t as f}from"./zod.js";import{t as p}from"./form-actions.js";import{t as ae}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{m as oe}from"./ec22.js";var se=s(),_=c();function v(){let i=(0,se.c)(57),s=re(),{data:c}=t(ie),v=ne(),y;i[0]===c.AvailabilityZones?y=i[1]:(y=c.AvailabilityZones??[],i[0]=c.AvailabilityZones,i[1]=y);let b=y,x=b[0]?.ZoneName??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=f(oe),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=u(C),{errors:k,isSubmitting:A}=O,j;i[5]!==v||i[6]!==s?(j=async e=>{await v.mutateAsync(e),s({to:`/ec2/describe-volumes`})},i[5]=v,i[6]=s,i[7]=j):j=i[7];let M=j,N,P;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,_.jsx)(ae,{title:`Create Volume`}),i[8]=N,i[9]=P):(N=i[8],P=i[9]);let F;i[10]===v.error?F=i[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create volume`}),i[10]=v.error,i[11]=F);let I;i[12]!==T||i[13]!==M?(I=T(M),i[12]=T,i[13]=M,i[14]=I):I=i[14];let L;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),i[15]=L):L=i[15];let R=!!k.size,z;i[16]===E?z=i[17]:(z=E(`size`,{valueAsNumber:!0}),i[16]=E,i[17]=z);let B;i[18]!==R||i[19]!==z?(B=(0,_.jsx)(l,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),i[18]=R,i[19]=z,i[20]=B):B=i[20];let V;i[21]===k.size?V=i[22]:(V=(0,_.jsx)(h,{errors:[k.size]}),i[21]=k.size,i[22]=V);let H;i[23]!==B||i[24]!==V?(H=(0,_.jsxs)(g,{children:[L,B,V]}),i[23]=B,i[24]=V,i[25]=H):H=i[25];let U;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),i[26]=U):U=i[26];let W;i[27]!==b||i[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,_.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(a,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,_.jsx)(r,{})}),(0,_.jsx)(ee,{children:b.map(ce)})]})},i[27]=b,i[28]=k.availabilityZone,i[29]=W):W=i[29];let G;i[30]!==w||i[31]!==W?(G=(0,_.jsx)(d,{control:w,name:`availabilityZone`,render:W}),i[30]=w,i[31]=W,i[32]=G):G=i[32];let K;i[33]===k.availabilityZone?K=i[34]:(K=(0,_.jsx)(h,{errors:[k.availabilityZone]}),i[33]=k.availabilityZone,i[34]=K);let q;i[35]!==G||i[36]!==K?(q=(0,_.jsxs)(g,{children:[U,G,K]}),i[35]=G,i[36]=K,i[37]=q):q=i[37];let J;i[38]===D?J=i[39]:(J=le(D),i[38]=D,i[39]=J);let Y;i[40]===J?Y=i[41]:(Y=(0,_.jsx)(o,{commands:J}),i[40]=J,i[41]=Y);let X;i[42]===s?X=i[43]:(X=async()=>await s({to:`/ec2/describe-volumes`}),i[42]=s,i[43]=X);let Z;i[44]!==v.isPending||i[45]!==A||i[46]!==X?(Z=(0,_.jsx)(p,{isPending:v.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),i[44]=v.isPending,i[45]=A,i[46]=X,i[47]=Z):Z=i[47];let Q;i[48]!==H||i[49]!==q||i[50]!==Y||i[51]!==Z||i[52]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),i[48]=H,i[49]=q,i[50]=Y,i[51]=Z,i[52]=I,i[53]=Q):Q=i[53];let $;return i[54]!==Q||i[55]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),i[54]=Q,i[55]=F,i[56]=$):$=i[56],$}function ce(e){return(0,_.jsx)(i,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
--size`},{type:`value`,value:` ${n||1}`},{type:`flag`,value:` \\
--availability-zone`},{type:`value`,value:` ${i||`<AvailabilityZone>`}`}]}]}export{v as component};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{es as e,qo as t}from"./index.js";import{a as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./alert-dialog.js";var u=t(),d=e();function f(e){let t=(0,u.c)(19),{open:f,onOpenChange:p,title:m,description:h,isPending:g,onConfirm:_,confirmLabel:v,pendingLabel:y}=e,b=v===void 0?`Delete`:v,x=y===void 0?`Deleting…`:y,S;t[0]===m?S=t[1]:(S=(0,d.jsx)(i,{children:m}),t[0]=m,t[1]=S);let C;t[2]===h?C=t[3]:(C=(0,d.jsx)(n,{children:h}),t[2]=h,t[3]=C);let w;t[4]!==S||t[5]!==C?(w=(0,d.jsxs)(c,{children:[S,C]}),t[4]=S,t[5]=C,t[6]=w):w=t[6];let T;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,d.jsx)(s,{children:`Cancel`}),t[7]=T):T=t[7];let E=g?x:b,D;t[8]!==g||t[9]!==_||t[10]!==E?(D=(0,d.jsxs)(o,{children:[T,(0,d.jsx)(a,{disabled:g,onClick:_,children:E})]}),t[8]=g,t[9]=_,t[10]=E,t[11]=D):D=t[11];let O;t[12]!==w||t[13]!==D?(O=(0,d.jsxs)(r,{children:[w,D]}),t[12]=w,t[13]=D,t[14]=O):O=t[14];let k;return t[15]!==p||t[16]!==f||t[17]!==O?(k=(0,d.jsx)(l,{onOpenChange:p,open:f,children:O}),t[15]=p,t[16]=f,t[17]=O,t[18]=k):k=t[18],k}export{f as t};
import{Fo as e,Ho as t}from"./index.js";import{a as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./alert-dialog.js";var u=e(),d=t();function f(e){let t=(0,u.c)(19),{open:f,onOpenChange:p,title:m,description:h,isPending:g,onConfirm:_,confirmLabel:v,pendingLabel:y}=e,b=v===void 0?`Delete`:v,x=y===void 0?`Deleting…`:y,S;t[0]===m?S=t[1]:(S=(0,d.jsx)(i,{children:m}),t[0]=m,t[1]=S);let C;t[2]===h?C=t[3]:(C=(0,d.jsx)(n,{children:h}),t[2]=h,t[3]=C);let w;t[4]!==S||t[5]!==C?(w=(0,d.jsxs)(c,{children:[S,C]}),t[4]=S,t[5]=C,t[6]=w):w=t[6];let T;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,d.jsx)(s,{children:`Cancel`}),t[7]=T):T=t[7];let E=g?x:b,D;t[8]!==g||t[9]!==_||t[10]!==E?(D=(0,d.jsxs)(o,{children:[T,(0,d.jsx)(a,{disabled:g,onClick:_,children:E})]}),t[8]=g,t[9]=_,t[10]=E,t[11]=D):D=t[11];let O;t[12]!==w||t[13]!==D?(O=(0,d.jsxs)(r,{children:[w,D]}),t[12]=w,t[13]=D,t[14]=O):O=t[14];let k;return t[15]!==p||t[16]!==f||t[17]!==O?(k=(0,d.jsx)(l,{onOpenChange:p,open:f,children:O}),t[15]=p,t[16]=f,t[17]=O,t[18]=k):k=t[18],k}export{f as t};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{W as t,Yo as n,_o as r,co as i,es as a,qo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=o(),u=a();function d(){let r=(0,l.c)(5),{data:a}=e(t),o;r[0]===a.Addresses?o=r[1]:(o=a.Addresses??[],r[0]=a.Addresses,r[1]=o);let c=o,d;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(n,{to:`/ec2/allocate-address`,children:(0,u.jsx)(i,{children:`Allocate Elastic IP`})}),title:`Elastic IPs`}),r[2]=d):d=r[2];let p;return r[3]===c?p=r[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Elastic IPs found.`})]}),r[3]=c,r[4]=p),p}function f(e){if(!e.AllocationId)return null;let t=r(e.Tags),n=e.AssociationId?`${e.PublicIp} • associated`:`${e.PublicIp} • available`;return(0,u.jsx)(c,{params:{id:e.AllocationId},subtitle:n,title:t?`${e.AllocationId} (${t})`:e.AllocationId??``,to:`/ec2/describe-addresses/$id`},e.AllocationId)}export{d as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,H as n,Ho as r,Lo as i,Xa as a,ao as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=r();function d(){let t=(0,l.c)(5),{data:r}=e(n),o;t[0]===r.Addresses?o=t[1]:(o=r.Addresses??[],t[0]=r.Addresses,t[1]=o);let c=o,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(i,{to:`/ec2/allocate-address`,children:(0,u.jsx)(a,{children:`Allocate Elastic IP`})}),title:`Elastic IPs`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Elastic IPs found.`})]}),t[3]=c,t[4]=p),p}function f(e){if(!e.AllocationId)return null;let t=o(e.Tags),n=e.AssociationId?`${e.PublicIp} • associated`:`${e.PublicIp} • available`;return(0,u.jsx)(c,{params:{id:e.AllocationId},subtitle:n,title:t?`${e.AllocationId} (${t})`:e.AllocationId??``,to:`/ec2/describe-addresses/$id`},e.AllocationId)}export{d as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{es as t,q as n,qo as r}from"./index.js";import{t as i}from"./page-heading.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{t as s}from"./system-managed.js";var c=r(),l=t();function u(){let t=(0,c.c)(3),{data:r}=e(n),a;if(t[0]!==r.Images){let e=(r.Images??[]).filter(f),n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{title:`Images`}),t[2]=n):n=t[2],a=(0,l.jsxs)(l.Fragment,{children:[n,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),t[0]=r.Images,t[1]=a}else a=t[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,G as n,Ho as r}from"./index.js";import{t as i}from"./page-heading.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{t as s}from"./system-managed.js";var c=t(),l=r();function u(){let t=(0,c.c)(3),{data:r}=e(n),a;if(t[0]!==r.Images){let e=(r.Images??[]).filter(f),n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{title:`Images`}),t[2]=n):n=t[2],a=(0,l.jsxs)(l.Fragment,{children:[n,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),t[0]=r.Images,t[1]=a}else a=t[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{X as t,Yo as n,co as r,es as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=a(),u=i(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let i=(0,l.c)(3),{data:a}=e(t),s;if(i[0]!==a.Reservations){let e=(a.Reservations?.flatMap(h)??[]).toSorted(m),t;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,u.jsx)(o,{actions:(0,u.jsx)(n,{to:`/ec2/run-instances`,children:(0,u.jsx)(r,{children:`Run Instances`})}),title:`Instances`}),i[2]=t):t=i[2],s=(0,u.jsxs)(u.Fragment,{children:[t,e.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:e.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),i[0]=a.Reservations,i[1]=s}else s=i[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,J as r,Lo as i,Xa as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=n(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let t=(0,l.c)(3),{data:n}=e(r),s;if(t[0]!==n.Reservations){let e=(n.Reservations?.flatMap(h)??[]).toSorted(m),r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,u.jsx)(o,{actions:(0,u.jsx)(i,{to:`/ec2/run-instances`,children:(0,u.jsx)(a,{children:`Run Instances`})}),title:`Instances`}),t[2]=r):r=t[2],s=(0,u.jsxs)(u.Fragment,{children:[r,e.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:e.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),t[0]=n.Reservations,t[1]=s}else s=t[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Q as t,Yo as n,_o as r,co as i,es as a,qo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=o(),u=a();function d(){let r=(0,l.c)(5),{data:a}=e(t),o;r[0]===a.InternetGateways?o=r[1]:(o=a.InternetGateways??[],r[0]=a.InternetGateways,r[1]=o);let c=o,d;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(n,{to:`/ec2/create-internet-gateway`,children:(0,u.jsx)(i,{children:`Create Internet Gateway`})}),title:`Internet Gateways`}),r[2]=d):d=r[2];let p;return r[3]===c?p=r[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Internet Gateways found.`})]}),r[3]=c,r[4]=p),p}function f(e){if(!e.InternetGatewayId)return null;let t=r(e.Tags),n=e.Attachments?.[0]?.VpcId;return(0,u.jsx)(c,{params:{id:e.InternetGatewayId},subtitle:n?`attached to ${n}`:`detached`,title:t?`${e.InternetGatewayId} (${t})`:e.InternetGatewayId,to:`/ec2/describe-internet-gateways/$id`},e.InternetGatewayId)}export{d as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,X as i,Xa as a,ao as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=n();function d(){let t=(0,l.c)(5),{data:n}=e(i),o;t[0]===n.InternetGateways?o=t[1]:(o=n.InternetGateways??[],t[0]=n.InternetGateways,t[1]=o);let c=o,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/ec2/create-internet-gateway`,children:(0,u.jsx)(a,{children:`Create Internet Gateway`})}),title:`Internet Gateways`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Internet Gateways found.`})]}),t[3]=c,t[4]=p),p}function f(e){if(!e.InternetGatewayId)return null;let t=o(e.Tags),n=e.Attachments?.[0]?.VpcId;return(0,u.jsx)(c,{params:{id:e.InternetGatewayId},subtitle:n?`attached to ${n}`:`detached`,title:t?`${e.InternetGatewayId} (${t})`:e.InternetGatewayId,to:`/ec2/describe-internet-gateways/$id`},e.InternetGatewayId)}export{d as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,co as n,es as r,et as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=r();function u(){let r=(0,c.c)(4),{data:a}=e(i),s;if(r[0]!==a.KeyPairs){let e=(a.KeyPairs??[]).toSorted(f),i;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(t,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(n,{variant:`outline`,children:`Import Key Pair`})}),r[2]=i):i=r[2];let c;r[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[i,(0,l.jsx)(t,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(n,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),r[3]=c):c=r[3],s=(0,l.jsxs)(l.Fragment,{children:[c,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),r[0]=a.KeyPairs,r[1]=s}else s=r[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Q as i,Xa as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=n();function u(){let t=(0,c.c)(4),{data:n}=e(i),s;if(t[0]!==n.KeyPairs){let e=(n.KeyPairs??[]).toSorted(f),i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(a,{variant:`outline`,children:`Import Key Pair`})}),t[2]=i):i=t[2];let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[i,(0,l.jsx)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(a,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),t[3]=c):c=t[3],s=(0,l.jsxs)(l.Fragment,{children:[c,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),t[0]=n.KeyPairs,t[1]=s}else s=t[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{M as t,Xo as n,Yo as r,co as i,es as a,mo as o,qo as s}from"./index.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=s(),d=a();function f(){let a=(0,u.c)(10),s=n(),{data:f}=e(t),m;a[0]===f.LoadBalancers?m=a[1]:(m=f.LoadBalancers??[],a[0]=f.LoadBalancers,a[1]=m);let h=m,g;a[2]===s?g=a[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(i,{onClick:async()=>await s({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),a[2]=s,a[3]=g);let _;a[4]!==h||a[5]!==s?(_=h.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let t=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await s({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(r,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??t})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.CreatedTime)})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),a[4]=h,a[5]=s,a[6]=_):_=a[6];let v;return a[7]!==g||a[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),a[7]=g,a[8]=_,a[9]=v):v=a[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,M as i,Ro as a,Xa as o,no as s}from"./index.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=t(),d=n();function f(){let t=(0,u.c)(10),n=a(),{data:f}=e(i),m;t[0]===f.LoadBalancers?m=t[1]:(m=f.LoadBalancers??[],t[0]=f.LoadBalancers,t[1]=m);let h=m,g;t[2]===n?g=t[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(o,{onClick:async()=>await n({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),t[2]=n,t[3]=g);let _;t[4]!==h||t[5]!==n?(_=h.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let t=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await n({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(r,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??t})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:s(e.CreatedTime)})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),t[4]=h,t[5]=n,t[6]=_):_=t[6];let v;return t[7]!==g||t[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),t[7]=g,t[8]=_,t[9]=v):v=t[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,_o as n,co as r,es as i,nt as a,qo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=o(),d=i();function f(){let n=(0,u.c)(5),{data:i}=e(a),o;n[0]===i.NatGateways?o=n[1]:(o=i.NatGateways??[],n[0]=i.NatGateways,n[1]=o);let c=o,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(t,{to:`/ec2/create-nat-gateway`,children:(0,d.jsx)(r,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),n[2]=l):l=n[2];let f;return n[3]===c?f=n[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No NAT Gateways found.`})]}),n[3]=c,n[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=n(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.NatGatewayId},subtitle:e.SubnetId??``,title:t?`${e.NatGatewayId} (${t})`:e.NatGatewayId,to:`/ec2/describe-nat-gateways/$id`},e.NatGatewayId)}export{f as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,ao as a,et as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=n();function f(){let t=(0,u.c)(5),{data:n}=e(o),a;t[0]===n.NatGateways?a=t[1]:(a=n.NatGateways??[],t[0]=n.NatGateways,t[1]=a);let c=a,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-nat-gateway`,children:(0,d.jsx)(i,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),t[2]=l):l=t[2];let f;return t[3]===c?f=t[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No NAT Gateways found.`})]}),t[3]=c,t[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=a(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.NatGatewayId},subtitle:e.SubnetId??``,title:t?`${e.NatGatewayId} (${t})`:e.NatGatewayId,to:`/ec2/describe-nat-gateways/$id`},e.NatGatewayId)}export{f as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,co as n,es as r,it as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=a(),u=r();function d(){let r=(0,l.c)(5),{data:a}=e(i),s;r[0]===a.PlacementGroups?s=r[1]:(s=a.PlacementGroups??[],r[0]=a.PlacementGroups,r[1]=s);let c=s,d;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(n,{children:`Create Placement Group`})}),title:`Placement Groups`}),r[2]=d):d=r[2];let p;return r[3]===c?p=r[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No placement groups found.`})]}),r[3]=c,r[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,nt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=n();function d(){let t=(0,l.c)(5),{data:n}=e(a),s;t[0]===n.PlacementGroups?s=t[1]:(s=n.PlacementGroups??[],t[0]=n.PlacementGroups,t[1]=s);let c=s,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(i,{children:`Create Placement Group`})}),title:`Placement Groups`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No placement groups found.`})]}),t[3]=c,t[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,_o as n,co as r,es as i,qo as a,st as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./badge.js";var u=a(),d=i();function f(){let n=(0,u.c)(5),{data:i}=e(o),a;n[0]===i.RouteTables?a=n[1]:(a=i.RouteTables??[],n[0]=i.RouteTables,n[1]=a);let c=a,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(t,{to:`/ec2/create-route-table`,children:(0,d.jsx)(r,{children:`Create Route Table`})}),title:`Route Tables`}),n[2]=l):l=n[2];let f;return n[3]===c?f=n[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No Route Tables found.`})]}),n[3]=c,n[4]=f),f}function p(e){if(!e.RouteTableId)return null;let t=n(e.Tags),r=e.Associations?.some(h)??!1,i=e.Associations?.filter(m).length??0;return(0,d.jsx)(c,{badge:r?(0,d.jsx)(l,{variant:`secondary`,children:`Main`}):null,params:{id:e.RouteTableId},subtitle:`${e.VpcId??``} · ${i} subnet${i===1?``:`s`}`,title:t?`${e.RouteTableId} (${t})`:e.RouteTableId,to:`/ec2/describe-route-tables/$id`},e.RouteTableId)}function m(e){return e.SubnetId}function h(e){return e.Main}export{f as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,ao as a,at as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./badge.js";var u=t(),d=n();function f(){let t=(0,u.c)(5),{data:n}=e(o),a;t[0]===n.RouteTables?a=t[1]:(a=n.RouteTables??[],t[0]=n.RouteTables,t[1]=a);let c=a,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-route-table`,children:(0,d.jsx)(i,{children:`Create Route Table`})}),title:`Route Tables`}),t[2]=l):l=t[2];let f;return t[3]===c?f=t[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No Route Tables found.`})]}),t[3]=c,t[4]=f),f}function p(e){if(!e.RouteTableId)return null;let t=a(e.Tags),n=e.Associations?.some(h)??!1,r=e.Associations?.filter(m).length??0;return(0,d.jsx)(c,{badge:n?(0,d.jsx)(l,{variant:`secondary`,children:`Main`}):null,params:{id:e.RouteTableId},subtitle:`${e.VpcId??``} · ${r} subnet${r===1?``:`s`}`,title:t?`${e.RouteTableId} (${t})`:e.RouteTableId,to:`/ec2/describe-route-tables/$id`},e.RouteTableId)}function m(e){return e.SubnetId}function h(e){return e.Main}export{f as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,co as n,es as r,lt as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=r();function u(){let r=(0,c.c)(5),{data:a}=e(i),s;r[0]===a.SecurityGroups?s=r[1]:(s=a.SecurityGroups??[],r[0]=a.SecurityGroups,r[1]=s);let u=s,f;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(t,{to:`/ec2/create-security-group`,children:(0,l.jsx)(n,{children:`Create Security Group`})}),title:`Security Groups`}),r[2]=f):f=r[2];let p;return r[3]===u?p=r[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),r[3]=u,r[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,st as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=n();function u(){let t=(0,c.c)(5),{data:n}=e(a),s;t[0]===n.SecurityGroups?s=t[1]:(s=n.SecurityGroups??[],t[0]=n.SecurityGroups,t[1]=s);let u=s,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/ec2/create-security-group`,children:(0,l.jsx)(i,{children:`Create Security Group`})}),title:`Security Groups`}),t[2]=f):f=t[2];let p;return t[3]===u?p=t[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),t[3]=u,t[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,co as n,dt as r,es as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=a(),u=i();function d(){let i=(0,l.c)(5),{data:a}=e(r),s;i[0]===a.Snapshots?s=i[1]:(s=a.Snapshots??[],i[0]=a.Snapshots,i[1]=s);let c=s,d;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(n,{children:`Create Snapshot`})}),title:`Snapshots`}),i[2]=d):d=i[2];let p;return i[3]===c?p=i[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots found.`})]}),i[3]=c,i[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,lt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=n();function d(){let t=(0,l.c)(5),{data:n}=e(a),s;t[0]===n.Snapshots?s=t[1]:(s=n.Snapshots??[],t[0]=n.Snapshots,t[1]=s);let c=s,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(i,{children:`Create Snapshot`})}),title:`Snapshots`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots found.`})]}),t[3]=c,t[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,_o as n,co as r,es as i,pt as a,qo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=o(),d=i();function f(){let n=(0,u.c)(5),{data:i}=e(a),o;n[0]===i.Subnets?o=n[1]:(o=i.Subnets??[],n[0]=i.Subnets,n[1]=o);let c=o,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(t,{to:`/ec2/create-subnet`,children:(0,d.jsx)(r,{children:`Create Subnet`})}),title:`Subnets`}),n[2]=l):l=n[2];let f;return n[3]===c?f=n[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets found.`})]}),n[3]=c,n[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=n(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,ao as a,dt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=n();function f(){let t=(0,u.c)(5),{data:n}=e(o),a;t[0]===n.Subnets?a=t[1]:(a=n.Subnets??[],t[0]=n.Subnets,t[1]=a);let c=a,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-subnet`,children:(0,d.jsx)(i,{children:`Create Subnet`})}),title:`Subnets`}),t[2]=l):l=t[2];let f;return t[3]===c?f=t[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets found.`})]}),t[3]=c,t[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=a(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component};
@@ -1 +1 @@
import{t as e}from"./useQuery.js";import{t}from"./useSuspenseQuery.js";import{L as n,R as r,Xo as i,Yo as a,co as o,es as s,qo as c}from"./index.js";import{t as l}from"./page-heading.js";var u=c(),d=s();function f(){let e=(0,u.c)(6),r=i(),{data:s}=t(n),c;e[0]===s.TargetGroups?c=e[1]:(c=s.TargetGroups??[],e[0]=s.TargetGroups,e[1]=c);let f=c,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(a,{to:`/ec2/create-target-group`,children:(0,d.jsx)(o,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==r||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let t=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await r({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(a,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??t})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:t})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=r,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(t){let n=(0,u.c)(13),{arn:i}=t,a;n[0]===i?a=n[1]:(a=r(i),n[0]=i,n[1]=a);let{data:o,isLoading:s}=e(a);if(s){let e;return n[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),n[2]=e):e=n[2],e}let c,l;if(n[3]!==o?.TargetHealthDescriptions){c=o?.TargetHealthDescriptions??[];let e={};for(let t of c){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}l=Object.entries(e).map(h).join(`, `)||`—`,n[3]=o?.TargetHealthDescriptions,n[4]=c,n[5]=l}else c=n[4],l=n[5];let f=l,p;n[6]===c.length?p=n[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),n[6]=c.length,n[7]=p);let m;n[8]===f?m=n[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),n[8]=f,n[9]=m);let g;return n[10]!==p||n[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),n[10]=p,n[11]=m,n[12]=g):g=n[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
import{t as e}from"./useQuery.js";import{t}from"./useSuspenseQuery.js";import{Fo as n,Ho as r,I as i,L as a,Lo as o,Ro as s,Xa as c}from"./index.js";import{t as l}from"./page-heading.js";var u=n(),d=r();function f(){let e=(0,u.c)(6),n=s(),{data:r}=t(i),a;e[0]===r.TargetGroups?a=e[1]:(a=r.TargetGroups??[],e[0]=r.TargetGroups,e[1]=a);let f=a,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(o,{to:`/ec2/create-target-group`,children:(0,d.jsx)(c,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==n||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let t=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await n({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(o,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??t})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:t})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=n,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(t){let n=(0,u.c)(13),{arn:r}=t,i;n[0]===r?i=n[1]:(i=a(r),n[0]=r,n[1]=i);let{data:o,isLoading:s}=e(i);if(s){let e;return n[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),n[2]=e):e=n[2],e}let c,l;if(n[3]!==o?.TargetHealthDescriptions){c=o?.TargetHealthDescriptions??[];let e={};for(let t of c){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}l=Object.entries(e).map(h).join(`, `)||`—`,n[3]=o?.TargetHealthDescriptions,n[4]=c,n[5]=l}else c=n[4],l=n[5];let f=l,p;n[6]===c.length?p=n[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),n[6]=c.length,n[7]=p);let m;n[8]===f?m=n[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),n[8]=f,n[9]=m);let g;return n[10]!==p||n[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),n[10]=p,n[11]=m,n[12]=g):g=n[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,co as n,es as r,ht as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=a(),u=r();function d(){let r=(0,l.c)(5),{data:a}=e(i),s;r[0]===a.Volumes?s=r[1]:(s=a.Volumes??[],r[0]=a.Volumes,r[1]=s);let c=s,d;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/create-volume`,children:(0,u.jsx)(n,{children:`Create Volume`})}),title:`Volumes`}),r[2]=d):d=r[2];let p;return r[3]===c?p=r[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No volumes found.`})]}),r[3]=c,r[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,pt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=n();function d(){let t=(0,l.c)(5),{data:n}=e(a),s;t[0]===n.Volumes?s=t[1]:(s=n.Volumes??[],t[0]=n.Volumes,t[1]=s);let c=s,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-volume`,children:(0,u.jsx)(i,{children:`Create Volume`})}),title:`Volumes`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No volumes found.`})]}),t[3]=c,t[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Yo as t,_o as n,_t as r,co as i,es as a,qo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=o(),d=a();function f(){let n=(0,u.c)(5),{data:a}=e(r),o;n[0]===a.Vpcs?o=n[1]:(o=a.Vpcs??[],n[0]=a.Vpcs,n[1]=o);let c=o,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(t,{to:`/ec2/create-vpc`,children:(0,d.jsx)(i,{children:`Create VPC`})}),title:`VPCs`}),n[2]=l):l=n[2];let f;return n[3]===c?f=n[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No VPCs found.`})]}),n[3]=c,n[4]=f),f}function p(e){if(!e.VpcId)return null;let t=n(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,Xa as i,ao as a,ht as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=n();function f(){let t=(0,u.c)(5),{data:n}=e(o),a;t[0]===n.Vpcs?a=t[1]:(a=n.Vpcs??[],t[0]=n.Vpcs,t[1]=a);let c=a,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-vpc`,children:(0,d.jsx)(i,{children:`Create VPC`})}),title:`VPCs`}),t[2]=l):l=t[2];let f;return t[3]===c?f=t[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No VPCs found.`})]}),t[3]=c,t[4]=f),f}function p(e){if(!e.VpcId)return null;let t=a(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
@@ -1 +1 @@
import{es as e,qo as t}from"./index.js";var n=t(),r=e();function i(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`rounded-lg border bg-card`,children:i}),t[0]=i,t[1]=a),a}function a(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`border-b p-4`,children:(0,r.jsx)(`h2`,{className:`font-semibold`,children:i})}),t[0]=i,t[1]=a),a}function o(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-2`,children:i}),t[0]=i,t[1]=a),a}var s=Object.assign(i,{Header:a,Content:o});function c(e){let t=(0,n.c)(9),{label:i,value:a}=e,o;t[0]===i?o=t[1]:(o=(0,r.jsx)(`dt`,{className:`text-sm text-muted-foreground`,children:i}),t[0]=i,t[1]=o);let s;t[2]===a?s=t[3]:(s=a||(0,r.jsx)(`span`,{className:`text-muted-foreground`,children:`—`}),t[2]=a,t[3]=s);let c;t[4]===s?c=t[5]:(c=(0,r.jsx)(`dd`,{className:`mt-1 font-mono text-sm`,children:s}),t[4]=s,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,r.jsxs)(`div`,{children:[o,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}export{s as n,c as t};
import{Fo as e,Ho as t}from"./index.js";var n=e(),r=t();function i(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`rounded-lg border bg-card`,children:i}),t[0]=i,t[1]=a),a}function a(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`border-b p-4`,children:(0,r.jsx)(`h2`,{className:`font-semibold`,children:i})}),t[0]=i,t[1]=a),a}function o(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-2`,children:i}),t[0]=i,t[1]=a),a}var s=Object.assign(i,{Header:a,Content:o});function c(e){let t=(0,n.c)(9),{label:i,value:a}=e,o;t[0]===i?o=t[1]:(o=(0,r.jsx)(`dt`,{className:`text-sm text-muted-foreground`,children:i}),t[0]=i,t[1]=o);let s;t[2]===a?s=t[3]:(s=a||(0,r.jsx)(`span`,{className:`text-muted-foreground`,children:`—`}),t[2]=a,t[3]=s);let c;t[4]===s?c=t[5]:(c=(0,r.jsx)(`dd`,{className:`mt-1 font-mono text-sm`,children:s}),t[4]=s,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,r.jsxs)(`div`,{children:[o,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}export{s as n,c as t};
@@ -1 +1 @@
import{Io as e}from"./index.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
import{wo as e}from"./index.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{$r as e,Jr as t,Qr as n,Yr as r,ei as i,ti as a}from"./index.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=a().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`).refine(e=>!e.startsWith(`internal-`),`Name cannot start with 'internal-'`),c=a().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`),l=n().int(`Port must be a whole number`).min(1,`Port must be at least 1`).max(65535,`Port must be at most 65535`),u=e({key:a().min(1,`Tag key is required`).max(128),value:a().max(256)}),d=e({protocol:t([`HTTP`,`TCP`]),path:a().min(1,`Path is required`).max(1024),port:a().min(1),intervalSeconds:n().int().min(5).max(300),timeoutSeconds:n().int().min(2).max(120),healthyThresholdCount:n().int().min(2).max(10),unhealthyThresholdCount:n().int().min(2).max(10),matcher:a().regex(/^\d{3}(?:[-,]\d{3})*$/,`Matcher must be HTTP codes like 200 or 200-299 or 200,201`)}),f=e({name:c,protocol:t([`HTTP`,`HTTPS`,`TCP`,`UDP`,`TLS`,`TCP_UDP`]),port:l,vpcId:a().min(1,`VPC is required`),healthCheck:d,tags:r(u)}),p=`ELBSecurityPolicy-2016-08`,m=[`application`,`network`],h=[`HTTP`,`HTTPS`],g=[`TCP`,`UDP`,`TLS`,`TCP_UDP`],_=[...h,...g];function v(e){return e===`network`?g:h}function y(e){return e===`network`?`TCP`:`HTTP`}function b(e){return e===`HTTPS`||e===`TLS`}var x=e({protocol:t(_),port:l,defaultTargetGroupArn:a().min(1,`Target group is required`),certificateArn:a().optional(),sslPolicy:a().optional()}).superRefine((e,t)=>{b(e.protocol)&&!e.certificateArn&&t.addIssue({code:`custom`,path:[`certificateArn`],message:`A certificate is required for HTTPS and TLS`})}),S=/^[!-~]+$/,C=e({field:t([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:a().max(40).optional(),rawValues:a().min(1,`At least one value is required`).max(640,`Too many values`)}).superRefine((e,t)=>{e.field===`http-header`&&!e.httpHeaderName&&t.addIssue({code:`custom`,path:[`httpHeaderName`],message:`Header name is required`});let n=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);if(n.length===0||n.length>5){t.addIssue({code:`custom`,path:[`rawValues`],message:`Enter 1 to 5 values, comma or newline separated`});return}for(let e of n)if(!S.test(e)){t.addIssue({code:`custom`,path:[`rawValues`],message:`Value "${e}" contains whitespace or non-ASCII characters`});return}}),w=e({priority:n().int(`Priority must be a whole number`).min(1,`Priority must be at least 1`).max(5e4,`Priority must be at most 50000`),conditions:r(C).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:a().min(1,`Target group is required`)}),T=e({name:s,type:t(m),scheme:t([`internet-facing`,`internal`]),vpcId:a().min(1,`VPC is required`),subnetIds:r(a()).min(1,`At least 1 subnet is required`),securityGroupIds:r(a()),tags:r(u),listener:e({protocol:t(_),port:l,targetGroupMode:t([`new`,`existing`]),existingTargetGroupArn:a().optional(),certificateArn:a().optional(),sslPolicy:a().optional()}).superRefine((e,t)=>{e.targetGroupMode===`existing`&&!e.existingTargetGroupArn&&t.addIssue({code:`custom`,path:[`existingTargetGroupArn`],message:`Target group is required`}),b(e.protocol)&&!e.certificateArn&&t.addIssue({code:`custom`,path:[`certificateArn`],message:`A certificate is required for HTTPS/TLS`})})});e({targets:r(e({instanceId:a().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),i(a(),a());export{f as a,v as c,w as i,x as n,y as o,T as r,b as s,p as t};
import{Br as e,Hr as t,Ir as n,Lr as r,Ur as i,Vr as a}from"./index.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=i().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`).refine(e=>!e.startsWith(`internal-`),`Name cannot start with 'internal-'`),c=i().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`),l=e().int(`Port must be a whole number`).min(1,`Port must be at least 1`).max(65535,`Port must be at most 65535`),u=a({key:i().min(1,`Tag key is required`).max(128),value:i().max(256)}),d=a({protocol:n([`HTTP`]),path:i().min(1,`Path is required`).max(1024),port:i().min(1),intervalSeconds:e().int().min(5).max(300),timeoutSeconds:e().int().min(2).max(120),healthyThresholdCount:e().int().min(2).max(10),unhealthyThresholdCount:e().int().min(2).max(10),matcher:i().regex(/^\d{3}(?:[-,]\d{3})*$/,`Matcher must be HTTP codes like 200 or 200-299 or 200,201`)}),f=a({name:c,protocol:n([`HTTP`]),port:l,vpcId:i().min(1,`VPC is required`),healthCheck:d,tags:r(u)}),p=a({protocol:n([`HTTP`]),port:l,defaultTargetGroupArn:i().min(1,`Target group is required`)}),m=/^[!-~]+$/,h=a({field:n([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:i().max(40).optional(),rawValues:i().min(1,`At least one value is required`).max(640,`Too many values`)}).superRefine((e,t)=>{e.field===`http-header`&&!e.httpHeaderName&&t.addIssue({code:`custom`,path:[`httpHeaderName`],message:`Header name is required`});let n=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);if(n.length===0||n.length>5){t.addIssue({code:`custom`,path:[`rawValues`],message:`Enter 1 to 5 values, comma or newline separated`});return}for(let e of n)if(!m.test(e)){t.addIssue({code:`custom`,path:[`rawValues`],message:`Value "${e}" contains whitespace or non-ASCII characters`});return}}),g=a({priority:e().int(`Priority must be a whole number`).min(1,`Priority must be at least 1`).max(5e4,`Priority must be at most 50000`),conditions:r(h).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:i().min(1,`Target group is required`)}),_=a({name:s,scheme:n([`internet-facing`,`internal`]),vpcId:i().min(1,`VPC is required`),subnetIds:r(i()).min(2,`At least 2 subnets are required for an ALB`),securityGroupIds:r(i()),tags:r(u),listener:a({protocol:n([`HTTP`]),port:l,targetGroupMode:n([`new`,`existing`]),existingTargetGroupArn:i().optional()}).refine(e=>e.targetGroupMode===`existing`?!!e.existingTargetGroupArn:!0,{error:`Target group is required`,path:[`existingTargetGroupArn`]})});a({targets:r(a({instanceId:i().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),t(i(),i());export{f as i,_ as n,g as r,p as t};
@@ -1 +1 @@
import{$o as e,bs as t,es as n,is as r,ls as i,ms as a,ns as o,ps as s,qo as c,ss as l,ts as u,vs as d}from"./index.js";var f=class extends d{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),s(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&l(t.mutationKey)!==l(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??o();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){r.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},p=t(u(),1);function m(t,n){let o=e(n),[s]=p.useState(()=>new f(o,t));p.useEffect(()=>{s.setOptions(t)},[s,t]);let c=p.useSyncExternalStore(p.useCallback(e=>s.subscribe(r.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l=p.useCallback((e,t)=>{s.mutate(e,t).catch(i)},[s]);if(c.error&&a(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}var h=c(),g=n();function _(e){let t=(0,h.c)(7),{msg:n,error:r}=e,i;r&&(i=r.name===`Error`?r.message:r.name);let a;t[0]===n?a=t[1]:(a=n&&(0,g.jsx)(`h2`,{className:`text-sm text-destructive`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i&&(0,g.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[2]=i,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,g.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}export{m as n,_ as t};
import{Fo as e,Ho as t,Ko as n,Uo as r,Vo as i,Wo as a,Yo as o,Zo as s,cs as c,ns as l,os as u,ts as d}from"./index.js";var f=class extends u{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),d(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&o(t.mutationKey)!==o(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??a();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){n.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},p=c(r(),1);function m(e,t){let r=i(t),[a]=p.useState(()=>new f(r,e));p.useEffect(()=>{a.setOptions(e)},[a,e]);let o=p.useSyncExternalStore(p.useCallback(e=>a.subscribe(n.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=p.useCallback((e,t)=>{a.mutate(e,t).catch(s)},[a]);if(o.error&&l(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}var h=e(),g=t();function _(e){let t=(0,h.c)(7),{msg:n,error:r}=e,i;r&&(i=r.name===`Error`?r.message:r.name);let a;t[0]===n?a=t[1]:(a=n&&(0,g.jsx)(`h2`,{className:`text-sm text-destructive`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i&&(0,g.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[2]=i,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,g.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}export{m as n,_ as t};
@@ -1 +1 @@
import{Mr as e,Pr as t}from"./index.js";var n=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){let r=this.marshaller,i=t.getEventStreamMember(),a=t.getMemberSchema(i),o=this.serializer,s=this.defaultContentType,c=Symbol(`initialRequestMarker`),l={async*[Symbol.asyncIterator](){if(n){let e={":event-type":{type:`string`,value:`initial-request`},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:s}};o.write(t,n);let r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(let t of e)yield t}};return r.serialize(l,e=>{if(e[c])return{headers:e.headers,body:e.body};let t=``;for(let n in e)if(n!==`__type`){t=n;break}let{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,a,e);return{headers:{":event-type":{type:`string`,value:i},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:o??s},...n},body:r}})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(t.body,async t=>{let r=``;for(let e in t)if(e!==`__type`){r=e;break}let i=t[r].body;if(r===`initial-response`){let e=await this.deserializer.read(n,i);return delete e[a],{[s]:!0,...e}}else if(r in o){let n=o[r];if(n.isStructSchema()){let a={},o=!1;for(let[s,c]of n.structIterator()){let{eventHeader:n,eventPayload:l}=c.getMergedTraits();if(o||=!!(n||l),l)c.isBlobSchema()?a[s]=i:c.isStringSchema()?a[s]=(this.serdeContext?.utf8Encoder??e)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let e=t[r].headers[s]?.value;e!=null&&(c.isNumericSchema()?e&&typeof e==`object`&&`bytes`in e?a[s]=BigInt(e.toString()):a[s]=Number(e):a[s]=e)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:t}}),l=c[Symbol.asyncIterator](),u=await l.next();if(u.done)return c;if(u.value?.[s]){if(!n)throw Error(`@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.`);for(let e in u.value)r[e]=u.value[e]}return{async*[Symbol.asyncIterator](){for(u?.value?.[s]||(yield u.value);;){let{done:e,value:t}=await l.next();if(e)break;yield t}}}}writeEventBody(e,n,r){let i=this.serializer,a=e,o=null,s,c=n.getSchema()[4].includes(e),l={};if(c){let t=n.getMemberSchema(e);if(t.isStructSchema()){for(let[n,i]of t.structIterator()){let{eventHeader:t,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(t){let t=r[e][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=t&&t<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),t!=null&&(l[n]={type:a,value:t},delete r[e][n])}}if(o!==null){let n=t.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[e][o])}else i.write(t,r[e])}else if(t.isUnitSchema())i.write(t,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[t,n]=r[e];a=t,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??t)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
import{Sr as e,br as t}from"./index.js";var n=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){let r=this.marshaller,i=t.getEventStreamMember(),a=t.getMemberSchema(i),o=this.serializer,s=this.defaultContentType,c=Symbol(`initialRequestMarker`),l={async*[Symbol.asyncIterator](){if(n){let e={":event-type":{type:`string`,value:`initial-request`},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:s}};o.write(t,n);let r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(let t of e)yield t}};return r.serialize(l,e=>{if(e[c])return{headers:e.headers,body:e.body};let t=``;for(let n in e)if(n!==`__type`){t=n;break}let{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,a,e);return{headers:{":event-type":{type:`string`,value:i},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:o??s},...n},body:r}})}async deserializeEventStream({response:e,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(e.body,async e=>{let r=``;for(let t in e)if(t!==`__type`){r=t;break}let i=e[r].body;if(r===`initial-response`){let e=await this.deserializer.read(n,i);return delete e[a],{[s]:!0,...e}}else if(r in o){let n=o[r];if(n.isStructSchema()){let a={},o=!1;for(let[s,c]of n.structIterator()){let{eventHeader:n,eventPayload:l}=c.getMergedTraits();if(o||=!!(n||l),l)c.isBlobSchema()?a[s]=i:c.isStringSchema()?a[s]=(this.serdeContext?.utf8Encoder??t)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let t=e[r].headers[s]?.value;t!=null&&(c.isNumericSchema()?t&&typeof t==`object`&&`bytes`in t?a[s]=BigInt(t.toString()):a[s]=Number(t):a[s]=t)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:e}}),l=c[Symbol.asyncIterator](),u=await l.next();if(u.done)return c;if(u.value?.[s]){if(!n)throw Error(`@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.`);for(let e in u.value)r[e]=u.value[e]}return{async*[Symbol.asyncIterator](){for(u?.value?.[s]||(yield u.value);;){let{done:e,value:t}=await l.next();if(e)break;yield t}}}}writeEventBody(t,n,r){let i=this.serializer,a=t,o=null,s,c=n.getSchema()[4].includes(t),l={};if(c){let e=n.getMemberSchema(t);if(e.isStructSchema()){for(let[n,i]of e.structIterator()){let{eventHeader:e,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(e){let e=r[t][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=e&&e<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),e!=null&&(l[n]={type:a,value:e},delete r[t][n])}}if(o!==null){let n=e.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[t][o])}else i.write(e,r[t])}else if(e.isUnitSchema())i.write(e,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[e,n]=r[t];a=e,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??e)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
+1 -1
View File
@@ -1 +1 @@
import{Lo as e,do as t,es as n,qo as r,ts as i}from"./index.js";i();var a=r(),o=n();function s(e){let n=(0,a.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=t(`group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-group`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}var c=e(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function l(e){let n=(0,a.c)(11),r,i,s;n[0]===e?(r=n[1],i=n[2],s=n[3]):({className:r,orientation:s,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=s);let l=s===void 0?`vertical`:s,u;n[4]!==r||n[5]!==l?(u=t(c({orientation:l}),r),n[4]=r,n[5]=l,n[6]=u):u=n[6];let d;return n[7]!==l||n[8]!==i||n[9]!==u?(d=(0,o.jsx)(`div`,{className:u,"data-orientation":l,"data-slot":`field`,role:`group`,...i}),n[7]=l,n[8]=i,n[9]=u,n[10]=d):d=n[10],d}function u(e){let n=(0,a.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=t(`flex w-fit items-center gap-2 text-xs/relaxed leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-label`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function d(e){let n=(0,a.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=t(`text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-[orientation=horizontal]/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`p`,{className:s,"data-slot":`field-description`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function f(e){let n=(0,a.c)(15),r,i,s,c;n[0]===e?(r=n[1],i=n[2],s=n[3],c=n[4]):({className:i,children:r,errors:s,...c}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=s,n[4]=c);let l;bb0:{if(r){l=r;break bb0}if(!s?.length){l=null;break bb0}let e;n[5]===s?e=n[6]:(e=[...new Map(s.map(m)).values()],n[5]=s,n[6]=e);let t=e;if(t?.length===1){l=t[0]?.message;break bb0}let i;n[7]===t?i=n[8]:(i=(0,o.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:t.map(p)}),n[7]=t,n[8]=i),l=i}let u=l;if(!u)return null;let d;n[9]===i?d=n[10]:(d=t(`text-xs/relaxed font-normal text-destructive`,i),n[9]=i,n[10]=d);let f;return n[11]!==u||n[12]!==c||n[13]!==d?(f=(0,o.jsx)(`div`,{className:d,"data-slot":`field-error`,role:`alert`,...c,children:u}),n[11]=u,n[12]=c,n[13]=d,n[14]=f):f=n[14],f}function p(e){return e?.message&&(0,o.jsx)(`li`,{children:e.message},e.message)}function m(e){return[e?.message,e]}export{u as a,s as i,d as n,f as r,l as t};
import{$a as e,Fo as t,Ho as n,To as r,Uo as i}from"./index.js";i();var a=t(),o=n();function s(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-group`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}var c=r(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function l(t){let n=(0,a.c)(11),r,i,s;n[0]===t?(r=n[1],i=n[2],s=n[3]):({className:r,orientation:s,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s);let l=s===void 0?`vertical`:s,u;n[4]!==r||n[5]!==l?(u=e(c({orientation:l}),r),n[4]=r,n[5]=l,n[6]=u):u=n[6];let d;return n[7]!==l||n[8]!==i||n[9]!==u?(d=(0,o.jsx)(`div`,{className:u,"data-orientation":l,"data-slot":`field`,role:`group`,...i}),n[7]=l,n[8]=i,n[9]=u,n[10]=d):d=n[10],d}function u(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`flex w-fit items-center gap-2 text-xs/relaxed leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-label`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function d(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-[orientation=horizontal]/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`p`,{className:s,"data-slot":`field-description`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function f(t){let n=(0,a.c)(15),r,i,s,c;n[0]===t?(r=n[1],i=n[2],s=n[3],c=n[4]):({className:i,children:r,errors:s,...c}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=c);let l;bb0:{if(r){l=r;break bb0}if(!s?.length){l=null;break bb0}let e;n[5]===s?e=n[6]:(e=[...new Map(s.map(m)).values()],n[5]=s,n[6]=e);let t=e;if(t?.length===1){l=t[0]?.message;break bb0}let i;n[7]===t?i=n[8]:(i=(0,o.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:t.map(p)}),n[7]=t,n[8]=i),l=i}let u=l;if(!u)return null;let d;n[9]===i?d=n[10]:(d=e(`text-xs/relaxed font-normal text-destructive`,i),n[9]=i,n[10]=d);let f;return n[11]!==u||n[12]!==c||n[13]!==d?(f=(0,o.jsx)(`div`,{className:d,"data-slot":`field-error`,role:`alert`,...c,children:u}),n[11]=u,n[12]=c,n[13]=d,n[14]=f):f=n[14],f}function p(e){return e?.message&&(0,o.jsx)(`li`,{children:e.message},e.message)}function m(e){return[e?.message,e]}export{u as a,s as i,d as n,f as r,l as t};
@@ -1 +1 @@
import{co as e,es as t,qo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(9),{isSubmitting:a,isPending:o,onCancel:s,submitLabel:c,pendingLabel:l}=t,u=a||o,d;n[0]!==u||n[1]!==s?(d=(0,i.jsx)(e,{disabled:u,onClick:s,type:`button`,variant:`outline`,children:`Cancel`}),n[0]=u,n[1]=s,n[2]=d):d=n[2];let f=u?l:c,p;n[3]!==u||n[4]!==f?(p=(0,i.jsx)(e,{disabled:u,type:`submit`,children:f}),n[3]=u,n[4]=f,n[5]=p):p=n[5];let m;return n[6]!==d||n[7]!==p?(m=(0,i.jsxs)(`div`,{className:`flex gap-2`,children:[d,p]}),n[6]=d,n[7]=p,n[8]=m):m=n[8],m}export{a as t};
import{Fo as e,Ho as t,Xa as n}from"./index.js";var r=e(),i=t();function a(e){let t=(0,r.c)(9),{isSubmitting:a,isPending:o,onCancel:s,submitLabel:c,pendingLabel:l}=e,u=a||o,d;t[0]!==u||t[1]!==s?(d=(0,i.jsx)(n,{disabled:u,onClick:s,type:`button`,variant:`outline`,children:`Cancel`}),t[0]=u,t[1]=s,t[2]=d):d=t[2];let f=u?l:c,p;t[3]!==u||t[4]!==f?(p=(0,i.jsx)(n,{disabled:u,type:`submit`,children:f}),t[3]=u,t[4]=f,t[5]=p):p=t[5];let m;return t[6]!==d||t[7]!==p?(m=(0,i.jsxs)(`div`,{className:`flex gap-2`,children:[d,p]}),t[6]=d,t[7]=p,t[8]=m):m=t[8],m}export{a as t};
+1 -1
View File
@@ -1 +1 @@
import{n as e}from"./error-banner.js";import{$o as t,Ct as n,Gt as r,Ht as i,Jt as a,Kt as o,Ut as s,Vt as c,Wt as l,Xt as u,Yt as d,fr as f,pr as p,qo as m,qt as h}from"./index.js";var g=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(c).build(){},_=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(i).build(){},v=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(s).build(){},y=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(l).build(){},b=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(r).build(){},x=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(o).build(){},S=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(h).build(){},C=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(a).build(){},w=class extends f.classBuilder().ep(u).m(function(e,t,n,r){return[p(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(d).build(){},T=m();function E(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:D,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`users`]})}},n[0]=r,n[1]=i),e(i)}async function D(e){let t=new y({UserName:e.userName,Path:e.path||void 0});return await n().send(t)}function O(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:k,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`users`]})}},n[0]=r,n[1]=i),e(i)}async function k(e){let t=new S({UserName:e});return await n().send(t)}function A(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:j,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},n[0]=r,n[1]=i),e(i)}async function j(e){let t=new _({UserName:e});return await n().send(t)}function M(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:N,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},n[0]=r,n[1]=i),e(i)}async function N(e){let{userName:t,accessKeyId:r}=e,i=new b({UserName:t,AccessKeyId:r});return await n().send(i)}function P(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:F,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},n[0]=r,n[1]=i),e(i)}async function F(e){let{userName:t,accessKeyId:r,status:i}=e,a=new w({UserName:t,AccessKeyId:r,Status:i});return await n().send(a)}function I(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:L,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`policies`]})}},n[0]=r,n[1]=i),e(i)}async function L(e){let t=new v({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return await n().send(t)}function R(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:z,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`policies`]})}},n[0]=r,n[1]=i),e(i)}async function z(e){let t=new x({PolicyArn:e});return await n().send(t)}function B(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:V,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},n[0]=r,n[1]=i),e(i)}async function V(e){let{userName:t,policyArn:r}=e,i=new g({UserName:t,PolicyArn:r});return await n().send(i)}function H(){let n=(0,T.c)(2),r=t(),i;return n[0]===r?i=n[1]:(i={mutationFn:U,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},n[0]=r,n[1]=i),e(i)}async function U(e){let{userName:t,policyArn:r}=e,i=new C({UserName:t,PolicyArn:r});return await n().send(i)}export{M as a,H as c,E as i,P as l,A as n,R as o,I as r,O as s,B as t};
import{n as e}from"./error-banner.js";import{Bt as t,Fo as n,Gt as r,Ht as i,Kt as a,Rt as o,Ut as s,Vo as c,Vt as l,Wt as u,bt as d,or as f,qt as p,sr as m,zt as h}from"./index.js";var g=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(o).build(){},_=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(h).build(){},v=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(t).build(){},y=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(l).build(){},b=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(i).build(){},x=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(s).build(){},S=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(u).build(){},C=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(r).build(){},w=class extends f.classBuilder().ep(p).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(a).build(){},T=n();function E(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},t[0]=n,t[1]=r),e(r)}async function D(e){let t=new y({UserName:e.userName,Path:e.path||void 0});return await d().send(t)}function O(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},t[0]=n,t[1]=r),e(r)}async function k(e){let t=new S({UserName:e});return await d().send(t)}function A(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:j,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=r),e(r)}async function j(e){let t=new _({UserName:e});return await d().send(t)}function M(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:N,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=r),e(r)}async function N(e){let{userName:t,accessKeyId:n}=e,r=new b({UserName:t,AccessKeyId:n});return await d().send(r)}function P(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=r),e(r)}async function F(e){let{userName:t,accessKeyId:n,status:r}=e,i=new w({UserName:t,AccessKeyId:n,Status:r});return await d().send(i)}function I(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:L,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},t[0]=n,t[1]=r),e(r)}async function L(e){let t=new v({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return await d().send(t)}function R(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},t[0]=n,t[1]=r),e(r)}async function z(e){let t=new x({PolicyArn:e});return await d().send(t)}function B(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},t[0]=n,t[1]=r),e(r)}async function V(e){let{userName:t,policyArn:n}=e,r=new g({UserName:t,PolicyArn:n});return await d().send(r)}function H(){let t=(0,T.c)(2),n=c(),r;return t[0]===n?r=t[1]:(r={mutationFn:U,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},t[0]=n,t[1]=r),e(r)}async function U(e){let{userName:t,policyArn:n}=e,r=new C({UserName:t,PolicyArn:n});return await d().send(r)}export{M as a,H as c,E as i,P as l,A as n,R as o,I as r,O as s,B as t};
+1 -1
View File
@@ -1 +1 @@
import{$r as e,ti as t}from"./index.js";var n=e({userName:t().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:t().optional()}),r=e({policyName:t().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:t().optional(),policyDocument:t().min(1,`Policy document is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Policy document must be valid JSON`})});export{n,r as t};
import{Ur as e,Vr as t}from"./index.js";var n=t({userName:e().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:e().optional()}),r=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:e().optional(),policyDocument:e().min(1,`Policy document is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Policy document must be valid JSON`})});export{n,r as t};
@@ -1,3 +1,3 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{z as ee}from"./ec2.js";import{Xo as r,ca as te,es as i,qo as a}from"./index.js";import{a as o,i as s,t as c}from"./zod.js";import{t as l}from"./form-actions.js";import{t as ne}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{g as p}from"./ec22.js";import{t as m}from"./textarea.js";var h=a(),g=i();function _(){let i=(0,h.c)(57),a=r(),_=ee(),v;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:c(p)},i[0]=v):v=i[0];let{handleSubmit:y,register:b,control:x,formState:S}=s(v),{errors:C,isSubmitting:w}=S,T;i[1]===x?T=i[2]:(T={control:x},i[1]=x,i[2]=T);let E=o(T),D;i[3]===E?D=i[4]:(D=e=>e?E[e]:void 0,i[3]=E,i[4]=D);let O=D,k;i[5]!==_||i[6]!==a?(k=async e=>{await _.mutateAsync(e),a({to:`/ec2/describe-key-pairs`})},i[5]=_,i[6]=a,i[7]=k):k=i[7];let A=k,j,M;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,g.jsx)(t,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,g.jsx)(ne,{title:`Import Key Pair`}),i[8]=j,i[9]=M):(j=i[8],M=i[9]);let N;i[10]===_.error?N=i[11]:(N=_.error&&(0,g.jsx)(e,{error:_.error,msg:`Failed to import key pair`}),i[10]=_.error,i[11]=N);let P;i[12]!==y||i[13]!==A?(P=y(A),i[12]=y,i[13]=A,i[14]=P):P=i[14];let F;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,g.jsx)(u,{children:(0,g.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),i[15]=F):F=i[15];let I=!!C.keyName,L;i[16]===b?L=i[17]:(L=b(`keyName`),i[16]=b,i[17]=L);let R;i[18]!==I||i[19]!==L?(R=(0,g.jsx)(te,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),i[18]=I,i[19]=L,i[20]=R):R=i[20];let z;i[21]===C.keyName?z=i[22]:(z=(0,g.jsx)(d,{errors:[C.keyName]}),i[21]=C.keyName,i[22]=z);let B;i[23]!==R||i[24]!==z?(B=(0,g.jsxs)(f,{children:[F,R,z]}),i[23]=R,i[24]=z,i[25]=B):B=i[25];let V,H;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,g.jsx)(u,{children:(0,g.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),i[26]=V,i[27]=H):(V=i[26],H=i[27]);let U=!!C.publicKeyMaterial,W;i[28]===b?W=i[29]:(W=b(`publicKeyMaterial`),i[28]=b,i[29]=W);let G;i[30]!==U||i[31]!==W?(G=(0,g.jsx)(m,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),i[30]=U,i[31]=W,i[32]=G):G=i[32];let K;i[33]===C.publicKeyMaterial?K=i[34]:(K=(0,g.jsx)(d,{errors:[C.publicKeyMaterial]}),i[33]=C.publicKeyMaterial,i[34]=K);let q;i[35]!==G||i[36]!==K?(q=(0,g.jsxs)(f,{children:[V,H,G,K]}),i[35]=G,i[36]=K,i[37]=q):q=i[37];let J;i[38]===O?J=i[39]:(J=re(O),i[38]=O,i[39]=J);let Y;i[40]===J?Y=i[41]:(Y=(0,g.jsx)(n,{commands:J}),i[40]=J,i[41]=Y);let X;i[42]===a?X=i[43]:(X=async()=>await a({to:`/ec2/describe-key-pairs`}),i[42]=a,i[43]=X);let Z;i[44]!==_.isPending||i[45]!==w||i[46]!==X?(Z=(0,g.jsx)(l,{isPending:_.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),i[44]=_.isPending,i[45]=w,i[46]=X,i[47]=Z):Z=i[47];let Q;i[48]!==B||i[49]!==q||i[50]!==Y||i[51]!==Z||i[52]!==P?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),i[48]=B,i[49]=q,i[50]=Y,i[51]=Z,i[52]=P,i[53]=Q):Q=i[53];let $;return i[54]!==Q||i[55]!==N?($=(0,g.jsxs)(g.Fragment,{children:[j,M,N,Q]}),i[54]=Q,i[55]=N,i[56]=$):$=i[56],$}function re(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{z as r}from"./ec2.js";import{Fo as i,Ho as a,Ro as o,Xi as s}from"./index.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{g as h}from"./ec22.js";import{t as g}from"./textarea.js";var _=i(),v=a();function y(){let i=(0,_.c)(53),a=o(),y=r(),x;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(h)},i[0]=x):x=i[0];let{handleSubmit:S,register:C,watch:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;i[1]!==y||i[2]!==a?(O=async e=>{await y.mutateAsync(e),a({to:`/ec2/describe-key-pairs`})},i[1]=y,i[2]=a,i[3]=O):O=i[3];let k=O,A,j;i[4]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,v.jsx)(t,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),j=(0,v.jsx)(d,{title:`Import Key Pair`}),i[4]=A,i[5]=j):(A=i[4],j=i[5]);let M;i[6]===y.error?M=i[7]:(M=y.error&&(0,v.jsx)(e,{error:y.error,msg:`Failed to import key pair`}),i[6]=y.error,i[7]=M);let N;i[8]!==S||i[9]!==k?(N=S(k),i[8]=S,i[9]=k,i[10]=N):N=i[10];let P;i[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,v.jsx)(f,{children:(0,v.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),i[11]=P):P=i[11];let F=!!E.keyName,I;i[12]===C?I=i[13]:(I=C(`keyName`),i[12]=C,i[13]=I);let L;i[14]!==F||i[15]!==I?(L=(0,v.jsx)(s,{"aria-invalid":F,id:`keyName`,placeholder:`my-key-pair…`,...I}),i[14]=F,i[15]=I,i[16]=L):L=i[16];let R;i[17]===E.keyName?R=i[18]:(R=(0,v.jsx)(p,{errors:[E.keyName]}),i[17]=E.keyName,i[18]=R);let z;i[19]!==L||i[20]!==R?(z=(0,v.jsxs)(m,{children:[P,L,R]}),i[19]=L,i[20]=R,i[21]=z):z=i[21];let B,V;i[22]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,v.jsx)(f,{children:(0,v.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),V=(0,v.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),i[22]=B,i[23]=V):(B=i[22],V=i[23]);let H=!!E.publicKeyMaterial,U;i[24]===C?U=i[25]:(U=C(`publicKeyMaterial`),i[24]=C,i[25]=U);let W;i[26]!==H||i[27]!==U?(W=(0,v.jsx)(g,{"aria-invalid":H,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...U}),i[26]=H,i[27]=U,i[28]=W):W=i[28];let G;i[29]===E.publicKeyMaterial?G=i[30]:(G=(0,v.jsx)(p,{errors:[E.publicKeyMaterial]}),i[29]=E.publicKeyMaterial,i[30]=G);let K;i[31]!==W||i[32]!==G?(K=(0,v.jsxs)(m,{children:[B,V,W,G]}),i[31]=W,i[32]=G,i[33]=K):K=i[33];let q;i[34]===w?q=i[35]:(q=b(w),i[34]=w,i[35]=q);let J;i[36]===q?J=i[37]:(J=(0,v.jsx)(n,{commands:q}),i[36]=q,i[37]=J);let Y;i[38]===a?Y=i[39]:(Y=async()=>await a({to:`/ec2/describe-key-pairs`}),i[38]=a,i[39]=Y);let X;i[40]!==y.isPending||i[41]!==D||i[42]!==Y?(X=(0,v.jsx)(u,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),i[40]=y.isPending,i[41]=D,i[42]=Y,i[43]=X):X=i[43];let Z;i[44]!==z||i[45]!==K||i[46]!==J||i[47]!==X||i[48]!==N?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[z,K,J,X]}),i[44]=z,i[45]=K,i[46]=J,i[47]=X,i[48]=N,i[49]=Z):Z=i[49];let Q;return i[50]!==Z||i[51]!==M?(Q=(0,v.jsxs)(v.Fragment,{children:[A,j,M,Z]}),i[50]=Z,i[51]=M,i[52]=Q):Q=i[52],Q}function b(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\
--key-name`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<KeyName>`}`},{type:`flag`,value:` \\
--public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{y as component};
@@ -1 +0,0 @@
import{Er as e,Tr as t}from"./index.js";var n=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){let r=this.marshaller,i=t.getEventStreamMember(),a=t.getMemberSchema(i),o=this.serializer,s=this.defaultContentType,c=Symbol(`initialRequestMarker`),l={async*[Symbol.asyncIterator](){if(n){let e={":event-type":{type:`string`,value:`initial-request`},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:s}};o.write(t,n);let r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(let t of e)yield t}};return r.serialize(l,e=>{if(e[c])return{headers:e.headers,body:e.body};let t=``;for(let n in e)if(n!==`__type`){t=n;break}let{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,a,e);return{headers:{":event-type":{type:`string`,value:i},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:o??s},...n},body:r}})}async deserializeEventStream({response:e,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(e.body,async e=>{let r=``;for(let t in e)if(t!==`__type`){r=t;break}let i=e[r].body;if(r===`initial-response`){let e=await this.deserializer.read(n,i);return delete e[a],{[s]:!0,...e}}else if(r in o){let n=o[r];if(n.isStructSchema()){let a={},o=!1;for(let[s,c]of n.structIterator()){let{eventHeader:n,eventPayload:l}=c.getMergedTraits();if(o||=!!(n||l),l)c.isBlobSchema()?a[s]=i:c.isStringSchema()?a[s]=(this.serdeContext?.utf8Encoder??t)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let t=e[r].headers[s]?.value;t!=null&&(c.isNumericSchema()?t&&typeof t==`object`&&`bytes`in t?a[s]=BigInt(t.toString()):a[s]=Number(t):a[s]=t)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:e}}),l=c[Symbol.asyncIterator](),u=await l.next();if(u.done)return c;if(u.value?.[s]){if(!n)throw Error(`@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.`);for(let e in u.value)r[e]=u.value[e]}return{async*[Symbol.asyncIterator](){for(u?.value?.[s]||(yield u.value);;){let{done:e,value:t}=await l.next();if(e)break;yield t}}}}writeEventBody(t,n,r){let i=this.serializer,a=t,o=null,s,c=n.getSchema()[4].includes(t),l={};if(c){let e=n.getMemberSchema(t);if(e.isStructSchema()){for(let[n,i]of e.structIterator()){let{eventHeader:e,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(e){let e=r[t][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=e&&e<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),e!=null&&(l[n]={type:a,value:e},delete r[t][n])}}if(o!==null){let n=e.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[t][o])}else i.write(e,r[t])}else if(e.isUnitSchema())i.write(e,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[e,n]=r[t];a=e,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??e)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{Yo as e,es as t,qo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(22),a,o,s,c,l;n[0]===t?(a=n[1],o=n[2],s=n[3],c=n[4],l=n[5]):({title:l,subtitle:c,badge:a,children:o,...s}=t,n[0]=t,n[1]=a,n[2]=o,n[3]=s,n[4]=c,n[5]=l);let u;n[6]===l?u=n[7]:(u=(0,i.jsx)(`h3`,{className:`font-semibold`,children:l}),n[6]=l,n[7]=u);let d;n[8]===c?d=n[9]:(d=c&&(0,i.jsx)(`p`,{className:`mt-1 text-sm font-medium text-muted-foreground`,children:c}),n[8]=c,n[9]=d);let f;n[10]!==o||n[11]!==u||n[12]!==d?(f=(0,i.jsxs)(`div`,{className:`flex-1`,children:[u,d,o]}),n[10]=o,n[11]=u,n[12]=d,n[13]=f):f=n[13];let p;n[14]===a?p=n[15]:(p=a&&(0,i.jsx)(`div`,{className:`ml-4`,children:a}),n[14]=a,n[15]=p);let m;n[16]!==f||n[17]!==p?(m=(0,i.jsxs)(`div`,{className:`flex items-start justify-between`,children:[f,p]}),n[16]=f,n[17]=p,n[18]=m):m=n[18];let h;return n[19]!==s||n[20]!==m?(h=(0,i.jsx)(e,{className:`block rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,...s,children:m}),n[19]=s,n[20]=m,n[21]=h):h=n[21],h}export{a as t};
import{Fo as e,Ho as t,Lo as n}from"./index.js";var r=e(),i=t();function a(e){let t=(0,r.c)(22),a,o,s,c,l;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({title:l,subtitle:c,badge:a,children:o,...s}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u;t[6]===l?u=t[7]:(u=(0,i.jsx)(`h3`,{className:`font-semibold`,children:l}),t[6]=l,t[7]=u);let d;t[8]===c?d=t[9]:(d=c&&(0,i.jsx)(`p`,{className:`mt-1 text-sm font-medium text-muted-foreground`,children:c}),t[8]=c,t[9]=d);let f;t[10]!==o||t[11]!==u||t[12]!==d?(f=(0,i.jsxs)(`div`,{className:`flex-1`,children:[u,d,o]}),t[10]=o,t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;t[14]===a?p=t[15]:(p=a&&(0,i.jsx)(`div`,{className:`ml-4`,children:a}),t[14]=a,t[15]=p);let m;t[16]!==f||t[17]!==p?(m=(0,i.jsxs)(`div`,{className:`flex items-start justify-between`,children:[f,p]}),t[16]=f,t[17]=p,t[18]=m):m=t[18];let h;return t[19]!==s||t[20]!==m?(h=(0,i.jsx)(n,{className:`block rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,...s,children:m}),t[19]=s,t[20]=m,t[21]=h):h=t[21],h}export{a as t};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{S as t,Yo as n,co as r,es as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=i();function u(){let i=(0,c.c)(3),{data:a}=e(t),s;if(i[0]!==a.Policies){let e=(a.Policies??[]).toSorted(f),t;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,l.jsx)(o,{actions:(0,l.jsx)(n,{to:`/iam/create-policy`,children:(0,l.jsx)(r,{children:`Create Policy`})}),title:`Policies`}),i[2]=t):t=i[2],s=(0,l.jsxs)(l.Fragment,{children:[t,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),i[0]=a.Policies,i[1]=s}else s=i[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
import{t as e}from"./useSuspenseQuery.js";import{Fo as t,Ho as n,Lo as r,S as i,Xa as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=n();function u(){let t=(0,c.c)(3),{data:n}=e(i),s;if(t[0]!==n.Policies){let e=(n.Policies??[]).toSorted(f),i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-policy`,children:(0,l.jsx)(a,{children:`Create Policy`})}),title:`Policies`}),t[2]=i):i=t[2],s=(0,l.jsxs)(l.Fragment,{children:[i,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),t[0]=n.Policies,t[1]=s}else s=t[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{E as t,Yo as n,co as r,es as i,qo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=i();function u(){let i=(0,c.c)(3),{data:a}=e(t),s;if(i[0]!==a.Users){let e=(a.Users??[]).toSorted(f),t;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,l.jsx)(o,{actions:(0,l.jsx)(n,{to:`/iam/create-user`,children:(0,l.jsx)(r,{children:`Create User`})}),title:`Users`}),i[2]=t):t=i[2],s=(0,l.jsxs)(l.Fragment,{children:[t,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),i[0]=a.Users,i[1]=s}else s=i[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
import{t as e}from"./useSuspenseQuery.js";import{E as t,Fo as n,Ho as r,Lo as i,Xa as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=n(),l=r();function u(){let n=(0,c.c)(3),{data:r}=e(t),s;if(n[0]!==r.Users){let e=(r.Users??[]).toSorted(f),t;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,l.jsx)(o,{actions:(0,l.jsx)(i,{to:`/iam/create-user`,children:(0,l.jsx)(a,{children:`Create User`})}),title:`Users`}),n[2]=t):t=n[2],s=(0,l.jsxs)(l.Fragment,{children:[t,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),n[0]=r.Users,n[1]=s}else s=n[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
+1 -1
View File
@@ -1 +1 @@
import{Gr as e,Wr as t,bs as n,ca as r,co as i,es as a,hn as o,qo as s,qr as c,ts as l,vt as u,xt as d,yt as f}from"./index.js";import{i as p,t as m}from"./zod.js";import{a as h,i as g,r as _,t as v}from"./field.js";import{n as y,r as b,t as x}from"./collapsible.js";import{a as S,o as C,r as w,t as T}from"./card.js";var E=s(),D=n(l()),O=a();function k(){let{reason:n}=u.useSearch(),[a,s]=(0,D.useState)(null),{register:l,handleSubmit:y,formState:{errors:b,isSubmitting:x}}=p({resolver:m(t)});async function E(t){s(null),f(),c(t);try{await d().send(new o({})),window.location.href=`/`}catch{e(),f(),s(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,O.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,O.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,O.jsxs)(T,{children:[(0,O.jsx)(S,{children:(0,O.jsx)(C,{children:`AWS Credentials`})}),(0,O.jsxs)(w,{children:[n===`expired`&&!a&&(0,O.jsx)(`p`,{className:`mb-4 rounded-md bg-muted p-3 text-sm text-muted-foreground`,children:`Your session is no longer valid — please sign in again.`}),a&&(0,O.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:a}),(0,O.jsx)(`form`,{onSubmit:y(E),children:(0,O.jsxs)(g,{children:[(0,O.jsxs)(v,{children:[(0,O.jsx)(h,{children:(0,O.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,O.jsx)(r,{"aria-invalid":!!b.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...l(`accessKeyId`)}),(0,O.jsx)(_,{errors:[b.accessKeyId]})]}),(0,O.jsxs)(v,{children:[(0,O.jsx)(h,{children:(0,O.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,O.jsx)(r,{"aria-invalid":!!b.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...l(`secretAccessKey`)}),(0,O.jsx)(_,{errors:[b.secretAccessKey]})]}),(0,O.jsx)(i,{className:`w-full`,disabled:x,type:`submit`,children:x?`Signing in...`:`Sign In`})]})})]})]}),(0,O.jsx)(A,{})]})})}function A(){let e=(0,E.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,O.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(b,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,O.jsx)(T,{className:`border-muted bg-muted/30`,children:(0,O.jsx)(w,{className:`pt-4 pb-4`,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,O.jsxs)(x,{children:[r,(0,O.jsx)(y,{children:(0,O.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,O.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,O.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,O.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{k as component};
import{Fo as e,Fr as t,Ho as n,Mr as r,Nr as i,Uo as a,Xa as o,Xi as s,_t as c,cs as l,gt as u,ln as d,vt as f}from"./index.js";import{i as p,t as m}from"./zod.js";import{a as h,i as g,r as _,t as v}from"./field.js";import{n as y,r as b,t as x}from"./collapsible.js";import{a as S,o as C,r as w,t as T}from"./card.js";var E=e(),D=l(a()),O=n();function k(){let{reason:e}=u.useSearch(),[n,a]=(0,D.useState)(null),{register:l,handleSubmit:y,formState:{errors:b,isSubmitting:x}}=p({resolver:m(r)});async function E(e){a(null),c(),t(e);try{await f().send(new d({})),window.location.href=`/`}catch{i(),c(),a(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,O.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,O.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,O.jsxs)(T,{children:[(0,O.jsx)(S,{children:(0,O.jsx)(C,{children:`AWS Credentials`})}),(0,O.jsxs)(w,{children:[e===`expired`&&!n&&(0,O.jsx)(`p`,{className:`mb-4 rounded-md bg-muted p-3 text-sm text-muted-foreground`,children:`Your session is no longer valid — please sign in again.`}),n&&(0,O.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n}),(0,O.jsx)(`form`,{onSubmit:y(E),children:(0,O.jsxs)(g,{children:[(0,O.jsxs)(v,{children:[(0,O.jsx)(h,{children:(0,O.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,O.jsx)(s,{"aria-invalid":!!b.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...l(`accessKeyId`)}),(0,O.jsx)(_,{errors:[b.accessKeyId]})]}),(0,O.jsxs)(v,{children:[(0,O.jsx)(h,{children:(0,O.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,O.jsx)(s,{"aria-invalid":!!b.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...l(`secretAccessKey`)}),(0,O.jsx)(_,{errors:[b.secretAccessKey]})]}),(0,O.jsx)(o,{className:`w-full`,disabled:x,type:`submit`,children:x?`Signing in...`:`Sign In`})]})})]})]}),(0,O.jsx)(A,{})]})})}function A(){let e=(0,E.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,O.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(b,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,O.jsx)(T,{className:`border-muted bg-muted/30`,children:(0,O.jsx)(w,{className:`pt-4 pb-4`,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,O.jsxs)(x,{children:[r,(0,O.jsx)(y,{children:(0,O.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,O.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,O.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,O.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{k as component};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{H as t,Yo as n,co as r,es as i,mo as a,qo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=o(),u=i();function d(){let i=(0,l.c)(5),{data:a}=e(t),o;i[0]===a.Buckets?o=i[1]:(o=a.Buckets??[],i[0]=a.Buckets,i[1]=o);let c=o,d;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(n,{to:`/s3/create-bucket`,children:(0,u.jsx)(r,{children:`Create Bucket`})}),title:`Buckets`}),i[2]=d):d=i[2];let p;return i[3]===c?p=i[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No buckets found.`})]}),i[3]=c,i[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${a(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
import{t as e}from"./useSuspenseQuery.js";import{B as t,Fo as n,Ho as r,Lo as i,Xa as a,no as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=n(),u=r();function d(){let n=(0,l.c)(5),{data:r}=e(t),o;n[0]===r.Buckets?o=n[1]:(o=r.Buckets??[],n[0]=r.Buckets,n[1]=o);let c=o,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(i,{to:`/s3/create-bucket`,children:(0,u.jsx)(a,{children:`Create Bucket`})}),title:`Buckets`}),n[2]=d):d=n[2];let p;return n[3]===c?p=n[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No buckets found.`})]}),n[3]=c,n[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${o(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{es as e,qo as t}from"./index.js";var n=t(),r=e();function i(e){let t=(0,n.c)(12),{title:i,subtitle:a,actions:o}=e,s;t[0]===i?s=t[1]:(s=(0,r.jsx)(`h1`,{className:`text-3xl`,children:i}),t[0]=i,t[1]=s);let c;t[2]===a?c=t[3]:(c=a&&(0,r.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:a}),t[2]=a,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,r.jsxs)(`div`,{children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===o?u=t[8]:(u=o&&(0,r.jsx)(`div`,{children:o}),t[7]=o,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,r.jsxs)(`div`,{className:`mb-6 flex items-start justify-between`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}export{i as t};
import{Fo as e,Ho as t}from"./index.js";var n=e(),r=t();function i(e){let t=(0,n.c)(12),{title:i,subtitle:a,actions:o}=e,s;t[0]===i?s=t[1]:(s=(0,r.jsx)(`h1`,{className:`text-3xl`,children:i}),t[0]=i,t[1]=s);let c;t[2]===a?c=t[3]:(c=a&&(0,r.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:a}),t[2]=a,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,r.jsxs)(`div`,{children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===o?u=t[8]:(u=o&&(0,r.jsx)(`div`,{children:o}),t[7]=o,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,r.jsxs)(`div`,{className:`mb-6 flex items-start justify-between`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}export{i as t};
+1 -1
View File
@@ -1 +1 @@
import{Io as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
import{wo as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
+1 -1
View File
@@ -1 +1 @@
import{Jo as e,es as t,qo as n}from"./index.js";var r=n(),i=t(),a=()=>{let t=(0,r.c)(1),n;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(e,{}),t[0]=n):n=t[0],n};export{a as component};
import{Fo as e,Ho as t,Io as n}from"./index.js";var r=e(),i=t(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component};
@@ -1 +1 @@
import{Jo as e,es as t,qo as n}from"./index.js";var r=n(),i=t(),a=()=>{let t=(0,r.c)(1),n;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(e,{}),t[0]=n):n=t[0],n};export{a as component};
import{Fo as e,Ho as t,Io as n}from"./index.js";var r=e(),i=t(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{do as e,es as t,qo as n}from"./index.js";var r=n(),i=t(),a=new Set([`running`,`available`,`completed`,`Active`]),o=new Set([`stopped`,`error`]),s=new Set([`pending`,`shutting-down`,`stopping`]);function c(e){return e&&a.has(e)?`bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100`:e&&o.has(e)?`bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100`:e&&s.has(e)?`bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100`:e===`terminated`?`bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400`:`bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100`}function l(t){let n=(0,r.c)(5),{state:a}=t,o;n[0]===a?o=n[1]:(o=e(`rounded-full px-2 py-1 text-xs`,c(a)),n[0]=a,n[1]=o);let s;return n[2]!==a||n[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),n[2]=a,n[3]=o,n[4]=s):s=n[4],s}export{l as t};
import{$a as e,Fo as t,Ho as n}from"./index.js";var r=t(),i=n(),a=new Set([`running`,`available`,`completed`,`Active`]),o=new Set([`stopped`,`error`]),s=new Set([`pending`,`shutting-down`,`stopping`]);function c(e){return e&&a.has(e)?`bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100`:e&&o.has(e)?`bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100`:e&&s.has(e)?`bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100`:e===`terminated`?`bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400`:`bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100`}function l(t){let n=(0,r.c)(5),{state:a}=t,o;n[0]===a?o=n[1]:(o=e(`rounded-full px-2 py-1 text-xs`,c(a)),n[0]=a,n[1]=o);let s;return n[2]!==a||n[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),n[2]=a,n[3]=o,n[4]=s):s=n[4],s}export{l as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{do as e,es as t,qo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`textarea`,{className:s,"data-slot":`textarea`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{a as t};
import{$a as e,Fo as t,Ho as n}from"./index.js";var r=t(),i=n();function a(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`textarea`,{className:s,"data-slot":`textarea`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{a as t};

Some files were not shown because too many files have changed in this diff Show More