diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_auth-TUbdreTD.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_auth-X7QMSNE1.js similarity index 99% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_auth-TUbdreTD.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_auth-X7QMSNE1.js index 170f47e1b..d134cacf5 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_auth-TUbdreTD.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_auth-X7QMSNE1.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./link-cv-r823H.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./createLucideIcon-DI_DJF-h.js";import{t as c}from"./chevron-down-DuqoHmYM.js";import{t as l}from"./chevron-right-FPuH5D53.js";import{a as u,i as d,n as f,o as p,r as ee,s as m,t as h}from"./waypoints-CeME1HWv.js";import{t as g}from"./network-DNraRZY6.js";import{A as te,M as _,_ as ne,d as v,l as re,n as y,p as ie,w as ae}from"./ec2-DJL24ekw.js";import{n as b}from"./s3-DOjTsnt2.js";import{o as oe,r as se}from"./admin-B1g5ktL3.js";import{t as ce}from"./use-admin--3prNhUW.js";import{t as x}from"./page-heading-M0NyqAmu.js";import{t as le}from"./badge-BYQj3YeB.js";import{a as ue,n as S,o as C,r as w,s as de,t as T}from"./card-TXae8B0G.js";import{a as E,c as D,i as O,l as k,n as fe,o as A,s as j,t as M}from"./alert-dialog-BYzNCmBp.js";import{t as N}from"./state-badge-BD9XGBez.js";var P={name:`box`,size:24,node:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]};P.node;var F=s(P),I={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};I.node;var L=s(I),R={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};R.node;var z=s(R),B={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};B.node;var pe=s(B),V={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};V.node;var me=s(V),H={name:`ship`,size:24,node:[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 9.189V13`,key:`yp40p3`}],[`path`,{d:`M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6`,key:`1wcigf`}],[`path`,{d:`M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76`,key:`1kdp0u`}],[`path`,{d:`M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1l8w7g`}]]};H.node;var U=s(H),W=r(),G=t(n(),1),K=e(),he=[{name:`Air-gap Support`,key:`airgap`},{name:`NVIDIA Bluefield DPU`,key:`bluefield`},{name:`NVIDIA MIG Support`,key:`mig`}];function ge(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function q(){let e=(0,W.c)(131),{isAdmin:t,version:n,license:r}=ce(),[a,o]=(0,G.useState)(!1),s;e[0]===t?s=e[1]:(s={...se,enabled:t},e[0]=t,e[1]=s);let{data:u}=i(s),d;e[2]===t?d=e[3]:(d={...oe,enabled:t},e[2]=t,e[3]=d);let{data:f}=i(d);if(!t||!n)return null;let p;e[4]===u?.nodes?p=e[5]:(p=u?.nodes??[],e[4]=u?.nodes,e[5]=p);let m=p,h;e[6]===f?.vms?h=e[7]:(h=f?.vms??[],e[6]=f?.vms,e[7]=h);let g=h,te=u?.cluster_mode??`single-node`,_=r===`open-source`,ne=m[0]?.region??null,v;e[8]===m?v=e[9]:(v=m.reduce(be,0),e[8]=m,e[9]=v);let re=v,y;e[10]===m?y=e[11]:(y=m.reduce(ye,0),e[10]=m,e[11]=y);let ie=y,ae,b,x,ue,S,E,D,O,k,fe,A,j,M,N,P,F,I;if(e[12]!==ie||e[13]!==te||e[14]!==_||e[15]!==m||e[16]!==ne||e[17]!==re||e[18]!==n.arch||e[19]!==n.commit||e[20]!==n.os||e[21]!==n.version||e[22]!==g.length){let t=m.reduce(ve,0),r=m.reduce(_e,0);M=`mb-6 space-y-4`,fe=`grid grid-cols-1 gap-4 md:grid-cols-3`;let i;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsxs)(de,{variant:`icon`,children:[(0,K.jsx)(me,{className:`size-3.5`}),`Spinifex Info`]})}),e[40]=i):i=e[40];let a;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Version`}),e[41]=a):a=e[41];let o;e[42]===n.version?o=e[43]:(o=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[a,(0,K.jsx)(`span`,{className:`font-mono`,children:n.version})]}),e[42]=n.version,e[43]=o);let s;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Commit`}),e[44]=s):s=e[44];let c;e[45]===n.commit?c=e[46]:(c=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[s,(0,K.jsx)(`span`,{className:`font-mono`,children:n.commit})]}),e[45]=n.commit,e[46]=c);let l;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Platform`}),e[47]=l):l=e[47];let u;e[48]!==n.arch||e[49]!==n.os?(u=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[l,(0,K.jsxs)(`span`,{children:[n.os,`/`,n.arch]})]}),e[48]=n.arch,e[49]=n.os,e[50]=u):u=e[50];let d;e[51]===ne?d=e[52]:(d=ne&&(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Region`}),(0,K.jsx)(`span`,{children:ne})]}),e[51]=ne,e[52]=d),e[53]!==o||e[54]!==c||e[55]!==u||e[56]!==d?(A=(0,K.jsxs)(T,{children:[i,(0,K.jsx)(w,{children:(0,K.jsxs)(`div`,{className:`space-y-1 text-xs`,children:[o,c,u,d]})})]}),e[53]=o,e[54]=c,e[55]=u,e[56]=d,e[57]=A):A=e[57];let f;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsx)(de,{children:`License & Support`})}),e[58]=f):f=e[58];let p;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`License`}),e[59]=p):p=e[59];let h=_?`secondary`:`default`,v=_?`Open Source (AGPLv3)`:`Commercial`,y;e[60]!==h||e[61]!==v?(y=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[p,(0,K.jsx)(le,{variant:h,children:v})]}),e[60]=h,e[61]=v,e[62]=y):y=e[62];let oe;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Support`}),e[63]=oe):oe=e[63];let se=_?`Community`:`Standard`,ce;e[64]===se?ce=e[65]:(ce=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[oe,(0,K.jsx)(`span`,{children:se})]}),e[64]=se,e[65]=ce);let L;e[66]===_?L=e[67]:(L=_&&(0,K.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-2 block text-xs font-medium text-primary hover:underline`,children:`Upgrade to Commercial →`}),e[66]=_,e[67]=L),e[68]!==y||e[69]!==ce||e[70]!==L?(j=(0,K.jsxs)(T,{children:[f,(0,K.jsx)(w,{children:(0,K.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[y,ce,L]})})]}),e[68]=y,e[69]=ce,e[70]=L,e[71]=j):j=e[71],b=T,e[72]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsxs)(de,{variant:`icon`,children:[(0,K.jsx)(ee,{className:`size-3.5`}),`Cluster Status`]})}),e[72]=k):k=e[72],ae=w,ue=`space-y-2 text-xs`,e[73]===te?S=e[74]:(S=(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,K.jsx)(le,{variant:`outline`,children:te})}),e[73]=te,e[74]=S);let R;e[75]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Nodes`}),e[75]=R):R=e[75],e[76]===m.length?E=e[77]:(E=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[R,(0,K.jsx)(`span`,{children:m.length})]}),e[76]=m.length,e[77]=E);let z;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Instances`}),e[78]=z):z=e[78],e[79]===g.length?D=e[80]:(D=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[z,(0,K.jsx)(`span`,{children:g.length})]}),e[79]=g.length,e[80]=D);let B;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`vCPU`}),e[81]=B):B=e[81],e[82]!==ie||e[83]!==re?(O=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[B,(0,K.jsxs)(`span`,{children:[ie,` / `,re]})]}),e[82]=ie,e[83]=re,e[84]=O):O=e[84],I=`flex justify-between`,e[85]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Memory`}),e[85]=x):x=e[85],N=r.toFixed(1),P=` / `,F=t.toFixed(1),e[12]=ie,e[13]=te,e[14]=_,e[15]=m,e[16]=ne,e[17]=re,e[18]=n.arch,e[19]=n.commit,e[20]=n.os,e[21]=n.version,e[22]=g.length,e[23]=ae,e[24]=b,e[25]=x,e[26]=ue,e[27]=S,e[28]=E,e[29]=D,e[30]=O,e[31]=k,e[32]=fe,e[33]=A,e[34]=j,e[35]=M,e[36]=N,e[37]=P,e[38]=F,e[39]=I}else ae=e[23],b=e[24],x=e[25],ue=e[26],S=e[27],E=e[28],D=e[29],O=e[30],k=e[31],fe=e[32],A=e[33],j=e[34],M=e[35],N=e[36],P=e[37],F=e[38],I=e[39];let L;e[86]!==N||e[87]!==P||e[88]!==F?(L=(0,K.jsxs)(`span`,{children:[N,P,F,` GB`]}),e[86]=N,e[87]=P,e[88]=F,e[89]=L):L=e[89];let R;e[90]!==x||e[91]!==L||e[92]!==I?(R=(0,K.jsxs)(`div`,{className:I,children:[x,L]}),e[90]=x,e[91]=L,e[92]=I,e[93]=R):R=e[93];let z;e[94]!==ue||e[95]!==S||e[96]!==E||e[97]!==D||e[98]!==O||e[99]!==R?(z=(0,K.jsxs)(`div`,{className:ue,children:[S,E,D,O,R]}),e[94]=ue,e[95]=S,e[96]=E,e[97]=D,e[98]=O,e[99]=R,e[100]=z):z=e[100];let B;e[101]!==ae||e[102]!==z?(B=(0,K.jsx)(ae,{children:z}),e[101]=ae,e[102]=z,e[103]=B):B=e[103];let V;e[104]!==b||e[105]!==k||e[106]!==B?(V=(0,K.jsxs)(b,{children:[k,B]}),e[104]=b,e[105]=k,e[106]=B,e[107]=V):V=e[107];let H;e[108]!==fe||e[109]!==A||e[110]!==j||e[111]!==V?(H=(0,K.jsxs)(`div`,{className:fe,children:[A,j,V]}),e[108]=fe,e[109]=A,e[110]=j,e[111]=V,e[112]=H):H=e[112];let U;e[113]!==m||e[114]!==a?(U=m.length>0&&(0,K.jsxs)(T,{children:[(0,K.jsx)(C,{children:(0,K.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 text-sm font-medium`,onClick:()=>{o(!a)},children:[a?(0,K.jsx)(c,{className:`size-3.5`}):(0,K.jsx)(l,{className:`size-3.5`}),`Nodes (`,m.length,`)`]})}),a&&(0,K.jsx)(w,{className:`mt-2`,children:(0,K.jsx)(xe,{nodes:m})})]}),e[113]=m,e[114]=a,e[115]=U):U=e[115];let ge;e[116]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsx)(de,{children:`Commercial Add-ons`})}),e[116]=ge):ge=e[116];let q;e[117]===_?q=e[118]:(q=he.map(e=>(0,K.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,K.jsx)(`span`,{className:_?`text-muted-foreground`:void 0,children:e.name}),_?(0,K.jsx)(pe,{className:`size-3 text-muted-foreground`}):(0,K.jsx)(le,{variant:`outline`,children:`Active`})]},e.key)),e[117]=_,e[118]=q);let Se;e[119]===q?Se=e[120]:(Se=(0,K.jsx)(`div`,{className:`space-y-2`,children:q}),e[119]=q,e[120]=Se);let Ce;e[121]===_?Ce=e[122]:(Ce=_&&(0,K.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 block text-xs font-medium text-primary hover:underline`,children:`Learn more about commercial features →`}),e[121]=_,e[122]=Ce);let J;e[123]!==Se||e[124]!==Ce?(J=(0,K.jsxs)(T,{children:[ge,(0,K.jsxs)(w,{children:[Se,Ce]})]}),e[123]=Se,e[124]=Ce,e[125]=J):J=e[125];let we;return e[126]!==M||e[127]!==H||e[128]!==U||e[129]!==J?(we=(0,K.jsxs)(`div`,{className:M,children:[H,U,J]}),e[126]=M,e[127]=H,e[128]=U,e[129]=J,e[130]=we):we=e[130],we}function _e(e,t){return e+t.alloc_mem_gb}function ve(e,t){return e+t.total_mem_gb}function ye(e,t){return e+t.alloc_vcpu}function be(e,t){return e+t.total_vcpu}function xe(e){let t=(0,W.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,K.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(Se),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,K.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function Se(e){return(0,K.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,K.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,K.jsx)(le,{variant:e.status===`Ready`?`default`:`secondary`,children:e.status})}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,K.jsxs)(`div`,{className:`flex gap-1`,children:[e.nats_role&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`nats:`,e.nats_role]}),e.predastore_role&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ps:`,e.predastore_role]})]})}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:ge(e.uptime)}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,K.jsx)(`td`,{className:`py-1.5`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.services.length})})]},e.node)}var Ce=`console.spx3.com`,J=`spinifex:v1:sandbox-welcome`,we=[{to:`/ec2/run-instances`,icon:(0,K.jsx)(p,{className:`size-3.5`}),label:`Launch an instance`,hint:`Boot a VM on real hardware`},{to:`/s3/ls`,icon:(0,K.jsx)(z,{className:`size-3.5`}),label:`Create a bucket`,hint:`S3-compatible object storage`},{to:`/ec2/describe-vpcs`,icon:(0,K.jsx)(g,{className:`size-3.5`}),label:`Networking`,hint:`VPCs, subnets and security groups`},{to:`/eks/list-clusters`,icon:(0,K.jsx)(U,{className:`size-3.5`}),label:`Kubernetes`,hint:`Managed EKS-compatible clusters`},{to:`/iam/list-users`,icon:(0,K.jsx)(u,{className:`size-3.5`}),label:`Access keys`,hint:`Credentials for the AWS CLI and SDKs`}];function Te(){try{return localStorage.getItem(J)!==null}catch{}return!1}function Ee(){try{localStorage.setItem(J,`1`)}catch{}}function De(){let e=(0,W.c)(7),[t,n]=(0,G.useState)(Oe),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{e||Ee(),n(e)},e[0]=r):r=e[0];let i=r,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsxs)(j,{children:[(0,K.jsx)(D,{children:(0,K.jsx)(L,{className:`text-primary`})}),(0,K.jsx)(k,{children:`Welcome to the Mulga sandbox`}),(0,K.jsx)(E,{children:`You have a real account on a shared evaluation cluster. The APIs are the AWS ones, so the CLI and the SDKs work against it unchanged. Resources here may be reclaimed, so please don't keep anything you need in it.`})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(`div`,{className:`space-y-0.5`,children:we.map(e=>(0,K.jsxs)(a,{className:`flex items-center gap-2 rounded-md px-2 py-1.5 text-xs hover:bg-muted`,onClick:()=>{i(!1)},to:e.to,children:[e.icon,(0,K.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.hint})]},e.to))}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(`a`,{className:`text-xs text-muted-foreground underline underline-offset-3 hover:text-foreground sm:mr-auto sm:self-center`,href:`https://docs.mulgadc.com`,rel:`noreferrer`,target:`_blank`,children:`Read the docs`}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsxs)(O,{className:`max-w-lg`,children:[o,s,(0,K.jsxs)(A,{children:[c,(0,K.jsx)(fe,{onClick:()=>{i(!1)},children:`Get started`})]})]}),e[4]=l):l=e[4];let u;return e[5]===t?u=e[6]:(u=(0,K.jsx)(M,{onOpenChange:i,open:t,children:l}),e[5]=t,e[6]=u),u}function Oe(){return window.location.hostname===Ce&&!Te()}var Y=5;function ke(){let e=(0,W.c)(12),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(x,{title:`Dashboard`}),n=(0,K.jsx)(De,{}),r=(0,K.jsx)(q,{}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Ae,{})}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Le,{})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(He,{})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(We,{})}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Ke,{})}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Je,{})}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Xe,{})}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(et,{})}),e[10]=d):d=e[10];let f;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsxs)(K.Fragment,{children:[t,n,r,(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[i,a,o,s,c,l,u,d,(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Qe,{})})]})]}),e[11]=f):f=e[11],f}function X(){let e=(0,W.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(C,{children:(0,K.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsxs)(T,{children:[t,(0,K.jsx)(w,{children:(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`div`,{className:`h-3 w-48 animate-pulse rounded bg-muted`}),(0,K.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`})]})})]}),e[1]=n):n=e[1],n}function Z(e){let t=(0,W.c)(16),{title:n,icon:r,count:i,to:o,children:s}=e,c;t[0]!==r||t[1]!==n?(c=(0,K.jsxs)(de,{variant:`icon`,children:[r,n]}),t[0]=r,t[1]=n,t[2]=c):c=t[2];let l;t[3]===i?l=t[4]:(l=(0,K.jsx)(S,{children:(0,K.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-xs font-semibold tabular-nums`,children:i})}),t[3]=i,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,K.jsxs)(C,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===s?d=t[9]:(d=(0,K.jsx)(w,{children:s}),t[8]=s,t[9]=d);let f;t[10]===o?f=t[11]:(f=(0,K.jsx)(ue,{children:(0,K.jsx)(a,{to:o,className:`text-xs font-medium text-primary hover:underline`,children:`View all →`})}),t[10]=o,t[11]=f);let p;return t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,K.jsxs)(T,{children:[u,d,f]}),t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Q(e){let t=(0,W.c)(2),{total:n}=e;if(n<=Y)return null;let r=n-Y,i;return t[0]===r?i=t[1]:(i=(0,K.jsxs)(`p`,{className:`mt-1 text-2xs text-muted-foreground`,children:[`+`,r,` more`]}),t[0]=r,t[1]=i),i}function $(e){let t=(0,W.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,K.jsx)(`div`,{className:`flex items-center justify-between py-0.5 text-xs`,children:n}),t[0]=n,t[1]=r),r}function Ae(){let e=(0,W.c)(16),{data:t}=i(re),n,r,a,o,s;if(e[0]!==t?.Reservations){let i=t?.Reservations?.flatMap(Ie)??[];n=i.filter(Fe),a=i.filter(Pe),o=i.filter(Ne),r=i.filter(Me),s=[...a,...r].slice(0,Y),e[0]=t?.Reservations,e[1]=n,e[2]=r,e[3]=a,e[4]=o,e[5]=s}else n=e[1],r=e[2],a=e[3],o=e[4],s=e[5];let c=s,l;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(p,{className:`size-3.5`}),e[6]=l):l=e[6];let u;e[7]!==n.length||e[8]!==c||e[9]!==r||e[10]!==a||e[11]!==o?(u=n.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-3 text-2xs text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[a.length,` running`]}),(0,K.jsxs)(`span`,{children:[o.length,` stopped`]})]}),(0,K.jsx)(`div`,{className:`space-y-0.5`,children:c.map(je)}),(0,K.jsx)(Q,{total:a.length+r.length})]}),e[7]=n.length,e[8]=c,e[9]=r,e[10]=a,e[11]=o,e[12]=u):u=e[12];let d;return e[13]!==n.length||e[14]!==u?(d=(0,K.jsx)(Z,{title:`Instances`,icon:l,count:n.length,to:`/ec2/describe-instances`,children:u}),e[13]=n.length,e[14]=u,e[15]=d):d=e[15],d}function je(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.InstanceId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.InstanceType})]},e.InstanceId)}function Me(e){return e.State?.Name===`pending`}function Ne(e){return e.State?.Name===`stopped`}function Pe(e){return e.State?.Name===`running`}function Fe(e){return e.State?.Name!==`terminated`}function Ie(e){return e.Instances??[]}function Le(){let e=(0,W.c)(14),{data:t}=i(te),n;e[0]===t?.Volumes?n=e[1]:(n=t?.Volumes??[],e[0]=t?.Volumes,e[1]=n);let r=n,a;e[2]===r?a=e[3]:(a=r.reduce(Ve,0),e[2]=r,e[3]=a);let o=a,s;e[4]===r?s=e[5]:(s=r.filter(Be),e[4]=r,e[5]=s);let c=s,l;e[6]===r?l=e[7]:(l=r.filter(ze),e[6]=r,e[7]=l);let u=l,d;if(e[8]!==u||e[9]!==c||e[10]!==o||e[11]!==r){let t=r.slice(0,Y),n;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(F,{className:`size-3.5`}),e[13]=n):n=e[13],d=(0,K.jsx)(Z,{title:`Volumes`,icon:n,count:r.length,to:`/ec2/describe-volumes`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No volumes`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-3 text-2xs text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[o,` GiB total`]}),(0,K.jsxs)(`span`,{children:[c.length,` in-use`]}),(0,K.jsxs)(`span`,{children:[u.length,` available`]})]}),(0,K.jsx)(`div`,{className:`space-y-0.5`,children:t.map(Re)}),(0,K.jsx)(Q,{total:r.length})]})}),e[8]=u,e[9]=c,e[10]=o,e[11]=r,e[12]=d}else d=e[12];return d}function Re(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.VolumeId}),(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.Size,` GiB`]}),(0,K.jsx)(N,{state:e.State})]})]},e.VolumeId)}function ze(e){return e.State===`available`}function Be(e){return e.State===`in-use`}function Ve(e,t){return e+(t.Size??0)}function He(){let e=(0,W.c)(5),{data:t}=i(_),n;e[0]===t?.Vpcs?n=e[1]:(n=t?.Vpcs??[],e[0]=t?.Vpcs,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(g,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`VPCs`,icon:n,count:r.length,to:`/ec2/describe-vpcs`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No VPCs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ue),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ue(e){let t=o(e.Tags);return(0,K.jsxs)($,{children:[(0,K.jsxs)(`span`,{className:`font-mono`,children:[e.VpcId,t&&(0,K.jsxs)(`span`,{className:`ml-1 font-sans text-muted-foreground`,children:[`(`,t,`)`]})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.CidrBlock})]},e.VpcId)}function We(){let e=(0,W.c)(5),{data:t}=i(ie),n;e[0]===t?.KeyPairs?n=e[1]:(n=t?.KeyPairs??[],e[0]=t?.KeyPairs,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(u,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Key Pairs`,icon:n,count:r.length,to:`/ec2/describe-key-pairs`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No key pairs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ge),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ge(e){return(0,K.jsx)($,{children:(0,K.jsx)(`span`,{className:`font-mono`,children:e.KeyName})},e.KeyPairId)}function Ke(){let e=(0,W.c)(5),{data:t}=i(b),n;e[0]===t?.Buckets?n=e[1]:(n=t?.Buckets??[],e[0]=t?.Buckets,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(z,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`S3 Buckets`,icon:n,count:r.length,to:`/s3/ls`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No buckets`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(qe),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function qe(e){return(0,K.jsx)($,{children:(0,K.jsx)(`span`,{className:`font-mono`,children:e.Name})},e.Name)}function Je(){let e=(0,W.c)(5),{data:t}=i(ae),n;e[0]===t?.SecurityGroups?n=e[1]:(n=t?.SecurityGroups??[],e[0]=t?.SecurityGroups,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(f,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Security Groups`,icon:n,count:r.length,to:`/ec2/describe-security-groups`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ye),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ye(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.GroupName}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.VpcId})]},e.GroupId)}function Xe(){let e=(0,W.c)(5),{data:t}=i(ne),n;e[0]===t?.NatGateways?n=e[1]:(n=t?.NatGateways??[],e[0]=t?.NatGateways,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(h,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`NAT Gateways`,icon:n,count:r.length,to:`/ec2/describe-nat-gateways`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No NAT gateways`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ze),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ze(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.NatGatewayId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.State})]},e.NatGatewayId)}function Qe(){let e=(0,W.c)(5),{data:t}=i(v),n;e[0]===t?.InternetGateways?n=e[1]:(n=t?.InternetGateways??[],e[0]=t?.InternetGateways,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(d,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Internet Gateways`,icon:n,count:r.length,to:`/ec2/describe-internet-gateways`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No internet gateways`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map($e),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function $e(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.InternetGatewayId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.Attachments?.[0]?.VpcId?`attached`:`detached`})]},e.InternetGatewayId)}function et(){let e=(0,W.c)(5),{data:t}=i(y),n;e[0]===t?.Addresses?n=e[1]:(n=t?.Addresses??[],e[0]=t?.Addresses,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(m,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Elastic IPs`,icon:n,count:r.length,to:`/ec2/describe-addresses`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No Elastic IPs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(tt),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function tt(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.PublicIp}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.AssociationId?`associated`:`available`})]},e.AllocationId)}export{ke as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./link-cv-r823H.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./createLucideIcon-DI_DJF-h.js";import{t as c}from"./chevron-down-DuqoHmYM.js";import{t as l}from"./chevron-right-FPuH5D53.js";import{a as u,i as d,n as f,o as p,r as ee,s as m,t as h}from"./waypoints-CeME1HWv.js";import{t as g}from"./network-DNraRZY6.js";import{A as te,M as _,_ as ne,d as v,l as re,n as y,p as ie,w as ae}from"./ec2-DJL24ekw.js";import{n as b}from"./s3-DOjTsnt2.js";import{o as oe,r as se}from"./admin-B1g5ktL3.js";import{t as ce}from"./use-admin--3prNhUW.js";import{t as x}from"./page-heading-M0NyqAmu.js";import{t as le}from"./badge-BYQj3YeB.js";import{a as ue,n as S,o as C,r as w,s as de,t as T}from"./card-TXae8B0G.js";import{a as E,c as D,i as O,l as k,n as fe,o as A,s as j,t as M}from"./alert-dialog-BYzNCmBp.js";import{t as N}from"./state-badge-BiFj5bbX.js";var P={name:`box`,size:24,node:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]};P.node;var F=s(P),I={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};I.node;var L=s(I),R={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};R.node;var z=s(R),B={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};B.node;var pe=s(B),V={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};V.node;var me=s(V),H={name:`ship`,size:24,node:[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 9.189V13`,key:`yp40p3`}],[`path`,{d:`M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6`,key:`1wcigf`}],[`path`,{d:`M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76`,key:`1kdp0u`}],[`path`,{d:`M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1l8w7g`}]]};H.node;var U=s(H),W=r(),G=t(n(),1),K=e(),he=[{name:`Air-gap Support`,key:`airgap`},{name:`NVIDIA Bluefield DPU`,key:`bluefield`},{name:`NVIDIA MIG Support`,key:`mig`}];function ge(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function q(){let e=(0,W.c)(131),{isAdmin:t,version:n,license:r}=ce(),[a,o]=(0,G.useState)(!1),s;e[0]===t?s=e[1]:(s={...se,enabled:t},e[0]=t,e[1]=s);let{data:u}=i(s),d;e[2]===t?d=e[3]:(d={...oe,enabled:t},e[2]=t,e[3]=d);let{data:f}=i(d);if(!t||!n)return null;let p;e[4]===u?.nodes?p=e[5]:(p=u?.nodes??[],e[4]=u?.nodes,e[5]=p);let m=p,h;e[6]===f?.vms?h=e[7]:(h=f?.vms??[],e[6]=f?.vms,e[7]=h);let g=h,te=u?.cluster_mode??`single-node`,_=r===`open-source`,ne=m[0]?.region??null,v;e[8]===m?v=e[9]:(v=m.reduce(be,0),e[8]=m,e[9]=v);let re=v,y;e[10]===m?y=e[11]:(y=m.reduce(ye,0),e[10]=m,e[11]=y);let ie=y,ae,b,x,ue,S,E,D,O,k,fe,A,j,M,N,P,F,I;if(e[12]!==ie||e[13]!==te||e[14]!==_||e[15]!==m||e[16]!==ne||e[17]!==re||e[18]!==n.arch||e[19]!==n.commit||e[20]!==n.os||e[21]!==n.version||e[22]!==g.length){let t=m.reduce(ve,0),r=m.reduce(_e,0);M=`mb-6 space-y-4`,fe=`grid grid-cols-1 gap-4 md:grid-cols-3`;let i;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsxs)(de,{variant:`icon`,children:[(0,K.jsx)(me,{className:`size-3.5`}),`Spinifex Info`]})}),e[40]=i):i=e[40];let a;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Version`}),e[41]=a):a=e[41];let o;e[42]===n.version?o=e[43]:(o=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[a,(0,K.jsx)(`span`,{className:`font-mono`,children:n.version})]}),e[42]=n.version,e[43]=o);let s;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Commit`}),e[44]=s):s=e[44];let c;e[45]===n.commit?c=e[46]:(c=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[s,(0,K.jsx)(`span`,{className:`font-mono`,children:n.commit})]}),e[45]=n.commit,e[46]=c);let l;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Platform`}),e[47]=l):l=e[47];let u;e[48]!==n.arch||e[49]!==n.os?(u=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[l,(0,K.jsxs)(`span`,{children:[n.os,`/`,n.arch]})]}),e[48]=n.arch,e[49]=n.os,e[50]=u):u=e[50];let d;e[51]===ne?d=e[52]:(d=ne&&(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Region`}),(0,K.jsx)(`span`,{children:ne})]}),e[51]=ne,e[52]=d),e[53]!==o||e[54]!==c||e[55]!==u||e[56]!==d?(A=(0,K.jsxs)(T,{children:[i,(0,K.jsx)(w,{children:(0,K.jsxs)(`div`,{className:`space-y-1 text-xs`,children:[o,c,u,d]})})]}),e[53]=o,e[54]=c,e[55]=u,e[56]=d,e[57]=A):A=e[57];let f;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsx)(de,{children:`License & Support`})}),e[58]=f):f=e[58];let p;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`License`}),e[59]=p):p=e[59];let h=_?`secondary`:`default`,v=_?`Open Source (AGPLv3)`:`Commercial`,y;e[60]!==h||e[61]!==v?(y=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[p,(0,K.jsx)(le,{variant:h,children:v})]}),e[60]=h,e[61]=v,e[62]=y):y=e[62];let oe;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Support`}),e[63]=oe):oe=e[63];let se=_?`Community`:`Standard`,ce;e[64]===se?ce=e[65]:(ce=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[oe,(0,K.jsx)(`span`,{children:se})]}),e[64]=se,e[65]=ce);let L;e[66]===_?L=e[67]:(L=_&&(0,K.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-2 block text-xs font-medium text-primary hover:underline`,children:`Upgrade to Commercial →`}),e[66]=_,e[67]=L),e[68]!==y||e[69]!==ce||e[70]!==L?(j=(0,K.jsxs)(T,{children:[f,(0,K.jsx)(w,{children:(0,K.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[y,ce,L]})})]}),e[68]=y,e[69]=ce,e[70]=L,e[71]=j):j=e[71],b=T,e[72]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsxs)(de,{variant:`icon`,children:[(0,K.jsx)(ee,{className:`size-3.5`}),`Cluster Status`]})}),e[72]=k):k=e[72],ae=w,ue=`space-y-2 text-xs`,e[73]===te?S=e[74]:(S=(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,K.jsx)(le,{variant:`outline`,children:te})}),e[73]=te,e[74]=S);let R;e[75]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Nodes`}),e[75]=R):R=e[75],e[76]===m.length?E=e[77]:(E=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[R,(0,K.jsx)(`span`,{children:m.length})]}),e[76]=m.length,e[77]=E);let z;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Instances`}),e[78]=z):z=e[78],e[79]===g.length?D=e[80]:(D=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[z,(0,K.jsx)(`span`,{children:g.length})]}),e[79]=g.length,e[80]=D);let B;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`vCPU`}),e[81]=B):B=e[81],e[82]!==ie||e[83]!==re?(O=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[B,(0,K.jsxs)(`span`,{children:[ie,` / `,re]})]}),e[82]=ie,e[83]=re,e[84]=O):O=e[84],I=`flex justify-between`,e[85]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Memory`}),e[85]=x):x=e[85],N=r.toFixed(1),P=` / `,F=t.toFixed(1),e[12]=ie,e[13]=te,e[14]=_,e[15]=m,e[16]=ne,e[17]=re,e[18]=n.arch,e[19]=n.commit,e[20]=n.os,e[21]=n.version,e[22]=g.length,e[23]=ae,e[24]=b,e[25]=x,e[26]=ue,e[27]=S,e[28]=E,e[29]=D,e[30]=O,e[31]=k,e[32]=fe,e[33]=A,e[34]=j,e[35]=M,e[36]=N,e[37]=P,e[38]=F,e[39]=I}else ae=e[23],b=e[24],x=e[25],ue=e[26],S=e[27],E=e[28],D=e[29],O=e[30],k=e[31],fe=e[32],A=e[33],j=e[34],M=e[35],N=e[36],P=e[37],F=e[38],I=e[39];let L;e[86]!==N||e[87]!==P||e[88]!==F?(L=(0,K.jsxs)(`span`,{children:[N,P,F,` GB`]}),e[86]=N,e[87]=P,e[88]=F,e[89]=L):L=e[89];let R;e[90]!==x||e[91]!==L||e[92]!==I?(R=(0,K.jsxs)(`div`,{className:I,children:[x,L]}),e[90]=x,e[91]=L,e[92]=I,e[93]=R):R=e[93];let z;e[94]!==ue||e[95]!==S||e[96]!==E||e[97]!==D||e[98]!==O||e[99]!==R?(z=(0,K.jsxs)(`div`,{className:ue,children:[S,E,D,O,R]}),e[94]=ue,e[95]=S,e[96]=E,e[97]=D,e[98]=O,e[99]=R,e[100]=z):z=e[100];let B;e[101]!==ae||e[102]!==z?(B=(0,K.jsx)(ae,{children:z}),e[101]=ae,e[102]=z,e[103]=B):B=e[103];let V;e[104]!==b||e[105]!==k||e[106]!==B?(V=(0,K.jsxs)(b,{children:[k,B]}),e[104]=b,e[105]=k,e[106]=B,e[107]=V):V=e[107];let H;e[108]!==fe||e[109]!==A||e[110]!==j||e[111]!==V?(H=(0,K.jsxs)(`div`,{className:fe,children:[A,j,V]}),e[108]=fe,e[109]=A,e[110]=j,e[111]=V,e[112]=H):H=e[112];let U;e[113]!==m||e[114]!==a?(U=m.length>0&&(0,K.jsxs)(T,{children:[(0,K.jsx)(C,{children:(0,K.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 text-sm font-medium`,onClick:()=>{o(!a)},children:[a?(0,K.jsx)(c,{className:`size-3.5`}):(0,K.jsx)(l,{className:`size-3.5`}),`Nodes (`,m.length,`)`]})}),a&&(0,K.jsx)(w,{className:`mt-2`,children:(0,K.jsx)(xe,{nodes:m})})]}),e[113]=m,e[114]=a,e[115]=U):U=e[115];let ge;e[116]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,K.jsx)(C,{className:`mb-2`,children:(0,K.jsx)(de,{children:`Commercial Add-ons`})}),e[116]=ge):ge=e[116];let q;e[117]===_?q=e[118]:(q=he.map(e=>(0,K.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,K.jsx)(`span`,{className:_?`text-muted-foreground`:void 0,children:e.name}),_?(0,K.jsx)(pe,{className:`size-3 text-muted-foreground`}):(0,K.jsx)(le,{variant:`outline`,children:`Active`})]},e.key)),e[117]=_,e[118]=q);let Se;e[119]===q?Se=e[120]:(Se=(0,K.jsx)(`div`,{className:`space-y-2`,children:q}),e[119]=q,e[120]=Se);let Ce;e[121]===_?Ce=e[122]:(Ce=_&&(0,K.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 block text-xs font-medium text-primary hover:underline`,children:`Learn more about commercial features →`}),e[121]=_,e[122]=Ce);let J;e[123]!==Se||e[124]!==Ce?(J=(0,K.jsxs)(T,{children:[ge,(0,K.jsxs)(w,{children:[Se,Ce]})]}),e[123]=Se,e[124]=Ce,e[125]=J):J=e[125];let we;return e[126]!==M||e[127]!==H||e[128]!==U||e[129]!==J?(we=(0,K.jsxs)(`div`,{className:M,children:[H,U,J]}),e[126]=M,e[127]=H,e[128]=U,e[129]=J,e[130]=we):we=e[130],we}function _e(e,t){return e+t.alloc_mem_gb}function ve(e,t){return e+t.total_mem_gb}function ye(e,t){return e+t.alloc_vcpu}function be(e,t){return e+t.total_vcpu}function xe(e){let t=(0,W.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,K.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(Se),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,K.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function Se(e){return(0,K.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,K.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,K.jsx)(le,{variant:e.status===`Ready`?`default`:`secondary`,children:e.status})}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,K.jsxs)(`div`,{className:`flex gap-1`,children:[e.nats_role&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`nats:`,e.nats_role]}),e.predastore_role&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ps:`,e.predastore_role]})]})}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:ge(e.uptime)}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,K.jsx)(`td`,{className:`py-1.5`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.services.length})})]},e.node)}var Ce=`console.spx3.com`,J=`spinifex:v1:sandbox-welcome`,we=[{to:`/ec2/run-instances`,icon:(0,K.jsx)(p,{className:`size-3.5`}),label:`Launch an instance`,hint:`Boot a VM on real hardware`},{to:`/s3/ls`,icon:(0,K.jsx)(z,{className:`size-3.5`}),label:`Create a bucket`,hint:`S3-compatible object storage`},{to:`/ec2/describe-vpcs`,icon:(0,K.jsx)(g,{className:`size-3.5`}),label:`Networking`,hint:`VPCs, subnets and security groups`},{to:`/eks/list-clusters`,icon:(0,K.jsx)(U,{className:`size-3.5`}),label:`Kubernetes`,hint:`Managed EKS-compatible clusters`},{to:`/iam/list-users`,icon:(0,K.jsx)(u,{className:`size-3.5`}),label:`Access keys`,hint:`Credentials for the AWS CLI and SDKs`}];function Te(){try{return localStorage.getItem(J)!==null}catch{}return!1}function Ee(){try{localStorage.setItem(J,`1`)}catch{}}function De(){let e=(0,W.c)(7),[t,n]=(0,G.useState)(Oe),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{e||Ee(),n(e)},e[0]=r):r=e[0];let i=r,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsxs)(j,{children:[(0,K.jsx)(D,{children:(0,K.jsx)(L,{className:`text-primary`})}),(0,K.jsx)(k,{children:`Welcome to the Mulga sandbox`}),(0,K.jsx)(E,{children:`You have a real account on a shared evaluation cluster. The APIs are the AWS ones, so the CLI and the SDKs work against it unchanged. Resources here may be reclaimed, so please don't keep anything you need in it.`})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(`div`,{className:`space-y-0.5`,children:we.map(e=>(0,K.jsxs)(a,{className:`flex items-center gap-2 rounded-md px-2 py-1.5 text-xs hover:bg-muted`,onClick:()=>{i(!1)},to:e.to,children:[e.icon,(0,K.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.hint})]},e.to))}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(`a`,{className:`text-xs text-muted-foreground underline underline-offset-3 hover:text-foreground sm:mr-auto sm:self-center`,href:`https://docs.mulgadc.com`,rel:`noreferrer`,target:`_blank`,children:`Read the docs`}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsxs)(O,{className:`max-w-lg`,children:[o,s,(0,K.jsxs)(A,{children:[c,(0,K.jsx)(fe,{onClick:()=>{i(!1)},children:`Get started`})]})]}),e[4]=l):l=e[4];let u;return e[5]===t?u=e[6]:(u=(0,K.jsx)(M,{onOpenChange:i,open:t,children:l}),e[5]=t,e[6]=u),u}function Oe(){return window.location.hostname===Ce&&!Te()}var Y=5;function ke(){let e=(0,W.c)(12),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(x,{title:`Dashboard`}),n=(0,K.jsx)(De,{}),r=(0,K.jsx)(q,{}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Ae,{})}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Le,{})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(He,{})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(We,{})}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Ke,{})}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Je,{})}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Xe,{})}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(et,{})}),e[10]=d):d=e[10];let f;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsxs)(K.Fragment,{children:[t,n,r,(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[i,a,o,s,c,l,u,d,(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Qe,{})})]})]}),e[11]=f):f=e[11],f}function X(){let e=(0,W.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(C,{children:(0,K.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsxs)(T,{children:[t,(0,K.jsx)(w,{children:(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`div`,{className:`h-3 w-48 animate-pulse rounded bg-muted`}),(0,K.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`})]})})]}),e[1]=n):n=e[1],n}function Z(e){let t=(0,W.c)(16),{title:n,icon:r,count:i,to:o,children:s}=e,c;t[0]!==r||t[1]!==n?(c=(0,K.jsxs)(de,{variant:`icon`,children:[r,n]}),t[0]=r,t[1]=n,t[2]=c):c=t[2];let l;t[3]===i?l=t[4]:(l=(0,K.jsx)(S,{children:(0,K.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-xs font-semibold tabular-nums`,children:i})}),t[3]=i,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,K.jsxs)(C,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===s?d=t[9]:(d=(0,K.jsx)(w,{children:s}),t[8]=s,t[9]=d);let f;t[10]===o?f=t[11]:(f=(0,K.jsx)(ue,{children:(0,K.jsx)(a,{to:o,className:`text-xs font-medium text-primary hover:underline`,children:`View all →`})}),t[10]=o,t[11]=f);let p;return t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,K.jsxs)(T,{children:[u,d,f]}),t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Q(e){let t=(0,W.c)(2),{total:n}=e;if(n<=Y)return null;let r=n-Y,i;return t[0]===r?i=t[1]:(i=(0,K.jsxs)(`p`,{className:`mt-1 text-2xs text-muted-foreground`,children:[`+`,r,` more`]}),t[0]=r,t[1]=i),i}function $(e){let t=(0,W.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,K.jsx)(`div`,{className:`flex items-center justify-between py-0.5 text-xs`,children:n}),t[0]=n,t[1]=r),r}function Ae(){let e=(0,W.c)(16),{data:t}=i(re),n,r,a,o,s;if(e[0]!==t?.Reservations){let i=t?.Reservations?.flatMap(Ie)??[];n=i.filter(Fe),a=i.filter(Pe),o=i.filter(Ne),r=i.filter(Me),s=[...a,...r].slice(0,Y),e[0]=t?.Reservations,e[1]=n,e[2]=r,e[3]=a,e[4]=o,e[5]=s}else n=e[1],r=e[2],a=e[3],o=e[4],s=e[5];let c=s,l;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(p,{className:`size-3.5`}),e[6]=l):l=e[6];let u;e[7]!==n.length||e[8]!==c||e[9]!==r||e[10]!==a||e[11]!==o?(u=n.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-3 text-2xs text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[a.length,` running`]}),(0,K.jsxs)(`span`,{children:[o.length,` stopped`]})]}),(0,K.jsx)(`div`,{className:`space-y-0.5`,children:c.map(je)}),(0,K.jsx)(Q,{total:a.length+r.length})]}),e[7]=n.length,e[8]=c,e[9]=r,e[10]=a,e[11]=o,e[12]=u):u=e[12];let d;return e[13]!==n.length||e[14]!==u?(d=(0,K.jsx)(Z,{title:`Instances`,icon:l,count:n.length,to:`/ec2/describe-instances`,children:u}),e[13]=n.length,e[14]=u,e[15]=d):d=e[15],d}function je(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.InstanceId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.InstanceType})]},e.InstanceId)}function Me(e){return e.State?.Name===`pending`}function Ne(e){return e.State?.Name===`stopped`}function Pe(e){return e.State?.Name===`running`}function Fe(e){return e.State?.Name!==`terminated`}function Ie(e){return e.Instances??[]}function Le(){let e=(0,W.c)(14),{data:t}=i(te),n;e[0]===t?.Volumes?n=e[1]:(n=t?.Volumes??[],e[0]=t?.Volumes,e[1]=n);let r=n,a;e[2]===r?a=e[3]:(a=r.reduce(Ve,0),e[2]=r,e[3]=a);let o=a,s;e[4]===r?s=e[5]:(s=r.filter(Be),e[4]=r,e[5]=s);let c=s,l;e[6]===r?l=e[7]:(l=r.filter(ze),e[6]=r,e[7]=l);let u=l,d;if(e[8]!==u||e[9]!==c||e[10]!==o||e[11]!==r){let t=r.slice(0,Y),n;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(F,{className:`size-3.5`}),e[13]=n):n=e[13],d=(0,K.jsx)(Z,{title:`Volumes`,icon:n,count:r.length,to:`/ec2/describe-volumes`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No volumes`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-3 text-2xs text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[o,` GiB total`]}),(0,K.jsxs)(`span`,{children:[c.length,` in-use`]}),(0,K.jsxs)(`span`,{children:[u.length,` available`]})]}),(0,K.jsx)(`div`,{className:`space-y-0.5`,children:t.map(Re)}),(0,K.jsx)(Q,{total:r.length})]})}),e[8]=u,e[9]=c,e[10]=o,e[11]=r,e[12]=d}else d=e[12];return d}function Re(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.VolumeId}),(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.Size,` GiB`]}),(0,K.jsx)(N,{state:e.State})]})]},e.VolumeId)}function ze(e){return e.State===`available`}function Be(e){return e.State===`in-use`}function Ve(e,t){return e+(t.Size??0)}function He(){let e=(0,W.c)(5),{data:t}=i(_),n;e[0]===t?.Vpcs?n=e[1]:(n=t?.Vpcs??[],e[0]=t?.Vpcs,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(g,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`VPCs`,icon:n,count:r.length,to:`/ec2/describe-vpcs`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No VPCs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ue),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ue(e){let t=o(e.Tags);return(0,K.jsxs)($,{children:[(0,K.jsxs)(`span`,{className:`font-mono`,children:[e.VpcId,t&&(0,K.jsxs)(`span`,{className:`ml-1 font-sans text-muted-foreground`,children:[`(`,t,`)`]})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.CidrBlock})]},e.VpcId)}function We(){let e=(0,W.c)(5),{data:t}=i(ie),n;e[0]===t?.KeyPairs?n=e[1]:(n=t?.KeyPairs??[],e[0]=t?.KeyPairs,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(u,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Key Pairs`,icon:n,count:r.length,to:`/ec2/describe-key-pairs`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No key pairs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ge),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ge(e){return(0,K.jsx)($,{children:(0,K.jsx)(`span`,{className:`font-mono`,children:e.KeyName})},e.KeyPairId)}function Ke(){let e=(0,W.c)(5),{data:t}=i(b),n;e[0]===t?.Buckets?n=e[1]:(n=t?.Buckets??[],e[0]=t?.Buckets,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(z,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`S3 Buckets`,icon:n,count:r.length,to:`/s3/ls`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No buckets`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(qe),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function qe(e){return(0,K.jsx)($,{children:(0,K.jsx)(`span`,{className:`font-mono`,children:e.Name})},e.Name)}function Je(){let e=(0,W.c)(5),{data:t}=i(ae),n;e[0]===t?.SecurityGroups?n=e[1]:(n=t?.SecurityGroups??[],e[0]=t?.SecurityGroups,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(f,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Security Groups`,icon:n,count:r.length,to:`/ec2/describe-security-groups`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ye),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ye(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.GroupName}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.VpcId})]},e.GroupId)}function Xe(){let e=(0,W.c)(5),{data:t}=i(ne),n;e[0]===t?.NatGateways?n=e[1]:(n=t?.NatGateways??[],e[0]=t?.NatGateways,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(h,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`NAT Gateways`,icon:n,count:r.length,to:`/ec2/describe-nat-gateways`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No NAT gateways`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ze),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ze(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.NatGatewayId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.State})]},e.NatGatewayId)}function Qe(){let e=(0,W.c)(5),{data:t}=i(v),n;e[0]===t?.InternetGateways?n=e[1]:(n=t?.InternetGateways??[],e[0]=t?.InternetGateways,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(d,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Internet Gateways`,icon:n,count:r.length,to:`/ec2/describe-internet-gateways`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No internet gateways`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map($e),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function $e(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.InternetGatewayId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.Attachments?.[0]?.VpcId?`attached`:`detached`})]},e.InternetGatewayId)}function et(){let e=(0,W.c)(5),{data:t}=i(y),n;e[0]===t?.Addresses?n=e[1]:(n=t?.Addresses??[],e[0]=t?.Addresses,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(m,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,K.jsx)(Z,{title:`Elastic IPs`,icon:n,count:r.length,to:`/ec2/describe-addresses`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No Elastic IPs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(tt),(0,K.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function tt(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.PublicIp}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.AssociationId?`associated`:`available`})]},e.AllocationId)}export{ke as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-Cs5kdhT1.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-Cs5kdhT1.js new file mode 100644 index 000000000..7f31fe9ef --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-Cs5kdhT1.js @@ -0,0 +1 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{M as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./trash-DHuPKozD.js";import{t as d}from"./button-Bae9vdts.js";import{t as f}from"./input-CpcyJw4R.js";import{O as p,c as m,p as h,w as g}from"./ec2-DJL24ekw.js";import{i as _,r as v,s as y,t as b}from"./ecs-DRWPOVsw.js";import{i as x,l as S,o as C,r as w,u as T}from"./ecs-BsOdvIYx.js";import{t as E}from"./_clusterName-IpjQl0UQ.js";import{t as D}from"./page-heading-M0NyqAmu.js";import{t as ee}from"./error-banner-BcDqaPk7.js";import{s as O,t as k}from"./field-ChkDR_wL.js";import{a as te,i as A,l as j,n as M,o as ne,r as N,s as re,t as P}from"./alert-dialog-BYzNCmBp.js";import{t as ie}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as F,t as I}from"./detail-row-CclMDqj8.js";import{t as L}from"./state-badge-BiFj5bbX.js";import{t as R}from"./gpu-instance-type-select-Dr56r-me.js";import{i as ae,n as z,r as oe,t as se}from"./tabs-CAMCnrj7.js";var ce=r(),B=t(n(),1),V=e(),H=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function U(e){let t=(0,ce.c)(79),{clusterName:n,open:r,onOpenChange:a}=e,o=C(),{data:s}=i(p),{data:c}=i(g),{data:l}=i(h),{data:u}=i(m),d;t[0]===s?.Subnets?d=t[1]:(d=s?.Subnets??[],t[0]=s?.Subnets,t[1]=d);let _=d,v;t[2]===c?.SecurityGroups?v=t[3]:(v=c?.SecurityGroups??[],t[2]=c?.SecurityGroups,t[3]=v);let y=v,b;t[4]===l?.KeyPairs?b=t[5]:(b=l?.KeyPairs??[],t[4]=l?.KeyPairs,t[5]=b);let x=b,S;t[6]===u?.InstanceTypes?S=t[7]:(S=u?.InstanceTypes??[],t[6]=u?.InstanceTypes,t[7]=S);let w=S,[T,E]=(0,B.useState)(`t3.small`),[D,ie]=(0,B.useState)(1),[F,I]=(0,B.useState)(``),[L,ae]=(0,B.useState)(``),[z,oe]=(0,B.useState)(``),se;t[8]!==a||t[9]!==o?(se=function(e){e||(E(`t3.small`),ie(1),I(``),ae(``),oe(``),o.reset()),a(e)},t[8]=a,t[9]=o,t[10]=se):se=t[10];let U=se,q;t[11]!==n||t[12]!==D||t[13]!==U||t[14]!==T||t[15]!==z||t[16]!==o||t[17]!==L||t[18]!==F?(q=async function(){try{await o.mutateAsync({Cluster:n,InstanceType:T||void 0,Count:D,SubnetID:F,SecurityGroupID:L,KeyName:z||void 0}),U(!1)}catch{}},t[11]=n,t[12]=D,t[13]=U,t[14]=T,t[15]=z,t[16]=o,t[17]=L,t[18]=F,t[19]=q):q=t[19];let J=q,le=o.isPending||F===``||L===``,Y;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,V.jsx)(j,{children:`Provision EC2 capacity`}),t[20]=Y):Y=t[20];let X;t[21]===n?X=t[22]:(X=(0,V.jsxs)(re,{children:[Y,(0,V.jsxs)(te,{children:[`Launch container instances into cluster “`,n,`”. They register automatically once booted.`]})]}),t[21]=n,t[22]=X);let Z;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,V.jsx)(O,{children:(0,V.jsx)(`label`,{htmlFor:`provision-instance-type`,children:`Instance type`})}),t[23]=Z):Z=t[23];let Q;t[24]!==T||t[25]!==w?(Q=(0,V.jsxs)(k,{children:[Z,(0,V.jsx)(R,{id:`provision-instance-type`,instanceTypes:w,onValueChange:E,value:T})]}),t[24]=T,t[25]=w,t[26]=Q):Q=t[26];let ue;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,V.jsx)(O,{children:(0,V.jsx)(`label`,{htmlFor:`provision-count`,children:`Count`})}),t[27]=ue):ue=t[27];let de;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>{ie(Number(e.target.value))},t[28]=de):de=t[28];let $;t[29]===D?$=t[30]:($=(0,V.jsxs)(k,{children:[ue,(0,V.jsx)(f,{id:`provision-count`,max:10,min:1,onChange:de,type:`number`,value:D})]}),t[29]=D,t[30]=$);let fe;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,V.jsx)(O,{children:(0,V.jsx)(`label`,{htmlFor:`provision-subnet`,children:`Subnet`})}),t[31]=fe):fe=t[31];let pe;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{I(e.target.value)},t[32]=pe):pe=t[32];let me;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,V.jsx)(`option`,{value:``,children:`Select a subnet`}),t[33]=me):me=t[33];let he;t[34]===_?he=t[35]:(he=_.map(K),t[34]=_,t[35]=he);let ge;t[36]!==F||t[37]!==he?(ge=(0,V.jsxs)(k,{children:[fe,(0,V.jsxs)(`select`,{className:H,id:`provision-subnet`,onChange:pe,value:F,children:[me,he]})]}),t[36]=F,t[37]=he,t[38]=ge):ge=t[38];let _e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,V.jsx)(O,{children:(0,V.jsx)(`label`,{htmlFor:`provision-sg`,children:`Security group`})}),t[39]=_e):_e=t[39];let ve;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(ve=e=>{ae(e.target.value)},t[40]=ve):ve=t[40];let ye;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,V.jsx)(`option`,{value:``,children:`Select a security group`}),t[41]=ye):ye=t[41];let be;t[42]===y?be=t[43]:(be=y.map(G),t[42]=y,t[43]=be);let xe;t[44]!==L||t[45]!==be?(xe=(0,V.jsxs)(k,{children:[_e,(0,V.jsxs)(`select`,{className:H,id:`provision-sg`,onChange:ve,value:L,children:[ye,be]})]}),t[44]=L,t[45]=be,t[46]=xe):xe=t[46];let Se;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,V.jsx)(O,{children:(0,V.jsx)(`label`,{htmlFor:`provision-key`,children:`Key pair`})}),t[47]=Se):Se=t[47];let Ce;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=e=>{oe(e.target.value)},t[48]=Ce):Ce=t[48];let we;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,V.jsx)(`option`,{value:``,children:`None`}),t[49]=we):we=t[49];let Te;t[50]===x?Te=t[51]:(Te=x.map(W),t[50]=x,t[51]=Te);let Ee;t[52]!==z||t[53]!==Te?(Ee=(0,V.jsxs)(k,{children:[Se,(0,V.jsxs)(`select`,{className:H,id:`provision-key`,onChange:Ce,value:z,children:[we,Te]})]}),t[52]=z,t[53]=Te,t[54]=Ee):Ee=t[54];let De;t[55]!==Q||t[56]!==$||t[57]!==ge||t[58]!==xe||t[59]!==Ee?(De=(0,V.jsxs)(`div`,{className:`space-y-4`,children:[Q,$,ge,xe,Ee]}),t[55]=Q,t[56]=$,t[57]=ge,t[58]=xe,t[59]=Ee,t[60]=De):De=t[60];let Oe;t[61]===o.error?Oe=t[62]:(Oe=o.error&&(0,V.jsx)(ee,{error:o.error instanceof Error?o.error:void 0,msg:`Failed to provision capacity.`}),t[61]=o.error,t[62]=Oe);let ke;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,V.jsx)(N,{children:`Cancel`}),t[63]=ke):ke=t[63];let Ae;t[64]===J?Ae=t[65]:(Ae=e=>{e.preventDefault(),J()},t[64]=J,t[65]=Ae);let je=o.isPending?`Provisioning…`:`Provision`,Me;t[66]!==le||t[67]!==Ae||t[68]!==je?(Me=(0,V.jsxs)(ne,{children:[ke,(0,V.jsx)(M,{disabled:le,onClick:Ae,children:je})]}),t[66]=le,t[67]=Ae,t[68]=je,t[69]=Me):Me=t[69];let Ne;t[70]!==De||t[71]!==Oe||t[72]!==Me||t[73]!==X?(Ne=(0,V.jsxs)(A,{className:`max-h-[85vh] overflow-y-auto`,children:[X,De,Oe,Me]}),t[70]=De,t[71]=Oe,t[72]=Me,t[73]=X,t[74]=Ne):Ne=t[74];let Pe;return t[75]!==U||t[76]!==r||t[77]!==Ne?(Pe=(0,V.jsx)(P,{onOpenChange:U,open:r,children:Ne}),t[75]=U,t[76]=r,t[77]=Ne,t[78]=Pe):Pe=t[78],Pe}function W(e){return(0,V.jsx)(`option`,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function G(e){return(0,V.jsx)(`option`,{value:e.GroupId??``,children:c(e)},e.GroupId)}function K(e){return(0,V.jsxs)(`option`,{value:e.SubnetId??``,children:[e.SubnetId,` (`,e.CidrBlock,e.AvailabilityZone?`, ${e.AvailabilityZone}`:``,`)`]},e.SubnetId)}var q={drain:`Drain`,activate:`Activate`,deregister:`Deregister`},J={drain:`Draining force-stops the service-owned tasks on this instance so it can be retired.`,activate:`This returns the instance to ACTIVE so the scheduler can place tasks on it again.`,deregister:`This force-removes the container instance record. Any tasks it still holds are stopped.`};function le(e){let t=(0,ce.c)(29),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=v(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=T(),s=x(),[c,l]=(0,B.useState)(null),[u,f]=(0,B.useState)(!1),p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{l(null)},t[2]=p):p=t[2];let m=p,h;t[3]!==n||t[4]!==s||t[5]!==c||t[6]!==o?(h=function(){if(c){if(c.action===`deregister`){s.mutate({cluster:n,containerInstance:c.arn},{onSuccess:m});return}o.mutate({cluster:n,containerInstance:c.arn,status:c.action===`drain`?`DRAINING`:`ACTIVE`},{onSuccess:m})}},t[3]=n,t[4]=s,t[5]=c,t[6]=o,t[7]=h):h=t[7];let g=h,_=o.isError||s.isError,y=o.error??s.error,b=o.isPending||s.isPending,S;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,V.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,V.jsx)(d,{onClick:()=>{f(!0)},size:`sm`,children:`Provision EC2 capacity`})}),t[8]=S):S=t[8];let C;t[9]!==y||t[10]!==_?(C=_&&(0,V.jsx)(ee,{error:y instanceof Error?y:void 0,msg:`Container instance action failed.`}),t[9]=y,t[10]=_,t[11]=C):C=t[11];let w;t[12]===i?w=t[13]:(w=i.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No container instances found.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`EC2 Instance`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,V.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>{let t=e.containerInstanceArn??``,n=e.status===`DRAINING`;return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.ec2InstanceId}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:(0,V.jsx)(L,{state:e.status})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingTasksCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,V.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,V.jsx)(d,{"aria-label":n?`Activate container instance`:`Drain container instance`,onClick:()=>{l({arn:t,action:n?`activate`:`drain`})},size:`sm`,variant:`outline`,children:n?`Activate`:`Drain`}),(0,V.jsx)(d,{onClick:()=>{l({arn:t,action:`deregister`})},size:`sm`,variant:`destructive`,children:`Deregister`})]})})]},t)})})]})}),t[12]=i,t[13]=w);let E;t[14]!==n||t[15]!==u?(E=(0,V.jsx)(U,{clusterName:n,onOpenChange:f,open:u}),t[14]=n,t[15]=u,t[16]=E):E=t[16];let D=c?q[c.action]:`Confirm`,O=c?J[c.action]:``,k;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>{e||l(null)},t[17]=k):k=t[17];let te=c!==null,A;t[18]!==g||t[19]!==b||t[20]!==te||t[21]!==D||t[22]!==O?(A=(0,V.jsx)(ie,{confirmLabel:D,description:O,isPending:b,onConfirm:g,onOpenChange:k,open:te,title:`Container instance`}),t[18]=g,t[19]=b,t[20]=te,t[21]=D,t[22]=O,t[23]=A):A=t[23];let j;return t[24]!==A||t[25]!==C||t[26]!==w||t[27]!==E?(j=(0,V.jsxs)(V.Fragment,{children:[S,C,w,E,A]}),t[24]=A,t[25]=C,t[26]=w,t[27]=E,t[28]=j):j=t[28],j}function Y(e){return e?.split(`/`).at(-1)??``}function X(e){let t=(0,ce.c)(13),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=_(n),t[0]=n,t[1]=r);let{data:i}=a(r),s;t[2]===n?s=t[3]:(s={cluster:n},t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(d,{size:`sm`,children:`Create service`}),t[4]=c):c=t[4];let l;t[5]===s?l=t[6]:(l=(0,V.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,V.jsx)(o,{search:s,to:`/ecs/create-service`,children:c})}),t[5]=s,t[6]=l);let u;t[7]!==n||t[8]!==i?(u=i.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No services found.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,V.jsx)(o,{className:`underline`,params:{clusterName:n,serviceName:e.serviceName??``},to:`/ecs/list-clusters/$clusterName/services/$serviceName`,children:e.serviceName})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:(0,V.jsx)(L,{state:e.status})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:Y(e.taskDefinition)})]},e.serviceArn??e.serviceName))})]})}),t[7]=n,t[8]=i,t[9]=u):u=t[9];let f;return t[10]!==l||t[11]!==u?(f=(0,V.jsxs)(V.Fragment,{children:[l,u]}),t[10]=l,t[11]=u,t[12]=f):f=t[12],f}function Z(e){return e?.split(`/`).at(-1)??``}function Q(e){let t=(0,ce.c)(27),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=y(n),t[0]=n,t[1]=r);let{data:i}=a(r),s=S(),[c,l]=(0,B.useState)(null),u;t[2]!==n||t[3]!==c||t[4]!==s?(u=function(){c&&s.mutate({cluster:n,task:c},{onSuccess:()=>{l(null)}})},t[2]=n,t[3]=c,t[4]=s,t[5]=u):u=t[5];let f=u,p;t[6]===n?p=t[7]:(p={cluster:n},t[6]=n,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,V.jsx)(d,{size:`sm`,children:`Run task`}),t[8]=m):m=t[8];let h;t[9]===p?h=t[10]:(h=(0,V.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,V.jsx)(o,{search:p,to:`/ecs/run-task`,children:m})}),t[9]=p,t[10]=h);let g;t[11]!==s.error||t[12]!==s.isError?(g=s.isError&&(0,V.jsx)(ee,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to stop task.`}),t[11]=s.error,t[12]=s.isError,t[13]=g):g=t[13];let _;t[14]!==n||t[15]!==i?(_=i.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Group`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,V.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>{let t=Z(e.taskArn),r=e.lastStatus!==`STOPPED`;return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,V.jsx)(o,{className:`underline`,params:{clusterName:n,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:(0,V.jsx)(L,{state:e.lastStatus})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredStatus}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.group}),(0,V.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,V.jsx)(d,{onClick:()=>{l(e.taskArn??t)},size:`sm`,variant:`destructive`,children:`Stop`})})]},t)})})]})}),t[14]=n,t[15]=i,t[16]=_):_=t[16];let v;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{e||l(null)},t[17]=v):v=t[17];let b=c!==null,x;t[18]!==f||t[19]!==s.isPending||t[20]!==b?(x=(0,V.jsx)(ie,{confirmLabel:`Stop task`,description:`This stops the task and releases its ENI and reserved capacity.`,isPending:s.isPending,onConfirm:f,onOpenChange:v,open:b,pendingLabel:`Stopping…`,title:`Stop task`}),t[18]=f,t[19]=s.isPending,t[20]=b,t[21]=x):x=t[21];let C;return t[22]!==x||t[23]!==h||t[24]!==g||t[25]!==_?(C=(0,V.jsxs)(V.Fragment,{children:[h,g,_,x]}),t[22]=x,t[23]=h,t[24]=g,t[25]=_,t[26]=C):C=t[26],C}function ue(e){let t=(0,ce.c)(70),{clusterName:n}=e,r=s(),[i,o]=(0,B.useState)(!1),c;t[0]===n?c=t[1]:(c=b(n),t[0]=n,t[1]=c);let{data:f}=a(c),p=w(),m;t[2]!==n||t[3]!==p||t[4]!==r?(m=function(){p.mutate(n,{onSuccess:()=>{r({to:`/ecs/list-clusters`})}})},t[2]=n,t[3]=p,t[4]=r,t[5]=m):m=t[5];let h=m;if(!f){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,V.jsx)(l,{to:`/ecs/list-clusters`,children:`Clusters`}),t[6]=e):e=t[6];let r;t[7]===n?r=t[8]:(r=(0,V.jsx)(D,{subtitle:`Cluster Details`,title:n}),t[7]=n,t[8]=r);let i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Cluster not found.`}),t[9]=i):i=t[9];let a;return t[10]===r?a=t[11]:(a=(0,V.jsxs)(V.Fragment,{children:[e,r,i]}),t[10]=r,t[11]=a),a}let g;t[12]===f.tags?g=t[13]:(g=f.tags??[],t[12]=f.tags,t[13]=g);let _=g,v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,V.jsx)(l,{to:`/ecs/list-clusters`,children:`Clusters`}),t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{o(!0)},t[15]=y):y=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,V.jsxs)(d,{onClick:y,size:`sm`,variant:`destructive`,children:[(0,V.jsx)(u,{className:`size-4`}),`Delete`]}),t[16]=x):x=t[16];let S;t[17]===f.status?S=t[18]:(S=(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,(0,V.jsx)(L,{state:f.status})]}),t[17]=f.status,t[18]=S);let C;t[19]!==n||t[20]!==S?(C=(0,V.jsx)(D,{actions:S,subtitle:`Cluster Details`,title:n}),t[19]=n,t[20]=S,t[21]=C):C=t[21];let T;t[22]!==p.error||t[23]!==p.isError?(T=p.isError&&(0,V.jsx)(ee,{error:p.error instanceof Error?p.error:void 0,msg:`Failed to delete cluster.`}),t[22]=p.error,t[23]=p.isError,t[24]=T):T=t[24];let E;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,V.jsx)(F.Header,{children:`Overview`}),t[25]=E):E=t[25];let O;t[26]===f.clusterArn?O=t[27]:(O=(0,V.jsx)(I,{label:`ARN`,value:f.clusterArn}),t[26]=f.clusterArn,t[27]=O);let k;t[28]===f.status?k=t[29]:(k=(0,V.jsx)(I,{label:`Status`,value:f.status}),t[28]=f.status,t[29]=k);let te=String(f.activeServicesCount??0),A;t[30]===te?A=t[31]:(A=(0,V.jsx)(I,{label:`Active services`,value:te}),t[30]=te,t[31]=A);let j=String(f.runningTasksCount??0),M;t[32]===j?M=t[33]:(M=(0,V.jsx)(I,{label:`Running tasks`,value:j}),t[32]=j,t[33]=M);let ne=String(f.pendingTasksCount??0),N;t[34]===ne?N=t[35]:(N=(0,V.jsx)(I,{label:`Pending tasks`,value:ne}),t[34]=ne,t[35]=N);let re=String(f.registeredContainerInstancesCount??0),P;t[36]===re?P=t[37]:(P=(0,V.jsx)(I,{label:`Registered instances`,value:re}),t[36]=re,t[37]=P);let R;t[38]!==O||t[39]!==k||t[40]!==A||t[41]!==M||t[42]!==N||t[43]!==P?(R=(0,V.jsxs)(F,{children:[E,(0,V.jsxs)(F.Content,{children:[O,k,A,M,N,P]})]}),t[38]=O,t[39]=k,t[40]=A,t[41]=M,t[42]=N,t[43]=P,t[44]=R):R=t[44];let H;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,V.jsxs)(z,{children:[(0,V.jsx)(ae,{value:`services`,children:`Services`}),(0,V.jsx)(ae,{value:`tasks`,children:`Tasks`}),(0,V.jsx)(ae,{value:`infrastructure`,children:`Infrastructure`}),(0,V.jsx)(ae,{value:`tags`,children:`Tags`})]}),t[45]=H):H=t[45];let U;t[46]===n?U=t[47]:(U=(0,V.jsx)(oe,{value:`services`,children:(0,V.jsx)(X,{clusterName:n})}),t[46]=n,t[47]=U);let W;t[48]===n?W=t[49]:(W=(0,V.jsx)(oe,{value:`tasks`,children:(0,V.jsx)(Q,{clusterName:n})}),t[48]=n,t[49]=W);let G;t[50]===n?G=t[51]:(G=(0,V.jsx)(oe,{value:`infrastructure`,children:(0,V.jsx)(le,{clusterName:n})}),t[50]=n,t[51]=G);let K;t[52]===_?K=t[53]:(K=(0,V.jsx)(oe,{value:`tags`,children:_.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No tags.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Key`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`})]})}),(0,V.jsx)(`tbody`,{children:_.map(de)})]})})}),t[52]=_,t[53]=K);let q;t[54]!==U||t[55]!==W||t[56]!==G||t[57]!==K?(q=(0,V.jsxs)(se,{className:`mt-6`,defaultValue:`services`,children:[H,U,W,G,K]}),t[54]=U,t[55]=W,t[56]=G,t[57]=K,t[58]=q):q=t[58];let J=`This permanently deletes cluster "${n}" and force-stops every task it holds. This cannot be undone.`,Y;t[59]!==p.isPending||t[60]!==h||t[61]!==i||t[62]!==J?(Y=(0,V.jsx)(ie,{description:J,isPending:p.isPending,onConfirm:h,onOpenChange:o,open:i,title:`Delete cluster`}),t[59]=p.isPending,t[60]=h,t[61]=i,t[62]=J,t[63]=Y):Y=t[63];let Z;return t[64]!==R||t[65]!==q||t[66]!==Y||t[67]!==C||t[68]!==T?(Z=(0,V.jsxs)(V.Fragment,{children:[v,C,T,R,q,Y]}),t[64]=R,t[65]=q,t[66]=Y,t[67]=C,t[68]=T,t[69]=Z):Z=t[69],Z}function de(e){return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.key}),(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.value})]},e.key)}function $(){let e=(0,ce.c)(2),{clusterName:t}=E.useParams(),n;return e[0]===t?n=e[1]:(n=(0,V.jsx)(ue,{clusterName:t}),e[0]=t,e[1]=n),n}export{$ as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-DJOHvPop.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-IpjQl0UQ.js similarity index 78% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-DJOHvPop.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-IpjQl0UQ.js index 75e91a43e..dc5319c20 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-DJOHvPop.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-IpjQl0UQ.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_clusterName-eEFWP75k.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/signed-fetch-BHraeSLO.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/gpu-instance-type-select-Dr56r-me.js","assets/select-Bgl6IAYG.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/tabs-CAMCnrj7.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{i as r,s as i,t as a}from"./ecs-DRWPOVsw.js";var o=e(`/_auth/ecs/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...a(t.clusterName),staleTime:`static`}),e.queryClient.query({...r(t.clusterName),staleTime:`static`}),e.queryClient.query({...i(t.clusterName),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.clusterName} | ECS | Mulga`}]}),component:t(()=>n(()=>import(`./_clusterName-eEFWP75k.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])),`component`)});export{o as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_clusterName-Cs5kdhT1.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/signed-fetch-BHraeSLO.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/gpu-instance-type-select-Dr56r-me.js","assets/select-Bgl6IAYG.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/tabs-CAMCnrj7.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{i as r,s as i,t as a}from"./ecs-DRWPOVsw.js";var o=e(`/_auth/ecs/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...a(t.clusterName),staleTime:`static`}),e.queryClient.query({...r(t.clusterName),staleTime:`static`}),e.queryClient.query({...i(t.clusterName),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.clusterName} | ECS | Mulga`}]}),component:t(()=>n(()=>import(`./_clusterName-Cs5kdhT1.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])),`component`)});export{o as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-eEFWP75k.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-eEFWP75k.js deleted file mode 100644 index 58fef01b9..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_clusterName-eEFWP75k.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./trash-DHuPKozD.js";import{t as u}from"./button-Bae9vdts.js";import{t as d}from"./input-CpcyJw4R.js";import{O as f,c as p,p as m,w as h}from"./ec2-DJL24ekw.js";import{i as g,r as _,s as v,t as y}from"./ecs-DRWPOVsw.js";import{i as b,l as x,o as S,r as C,u as w}from"./ecs-BsOdvIYx.js";import{t as T}from"./_clusterName-DJOHvPop.js";import{t as E}from"./page-heading-M0NyqAmu.js";import{t as ee}from"./error-banner-BcDqaPk7.js";import{s as D,t as O}from"./field-ChkDR_wL.js";import{a as k,i as A,l as j,n as M,o as N,r as te,s as P,t as ne}from"./alert-dialog-BYzNCmBp.js";import{t as F}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as re,t as I}from"./detail-row-CclMDqj8.js";import{t as ie}from"./state-badge-BD9XGBez.js";import{t as L}from"./gpu-instance-type-select-Dr56r-me.js";import{i as R,n as ae,r as z,t as oe}from"./tabs-CAMCnrj7.js";var se=r(),B=t(n(),1),V=e(),H=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function U(e){let t=(0,se.c)(79),{clusterName:n,open:r,onOpenChange:a}=e,o=S(),{data:s}=i(f),{data:c}=i(h),{data:l}=i(m),{data:u}=i(p),g;t[0]===s?.Subnets?g=t[1]:(g=s?.Subnets??[],t[0]=s?.Subnets,t[1]=g);let _=g,v;t[2]===c?.SecurityGroups?v=t[3]:(v=c?.SecurityGroups??[],t[2]=c?.SecurityGroups,t[3]=v);let y=v,b;t[4]===l?.KeyPairs?b=t[5]:(b=l?.KeyPairs??[],t[4]=l?.KeyPairs,t[5]=b);let x=b,C;t[6]===u?.InstanceTypes?C=t[7]:(C=u?.InstanceTypes??[],t[6]=u?.InstanceTypes,t[7]=C);let w=C,[T,E]=(0,B.useState)(`t3.small`),[F,re]=(0,B.useState)(1),[I,ie]=(0,B.useState)(``),[R,ae]=(0,B.useState)(``),[z,oe]=(0,B.useState)(``),U;t[8]!==a||t[9]!==o?(U=function(e){e||(E(`t3.small`),re(1),ie(``),ae(``),oe(``),o.reset()),a(e)},t[8]=a,t[9]=o,t[10]=U):U=t[10];let q=U,J;t[11]!==n||t[12]!==F||t[13]!==q||t[14]!==T||t[15]!==z||t[16]!==o||t[17]!==R||t[18]!==I?(J=async function(){try{await o.mutateAsync({Cluster:n,InstanceType:T||void 0,Count:F,SubnetID:I,SecurityGroupID:R,KeyName:z||void 0}),q(!1)}catch{}},t[11]=n,t[12]=F,t[13]=q,t[14]=T,t[15]=z,t[16]=o,t[17]=R,t[18]=I,t[19]=J):J=t[19];let ce=J,Y=o.isPending||I===``||R===``,le;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,V.jsx)(j,{children:`Provision EC2 capacity`}),t[20]=le):le=t[20];let X;t[21]===n?X=t[22]:(X=(0,V.jsxs)(P,{children:[le,(0,V.jsxs)(k,{children:[`Launch container instances into cluster “`,n,`”. They register automatically once booted.`]})]}),t[21]=n,t[22]=X);let ue;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,V.jsx)(D,{children:(0,V.jsx)(`label`,{htmlFor:`provision-instance-type`,children:`Instance type`})}),t[23]=ue):ue=t[23];let Z;t[24]!==T||t[25]!==w?(Z=(0,V.jsxs)(O,{children:[ue,(0,V.jsx)(L,{id:`provision-instance-type`,instanceTypes:w,onValueChange:E,value:T})]}),t[24]=T,t[25]=w,t[26]=Z):Z=t[26];let de;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,V.jsx)(D,{children:(0,V.jsx)(`label`,{htmlFor:`provision-count`,children:`Count`})}),t[27]=de):de=t[27];let fe;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(fe=e=>{re(Number(e.target.value))},t[28]=fe):fe=t[28];let pe;t[29]===F?pe=t[30]:(pe=(0,V.jsxs)(O,{children:[de,(0,V.jsx)(d,{id:`provision-count`,max:10,min:1,onChange:fe,type:`number`,value:F})]}),t[29]=F,t[30]=pe);let me;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,V.jsx)(D,{children:(0,V.jsx)(`label`,{htmlFor:`provision-subnet`,children:`Subnet`})}),t[31]=me):me=t[31];let he;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(he=e=>{ie(e.target.value)},t[32]=he):he=t[32];let ge;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,V.jsx)(`option`,{value:``,children:`Select a subnet`}),t[33]=ge):ge=t[33];let _e;t[34]===_?_e=t[35]:(_e=_.map(K),t[34]=_,t[35]=_e);let ve;t[36]!==I||t[37]!==_e?(ve=(0,V.jsxs)(O,{children:[me,(0,V.jsxs)(`select`,{className:H,id:`provision-subnet`,onChange:he,value:I,children:[ge,_e]})]}),t[36]=I,t[37]=_e,t[38]=ve):ve=t[38];let ye;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,V.jsx)(D,{children:(0,V.jsx)(`label`,{htmlFor:`provision-sg`,children:`Security group`})}),t[39]=ye):ye=t[39];let be;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(be=e=>{ae(e.target.value)},t[40]=be):be=t[40];let xe;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,V.jsx)(`option`,{value:``,children:`Select a security group`}),t[41]=xe):xe=t[41];let Se;t[42]===y?Se=t[43]:(Se=y.map(G),t[42]=y,t[43]=Se);let Ce;t[44]!==R||t[45]!==Se?(Ce=(0,V.jsxs)(O,{children:[ye,(0,V.jsxs)(`select`,{className:H,id:`provision-sg`,onChange:be,value:R,children:[xe,Se]})]}),t[44]=R,t[45]=Se,t[46]=Ce):Ce=t[46];let we;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,V.jsx)(D,{children:(0,V.jsx)(`label`,{htmlFor:`provision-key`,children:`Key pair`})}),t[47]=we):we=t[47];let Te;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(Te=e=>{oe(e.target.value)},t[48]=Te):Te=t[48];let Ee;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,V.jsx)(`option`,{value:``,children:`None`}),t[49]=Ee):Ee=t[49];let De;t[50]===x?De=t[51]:(De=x.map(W),t[50]=x,t[51]=De);let Oe;t[52]!==z||t[53]!==De?(Oe=(0,V.jsxs)(O,{children:[we,(0,V.jsxs)(`select`,{className:H,id:`provision-key`,onChange:Te,value:z,children:[Ee,De]})]}),t[52]=z,t[53]=De,t[54]=Oe):Oe=t[54];let ke;t[55]!==Z||t[56]!==pe||t[57]!==ve||t[58]!==Ce||t[59]!==Oe?(ke=(0,V.jsxs)(`div`,{className:`space-y-4`,children:[Z,pe,ve,Ce,Oe]}),t[55]=Z,t[56]=pe,t[57]=ve,t[58]=Ce,t[59]=Oe,t[60]=ke):ke=t[60];let Q;t[61]===o.error?Q=t[62]:(Q=o.error&&(0,V.jsx)(ee,{error:o.error instanceof Error?o.error:void 0,msg:`Failed to provision capacity.`}),t[61]=o.error,t[62]=Q);let Ae;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,V.jsx)(te,{children:`Cancel`}),t[63]=Ae):Ae=t[63];let je;t[64]===ce?je=t[65]:(je=e=>{e.preventDefault(),ce()},t[64]=ce,t[65]=je);let Me=o.isPending?`Provisioning…`:`Provision`,Ne;t[66]!==Y||t[67]!==je||t[68]!==Me?(Ne=(0,V.jsxs)(N,{children:[Ae,(0,V.jsx)(M,{disabled:Y,onClick:je,children:Me})]}),t[66]=Y,t[67]=je,t[68]=Me,t[69]=Ne):Ne=t[69];let $;t[70]!==ke||t[71]!==Q||t[72]!==Ne||t[73]!==X?($=(0,V.jsxs)(A,{className:`max-h-[85vh] overflow-y-auto`,children:[X,ke,Q,Ne]}),t[70]=ke,t[71]=Q,t[72]=Ne,t[73]=X,t[74]=$):$=t[74];let Pe;return t[75]!==q||t[76]!==r||t[77]!==$?(Pe=(0,V.jsx)(ne,{onOpenChange:q,open:r,children:$}),t[75]=q,t[76]=r,t[77]=$,t[78]=Pe):Pe=t[78],Pe}function W(e){return(0,V.jsx)(`option`,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function G(e){return(0,V.jsxs)(`option`,{value:e.GroupId??``,children:[e.GroupId,` (`,e.GroupName,`)`]},e.GroupId)}function K(e){return(0,V.jsxs)(`option`,{value:e.SubnetId??``,children:[e.SubnetId,` (`,e.CidrBlock,e.AvailabilityZone?`, ${e.AvailabilityZone}`:``,`)`]},e.SubnetId)}var q={drain:`Drain`,activate:`Activate`,deregister:`Deregister`},J={drain:`Draining force-stops the service-owned tasks on this instance so it can be retired.`,activate:`This returns the instance to ACTIVE so the scheduler can place tasks on it again.`,deregister:`This force-removes the container instance record. Any tasks it still holds are stopped.`};function ce(e){let t=(0,se.c)(29),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=_(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=w(),s=b(),[c,l]=(0,B.useState)(null),[d,f]=(0,B.useState)(!1),p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{l(null)},t[2]=p):p=t[2];let m=p,h;t[3]!==n||t[4]!==s||t[5]!==c||t[6]!==o?(h=function(){if(c){if(c.action===`deregister`){s.mutate({cluster:n,containerInstance:c.arn},{onSuccess:m});return}o.mutate({cluster:n,containerInstance:c.arn,status:c.action===`drain`?`DRAINING`:`ACTIVE`},{onSuccess:m})}},t[3]=n,t[4]=s,t[5]=c,t[6]=o,t[7]=h):h=t[7];let g=h,v=o.isError||s.isError,y=o.error??s.error,x=o.isPending||s.isPending,S;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,V.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,V.jsx)(u,{onClick:()=>{f(!0)},size:`sm`,children:`Provision EC2 capacity`})}),t[8]=S):S=t[8];let C;t[9]!==y||t[10]!==v?(C=v&&(0,V.jsx)(ee,{error:y instanceof Error?y:void 0,msg:`Container instance action failed.`}),t[9]=y,t[10]=v,t[11]=C):C=t[11];let T;t[12]===i?T=t[13]:(T=i.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No container instances found.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`EC2 Instance`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,V.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>{let t=e.containerInstanceArn??``,n=e.status===`DRAINING`;return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.ec2InstanceId}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:(0,V.jsx)(ie,{state:e.status})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingTasksCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,V.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,V.jsx)(u,{"aria-label":n?`Activate container instance`:`Drain container instance`,onClick:()=>{l({arn:t,action:n?`activate`:`drain`})},size:`sm`,variant:`outline`,children:n?`Activate`:`Drain`}),(0,V.jsx)(u,{onClick:()=>{l({arn:t,action:`deregister`})},size:`sm`,variant:`destructive`,children:`Deregister`})]})})]},t)})})]})}),t[12]=i,t[13]=T);let E;t[14]!==n||t[15]!==d?(E=(0,V.jsx)(U,{clusterName:n,onOpenChange:f,open:d}),t[14]=n,t[15]=d,t[16]=E):E=t[16];let D=c?q[c.action]:`Confirm`,O=c?J[c.action]:``,k;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>{e||l(null)},t[17]=k):k=t[17];let A=c!==null,j;t[18]!==g||t[19]!==x||t[20]!==A||t[21]!==D||t[22]!==O?(j=(0,V.jsx)(F,{confirmLabel:D,description:O,isPending:x,onConfirm:g,onOpenChange:k,open:A,title:`Container instance`}),t[18]=g,t[19]=x,t[20]=A,t[21]=D,t[22]=O,t[23]=j):j=t[23];let M;return t[24]!==j||t[25]!==C||t[26]!==T||t[27]!==E?(M=(0,V.jsxs)(V.Fragment,{children:[S,C,T,E,j]}),t[24]=j,t[25]=C,t[26]=T,t[27]=E,t[28]=M):M=t[28],M}function Y(e){return e?.split(`/`).at(-1)??``}function le(e){let t=(0,se.c)(13),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=g(n),t[0]=n,t[1]=r);let{data:i}=a(r),s;t[2]===n?s=t[3]:(s={cluster:n},t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(u,{size:`sm`,children:`Create service`}),t[4]=c):c=t[4];let l;t[5]===s?l=t[6]:(l=(0,V.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,V.jsx)(o,{search:s,to:`/ecs/create-service`,children:c})}),t[5]=s,t[6]=l);let d;t[7]!==n||t[8]!==i?(d=i.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No services found.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,V.jsx)(o,{className:`underline`,params:{clusterName:n,serviceName:e.serviceName??``},to:`/ecs/list-clusters/$clusterName/services/$serviceName`,children:e.serviceName})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:(0,V.jsx)(ie,{state:e.status})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0}),(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:Y(e.taskDefinition)})]},e.serviceArn??e.serviceName))})]})}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let f;return t[10]!==l||t[11]!==d?(f=(0,V.jsxs)(V.Fragment,{children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12],f}function X(e){return e?.split(`/`).at(-1)??``}function ue(e){let t=(0,se.c)(27),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=v(n),t[0]=n,t[1]=r);let{data:i}=a(r),s=x(),[c,l]=(0,B.useState)(null),d;t[2]!==n||t[3]!==c||t[4]!==s?(d=function(){c&&s.mutate({cluster:n,task:c},{onSuccess:()=>{l(null)}})},t[2]=n,t[3]=c,t[4]=s,t[5]=d):d=t[5];let f=d,p;t[6]===n?p=t[7]:(p={cluster:n},t[6]=n,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,V.jsx)(u,{size:`sm`,children:`Run task`}),t[8]=m):m=t[8];let h;t[9]===p?h=t[10]:(h=(0,V.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,V.jsx)(o,{search:p,to:`/ecs/run-task`,children:m})}),t[9]=p,t[10]=h);let g;t[11]!==s.error||t[12]!==s.isError?(g=s.isError&&(0,V.jsx)(ee,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to stop task.`}),t[11]=s.error,t[12]=s.isError,t[13]=g):g=t[13];let _;t[14]!==n||t[15]!==i?(_=i.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired Status`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Group`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,V.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>{let t=X(e.taskArn),r=e.lastStatus!==`STOPPED`;return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,V.jsx)(o,{className:`underline`,params:{clusterName:n,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:(0,V.jsx)(ie,{state:e.lastStatus})}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredStatus}),(0,V.jsx)(`td`,{className:`px-4 py-2`,children:e.group}),(0,V.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,V.jsx)(u,{onClick:()=>{l(e.taskArn??t)},size:`sm`,variant:`destructive`,children:`Stop`})})]},t)})})]})}),t[14]=n,t[15]=i,t[16]=_):_=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{e||l(null)},t[17]=y):y=t[17];let b=c!==null,S;t[18]!==f||t[19]!==s.isPending||t[20]!==b?(S=(0,V.jsx)(F,{confirmLabel:`Stop task`,description:`This stops the task and releases its ENI and reserved capacity.`,isPending:s.isPending,onConfirm:f,onOpenChange:y,open:b,pendingLabel:`Stopping…`,title:`Stop task`}),t[18]=f,t[19]=s.isPending,t[20]=b,t[21]=S):S=t[21];let C;return t[22]!==S||t[23]!==h||t[24]!==g||t[25]!==_?(C=(0,V.jsxs)(V.Fragment,{children:[h,g,_,S]}),t[22]=S,t[23]=h,t[24]=g,t[25]=_,t[26]=C):C=t[26],C}function Z(e){let t=(0,se.c)(70),{clusterName:n}=e,r=s(),[i,o]=(0,B.useState)(!1),d;t[0]===n?d=t[1]:(d=y(n),t[0]=n,t[1]=d);let{data:f}=a(d),p=C(),m;t[2]!==n||t[3]!==p||t[4]!==r?(m=function(){p.mutate(n,{onSuccess:()=>{r({to:`/ecs/list-clusters`})}})},t[2]=n,t[3]=p,t[4]=r,t[5]=m):m=t[5];let h=m;if(!f){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,V.jsx)(c,{to:`/ecs/list-clusters`,children:`Clusters`}),t[6]=e):e=t[6];let r;t[7]===n?r=t[8]:(r=(0,V.jsx)(E,{subtitle:`Cluster Details`,title:n}),t[7]=n,t[8]=r);let i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Cluster not found.`}),t[9]=i):i=t[9];let a;return t[10]===r?a=t[11]:(a=(0,V.jsxs)(V.Fragment,{children:[e,r,i]}),t[10]=r,t[11]=a),a}let g;t[12]===f.tags?g=t[13]:(g=f.tags??[],t[12]=f.tags,t[13]=g);let _=g,v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,V.jsx)(c,{to:`/ecs/list-clusters`,children:`Clusters`}),t[14]=v):v=t[14];let b;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{o(!0)},t[15]=b):b=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,V.jsxs)(u,{onClick:b,size:`sm`,variant:`destructive`,children:[(0,V.jsx)(l,{className:`size-4`}),`Delete`]}),t[16]=x):x=t[16];let S;t[17]===f.status?S=t[18]:(S=(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,(0,V.jsx)(ie,{state:f.status})]}),t[17]=f.status,t[18]=S);let w;t[19]!==n||t[20]!==S?(w=(0,V.jsx)(E,{actions:S,subtitle:`Cluster Details`,title:n}),t[19]=n,t[20]=S,t[21]=w):w=t[21];let T;t[22]!==p.error||t[23]!==p.isError?(T=p.isError&&(0,V.jsx)(ee,{error:p.error instanceof Error?p.error:void 0,msg:`Failed to delete cluster.`}),t[22]=p.error,t[23]=p.isError,t[24]=T):T=t[24];let D;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,V.jsx)(re.Header,{children:`Overview`}),t[25]=D):D=t[25];let O;t[26]===f.clusterArn?O=t[27]:(O=(0,V.jsx)(I,{label:`ARN`,value:f.clusterArn}),t[26]=f.clusterArn,t[27]=O);let k;t[28]===f.status?k=t[29]:(k=(0,V.jsx)(I,{label:`Status`,value:f.status}),t[28]=f.status,t[29]=k);let A=String(f.activeServicesCount??0),j;t[30]===A?j=t[31]:(j=(0,V.jsx)(I,{label:`Active services`,value:A}),t[30]=A,t[31]=j);let M=String(f.runningTasksCount??0),N;t[32]===M?N=t[33]:(N=(0,V.jsx)(I,{label:`Running tasks`,value:M}),t[32]=M,t[33]=N);let te=String(f.pendingTasksCount??0),P;t[34]===te?P=t[35]:(P=(0,V.jsx)(I,{label:`Pending tasks`,value:te}),t[34]=te,t[35]=P);let ne=String(f.registeredContainerInstancesCount??0),L;t[36]===ne?L=t[37]:(L=(0,V.jsx)(I,{label:`Registered instances`,value:ne}),t[36]=ne,t[37]=L);let H;t[38]!==O||t[39]!==k||t[40]!==j||t[41]!==N||t[42]!==P||t[43]!==L?(H=(0,V.jsxs)(re,{children:[D,(0,V.jsxs)(re.Content,{children:[O,k,j,N,P,L]})]}),t[38]=O,t[39]=k,t[40]=j,t[41]=N,t[42]=P,t[43]=L,t[44]=H):H=t[44];let U;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,V.jsxs)(ae,{children:[(0,V.jsx)(R,{value:`services`,children:`Services`}),(0,V.jsx)(R,{value:`tasks`,children:`Tasks`}),(0,V.jsx)(R,{value:`infrastructure`,children:`Infrastructure`}),(0,V.jsx)(R,{value:`tags`,children:`Tags`})]}),t[45]=U):U=t[45];let W;t[46]===n?W=t[47]:(W=(0,V.jsx)(z,{value:`services`,children:(0,V.jsx)(le,{clusterName:n})}),t[46]=n,t[47]=W);let G;t[48]===n?G=t[49]:(G=(0,V.jsx)(z,{value:`tasks`,children:(0,V.jsx)(ue,{clusterName:n})}),t[48]=n,t[49]=G);let K;t[50]===n?K=t[51]:(K=(0,V.jsx)(z,{value:`infrastructure`,children:(0,V.jsx)(ce,{clusterName:n})}),t[50]=n,t[51]=K);let q;t[52]===_?q=t[53]:(q=(0,V.jsx)(z,{value:`tags`,children:_.length===0?(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`No tags.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,V.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Key`}),(0,V.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`})]})}),(0,V.jsx)(`tbody`,{children:_.map(de)})]})})}),t[52]=_,t[53]=q);let J;t[54]!==W||t[55]!==G||t[56]!==K||t[57]!==q?(J=(0,V.jsxs)(oe,{className:`mt-6`,defaultValue:`services`,children:[U,W,G,K,q]}),t[54]=W,t[55]=G,t[56]=K,t[57]=q,t[58]=J):J=t[58];let Y=`This permanently deletes cluster "${n}" and force-stops every task it holds. This cannot be undone.`,X;t[59]!==p.isPending||t[60]!==h||t[61]!==i||t[62]!==Y?(X=(0,V.jsx)(F,{description:Y,isPending:p.isPending,onConfirm:h,onOpenChange:o,open:i,title:`Delete cluster`}),t[59]=p.isPending,t[60]=h,t[61]=i,t[62]=Y,t[63]=X):X=t[63];let Z;return t[64]!==H||t[65]!==J||t[66]!==X||t[67]!==w||t[68]!==T?(Z=(0,V.jsxs)(V.Fragment,{children:[v,w,T,H,J,X]}),t[64]=H,t[65]=J,t[66]=X,t[67]=w,t[68]=T,t[69]=Z):Z=t[69],Z}function de(e){return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.key}),(0,V.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.value})]},e.key)}function fe(){let e=(0,se.c)(2),{clusterName:t}=T.useParams(),n;return e[0]===t?n=e[1]:(n=(0,V.jsx)(Z,{clusterName:t}),e[0]=t,e[1]=n),n}export{fe as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-DAdjyIpK.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-DLTWoMPG.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-DAdjyIpK.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-DLTWoMPG.js index 209832e4b..b6ead1d03 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-DAdjyIpK.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-DLTWoMPG.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useMutation-DV0DQvGm.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{E as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./pencil-Cx6ej4Kx.js";import{t as d}from"./trash-DHuPKozD.js";import{n as f,t as ee}from"./button-Bae9vdts.js";import{t as p}from"./input-CpcyJw4R.js";import{ha as m,o as h}from"./awsClient-I-S7JTV9.js";import{n as g,r as _}from"./bedrock-CysMJ0_R.js";import{n as v,r as y}from"./bedrock-DIbdgKPF.js";import{n as b,r as x,t as S}from"./commandBuilder-B7VWL1AO.js";import{t as C}from"./_guardrailId.index-LFEeWBUo.js";import{t as w}from"./page-heading-M0NyqAmu.js";import{c as te,s as T,t as E}from"./field-ChkDR_wL.js";import{t as ne}from"./textarea-BNxO_Zsf.js";import{t as D}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as O,t as k}from"./detail-row-CclMDqj8.js";import{t as A}from"./state-badge-BD9XGBez.js";var j=class extends x(S,b,`ApplyGuardrail`,m){},re=t(n(),1),M=r();function N(){let e=(0,M.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:ie},e[0]=t):t=e[0],i(t)}async function ie(e){let{guardrailIdentifier:t,guardrailVersion:n,source:r,text:i}=e,a=new j({guardrailIdentifier:t,guardrailVersion:n,source:r,content:[{text:{text:i}}]});return await h().send(a)}var P=e(),F=[`INPUT`,`OUTPUT`];function ae(e){return(e.topicPolicy?.topics??[]).filter(e=>e.detected===!0||e.action===`BLOCKED`).map(e=>e.name??`unknown topic`)}function I(e){let t=e.wordPolicy?.customWords??[],n=e.wordPolicy?.managedWordLists??[];return[...t,...n].flatMap(e=>e.detected===!0||e.action===`BLOCKED`?[e.match??`unknown word`]:[])}function oe(e){let t=(0,M.c)(9),{assessment:n}=e,r,i,a,o;if(t[0]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ae(n),t=I(n);if(e.length===0&&t.length===0){o=null;break bb0}r=`rounded-md border p-3 text-sm`,i=e.length>0&&(0,P.jsxs)(`p`,{children:[(0,P.jsx)(`span`,{className:`font-medium`,children:`Blocked topics: `}),e.join(`, `)]}),a=t.length>0&&(0,P.jsxs)(`p`,{children:[(0,P.jsx)(`span`,{className:`font-medium`,children:`Blocked words: `}),t.join(`, `)]})}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o}else r=t[1],i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;return t[5]!==r||t[6]!==i||t[7]!==a?(s=(0,P.jsxs)(`div`,{className:r,children:[i,a]}),t[5]=r,t[6]=i,t[7]=a,t[8]=s):s=t[8],s}function se(e){let t=(0,M.c)(47),{guardrailId:n,guardrailVersion:r}=e,[i,a]=(0,re.useState)(``),[o,s]=(0,re.useState)(`INPUT`),c=N(),l;t[0]!==c||t[1]!==n||t[2]!==r||t[3]!==o||t[4]!==i?(l=async function(){if(i.trim().length!==0)try{await c.mutateAsync({guardrailIdentifier:n,guardrailVersion:r,source:o,text:i})}catch{}},t[0]=c,t[1]=n,t[2]=r,t[3]=o,t[4]=i,t[5]=l):l=t[5];let u=l,d;t[6]===c.data?.outputs?d=t[7]:(d=c.data?.outputs??[],t[6]=c.data?.outputs,t[7]=d);let f=d,p;t[8]===c.data?.assessments?p=t[9]:(p=c.data?.assessments??[],t[8]=c.data?.assessments,t[9]=p);let m=p,h=c.data?.action,g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,P.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Guardrail tester`}),t[10]=g):g=t[10];let _;t[11]===r?_=t[12]:(_=(0,P.jsxs)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:[`Apply this guardrail (version `,r,`) to sample content and see whether it intervenes.`]}),t[11]=r,t[12]=_);let v;t[13]===u?v=t[14]:(v=e=>{e.preventDefault(),u()},t[13]=u,t[14]=v);let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,P.jsx)(`legend`,{className:`sr-only`,children:`Content source`}),t[15]=y):y=t[15];let b;t[16]===o?b=t[17]:(b=F.map(e=>(0,P.jsx)(ee,{"aria-pressed":o===e,onClick:()=>{s(e)},type:`button`,variant:o===e?`default`:`outline`,children:e},e)),t[16]=o,t[17]=b);let x;t[18]===b?x=t[19]:(x=(0,P.jsxs)(`fieldset`,{className:`flex items-center gap-1 border-0 p-0`,children:[y,b]}),t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,P.jsx)(te,{htmlFor:`guardrail-content`,children:`Content`}),t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{a(e.target.value)},t[21]=C):C=t[21];let w;t[22]===i?w=t[23]:(w=(0,P.jsx)(ne,{id:`guardrail-content`,onChange:C,placeholder:`Enter content to evaluate against this guardrail`,rows:4,value:i}),t[22]=i,t[23]=w);let T;t[24]!==c.isPending||t[25]!==i?(T=c.isPending||i.trim().length===0,t[24]=c.isPending,t[25]=i,t[26]=T):T=t[26];let E=c.isPending?`Applying…`:`Apply guardrail`,D;t[27]!==T||t[28]!==E?(D=(0,P.jsx)(ee,{disabled:T,type:`submit`,children:E}),t[27]=T,t[28]=E,t[29]=D):D=t[29];let O;t[30]!==w||t[31]!==D||t[32]!==v||t[33]!==x?(O=(0,P.jsxs)(`form`,{className:`space-y-2`,onSubmit:v,children:[x,S,w,D]}),t[30]=w,t[31]=D,t[32]=v,t[33]=x,t[34]=O):O=t[34];let k;t[35]===c.error?k=t[36]:(k=c.error&&(0,P.jsx)(`p`,{className:`mt-4 text-sm text-destructive`,children:c.error.message}),t[35]=c.error,t[36]=k);let A;t[37]!==h||t[38]!==c.isSuccess||t[39]!==m||t[40]!==f?(A=c.isSuccess&&(0,P.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,P.jsxs)(`h3`,{className:`text-sm font-medium`,children:[`Action:`,` `,(0,P.jsx)(`span`,{className:h===`GUARDRAIL_INTERVENED`?`text-destructive`:`text-positive-foreground`,children:h})]}),m.length>0&&(0,P.jsx)(`div`,{className:`space-y-2`,children:m.map(L)}),f.length>0&&(0,P.jsxs)(`div`,{className:`space-y-2`,children:[(0,P.jsx)(`h4`,{className:`text-xs font-medium text-muted-foreground`,children:`Output`}),f.map(ce)]})]}),t[37]=h,t[38]=c.isSuccess,t[39]=m,t[40]=f,t[41]=A):A=t[41];let j;return t[42]!==O||t[43]!==k||t[44]!==A||t[45]!==_?(j=(0,P.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[g,_,O,k,A]}),t[42]=O,t[43]=k,t[44]=A,t[45]=_,t[46]=j):j=t[46],j}function ce(e,t){return(0,P.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded bg-muted p-2 font-mono text-xs break-words whitespace-pre-wrap`,children:e.text??`(no text)`},t)}function L(e,t){return(0,P.jsx)(oe,{assessment:e},t)}function le(e){let t=(0,M.c)(15),{topic:n}=e,r;t[0]===n.name?r=t[1]:(r=(0,P.jsx)(`span`,{className:`font-semibold`,children:n.name}),t[0]=n.name,t[1]=r);let i=n.type??`DENY`,a;t[2]===i?a=t[3]:(a=(0,P.jsx)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 text-xs`,children:i}),t[2]=i,t[3]=a);let o;t[4]!==r||t[5]!==a?(o=(0,P.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[r,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6];let s;t[7]===n.definition?s=t[8]:(s=(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:n.definition}),t[7]=n.definition,t[8]=s);let c;t[9]===n.examples?c=t[10]:(c=n.examples&&n.examples.length>0&&(0,P.jsx)(`ul`,{className:`mt-2 list-inside list-disc text-xs text-muted-foreground`,children:n.examples.map(R)}),t[9]=n.examples,t[10]=c);let l;return t[11]!==o||t[12]!==s||t[13]!==c?(l=(0,P.jsxs)(`div`,{className:`rounded-md border p-3 text-sm`,children:[o,s,c]}),t[11]=o,t[12]=s,t[13]=c,t[14]=l):l=t[14],l}function R(e){return(0,P.jsx)(`li`,{children:e},e)}function ue(e){let t=(0,M.c)(7),{version:n}=e,r;t[0]===n.version?r=t[1]:(r=(0,P.jsx)(`span`,{className:`font-mono`,children:n.version}),t[0]=n.version,t[1]=r);let i;t[2]===n.status?i=t[3]:(i=(0,P.jsx)(A,{state:n.status}),t[2]=n.status,t[3]=i);let a;return t[4]!==r||t[5]!==i?(a=(0,P.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-2 text-sm`,children:[r,i]}),t[4]=r,t[5]=i,t[6]=a):a=t[6],a}function de(e){let t=(0,M.c)(26),{guardrailId:n}=e,[r,i]=(0,re.useState)(``),a=g(),o;t[0]!==a||t[1]!==r||t[2]!==n?(o=async function(){try{await a.mutateAsync({description:r.length>0?r:void 0,guardrailIdentifier:n}),i(``)}catch{}},t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3];let s=o,c,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,P.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Create version`}),l=(0,P.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`Snapshots the current DRAFT as a new immutable version.`}),t[4]=c,t[5]=l):(c=t[4],l=t[5]);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`version-description`,children:`Description`})}),t[6]=u):u=t[6];let d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{i(e.target.value)},t[7]=d):d=t[7];let f;t[8]===r?f=t[9]:(f=(0,P.jsxs)(E,{children:[u,(0,P.jsx)(p,{id:`version-description`,onChange:d,placeholder:`Optional`,value:r})]}),t[8]=r,t[9]=f);let m;t[10]===s?m=t[11]:(m=()=>{s()},t[10]=s,t[11]=m);let h=a.isPending?`Creating…`:`Create version`,_;t[12]!==a.isPending||t[13]!==m||t[14]!==h?(_=(0,P.jsx)(ee,{className:`mt-3`,disabled:a.isPending,onClick:m,size:`sm`,children:h}),t[12]=a.isPending,t[13]=m,t[14]=h,t[15]=_):_=t[15];let v;t[16]===a.error?v=t[17]:(v=a.error&&(0,P.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:a.error.message}),t[16]=a.error,t[17]=v);let y;t[18]!==a.data||t[19]!==a.isSuccess?(y=a.isSuccess&&(0,P.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[`Version `,a.data.version,` created.`]}),t[18]=a.data,t[19]=a.isSuccess,t[20]=y):y=t[20];let b;return t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==_?(b=(0,P.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[c,l,f,_,v,y]}),t[21]=v,t[22]=y,t[23]=f,t[24]=_,t[25]=b):b=t[25],b}function z(e){let t=(0,M.c)(98),{guardrailId:n}=e,r=s(),[i,p]=(0,re.useState)(!1),m;t[0]===n?m=t[1]:(m=v(n),t[0]=n,t[1]=m);let{data:h}=a(m),g;t[2]===n?g=t[3]:(g=y(n),t[2]=n,t[3]=g);let{data:b}=a(g),x=_(),S;t[4]===b.guardrails?S=t[5]:(S=b.guardrails??[],t[4]=b.guardrails,t[5]=S);let C=S,te;t[6]===h.topicPolicy?.topics?te=t[7]:(te=h.topicPolicy?.topics??[],t[6]=h.topicPolicy?.topics,t[7]=te);let T=te,E;t[8]!==x||t[9]!==n||t[10]!==r?(E=async function(){try{await x.mutateAsync(n),p(!1),await r({to:`/bedrock/list-guardrails`})}catch{}},t[8]=x,t[9]=n,t[10]=r,t[11]=E):E=t[11];let ne=E,j;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,P.jsx)(l,{to:`/bedrock/list-guardrails`,children:`Back to guardrails`}),t[12]=j):j=t[12];let N;t[13]===h.status?N=t[14]:(N=(0,P.jsx)(A,{state:h.status}),t[13]=h.status,t[14]=N);let ie;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(ie=f({size:`sm`,variant:`outline`}),t[15]=ie):ie=t[15];let F;t[16]===n?F=t[17]:(F={guardrailId:n},t[16]=n,t[17]=F);let ae;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,P.jsx)(u,{className:`size-4`}),t[18]=ae):ae=t[18];let I;t[19]===F?I=t[20]:(I=(0,P.jsxs)(o,{className:ie,params:F,to:`/bedrock/list-guardrails/$guardrailId/edit`,children:[ae,`Edit`]}),t[19]=F,t[20]=I);let oe;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(oe=()=>{p(!0)},t[21]=oe):oe=t[21];let ce;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,P.jsxs)(ee,{onClick:oe,size:`sm`,variant:`destructive`,children:[(0,P.jsx)(d,{className:`size-4`}),`Delete`]}),t[22]=ce):ce=t[22];let L;t[23]!==I||t[24]!==N?(L=(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[N,I,ce]}),t[23]=I,t[24]=N,t[25]=L):L=t[25];let le=h.name??n,R;t[26]!==L||t[27]!==le?(R=(0,P.jsx)(w,{actions:L,subtitle:`Guardrail Details`,title:le}),t[26]=L,t[27]=le,t[28]=R):R=t[28];let ue;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,P.jsx)(O.Header,{children:`Guardrail Information`}),t[29]=ue):ue=t[29];let z;t[30]===h.guardrailId?z=t[31]:(z=(0,P.jsx)(k,{label:`Guardrail ID`,value:h.guardrailId}),t[30]=h.guardrailId,t[31]=z);let B;t[32]===h.guardrailArn?B=t[33]:(B=(0,P.jsx)(k,{label:`ARN`,value:h.guardrailArn}),t[32]=h.guardrailArn,t[33]=B);let V;t[34]===h.version?V=t[35]:(V=(0,P.jsx)(k,{label:`Version`,value:h.version}),t[34]=h.version,t[35]=V);let me=h.description??`-`,H;t[36]===me?H=t[37]:(H=(0,P.jsx)(k,{label:`Description`,value:me}),t[36]=me,t[37]=H);let U;t[38]===h.createdAt?U=t[39]:(U=c(h.createdAt),t[38]=h.createdAt,t[39]=U);let W;t[40]===U?W=t[41]:(W=(0,P.jsx)(k,{label:`Created`,value:U}),t[40]=U,t[41]=W);let G;t[42]===h.updatedAt?G=t[43]:(G=c(h.updatedAt),t[42]=h.updatedAt,t[43]=G);let K;t[44]===G?K=t[45]:(K=(0,P.jsx)(k,{label:`Updated`,value:G}),t[44]=G,t[45]=K);let he;t[46]===h.statusReasons?he=t[47]:(he=h.statusReasons&&h.statusReasons.length>0&&(0,P.jsx)(k,{label:`Status Reasons`,value:h.statusReasons.join(`; `)}),t[46]=h.statusReasons,t[47]=he);let q;t[48]!==z||t[49]!==B||t[50]!==V||t[51]!==H||t[52]!==W||t[53]!==K||t[54]!==he?(q=(0,P.jsxs)(O,{children:[ue,(0,P.jsxs)(O.Content,{children:[z,B,V,H,W,K,he]})]}),t[48]=z,t[49]=B,t[50]=V,t[51]=H,t[52]=W,t[53]=K,t[54]=he,t[55]=q):q=t[55];let ge;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,P.jsx)(`h2`,{className:`mb-3 font-semibold`,children:`Denied topics`}),t[56]=ge):ge=t[56];let J;t[57]===T?J=t[58]:(J=(0,P.jsxs)(`div`,{children:[ge,T.length>0?(0,P.jsx)(`div`,{className:`space-y-2`,children:T.map(pe)}):(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`No topic policy configured for this guardrail.`})]}),t[57]=T,t[58]=J);let _e;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,P.jsx)(`h2`,{className:`mb-3 font-semibold`,children:`Other policies`}),t[59]=_e):_e=t[59];let ve=(h.wordPolicy?.words?.length??0)>0||(h.wordPolicy?.managedWordLists?.length??0)>0?`configured`:`not configured`,Y;t[60]===ve?Y=t[61]:(Y=(0,P.jsxs)(`span`,{className:`rounded-full bg-muted px-2 py-1 text-xs`,children:[`Word policy:`,` `,ve]}),t[60]=ve,t[61]=Y);let ye=(h.sensitiveInformationPolicy?.piiEntities?.length??0)>0||(h.sensitiveInformationPolicy?.regexes?.length??0)>0?`configured`:`not configured`,X;t[62]===ye?X=t[63]:(X=(0,P.jsxs)(`span`,{className:`rounded-full bg-muted px-2 py-1 text-xs`,children:[`Sensitive information policy:`,` `,ye]}),t[62]=ye,t[63]=X);let Z;t[64]!==Y||t[65]!==X?(Z=(0,P.jsxs)(`div`,{children:[_e,(0,P.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[Y,X]})]}),t[64]=Y,t[65]=X,t[66]=Z):Z=t[66];let be;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,P.jsx)(`h2`,{className:`mb-3 font-semibold`,children:`Versions`}),t[67]=be):be=t[67];let xe;t[68]===C?xe=t[69]:(xe=(0,P.jsxs)(`div`,{children:[be,C.length>0?(0,P.jsx)(`div`,{className:`space-y-2`,children:C.map(fe)}):(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`No versions found for this guardrail.`})]}),t[68]=C,t[69]=xe);let Q;t[70]===n?Q=t[71]:(Q=(0,P.jsx)(de,{guardrailId:n}),t[70]=n,t[71]=Q);let Se=h.version??`DRAFT`,Ce;t[72]!==n||t[73]!==Se?(Ce=(0,P.jsx)(se,{guardrailId:n,guardrailVersion:Se}),t[72]=n,t[73]=Se,t[74]=Ce):Ce=t[74];let we;t[75]!==R||t[76]!==q||t[77]!==J||t[78]!==Z||t[79]!==xe||t[80]!==Q||t[81]!==Ce?(we=(0,P.jsxs)(`div`,{className:`space-y-6`,children:[R,q,J,Z,xe,Q,Ce]}),t[75]=R,t[76]=q,t[77]=J,t[78]=Z,t[79]=xe,t[80]=Q,t[81]=Ce,t[82]=we):we=t[82];let Te=`This tears down "${h.name??n}" and all of its versions. It cannot be undone.`,Ee;t[83]===x.error?Ee=t[84]:(Ee=x.error&&(0,P.jsx)(`span`,{className:`mt-2 block text-destructive`,children:x.error.message}),t[83]=x.error,t[84]=Ee);let De;t[85]!==Te||t[86]!==Ee?(De=(0,P.jsxs)(P.Fragment,{children:[Te,Ee]}),t[85]=Te,t[86]=Ee,t[87]=De):De=t[87];let Oe;t[88]===ne?Oe=t[89]:(Oe=()=>{ne()},t[88]=ne,t[89]=Oe);let $;t[90]!==x.isPending||t[91]!==i||t[92]!==De||t[93]!==Oe?($=(0,P.jsx)(D,{description:De,isPending:x.isPending,onConfirm:Oe,onOpenChange:p,open:i,title:`Delete Guardrail`}),t[90]=x.isPending,t[91]=i,t[92]=De,t[93]=Oe,t[94]=$):$=t[94];let ke;return t[95]!==we||t[96]!==$?(ke=(0,P.jsxs)(P.Fragment,{children:[j,we,$]}),t[95]=we,t[96]=$,t[97]=ke):ke=t[97],ke}function fe(e){return(0,P.jsx)(ue,{version:e},e.version)}function pe(e){return(0,P.jsx)(le,{topic:e},e.name)}function B(){let e=(0,M.c)(2),{guardrailId:t}=C.useParams(),n;return e[0]===t?n=e[1]:(n=(0,P.jsx)(z,{guardrailId:t}),e[0]=t,e[1]=n),n}export{B as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useMutation-DV0DQvGm.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{E as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./pencil-Cx6ej4Kx.js";import{t as d}from"./trash-DHuPKozD.js";import{n as f,t as ee}from"./button-Bae9vdts.js";import{t as p}from"./input-CpcyJw4R.js";import{ha as m,o as h}from"./awsClient-I-S7JTV9.js";import{n as g,r as _}from"./bedrock-CysMJ0_R.js";import{n as v,r as y}from"./bedrock-DIbdgKPF.js";import{n as b,r as x,t as S}from"./commandBuilder-B7VWL1AO.js";import{t as C}from"./_guardrailId.index-YWBYQFSM.js";import{t as w}from"./page-heading-M0NyqAmu.js";import{c as te,s as T,t as E}from"./field-ChkDR_wL.js";import{t as ne}from"./textarea-BNxO_Zsf.js";import{t as D}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as O,t as k}from"./detail-row-CclMDqj8.js";import{t as A}from"./state-badge-BiFj5bbX.js";var j=class extends x(S,b,`ApplyGuardrail`,m){},re=t(n(),1),M=r();function N(){let e=(0,M.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:ie},e[0]=t):t=e[0],i(t)}async function ie(e){let{guardrailIdentifier:t,guardrailVersion:n,source:r,text:i}=e,a=new j({guardrailIdentifier:t,guardrailVersion:n,source:r,content:[{text:{text:i}}]});return await h().send(a)}var P=e(),F=[`INPUT`,`OUTPUT`];function ae(e){return(e.topicPolicy?.topics??[]).filter(e=>e.detected===!0||e.action===`BLOCKED`).map(e=>e.name??`unknown topic`)}function I(e){let t=e.wordPolicy?.customWords??[],n=e.wordPolicy?.managedWordLists??[];return[...t,...n].flatMap(e=>e.detected===!0||e.action===`BLOCKED`?[e.match??`unknown word`]:[])}function oe(e){let t=(0,M.c)(9),{assessment:n}=e,r,i,a,o;if(t[0]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=ae(n),t=I(n);if(e.length===0&&t.length===0){o=null;break bb0}r=`rounded-md border p-3 text-sm`,i=e.length>0&&(0,P.jsxs)(`p`,{children:[(0,P.jsx)(`span`,{className:`font-medium`,children:`Blocked topics: `}),e.join(`, `)]}),a=t.length>0&&(0,P.jsxs)(`p`,{children:[(0,P.jsx)(`span`,{className:`font-medium`,children:`Blocked words: `}),t.join(`, `)]})}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o}else r=t[1],i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;return t[5]!==r||t[6]!==i||t[7]!==a?(s=(0,P.jsxs)(`div`,{className:r,children:[i,a]}),t[5]=r,t[6]=i,t[7]=a,t[8]=s):s=t[8],s}function se(e){let t=(0,M.c)(47),{guardrailId:n,guardrailVersion:r}=e,[i,a]=(0,re.useState)(``),[o,s]=(0,re.useState)(`INPUT`),c=N(),l;t[0]!==c||t[1]!==n||t[2]!==r||t[3]!==o||t[4]!==i?(l=async function(){if(i.trim().length!==0)try{await c.mutateAsync({guardrailIdentifier:n,guardrailVersion:r,source:o,text:i})}catch{}},t[0]=c,t[1]=n,t[2]=r,t[3]=o,t[4]=i,t[5]=l):l=t[5];let u=l,d;t[6]===c.data?.outputs?d=t[7]:(d=c.data?.outputs??[],t[6]=c.data?.outputs,t[7]=d);let f=d,p;t[8]===c.data?.assessments?p=t[9]:(p=c.data?.assessments??[],t[8]=c.data?.assessments,t[9]=p);let m=p,h=c.data?.action,g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,P.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Guardrail tester`}),t[10]=g):g=t[10];let _;t[11]===r?_=t[12]:(_=(0,P.jsxs)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:[`Apply this guardrail (version `,r,`) to sample content and see whether it intervenes.`]}),t[11]=r,t[12]=_);let v;t[13]===u?v=t[14]:(v=e=>{e.preventDefault(),u()},t[13]=u,t[14]=v);let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,P.jsx)(`legend`,{className:`sr-only`,children:`Content source`}),t[15]=y):y=t[15];let b;t[16]===o?b=t[17]:(b=F.map(e=>(0,P.jsx)(ee,{"aria-pressed":o===e,onClick:()=>{s(e)},type:`button`,variant:o===e?`default`:`outline`,children:e},e)),t[16]=o,t[17]=b);let x;t[18]===b?x=t[19]:(x=(0,P.jsxs)(`fieldset`,{className:`flex items-center gap-1 border-0 p-0`,children:[y,b]}),t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,P.jsx)(te,{htmlFor:`guardrail-content`,children:`Content`}),t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{a(e.target.value)},t[21]=C):C=t[21];let w;t[22]===i?w=t[23]:(w=(0,P.jsx)(ne,{id:`guardrail-content`,onChange:C,placeholder:`Enter content to evaluate against this guardrail`,rows:4,value:i}),t[22]=i,t[23]=w);let T;t[24]!==c.isPending||t[25]!==i?(T=c.isPending||i.trim().length===0,t[24]=c.isPending,t[25]=i,t[26]=T):T=t[26];let E=c.isPending?`Applying…`:`Apply guardrail`,D;t[27]!==T||t[28]!==E?(D=(0,P.jsx)(ee,{disabled:T,type:`submit`,children:E}),t[27]=T,t[28]=E,t[29]=D):D=t[29];let O;t[30]!==w||t[31]!==D||t[32]!==v||t[33]!==x?(O=(0,P.jsxs)(`form`,{className:`space-y-2`,onSubmit:v,children:[x,S,w,D]}),t[30]=w,t[31]=D,t[32]=v,t[33]=x,t[34]=O):O=t[34];let k;t[35]===c.error?k=t[36]:(k=c.error&&(0,P.jsx)(`p`,{className:`mt-4 text-sm text-destructive`,children:c.error.message}),t[35]=c.error,t[36]=k);let A;t[37]!==h||t[38]!==c.isSuccess||t[39]!==m||t[40]!==f?(A=c.isSuccess&&(0,P.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,P.jsxs)(`h3`,{className:`text-sm font-medium`,children:[`Action:`,` `,(0,P.jsx)(`span`,{className:h===`GUARDRAIL_INTERVENED`?`text-destructive`:`text-positive-foreground`,children:h})]}),m.length>0&&(0,P.jsx)(`div`,{className:`space-y-2`,children:m.map(L)}),f.length>0&&(0,P.jsxs)(`div`,{className:`space-y-2`,children:[(0,P.jsx)(`h4`,{className:`text-xs font-medium text-muted-foreground`,children:`Output`}),f.map(ce)]})]}),t[37]=h,t[38]=c.isSuccess,t[39]=m,t[40]=f,t[41]=A):A=t[41];let j;return t[42]!==O||t[43]!==k||t[44]!==A||t[45]!==_?(j=(0,P.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[g,_,O,k,A]}),t[42]=O,t[43]=k,t[44]=A,t[45]=_,t[46]=j):j=t[46],j}function ce(e,t){return(0,P.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded bg-muted p-2 font-mono text-xs break-words whitespace-pre-wrap`,children:e.text??`(no text)`},t)}function L(e,t){return(0,P.jsx)(oe,{assessment:e},t)}function le(e){let t=(0,M.c)(15),{topic:n}=e,r;t[0]===n.name?r=t[1]:(r=(0,P.jsx)(`span`,{className:`font-semibold`,children:n.name}),t[0]=n.name,t[1]=r);let i=n.type??`DENY`,a;t[2]===i?a=t[3]:(a=(0,P.jsx)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 text-xs`,children:i}),t[2]=i,t[3]=a);let o;t[4]!==r||t[5]!==a?(o=(0,P.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[r,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6];let s;t[7]===n.definition?s=t[8]:(s=(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:n.definition}),t[7]=n.definition,t[8]=s);let c;t[9]===n.examples?c=t[10]:(c=n.examples&&n.examples.length>0&&(0,P.jsx)(`ul`,{className:`mt-2 list-inside list-disc text-xs text-muted-foreground`,children:n.examples.map(R)}),t[9]=n.examples,t[10]=c);let l;return t[11]!==o||t[12]!==s||t[13]!==c?(l=(0,P.jsxs)(`div`,{className:`rounded-md border p-3 text-sm`,children:[o,s,c]}),t[11]=o,t[12]=s,t[13]=c,t[14]=l):l=t[14],l}function R(e){return(0,P.jsx)(`li`,{children:e},e)}function ue(e){let t=(0,M.c)(7),{version:n}=e,r;t[0]===n.version?r=t[1]:(r=(0,P.jsx)(`span`,{className:`font-mono`,children:n.version}),t[0]=n.version,t[1]=r);let i;t[2]===n.status?i=t[3]:(i=(0,P.jsx)(A,{state:n.status}),t[2]=n.status,t[3]=i);let a;return t[4]!==r||t[5]!==i?(a=(0,P.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-2 text-sm`,children:[r,i]}),t[4]=r,t[5]=i,t[6]=a):a=t[6],a}function de(e){let t=(0,M.c)(26),{guardrailId:n}=e,[r,i]=(0,re.useState)(``),a=g(),o;t[0]!==a||t[1]!==r||t[2]!==n?(o=async function(){try{await a.mutateAsync({description:r.length>0?r:void 0,guardrailIdentifier:n}),i(``)}catch{}},t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3];let s=o,c,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,P.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Create version`}),l=(0,P.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`Snapshots the current DRAFT as a new immutable version.`}),t[4]=c,t[5]=l):(c=t[4],l=t[5]);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`version-description`,children:`Description`})}),t[6]=u):u=t[6];let d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{i(e.target.value)},t[7]=d):d=t[7];let f;t[8]===r?f=t[9]:(f=(0,P.jsxs)(E,{children:[u,(0,P.jsx)(p,{id:`version-description`,onChange:d,placeholder:`Optional`,value:r})]}),t[8]=r,t[9]=f);let m;t[10]===s?m=t[11]:(m=()=>{s()},t[10]=s,t[11]=m);let h=a.isPending?`Creating…`:`Create version`,_;t[12]!==a.isPending||t[13]!==m||t[14]!==h?(_=(0,P.jsx)(ee,{className:`mt-3`,disabled:a.isPending,onClick:m,size:`sm`,children:h}),t[12]=a.isPending,t[13]=m,t[14]=h,t[15]=_):_=t[15];let v;t[16]===a.error?v=t[17]:(v=a.error&&(0,P.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:a.error.message}),t[16]=a.error,t[17]=v);let y;t[18]!==a.data||t[19]!==a.isSuccess?(y=a.isSuccess&&(0,P.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[`Version `,a.data.version,` created.`]}),t[18]=a.data,t[19]=a.isSuccess,t[20]=y):y=t[20];let b;return t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==_?(b=(0,P.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[c,l,f,_,v,y]}),t[21]=v,t[22]=y,t[23]=f,t[24]=_,t[25]=b):b=t[25],b}function z(e){let t=(0,M.c)(98),{guardrailId:n}=e,r=s(),[i,p]=(0,re.useState)(!1),m;t[0]===n?m=t[1]:(m=v(n),t[0]=n,t[1]=m);let{data:h}=a(m),g;t[2]===n?g=t[3]:(g=y(n),t[2]=n,t[3]=g);let{data:b}=a(g),x=_(),S;t[4]===b.guardrails?S=t[5]:(S=b.guardrails??[],t[4]=b.guardrails,t[5]=S);let C=S,te;t[6]===h.topicPolicy?.topics?te=t[7]:(te=h.topicPolicy?.topics??[],t[6]=h.topicPolicy?.topics,t[7]=te);let T=te,E;t[8]!==x||t[9]!==n||t[10]!==r?(E=async function(){try{await x.mutateAsync(n),p(!1),await r({to:`/bedrock/list-guardrails`})}catch{}},t[8]=x,t[9]=n,t[10]=r,t[11]=E):E=t[11];let ne=E,j;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,P.jsx)(l,{to:`/bedrock/list-guardrails`,children:`Back to guardrails`}),t[12]=j):j=t[12];let N;t[13]===h.status?N=t[14]:(N=(0,P.jsx)(A,{state:h.status}),t[13]=h.status,t[14]=N);let ie;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(ie=f({size:`sm`,variant:`outline`}),t[15]=ie):ie=t[15];let F;t[16]===n?F=t[17]:(F={guardrailId:n},t[16]=n,t[17]=F);let ae;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,P.jsx)(u,{className:`size-4`}),t[18]=ae):ae=t[18];let I;t[19]===F?I=t[20]:(I=(0,P.jsxs)(o,{className:ie,params:F,to:`/bedrock/list-guardrails/$guardrailId/edit`,children:[ae,`Edit`]}),t[19]=F,t[20]=I);let oe;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(oe=()=>{p(!0)},t[21]=oe):oe=t[21];let ce;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,P.jsxs)(ee,{onClick:oe,size:`sm`,variant:`destructive`,children:[(0,P.jsx)(d,{className:`size-4`}),`Delete`]}),t[22]=ce):ce=t[22];let L;t[23]!==I||t[24]!==N?(L=(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[N,I,ce]}),t[23]=I,t[24]=N,t[25]=L):L=t[25];let le=h.name??n,R;t[26]!==L||t[27]!==le?(R=(0,P.jsx)(w,{actions:L,subtitle:`Guardrail Details`,title:le}),t[26]=L,t[27]=le,t[28]=R):R=t[28];let ue;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,P.jsx)(O.Header,{children:`Guardrail Information`}),t[29]=ue):ue=t[29];let z;t[30]===h.guardrailId?z=t[31]:(z=(0,P.jsx)(k,{label:`Guardrail ID`,value:h.guardrailId}),t[30]=h.guardrailId,t[31]=z);let B;t[32]===h.guardrailArn?B=t[33]:(B=(0,P.jsx)(k,{label:`ARN`,value:h.guardrailArn}),t[32]=h.guardrailArn,t[33]=B);let V;t[34]===h.version?V=t[35]:(V=(0,P.jsx)(k,{label:`Version`,value:h.version}),t[34]=h.version,t[35]=V);let me=h.description??`-`,H;t[36]===me?H=t[37]:(H=(0,P.jsx)(k,{label:`Description`,value:me}),t[36]=me,t[37]=H);let U;t[38]===h.createdAt?U=t[39]:(U=c(h.createdAt),t[38]=h.createdAt,t[39]=U);let W;t[40]===U?W=t[41]:(W=(0,P.jsx)(k,{label:`Created`,value:U}),t[40]=U,t[41]=W);let G;t[42]===h.updatedAt?G=t[43]:(G=c(h.updatedAt),t[42]=h.updatedAt,t[43]=G);let K;t[44]===G?K=t[45]:(K=(0,P.jsx)(k,{label:`Updated`,value:G}),t[44]=G,t[45]=K);let he;t[46]===h.statusReasons?he=t[47]:(he=h.statusReasons&&h.statusReasons.length>0&&(0,P.jsx)(k,{label:`Status Reasons`,value:h.statusReasons.join(`; `)}),t[46]=h.statusReasons,t[47]=he);let q;t[48]!==z||t[49]!==B||t[50]!==V||t[51]!==H||t[52]!==W||t[53]!==K||t[54]!==he?(q=(0,P.jsxs)(O,{children:[ue,(0,P.jsxs)(O.Content,{children:[z,B,V,H,W,K,he]})]}),t[48]=z,t[49]=B,t[50]=V,t[51]=H,t[52]=W,t[53]=K,t[54]=he,t[55]=q):q=t[55];let ge;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,P.jsx)(`h2`,{className:`mb-3 font-semibold`,children:`Denied topics`}),t[56]=ge):ge=t[56];let J;t[57]===T?J=t[58]:(J=(0,P.jsxs)(`div`,{children:[ge,T.length>0?(0,P.jsx)(`div`,{className:`space-y-2`,children:T.map(pe)}):(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`No topic policy configured for this guardrail.`})]}),t[57]=T,t[58]=J);let _e;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,P.jsx)(`h2`,{className:`mb-3 font-semibold`,children:`Other policies`}),t[59]=_e):_e=t[59];let ve=(h.wordPolicy?.words?.length??0)>0||(h.wordPolicy?.managedWordLists?.length??0)>0?`configured`:`not configured`,Y;t[60]===ve?Y=t[61]:(Y=(0,P.jsxs)(`span`,{className:`rounded-full bg-muted px-2 py-1 text-xs`,children:[`Word policy:`,` `,ve]}),t[60]=ve,t[61]=Y);let ye=(h.sensitiveInformationPolicy?.piiEntities?.length??0)>0||(h.sensitiveInformationPolicy?.regexes?.length??0)>0?`configured`:`not configured`,X;t[62]===ye?X=t[63]:(X=(0,P.jsxs)(`span`,{className:`rounded-full bg-muted px-2 py-1 text-xs`,children:[`Sensitive information policy:`,` `,ye]}),t[62]=ye,t[63]=X);let Z;t[64]!==Y||t[65]!==X?(Z=(0,P.jsxs)(`div`,{children:[_e,(0,P.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[Y,X]})]}),t[64]=Y,t[65]=X,t[66]=Z):Z=t[66];let be;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,P.jsx)(`h2`,{className:`mb-3 font-semibold`,children:`Versions`}),t[67]=be):be=t[67];let xe;t[68]===C?xe=t[69]:(xe=(0,P.jsxs)(`div`,{children:[be,C.length>0?(0,P.jsx)(`div`,{className:`space-y-2`,children:C.map(fe)}):(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`No versions found for this guardrail.`})]}),t[68]=C,t[69]=xe);let Q;t[70]===n?Q=t[71]:(Q=(0,P.jsx)(de,{guardrailId:n}),t[70]=n,t[71]=Q);let Se=h.version??`DRAFT`,Ce;t[72]!==n||t[73]!==Se?(Ce=(0,P.jsx)(se,{guardrailId:n,guardrailVersion:Se}),t[72]=n,t[73]=Se,t[74]=Ce):Ce=t[74];let we;t[75]!==R||t[76]!==q||t[77]!==J||t[78]!==Z||t[79]!==xe||t[80]!==Q||t[81]!==Ce?(we=(0,P.jsxs)(`div`,{className:`space-y-6`,children:[R,q,J,Z,xe,Q,Ce]}),t[75]=R,t[76]=q,t[77]=J,t[78]=Z,t[79]=xe,t[80]=Q,t[81]=Ce,t[82]=we):we=t[82];let Te=`This tears down "${h.name??n}" and all of its versions. It cannot be undone.`,Ee;t[83]===x.error?Ee=t[84]:(Ee=x.error&&(0,P.jsx)(`span`,{className:`mt-2 block text-destructive`,children:x.error.message}),t[83]=x.error,t[84]=Ee);let De;t[85]!==Te||t[86]!==Ee?(De=(0,P.jsxs)(P.Fragment,{children:[Te,Ee]}),t[85]=Te,t[86]=Ee,t[87]=De):De=t[87];let Oe;t[88]===ne?Oe=t[89]:(Oe=()=>{ne()},t[88]=ne,t[89]=Oe);let $;t[90]!==x.isPending||t[91]!==i||t[92]!==De||t[93]!==Oe?($=(0,P.jsx)(D,{description:De,isPending:x.isPending,onConfirm:Oe,onOpenChange:p,open:i,title:`Delete Guardrail`}),t[90]=x.isPending,t[91]=i,t[92]=De,t[93]=Oe,t[94]=$):$=t[94];let ke;return t[95]!==we||t[96]!==$?(ke=(0,P.jsxs)(P.Fragment,{children:[j,we,$]}),t[95]=we,t[96]=$,t[97]=ke):ke=t[97],ke}function fe(e){return(0,P.jsx)(ue,{version:e},e.version)}function pe(e){return(0,P.jsx)(le,{topic:e},e.name)}function B(){let e=(0,M.c)(2),{guardrailId:t}=C.useParams(),n;return e[0]===t?n=e[1]:(n=(0,P.jsx)(z,{guardrailId:t}),e[0]=t,e[1]=n),n}export{B as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-LFEeWBUo.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-YWBYQFSM.js similarity index 90% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-LFEeWBUo.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-YWBYQFSM.js index 1e44c9de1..63debc2c7 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-LFEeWBUo.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_guardrailId.index-YWBYQFSM.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_guardrailId.index-DAdjyIpK.js","assets/compiler-runtime-DTT1fEHg.js","assets/useMutation-DV0DQvGm.js","assets/removable-TyvHreKc.js","assets/mutation--CHjRtbG.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/pencil-Cx6ej4Kx.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/bedrock-CysMJ0_R.js","assets/commandBuilder-BInkDaQ_.js","assets/bedrock-DIbdgKPF.js","assets/queryOptions-Dfvzj6n2.js","assets/commandBuilder-B7VWL1AO.js","assets/page-heading-M0NyqAmu.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{n as r,r as i}from"./bedrock-DIbdgKPF.js";var a=e(`/_auth/bedrock/(guardrails)/list-guardrails/$guardrailId/`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.guardrailId),staleTime:`static`}),e.queryClient.query({...i(t.guardrailId),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.guardrailId} | Guardrail | Mulga`}]}),component:t(()=>n(()=>import(`./_guardrailId.index-DAdjyIpK.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_guardrailId.index-DLTWoMPG.js","assets/compiler-runtime-DTT1fEHg.js","assets/useMutation-DV0DQvGm.js","assets/removable-TyvHreKc.js","assets/mutation--CHjRtbG.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/pencil-Cx6ej4Kx.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/bedrock-CysMJ0_R.js","assets/commandBuilder-BInkDaQ_.js","assets/bedrock-DIbdgKPF.js","assets/queryOptions-Dfvzj6n2.js","assets/commandBuilder-B7VWL1AO.js","assets/page-heading-M0NyqAmu.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{n as r,r as i}from"./bedrock-DIbdgKPF.js";var a=e(`/_auth/bedrock/(guardrails)/list-guardrails/$guardrailId/`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.guardrailId),staleTime:`static`}),e.queryClient.query({...i(t.guardrailId),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.guardrailId} | Guardrail | Mulga`}]}),component:t(()=>n(()=>import(`./_guardrailId.index-DLTWoMPG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DCKnfSun.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-4nIG286T.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DCKnfSun.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-4nIG286T.js index 60c9ff64e..73b4d54e9 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DCKnfSun.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-4nIG286T.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{t as o}from"./back-link-DjawJm5W.js";import{t as s}from"./trash-DHuPKozD.js";import{t as c}from"./button-Bae9vdts.js";import{l,v as u}from"./ec2-DJL24ekw.js";import{M as d}from"./ec2-DFivrtZe.js";import{t as f}from"./_id-mBt-oIEO.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{t as m}from"./error-banner-BcDqaPk7.js";import{t as h}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as g,t as _}from"./detail-row-CclMDqj8.js";import{t as v}from"./state-badge-BD9XGBez.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),{data:x}=r(l),S=d(),[C,w]=(0,y.useState)(!1),T=n.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)(o,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(m,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(p,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>{w(!0)},size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{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)(i,{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),t({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)(o,{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}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{t as o}from"./back-link-DjawJm5W.js";import{t as s}from"./trash-DHuPKozD.js";import{t as c}from"./button-Bae9vdts.js";import{l,v as u}from"./ec2-DJL24ekw.js";import{M as d}from"./ec2-iXujaheD.js";import{t as f}from"./_id-TLd3PJNv.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{t as m}from"./error-banner-BcDqaPk7.js";import{t as h}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as g,t as _}from"./detail-row-CclMDqj8.js";import{t as v}from"./state-badge-BiFj5bbX.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),{data:x}=r(l),S=d(),[C,w]=(0,y.useState)(!1),T=n.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)(o,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(m,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(p,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>{w(!0)},size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{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)(i,{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),t({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)(o,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BwK2aMkX.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B48v9HBU.js similarity index 96% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BwK2aMkX.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B48v9HBU.js index ca42c2b04..959ef3650 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BwK2aMkX.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B48v9HBU.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{k as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./back-link-DjawJm5W.js";import{c as s,i as c,n as l,s as u,t as d}from"./select-Bgl6IAYG.js";import{t as f}from"./trash-DHuPKozD.js";import{t as p}from"./button-Bae9vdts.js";import{l as m,t as h}from"./ec2-DJL24ekw.js";import{$ as g,U as _,r as v}from"./ec2-DFivrtZe.js";import{t as y}from"./_id-4vlHIIDd.js";import{t as b}from"./page-heading-M0NyqAmu.js";import{t as x}from"./error-banner-BcDqaPk7.js";import{t as S}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as C,t as w}from"./detail-row-CclMDqj8.js";var T=t(n()),E=e();function D(){let{id:e}=y.useParams(),t=i(),{data:n}=r(h(e)),{data:D}=r(m),O=v(),k=_(),A=g(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(!1),[F,I]=(0,T.useState)(``),L=n.Addresses?.[0],R=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],z=async()=>{try{await A.mutateAsync(e),t({to:`/ec2/describe-addresses`})}finally{M(!1)}},B=async()=>{F&&await O.mutateAsync({allocationId:e,instanceId:F})},V=async()=>{if(L?.AssociationId)try{await k.mutateAsync(L.AssociationId)}catch{}finally{P(!1)}};if(!L?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let H=!!L.AssociationId,U=a(L.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(x,{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)(b,{actions:(0,E.jsxs)(p,{disabled:H||A.isPending,onClick:()=>{M(!0)},size:`sm`,variant:`destructive`,children:[(0,E.jsx)(f,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:U?`${L.AllocationId} (${U})`:L.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:L.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:L.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:L.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:L.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:L.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:L.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:H?(0,E.jsx)(p,{disabled:k.isPending,onClick:()=>{P(!0)},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)(d,{onValueChange:e=>{I(e??``)},value:F,children:[(0,E.jsx)(u,{className:`w-full`,children:(0,E.jsx)(s,{placeholder:`Select an instance`})}),(0,E.jsx)(l,{children:R.map(e=>{let t=a(e.Tags);return(0,E.jsx)(c,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(p,{disabled:!F||O.isPending,onClick:B,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${L.AllocationId}" (${L.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:z,onOpenChange:M,open:j,title:`Release Elastic IP`}),(0,E.jsx)(S,{confirmLabel:`Disassociate`,description:`Disassociate "${L.PublicIp}" from "${L.InstanceId??L.AssociationId}"? The instance stops being reachable at this address.`,isPending:k.isPending,onConfirm:V,onOpenChange:P,open:N,pendingLabel:`Disassociating…`,title:`Disassociate Elastic IP`})]})}export{D as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{k as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./back-link-DjawJm5W.js";import{c as s,i as c,n as l,s as u,t as d}from"./select-Bgl6IAYG.js";import{t as f}from"./trash-DHuPKozD.js";import{t as p}from"./button-Bae9vdts.js";import{l as m,t as h}from"./ec2-DJL24ekw.js";import{$ as g,U as _,r as v}from"./ec2-iXujaheD.js";import{t as y}from"./_id-C4RVw0R5.js";import{t as b}from"./page-heading-M0NyqAmu.js";import{t as x}from"./error-banner-BcDqaPk7.js";import{t as S}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as C,t as w}from"./detail-row-CclMDqj8.js";var T=t(n()),E=e();function D(){let{id:e}=y.useParams(),t=i(),{data:n}=r(h(e)),{data:D}=r(m),O=v(),k=_(),A=g(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(!1),[F,I]=(0,T.useState)(``),L=n.Addresses?.[0],R=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],z=async()=>{try{await A.mutateAsync(e),t({to:`/ec2/describe-addresses`})}finally{M(!1)}},B=async()=>{F&&await O.mutateAsync({allocationId:e,instanceId:F})},V=async()=>{if(L?.AssociationId)try{await k.mutateAsync(L.AssociationId)}catch{}finally{P(!1)}};if(!L?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let H=!!L.AssociationId,U=a(L.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(x,{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)(b,{actions:(0,E.jsxs)(p,{disabled:H||A.isPending,onClick:()=>{M(!0)},size:`sm`,variant:`destructive`,children:[(0,E.jsx)(f,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:U?`${L.AllocationId} (${U})`:L.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:L.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:L.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:L.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:L.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:L.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:L.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:H?(0,E.jsx)(p,{disabled:k.isPending,onClick:()=>{P(!0)},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)(d,{onValueChange:e=>{I(e??``)},value:F,children:[(0,E.jsx)(u,{className:`w-full`,children:(0,E.jsx)(s,{placeholder:`Select an instance`})}),(0,E.jsx)(l,{children:R.map(e=>{let t=a(e.Tags);return(0,E.jsx)(c,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(p,{disabled:!F||O.isPending,onClick:B,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${L.AllocationId}" (${L.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:z,onOpenChange:M,open:j,title:`Release Elastic IP`}),(0,E.jsx)(S,{confirmLabel:`Disassociate`,description:`Disassociate "${L.PublicIp}" from "${L.InstanceId??L.AssociationId}"? The instance stops being reachable at this address.`,isPending:k.isPending,onConfirm:V,onOpenChange:P,open:N,pendingLabel:`Disassociating…`,title:`Disassociate Elastic IP`})]})}export{D as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DkieDCBQ.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B7I_2hid.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DkieDCBQ.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B7I_2hid.js index 5cb65cfef..0dd8d59ab 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DkieDCBQ.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B7I_2hid.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as ee}from"./useSuspenseQuery-C2bXkW_k.js";import{t as te}from"./link-cv-r823H.js";import{t as ne}from"./useNavigate-BiiHYpLW.js";import{E as re,j as i}from"./httpRequest-Bc1WZmsd.js";import{t as ie}from"./back-link-DjawJm5W.js";import{t as ae}from"./trash-DHuPKozD.js";import{t as oe}from"./button-Bae9vdts.js";import{a as se,d as ce,l as le}from"./rds-DnVYe-Nj.js";import{i as ue,p as de}from"./rds-BKbEDMHo.js";import{t as fe}from"./_id-CEXDg-b_.js";import{t as pe}from"./page-heading-M0NyqAmu.js";import{n as a,t as o}from"./detail-row-CclMDqj8.js";import{t as me}from"./state-badge-BD9XGBez.js";import{i as he,n as ge,r as _e,t as ve}from"./tabs-CAMCnrj7.js";import{t as ye}from"./delete-db-snapshot-dialog-CD5YShBB.js";import{t as be}from"./rds-events-panel-0IRk0Dqj.js";import{t as xe}from"./rds-tags-tab-COIsvcce.js";var Se=r(),Ce=t(n(),1),s=e();function c(e){let t=(0,Se.c)(114),{dbSnapshotIdentifier:n}=e,r=ne(),i;t[0]===n?i=t[1]:(i=ue(n),t[0]=n,t[1]=i);let{data:fe}=ee(i),c=fe.DBSnapshots?.[0],l=c?.DBSnapshotArn??``,we;t[2]===n?we=t[3]:(we=de(n),t[2]=n,t[3]=we);let{data:Te}=ee(we),[Ee,De]=(0,Ce.useState)(!1);if(!c?.DBSnapshotIdentifier){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ie,{to:`/rds/describe-db-snapshots`,children:`Back to snapshots`}),(0,s.jsx)(`p`,{className:`text-muted-foreground`,children:`DB snapshot not found.`})]}),t[4]=e):e=t[4],e}let u=c.Status,d=c.SnapshotType,Oe=d===se,f=c.DBInstanceIdentifier??``,ke;t[5]===Te.Events?ke=t[6]:(ke=Te.Events??[],t[5]=Te.Events,t[6]=ke);let Ae=ke,je;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,s.jsx)(ie,{to:`/rds/describe-db-snapshots`,children:`Back to snapshots`}),t[7]=je):je=t[7];let Me;t[8]===u?Me=t[9]:(Me=ce(u),t[8]=u,t[9]=Me);let Ne=!Me,p;t[10]!==n||t[11]!==r?(p=async()=>{await r({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}})},t[10]=n,t[11]=r,t[12]=p):p=t[12];let m;t[13]!==Ne||t[14]!==p?(m=(0,s.jsx)(oe,{disabled:Ne,onClick:p,size:`sm`,variant:`outline`,children:`Restore`}),t[13]=Ne,t[14]=p,t[15]=m):m=t[15];let h;t[16]!==d||t[17]!==u?(h=le(u,d),t[16]=d,t[17]=u,t[18]=h):h=t[18];let Pe=!h,g;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{De(!0)},t[19]=g):g=t[19];let _;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,s.jsx)(ae,{className:`size-4`}),t[20]=_):_=t[20];let v;t[21]===Pe?v=t[22]:(v=(0,s.jsxs)(oe,{disabled:Pe,onClick:g,size:`sm`,variant:`destructive`,children:[_,`Delete`]}),t[21]=Pe,t[22]=v);let y;t[23]!==v||t[24]!==m?(y=(0,s.jsxs)(`div`,{className:`flex gap-2`,children:[m,v]}),t[23]=v,t[24]=m,t[25]=y):y=t[25];let b;t[26]!==n||t[27]!==y?(b=(0,s.jsx)(pe,{actions:y,subtitle:`DB Snapshot`,title:n}),t[26]=n,t[27]=y,t[28]=b):b=t[28];let x;t[29]===u?x=t[30]:(x=(0,s.jsx)(me,{state:u}),t[29]=u,t[30]=x);let S;t[31]===Oe?S=t[32]:(S=Oe&&(0,s.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`An automated backup: it is deleted by the source instance's backup retention, not by hand.`}),t[31]=Oe,t[32]=S);let C;t[33]!==x||t[34]!==S?(C=(0,s.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,S]}),t[33]=x,t[34]=S,t[35]=C):C=t[35];let w;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,s.jsxs)(ge,{children:[(0,s.jsx)(he,{value:`overview`,children:`Overview`}),(0,s.jsx)(he,{value:`tags`,children:`Tags`}),(0,s.jsx)(he,{value:`events`,children:`Events`})]}),t[36]=w):w=t[36];let T;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,s.jsx)(a.Header,{children:`Snapshot`}),t[37]=T):T=t[37];let E;t[38]===d?E=t[39]:(E=(0,s.jsx)(o,{label:`Type`,value:d}),t[38]=d,t[39]=E);let D;t[40]===u?D=t[41]:(D=(0,s.jsx)(o,{label:`Status`,value:u}),t[40]=u,t[41]=D);let O;t[42]===c.SnapshotCreateTime?O=t[43]:(O=re(c.SnapshotCreateTime),t[42]=c.SnapshotCreateTime,t[43]=O);let k;t[44]===O?k=t[45]:(k=(0,s.jsx)(o,{label:`Created`,value:O}),t[44]=O,t[45]=k);let Fe=c.PercentProgress===void 0?void 0:`${c.PercentProgress}%`,A;t[46]===Fe?A=t[47]:(A=(0,s.jsx)(o,{label:`Progress`,value:Fe}),t[46]=Fe,t[47]=A);let j;t[48]===c.DBSnapshotArn?j=t[49]:(j=(0,s.jsx)(o,{label:`ARN`,value:c.DBSnapshotArn}),t[48]=c.DBSnapshotArn,t[49]=j);let M;t[50]!==E||t[51]!==D||t[52]!==k||t[53]!==A||t[54]!==j?(M=(0,s.jsxs)(a,{children:[T,(0,s.jsxs)(a.Content,{children:[E,D,k,A,j]})]}),t[50]=E,t[51]=D,t[52]=k,t[53]=A,t[54]=j,t[55]=M):M=t[55];let N;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,s.jsx)(a.Header,{children:`Source`}),t[56]=N):N=t[56];let P;t[57]===f?P=t[58]:(P=f===``?void 0:(0,s.jsx)(te,{className:`text-primary hover:underline`,params:{id:f},to:`/rds/describe-db-instances/$id`,children:f}),t[57]=f,t[58]=P);let F;t[59]===P?F=t[60]:(F=(0,s.jsx)(o,{label:`DB instance`,value:P}),t[59]=P,t[60]=F);let I;t[61]===c.Engine?I=t[62]:(I=(0,s.jsx)(o,{label:`Engine`,value:c.Engine}),t[61]=c.Engine,t[62]=I);let L;t[63]===c.EngineVersion?L=t[64]:(L=(0,s.jsx)(o,{label:`Version`,value:c.EngineVersion}),t[63]=c.EngineVersion,t[64]=L);let Ie=c.AllocatedStorage?`${c.AllocatedStorage} GiB`:void 0,R;t[65]===Ie?R=t[66]:(R=(0,s.jsx)(o,{label:`Allocated storage`,value:Ie}),t[65]=Ie,t[66]=R);let z;t[67]===c.StorageType?z=t[68]:(z=(0,s.jsx)(o,{label:`Storage type`,value:c.StorageType}),t[67]=c.StorageType,t[68]=z);let Le=c.Encrypted?`Encrypted — always on`:`Not encrypted`,B;t[69]===Le?B=t[70]:(B=(0,s.jsx)(o,{label:`Encryption`,value:Le}),t[69]=Le,t[70]=B);let V;t[71]===c.MasterUsername?V=t[72]:(V=(0,s.jsx)(o,{label:`Master username`,value:c.MasterUsername}),t[71]=c.MasterUsername,t[72]=V);let H;t[73]===c.Port?H=t[74]:(H=c.Port?.toString(),t[73]=c.Port,t[74]=H);let U;t[75]===H?U=t[76]:(U=(0,s.jsx)(o,{label:`Port`,value:H}),t[75]=H,t[76]=U);let W;t[77]===c.VpcId?W=t[78]:(W=(0,s.jsx)(o,{label:`VPC`,value:c.VpcId}),t[77]=c.VpcId,t[78]=W);let G;t[79]!==F||t[80]!==I||t[81]!==L||t[82]!==R||t[83]!==z||t[84]!==B||t[85]!==V||t[86]!==U||t[87]!==W?(G=(0,s.jsxs)(a,{children:[N,(0,s.jsxs)(a.Content,{children:[F,I,L,R,z,B,V,U,W]})]}),t[79]=F,t[80]=I,t[81]=L,t[82]=R,t[83]=z,t[84]=B,t[85]=V,t[86]=U,t[87]=W,t[88]=G):G=t[88];let Re;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,s.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A restore starts on this snapshot's datadir, so the engine, the master credentials and the initial database come with it and cannot be changed.`}),t[89]=Re):Re=t[89];let K;t[90]!==M||t[91]!==G?(K=(0,s.jsx)(_e,{value:`overview`,children:(0,s.jsxs)(`div`,{className:`space-y-4`,children:[M,G,Re]})}),t[90]=M,t[91]=G,t[92]=K):K=t[92];let q;t[93]===l?q=t[94]:(q=(0,s.jsx)(_e,{value:`tags`,children:(0,s.jsx)(xe,{arn:l})}),t[93]=l,t[94]=q);let J;t[95]===Ae?J=t[96]:(J=(0,s.jsx)(_e,{value:`events`,children:(0,s.jsx)(be,{events:Ae})}),t[95]=Ae,t[96]=J);let Y;t[97]!==K||t[98]!==q||t[99]!==J?(Y=(0,s.jsxs)(ve,{defaultValue:`overview`,children:[w,K,q,J]}),t[97]=K,t[98]=q,t[99]=J,t[100]=Y):Y=t[100];let X;t[101]!==b||t[102]!==C||t[103]!==Y?(X=(0,s.jsxs)(`div`,{className:`space-y-6`,children:[b,C,Y]}),t[101]=b,t[102]=C,t[103]=Y,t[104]=X):X=t[104];let Z;t[105]===r?Z=t[106]:(Z=async()=>{await r({to:`/rds/describe-db-snapshots`})},t[105]=r,t[106]=Z);let Q;t[107]!==n||t[108]!==Ee||t[109]!==Z?(Q=(0,s.jsx)(ye,{dbSnapshotIdentifier:n,onDeleted:Z,onOpenChange:De,open:Ee}),t[107]=n,t[108]=Ee,t[109]=Z,t[110]=Q):Q=t[110];let $;return t[111]!==X||t[112]!==Q?($=(0,s.jsxs)(s.Fragment,{children:[je,X,Q]}),t[111]=X,t[112]=Q,t[113]=$):$=t[113],$}function l(){let e=(0,Se.c)(4),{id:t}=fe.useParams(),n;e[0]===t?n=e[1]:(n=i(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,s.jsx)(c,{dbSnapshotIdentifier:n}),e[2]=n,e[3]=r),r}export{l as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as ee}from"./useSuspenseQuery-C2bXkW_k.js";import{t as te}from"./link-cv-r823H.js";import{t as ne}from"./useNavigate-BiiHYpLW.js";import{E as re,j as i}from"./httpRequest-Bc1WZmsd.js";import{t as ie}from"./back-link-DjawJm5W.js";import{t as ae}from"./trash-DHuPKozD.js";import{t as oe}from"./button-Bae9vdts.js";import{a as se,d as ce,l as le}from"./rds-DnVYe-Nj.js";import{i as ue,p as de}from"./rds-BKbEDMHo.js";import{t as fe}from"./_id-CmJP1sd4.js";import{t as pe}from"./page-heading-M0NyqAmu.js";import{n as a,t as o}from"./detail-row-CclMDqj8.js";import{t as me}from"./state-badge-BiFj5bbX.js";import{i as he,n as ge,r as _e,t as ve}from"./tabs-CAMCnrj7.js";import{t as ye}from"./delete-db-snapshot-dialog-CD5YShBB.js";import{t as be}from"./rds-events-panel-0IRk0Dqj.js";import{t as xe}from"./rds-tags-tab-COIsvcce.js";var Se=r(),Ce=t(n(),1),s=e();function c(e){let t=(0,Se.c)(114),{dbSnapshotIdentifier:n}=e,r=ne(),i;t[0]===n?i=t[1]:(i=ue(n),t[0]=n,t[1]=i);let{data:fe}=ee(i),c=fe.DBSnapshots?.[0],l=c?.DBSnapshotArn??``,we;t[2]===n?we=t[3]:(we=de(n),t[2]=n,t[3]=we);let{data:Te}=ee(we),[Ee,De]=(0,Ce.useState)(!1);if(!c?.DBSnapshotIdentifier){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ie,{to:`/rds/describe-db-snapshots`,children:`Back to snapshots`}),(0,s.jsx)(`p`,{className:`text-muted-foreground`,children:`DB snapshot not found.`})]}),t[4]=e):e=t[4],e}let u=c.Status,d=c.SnapshotType,Oe=d===se,f=c.DBInstanceIdentifier??``,ke;t[5]===Te.Events?ke=t[6]:(ke=Te.Events??[],t[5]=Te.Events,t[6]=ke);let Ae=ke,je;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,s.jsx)(ie,{to:`/rds/describe-db-snapshots`,children:`Back to snapshots`}),t[7]=je):je=t[7];let Me;t[8]===u?Me=t[9]:(Me=ce(u),t[8]=u,t[9]=Me);let Ne=!Me,p;t[10]!==n||t[11]!==r?(p=async()=>{await r({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}})},t[10]=n,t[11]=r,t[12]=p):p=t[12];let m;t[13]!==Ne||t[14]!==p?(m=(0,s.jsx)(oe,{disabled:Ne,onClick:p,size:`sm`,variant:`outline`,children:`Restore`}),t[13]=Ne,t[14]=p,t[15]=m):m=t[15];let h;t[16]!==d||t[17]!==u?(h=le(u,d),t[16]=d,t[17]=u,t[18]=h):h=t[18];let Pe=!h,g;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{De(!0)},t[19]=g):g=t[19];let _;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,s.jsx)(ae,{className:`size-4`}),t[20]=_):_=t[20];let v;t[21]===Pe?v=t[22]:(v=(0,s.jsxs)(oe,{disabled:Pe,onClick:g,size:`sm`,variant:`destructive`,children:[_,`Delete`]}),t[21]=Pe,t[22]=v);let y;t[23]!==v||t[24]!==m?(y=(0,s.jsxs)(`div`,{className:`flex gap-2`,children:[m,v]}),t[23]=v,t[24]=m,t[25]=y):y=t[25];let b;t[26]!==n||t[27]!==y?(b=(0,s.jsx)(pe,{actions:y,subtitle:`DB Snapshot`,title:n}),t[26]=n,t[27]=y,t[28]=b):b=t[28];let x;t[29]===u?x=t[30]:(x=(0,s.jsx)(me,{state:u}),t[29]=u,t[30]=x);let S;t[31]===Oe?S=t[32]:(S=Oe&&(0,s.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`An automated backup: it is deleted by the source instance's backup retention, not by hand.`}),t[31]=Oe,t[32]=S);let C;t[33]!==x||t[34]!==S?(C=(0,s.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,S]}),t[33]=x,t[34]=S,t[35]=C):C=t[35];let w;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,s.jsxs)(ge,{children:[(0,s.jsx)(he,{value:`overview`,children:`Overview`}),(0,s.jsx)(he,{value:`tags`,children:`Tags`}),(0,s.jsx)(he,{value:`events`,children:`Events`})]}),t[36]=w):w=t[36];let T;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,s.jsx)(a.Header,{children:`Snapshot`}),t[37]=T):T=t[37];let E;t[38]===d?E=t[39]:(E=(0,s.jsx)(o,{label:`Type`,value:d}),t[38]=d,t[39]=E);let D;t[40]===u?D=t[41]:(D=(0,s.jsx)(o,{label:`Status`,value:u}),t[40]=u,t[41]=D);let O;t[42]===c.SnapshotCreateTime?O=t[43]:(O=re(c.SnapshotCreateTime),t[42]=c.SnapshotCreateTime,t[43]=O);let k;t[44]===O?k=t[45]:(k=(0,s.jsx)(o,{label:`Created`,value:O}),t[44]=O,t[45]=k);let Fe=c.PercentProgress===void 0?void 0:`${c.PercentProgress}%`,A;t[46]===Fe?A=t[47]:(A=(0,s.jsx)(o,{label:`Progress`,value:Fe}),t[46]=Fe,t[47]=A);let j;t[48]===c.DBSnapshotArn?j=t[49]:(j=(0,s.jsx)(o,{label:`ARN`,value:c.DBSnapshotArn}),t[48]=c.DBSnapshotArn,t[49]=j);let M;t[50]!==E||t[51]!==D||t[52]!==k||t[53]!==A||t[54]!==j?(M=(0,s.jsxs)(a,{children:[T,(0,s.jsxs)(a.Content,{children:[E,D,k,A,j]})]}),t[50]=E,t[51]=D,t[52]=k,t[53]=A,t[54]=j,t[55]=M):M=t[55];let N;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,s.jsx)(a.Header,{children:`Source`}),t[56]=N):N=t[56];let P;t[57]===f?P=t[58]:(P=f===``?void 0:(0,s.jsx)(te,{className:`text-primary hover:underline`,params:{id:f},to:`/rds/describe-db-instances/$id`,children:f}),t[57]=f,t[58]=P);let F;t[59]===P?F=t[60]:(F=(0,s.jsx)(o,{label:`DB instance`,value:P}),t[59]=P,t[60]=F);let I;t[61]===c.Engine?I=t[62]:(I=(0,s.jsx)(o,{label:`Engine`,value:c.Engine}),t[61]=c.Engine,t[62]=I);let L;t[63]===c.EngineVersion?L=t[64]:(L=(0,s.jsx)(o,{label:`Version`,value:c.EngineVersion}),t[63]=c.EngineVersion,t[64]=L);let Ie=c.AllocatedStorage?`${c.AllocatedStorage} GiB`:void 0,R;t[65]===Ie?R=t[66]:(R=(0,s.jsx)(o,{label:`Allocated storage`,value:Ie}),t[65]=Ie,t[66]=R);let z;t[67]===c.StorageType?z=t[68]:(z=(0,s.jsx)(o,{label:`Storage type`,value:c.StorageType}),t[67]=c.StorageType,t[68]=z);let Le=c.Encrypted?`Encrypted — always on`:`Not encrypted`,B;t[69]===Le?B=t[70]:(B=(0,s.jsx)(o,{label:`Encryption`,value:Le}),t[69]=Le,t[70]=B);let V;t[71]===c.MasterUsername?V=t[72]:(V=(0,s.jsx)(o,{label:`Master username`,value:c.MasterUsername}),t[71]=c.MasterUsername,t[72]=V);let H;t[73]===c.Port?H=t[74]:(H=c.Port?.toString(),t[73]=c.Port,t[74]=H);let U;t[75]===H?U=t[76]:(U=(0,s.jsx)(o,{label:`Port`,value:H}),t[75]=H,t[76]=U);let W;t[77]===c.VpcId?W=t[78]:(W=(0,s.jsx)(o,{label:`VPC`,value:c.VpcId}),t[77]=c.VpcId,t[78]=W);let G;t[79]!==F||t[80]!==I||t[81]!==L||t[82]!==R||t[83]!==z||t[84]!==B||t[85]!==V||t[86]!==U||t[87]!==W?(G=(0,s.jsxs)(a,{children:[N,(0,s.jsxs)(a.Content,{children:[F,I,L,R,z,B,V,U,W]})]}),t[79]=F,t[80]=I,t[81]=L,t[82]=R,t[83]=z,t[84]=B,t[85]=V,t[86]=U,t[87]=W,t[88]=G):G=t[88];let Re;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,s.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A restore starts on this snapshot's datadir, so the engine, the master credentials and the initial database come with it and cannot be changed.`}),t[89]=Re):Re=t[89];let K;t[90]!==M||t[91]!==G?(K=(0,s.jsx)(_e,{value:`overview`,children:(0,s.jsxs)(`div`,{className:`space-y-4`,children:[M,G,Re]})}),t[90]=M,t[91]=G,t[92]=K):K=t[92];let q;t[93]===l?q=t[94]:(q=(0,s.jsx)(_e,{value:`tags`,children:(0,s.jsx)(xe,{arn:l})}),t[93]=l,t[94]=q);let J;t[95]===Ae?J=t[96]:(J=(0,s.jsx)(_e,{value:`events`,children:(0,s.jsx)(be,{events:Ae})}),t[95]=Ae,t[96]=J);let Y;t[97]!==K||t[98]!==q||t[99]!==J?(Y=(0,s.jsxs)(ve,{defaultValue:`overview`,children:[w,K,q,J]}),t[97]=K,t[98]=q,t[99]=J,t[100]=Y):Y=t[100];let X;t[101]!==b||t[102]!==C||t[103]!==Y?(X=(0,s.jsxs)(`div`,{className:`space-y-6`,children:[b,C,Y]}),t[101]=b,t[102]=C,t[103]=Y,t[104]=X):X=t[104];let Z;t[105]===r?Z=t[106]:(Z=async()=>{await r({to:`/rds/describe-db-snapshots`})},t[105]=r,t[106]=Z);let Q;t[107]!==n||t[108]!==Ee||t[109]!==Z?(Q=(0,s.jsx)(ye,{dbSnapshotIdentifier:n,onDeleted:Z,onOpenChange:De,open:Ee}),t[107]=n,t[108]=Ee,t[109]=Z,t[110]=Q):Q=t[110];let $;return t[111]!==X||t[112]!==Q?($=(0,s.jsxs)(s.Fragment,{children:[je,X,Q]}),t[111]=X,t[112]=Q,t[113]=$):$=t[113],$}function l(){let e=(0,Se.c)(4),{id:t}=fe.useParams(),n;e[0]===t?n=e[1]:(n=i(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,s.jsx)(c,{dbSnapshotIdentifier:n}),e[2]=n,e[3]=r),r}export{l as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C2vIpjOM.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BTFtkMPi.js similarity index 81% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C2vIpjOM.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BTFtkMPi.js index af68fd087..f72eb73f7 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C2vIpjOM.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BTFtkMPi.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-vsAUa_Kk.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{D as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(subnet)/describe-subnets/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.id} | Subnet | Mulga`}]}),component:t(()=>n(()=>import(`./_id-vsAUa_Kk.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{i as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BX-YPufz.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{D as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(subnet)/describe-subnets/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.id} | Subnet | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BX-YPufz.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{i as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DhXzkUJD.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BU4JPzyk.js similarity index 89% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DhXzkUJD.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BU4JPzyk.js index b8171d2dc..4ab49e521 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DhXzkUJD.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BU4JPzyk.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-DuZJk7HO.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/copy-3Ip4Zkw5.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{t as n}from"./createLucideIcon-DI_DJF-h.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{T as i,b as a}from"./ec2-DJL24ekw.js";var o={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};o.node;var s=n(o),c=e(`/_auth/ec2/(snapshots)/describe-snapshots/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:t(()=>r(()=>import(`./_id-DuZJk7HO.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])),`component`)});export{s as n,c as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BYOnZ7xS.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/copy-3Ip4Zkw5.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{t as n}from"./createLucideIcon-DI_DJF-h.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{T as i,b as a}from"./ec2-DJL24ekw.js";var o={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};o.node;var s=n(o),c=e(`/_auth/ec2/(snapshots)/describe-snapshots/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:t(()=>r(()=>import(`./_id-BYOnZ7xS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])),`component`)});export{s as n,c as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-vsAUa_Kk.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BX-YPufz.js similarity index 92% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-vsAUa_Kk.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BX-YPufz.js index c981ff489..29a9f14a7 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-vsAUa_Kk.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BX-YPufz.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{D as u}from"./ec2-DJL24ekw.js";import{L as d}from"./ec2-DFivrtZe.js";import{t as f}from"./_id-C2vIpjOM.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{t as m}from"./error-banner-BcDqaPk7.js";import{t as h}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as g,t as _}from"./detail-row-CclMDqj8.js";import{t as v}from"./state-badge-BD9XGBez.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=n.Subnets?.[0],S=d(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=o(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(m,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(p,{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)(c,{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)(i,{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}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{D as u}from"./ec2-DJL24ekw.js";import{L as d}from"./ec2-iXujaheD.js";import{t as f}from"./_id-BTFtkMPi.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{t as m}from"./error-banner-BcDqaPk7.js";import{t as h}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as g,t as _}from"./detail-row-CclMDqj8.js";import{t as v}from"./state-badge-BiFj5bbX.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=n.Subnets?.[0],S=d(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=o(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(m,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(p,{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)(c,{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)(i,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CMj6qdrO.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BXpGhYvJ.js similarity index 88% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CMj6qdrO.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BXpGhYvJ.js index 053b0040e..68e649814 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CMj6qdrO.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BXpGhYvJ.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-zM6Uwgr9.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/back-link-DjawJm5W.js","assets/camera-1Qc58YO0.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{k as r,l as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(volumes)/describe-volumes/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.id),staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-zM6Uwgr9.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-LXVvO8g4.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/back-link-DjawJm5W.js","assets/camera-1Qc58YO0.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{k as r,l as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(volumes)/describe-volumes/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.id),staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-LXVvO8g4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B8giJPUP.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BXvaEM7B.js similarity index 84% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B8giJPUP.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BXvaEM7B.js index 90b0914ac..3c84eb7e5 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B8giJPUP.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BXvaEM7B.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BG6txAje.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{f as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(key)/describe-key-pairs/$id`)({loader:async({context:e,params:t})=>await e.queryClient.query({...r(t.id),staleTime:`static`}),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??`Key Pair`} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BG6txAje.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])),`component`)});export{i as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-CXkAE0jQ.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{f as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(key)/describe-key-pairs/$id`)({loader:async({context:e,params:t})=>await e.queryClient.query({...r(t.id),staleTime:`static`}),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??`Key Pair`} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-CXkAE0jQ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])),`component`)});export{i as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DuZJk7HO.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BYOnZ7xS.js similarity index 96% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DuZJk7HO.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BYOnZ7xS.js index 47c7eb396..8a295f94b 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DuZJk7HO.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BYOnZ7xS.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{E as o,l as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./copy-3Ip4Zkw5.js";import{n as ee,t as te}from"./_id-DhXzkUJD.js";import{t as ne}from"./trash-DHuPKozD.js";import{t as u}from"./button-Bae9vdts.js";import{t as d}from"./input-CpcyJw4R.js";import{T as f,b as p}from"./ec2-DJL24ekw.js";import{I as m,Q as h,u as re}from"./ec2-DFivrtZe.js";import{t as g}from"./page-heading-M0NyqAmu.js";import{t as _}from"./error-banner-BcDqaPk7.js";import{s as v,t as y}from"./field-ChkDR_wL.js";import{t as ie}from"./textarea-BNxO_Zsf.js";import{a as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./alert-dialog-BYzNCmBp.js";import{t as O}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as k,t as A}from"./detail-row-CclMDqj8.js";import{t as j}from"./state-badge-BD9XGBez.js";var M=t(n()),N=e();function P(){let{id:e}=te.useParams(),t=a(),{data:n}=r(f(e)),{data:P}=r(p),F=n.Snapshots?.[0],I=m(),L=re(),R=h(),[z,B]=(0,M.useState)(!1),[V,H]=(0,M.useState)(!1),[U,W]=(0,M.useState)(``),[G,K]=(0,M.useState)(!1),[q,J]=(0,M.useState)(``),[Y,X]=(0,M.useState)(``),[Z,Q]=(0,M.useState)(null),ae=P.Regions?.[0]?.RegionName??s(),$=F?.State===`completed`,oe=F?.State===`completed`;function se(e){e||(J(``),X(``),Q(null)),K(e)}async function ce(){try{let t=await R.mutateAsync({snapshotId:e,name:q,description:Y||void 0});Q(t.ImageId??null),J(``),X(``)}catch{}}let le=async()=>{try{await I.mutateAsync(e),t({to:`/ec2/describe-snapshots`})}finally{B(!1)}},ue=async()=>{try{await L.mutateAsync({sourceSnapshotId:e,sourceRegion:ae,description:U||void 0}),H(!1),W(``)}catch{}};if(!F?.SnapshotId)return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,N.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let de=o(F.StartTime);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),I.error&&(0,N.jsx)(_,{error:I.error,msg:`Failed to delete snapshot`}),L.error&&(0,N.jsx)(_,{error:L.error,msg:`Failed to copy snapshot`}),R.error&&(0,N.jsx)(_,{error:R.error,msg:`Failed to register image`}),(0,N.jsxs)(`div`,{className:`space-y-6`,children:[(0,N.jsx)(g,{actions:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsxs)(u,{disabled:!$,onClick:()=>{B(!0)},size:`sm`,variant:`destructive`,children:[(0,N.jsx)(ne,{className:`size-4`}),`Delete`]}),(0,N.jsxs)(u,{disabled:!$,onClick:()=>{H(!0)},size:`sm`,variant:`outline`,children:[(0,N.jsx)(l,{className:`size-4`}),`Copy Snapshot`]}),(0,N.jsxs)(u,{disabled:!oe,onClick:()=>{K(!0)},size:`sm`,variant:`outline`,children:[(0,N.jsx)(ee,{className:`size-4`}),`Register as AMI`]}),(0,N.jsx)(j,{state:F.State})]}),subtitle:`Snapshot Details`,title:F.SnapshotId}),(0,N.jsxs)(k,{children:[(0,N.jsx)(k.Header,{children:`Snapshot Information`}),(0,N.jsxs)(k.Content,{children:[(0,N.jsx)(A,{label:`Snapshot ID`,value:F.SnapshotId}),(0,N.jsx)(A,{label:`Volume ID`,value:F.VolumeId?(0,N.jsx)(i,{className:`text-primary hover:underline`,params:{id:F.VolumeId},to:`/ec2/describe-volumes/$id`,children:F.VolumeId}):void 0}),(0,N.jsx)(A,{label:`Volume Size`,value:`${F.VolumeSize} GiB`}),(0,N.jsx)(A,{label:`State`,value:F.State}),(0,N.jsx)(A,{label:`Description`,value:F.Description}),(0,N.jsx)(A,{label:`Progress`,value:F.Progress}),(0,N.jsx)(A,{label:`Start Time`,value:de}),(0,N.jsx)(A,{label:`Owner ID`,value:F.OwnerId}),(0,N.jsx)(A,{label:`Encrypted`,value:F.Encrypted?`Yes`:`No`})]})]})]}),(0,N.jsx)(O,{description:`Are you sure you want to delete the snapshot "${F.SnapshotId}"? This action cannot be undone.`,isPending:I.isPending,onConfirm:le,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,N.jsx)(D,{onOpenChange:H,open:V,children:(0,N.jsxs)(x,{children:[(0,N.jsxs)(E,{children:[(0,N.jsx)(S,{children:`Copy Snapshot`}),(0,N.jsx)(b,{children:`Create a copy of this snapshot in the current region.`})]}),(0,N.jsxs)(y,{children:[(0,N.jsx)(v,{children:(0,N.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,N.jsx)(d,{id:`copyDescription`,onChange:e=>{W(e.target.value)},placeholder:`Description for the snapshot copy`,value:U})]}),(0,N.jsxs)(w,{children:[(0,N.jsx)(T,{children:`Cancel`}),(0,N.jsx)(C,{disabled:L.isPending,onClick:ue,children:L.isPending?`Copying…`:`Copy Snapshot`})]})]})}),(0,N.jsx)(D,{onOpenChange:se,open:G,children:(0,N.jsxs)(x,{children:[(0,N.jsxs)(E,{children:[(0,N.jsx)(S,{children:Z?`Image Registered`:`Register as AMI`}),(0,N.jsx)(b,{children:Z?(0,N.jsxs)(N.Fragment,{children:[`AMI`,` `,(0,N.jsx)(i,{className:`text-primary hover:underline`,params:{id:Z},to:`/ec2/describe-images/$id`,children:Z}),` `,`was registered successfully.`]}):`Create an AMI from snapshot "${e}".`})]}),!Z&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(y,{children:[(0,N.jsx)(v,{children:(0,N.jsx)(`label`,{htmlFor:`registerName`,children:`Name`})}),(0,N.jsx)(d,{id:`registerName`,onChange:e=>{J(e.target.value)},placeholder:`my-image`,value:q})]}),(0,N.jsxs)(y,{children:[(0,N.jsx)(v,{children:(0,N.jsx)(`label`,{htmlFor:`registerDescription`,children:`Description (optional)`})}),(0,N.jsx)(ie,{id:`registerDescription`,onChange:e=>{X(e.target.value)},placeholder:`Optional description`,rows:2,value:Y})]})]}),(0,N.jsxs)(w,{children:[(0,N.jsx)(T,{children:Z?`Close`:`Cancel`}),!Z&&(0,N.jsx)(C,{disabled:R.isPending||!q.trim(),onClick:ce,children:R.isPending?`Registering…`:`Register AMI`})]})]})})]})}export{P as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{E as o,l as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./copy-3Ip4Zkw5.js";import{n as ee,t as te}from"./_id-BU4JPzyk.js";import{t as ne}from"./trash-DHuPKozD.js";import{t as u}from"./button-Bae9vdts.js";import{t as d}from"./input-CpcyJw4R.js";import{T as f,b as p}from"./ec2-DJL24ekw.js";import{I as m,Q as h,u as re}from"./ec2-iXujaheD.js";import{t as g}from"./page-heading-M0NyqAmu.js";import{t as _}from"./error-banner-BcDqaPk7.js";import{s as v,t as y}from"./field-ChkDR_wL.js";import{t as ie}from"./textarea-BNxO_Zsf.js";import{a as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./alert-dialog-BYzNCmBp.js";import{t as O}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as k,t as A}from"./detail-row-CclMDqj8.js";import{t as j}from"./state-badge-BiFj5bbX.js";var M=t(n()),N=e();function P(){let{id:e}=te.useParams(),t=a(),{data:n}=r(f(e)),{data:P}=r(p),F=n.Snapshots?.[0],I=m(),L=re(),R=h(),[z,B]=(0,M.useState)(!1),[V,H]=(0,M.useState)(!1),[U,W]=(0,M.useState)(``),[G,K]=(0,M.useState)(!1),[q,J]=(0,M.useState)(``),[Y,X]=(0,M.useState)(``),[Z,Q]=(0,M.useState)(null),ae=P.Regions?.[0]?.RegionName??s(),$=F?.State===`completed`,oe=F?.State===`completed`;function se(e){e||(J(``),X(``),Q(null)),K(e)}async function ce(){try{let t=await R.mutateAsync({snapshotId:e,name:q,description:Y||void 0});Q(t.ImageId??null),J(``),X(``)}catch{}}let le=async()=>{try{await I.mutateAsync(e),t({to:`/ec2/describe-snapshots`})}finally{B(!1)}},ue=async()=>{try{await L.mutateAsync({sourceSnapshotId:e,sourceRegion:ae,description:U||void 0}),H(!1),W(``)}catch{}};if(!F?.SnapshotId)return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,N.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let de=o(F.StartTime);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),I.error&&(0,N.jsx)(_,{error:I.error,msg:`Failed to delete snapshot`}),L.error&&(0,N.jsx)(_,{error:L.error,msg:`Failed to copy snapshot`}),R.error&&(0,N.jsx)(_,{error:R.error,msg:`Failed to register image`}),(0,N.jsxs)(`div`,{className:`space-y-6`,children:[(0,N.jsx)(g,{actions:(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsxs)(u,{disabled:!$,onClick:()=>{B(!0)},size:`sm`,variant:`destructive`,children:[(0,N.jsx)(ne,{className:`size-4`}),`Delete`]}),(0,N.jsxs)(u,{disabled:!$,onClick:()=>{H(!0)},size:`sm`,variant:`outline`,children:[(0,N.jsx)(l,{className:`size-4`}),`Copy Snapshot`]}),(0,N.jsxs)(u,{disabled:!oe,onClick:()=>{K(!0)},size:`sm`,variant:`outline`,children:[(0,N.jsx)(ee,{className:`size-4`}),`Register as AMI`]}),(0,N.jsx)(j,{state:F.State})]}),subtitle:`Snapshot Details`,title:F.SnapshotId}),(0,N.jsxs)(k,{children:[(0,N.jsx)(k.Header,{children:`Snapshot Information`}),(0,N.jsxs)(k.Content,{children:[(0,N.jsx)(A,{label:`Snapshot ID`,value:F.SnapshotId}),(0,N.jsx)(A,{label:`Volume ID`,value:F.VolumeId?(0,N.jsx)(i,{className:`text-primary hover:underline`,params:{id:F.VolumeId},to:`/ec2/describe-volumes/$id`,children:F.VolumeId}):void 0}),(0,N.jsx)(A,{label:`Volume Size`,value:`${F.VolumeSize} GiB`}),(0,N.jsx)(A,{label:`State`,value:F.State}),(0,N.jsx)(A,{label:`Description`,value:F.Description}),(0,N.jsx)(A,{label:`Progress`,value:F.Progress}),(0,N.jsx)(A,{label:`Start Time`,value:de}),(0,N.jsx)(A,{label:`Owner ID`,value:F.OwnerId}),(0,N.jsx)(A,{label:`Encrypted`,value:F.Encrypted?`Yes`:`No`})]})]})]}),(0,N.jsx)(O,{description:`Are you sure you want to delete the snapshot "${F.SnapshotId}"? This action cannot be undone.`,isPending:I.isPending,onConfirm:le,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,N.jsx)(D,{onOpenChange:H,open:V,children:(0,N.jsxs)(x,{children:[(0,N.jsxs)(E,{children:[(0,N.jsx)(S,{children:`Copy Snapshot`}),(0,N.jsx)(b,{children:`Create a copy of this snapshot in the current region.`})]}),(0,N.jsxs)(y,{children:[(0,N.jsx)(v,{children:(0,N.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,N.jsx)(d,{id:`copyDescription`,onChange:e=>{W(e.target.value)},placeholder:`Description for the snapshot copy`,value:U})]}),(0,N.jsxs)(w,{children:[(0,N.jsx)(T,{children:`Cancel`}),(0,N.jsx)(C,{disabled:L.isPending,onClick:ue,children:L.isPending?`Copying…`:`Copy Snapshot`})]})]})}),(0,N.jsx)(D,{onOpenChange:se,open:G,children:(0,N.jsxs)(x,{children:[(0,N.jsxs)(E,{children:[(0,N.jsx)(S,{children:Z?`Image Registered`:`Register as AMI`}),(0,N.jsx)(b,{children:Z?(0,N.jsxs)(N.Fragment,{children:[`AMI`,` `,(0,N.jsx)(i,{className:`text-primary hover:underline`,params:{id:Z},to:`/ec2/describe-images/$id`,children:Z}),` `,`was registered successfully.`]}):`Create an AMI from snapshot "${e}".`})]}),!Z&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(y,{children:[(0,N.jsx)(v,{children:(0,N.jsx)(`label`,{htmlFor:`registerName`,children:`Name`})}),(0,N.jsx)(d,{id:`registerName`,onChange:e=>{J(e.target.value)},placeholder:`my-image`,value:q})]}),(0,N.jsxs)(y,{children:[(0,N.jsx)(v,{children:(0,N.jsx)(`label`,{htmlFor:`registerDescription`,children:`Description (optional)`})}),(0,N.jsx)(ie,{id:`registerDescription`,onChange:e=>{X(e.target.value)},placeholder:`Optional description`,rows:2,value:Y})]})]}),(0,N.jsxs)(w,{children:[(0,N.jsx)(T,{children:Z?`Close`:`Cancel`}),!Z&&(0,N.jsx)(C,{disabled:R.isPending||!q.trim(),onClick:ce,children:R.isPending?`Registering…`:`Register AMI`})]})]})})]})}export{P as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-D4f6m0tP.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BYVKoMTy.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-D4f6m0tP.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BYVKoMTy.js index 5e396b9d9..cdde86e53 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-D4f6m0tP.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BYVKoMTy.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./link-cv-r823H.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{E as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./createLucideIcon-DI_DJF-h.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./trash-DHuPKozD.js";import{t as m}from"./button-Bae9vdts.js";import{t as h}from"./input-CpcyJw4R.js";import{h as g,m as _}from"./ec2-DJL24ekw.js";import{A as v,Y as y,g as te,k as ne}from"./ec2-DFivrtZe.js";import{t as re}from"./_id-DbTiAtNe.js";import{t as b}from"./page-heading-M0NyqAmu.js";import{t as x}from"./badge-BYQj3YeB.js";import{i as S,t as C}from"./zod-VwMMRSfy.js";import{t as w}from"./error-banner-BcDqaPk7.js";import{s as T,t as E}from"./field-ChkDR_wL.js";import{t as D}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as O,t as k}from"./detail-row-CclMDqj8.js";import{c as ie}from"./ec2-CmqOirWQ.js";import{t as ae}from"./launch-template-data-fields-CcRkOt3t.js";var A={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};A.node;var j=o(A),M={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};M.node;var N=o(M),P=t(n()),F=e();function I(e){if(!e)return``;try{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;et.LaunchTemplateId===e),G=(o.LaunchTemplateVersions??[]).toSorted((e,t)=>(t.VersionNumber??0)-(e.VersionNumber??0)),{control:K,handleSubmit:q,register:J,getValues:Y,reset:X,formState:{errors:oe,isSubmitting:Z}}=S({resolver:C(ie),defaultValues:{versionDescription:``,...R}});if(!W?.LaunchTemplateId)return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Launch template not found.`})]});let Q=W.DefaultVersionNumber,se=e=>{if(e===`none`){X({...Y(),sourceVersion:void 0,...R});return}let t=G.find(t=>String(t.VersionNumber)===e);X({...Y(),sourceVersion:e,...L(t?.LaunchTemplateData)})},ce=async t=>{await A.mutateAsync({launchTemplateId:e,defaultVersion:String(t)})},le=async()=>{if(H!==null)try{await M.mutateAsync({launchTemplateId:e,versions:[String(H)]})}catch{}finally{U(null)}},ue=async()=>{try{await I.mutateAsync(e),t({to:`/ec2/describe-launch-templates`})}finally{V(!1)}},de=async t=>{await z.mutateAsync({...t,launchTemplateId:e}),X({versionDescription:``,sourceVersion:void 0,...R})},$=A.error??M.error;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),I.error&&(0,F.jsx)(w,{error:I.error,msg:`Failed to delete launch template`}),(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(b,{actions:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(m,{disabled:I.isPending,onClick:()=>{V(!0)},size:`sm`,variant:`destructive`,children:[(0,F.jsx)(p,{className:`size-4`}),`Delete`]}),(0,F.jsxs)(x,{variant:`secondary`,children:[`default v`,Q]})]}),subtitle:`Launch Template Details`,title:W.LaunchTemplateName??W.LaunchTemplateId}),(0,F.jsxs)(O,{children:[(0,F.jsx)(O.Header,{children:`Launch Template Information`}),(0,F.jsxs)(O.Content,{children:[(0,F.jsx)(k,{label:`Launch Template ID`,value:W.LaunchTemplateId}),(0,F.jsx)(k,{label:`Name`,value:W.LaunchTemplateName}),(0,F.jsx)(k,{label:`Default Version`,value:String(W.DefaultVersionNumber)}),(0,F.jsx)(k,{label:`Latest Version`,value:String(W.LatestVersionNumber)}),(0,F.jsx)(k,{label:`Created`,value:a(W.CreateTime)})]})]}),(0,F.jsxs)(O,{children:[(0,F.jsx)(O.Header,{children:`Versions`}),(0,F.jsxs)(`div`,{className:`space-y-4 p-4`,children:[$&&(0,F.jsx)(w,{error:$,msg:`Failed to update version`}),(0,F.jsx)(`div`,{className:`overflow-x-auto rounded-md border`,children:(0,F.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,F.jsx)(`thead`,{className:`bg-muted/50 text-left text-muted-foreground`,children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Version`}),(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Description`}),(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Default`}),(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Created`}),(0,F.jsx)(`th`,{className:`p-2`,children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,F.jsx)(`tbody`,{children:G.map(t=>{let n=t.VersionNumber,r=n===Q;return(0,F.jsxs)(`tr`,{className:`border-t`,children:[(0,F.jsx)(`td`,{className:`p-2 font-mono`,children:n}),(0,F.jsx)(`td`,{className:`p-2`,children:t.VersionDescription??`—`}),(0,F.jsx)(`td`,{className:`p-2`,children:r?(0,F.jsx)(x,{variant:`secondary`,children:`Default`}):`—`}),(0,F.jsx)(`td`,{className:`p-2`,children:a(t.CreateTime)}),(0,F.jsx)(`td`,{className:`p-2`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,F.jsx)(ee,{search:{launchTemplateId:e,launchTemplateVersion:String(n)},to:`/ec2/run-instances`,children:(0,F.jsxs)(m,{size:`sm`,variant:`ghost`,children:[(0,F.jsx)(j,{className:`size-4`}),`Launch`]})}),!r&&n!==void 0&&(0,F.jsxs)(m,{disabled:A.isPending,onClick:async()=>{await ce(n)},size:`sm`,variant:`ghost`,children:[(0,F.jsx)(N,{className:`size-4`}),`Set default`]}),(0,F.jsxs)(m,{disabled:r||M.isPending||n===void 0,onClick:()=>{n!==void 0&&U(n)},size:`sm`,variant:`ghost`,children:[(0,F.jsx)(p,{className:`size-4`}),(0,F.jsxs)(`span`,{className:`sr-only`,children:[`Delete version `,n]})]})]})})]},n)})})]})})]})]}),(0,F.jsxs)(O,{children:[(0,F.jsx)(O.Header,{children:`Create Version`}),(0,F.jsxs)(`div`,{className:`p-4`,children:[z.error&&(0,F.jsx)(w,{error:z.error,msg:`Failed to create version`}),(0,F.jsxs)(`form`,{className:`space-y-6`,onSubmit:q(de),children:[(0,F.jsxs)(E,{children:[(0,F.jsx)(T,{children:(0,F.jsx)(`label`,{htmlFor:`sourceVersion`,children:`Clone from version`})}),(0,F.jsxs)(f,{onValueChange:e=>{se(e??`none`)},value:Y(`sourceVersion`)??`none`,children:[(0,F.jsx)(d,{className:`w-full`,id:`sourceVersion`,children:(0,F.jsx)(c,{})}),(0,F.jsxs)(u,{children:[(0,F.jsx)(l,{value:`none`,children:`none (start blank)`}),G.map(e=>(0,F.jsxs)(l,{value:String(e.VersionNumber),children:[`v`,e.VersionNumber,e.VersionDescription?` — ${e.VersionDescription}`:``]},e.VersionNumber))]})]})]}),(0,F.jsxs)(E,{children:[(0,F.jsx)(T,{children:(0,F.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),(0,F.jsx)(h,{id:`versionDescription`,placeholder:`What changed in this version`,...J(`versionDescription`)})]}),(0,F.jsx)(ae,{control:K,errors:oe,register:J}),(0,F.jsx)(m,{disabled:Z||z.isPending,type:`submit`,children:Z||z.isPending?`Creating…`:`Create Version`})]})]})]})]}),(0,F.jsx)(D,{description:`Are you sure you want to delete the launch template "${W.LaunchTemplateName??W.LaunchTemplateId}"? All versions will be deleted. This action cannot be undone.`,isPending:I.isPending,onConfirm:ue,onOpenChange:V,open:B,title:`Delete Launch Template`}),(0,F.jsx)(D,{description:`Delete version ${H} of "${W.LaunchTemplateName??W.LaunchTemplateId}"? This action cannot be undone.`,isPending:M.isPending,onConfirm:le,onOpenChange:e=>{e||U(null)},open:H!==null,title:`Delete Launch Template Version`})]})}export{z as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./link-cv-r823H.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{E as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./createLucideIcon-DI_DJF-h.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./trash-DHuPKozD.js";import{t as m}from"./button-Bae9vdts.js";import{t as h}from"./input-CpcyJw4R.js";import{h as g,m as _}from"./ec2-DJL24ekw.js";import{A as v,Y as y,g as te,k as ne}from"./ec2-iXujaheD.js";import{t as re}from"./_id-BfKm8JnW.js";import{t as b}from"./page-heading-M0NyqAmu.js";import{t as x}from"./badge-BYQj3YeB.js";import{i as S,t as C}from"./zod-VwMMRSfy.js";import{t as w}from"./error-banner-BcDqaPk7.js";import{s as T,t as E}from"./field-ChkDR_wL.js";import{t as D}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as O,t as k}from"./detail-row-CclMDqj8.js";import{c as ie}from"./ec2-Cr9GrTUU.js";import{t as ae}from"./launch-template-data-fields-4CYo9au8.js";var A={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};A.node;var j=o(A),M={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};M.node;var N=o(M),P=t(n()),F=e();function I(e){if(!e)return``;try{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;et.LaunchTemplateId===e),G=(o.LaunchTemplateVersions??[]).toSorted((e,t)=>(t.VersionNumber??0)-(e.VersionNumber??0)),{control:K,handleSubmit:q,register:J,getValues:Y,reset:X,formState:{errors:oe,isSubmitting:Z}}=S({resolver:C(ie),defaultValues:{versionDescription:``,...R}});if(!W?.LaunchTemplateId)return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Launch template not found.`})]});let Q=W.DefaultVersionNumber,se=e=>{if(e===`none`){X({...Y(),sourceVersion:void 0,...R});return}let t=G.find(t=>String(t.VersionNumber)===e);X({...Y(),sourceVersion:e,...L(t?.LaunchTemplateData)})},ce=async t=>{await A.mutateAsync({launchTemplateId:e,defaultVersion:String(t)})},le=async()=>{if(H!==null)try{await M.mutateAsync({launchTemplateId:e,versions:[String(H)]})}catch{}finally{U(null)}},ue=async()=>{try{await I.mutateAsync(e),t({to:`/ec2/describe-launch-templates`})}finally{V(!1)}},de=async t=>{await z.mutateAsync({...t,launchTemplateId:e}),X({versionDescription:``,sourceVersion:void 0,...R})},$=A.error??M.error;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),I.error&&(0,F.jsx)(w,{error:I.error,msg:`Failed to delete launch template`}),(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(b,{actions:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(m,{disabled:I.isPending,onClick:()=>{V(!0)},size:`sm`,variant:`destructive`,children:[(0,F.jsx)(p,{className:`size-4`}),`Delete`]}),(0,F.jsxs)(x,{variant:`secondary`,children:[`default v`,Q]})]}),subtitle:`Launch Template Details`,title:W.LaunchTemplateName??W.LaunchTemplateId}),(0,F.jsxs)(O,{children:[(0,F.jsx)(O.Header,{children:`Launch Template Information`}),(0,F.jsxs)(O.Content,{children:[(0,F.jsx)(k,{label:`Launch Template ID`,value:W.LaunchTemplateId}),(0,F.jsx)(k,{label:`Name`,value:W.LaunchTemplateName}),(0,F.jsx)(k,{label:`Default Version`,value:String(W.DefaultVersionNumber)}),(0,F.jsx)(k,{label:`Latest Version`,value:String(W.LatestVersionNumber)}),(0,F.jsx)(k,{label:`Created`,value:a(W.CreateTime)})]})]}),(0,F.jsxs)(O,{children:[(0,F.jsx)(O.Header,{children:`Versions`}),(0,F.jsxs)(`div`,{className:`space-y-4 p-4`,children:[$&&(0,F.jsx)(w,{error:$,msg:`Failed to update version`}),(0,F.jsx)(`div`,{className:`overflow-x-auto rounded-md border`,children:(0,F.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,F.jsx)(`thead`,{className:`bg-muted/50 text-left text-muted-foreground`,children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Version`}),(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Description`}),(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Default`}),(0,F.jsx)(`th`,{className:`p-2 font-medium`,children:`Created`}),(0,F.jsx)(`th`,{className:`p-2`,children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,F.jsx)(`tbody`,{children:G.map(t=>{let n=t.VersionNumber,r=n===Q;return(0,F.jsxs)(`tr`,{className:`border-t`,children:[(0,F.jsx)(`td`,{className:`p-2 font-mono`,children:n}),(0,F.jsx)(`td`,{className:`p-2`,children:t.VersionDescription??`—`}),(0,F.jsx)(`td`,{className:`p-2`,children:r?(0,F.jsx)(x,{variant:`secondary`,children:`Default`}):`—`}),(0,F.jsx)(`td`,{className:`p-2`,children:a(t.CreateTime)}),(0,F.jsx)(`td`,{className:`p-2`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,F.jsx)(ee,{search:{launchTemplateId:e,launchTemplateVersion:String(n)},to:`/ec2/run-instances`,children:(0,F.jsxs)(m,{size:`sm`,variant:`ghost`,children:[(0,F.jsx)(j,{className:`size-4`}),`Launch`]})}),!r&&n!==void 0&&(0,F.jsxs)(m,{disabled:A.isPending,onClick:async()=>{await ce(n)},size:`sm`,variant:`ghost`,children:[(0,F.jsx)(N,{className:`size-4`}),`Set default`]}),(0,F.jsxs)(m,{disabled:r||M.isPending||n===void 0,onClick:()=>{n!==void 0&&U(n)},size:`sm`,variant:`ghost`,children:[(0,F.jsx)(p,{className:`size-4`}),(0,F.jsxs)(`span`,{className:`sr-only`,children:[`Delete version `,n]})]})]})})]},n)})})]})})]})]}),(0,F.jsxs)(O,{children:[(0,F.jsx)(O.Header,{children:`Create Version`}),(0,F.jsxs)(`div`,{className:`p-4`,children:[z.error&&(0,F.jsx)(w,{error:z.error,msg:`Failed to create version`}),(0,F.jsxs)(`form`,{className:`space-y-6`,onSubmit:q(de),children:[(0,F.jsxs)(E,{children:[(0,F.jsx)(T,{children:(0,F.jsx)(`label`,{htmlFor:`sourceVersion`,children:`Clone from version`})}),(0,F.jsxs)(f,{onValueChange:e=>{se(e??`none`)},value:Y(`sourceVersion`)??`none`,children:[(0,F.jsx)(d,{className:`w-full`,id:`sourceVersion`,children:(0,F.jsx)(c,{})}),(0,F.jsxs)(u,{children:[(0,F.jsx)(l,{value:`none`,children:`none (start blank)`}),G.map(e=>(0,F.jsxs)(l,{value:String(e.VersionNumber),children:[`v`,e.VersionNumber,e.VersionDescription?` — ${e.VersionDescription}`:``]},e.VersionNumber))]})]})]}),(0,F.jsxs)(E,{children:[(0,F.jsx)(T,{children:(0,F.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),(0,F.jsx)(h,{id:`versionDescription`,placeholder:`What changed in this version`,...J(`versionDescription`)})]}),(0,F.jsx)(ae,{control:K,errors:oe,register:J}),(0,F.jsx)(m,{disabled:Z||z.isPending,type:`submit`,children:Z||z.isPending?`Creating…`:`Create Version`})]})]})]})]}),(0,F.jsx)(D,{description:`Are you sure you want to delete the launch template "${W.LaunchTemplateName??W.LaunchTemplateId}"? All versions will be deleted. This action cannot be undone.`,isPending:I.isPending,onConfirm:ue,onOpenChange:V,open:B,title:`Delete Launch Template`}),(0,F.jsx)(D,{description:`Delete version ${H} of "${W.LaunchTemplateName??W.LaunchTemplateId}"? This action cannot be undone.`,isPending:M.isPending,onConfirm:le,onOpenChange:e=>{e||U(null)},open:H!==null,title:`Delete Launch Template Version`})]})}export{z as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DbTiAtNe.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BfKm8JnW.js similarity index 83% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DbTiAtNe.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BfKm8JnW.js index c75dcc82d..240312e6b 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DbTiAtNe.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BfKm8JnW.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-D4f6m0tP.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/back-link-DjawJm5W.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/badge-BYQj3YeB.js","assets/useRender-DyI7F-Qi.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js","assets/ec2-CmqOirWQ.js","assets/launch-template-data-fields-CcRkOt3t.js","assets/textarea-BNxO_Zsf.js","assets/collapsible-BFqxt1IG.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{O as r,c as i,h as a,m as o,o as s,p as c,w as l}from"./ec2-DJL24ekw.js";var u=e(`/_auth/ec2/(launch-templates)/describe-launch-templates/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...o(t.id),staleTime:`static`}),e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`}),e.queryClient.query({...c,staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`}),e.queryClient.query({...l,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Launch Template | Mulga`}]}),component:t(()=>n(()=>import(`./_id-D4f6m0tP.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])),`component`)});export{u as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BYVKoMTy.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/back-link-DjawJm5W.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/badge-BYQj3YeB.js","assets/useRender-DyI7F-Qi.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js","assets/ec2-Cr9GrTUU.js","assets/elbv2-B_G5anft.js","assets/launch-template-data-fields-4CYo9au8.js","assets/textarea-BNxO_Zsf.js","assets/collapsible-BFqxt1IG.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{O as r,c as i,h as a,m as o,o as s,p as c,w as l}from"./ec2-DJL24ekw.js";var u=e(`/_auth/ec2/(launch-templates)/describe-launch-templates/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...o(t.id),staleTime:`static`}),e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`}),e.queryClient.query({...c,staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`}),e.queryClient.query({...l,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Launch Template | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BYVKoMTy.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50])),`component`)});export{u as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B_mVxzMX.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BgOMx6S7.js similarity index 99% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B_mVxzMX.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BgOMx6S7.js index d606a3edb..2e9f94173 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-B_mVxzMX.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BgOMx6S7.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{E as s,O as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./createLucideIcon-DI_DJF-h.js";import{t as u}from"./back-link-DjawJm5W.js";import{t as d}from"./check-DKS02ExQ.js";import{c as f,i as p,n as m,s as h,t as g}from"./select-Bgl6IAYG.js";import{t as _}from"./copy-3Ip4Zkw5.js";import{t as v}from"./network-DNraRZY6.js";import{t as y}from"./rotate-cw-BEktaUIR.js";import{t as b}from"./trash-DHuPKozD.js";import{t as x}from"./triangle-alert-Jc46kC7J.js";import{t as S}from"./button-Bae9vdts.js";import{t as C}from"./input-CpcyJw4R.js";import{a as w,c as T,i as E,s as D}from"./ec2-DJL24ekw.js";import{J as O,K as k,W as A,Z as j,d as M,i as N,it as P,nt as ee,rt as F}from"./ec2-DFivrtZe.js";import{f as I}from"./iam-Fo1DnIKB.js";import{o as te}from"./admin-B1g5ktL3.js";import{t as ne}from"./use-admin--3prNhUW.js";import{t as re}from"./_id-DY6kdRSk.js";import{t as ie}from"./page-heading-M0NyqAmu.js";import{t as L}from"./error-banner-BcDqaPk7.js";import{s as ae,t as oe}from"./field-ChkDR_wL.js";import{t as se}from"./textarea-BNxO_Zsf.js";import{a as ce,i as le,l as ue,n as de,o as fe,r as pe,s as me,t as he}from"./alert-dialog-BYzNCmBp.js";import{t as ge}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as R,t as z}from"./detail-row-CclMDqj8.js";import{t as _e}from"./state-badge-BD9XGBez.js";import{t as B}from"./use-copy-to-clipboard-Bscc1MgN.js";import{t as ve}from"./ami-details-COgMA7Qb.js";import{t as ye}from"./gpu-instance-type-select-Dr56r-me.js";var V={name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};V.node;var be=l(V),xe={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};xe.node;var Se=l(xe),Ce={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};Ce.node;var we=l(Ce),Te={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Te.node;var H=l(Te),U={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};U.node;var Ee=l(U),W={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};W.node;var De=l(W),G=r(),K=t(n(),1),q=e();function Oe(e){let t=(0,G.c)(36),{instanceId:n,open:r,onOpenChange:i}=e,a=M(),[o,s]=(0,K.useState)(``),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(null),f;t[0]===i?f=t[1]:(f=function(e){e||(s(``),l(``),d(null)),i(e)},t[0]=i,t[1]=f);let p=f,m;t[2]!==a||t[3]!==c||t[4]!==o||t[5]!==n?(m=async function(){try{let e=await a.mutateAsync({instanceId:n,name:o,description:c||void 0});d(e.ImageId??null),s(``),l(``)}catch{}},t[2]=a,t[3]=c,t[4]=o,t[5]=n,t[6]=m):m=t[6];let h=m,g=u?`Image Created`:`Create Image (AMI)`,_;t[7]===g?_=t[8]:(_=(0,q.jsx)(ue,{children:g}),t[7]=g,t[8]=_);let v=u?`Image "${u}" was created successfully.`:`Create an AMI from instance "${n}".`,y;t[9]===v?y=t[10]:(y=(0,q.jsx)(ce,{children:v}),t[9]=v,t[10]=y);let b;t[11]!==_||t[12]!==y?(b=(0,q.jsxs)(me,{children:[_,y]}),t[11]=_,t[12]=y,t[13]=b):b=t[13];let x;t[14]!==u||t[15]!==c||t[16]!==o?(x=!u&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(oe,{children:[(0,q.jsx)(ae,{children:(0,q.jsx)(`label`,{htmlFor:`imageName`,children:`Name`})}),(0,q.jsx)(C,{id:`imageName`,onChange:e=>{s(e.target.value)},placeholder:`my-image`,value:o})]}),(0,q.jsxs)(oe,{children:[(0,q.jsx)(ae,{children:(0,q.jsx)(`label`,{htmlFor:`imageDescription`,children:`Description`})}),(0,q.jsx)(se,{id:`imageDescription`,onChange:e=>{l(e.target.value)},placeholder:`Optional description`,rows:2,value:c})]})]}),t[14]=u,t[15]=c,t[16]=o,t[17]=x):x=t[17];let S=u?`Close`:`Cancel`,w;t[18]===S?w=t[19]:(w=(0,q.jsx)(pe,{children:S}),t[18]=S,t[19]=w);let T;t[20]!==a||t[21]!==u||t[22]!==h||t[23]!==o?(T=!u&&(0,q.jsx)(de,{disabled:a.isPending||!o.trim(),onClick:h,children:a.isPending?`Creating…`:`Create Image`}),t[20]=a,t[21]=u,t[22]=h,t[23]=o,t[24]=T):T=t[24];let E;t[25]!==w||t[26]!==T?(E=(0,q.jsxs)(fe,{children:[w,T]}),t[25]=w,t[26]=T,t[27]=E):E=t[27];let D;t[28]!==E||t[29]!==b||t[30]!==x?(D=(0,q.jsxs)(le,{children:[b,x,E]}),t[28]=E,t[29]=b,t[30]=x,t[31]=D):D=t[31];let O;return t[32]!==p||t[33]!==r||t[34]!==D?(O=(0,q.jsx)(he,{onOpenChange:p,open:r,children:D}),t[32]=p,t[33]=r,t[34]=D,t[35]=O):O=t[35],O}function ke(e){let t=(0,G.c)(9),{gpus:n}=e;if(!n?.length)return null;let r=n.length===1?`GPU`:`GPUs (${n.length})`,i;t[0]===r?i=t[1]:(i=(0,q.jsx)(R.Header,{children:r}),t[0]=r,t[1]=i);let a;if(t[2]!==n){let e;t[4]===n.length?e=t[5]:(e=(e,t)=>(0,q.jsxs)(`div`,{className:`border-b last:border-b-0`,children:[n.length>1&&(0,q.jsxs)(`h3`,{className:`bg-muted/30 px-4 py-2 text-sm font-medium`,children:[`GPU `,t+1]}),(0,q.jsxs)(R.Content,{children:[(0,q.jsx)(z,{label:`Model`,value:e.model}),(0,q.jsx)(z,{label:`VRAM`,value:c(e.vram_mib)}),(0,q.jsx)(z,{label:`Attachment`,value:e.profile?`MIG slice`:`PCIe passthrough`}),e.profile&&(0,q.jsx)(z,{label:`Profile`,value:e.profile}),e.mdev_path&&(0,q.jsx)(z,{label:`Mdev path`,value:e.mdev_path}),e.pci_address&&(0,q.jsx)(z,{label:`PCI address`,value:e.pci_address})]})]},e.mdev_path??e.pci_address??`${e.model}-${t}`),t[4]=n.length,t[5]=e),a=n.map(e),t[2]=n,t[3]=a}else a=t[3];let o;return t[6]!==i||t[7]!==a?(o=(0,q.jsxs)(R,{children:[i,a]}),t[6]=i,t[7]=a,t[8]=o):o=t[8],o}function Ae(e){let t=(0,G.c)(31),{instanceId:n}=e,r;t[0]===n?r=t[1]:(r=E(n),t[0]=n,t[1]=r);let{data:a}=i(r),{data:s}=i(I),c=N(),l=A(),[u,d]=(0,K.useState)(``),p;t[2]===a?.IamInstanceProfileAssociations?p=t[3]:(p=a?.IamInstanceProfileAssociations?.find(Y),t[2]=a?.IamInstanceProfileAssociations,t[3]=p);let _=p,v;t[4]===s?.InstanceProfiles?v=t[5]:(v=s?.InstanceProfiles??[],t[4]=s?.InstanceProfiles,t[5]=v);let y=v,b;t[6]!==c||t[7]!==n||t[8]!==u?(b=async()=>{u&&(await c.mutateAsync({instanceId:n,instanceProfileName:u}),d(``))},t[6]=c,t[7]=n,t[8]=u,t[9]=b):b=t[9];let x=b,C;t[10]!==_||t[11]!==l||t[12]!==n?(C=async()=>{_?.AssociationId&&await l.mutateAsync({associationId:_.AssociationId,instanceId:n})},t[10]=_,t[11]=l,t[12]=n,t[13]=C):C=t[13];let w=C,T;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,q.jsx)(R.Header,{children:`IAM Role`}),t[14]=T):T=t[14];let D;t[15]===c.error?D=t[16]:(D=c.error&&(0,q.jsx)(`div`,{className:`col-span-2`,children:(0,q.jsx)(L,{error:c.error,msg:`Failed to associate instance profile`})}),t[15]=c.error,t[16]=D);let O;t[17]===l.error?O=t[18]:(O=l.error&&(0,q.jsx)(`div`,{className:`col-span-2`,children:(0,q.jsx)(L,{error:l.error,msg:`Failed to disassociate instance profile`})}),t[17]=l.error,t[18]=O);let k;t[19]!==c.isPending||t[20]!==_||t[21]!==l.isPending||t[22]!==x||t[23]!==w||t[24]!==y||t[25]!==u?(k=_?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(z,{label:`Instance Profile ARN`,value:_.IamInstanceProfile?.Arn}),(0,q.jsx)(z,{label:`State`,value:(0,q.jsx)(_e,{state:_.State})}),(0,q.jsx)(`div`,{className:`col-span-2 flex justify-end`,children:(0,q.jsx)(S,{disabled:l.isPending,onClick:w,size:`sm`,variant:`destructive`,children:l.isPending?`Detaching…`:`Detach`})})]}):(0,q.jsxs)(`div`,{className:`col-span-2 space-y-3`,children:[(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No instance profile is associated. Associate one to flow role credentials to this instance via IMDS.`}),y.length>0?(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsxs)(g,{onValueChange:e=>{d(e??``)},value:u,children:[(0,q.jsx)(h,{className:`w-full`,children:(0,q.jsx)(f,{placeholder:`Select an instance profile`})}),(0,q.jsx)(m,{children:y.map(J)})]}),(0,q.jsx)(S,{disabled:!u||c.isPending,onClick:x,size:`sm`,children:c.isPending?`Associating…`:`Associate`})]}):(0,q.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No instance profiles exist.`,` `,(0,q.jsx)(o,{className:`text-primary hover:underline`,to:`/iam/create-instance-profile`,children:`Create one`}),` `,`first.`]})]}),t[19]=c.isPending,t[20]=_,t[21]=l.isPending,t[22]=x,t[23]=w,t[24]=y,t[25]=u,t[26]=k):k=t[26];let j;return t[27]!==D||t[28]!==O||t[29]!==k?(j=(0,q.jsxs)(R,{children:[T,(0,q.jsxs)(R.Content,{children:[D,O,k]})]}),t[27]=D,t[28]=O,t[29]=k,t[30]=j):j=t[30],j}function J(e){return(0,q.jsx)(p,{value:e.InstanceProfileName??``,children:e.InstanceProfileName},e.InstanceProfileName)}function Y(e){return e.State===`associating`||e.State===`associated`}var je=new Set([`pending`,`stopping`,`shutting-down`,`terminated`]);function Me(e){let t=(0,G.c)(43),{instanceId:n,state:r}=e,i=ee(),a=F(),o=j(),s=P(),[c,l]=(0,K.useState)(!1),u=je.has(r??``),d;t[0]!==n||t[1]!==s?(d=()=>{s.mutate(n,{onSettled:()=>{l(!1)}})},t[0]=n,t[1]=s,t[2]=d):d=t[2];let f=d;if(u&&r!==`terminated`){let e;return t[3]===r?e=t[4]:(e=(0,q.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,q.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Instance is `,r,`. Actions will be available once the operation completes.`]})}),t[3]=r,t[4]=e),e}if(r===`terminated`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,q.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`This instance has been terminated and cannot be managed.`})}),t[5]=e):e=t[5],e}let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Instance Actions`}),t[6]=p):p=t[6];let m;t[7]===i.error?m=t[8]:(m=i.error&&(0,q.jsx)(L,{error:i.error,msg:`Failed to start instance`}),t[7]=i.error,t[8]=m);let h;t[9]===a.error?h=t[10]:(h=a.error&&(0,q.jsx)(L,{error:a.error,msg:`Failed to stop instance`}),t[9]=a.error,t[10]=h);let g;t[11]===o.error?g=t[12]:(g=o.error&&(0,q.jsx)(L,{error:o.error,msg:`Failed to reboot instance`}),t[11]=o.error,t[12]=g);let _;t[13]===s.error?_=t[14]:(_=s.error&&(0,q.jsx)(L,{error:s.error,msg:`Failed to terminate instance`}),t[13]=s.error,t[14]=_);let v;t[15]!==n||t[16]!==i||t[17]!==r?(v=r===`stopped`&&(0,q.jsxs)(S,{disabled:i.isPending,onClick:()=>{i.mutate(n)},size:`sm`,variant:`default`,children:[(0,q.jsx)(H,{className:`size-4`}),i.isPending?`Starting`:`Start`]}),t[15]=n,t[16]=i,t[17]=r,t[18]=v):v=t[18];let x;t[19]!==n||t[20]!==o||t[21]!==r||t[22]!==a?(x=r===`running`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(S,{disabled:a.isPending,onClick:()=>{a.mutate(n)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(we,{className:`size-4`}),a.isPending?`Stopping`:`Stop`]}),(0,q.jsxs)(S,{disabled:o.isPending,onClick:()=>{o.mutate(n)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(y,{className:`size-4`}),o.isPending?`Rebooting`:`Reboot`]})]}),t[19]=n,t[20]=o,t[21]=r,t[22]=a,t[23]=x):x=t[23];let C;t[24]!==r||t[25]!==s.isPending?(C=(r===`stopped`||r===`running`)&&(0,q.jsxs)(S,{disabled:s.isPending,onClick:()=>{l(!0)},size:`sm`,variant:`destructive`,children:[(0,q.jsx)(b,{className:`size-4`}),s.isPending?`Terminating`:`Terminate`]}),t[24]=r,t[25]=s.isPending,t[26]=C):C=t[26];let w;t[27]!==v||t[28]!==x||t[29]!==C?(w=(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[v,x,C]}),t[27]=v,t[28]=x,t[29]=C,t[30]=w):w=t[30];let T=`Are you sure you want to terminate the instance "${n}"? This action cannot be undone.`,E;t[31]!==f||t[32]!==c||t[33]!==T||t[34]!==s.isPending?(E=(0,q.jsx)(ge,{confirmLabel:`Terminate`,description:T,isPending:s.isPending,onConfirm:f,onOpenChange:l,open:c,pendingLabel:`Terminating…`,title:`Terminate Instance`}),t[31]=f,t[32]=c,t[33]=T,t[34]=s.isPending,t[35]=E):E=t[35];let D;return t[36]!==w||t[37]!==E||t[38]!==m||t[39]!==h||t[40]!==g||t[41]!==_?(D=(0,q.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[p,m,h,g,_,w,E]}),t[36]=w,t[37]=E,t[38]=m,t[39]=h,t[40]=g,t[41]=_,t[42]=D):D=t[42],D}var X=[[`amazonlinux`,`ec2-user`],[`almalinux`,`almalinux`],[`oracle`,`cloud-user`],[`ubuntu`,`ubuntu`],[`debian`,`debian`],[`fedora`,`fedora`],[`centos`,`cloud-user`],[`alpine`,`alpine`],[`rocky`,`rocky`],[`amzn`,`ec2-user`],[`rhel`,`cloud-user`]];function Z(e){let t=new Set(`${e?.Name??``} ${e?.Description??``}`.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)),n=X.find(([e])=>t.has(e));return n?{user:n[1],distro:n[0]}:{user:``}}function Q(e){return e?.PublicIpAddress?{address:e.PublicIpAddress,reachability:`public`}:e?.PrivateIpAddress?{address:e.PrivateIpAddress,reachability:`private`}:{address:``,reachability:`none`}}var Ne=`path/to/key.pem`;function Pe(e){return`ssh -i ${e.keyName?`path/to/${e.keyName}.pem`:Ne} ${e.user||``}@${e.address}`}function Fe(e){let t=(0,G.c)(49),{instance:n,image:r}=e,{copied:i,copy:a}=B(),o,s,c,l,u,f;if(t[0]!==r||t[1]!==n){u=Symbol.for(`react.early_return_sentinel`);bb0:{if({address:o,reachability:c}=Q(n),{user:f,distro:s}=Z(r),c===`none`){u=null;break bb0}l=Pe({keyName:n.KeyName,user:f,address:o})}t[0]=r,t[1]=n,t[2]=o,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=f}else o=t[2],s=t[3],c=t[4],l=t[5],u=t[6],f=t[7];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let p=l,m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,q.jsx)(R.Header,{children:`Connect over SSH`}),t[8]=m):m=t[8];let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,q.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),t[9]=h):h=t[9];let g;t[10]===p?g=t[11]:(g=(0,q.jsx)(`span`,{className:`flex-1 overflow-x-auto whitespace-nowrap text-foreground`,children:p}),t[10]=p,t[11]=g);let y;t[12]!==p||t[13]!==a?(y=()=>{a(p)},t[12]=p,t[13]=a,t[14]=y):y=t[14];let b;t[15]===i?b=t[16]:(b=i?(0,q.jsx)(d,{className:`size-3.5 text-tactical-green`}):(0,q.jsx)(_,{className:`size-3.5`}),t[15]=i,t[16]=b);let S;t[17]!==y||t[18]!==b?(S=(0,q.jsx)(`button`,{"aria-label":`Copy SSH command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:y,type:`button`,children:b}),t[17]=y,t[18]=b,t[19]=S):S=t[19];let C;t[20]!==g||t[21]!==S?(C=(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[h,g,S]}),t[20]=g,t[21]=S,t[22]=C):C=t[22];let w;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Login user`}),t[23]=w):w=t[23];let T=f||`unknown — check the AMI`,E;t[24]===T?E=t[25]:(E=(0,q.jsxs)(`div`,{children:[w,(0,q.jsx)(`dd`,{className:`font-mono text-foreground`,children:T})]}),t[24]=T,t[25]=E);let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Address`}),t[26]=D):D=t[26];let O;t[27]===o?O=t[28]:(O=(0,q.jsxs)(`div`,{children:[D,(0,q.jsx)(`dd`,{className:`font-mono text-foreground`,children:o})]}),t[27]=o,t[28]=O);let k;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Key pair`}),t[29]=k):k=t[29];let A=n.KeyName??`none assigned`,j;t[30]===A?j=t[31]:(j=(0,q.jsxs)(`div`,{children:[k,(0,q.jsx)(`dd`,{className:`font-mono text-foreground`,children:A})]}),t[30]=A,t[31]=j);let M;t[32]!==E||t[33]!==O||t[34]!==j?(M=(0,q.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-2 text-xs sm:grid-cols-3`,children:[E,O,j]}),t[32]=E,t[33]=O,t[34]=j,t[35]=M):M=t[35];let N;t[36]!==o||t[37]!==c?(N=c===`private`&&(0,q.jsxs)($,{tone:`amber`,icon:v,children:[`This instance has no public IP address, so`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:o}),` is reachable only from inside the VPC. Run the command from another instance in the same VPC whose security group allows it, or associate an Elastic IP with this one.`]}),t[36]=o,t[37]=c,t[38]=N):N=t[38];let P;t[39]!==s||t[40]!==f?(P=f?(0,q.jsxs)($,{tone:`muted`,icon:Se,children:[(0,q.jsx)(`span`,{className:`font-mono`,children:f}),` is the default login user for `,s,` images. It comes from the AMI itself — Spinifex does not create or rename the account — so an image built with a different default will want a different name here.`]}):(0,q.jsxs)($,{tone:`amber`,icon:x,children:[`The login user could not be determined from this AMI. Every distribution ships its own default —`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`ubuntu`}),`,`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`debian`}),`,`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`cloud-user`}),` on Oracle Linux and RHEL — so check the image's documentation before connecting.`]}),t[39]=s,t[40]=f,t[41]=P):P=t[41];let ee;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,q.jsx)(`em`,{children:`you`}),t[42]=ee):ee=t[42];let F;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Spinifex stores only the public half of a key pair, so the path above is where `,ee,` saved the private key when you created it. It must be readable only by you (`,(0,q.jsx)(`span`,{className:`font-mono`,children:`chmod 600`}),`), and the instance's security group must allow TCP 22 from wherever you are connecting.`]}),t[43]=F):F=t[43];let I;return t[44]!==M||t[45]!==N||t[46]!==P||t[47]!==C?(I=(0,q.jsxs)(R,{children:[m,(0,q.jsxs)(`div`,{className:`space-y-4 p-4`,children:[C,M,N,P,F]})]}),t[44]=M,t[45]=N,t[46]=P,t[47]=C,t[48]=I):I=t[48],I}var Ie={amber:`border-tactical-amber/40 bg-tactical-amber/5 text-tactical-amber`,muted:`border-border bg-muted/40 text-muted-foreground`};function $(e){let t=(0,G.c)(8),{tone:n,icon:r,children:i}=e,a=`flex items-start gap-2 rounded-md border p-3 ${Ie[n]}`,o;t[0]===r?o=t[1]:(o=(0,q.jsx)(r,{className:`mt-0.5 size-3.5 shrink-0`}),t[0]=r,t[1]=o);let s;t[2]===i?s=t[3]:(s=(0,q.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:i}),t[2]=i,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,q.jsxs)(`div`,{className:a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function Le(){let e=(0,G.c)(141),{id:t}=re.useParams(),{isAdmin:n}=ne(),r;e[0]===t?r=e[1]:(r=D(t),e[0]=t,e[1]=r);let{data:c}=a(r),l=c.Reservations?.[0]?.Instances?.[0],d=l?.ImageId,f;e[2]===d?f=e[3]:(f=w(d),e[2]=d,e[3]=f);let{data:p}=a(f),m=p?.Images?.[0],{data:h}=a(T),g;e[4]===n?g=e[5]:(g={...te,enabled:n,refetchInterval:5e3},e[4]=n,e[5]=g);let{data:_}=i(g),v;e[6]!==t||e[7]!==_?.vms?(v=_?.vms?.find(e=>e.instance_id===t),e[6]=t,e[7]=_?.vms,e[8]=v):v=e[8];let y=v,b=O(),x=k(),[C,E]=(0,K.useState)(!1),[A,j]=(0,K.useState)(``),[M,N]=(0,K.useState)(!1),[P,ee]=(0,K.useState)(null),[F,I]=(0,K.useState)(!1);if(!l?.InstanceId){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,q.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance not found.`})]}),e[9]=t):t=e[9],t}let se;e[10]===l.LaunchTime?se=e[11]:(se=s(l.LaunchTime),e[10]=l.LaunchTime,e[11]=se);let ge=se,B=l.State?.Name===`running`,V=l.State?.Name===`stopped`,xe;e[12]!==t||e[13]!==b||e[14]!==A?(xe=async function(){try{await b.mutateAsync({instanceId:t,instanceType:A}),E(!1),j(``)}catch{}},e[12]=t,e[13]=b,e[14]=A,e[15]=xe):xe=e[15];let Se=xe,Ce;e[16]!==x||e[17]!==t?(Ce=async function(){try{let e=await x.mutateAsync(t),n=e.Output?atob(e.Output):`(no output)`;ee(n),N(!0)}catch{}},e[16]=x,e[17]=t,e[18]=Ce):Ce=e[18];let we=Ce,Te;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,q.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),e[19]=Te):Te=e[19];let H;e[20]===b.error?H=e[21]:(H=b.error&&(0,q.jsx)(L,{error:b.error,msg:`Failed to modify instance`}),e[20]=b.error,e[21]=H);let U;e[22]===x.error?U=e[23]:(U=x.error&&(0,q.jsx)(L,{error:x.error,msg:`Failed to get console output`}),e[22]=x.error,e[23]=U);let W;e[24]!==x.isPending||e[25]!==we||e[26]!==B?(W=B&&(0,q.jsxs)(S,{disabled:x.isPending,onClick:we,size:`sm`,variant:`outline`,children:[(0,q.jsx)(De,{className:`size-4`}),x.isPending?`Fetching…`:`View Console`]}),e[24]=x.isPending,e[25]=we,e[26]=B,e[27]=W):W=e[27];let J;e[28]!==B||e[29]!==V?(J=(B||V)&&(0,q.jsxs)(S,{onClick:()=>{I(!0)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(be,{className:`size-4`}),`Create Image`]}),e[28]=B,e[29]=V,e[30]=J):J=e[30];let Y;e[31]!==l.InstanceType||e[32]!==V?(Y=V&&(0,q.jsxs)(S,{onClick:()=>{j(l.InstanceType??``),E(!0)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(Ee,{className:`size-4`}),`Modify Instance`]}),e[31]=l.InstanceType,e[32]=V,e[33]=Y):Y=e[33];let je=l.State?.Name,X;e[34]===je?X=e[35]:(X=(0,q.jsx)(_e,{state:je}),e[34]=je,e[35]=X);let Z;e[36]!==W||e[37]!==J||e[38]!==Y||e[39]!==X?(Z=(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[W,J,Y,X]}),e[36]=W,e[37]=J,e[38]=Y,e[39]=X,e[40]=Z):Z=e[40];let Q;e[41]!==l.InstanceId||e[42]!==Z?(Q=(0,q.jsx)(ie,{actions:Z,subtitle:`Instance Details`,title:l.InstanceId}),e[41]=l.InstanceId,e[42]=Z,e[43]=Q):Q=e[43];let Ne=l.State?.Name,Pe;e[44]!==l.InstanceId||e[45]!==Ne?(Pe=(0,q.jsx)(Me,{instanceId:l.InstanceId,state:Ne}),e[44]=l.InstanceId,e[45]=Ne,e[46]=Pe):Pe=e[46];let Ie;e[47]!==m||e[48]!==l||e[49]!==B?(Ie=B&&(0,q.jsx)(Fe,{image:m,instance:l}),e[47]=m,e[48]=l,e[49]=B,e[50]=Ie):Ie=e[50];let $;e[51]!==P||e[52]!==M?($=M&&P!==null&&(0,q.jsxs)(R,{children:[(0,q.jsx)(R.Header,{children:(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[`Console Output`,(0,q.jsx)(S,{onClick:()=>{N(!1),ee(null)},size:`sm`,variant:`ghost`,children:`Hide`})]})}),(0,q.jsx)(`div`,{className:`p-4`,children:(0,q.jsx)(`pre`,{className:`max-h-96 overflow-y-auto rounded bg-muted p-3 font-mono text-xs whitespace-pre-wrap`,children:P})})]}),e[51]=P,e[52]=M,e[53]=$):$=e[53];let Le;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,q.jsx)(R.Header,{children:`Instance Information`}),e[54]=Le):Le=e[54];let Be;e[55]===l.InstanceId?Be=e[56]:(Be=(0,q.jsx)(z,{label:`Instance ID`,value:l.InstanceId}),e[55]=l.InstanceId,e[56]=Be);let Ve;e[57]===l.InstanceType?Ve=e[58]:(Ve=(0,q.jsx)(z,{label:`Instance Type`,value:l.InstanceType}),e[57]=l.InstanceType,e[58]=Ve);let He=l.State?.Name,Ue;e[59]===He?Ue=e[60]:(Ue=(0,q.jsx)(z,{label:`Instance State`,value:He}),e[59]=He,e[60]=Ue);let We;e[61]===l.State?.Code?We=e[62]:(We=l.State?.Code?.toString(),e[61]=l.State?.Code,e[62]=We);let Ge;e[63]===We?Ge=e[64]:(Ge=(0,q.jsx)(z,{label:`State Code`,value:We}),e[63]=We,e[64]=Ge);let Ke;e[65]===ge?Ke=e[66]:(Ke=(0,q.jsx)(z,{label:`Launch Time`,value:ge}),e[65]=ge,e[66]=Ke);let qe=l.Placement?.AvailabilityZone,Je;e[67]===qe?Je=e[68]:(Je=(0,q.jsx)(z,{label:`Availability Zone`,value:qe}),e[67]=qe,e[68]=Je);let Ye;e[69]===l.Placement?Ye=e[70]:(Ye=l.Placement?.GroupName?(0,q.jsx)(o,{className:`text-primary hover:underline`,to:`/ec2/describe-placement-groups`,children:l.Placement.GroupName}):void 0,e[69]=l.Placement,e[70]=Ye);let Xe;e[71]===Ye?Xe=e[72]:(Xe=(0,q.jsx)(z,{label:`Placement Group`,value:Ye}),e[71]=Ye,e[72]=Xe);let Ze;e[73]!==Be||e[74]!==Ve||e[75]!==Ue||e[76]!==Ge||e[77]!==Ke||e[78]!==Je||e[79]!==Xe?(Ze=(0,q.jsxs)(R,{children:[Le,(0,q.jsxs)(R.Content,{children:[Be,Ve,Ue,Ge,Ke,Je,Xe]})]}),e[73]=Be,e[74]=Ve,e[75]=Ue,e[76]=Ge,e[77]=Ke,e[78]=Je,e[79]=Xe,e[80]=Ze):Ze=e[80];let Qe;e[81]!==l.KeyName||e[82]!==l.PrivateDnsName||e[83]!==l.PrivateIpAddress||e[84]!==l.PublicDnsName||e[85]!==l.PublicIpAddress||e[86]!==l.SecurityGroups||e[87]!==l.SubnetId||e[88]!==l.VpcId?(Qe=(l.PrivateIpAddress||l.PublicIpAddress||l.VpcId||l.SubnetId||l.SecurityGroups&&l.SecurityGroups.length>0)&&(0,q.jsxs)(R,{children:[(0,q.jsx)(R.Header,{children:`Network & Security`}),(0,q.jsxs)(R.Content,{children:[(0,q.jsx)(z,{label:`Private IP Address`,value:l.PrivateIpAddress}),(0,q.jsx)(z,{label:`Public IP Address`,value:l.PublicIpAddress}),(0,q.jsx)(z,{label:`Private DNS`,value:l.PrivateDnsName}),(0,q.jsx)(z,{label:`Public DNS`,value:l.PublicDnsName}),(0,q.jsx)(z,{label:`VPC ID`,value:l.VpcId?(0,q.jsx)(o,{className:`text-primary hover:underline`,params:{id:l.VpcId},to:`/ec2/describe-vpcs/$id`,children:l.VpcId}):void 0}),(0,q.jsx)(z,{label:`Subnet ID`,value:l.SubnetId?(0,q.jsx)(o,{className:`text-primary hover:underline`,params:{id:l.SubnetId},to:`/ec2/describe-subnets/$id`,children:l.SubnetId}):void 0}),(0,q.jsx)(z,{label:`Key Name`,value:l.KeyName}),(0,q.jsx)(z,{label:`Security Groups`,value:l.SecurityGroups?.map(ze).join(`, `)})]})]}),e[81]=l.KeyName,e[82]=l.PrivateDnsName,e[83]=l.PrivateIpAddress,e[84]=l.PublicDnsName,e[85]=l.PublicIpAddress,e[86]=l.SecurityGroups,e[87]=l.SubnetId,e[88]=l.VpcId,e[89]=Qe):Qe=e[89];let $e;e[90]===l.InstanceId?$e=e[91]:($e=(0,q.jsx)(Ae,{instanceId:l.InstanceId}),e[90]=l.InstanceId,e[91]=$e);let et;e[92]!==n||e[93]!==y?.gpus?(et=n&&(0,q.jsx)(ke,{gpus:y?.gpus}),e[92]=n,e[93]=y?.gpus,e[94]=et):et=e[94];let tt;e[95]===l.BlockDeviceMappings?tt=e[96]:(tt=l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&(0,q.jsxs)(R,{children:[(0,q.jsx)(R.Header,{children:`Block Device Mappings`}),l.BlockDeviceMappings.map(Re)]}),e[95]=l.BlockDeviceMappings,e[96]=tt);let nt;e[97]===m?nt=e[98]:(nt=m&&(0,q.jsx)(ve,{image:m}),e[97]=m,e[98]=nt);let rt;e[99]!==Q||e[100]!==Pe||e[101]!==Ie||e[102]!==$||e[103]!==Ze||e[104]!==Qe||e[105]!==$e||e[106]!==et||e[107]!==tt||e[108]!==nt?(rt=(0,q.jsxs)(`div`,{className:`space-y-6`,children:[Q,Pe,Ie,$,Ze,Qe,$e,et,tt,nt]}),e[99]=Q,e[100]=Pe,e[101]=Ie,e[102]=$,e[103]=Ze,e[104]=Qe,e[105]=$e,e[106]=et,e[107]=tt,e[108]=nt,e[109]=rt):rt=e[109];let it;e[110]===Symbol.for(`react.memo_cache_sentinel`)?(it=e=>{e||(E(!1),j(``))},e[110]=it):it=e[110];let at;e[111]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,q.jsx)(ue,{children:`Modify Instance`}),e[111]=at):at=e[111];let ot;e[112]===l.InstanceId?ot=e[113]:(ot=(0,q.jsxs)(me,{children:[at,(0,q.jsxs)(ce,{children:[`Select a new instance type for "`,l.InstanceId,`". The instance must be stopped to modify its attributes.`]})]}),e[112]=l.InstanceId,e[113]=ot);let st;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,q.jsx)(ae,{children:(0,q.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),e[114]=st):st=e[114];let ct;e[115]===h.InstanceTypes?ct=e[116]:(ct=h.InstanceTypes??[],e[115]=h.InstanceTypes,e[116]=ct);let lt;e[117]!==A||e[118]!==ct?(lt=(0,q.jsxs)(oe,{children:[st,(0,q.jsx)(ye,{className:`w-full`,id:`instanceType`,instanceTypes:ct,onValueChange:j,value:A})]}),e[117]=A,e[118]=ct,e[119]=lt):lt=e[119];let ut;e[120]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,q.jsx)(pe,{children:`Cancel`}),e[120]=ut):ut=e[120];let dt=b.isPending||!A||A===l.InstanceType,ft=b.isPending?`Saving…`:`Save Changes`,pt;e[121]!==Se||e[122]!==dt||e[123]!==ft?(pt=(0,q.jsxs)(fe,{children:[ut,(0,q.jsx)(de,{disabled:dt,onClick:Se,children:ft})]}),e[121]=Se,e[122]=dt,e[123]=ft,e[124]=pt):pt=e[124];let mt;e[125]!==ot||e[126]!==lt||e[127]!==pt?(mt=(0,q.jsxs)(le,{children:[ot,lt,pt]}),e[125]=ot,e[126]=lt,e[127]=pt,e[128]=mt):mt=e[128];let ht;e[129]!==C||e[130]!==mt?(ht=(0,q.jsx)(he,{onOpenChange:it,open:C,children:mt}),e[129]=C,e[130]=mt,e[131]=ht):ht=e[131];let gt;e[132]!==l.InstanceId||e[133]!==F?(gt=(0,q.jsx)(Oe,{instanceId:l.InstanceId,onOpenChange:I,open:F}),e[132]=l.InstanceId,e[133]=F,e[134]=gt):gt=e[134];let _t;return e[135]!==U||e[136]!==rt||e[137]!==ht||e[138]!==gt||e[139]!==H?(_t=(0,q.jsxs)(q.Fragment,{children:[Te,H,U,rt,ht,gt]}),e[135]=U,e[136]=rt,e[137]=ht,e[138]=gt,e[139]=H,e[140]=_t):_t=e[140],_t}function Re(e){return(0,q.jsxs)(R.Content,{children:[(0,q.jsx)(z,{label:`Device Name`,value:e.DeviceName}),(0,q.jsx)(z,{label:`Volume ID`,value:e.Ebs?.VolumeId?(0,q.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.Ebs.VolumeId},to:`/ec2/describe-volumes/$id`,children:e.Ebs.VolumeId}):void 0}),(0,q.jsx)(z,{label:`Status`,value:e.Ebs?.Status}),(0,q.jsx)(z,{label:`Attach Time`,value:s(e.Ebs?.AttachTime)}),(0,q.jsx)(z,{label:`Delete on Termination`,value:e.Ebs?.DeleteOnTermination?`Yes`:`No`})]},e.DeviceName)}function ze(e){return e.GroupName}export{Le as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{E as s,O as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./createLucideIcon-DI_DJF-h.js";import{t as u}from"./back-link-DjawJm5W.js";import{t as d}from"./check-DKS02ExQ.js";import{c as f,i as p,n as m,s as h,t as g}from"./select-Bgl6IAYG.js";import{t as _}from"./copy-3Ip4Zkw5.js";import{t as v}from"./network-DNraRZY6.js";import{t as y}from"./rotate-cw-BEktaUIR.js";import{t as b}from"./trash-DHuPKozD.js";import{t as x}from"./triangle-alert-Jc46kC7J.js";import{t as S}from"./button-Bae9vdts.js";import{t as C}from"./input-CpcyJw4R.js";import{a as w,c as T,i as E,s as D}from"./ec2-DJL24ekw.js";import{J as O,K as k,W as A,Z as j,d as M,i as N,it as P,nt as ee,rt as F}from"./ec2-iXujaheD.js";import{f as I}from"./iam-Fo1DnIKB.js";import{o as te}from"./admin-B1g5ktL3.js";import{t as ne}from"./use-admin--3prNhUW.js";import{t as re}from"./_id-DHAyVS2z.js";import{t as ie}from"./page-heading-M0NyqAmu.js";import{t as L}from"./error-banner-BcDqaPk7.js";import{s as ae,t as oe}from"./field-ChkDR_wL.js";import{t as se}from"./textarea-BNxO_Zsf.js";import{a as ce,i as le,l as ue,n as de,o as fe,r as pe,s as me,t as he}from"./alert-dialog-BYzNCmBp.js";import{t as ge}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as R,t as z}from"./detail-row-CclMDqj8.js";import{t as _e}from"./state-badge-BiFj5bbX.js";import{t as B}from"./use-copy-to-clipboard-Bscc1MgN.js";import{t as ve}from"./ami-details-COgMA7Qb.js";import{t as ye}from"./gpu-instance-type-select-Dr56r-me.js";var V={name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};V.node;var be=l(V),xe={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};xe.node;var Se=l(xe),Ce={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};Ce.node;var we=l(Ce),Te={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Te.node;var H=l(Te),U={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};U.node;var Ee=l(U),W={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};W.node;var De=l(W),G=r(),K=t(n(),1),q=e();function Oe(e){let t=(0,G.c)(36),{instanceId:n,open:r,onOpenChange:i}=e,a=M(),[o,s]=(0,K.useState)(``),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(null),f;t[0]===i?f=t[1]:(f=function(e){e||(s(``),l(``),d(null)),i(e)},t[0]=i,t[1]=f);let p=f,m;t[2]!==a||t[3]!==c||t[4]!==o||t[5]!==n?(m=async function(){try{let e=await a.mutateAsync({instanceId:n,name:o,description:c||void 0});d(e.ImageId??null),s(``),l(``)}catch{}},t[2]=a,t[3]=c,t[4]=o,t[5]=n,t[6]=m):m=t[6];let h=m,g=u?`Image Created`:`Create Image (AMI)`,_;t[7]===g?_=t[8]:(_=(0,q.jsx)(ue,{children:g}),t[7]=g,t[8]=_);let v=u?`Image "${u}" was created successfully.`:`Create an AMI from instance "${n}".`,y;t[9]===v?y=t[10]:(y=(0,q.jsx)(ce,{children:v}),t[9]=v,t[10]=y);let b;t[11]!==_||t[12]!==y?(b=(0,q.jsxs)(me,{children:[_,y]}),t[11]=_,t[12]=y,t[13]=b):b=t[13];let x;t[14]!==u||t[15]!==c||t[16]!==o?(x=!u&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(oe,{children:[(0,q.jsx)(ae,{children:(0,q.jsx)(`label`,{htmlFor:`imageName`,children:`Name`})}),(0,q.jsx)(C,{id:`imageName`,onChange:e=>{s(e.target.value)},placeholder:`my-image`,value:o})]}),(0,q.jsxs)(oe,{children:[(0,q.jsx)(ae,{children:(0,q.jsx)(`label`,{htmlFor:`imageDescription`,children:`Description`})}),(0,q.jsx)(se,{id:`imageDescription`,onChange:e=>{l(e.target.value)},placeholder:`Optional description`,rows:2,value:c})]})]}),t[14]=u,t[15]=c,t[16]=o,t[17]=x):x=t[17];let S=u?`Close`:`Cancel`,w;t[18]===S?w=t[19]:(w=(0,q.jsx)(pe,{children:S}),t[18]=S,t[19]=w);let T;t[20]!==a||t[21]!==u||t[22]!==h||t[23]!==o?(T=!u&&(0,q.jsx)(de,{disabled:a.isPending||!o.trim(),onClick:h,children:a.isPending?`Creating…`:`Create Image`}),t[20]=a,t[21]=u,t[22]=h,t[23]=o,t[24]=T):T=t[24];let E;t[25]!==w||t[26]!==T?(E=(0,q.jsxs)(fe,{children:[w,T]}),t[25]=w,t[26]=T,t[27]=E):E=t[27];let D;t[28]!==E||t[29]!==b||t[30]!==x?(D=(0,q.jsxs)(le,{children:[b,x,E]}),t[28]=E,t[29]=b,t[30]=x,t[31]=D):D=t[31];let O;return t[32]!==p||t[33]!==r||t[34]!==D?(O=(0,q.jsx)(he,{onOpenChange:p,open:r,children:D}),t[32]=p,t[33]=r,t[34]=D,t[35]=O):O=t[35],O}function ke(e){let t=(0,G.c)(9),{gpus:n}=e;if(!n?.length)return null;let r=n.length===1?`GPU`:`GPUs (${n.length})`,i;t[0]===r?i=t[1]:(i=(0,q.jsx)(R.Header,{children:r}),t[0]=r,t[1]=i);let a;if(t[2]!==n){let e;t[4]===n.length?e=t[5]:(e=(e,t)=>(0,q.jsxs)(`div`,{className:`border-b last:border-b-0`,children:[n.length>1&&(0,q.jsxs)(`h3`,{className:`bg-muted/30 px-4 py-2 text-sm font-medium`,children:[`GPU `,t+1]}),(0,q.jsxs)(R.Content,{children:[(0,q.jsx)(z,{label:`Model`,value:e.model}),(0,q.jsx)(z,{label:`VRAM`,value:c(e.vram_mib)}),(0,q.jsx)(z,{label:`Attachment`,value:e.profile?`MIG slice`:`PCIe passthrough`}),e.profile&&(0,q.jsx)(z,{label:`Profile`,value:e.profile}),e.mdev_path&&(0,q.jsx)(z,{label:`Mdev path`,value:e.mdev_path}),e.pci_address&&(0,q.jsx)(z,{label:`PCI address`,value:e.pci_address})]})]},e.mdev_path??e.pci_address??`${e.model}-${t}`),t[4]=n.length,t[5]=e),a=n.map(e),t[2]=n,t[3]=a}else a=t[3];let o;return t[6]!==i||t[7]!==a?(o=(0,q.jsxs)(R,{children:[i,a]}),t[6]=i,t[7]=a,t[8]=o):o=t[8],o}function Ae(e){let t=(0,G.c)(31),{instanceId:n}=e,r;t[0]===n?r=t[1]:(r=E(n),t[0]=n,t[1]=r);let{data:a}=i(r),{data:s}=i(I),c=N(),l=A(),[u,d]=(0,K.useState)(``),p;t[2]===a?.IamInstanceProfileAssociations?p=t[3]:(p=a?.IamInstanceProfileAssociations?.find(Y),t[2]=a?.IamInstanceProfileAssociations,t[3]=p);let _=p,v;t[4]===s?.InstanceProfiles?v=t[5]:(v=s?.InstanceProfiles??[],t[4]=s?.InstanceProfiles,t[5]=v);let y=v,b;t[6]!==c||t[7]!==n||t[8]!==u?(b=async()=>{u&&(await c.mutateAsync({instanceId:n,instanceProfileName:u}),d(``))},t[6]=c,t[7]=n,t[8]=u,t[9]=b):b=t[9];let x=b,C;t[10]!==_||t[11]!==l||t[12]!==n?(C=async()=>{_?.AssociationId&&await l.mutateAsync({associationId:_.AssociationId,instanceId:n})},t[10]=_,t[11]=l,t[12]=n,t[13]=C):C=t[13];let w=C,T;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,q.jsx)(R.Header,{children:`IAM Role`}),t[14]=T):T=t[14];let D;t[15]===c.error?D=t[16]:(D=c.error&&(0,q.jsx)(`div`,{className:`col-span-2`,children:(0,q.jsx)(L,{error:c.error,msg:`Failed to associate instance profile`})}),t[15]=c.error,t[16]=D);let O;t[17]===l.error?O=t[18]:(O=l.error&&(0,q.jsx)(`div`,{className:`col-span-2`,children:(0,q.jsx)(L,{error:l.error,msg:`Failed to disassociate instance profile`})}),t[17]=l.error,t[18]=O);let k;t[19]!==c.isPending||t[20]!==_||t[21]!==l.isPending||t[22]!==x||t[23]!==w||t[24]!==y||t[25]!==u?(k=_?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(z,{label:`Instance Profile ARN`,value:_.IamInstanceProfile?.Arn}),(0,q.jsx)(z,{label:`State`,value:(0,q.jsx)(_e,{state:_.State})}),(0,q.jsx)(`div`,{className:`col-span-2 flex justify-end`,children:(0,q.jsx)(S,{disabled:l.isPending,onClick:w,size:`sm`,variant:`destructive`,children:l.isPending?`Detaching…`:`Detach`})})]}):(0,q.jsxs)(`div`,{className:`col-span-2 space-y-3`,children:[(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No instance profile is associated. Associate one to flow role credentials to this instance via IMDS.`}),y.length>0?(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsxs)(g,{onValueChange:e=>{d(e??``)},value:u,children:[(0,q.jsx)(h,{className:`w-full`,children:(0,q.jsx)(f,{placeholder:`Select an instance profile`})}),(0,q.jsx)(m,{children:y.map(J)})]}),(0,q.jsx)(S,{disabled:!u||c.isPending,onClick:x,size:`sm`,children:c.isPending?`Associating…`:`Associate`})]}):(0,q.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No instance profiles exist.`,` `,(0,q.jsx)(o,{className:`text-primary hover:underline`,to:`/iam/create-instance-profile`,children:`Create one`}),` `,`first.`]})]}),t[19]=c.isPending,t[20]=_,t[21]=l.isPending,t[22]=x,t[23]=w,t[24]=y,t[25]=u,t[26]=k):k=t[26];let j;return t[27]!==D||t[28]!==O||t[29]!==k?(j=(0,q.jsxs)(R,{children:[T,(0,q.jsxs)(R.Content,{children:[D,O,k]})]}),t[27]=D,t[28]=O,t[29]=k,t[30]=j):j=t[30],j}function J(e){return(0,q.jsx)(p,{value:e.InstanceProfileName??``,children:e.InstanceProfileName},e.InstanceProfileName)}function Y(e){return e.State===`associating`||e.State===`associated`}var je=new Set([`pending`,`stopping`,`shutting-down`,`terminated`]);function Me(e){let t=(0,G.c)(43),{instanceId:n,state:r}=e,i=ee(),a=F(),o=j(),s=P(),[c,l]=(0,K.useState)(!1),u=je.has(r??``),d;t[0]!==n||t[1]!==s?(d=()=>{s.mutate(n,{onSettled:()=>{l(!1)}})},t[0]=n,t[1]=s,t[2]=d):d=t[2];let f=d;if(u&&r!==`terminated`){let e;return t[3]===r?e=t[4]:(e=(0,q.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,q.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Instance is `,r,`. Actions will be available once the operation completes.`]})}),t[3]=r,t[4]=e),e}if(r===`terminated`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,q.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`This instance has been terminated and cannot be managed.`})}),t[5]=e):e=t[5],e}let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Instance Actions`}),t[6]=p):p=t[6];let m;t[7]===i.error?m=t[8]:(m=i.error&&(0,q.jsx)(L,{error:i.error,msg:`Failed to start instance`}),t[7]=i.error,t[8]=m);let h;t[9]===a.error?h=t[10]:(h=a.error&&(0,q.jsx)(L,{error:a.error,msg:`Failed to stop instance`}),t[9]=a.error,t[10]=h);let g;t[11]===o.error?g=t[12]:(g=o.error&&(0,q.jsx)(L,{error:o.error,msg:`Failed to reboot instance`}),t[11]=o.error,t[12]=g);let _;t[13]===s.error?_=t[14]:(_=s.error&&(0,q.jsx)(L,{error:s.error,msg:`Failed to terminate instance`}),t[13]=s.error,t[14]=_);let v;t[15]!==n||t[16]!==i||t[17]!==r?(v=r===`stopped`&&(0,q.jsxs)(S,{disabled:i.isPending,onClick:()=>{i.mutate(n)},size:`sm`,variant:`default`,children:[(0,q.jsx)(H,{className:`size-4`}),i.isPending?`Starting`:`Start`]}),t[15]=n,t[16]=i,t[17]=r,t[18]=v):v=t[18];let x;t[19]!==n||t[20]!==o||t[21]!==r||t[22]!==a?(x=r===`running`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(S,{disabled:a.isPending,onClick:()=>{a.mutate(n)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(we,{className:`size-4`}),a.isPending?`Stopping`:`Stop`]}),(0,q.jsxs)(S,{disabled:o.isPending,onClick:()=>{o.mutate(n)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(y,{className:`size-4`}),o.isPending?`Rebooting`:`Reboot`]})]}),t[19]=n,t[20]=o,t[21]=r,t[22]=a,t[23]=x):x=t[23];let C;t[24]!==r||t[25]!==s.isPending?(C=(r===`stopped`||r===`running`)&&(0,q.jsxs)(S,{disabled:s.isPending,onClick:()=>{l(!0)},size:`sm`,variant:`destructive`,children:[(0,q.jsx)(b,{className:`size-4`}),s.isPending?`Terminating`:`Terminate`]}),t[24]=r,t[25]=s.isPending,t[26]=C):C=t[26];let w;t[27]!==v||t[28]!==x||t[29]!==C?(w=(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[v,x,C]}),t[27]=v,t[28]=x,t[29]=C,t[30]=w):w=t[30];let T=`Are you sure you want to terminate the instance "${n}"? This action cannot be undone.`,E;t[31]!==f||t[32]!==c||t[33]!==T||t[34]!==s.isPending?(E=(0,q.jsx)(ge,{confirmLabel:`Terminate`,description:T,isPending:s.isPending,onConfirm:f,onOpenChange:l,open:c,pendingLabel:`Terminating…`,title:`Terminate Instance`}),t[31]=f,t[32]=c,t[33]=T,t[34]=s.isPending,t[35]=E):E=t[35];let D;return t[36]!==w||t[37]!==E||t[38]!==m||t[39]!==h||t[40]!==g||t[41]!==_?(D=(0,q.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[p,m,h,g,_,w,E]}),t[36]=w,t[37]=E,t[38]=m,t[39]=h,t[40]=g,t[41]=_,t[42]=D):D=t[42],D}var X=[[`amazonlinux`,`ec2-user`],[`almalinux`,`almalinux`],[`oracle`,`cloud-user`],[`ubuntu`,`ubuntu`],[`debian`,`debian`],[`fedora`,`fedora`],[`centos`,`cloud-user`],[`alpine`,`alpine`],[`rocky`,`rocky`],[`amzn`,`ec2-user`],[`rhel`,`cloud-user`]];function Z(e){let t=new Set(`${e?.Name??``} ${e?.Description??``}`.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)),n=X.find(([e])=>t.has(e));return n?{user:n[1],distro:n[0]}:{user:``}}function Q(e){return e?.PublicIpAddress?{address:e.PublicIpAddress,reachability:`public`}:e?.PrivateIpAddress?{address:e.PrivateIpAddress,reachability:`private`}:{address:``,reachability:`none`}}var Ne=`path/to/key.pem`;function Pe(e){return`ssh -i ${e.keyName?`path/to/${e.keyName}.pem`:Ne} ${e.user||``}@${e.address}`}function Fe(e){let t=(0,G.c)(49),{instance:n,image:r}=e,{copied:i,copy:a}=B(),o,s,c,l,u,f;if(t[0]!==r||t[1]!==n){u=Symbol.for(`react.early_return_sentinel`);bb0:{if({address:o,reachability:c}=Q(n),{user:f,distro:s}=Z(r),c===`none`){u=null;break bb0}l=Pe({keyName:n.KeyName,user:f,address:o})}t[0]=r,t[1]=n,t[2]=o,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=f}else o=t[2],s=t[3],c=t[4],l=t[5],u=t[6],f=t[7];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let p=l,m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,q.jsx)(R.Header,{children:`Connect over SSH`}),t[8]=m):m=t[8];let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,q.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),t[9]=h):h=t[9];let g;t[10]===p?g=t[11]:(g=(0,q.jsx)(`span`,{className:`flex-1 overflow-x-auto whitespace-nowrap text-foreground`,children:p}),t[10]=p,t[11]=g);let y;t[12]!==p||t[13]!==a?(y=()=>{a(p)},t[12]=p,t[13]=a,t[14]=y):y=t[14];let b;t[15]===i?b=t[16]:(b=i?(0,q.jsx)(d,{className:`size-3.5 text-tactical-green`}):(0,q.jsx)(_,{className:`size-3.5`}),t[15]=i,t[16]=b);let S;t[17]!==y||t[18]!==b?(S=(0,q.jsx)(`button`,{"aria-label":`Copy SSH command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:y,type:`button`,children:b}),t[17]=y,t[18]=b,t[19]=S):S=t[19];let C;t[20]!==g||t[21]!==S?(C=(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[h,g,S]}),t[20]=g,t[21]=S,t[22]=C):C=t[22];let w;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Login user`}),t[23]=w):w=t[23];let T=f||`unknown — check the AMI`,E;t[24]===T?E=t[25]:(E=(0,q.jsxs)(`div`,{children:[w,(0,q.jsx)(`dd`,{className:`font-mono text-foreground`,children:T})]}),t[24]=T,t[25]=E);let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Address`}),t[26]=D):D=t[26];let O;t[27]===o?O=t[28]:(O=(0,q.jsxs)(`div`,{children:[D,(0,q.jsx)(`dd`,{className:`font-mono text-foreground`,children:o})]}),t[27]=o,t[28]=O);let k;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Key pair`}),t[29]=k):k=t[29];let A=n.KeyName??`none assigned`,j;t[30]===A?j=t[31]:(j=(0,q.jsxs)(`div`,{children:[k,(0,q.jsx)(`dd`,{className:`font-mono text-foreground`,children:A})]}),t[30]=A,t[31]=j);let M;t[32]!==E||t[33]!==O||t[34]!==j?(M=(0,q.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-2 text-xs sm:grid-cols-3`,children:[E,O,j]}),t[32]=E,t[33]=O,t[34]=j,t[35]=M):M=t[35];let N;t[36]!==o||t[37]!==c?(N=c===`private`&&(0,q.jsxs)($,{tone:`amber`,icon:v,children:[`This instance has no public IP address, so`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:o}),` is reachable only from inside the VPC. Run the command from another instance in the same VPC whose security group allows it, or associate an Elastic IP with this one.`]}),t[36]=o,t[37]=c,t[38]=N):N=t[38];let P;t[39]!==s||t[40]!==f?(P=f?(0,q.jsxs)($,{tone:`muted`,icon:Se,children:[(0,q.jsx)(`span`,{className:`font-mono`,children:f}),` is the default login user for `,s,` images. It comes from the AMI itself — Spinifex does not create or rename the account — so an image built with a different default will want a different name here.`]}):(0,q.jsxs)($,{tone:`amber`,icon:x,children:[`The login user could not be determined from this AMI. Every distribution ships its own default —`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`ubuntu`}),`,`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`debian`}),`,`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`cloud-user`}),` on Oracle Linux and RHEL — so check the image's documentation before connecting.`]}),t[39]=s,t[40]=f,t[41]=P):P=t[41];let ee;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,q.jsx)(`em`,{children:`you`}),t[42]=ee):ee=t[42];let F;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Spinifex stores only the public half of a key pair, so the path above is where `,ee,` saved the private key when you created it. It must be readable only by you (`,(0,q.jsx)(`span`,{className:`font-mono`,children:`chmod 600`}),`), and the instance's security group must allow TCP 22 from wherever you are connecting.`]}),t[43]=F):F=t[43];let I;return t[44]!==M||t[45]!==N||t[46]!==P||t[47]!==C?(I=(0,q.jsxs)(R,{children:[m,(0,q.jsxs)(`div`,{className:`space-y-4 p-4`,children:[C,M,N,P,F]})]}),t[44]=M,t[45]=N,t[46]=P,t[47]=C,t[48]=I):I=t[48],I}var Ie={amber:`border-tactical-amber/40 bg-tactical-amber/5 text-tactical-amber`,muted:`border-border bg-muted/40 text-muted-foreground`};function $(e){let t=(0,G.c)(8),{tone:n,icon:r,children:i}=e,a=`flex items-start gap-2 rounded-md border p-3 ${Ie[n]}`,o;t[0]===r?o=t[1]:(o=(0,q.jsx)(r,{className:`mt-0.5 size-3.5 shrink-0`}),t[0]=r,t[1]=o);let s;t[2]===i?s=t[3]:(s=(0,q.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:i}),t[2]=i,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,q.jsxs)(`div`,{className:a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function Le(){let e=(0,G.c)(141),{id:t}=re.useParams(),{isAdmin:n}=ne(),r;e[0]===t?r=e[1]:(r=D(t),e[0]=t,e[1]=r);let{data:c}=a(r),l=c.Reservations?.[0]?.Instances?.[0],d=l?.ImageId,f;e[2]===d?f=e[3]:(f=w(d),e[2]=d,e[3]=f);let{data:p}=a(f),m=p?.Images?.[0],{data:h}=a(T),g;e[4]===n?g=e[5]:(g={...te,enabled:n,refetchInterval:5e3},e[4]=n,e[5]=g);let{data:_}=i(g),v;e[6]!==t||e[7]!==_?.vms?(v=_?.vms?.find(e=>e.instance_id===t),e[6]=t,e[7]=_?.vms,e[8]=v):v=e[8];let y=v,b=O(),x=k(),[C,E]=(0,K.useState)(!1),[A,j]=(0,K.useState)(``),[M,N]=(0,K.useState)(!1),[P,ee]=(0,K.useState)(null),[F,I]=(0,K.useState)(!1);if(!l?.InstanceId){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,q.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance not found.`})]}),e[9]=t):t=e[9],t}let se;e[10]===l.LaunchTime?se=e[11]:(se=s(l.LaunchTime),e[10]=l.LaunchTime,e[11]=se);let ge=se,B=l.State?.Name===`running`,V=l.State?.Name===`stopped`,xe;e[12]!==t||e[13]!==b||e[14]!==A?(xe=async function(){try{await b.mutateAsync({instanceId:t,instanceType:A}),E(!1),j(``)}catch{}},e[12]=t,e[13]=b,e[14]=A,e[15]=xe):xe=e[15];let Se=xe,Ce;e[16]!==x||e[17]!==t?(Ce=async function(){try{let e=await x.mutateAsync(t),n=e.Output?atob(e.Output):`(no output)`;ee(n),N(!0)}catch{}},e[16]=x,e[17]=t,e[18]=Ce):Ce=e[18];let we=Ce,Te;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,q.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),e[19]=Te):Te=e[19];let H;e[20]===b.error?H=e[21]:(H=b.error&&(0,q.jsx)(L,{error:b.error,msg:`Failed to modify instance`}),e[20]=b.error,e[21]=H);let U;e[22]===x.error?U=e[23]:(U=x.error&&(0,q.jsx)(L,{error:x.error,msg:`Failed to get console output`}),e[22]=x.error,e[23]=U);let W;e[24]!==x.isPending||e[25]!==we||e[26]!==B?(W=B&&(0,q.jsxs)(S,{disabled:x.isPending,onClick:we,size:`sm`,variant:`outline`,children:[(0,q.jsx)(De,{className:`size-4`}),x.isPending?`Fetching…`:`View Console`]}),e[24]=x.isPending,e[25]=we,e[26]=B,e[27]=W):W=e[27];let J;e[28]!==B||e[29]!==V?(J=(B||V)&&(0,q.jsxs)(S,{onClick:()=>{I(!0)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(be,{className:`size-4`}),`Create Image`]}),e[28]=B,e[29]=V,e[30]=J):J=e[30];let Y;e[31]!==l.InstanceType||e[32]!==V?(Y=V&&(0,q.jsxs)(S,{onClick:()=>{j(l.InstanceType??``),E(!0)},size:`sm`,variant:`outline`,children:[(0,q.jsx)(Ee,{className:`size-4`}),`Modify Instance`]}),e[31]=l.InstanceType,e[32]=V,e[33]=Y):Y=e[33];let je=l.State?.Name,X;e[34]===je?X=e[35]:(X=(0,q.jsx)(_e,{state:je}),e[34]=je,e[35]=X);let Z;e[36]!==W||e[37]!==J||e[38]!==Y||e[39]!==X?(Z=(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[W,J,Y,X]}),e[36]=W,e[37]=J,e[38]=Y,e[39]=X,e[40]=Z):Z=e[40];let Q;e[41]!==l.InstanceId||e[42]!==Z?(Q=(0,q.jsx)(ie,{actions:Z,subtitle:`Instance Details`,title:l.InstanceId}),e[41]=l.InstanceId,e[42]=Z,e[43]=Q):Q=e[43];let Ne=l.State?.Name,Pe;e[44]!==l.InstanceId||e[45]!==Ne?(Pe=(0,q.jsx)(Me,{instanceId:l.InstanceId,state:Ne}),e[44]=l.InstanceId,e[45]=Ne,e[46]=Pe):Pe=e[46];let Ie;e[47]!==m||e[48]!==l||e[49]!==B?(Ie=B&&(0,q.jsx)(Fe,{image:m,instance:l}),e[47]=m,e[48]=l,e[49]=B,e[50]=Ie):Ie=e[50];let $;e[51]!==P||e[52]!==M?($=M&&P!==null&&(0,q.jsxs)(R,{children:[(0,q.jsx)(R.Header,{children:(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[`Console Output`,(0,q.jsx)(S,{onClick:()=>{N(!1),ee(null)},size:`sm`,variant:`ghost`,children:`Hide`})]})}),(0,q.jsx)(`div`,{className:`p-4`,children:(0,q.jsx)(`pre`,{className:`max-h-96 overflow-y-auto rounded bg-muted p-3 font-mono text-xs whitespace-pre-wrap`,children:P})})]}),e[51]=P,e[52]=M,e[53]=$):$=e[53];let Le;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,q.jsx)(R.Header,{children:`Instance Information`}),e[54]=Le):Le=e[54];let Be;e[55]===l.InstanceId?Be=e[56]:(Be=(0,q.jsx)(z,{label:`Instance ID`,value:l.InstanceId}),e[55]=l.InstanceId,e[56]=Be);let Ve;e[57]===l.InstanceType?Ve=e[58]:(Ve=(0,q.jsx)(z,{label:`Instance Type`,value:l.InstanceType}),e[57]=l.InstanceType,e[58]=Ve);let He=l.State?.Name,Ue;e[59]===He?Ue=e[60]:(Ue=(0,q.jsx)(z,{label:`Instance State`,value:He}),e[59]=He,e[60]=Ue);let We;e[61]===l.State?.Code?We=e[62]:(We=l.State?.Code?.toString(),e[61]=l.State?.Code,e[62]=We);let Ge;e[63]===We?Ge=e[64]:(Ge=(0,q.jsx)(z,{label:`State Code`,value:We}),e[63]=We,e[64]=Ge);let Ke;e[65]===ge?Ke=e[66]:(Ke=(0,q.jsx)(z,{label:`Launch Time`,value:ge}),e[65]=ge,e[66]=Ke);let qe=l.Placement?.AvailabilityZone,Je;e[67]===qe?Je=e[68]:(Je=(0,q.jsx)(z,{label:`Availability Zone`,value:qe}),e[67]=qe,e[68]=Je);let Ye;e[69]===l.Placement?Ye=e[70]:(Ye=l.Placement?.GroupName?(0,q.jsx)(o,{className:`text-primary hover:underline`,to:`/ec2/describe-placement-groups`,children:l.Placement.GroupName}):void 0,e[69]=l.Placement,e[70]=Ye);let Xe;e[71]===Ye?Xe=e[72]:(Xe=(0,q.jsx)(z,{label:`Placement Group`,value:Ye}),e[71]=Ye,e[72]=Xe);let Ze;e[73]!==Be||e[74]!==Ve||e[75]!==Ue||e[76]!==Ge||e[77]!==Ke||e[78]!==Je||e[79]!==Xe?(Ze=(0,q.jsxs)(R,{children:[Le,(0,q.jsxs)(R.Content,{children:[Be,Ve,Ue,Ge,Ke,Je,Xe]})]}),e[73]=Be,e[74]=Ve,e[75]=Ue,e[76]=Ge,e[77]=Ke,e[78]=Je,e[79]=Xe,e[80]=Ze):Ze=e[80];let Qe;e[81]!==l.KeyName||e[82]!==l.PrivateDnsName||e[83]!==l.PrivateIpAddress||e[84]!==l.PublicDnsName||e[85]!==l.PublicIpAddress||e[86]!==l.SecurityGroups||e[87]!==l.SubnetId||e[88]!==l.VpcId?(Qe=(l.PrivateIpAddress||l.PublicIpAddress||l.VpcId||l.SubnetId||l.SecurityGroups&&l.SecurityGroups.length>0)&&(0,q.jsxs)(R,{children:[(0,q.jsx)(R.Header,{children:`Network & Security`}),(0,q.jsxs)(R.Content,{children:[(0,q.jsx)(z,{label:`Private IP Address`,value:l.PrivateIpAddress}),(0,q.jsx)(z,{label:`Public IP Address`,value:l.PublicIpAddress}),(0,q.jsx)(z,{label:`Private DNS`,value:l.PrivateDnsName}),(0,q.jsx)(z,{label:`Public DNS`,value:l.PublicDnsName}),(0,q.jsx)(z,{label:`VPC ID`,value:l.VpcId?(0,q.jsx)(o,{className:`text-primary hover:underline`,params:{id:l.VpcId},to:`/ec2/describe-vpcs/$id`,children:l.VpcId}):void 0}),(0,q.jsx)(z,{label:`Subnet ID`,value:l.SubnetId?(0,q.jsx)(o,{className:`text-primary hover:underline`,params:{id:l.SubnetId},to:`/ec2/describe-subnets/$id`,children:l.SubnetId}):void 0}),(0,q.jsx)(z,{label:`Key Name`,value:l.KeyName}),(0,q.jsx)(z,{label:`Security Groups`,value:l.SecurityGroups?.map(ze).join(`, `)})]})]}),e[81]=l.KeyName,e[82]=l.PrivateDnsName,e[83]=l.PrivateIpAddress,e[84]=l.PublicDnsName,e[85]=l.PublicIpAddress,e[86]=l.SecurityGroups,e[87]=l.SubnetId,e[88]=l.VpcId,e[89]=Qe):Qe=e[89];let $e;e[90]===l.InstanceId?$e=e[91]:($e=(0,q.jsx)(Ae,{instanceId:l.InstanceId}),e[90]=l.InstanceId,e[91]=$e);let et;e[92]!==n||e[93]!==y?.gpus?(et=n&&(0,q.jsx)(ke,{gpus:y?.gpus}),e[92]=n,e[93]=y?.gpus,e[94]=et):et=e[94];let tt;e[95]===l.BlockDeviceMappings?tt=e[96]:(tt=l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&(0,q.jsxs)(R,{children:[(0,q.jsx)(R.Header,{children:`Block Device Mappings`}),l.BlockDeviceMappings.map(Re)]}),e[95]=l.BlockDeviceMappings,e[96]=tt);let nt;e[97]===m?nt=e[98]:(nt=m&&(0,q.jsx)(ve,{image:m}),e[97]=m,e[98]=nt);let rt;e[99]!==Q||e[100]!==Pe||e[101]!==Ie||e[102]!==$||e[103]!==Ze||e[104]!==Qe||e[105]!==$e||e[106]!==et||e[107]!==tt||e[108]!==nt?(rt=(0,q.jsxs)(`div`,{className:`space-y-6`,children:[Q,Pe,Ie,$,Ze,Qe,$e,et,tt,nt]}),e[99]=Q,e[100]=Pe,e[101]=Ie,e[102]=$,e[103]=Ze,e[104]=Qe,e[105]=$e,e[106]=et,e[107]=tt,e[108]=nt,e[109]=rt):rt=e[109];let it;e[110]===Symbol.for(`react.memo_cache_sentinel`)?(it=e=>{e||(E(!1),j(``))},e[110]=it):it=e[110];let at;e[111]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,q.jsx)(ue,{children:`Modify Instance`}),e[111]=at):at=e[111];let ot;e[112]===l.InstanceId?ot=e[113]:(ot=(0,q.jsxs)(me,{children:[at,(0,q.jsxs)(ce,{children:[`Select a new instance type for "`,l.InstanceId,`". The instance must be stopped to modify its attributes.`]})]}),e[112]=l.InstanceId,e[113]=ot);let st;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,q.jsx)(ae,{children:(0,q.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),e[114]=st):st=e[114];let ct;e[115]===h.InstanceTypes?ct=e[116]:(ct=h.InstanceTypes??[],e[115]=h.InstanceTypes,e[116]=ct);let lt;e[117]!==A||e[118]!==ct?(lt=(0,q.jsxs)(oe,{children:[st,(0,q.jsx)(ye,{className:`w-full`,id:`instanceType`,instanceTypes:ct,onValueChange:j,value:A})]}),e[117]=A,e[118]=ct,e[119]=lt):lt=e[119];let ut;e[120]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,q.jsx)(pe,{children:`Cancel`}),e[120]=ut):ut=e[120];let dt=b.isPending||!A||A===l.InstanceType,ft=b.isPending?`Saving…`:`Save Changes`,pt;e[121]!==Se||e[122]!==dt||e[123]!==ft?(pt=(0,q.jsxs)(fe,{children:[ut,(0,q.jsx)(de,{disabled:dt,onClick:Se,children:ft})]}),e[121]=Se,e[122]=dt,e[123]=ft,e[124]=pt):pt=e[124];let mt;e[125]!==ot||e[126]!==lt||e[127]!==pt?(mt=(0,q.jsxs)(le,{children:[ot,lt,pt]}),e[125]=ot,e[126]=lt,e[127]=pt,e[128]=mt):mt=e[128];let ht;e[129]!==C||e[130]!==mt?(ht=(0,q.jsx)(he,{onOpenChange:it,open:C,children:mt}),e[129]=C,e[130]=mt,e[131]=ht):ht=e[131];let gt;e[132]!==l.InstanceId||e[133]!==F?(gt=(0,q.jsx)(Oe,{instanceId:l.InstanceId,onOpenChange:I,open:F}),e[132]=l.InstanceId,e[133]=F,e[134]=gt):gt=e[134];let _t;return e[135]!==U||e[136]!==rt||e[137]!==ht||e[138]!==gt||e[139]!==H?(_t=(0,q.jsxs)(q.Fragment,{children:[Te,H,U,rt,ht,gt]}),e[135]=U,e[136]=rt,e[137]=ht,e[138]=gt,e[139]=H,e[140]=_t):_t=e[140],_t}function Re(e){return(0,q.jsxs)(R.Content,{children:[(0,q.jsx)(z,{label:`Device Name`,value:e.DeviceName}),(0,q.jsx)(z,{label:`Volume ID`,value:e.Ebs?.VolumeId?(0,q.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.Ebs.VolumeId},to:`/ec2/describe-volumes/$id`,children:e.Ebs.VolumeId}):void 0}),(0,q.jsx)(z,{label:`Status`,value:e.Ebs?.Status}),(0,q.jsx)(z,{label:`Attach Time`,value:s(e.Ebs?.AttachTime)}),(0,q.jsx)(z,{label:`Delete on Termination`,value:e.Ebs?.DeleteOnTermination?`Yes`:`No`})]},e.DeviceName)}function ze(e){return e.GroupName}export{Le as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BrlJkVbk.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BrlJkVbk.js deleted file mode 100644 index c6283230b..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BrlJkVbk.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{E as o,j as s,k as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{c as u,i as d,n as f,s as p,t as m}from"./select-Bgl6IAYG.js";import{t as h}from"./pencil-Cx6ej4Kx.js";import{t as g}from"./trash-DHuPKozD.js";import{t as _}from"./button-Bae9vdts.js";import{t as v}from"./input-CpcyJw4R.js";import{t as y}from"./acm-BGw6nz9A.js";import{t as b}from"./certificate-import-dialog-CGT29fMd.js";import{O as x,w as S}from"./ec2-DJL24ekw.js";import{_ as C,a as w,d as T,f as E,g as D,h as O,o as k,r as A,s as j,t as M,u as N}from"./elbv2-CBiYqcpA.js";import{i as P,n as F,o as I,r as L,s as R,t as z,u as B}from"./elbv2-19pV3l7Z.js";import{t as V}from"./_id-jyowKAL_.js";import{t as H}from"./page-heading-M0NyqAmu.js";import{a as ee,i as U,n as te,r as ne,t as W}from"./zod-VwMMRSfy.js";import{t as G}from"./error-banner-BcDqaPk7.js";import{r as re,s as K,t as q}from"./field-ChkDR_wL.js";import{a as J,i as ie,l as ae,n as oe,o as se,r as ce,s as le,t as ue}from"./alert-dialog-BYzNCmBp.js";import{t as Y}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as X,t as Z}from"./detail-row-CclMDqj8.js";import{t as de}from"./state-badge-BD9XGBez.js";import{c as fe,i as pe,n as me,o as he,s as ge,t as _e}from"./elbv2-D92OK4oO.js";import{n as ve,t as ye}from"./attributes-editor-D0211674.js";import{t as be}from"./tags-editor-CGAehu-w.js";import{i as xe,n as Se,r as Ce,t as we}from"./tabs-CAMCnrj7.js";var Te=r(),Q=t(n(),1),$=e(),Ee=80,De=443,Oe=[],ke=[];function Ae(e){let t=e.CertificateArn?.split(`/`).pop()??e.CertificateArn??``;return e.DomainName?`${e.DomainName} · ${t}`:t}function je(e){let t=(0,Te.c)(55),{form:n,protocols:r,targetGroups:i,certificates:a,sslPolicies:o}=e,s=a===void 0?Oe:a,c=o===void 0?ke:o,{control:l,register:d,getValues:h,setValue:g,formState:y}=n,{errors:x}=y,[S,C]=(0,Q.useState)(!1),w;t[0]===l?w=t[1]:(w={control:l,name:`protocol`},t[0]=l,t[1]=w);let T=ee(w),E=T===`HTTPS`,D;t[2]===T?D=t[3]:(D=ge(T),t[2]=T,t[3]=D);let O=D,k;t[4]!==h||t[5]!==g?(k=e=>{if(!e)return;let t=h(`port`);ge(e)?(t===Ee&&g(`port`,De),e===`HTTPS`?h(`sslPolicy`)||g(`sslPolicy`,_e):g(`sslPolicy`,void 0)):(t===De&&g(`port`,Ee),g(`certificateArn`,void 0),g(`sslPolicy`,void 0))},t[4]=h,t[5]=g,t[6]=k):k=t[6];let A=k,j;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),t[7]=j):j=t[7];let M;t[8]!==A||t[9]!==r?(M=e=>{let{field:t}=e;return(0,$.jsxs)(m,{onValueChange:e=>{t.onChange(e),A(e)},value:t.value,children:[(0,$.jsx)(p,{className:`w-full`,id:`listener-protocol`,children:(0,$.jsx)(u,{})}),(0,$.jsx)(f,{children:r.map(Fe)})]})},t[8]=A,t[9]=r,t[10]=M):M=t[10];let N;t[11]!==l||t[12]!==M?(N=(0,$.jsxs)(q,{children:[j,(0,$.jsx)(te,{control:l,name:`protocol`,render:M})]}),t[11]=l,t[12]=M,t[13]=N):N=t[13];let P;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),t[14]=P):P=t[14];let F=!!x.port,I=O?`443`:`80`,L;t[15]===d?L=t[16]:(L=d(`port`,{valueAsNumber:!0}),t[15]=d,t[16]=L);let R;t[17]!==F||t[18]!==I||t[19]!==L?(R=(0,$.jsx)(v,{"aria-invalid":F,id:`listener-port`,inputMode:`numeric`,placeholder:I,type:`number`,...L}),t[17]=F,t[18]=I,t[19]=L,t[20]=R):R=t[20];let z;t[21]===x.port?z=t[22]:(z=(0,$.jsx)(re,{errors:[x.port]}),t[21]=x.port,t[22]=z);let B;t[23]!==R||t[24]!==z?(B=(0,$.jsxs)(q,{children:[P,R,z]}),t[23]=R,t[24]=z,t[25]=B):B=t[25];let V;t[26]!==s||t[27]!==l||t[28]!==x.certificateArn||t[29]!==S||t[30]!==E||t[31]!==O||t[32]!==g||t[33]!==c?(V=O&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,$.jsx)(te,{control:l,name:`certificateArn`,render:e=>{let{field:t}=e;return(0,$.jsxs)(m,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(p,{"aria-invalid":!!x.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,$.jsx)(u,{placeholder:`Select certificate`})}),(0,$.jsx)(f,{children:s.map(Pe)})]})}}),(0,$.jsx)(re,{errors:[x.certificateArn]}),(0,$.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[s.length===0&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,$.jsx)(_,{className:`ml-auto`,onClick:()=>{C(!0)},size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),E&&(0,$.jsxs)(q,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,$.jsx)(te,{control:l,name:`sslPolicy`,render:e=>{let{field:t}=e;return(0,$.jsxs)(m,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,$.jsx)(p,{className:`w-full`,id:`listener-ssl-policy`,children:(0,$.jsx)(u,{})}),(0,$.jsx)(f,{children:c.map(Ne)})]})}})]}),(0,$.jsx)(b,{onImported:e=>{g(`certificateArn`,e,{shouldValidate:!0})},onOpenChange:C,open:S})]}),t[26]=s,t[27]=l,t[28]=x.certificateArn,t[29]=S,t[30]=E,t[31]=O,t[32]=g,t[33]=c,t[34]=V):V=t[34];let H;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`listener-default-tg`,children:`Default target group`})}),t[35]=H):H=t[35];let U;t[36]!==x.defaultTargetGroupArn||t[37]!==i?(U=e=>{let{field:t}=e;return(0,$.jsxs)(m,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(p,{"aria-invalid":!!x.defaultTargetGroupArn,className:`w-full`,id:`listener-default-tg`,children:(0,$.jsx)(u,{placeholder:`Select target group`})}),(0,$.jsx)(f,{children:i.map(Me)})]})},t[36]=x.defaultTargetGroupArn,t[37]=i,t[38]=U):U=t[38];let ne;t[39]!==l||t[40]!==U?(ne=(0,$.jsx)(te,{control:l,name:`defaultTargetGroupArn`,render:U}),t[39]=l,t[40]=U,t[41]=ne):ne=t[41];let W;t[42]===x.defaultTargetGroupArn?W=t[43]:(W=(0,$.jsx)(re,{errors:[x.defaultTargetGroupArn]}),t[42]=x.defaultTargetGroupArn,t[43]=W);let G;t[44]===i.length?G=t[45]:(G=i.length===0&&(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups available in this VPC. Create one first.`}),t[44]=i.length,t[45]=G);let J;t[46]!==ne||t[47]!==W||t[48]!==G?(J=(0,$.jsxs)(q,{children:[H,ne,W,G]}),t[46]=ne,t[47]=W,t[48]=G,t[49]=J):J=t[49];let ie;return t[50]!==B||t[51]!==V||t[52]!==J||t[53]!==N?(ie=(0,$.jsxs)($.Fragment,{children:[N,B,V,J]}),t[50]=B,t[51]=V,t[52]=J,t[53]=N,t[54]=ie):ie=t[54],ie}function Me(e){return(0,$.jsxs)(d,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function Ne(e){return(0,$.jsx)(d,{value:e.Name??``,children:e.Name},e.Name)}function Pe(e){return(0,$.jsx)(d,{value:e.CertificateArn??``,children:Ae(e)},e.CertificateArn)}function Fe(e){return(0,$.jsx)(d,{value:e,children:e},e)}function Ie({listenerArn:e,targetGroups:t}){let{data:n}=i(z(e)),r=A(),a=E(),o=j(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),[d,f]=(0,Q.useState)(),p=n.Rules??[],m=new Map;for(let e of t)e.TargetGroupArn&&e.TargetGroupName&&m.set(e.TargetGroupArn,e.TargetGroupName);return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[r.error&&(0,$.jsx)(G,{error:r.error,msg:`Failed to create rule`}),a.error&&(0,$.jsx)(G,{error:a.error,msg:`Failed to modify rule`}),o.error&&(0,$.jsx)(G,{error:o.error,msg:`Failed to delete rule`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[p.length,` rule`,p.length===1?``:`s`,` (including default)`]}),(0,$.jsx)(_,{onClick:()=>{c(!0)},size:`sm`,children:`Add rule`})]}),(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Priority`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Conditions`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Forward to`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:p.map(e=>(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Priority}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Le(e.Conditions,e.IsDefault===!0)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:ze(e,m)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:e.IsDefault===!0?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Edit via listener`}):(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(_,{"aria-label":`Edit rule ${e.Priority}`,onClick:()=>{u(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(h,{className:`size-4`})}),(0,$.jsx)(_,{"aria-label":`Delete rule ${e.Priority}`,onClick:()=>{f(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(g,{className:`size-4`})})]})})]},e.RuleArn??e.Priority??`default`))})]})}),s&&(0,$.jsx)(We,{isPending:r.isPending,mode:`add`,onOpenChange:c,onSubmit:async t=>{try{await r.mutateAsync({listenerArn:e,priority:t.priority,conditions:t.conditions.map(Be),forwardTargetGroupArn:t.forwardTargetGroupArn}),c(!1)}catch{}},open:s,targetGroups:t}),(0,$.jsx)(We,{initialRule:l,isPending:a.isPending,mode:`edit`,onOpenChange:e=>{e||u(void 0)},onSubmit:async t=>{if(l?.RuleArn)try{await a.mutateAsync({ruleArn:l.RuleArn,listenerArn:e,conditions:t.conditions.map(Be),forwardTargetGroupArn:t.forwardTargetGroupArn}),u(void 0)}catch{}},open:l!==void 0,targetGroups:t}),(0,$.jsx)(Y,{description:d?`Delete rule with priority ${d.Priority}? This cannot be undone.`:``,isPending:o.isPending,onConfirm:async()=>{if(d?.RuleArn)try{await o.mutateAsync({ruleArn:d.RuleArn,listenerArn:e})}finally{f(void 0)}},onOpenChange:e=>{e||f(void 0)},open:d!==void 0,title:`Delete rule`})]})}function Le(e,t){return t?`default`:!e||e.length===0?`—`:e.map(e=>{let t=Re(e);return`${e.Field}: ${t.join(`, `)}`}).join(` AND `)}function Re(e){if(e.Field===void 0)return e.Values??[];switch(e.Field){case`host-header`:return e.HostHeaderConfig?.Values??e.Values??[];case`path-pattern`:return e.PathPatternConfig?.Values??e.Values??[];case`http-header`:{let t=e.HttpHeaderConfig?.HttpHeaderName??`?`;return(e.HttpHeaderConfig?.Values??[]).map(e=>`${t}=${e}`)}case`http-request-method`:return e.HttpRequestMethodConfig?.Values??[];case`source-ip`:return e.SourceIpConfig?.Values??[];case`query-string`:return(e.QueryStringConfig?.Values??[]).map(e=>e.Key?`${e.Key}=${e.Value??``}`:e.Value??``);default:return e.Values??[]}}function ze(e,t){let n=e.Actions?.[0];return n?n.Type===`forward`&&n.TargetGroupArn?t.get(n.TargetGroupArn)??n.TargetGroupArn:n.Type??`—`:`—`}function Be(e){let t=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);return e.field===`query-string`?{field:e.field,values:[],queryStringPairs:t.map(e=>{let t=e.indexOf(`=`);return t===-1?{value:e}:{key:e.slice(0,t),value:e.slice(t+1)}})}:{field:e.field,values:t,httpHeaderName:e.httpHeaderName}}var Ve=1,He=[{field:`path-pattern`,rawValues:``}];function Ue(e){let t=Number(e.Priority??Ve),n=e.Conditions?.map(e=>Xe(e))??[];return{priority:Number.isFinite(t)?t:Ve,conditions:n.length>0?n:He,forwardTargetGroupArn:e.Actions?.[0]?.TargetGroupArn??``}}function We(e){let t=(0,Te.c)(83),{open:n,onOpenChange:r,onSubmit:i,isPending:a,targetGroups:o,mode:s,initialRule:c}=e,l,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=W(pe),d={priority:Ve,conditions:He,forwardTargetGroupArn:``},t[0]=l,t[1]=d):(l=t[0],d=t[1]);let h;t[2]===c?h=t[3]:(h=c?Ue(c):void 0,t[2]=c,t[3]=h);let g;t[4]===h?g=t[5]:(g={resolver:l,defaultValues:d,values:h},t[4]=h,t[5]=g);let y=U(g),b;t[6]===y.control?b=t[7]:(b={control:y.control,name:`conditions`},t[6]=y.control,t[7]=b);let{fields:x,append:S,remove:C}=ne(b),w;t[8]!==y||t[9]!==i?(w=y.handleSubmit(i),t[8]=y,t[9]=i,t[10]=w):w=t[10];let T=w,E=s===`add`?`Add rule`:`Edit rule`,D;t[11]===E?D=t[12]:(D=(0,$.jsx)(ae,{children:E}),t[11]=E,t[12]=D);let O;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(J,{children:`Routing rules match incoming requests and forward them to a target group. Rules evaluate in priority order; the listener default applies when no rule matches.`}),t[13]=O):O=t[13];let k;t[14]===D?k=t[15]:(k=(0,$.jsxs)(le,{children:[D,O]}),t[14]=D,t[15]=k);let A;t[16]===T?A=t[17]:(A=e=>{e.preventDefault(),T()},t[16]=T,t[17]=A);let j;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`rule-priority`,children:`Priority`})}),t[18]=j):j=t[18];let M=!!y.formState.errors.priority,N;t[19]===y?N=t[20]:(N=y.register(`priority`,{valueAsNumber:!0}),t[19]=y,t[20]=N);let P;t[21]!==M||t[22]!==N?(P=(0,$.jsx)(v,{"aria-invalid":M,id:`rule-priority`,inputMode:`numeric`,type:`number`,...N}),t[21]=M,t[22]=N,t[23]=P):P=t[23];let F;t[24]===y.formState.errors.priority?F=t[25]:(F=(0,$.jsx)(re,{errors:[y.formState.errors.priority]}),t[24]=y.formState.errors.priority,t[25]=F);let I;t[26]!==P||t[27]!==F?(I=(0,$.jsxs)(q,{children:[j,P,F]}),t[26]=P,t[27]=F,t[28]=I):I=t[28];let L;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(K,{children:`Conditions`}),t[29]=L):L=t[29];let R=x.length>=5,z;t[30]===S?z=t[31]:(z=()=>{S({field:`path-pattern`,rawValues:``})},t[30]=S,t[31]=z);let B;t[32]!==R||t[33]!==z?(B=(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,(0,$.jsx)(_,{disabled:R,onClick:z,size:`sm`,type:`button`,variant:`outline`,children:`Add condition`})]}),t[32]=R,t[33]=z,t[34]=B):B=t[34];let V;if(t[35]!==x||t[36]!==y||t[37]!==C){let e;t[39]!==x.length||t[40]!==y||t[41]!==C?(e=(e,t)=>(0,$.jsx)(Ke,{form:y,index:t,onRemove:x.length>1?()=>{C(t)}:void 0},e.id),t[39]=x.length,t[40]=y,t[41]=C,t[42]=e):e=t[42],V=x.map(e),t[35]=x,t[36]=y,t[37]=C,t[38]=V}else V=t[38];let H;t[43]!==B||t[44]!==V?(H=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[B,V]}),t[43]=B,t[44]=V,t[45]=H):H=t[45];let ee;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`rule-forward-tg`,children:`Forward to target group`})}),t[46]=ee):ee=t[46];let G;t[47]!==y.formState.errors.forwardTargetGroupArn||t[48]!==o?(G=e=>{let{field:t}=e;return(0,$.jsxs)(m,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(p,{"aria-invalid":!!y.formState.errors.forwardTargetGroupArn,className:`w-full`,id:`rule-forward-tg`,children:(0,$.jsx)(u,{placeholder:`Select target group`})}),(0,$.jsx)(f,{children:o.map(Ge)})]})},t[47]=y.formState.errors.forwardTargetGroupArn,t[48]=o,t[49]=G):G=t[49];let Y;t[50]!==y.control||t[51]!==G?(Y=(0,$.jsx)(te,{control:y.control,name:`forwardTargetGroupArn`,render:G}),t[50]=y.control,t[51]=G,t[52]=Y):Y=t[52];let X;t[53]===y.formState.errors.forwardTargetGroupArn?X=t[54]:(X=(0,$.jsx)(re,{errors:[y.formState.errors.forwardTargetGroupArn]}),t[53]=y.formState.errors.forwardTargetGroupArn,t[54]=X);let Z;t[55]!==Y||t[56]!==X?(Z=(0,$.jsxs)(q,{children:[ee,Y,X]}),t[55]=Y,t[56]=X,t[57]=Z):Z=t[57];let de;t[58]!==A||t[59]!==I||t[60]!==H||t[61]!==Z?(de=(0,$.jsxs)(`form`,{className:`min-w-0 space-y-4`,onSubmit:A,children:[I,H,Z]}),t[58]=A,t[59]=I,t[60]=H,t[61]=Z,t[62]=de):de=t[62];let fe;t[63]===a?fe=t[64]:(fe=(0,$.jsx)(ce,{disabled:a,children:`Cancel`}),t[63]=a,t[64]=fe);let me;t[65]!==a||t[66]!==s?(me=Ze(s,a),t[65]=a,t[66]=s,t[67]=me):me=t[67];let he;t[68]!==T||t[69]!==a||t[70]!==me?(he=(0,$.jsx)(oe,{disabled:a,onClick:T,children:me}),t[68]=T,t[69]=a,t[70]=me,t[71]=he):he=t[71];let ge;t[72]!==fe||t[73]!==he?(ge=(0,$.jsxs)(se,{children:[fe,he]}),t[72]=fe,t[73]=he,t[74]=ge):ge=t[74];let _e;t[75]!==k||t[76]!==de||t[77]!==ge?(_e=(0,$.jsxs)(ie,{width:`xl`,children:[k,de,ge]}),t[75]=k,t[76]=de,t[77]=ge,t[78]=_e):_e=t[78];let ve;return t[79]!==r||t[80]!==n||t[81]!==_e?(ve=(0,$.jsx)(ue,{onOpenChange:r,open:n,children:_e}),t[79]=r,t[80]=n,t[81]=_e,t[82]=ve):ve=t[82],ve}function Ge(e){return(0,$.jsxs)(d,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function Ke(e){let t=(0,Te.c)(54),{form:n,index:r,onRemove:i}=e,a,o,s,c,l,h,y,b,x,S;if(t[0]!==n||t[1]!==r||t[2]!==i){let e=n.watch(`conditions.${r}.field`);s=n.formState.errors.conditions?.[r],b=`space-y-2 rounded-md border p-3`;let C=`rule-cond-${r}-field`,w;t[13]===C?w=t[14]:(w=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:C,children:`Type`})}),t[13]=C,t[14]=w);let T=`conditions.${r}.field`,E;t[15]===r?E=t[16]:(E=e=>{let{field:t}=e;return(0,$.jsxs)(m,{onValueChange:t.onChange,value:t.value,children:[(0,$.jsx)(p,{className:`w-full`,id:`rule-cond-${r}-field`,children:(0,$.jsx)(u,{})}),(0,$.jsxs)(f,{children:[(0,$.jsx)(d,{value:`path-pattern`,children:`Path pattern`}),(0,$.jsx)(d,{value:`host-header`,children:`Host header`}),(0,$.jsx)(d,{value:`http-header`,children:`HTTP header`}),(0,$.jsx)(d,{value:`http-request-method`,children:`HTTP method`}),(0,$.jsx)(d,{value:`source-ip`,children:`Source IP CIDR`}),(0,$.jsx)(d,{value:`query-string`,children:`Query string`})]})]})},t[15]=r,t[16]=E);let D;t[17]!==n.control||t[18]!==T||t[19]!==E?(D=(0,$.jsx)(te,{control:n.control,name:T,render:E}),t[17]=n.control,t[18]=T,t[19]=E,t[20]=D):D=t[20];let O;t[21]!==D||t[22]!==w?(O=(0,$.jsxs)(`div`,{className:`flex-1`,children:[w,D]}),t[21]=D,t[22]=w,t[23]=O):O=t[23];let k;t[24]!==r||t[25]!==i?(k=i&&(0,$.jsx)(_,{"aria-label":`Remove condition ${r+1}`,className:`self-end`,onClick:i,size:`sm`,type:`button`,variant:`ghost`,children:(0,$.jsx)(g,{className:`size-4`})}),t[24]=r,t[25]=i,t[26]=k):k=t[26],t[27]!==O||t[28]!==k?(x=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[O,k]}),t[27]=O,t[28]=k,t[29]=x):x=t[29],S=e===`http-header`&&(0,$.jsxs)(q,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`rule-cond-${r}-hdr-name`,children:`Header name`})}),(0,$.jsx)(v,{"aria-invalid":!!s?.httpHeaderName,id:`rule-cond-${r}-hdr-name`,placeholder:`X-Tenant`,...n.register(`conditions.${r}.httpHeaderName`)}),(0,$.jsx)(re,{errors:[s?.httpHeaderName]})]}),o=q;let A=`rule-cond-${r}-values`,j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`(comma or newline separated, max 5)`}),t[30]=j):j=t[30],t[31]===A?y=t[32]:(y=(0,$.jsx)(K,{children:(0,$.jsxs)(`label`,{htmlFor:A,children:[`Values`,` `,j]})}),t[31]=A,t[32]=y),a=v,c=!!s?.rawValues,l=`rule-cond-${r}-values`,h=qe(e),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=h,t[9]=y,t[10]=b,t[11]=x,t[12]=S}else a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],h=t[8],y=t[9],b=t[10],x=t[11],S=t[12];let C;t[33]!==n||t[34]!==r?(C=n.register(`conditions.${r}.rawValues`),t[33]=n,t[34]=r,t[35]=C):C=t[35];let w;t[36]!==a||t[37]!==c||t[38]!==l||t[39]!==h||t[40]!==C?(w=(0,$.jsx)(a,{"aria-invalid":c,id:l,placeholder:h,...C}),t[36]=a,t[37]=c,t[38]=l,t[39]=h,t[40]=C,t[41]=w):w=t[41];let T=s?.rawValues,E;t[42]===T?E=t[43]:(E=(0,$.jsx)(re,{errors:[T]}),t[42]=T,t[43]=E);let D;t[44]!==o||t[45]!==E||t[46]!==y||t[47]!==w?(D=(0,$.jsxs)(o,{children:[y,w,E]}),t[44]=o,t[45]=E,t[46]=y,t[47]=w,t[48]=D):D=t[48];let O;return t[49]!==D||t[50]!==b||t[51]!==x||t[52]!==S?(O=(0,$.jsxs)(`div`,{className:b,children:[x,S,D]}),t[49]=D,t[50]=b,t[51]=x,t[52]=S,t[53]=O):O=t[53],O}function qe(e){switch(e){case`path-pattern`:return`/api/*`;case`host-header`:return`*.example.com`;case`http-header`:return`acme`;case`http-request-method`:return`GET, POST`;case`source-ip`:return`10.0.0.0/8`;case`query-string`:return`key=value`;default:return``}}var Je=new Set([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]);function Ye(e){return e!==void 0&&Je.has(e)}function Xe(e){let t=Re(e);return{field:Ye(e.Field)?e.Field:`path-pattern`,httpHeaderName:e.HttpHeaderConfig?.HttpHeaderName,rawValues:t.join(`, `)}}function Ze(e,t){return t?e===`add`?`Adding…`:`Saving…`:e===`add`?`Add rule`:`Save changes`}function Qe(e){return{protocol:he(e),port:80,defaultTargetGroupArn:``}}function $e(e,t){let n=t.find(t=>t===e.Protocol)??t[0]??`HTTP`,r=ge(n);return{protocol:n,port:e.Port??80,defaultTargetGroupArn:e.DefaultActions?.[0]?.TargetGroupArn??``,certificateArn:r?e.Certificates?.[0]?.CertificateArn:void 0,sslPolicy:n===`HTTPS`?e.SslPolicy:void 0}}function et(e){if(e.Protocol!==`HTTPS`)return`—`;let t=e.Certificates?.[0]?.CertificateArn?.split(`/`).pop(),n=e.SslPolicy;return t&&n?`${n} · ${t}`:n??t??`—`}function tt({loadBalancerArn:e,vpcId:t,lbType:n}){let r=fe(n),{data:a}=i(F(e)),{data:o}=i(B),{data:s}=i(y),{data:c}=i(I),l=M(),u=w(),d=N(),[f,p]=(0,Q.useState)(!1),[m,v]=(0,Q.useState)(),[b,x]=(0,Q.useState)(),[S,C]=(0,Q.useState)(),T=a.Listeners??[],E=o.TargetGroups??[],D=E.filter(e=>e.VpcId===t),O=s.CertificateSummaryList??[],k=c.SslPolicies??[],A=new Map;for(let e of E)e.TargetGroupArn&&e.TargetGroupName&&A.set(e.TargetGroupArn,e.TargetGroupName);let j=e=>{let t=e.DefaultActions?.[0];if(!t)return`—`;if(t.Type===`forward`&&t.TargetGroupArn){let e=A.get(t.TargetGroupArn);return e?`forward → ${e}`:`forward → ${t.TargetGroupArn}`}return t.Type??`—`};return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[l.error&&(0,$.jsx)(G,{error:l.error,msg:`Failed to create listener`}),d.error&&(0,$.jsx)(G,{error:d.error,msg:`Failed to modify listener`}),u.error&&(0,$.jsx)(G,{error:u.error,msg:`Failed to delete listener`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[T.length,` listener`,T.length===1?``:`s`]}),(0,$.jsx)(_,{onClick:()=>{p(!0)},size:`sm`,children:`Add listener`})]}),T.length===0?(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No listeners configured.`}):(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`TLS`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Default action`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Listener ARN`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:T.map(e=>{let t=e.ListenerArn??``,n=S===t;return(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol}),(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Port}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:et(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:j(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(_,{"aria-label":`${n?`Hide`:`Show`} rules for listener ${e.Protocol}:${e.Port}`,onClick:()=>{C(n?void 0:t)},size:`sm`,variant:`ghost`,children:n?`Hide rules`:`Rules`}),(0,$.jsx)(_,{"aria-label":`Edit listener ${e.Protocol}:${e.Port}`,onClick:()=>{v(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(h,{className:`size-4`})}),(0,$.jsx)(_,{"aria-label":`Delete listener ${e.Protocol}:${e.Port}`,onClick:()=>{x(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(g,{className:`size-4`})})]})})]}),n&&t&&(0,$.jsx)(`tr`,{className:`border-b bg-muted/30 last:border-0`,children:(0,$.jsx)(`td`,{className:`px-4 py-3`,colSpan:6,children:(0,$.jsx)(Ie,{listenerArn:t,targetGroups:D})})})]},t)})})]})}),f&&(0,$.jsx)(nt,{certificates:O,isPending:l.isPending,lbType:n,onOpenChange:p,onSubmit:async t=>{try{await l.mutateAsync({loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),p(!1)}catch{}},open:f,protocols:r,sslPolicies:k,targetGroups:D}),(0,$.jsx)(rt,{certificates:O,isPending:d.isPending,listener:m,onOpenChange:e=>{e||v(void 0)},onSubmit:async t=>{if(m?.ListenerArn)try{await d.mutateAsync({listenerArn:m.ListenerArn,loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),v(void 0)}catch{}},protocols:r,sslPolicies:k,targetGroups:D}),(0,$.jsx)(Y,{description:b?`Delete listener ${b.Protocol}:${b.Port}? This cannot be undone.`:``,isPending:u.isPending,onConfirm:async()=>{if(b?.ListenerArn)try{await u.mutateAsync(b.ListenerArn)}finally{x(void 0)}},onOpenChange:e=>{e||x(void 0)},open:b!==void 0,title:`Delete listener`})]})}function nt(e){let t=(0,Te.c)(36),{open:n,onOpenChange:r,lbType:i,protocols:a,targetGroups:o,certificates:s,sslPolicies:c,isPending:l,onSubmit:u}=e,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=W(me),t[0]=d):d=t[0];let f;t[1]===i?f=t[2]:(f=Qe(i),t[1]=i,t[2]=f);let p;t[3]===f?p=t[4]:(p={resolver:d,defaultValues:f},t[3]=f,t[4]=p);let m=U(p),h;t[5]!==m||t[6]!==u?(h=m.handleSubmit(u),t[5]=m,t[6]=u,t[7]=h):h=t[7];let g=h,_;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsxs)(le,{children:[(0,$.jsx)(ae,{children:`Add listener`}),(0,$.jsx)(J,{children:`Listeners forward incoming traffic to a default target group.`})]}),t[8]=_):_=t[8];let v;t[9]===g?v=t[10]:(v=e=>{e.preventDefault(),g()},t[9]=g,t[10]=v);let y;t[11]!==s||t[12]!==m||t[13]!==a||t[14]!==c||t[15]!==o?(y=(0,$.jsx)(je,{certificates:s,form:m,protocols:a,sslPolicies:c,targetGroups:o}),t[11]=s,t[12]=m,t[13]=a,t[14]=c,t[15]=o,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:v,children:y}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===l?x=t[21]:(x=(0,$.jsx)(ce,{disabled:l,children:`Cancel`}),t[20]=l,t[21]=x);let S=l?`Adding…`:`Add listener`,C;t[22]!==g||t[23]!==l||t[24]!==S?(C=(0,$.jsx)(oe,{disabled:l,onClick:g,children:S}),t[22]=g,t[23]=l,t[24]=S,t[25]=C):C=t[25];let w;t[26]!==C||t[27]!==x?(w=(0,$.jsxs)(se,{children:[x,C]}),t[26]=C,t[27]=x,t[28]=w):w=t[28];let T;t[29]!==w||t[30]!==b?(T=(0,$.jsxs)(ie,{width:`md`,children:[_,b,w]}),t[29]=w,t[30]=b,t[31]=T):T=t[31];let E;return t[32]!==r||t[33]!==n||t[34]!==T?(E=(0,$.jsx)(ue,{onOpenChange:r,open:n,children:T}),t[32]=r,t[33]=n,t[34]=T,t[35]=E):E=t[35],E}function rt(e){let t=(0,Te.c)(38),{listener:n,onOpenChange:r,protocols:i,targetGroups:a,certificates:o,sslPolicies:s,isPending:c,onSubmit:l}=e,u=n!==void 0,d,f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=W(me),f={protocol:`HTTP`,port:80,defaultTargetGroupArn:``},t[0]=d,t[1]=f):(d=t[0],f=t[1]);let p;t[2]!==n||t[3]!==i?(p=n?$e(n,i):void 0,t[2]=n,t[3]=i,t[4]=p):p=t[4];let m;t[5]===p?m=t[6]:(m={resolver:d,defaultValues:f,values:p},t[5]=p,t[6]=m);let h=U(m),g;t[7]!==h||t[8]!==l?(g=h.handleSubmit(l),t[7]=h,t[8]=l,t[9]=g):g=t[9];let _=g,v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(le,{children:[(0,$.jsx)(ae,{children:`Edit listener`}),(0,$.jsx)(J,{children:`Update port, protocol, or default target group. Changes apply without dropping the listener.`})]}),t[10]=v):v=t[10];let y;t[11]===_?y=t[12]:(y=e=>{e.preventDefault(),_()},t[11]=_,t[12]=y);let b;t[13]!==o||t[14]!==h||t[15]!==i||t[16]!==s||t[17]!==a?(b=(0,$.jsx)(je,{certificates:o,form:h,protocols:i,sslPolicies:s,targetGroups:a}),t[13]=o,t[14]=h,t[15]=i,t[16]=s,t[17]=a,t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==b?(x=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:y,children:b}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]===c?S=t[23]:(S=(0,$.jsx)(ce,{disabled:c,children:`Cancel`}),t[22]=c,t[23]=S);let C=c?`Saving…`:`Save changes`,w;t[24]!==_||t[25]!==c||t[26]!==C?(w=(0,$.jsx)(oe,{disabled:c,onClick:_,children:C}),t[24]=_,t[25]=c,t[26]=C,t[27]=w):w=t[27];let T;t[28]!==S||t[29]!==w?(T=(0,$.jsxs)(se,{children:[S,w]}),t[28]=S,t[29]=w,t[30]=T):T=t[30];let E;t[31]!==T||t[32]!==x?(E=(0,$.jsxs)(ie,{width:`md`,children:[v,x,T]}),t[31]=T,t[32]=x,t[33]=E):E=t[33];let D;return t[34]!==r||t[35]!==u||t[36]!==E?(D=(0,$.jsx)(ue,{onOpenChange:r,open:u,children:E}),t[34]=r,t[35]=u,t[36]=E,t[37]=D):D=t[37],D}function it(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function at(e){let t=(0,Te.c)(48),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,m;t[3]===l?m=t[4]:(m=()=>{d(l)},t[3]=l,t[4]=m);let h=m,g;t[5]!==l||t[6]!==u?(g=it(u,l),t[5]=l,t[6]=u,t[7]=g):g=t[7];let v=!g,y=u.length===0,b;t[8]===u?b=t[9]:(b=new Set(u),t[8]=u,t[9]=b);let x=b,S;t[10]!==v||t[11]!==y||t[12]!==i||t[13]!==u?(S=e=>{e.preventDefault(),v&&!y&&i(u)},t[10]=v,t[11]=y,t[12]=i,t[13]=u,t[14]=S):S=t[14];let C;t[15]===o?C=t[16]:(C=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update security groups`}),t[15]=o,t[16]=C);let w;t[17]!==v||t[18]!==s?(w=s&&!v&&(0,$.jsx)(`output`,{className:`mb-4 block rounded-md border border-success bg-success/10 p-3 text-sm text-success-foreground`,children:`Security groups updated.`}),t[17]=v,t[18]=s,t[19]=w):w=t[19];let T;t[20]!==n||t[21]!==x?(T=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No security groups in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:x.has(e.GroupId??``),onChange:()=>{p(e.GroupId??``)},type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId)),t[20]=n,t[21]=x,t[22]=T):T=t[22];let E;t[23]===y?E=t[24]:(E=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one security group is required.`}),t[23]=y,t[24]=E);let D;t[25]!==E||t[26]!==T?(D=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[T,E]}),t[25]=E,t[26]=T,t[27]=D):D=t[27];let O=v?`Unsaved changes`:`No changes`,k;t[28]===O?k=t[29]:(k=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:O}),t[28]=O,t[29]=k);let A=a||!v,j;t[30]!==h||t[31]!==A?(j=(0,$.jsx)(_,{disabled:A,onClick:h,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[30]=h,t[31]=A,t[32]=j):j=t[32];let M=a||!v||y,N=a?`Saving…`:`Save changes`,P;t[33]!==M||t[34]!==N?(P=(0,$.jsx)(_,{disabled:M,size:`sm`,type:`submit`,children:N}),t[33]=M,t[34]=N,t[35]=P):P=t[35];let F;t[36]!==k||t[37]!==j||t[38]!==P?(F=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[k,j,P]}),t[36]=k,t[37]=j,t[38]=P,t[39]=F):F=t[39];let I;t[40]!==D||t[41]!==F?(I=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[D,F]}),t[40]=D,t[41]=F,t[42]=I):I=t[42];let L;return t[43]!==I||t[44]!==S||t[45]!==C||t[46]!==w?(L=(0,$.jsxs)(`form`,{onSubmit:S,children:[C,w,I]}),t[43]=I,t[44]=S,t[45]=C,t[46]=w,t[47]=L):L=t[47],L}function ot(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function st(e){let t=c(e.Tags),n=e.AvailabilityZone?` · ${e.AvailabilityZone}`:``,r=e.CidrBlock?` (${e.CidrBlock})`:``;return`${e.SubnetId}${t?` — ${t}`:``}${r}${n}`}function ct(e){let t=(0,Te.c)(49),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,m;t[3]===l?m=t[4]:(m=()=>{d(l)},t[3]=l,t[4]=m);let h=m,g;t[5]!==l||t[6]!==u?(g=ot(u,l),t[5]=l,t[6]=u,t[7]=g):g=t[7];let v=!g,y=u.length===0,b;t[8]===u?b=t[9]:(b=new Set(u),t[8]=u,t[9]=b);let x=b,S;t[10]!==v||t[11]!==y||t[12]!==i||t[13]!==u?(S=e=>{e.preventDefault(),v&&!y&&i(u)},t[10]=v,t[11]=y,t[12]=i,t[13]=u,t[14]=S):S=t[14];let C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-warning bg-warning/10 p-3 text-sm text-warning-foreground`,role:`note`,children:`Applying a subnet change re-homes the load balancer by relaunching its underlying system VM. Expect a brief data-plane interruption while it restarts.`}),t[15]=C):C=t[15];let w;t[16]===o?w=t[17]:(w=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update subnets`}),t[16]=o,t[17]=w);let T;t[18]!==v||t[19]!==s?(T=s&&!v&&(0,$.jsx)(`output`,{className:`mb-4 block rounded-md border border-success bg-success/10 p-3 text-sm text-success-foreground`,children:`Subnets updated.`}),t[18]=v,t[19]=s,t[20]=T):T=t[20];let E;t[21]!==n||t[22]!==x?(E=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnets in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:x.has(e.SubnetId??``),onChange:()=>{p(e.SubnetId??``)},type:`checkbox`}),(0,$.jsx)(`span`,{className:`font-mono`,children:st(e)})]},e.SubnetId)),t[21]=n,t[22]=x,t[23]=E):E=t[23];let D;t[24]===y?D=t[25]:(D=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one subnet is required.`}),t[24]=y,t[25]=D);let O;t[26]!==E||t[27]!==D?(O=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[E,D]}),t[26]=E,t[27]=D,t[28]=O):O=t[28];let k=v?`Unsaved changes`:`No changes`,A;t[29]===k?A=t[30]:(A=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:k}),t[29]=k,t[30]=A);let j=a||!v,M;t[31]!==h||t[32]!==j?(M=(0,$.jsx)(_,{disabled:j,onClick:h,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[31]=h,t[32]=j,t[33]=M):M=t[33];let N=a||!v||y,P=a?`Saving…`:`Save changes`,F;t[34]!==N||t[35]!==P?(F=(0,$.jsx)(_,{disabled:N,size:`sm`,type:`submit`,children:P}),t[34]=N,t[35]=P,t[36]=F):F=t[36];let I;t[37]!==A||t[38]!==M||t[39]!==F?(I=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[A,M,F]}),t[37]=A,t[38]=M,t[39]=F,t[40]=I):I=t[40];let L;t[41]!==O||t[42]!==I?(L=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[O,I]}),t[41]=O,t[42]=I,t[43]=L):L=t[43];let R;return t[44]!==L||t[45]!==S||t[46]!==w||t[47]!==T?(R=(0,$.jsxs)(`form`,{onSubmit:S,children:[C,w,T,L]}),t[44]=L,t[45]=S,t[46]=w,t[47]=T,t[48]=R):R=t[48],R}function lt({arn:e}){let t=a(),{data:n}=i(P(e)),{data:r}=i(L(e)),{data:s}=i(R([e])),{data:u}=i(x),{data:d}=i(S),f=k(),p=T(),m=C(),h=O(),v=D(),[y,b]=(0,Q.useState)(!1),w=n.LoadBalancers?.[0];if(!w?.LoadBalancerArn)return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(l,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`Load balancer not found.`})]});let E=async()=>{try{await f.mutateAsync(e),t({to:`/ec2/describe-load-balancers`})}finally{b(!1)}},A=u.Subnets??[],j=e=>{let t=A.find(t=>t.SubnetId===e);if(!t)return e;let n=c(t.Tags),r=t.CidrBlock?` (${t.CidrBlock})`:``;return n?`${e} — ${n}${r}`:`${e}${r}`},M=r.Attributes??[],N=s?.TagDescriptions?.find(t=>t.ResourceArn===e)?.Tags??[],F=(w.SecurityGroups??[]).filter(e=>e!==void 0),I=(d.SecurityGroups??[]).filter(e=>e.VpcId===w.VpcId),z=A.filter(e=>e.VpcId===w.VpcId),B=(w.AvailabilityZones??[]).map(e=>e.SubnetId).filter(e=>e!==void 0),V=w.Type===`network`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(l,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),f.error&&(0,$.jsx)(G,{error:f.error,msg:`Failed to delete load balancer`}),(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsx)(H,{actions:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(_,{onClick:()=>{b(!0)},size:`sm`,variant:`destructive`,children:[(0,$.jsx)(g,{className:`size-4`}),`Delete`]}),(0,$.jsx)(de,{state:w.State?.Code})]}),subtitle:`Load Balancer Details`,title:w.LoadBalancerName??w.LoadBalancerArn}),(0,$.jsxs)(we,{defaultValue:`overview`,children:[(0,$.jsxs)(Se,{children:[(0,$.jsx)(xe,{value:`overview`,children:`Overview`}),(0,$.jsx)(xe,{value:`listeners`,children:`Listeners`}),(0,$.jsx)(xe,{value:`subnets`,children:`Subnets`}),!V&&(0,$.jsx)(xe,{value:`security-groups`,children:`Security groups`}),(0,$.jsx)(xe,{value:`attributes`,children:`Attributes`}),(0,$.jsx)(xe,{value:`tags`,children:`Tags`})]}),(0,$.jsxs)(Ce,{value:`overview`,children:[(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Load balancer`}),(0,$.jsxs)(X.Content,{children:[(0,$.jsx)(Z,{label:`ARN`,value:w.LoadBalancerArn}),(0,$.jsx)(Z,{label:`DNS name`,value:w.DNSName}),(0,$.jsx)(Z,{label:`State`,value:w.State?.Reason?`${w.State.Code} — ${w.State.Reason}`:w.State?.Code}),(0,$.jsx)(Z,{label:`Type`,value:w.Type}),(0,$.jsx)(Z,{label:`Scheme`,value:w.Scheme}),(0,$.jsx)(Z,{label:`IP address type`,value:w.IpAddressType}),(0,$.jsx)(Z,{label:`VPC`,value:w.VpcId}),(0,$.jsx)(Z,{label:`Created at`,value:o(w.CreatedTime)})]})]}),(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Availability zones`}),(0,$.jsx)(X.Content,{children:(w.AvailabilityZones??[]).map(e=>(0,$.jsx)(Z,{label:e.ZoneName??`—`,value:e.SubnetId?j(e.SubnetId):void 0},`${e.ZoneName}-${e.SubnetId}`))})]}),(w.SecurityGroups??[]).length>0&&(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Security groups`}),(0,$.jsx)(X.Content,{children:(w.SecurityGroups??[]).map(e=>(0,$.jsx)(Z,{label:`Security group`,value:e},e))})]})]}),(0,$.jsx)(Ce,{value:`listeners`,children:(0,$.jsx)(tt,{lbType:V?`network`:`application`,loadBalancerArn:e,vpcId:w.VpcId})}),(0,$.jsx)(Ce,{value:`subnets`,children:(0,$.jsx)(ct,{available:z,current:B,error:v.error,isPending:v.isPending,isSuccess:v.isSuccess,onSubmit:t=>{v.mutate({loadBalancerArn:e,subnetIds:t})}})}),!V&&(0,$.jsx)(Ce,{value:`security-groups`,children:(0,$.jsx)(at,{available:I,current:F,error:h.error,isPending:h.isPending,isSuccess:h.isSuccess,onSubmit:t=>{h.mutate({loadBalancerArn:e,securityGroupIds:t})}})}),(0,$.jsx)(Ce,{value:`attributes`,children:(0,$.jsx)(ye,{attributes:M,error:p.error,isPending:p.isPending,isSuccess:p.isSuccess,onSubmit:t=>{p.mutate({loadBalancerArn:e,attributes:t})},specs:ve})}),(0,$.jsx)(Ce,{value:`tags`,children:(0,$.jsx)(be,{error:m.error,isPending:m.isPending,isSuccess:m.isSuccess,onSubmit:t=>{m.mutate({resourceArn:e,tags:t,initialKeys:N.map(e=>e.Key??``).filter(e=>e.length>0)})},tags:N})})]})]}),(0,$.jsx)(Y,{description:`Are you sure you want to delete load balancer "${w.LoadBalancerName??w.LoadBalancerArn}"? This action cannot be undone.`,isPending:f.isPending,onConfirm:E,onOpenChange:b,open:y,title:`Delete load balancer`})]})}function ut(){let e=(0,Te.c)(4),{id:t}=V.useParams(),n;e[0]===t?n=e[1]:(n=s(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,$.jsx)(lt,{arn:n}),e[2]=n,e[3]=r),r}export{ut as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CFipLulu.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BtW0qAgz.js similarity index 81% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CFipLulu.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BtW0qAgz.js index 469cf98de..effc8669f 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CFipLulu.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BtW0qAgz.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BiAD_ye1.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{O as r,j as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(vpc)/describe-vpcs/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | VPC | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BiAD_ye1.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-rAI6aGg-.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{O as r,j as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(vpc)/describe-vpcs/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | VPC | Mulga`}]}),component:t(()=>n(()=>import(`./_id-rAI6aGg-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-FEWgr3M8.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BzF3654U.js similarity index 75% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-FEWgr3M8.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BzF3654U.js index 7eadbfddd..caebfbf5a 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-FEWgr3M8.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BzF3654U.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BVvKP72w.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/input-CpcyJw4R.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ec2-CmqOirWQ.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{k as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(volumes)/modify-volume/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BVvKP72w.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30])),`component`)});export{i as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-Dsjd39jS.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/input-CpcyJw4R.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ec2-Cr9GrTUU.js","assets/elbv2-B_G5anft.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{k as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(volumes)/modify-volume/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-Dsjd39jS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])),`component`)});export{i as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-4vlHIIDd.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C4RVw0R5.js similarity index 90% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-4vlHIIDd.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C4RVw0R5.js index b53e981ff..0153a59ed 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-4vlHIIDd.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C4RVw0R5.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BwK2aMkX.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{l as r,t as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(elastic-ips)/describe-addresses/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Elastic IP | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BwK2aMkX.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-B48v9HBU.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{l as r,t as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(elastic-ips)/describe-addresses/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Elastic IP | Mulga`}]}),component:t(()=>n(()=>import(`./_id-B48v9HBU.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C72MPTbM.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C72MPTbM.js new file mode 100644 index 000000000..f542892a9 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C72MPTbM.js @@ -0,0 +1 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{M as ee}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as te}from"./plus-DMni1ZkC.js";import{t as p}from"./trash-DHuPKozD.js";import{n as m,t as ne}from"./_id-Cho_Bq75.js";import{t as h}from"./button-Bae9vdts.js";import{t as g}from"./input-CpcyJw4R.js";import{C as _}from"./ec2-DJL24ekw.js";import{F as v,c as re,et as y,l as b,tt as x}from"./ec2-iXujaheD.js";import{t as S}from"./page-heading-M0NyqAmu.js";import{a as ie,i as ae,n as oe,t as se}from"./zod-VwMMRSfy.js";import{t as ce}from"./error-banner-BcDqaPk7.js";import{r as C,s as w,t as le}from"./field-ChkDR_wL.js";import{i as ue,l as de,n as fe,o as pe,r as me,s as he,t as ge}from"./alert-dialog-BYzNCmBp.js";import{t as T}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as E,t as D}from"./detail-row-CclMDqj8.js";import{x as _e}from"./ec2-Cr9GrTUU.js";var ve=r(),O=t(n()),k=e();function A(e){if(!e||e===`-1`)return`All traffic`;let t=e.toUpperCase();return t===`TCP`||t===`UDP`||t===`ICMP`?t:e}function j(e,t,n){return!n||n===`-1`||e===void 0||t===void 0||e===-1&&t===-1?`All`:e===t?e.toString():`${e}-${t}`}function M(e){let t=(0,ve.c)(87),{open:n,onOpenChange:r,direction:i,groupId:a}=e,o=b(),ee=re(),s=i===`ingress`?o:ee,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={resolver:se(_e),defaultValues:{ipProtocol:`tcp`,fromPort:0,toPort:0,cidrIp:`0.0.0.0/0`}},t[0]=c):c=t[0];let{control:l,handleSubmit:u,register:d,reset:f,formState:te}=ae(c),{errors:p}=te,m;t[1]===l?m=t[2]:(m={control:l,name:`ipProtocol`},t[1]=l,t[2]=m);let ne=ie(m),h=ne===`-1`||ne===`icmp`,_;t[3]!==a||t[4]!==s||t[5]!==r||t[6]!==h||t[7]!==f?(_=async e=>{let t={groupId:a,ipProtocol:e.ipProtocol,fromPort:h?-1:e.fromPort,toPort:h?-1:e.toPort,cidrIp:e.cidrIp};await s.mutateAsync(t),f(),r(!1)},t[3]=a,t[4]=s,t[5]=r,t[6]=h,t[7]=f,t[8]=_):_=t[8];let v=_,y=i===`ingress`?`Inbound`:`Outbound`,x;t[9]===y?x=t[10]:(x=(0,k.jsx)(he,{children:(0,k.jsxs)(de,{children:[`Add `,y,` Rule`]})}),t[9]=y,t[10]=x);let S;t[11]===s.error?S=t[12]:(S=s.error&&(0,k.jsx)(ce,{error:s.error,msg:`Failed to add rule`}),t[11]=s.error,t[12]=S);let T;t[13]!==u||t[14]!==v?(T=u(v),t[13]=u,t[14]=v,t[15]=T):T=t[15];let E;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`ipProtocol`,children:`Protocol`})}),t[16]=E):E=t[16];let D;t[17]===l?D=t[18]:(D=(0,k.jsx)(oe,{control:l,name:`ipProtocol`,render:ye}),t[17]=l,t[18]=D);let O;t[19]===p.ipProtocol?O=t[20]:(O=(0,k.jsx)(C,{errors:[p.ipProtocol]}),t[19]=p.ipProtocol,t[20]=O);let A;t[21]!==D||t[22]!==O?(A=(0,k.jsxs)(le,{children:[E,D,O]}),t[21]=D,t[22]=O,t[23]=A):A=t[23];let j;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`fromPort`,children:`From Port`})}),t[24]=j):j=t[24];let M=!!p.fromPort,N;t[25]===d?N=t[26]:(N=d(`fromPort`,{valueAsNumber:!0}),t[25]=d,t[26]=N);let P;t[27]!==h||t[28]!==M||t[29]!==N?(P=(0,k.jsx)(g,{"aria-invalid":M,disabled:h,id:`fromPort`,type:`number`,...N}),t[27]=h,t[28]=M,t[29]=N,t[30]=P):P=t[30];let F;t[31]===p.fromPort?F=t[32]:(F=(0,k.jsx)(C,{errors:[p.fromPort]}),t[31]=p.fromPort,t[32]=F);let I;t[33]!==P||t[34]!==F?(I=(0,k.jsxs)(le,{children:[j,P,F]}),t[33]=P,t[34]=F,t[35]=I):I=t[35];let L;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`toPort`,children:`To Port`})}),t[36]=L):L=t[36];let be=!!p.toPort,R;t[37]===d?R=t[38]:(R=d(`toPort`,{valueAsNumber:!0}),t[37]=d,t[38]=R);let z;t[39]!==h||t[40]!==be||t[41]!==R?(z=(0,k.jsx)(g,{"aria-invalid":be,disabled:h,id:`toPort`,type:`number`,...R}),t[39]=h,t[40]=be,t[41]=R,t[42]=z):z=t[42];let B;t[43]===p.toPort?B=t[44]:(B=(0,k.jsx)(C,{errors:[p.toPort]}),t[43]=p.toPort,t[44]=B);let V;t[45]!==z||t[46]!==B?(V=(0,k.jsxs)(le,{children:[L,z,B]}),t[45]=z,t[46]=B,t[47]=V):V=t[47];let H;t[48]!==I||t[49]!==V?(H=(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[I,V]}),t[48]=I,t[49]=V,t[50]=H):H=t[50];let xe=i===`ingress`?`Source`:`Destination`,U;t[51]===xe?U=t[52]:(U=(0,k.jsx)(w,{children:(0,k.jsxs)(`label`,{htmlFor:`cidrIp`,children:[xe,` CIDR`]})}),t[51]=xe,t[52]=U);let Se=!!p.cidrIp,W;t[53]===d?W=t[54]:(W=d(`cidrIp`),t[53]=d,t[54]=W);let G;t[55]!==Se||t[56]!==W?(G=(0,k.jsx)(g,{"aria-invalid":Se,id:`cidrIp`,placeholder:`0.0.0.0/0`,...W}),t[55]=Se,t[56]=W,t[57]=G):G=t[57];let K;t[58]===p.cidrIp?K=t[59]:(K=(0,k.jsx)(C,{errors:[p.cidrIp]}),t[58]=p.cidrIp,t[59]=K);let q;t[60]!==U||t[61]!==G||t[62]!==K?(q=(0,k.jsxs)(le,{children:[U,G,K]}),t[60]=U,t[61]=G,t[62]=K,t[63]=q):q=t[63];let J;t[64]!==A||t[65]!==H||t[66]!==q||t[67]!==T?(J=(0,k.jsxs)(`form`,{className:`space-y-4`,id:`add-rule-form`,onSubmit:T,children:[A,H,q]}),t[64]=A,t[65]=H,t[66]=q,t[67]=T,t[68]=J):J=t[68];let Y;t[69]!==s||t[70]!==f?(Y=(0,k.jsx)(me,{onClick:()=>{f(),s.reset()},children:`Cancel`}),t[69]=s,t[70]=f,t[71]=Y):Y=t[71];let Ce=s.isPending?`Adding…`:`Add Rule`,X;t[72]!==s.isPending||t[73]!==Ce?(X=(0,k.jsx)(fe,{disabled:s.isPending,form:`add-rule-form`,type:`submit`,children:Ce}),t[72]=s.isPending,t[73]=Ce,t[74]=X):X=t[74];let Z;t[75]!==Y||t[76]!==X?(Z=(0,k.jsxs)(pe,{children:[Y,X]}),t[75]=Y,t[76]=X,t[77]=Z):Z=t[77];let Q;t[78]!==J||t[79]!==Z||t[80]!==x||t[81]!==S?(Q=(0,k.jsxs)(ue,{children:[x,S,J,Z]}),t[78]=J,t[79]=Z,t[80]=x,t[81]=S,t[82]=Q):Q=t[82];let $;return t[83]!==r||t[84]!==n||t[85]!==Q?($=(0,k.jsx)(ge,{onOpenChange:r,open:n,children:Q}),t[83]=r,t[84]=n,t[85]=Q,t[86]=$):$=t[86],$}function ye(e){let{field:t}=e;return(0,k.jsxs)(f,{onValueChange:e=>{t.onChange(e)},value:t.value,children:[(0,k.jsx)(d,{className:`w-full`,id:`ipProtocol`,children:(0,k.jsx)(c,{})}),(0,k.jsxs)(u,{children:[(0,k.jsx)(l,{value:`tcp`,children:`TCP`}),(0,k.jsx)(l,{value:`udp`,children:`UDP`}),(0,k.jsx)(l,{value:`icmp`,children:`ICMP`}),(0,k.jsx)(l,{value:`-1`,children:`All traffic (-1)`})]})]})}function N(e){return[...(e.IpRanges??[]).map(e=>({kind:`cidr`,value:e.CidrIp??``})),...(e.UserIdGroupPairs??[]).map(e=>({kind:`group`,value:e.GroupId??``}))]}function P({rule:e,source:t,groupId:n,direction:r}){let i=x(),a=y(),o=r===`ingress`?i:a,[ee,s]=(0,O.useState)(!1),c=async()=>{try{await o.mutateAsync({groupId:n,ipProtocol:e.IpProtocol??`-1`,fromPort:e.FromPort??-1,toPort:e.ToPort??-1,...t.kind===`group`?{sourceGroupId:t.value}:{cidrIp:t.value}})}catch{}finally{s(!1)}},l=t.kind===`group`&&t.value===n?`${t.value} (this security group)`:t.value;return(0,k.jsxs)(`div`,{className:`space-y-0`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b px-4 py-3 last:border-b-0`,children:[(0,k.jsxs)(`div`,{className:`grid flex-1 grid-cols-3 gap-4 text-sm`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:`Protocol: `}),A(e.IpProtocol)]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:`Port Range: `}),j(e.FromPort,e.ToPort,e.IpProtocol)]}),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`span`,{className:`text-muted-foreground`,children:[r===`ingress`?`Source`:`Destination`,`:`,` `]}),l]})]}),(0,k.jsxs)(h,{disabled:o.isPending,onClick:()=>{s(!0)},size:`icon-xs`,variant:`ghost`,children:[(0,k.jsx)(m,{className:`size-3`}),(0,k.jsx)(`span`,{className:`sr-only`,children:`Remove rule`})]})]}),o.error&&(0,k.jsx)(`div`,{className:`px-4 pb-2`,children:(0,k.jsx)(ce,{error:o.error,msg:`Failed to remove rule`})}),(0,k.jsx)(T,{confirmLabel:`Remove`,description:`Remove the ${r===`ingress`?`inbound`:`outbound`} rule (protocol ${A(e.IpProtocol)}, port range ${j(e.FromPort,e.ToPort,e.IpProtocol)}, ${r===`ingress`?`source`:`destination`} ${l}) from "${n}"?`,isPending:o.isPending,onConfirm:c,onOpenChange:s,open:ee,pendingLabel:`Removing…`,title:`Remove Rule`})]})}function F(){let{id:e}=ne.useParams(),t=o(),{data:n}=i(_(e)),r=n.SecurityGroups?.[0],c=v(),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[m,g]=(0,O.useState)(!1),re=async()=>{try{await c.mutateAsync(e),t({to:`/ec2/describe-security-groups`})}finally{u(!1)}};if(!r?.GroupId)return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(s,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),(0,k.jsx)(`p`,{className:`text-muted-foreground`,children:`Security group not found.`})]});let y=r.IpPermissions??[],b=r.IpPermissionsEgress??[];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(s,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),c.error&&(0,k.jsx)(ce,{error:c.error,msg:`Failed to delete security group`}),(0,k.jsxs)(`div`,{className:`space-y-6`,children:[(0,k.jsx)(S,{actions:(0,k.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,k.jsxs)(h,{onClick:()=>{u(!0)},size:`sm`,variant:`destructive`,children:[(0,k.jsx)(p,{className:`size-4`}),`Delete`]})}),subtitle:`Security Group Details`,title:ee(r)}),(0,k.jsxs)(E,{children:[(0,k.jsx)(E.Header,{children:`Security Group Information`}),(0,k.jsxs)(E.Content,{children:[(0,k.jsx)(D,{label:`Group ID`,value:r.GroupId}),(0,k.jsx)(D,{label:`Group Name`,value:r.GroupName}),(0,k.jsx)(D,{label:`Description`,value:r.Description}),(0,k.jsx)(D,{label:`VPC ID`,value:r.VpcId?(0,k.jsx)(a,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):`—`}),(0,k.jsx)(D,{label:`Owner ID`,value:r.OwnerId})]})]}),(0,k.jsxs)(E,{children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,k.jsxs)(`h2`,{className:`font-semibold`,children:[`Inbound Rules (`,y.length,`)`]}),(0,k.jsxs)(h,{onClick:()=>{f(!0)},size:`sm`,variant:`outline`,children:[(0,k.jsx)(te,{className:`size-4`}),`Add Rule`]})]}),y.length>0?(0,k.jsx)(`div`,{children:y.flatMap(e=>N(e).map(t=>(0,k.jsx)(P,{direction:`ingress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,k.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No inbound rules.`})]}),(0,k.jsxs)(E,{children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,k.jsxs)(`h2`,{className:`font-semibold`,children:[`Outbound Rules (`,b.length,`)`]}),(0,k.jsxs)(h,{onClick:()=>{g(!0)},size:`sm`,variant:`outline`,children:[(0,k.jsx)(te,{className:`size-4`}),`Add Rule`]})]}),b.length>0?(0,k.jsx)(`div`,{children:b.flatMap(e=>N(e).map(t=>(0,k.jsx)(P,{direction:`egress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,k.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No outbound rules.`})]})]}),(0,k.jsx)(T,{description:`Are you sure you want to delete the security group "${r.GroupId}"? This action cannot be undone.`,isPending:c.isPending,onConfirm:re,onOpenChange:u,open:l,title:`Delete Security Group`}),(0,k.jsx)(M,{direction:`ingress`,groupId:r.GroupId,onOpenChange:f,open:d}),(0,k.jsx)(M,{direction:`egress`,groupId:r.GroupId,onOpenChange:g,open:m})]})}export{F as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-mj6gqk73.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CB17TYHV.js similarity index 84% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-mj6gqk73.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CB17TYHV.js index b445bf7ba..a832df40c 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-mj6gqk73.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CB17TYHV.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-CUjg1-jG.js","assets/compiler-runtime-DTT1fEHg.js","assets/removable-TyvHreKc.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/circle-arrow-up-B72wB_yn.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/subnet-calculator-DDrAb5xp.js","assets/signed-fetch-BHraeSLO.js","assets/use-admin--3prNhUW.js","assets/useQuery-DVjCHx2S.js","assets/sts-BM0Odtlr.js","assets/admin-B1g5ktL3.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/state-badge-BD9XGBez.js","assets/system-managed-Dk7ySh_E.js","assets/ami-details-COgMA7Qb.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{a as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(images)/describe-images/$id`)({loader:async({context:e,params:t})=>await e.queryClient.query({...r(t.id),staleTime:`static`}),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??`Image`} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-CUjg1-jG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40])),`component`)});export{i as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-Dw7ARlpP.js","assets/compiler-runtime-DTT1fEHg.js","assets/removable-TyvHreKc.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/circle-arrow-up-B72wB_yn.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/subnet-calculator-DDrAb5xp.js","assets/signed-fetch-BHraeSLO.js","assets/use-admin--3prNhUW.js","assets/useQuery-DVjCHx2S.js","assets/sts-BM0Odtlr.js","assets/admin-B1g5ktL3.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/state-badge-BiFj5bbX.js","assets/system-managed-Dk7ySh_E.js","assets/ami-details-COgMA7Qb.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{a as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(images)/describe-images/$id`)({loader:async({context:e,params:t})=>await e.queryClient.query({...r(t.id),staleTime:`static`}),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??`Image`} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-Dw7ARlpP.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40])),`component`)});export{i as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CCzBHuPA.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CCzBHuPA.js deleted file mode 100644 index 796e76f4d..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CCzBHuPA.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as s,i as c,n as l,s as u,t as d}from"./select-Bgl6IAYG.js";import{t as f}from"./plus-DMni1ZkC.js";import{t as te}from"./trash-DHuPKozD.js";import{n as p,t as m}from"./_id-UTIPU7Ql.js";import{t as h}from"./button-Bae9vdts.js";import{t as g}from"./input-CpcyJw4R.js";import{C as _}from"./ec2-DJL24ekw.js";import{F as v,c as ne,et as y,l as b,tt as x}from"./ec2-DFivrtZe.js";import{t as S}from"./page-heading-M0NyqAmu.js";import{a as re,i as ie,n as ae,t as oe}from"./zod-VwMMRSfy.js";import{t as se}from"./error-banner-BcDqaPk7.js";import{r as C,s as ce,t as le}from"./field-ChkDR_wL.js";import{i as ue,l as de,n as fe,o as pe,r as me,s as he,t as ge}from"./alert-dialog-BYzNCmBp.js";import{t as w}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as T,t as E}from"./detail-row-CclMDqj8.js";import{x as _e}from"./ec2-CmqOirWQ.js";var ve=r(),D=t(n()),O=e();function k(e){if(!e||e===`-1`)return`All traffic`;let t=e.toUpperCase();return t===`TCP`||t===`UDP`||t===`ICMP`?t:e}function A(e,t,n){return!n||n===`-1`||e===void 0||t===void 0||e===-1&&t===-1?`All`:e===t?e.toString():`${e}-${t}`}function j(e){let t=(0,ve.c)(87),{open:n,onOpenChange:r,direction:i,groupId:a}=e,o=b(),ee=ne(),s=i===`ingress`?o:ee,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={resolver:oe(_e),defaultValues:{ipProtocol:`tcp`,fromPort:0,toPort:0,cidrIp:`0.0.0.0/0`}},t[0]=c):c=t[0];let{control:l,handleSubmit:u,register:d,reset:f,formState:te}=ie(c),{errors:p}=te,m;t[1]===l?m=t[2]:(m={control:l,name:`ipProtocol`},t[1]=l,t[2]=m);let h=re(m),_=h===`-1`||h===`icmp`,v;t[3]!==a||t[4]!==s||t[5]!==r||t[6]!==_||t[7]!==f?(v=async e=>{let t={groupId:a,ipProtocol:e.ipProtocol,fromPort:_?-1:e.fromPort,toPort:_?-1:e.toPort,cidrIp:e.cidrIp};await s.mutateAsync(t),f(),r(!1)},t[3]=a,t[4]=s,t[5]=r,t[6]=_,t[7]=f,t[8]=v):v=t[8];let y=v,x=i===`ingress`?`Inbound`:`Outbound`,S;t[9]===x?S=t[10]:(S=(0,O.jsx)(he,{children:(0,O.jsxs)(de,{children:[`Add `,x,` Rule`]})}),t[9]=x,t[10]=S);let w;t[11]===s.error?w=t[12]:(w=s.error&&(0,O.jsx)(se,{error:s.error,msg:`Failed to add rule`}),t[11]=s.error,t[12]=w);let T;t[13]!==u||t[14]!==y?(T=u(y),t[13]=u,t[14]=y,t[15]=T):T=t[15];let E;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,O.jsx)(ce,{children:(0,O.jsx)(`label`,{htmlFor:`ipProtocol`,children:`Protocol`})}),t[16]=E):E=t[16];let D;t[17]===l?D=t[18]:(D=(0,O.jsx)(ae,{control:l,name:`ipProtocol`,render:ye}),t[17]=l,t[18]=D);let k;t[19]===p.ipProtocol?k=t[20]:(k=(0,O.jsx)(C,{errors:[p.ipProtocol]}),t[19]=p.ipProtocol,t[20]=k);let A;t[21]!==D||t[22]!==k?(A=(0,O.jsxs)(le,{children:[E,D,k]}),t[21]=D,t[22]=k,t[23]=A):A=t[23];let j;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,O.jsx)(ce,{children:(0,O.jsx)(`label`,{htmlFor:`fromPort`,children:`From Port`})}),t[24]=j):j=t[24];let M=!!p.fromPort,N;t[25]===d?N=t[26]:(N=d(`fromPort`,{valueAsNumber:!0}),t[25]=d,t[26]=N);let P;t[27]!==_||t[28]!==M||t[29]!==N?(P=(0,O.jsx)(g,{"aria-invalid":M,disabled:_,id:`fromPort`,type:`number`,...N}),t[27]=_,t[28]=M,t[29]=N,t[30]=P):P=t[30];let F;t[31]===p.fromPort?F=t[32]:(F=(0,O.jsx)(C,{errors:[p.fromPort]}),t[31]=p.fromPort,t[32]=F);let I;t[33]!==P||t[34]!==F?(I=(0,O.jsxs)(le,{children:[j,P,F]}),t[33]=P,t[34]=F,t[35]=I):I=t[35];let L;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,O.jsx)(ce,{children:(0,O.jsx)(`label`,{htmlFor:`toPort`,children:`To Port`})}),t[36]=L):L=t[36];let be=!!p.toPort,R;t[37]===d?R=t[38]:(R=d(`toPort`,{valueAsNumber:!0}),t[37]=d,t[38]=R);let z;t[39]!==_||t[40]!==be||t[41]!==R?(z=(0,O.jsx)(g,{"aria-invalid":be,disabled:_,id:`toPort`,type:`number`,...R}),t[39]=_,t[40]=be,t[41]=R,t[42]=z):z=t[42];let B;t[43]===p.toPort?B=t[44]:(B=(0,O.jsx)(C,{errors:[p.toPort]}),t[43]=p.toPort,t[44]=B);let V;t[45]!==z||t[46]!==B?(V=(0,O.jsxs)(le,{children:[L,z,B]}),t[45]=z,t[46]=B,t[47]=V):V=t[47];let H;t[48]!==I||t[49]!==V?(H=(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[I,V]}),t[48]=I,t[49]=V,t[50]=H):H=t[50];let xe=i===`ingress`?`Source`:`Destination`,U;t[51]===xe?U=t[52]:(U=(0,O.jsx)(ce,{children:(0,O.jsxs)(`label`,{htmlFor:`cidrIp`,children:[xe,` CIDR`]})}),t[51]=xe,t[52]=U);let Se=!!p.cidrIp,W;t[53]===d?W=t[54]:(W=d(`cidrIp`),t[53]=d,t[54]=W);let G;t[55]!==Se||t[56]!==W?(G=(0,O.jsx)(g,{"aria-invalid":Se,id:`cidrIp`,placeholder:`0.0.0.0/0`,...W}),t[55]=Se,t[56]=W,t[57]=G):G=t[57];let K;t[58]===p.cidrIp?K=t[59]:(K=(0,O.jsx)(C,{errors:[p.cidrIp]}),t[58]=p.cidrIp,t[59]=K);let q;t[60]!==U||t[61]!==G||t[62]!==K?(q=(0,O.jsxs)(le,{children:[U,G,K]}),t[60]=U,t[61]=G,t[62]=K,t[63]=q):q=t[63];let J;t[64]!==A||t[65]!==H||t[66]!==q||t[67]!==T?(J=(0,O.jsxs)(`form`,{className:`space-y-4`,id:`add-rule-form`,onSubmit:T,children:[A,H,q]}),t[64]=A,t[65]=H,t[66]=q,t[67]=T,t[68]=J):J=t[68];let Y;t[69]!==s||t[70]!==f?(Y=(0,O.jsx)(me,{onClick:()=>{f(),s.reset()},children:`Cancel`}),t[69]=s,t[70]=f,t[71]=Y):Y=t[71];let Ce=s.isPending?`Adding…`:`Add Rule`,X;t[72]!==s.isPending||t[73]!==Ce?(X=(0,O.jsx)(fe,{disabled:s.isPending,form:`add-rule-form`,type:`submit`,children:Ce}),t[72]=s.isPending,t[73]=Ce,t[74]=X):X=t[74];let Z;t[75]!==Y||t[76]!==X?(Z=(0,O.jsxs)(pe,{children:[Y,X]}),t[75]=Y,t[76]=X,t[77]=Z):Z=t[77];let Q;t[78]!==J||t[79]!==Z||t[80]!==S||t[81]!==w?(Q=(0,O.jsxs)(ue,{children:[S,w,J,Z]}),t[78]=J,t[79]=Z,t[80]=S,t[81]=w,t[82]=Q):Q=t[82];let $;return t[83]!==r||t[84]!==n||t[85]!==Q?($=(0,O.jsx)(ge,{onOpenChange:r,open:n,children:Q}),t[83]=r,t[84]=n,t[85]=Q,t[86]=$):$=t[86],$}function ye(e){let{field:t}=e;return(0,O.jsxs)(d,{onValueChange:e=>{t.onChange(e)},value:t.value,children:[(0,O.jsx)(u,{className:`w-full`,id:`ipProtocol`,children:(0,O.jsx)(s,{})}),(0,O.jsxs)(l,{children:[(0,O.jsx)(c,{value:`tcp`,children:`TCP`}),(0,O.jsx)(c,{value:`udp`,children:`UDP`}),(0,O.jsx)(c,{value:`icmp`,children:`ICMP`}),(0,O.jsx)(c,{value:`-1`,children:`All traffic (-1)`})]})]})}function M(e){return[...(e.IpRanges??[]).map(e=>({kind:`cidr`,value:e.CidrIp??``})),...(e.UserIdGroupPairs??[]).map(e=>({kind:`group`,value:e.GroupId??``}))]}function N({rule:e,source:t,groupId:n,direction:r}){let i=x(),a=y(),o=r===`ingress`?i:a,[ee,s]=(0,D.useState)(!1),c=async()=>{try{await o.mutateAsync({groupId:n,ipProtocol:e.IpProtocol??`-1`,fromPort:e.FromPort??-1,toPort:e.ToPort??-1,...t.kind===`group`?{sourceGroupId:t.value}:{cidrIp:t.value}})}catch{}finally{s(!1)}},l=t.kind===`group`&&t.value===n?`${t.value} (this security group)`:t.value;return(0,O.jsxs)(`div`,{className:`space-y-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between border-b px-4 py-3 last:border-b-0`,children:[(0,O.jsxs)(`div`,{className:`grid flex-1 grid-cols-3 gap-4 text-sm`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`text-muted-foreground`,children:`Protocol: `}),k(e.IpProtocol)]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`text-muted-foreground`,children:`Port Range: `}),A(e.FromPort,e.ToPort,e.IpProtocol)]}),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[r===`ingress`?`Source`:`Destination`,`:`,` `]}),l]})]}),(0,O.jsxs)(h,{disabled:o.isPending,onClick:()=>{s(!0)},size:`icon-xs`,variant:`ghost`,children:[(0,O.jsx)(p,{className:`size-3`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Remove rule`})]})]}),o.error&&(0,O.jsx)(`div`,{className:`px-4 pb-2`,children:(0,O.jsx)(se,{error:o.error,msg:`Failed to remove rule`})}),(0,O.jsx)(w,{confirmLabel:`Remove`,description:`Remove the ${r===`ingress`?`inbound`:`outbound`} rule (protocol ${k(e.IpProtocol)}, port range ${A(e.FromPort,e.ToPort,e.IpProtocol)}, ${r===`ingress`?`source`:`destination`} ${l}) from "${n}"?`,isPending:o.isPending,onConfirm:c,onOpenChange:s,open:ee,pendingLabel:`Removing…`,title:`Remove Rule`})]})}function P(){let{id:e}=m.useParams(),t=o(),{data:n}=i(_(e)),r=n.SecurityGroups?.[0],s=v(),[c,l]=(0,D.useState)(!1),[u,d]=(0,D.useState)(!1),[p,g]=(0,D.useState)(!1),ne=async()=>{try{await s.mutateAsync(e),t({to:`/ec2/describe-security-groups`})}finally{l(!1)}};if(!r?.GroupId)return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`Security group not found.`})]});let y=r.IpPermissions??[],b=r.IpPermissionsEgress??[];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),s.error&&(0,O.jsx)(se,{error:s.error,msg:`Failed to delete security group`}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsx)(S,{actions:(0,O.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,O.jsxs)(h,{onClick:()=>{l(!0)},size:`sm`,variant:`destructive`,children:[(0,O.jsx)(te,{className:`size-4`}),`Delete`]})}),subtitle:`Security Group Details`,title:r.GroupName?`${r.GroupId} (${r.GroupName})`:r.GroupId}),(0,O.jsxs)(T,{children:[(0,O.jsx)(T.Header,{children:`Security Group Information`}),(0,O.jsxs)(T.Content,{children:[(0,O.jsx)(E,{label:`Group ID`,value:r.GroupId}),(0,O.jsx)(E,{label:`Group Name`,value:r.GroupName}),(0,O.jsx)(E,{label:`Description`,value:r.Description}),(0,O.jsx)(E,{label:`VPC ID`,value:r.VpcId?(0,O.jsx)(a,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):`—`}),(0,O.jsx)(E,{label:`Owner ID`,value:r.OwnerId})]})]}),(0,O.jsxs)(T,{children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,O.jsxs)(`h2`,{className:`font-semibold`,children:[`Inbound Rules (`,y.length,`)`]}),(0,O.jsxs)(h,{onClick:()=>{d(!0)},size:`sm`,variant:`outline`,children:[(0,O.jsx)(f,{className:`size-4`}),`Add Rule`]})]}),y.length>0?(0,O.jsx)(`div`,{children:y.flatMap(e=>M(e).map(t=>(0,O.jsx)(N,{direction:`ingress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,O.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No inbound rules.`})]}),(0,O.jsxs)(T,{children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,O.jsxs)(`h2`,{className:`font-semibold`,children:[`Outbound Rules (`,b.length,`)`]}),(0,O.jsxs)(h,{onClick:()=>{g(!0)},size:`sm`,variant:`outline`,children:[(0,O.jsx)(f,{className:`size-4`}),`Add Rule`]})]}),b.length>0?(0,O.jsx)(`div`,{children:b.flatMap(e=>M(e).map(t=>(0,O.jsx)(N,{direction:`egress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,O.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No outbound rules.`})]})]}),(0,O.jsx)(w,{description:`Are you sure you want to delete the security group "${r.GroupId}"? This action cannot be undone.`,isPending:s.isPending,onConfirm:ne,onOpenChange:l,open:c,title:`Delete Security Group`}),(0,O.jsx)(j,{direction:`ingress`,groupId:r.GroupId,onOpenChange:d,open:u}),(0,O.jsx)(j,{direction:`egress`,groupId:r.GroupId,onOpenChange:g,open:p})]})}export{P as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BG6txAje.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CXkAE0jQ.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BG6txAje.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CXkAE0jQ.js index 520529659..0064dac7e 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BG6txAje.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CXkAE0jQ.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{E as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./back-link-DjawJm5W.js";import{t as s}from"./trash-DHuPKozD.js";import{t as c}from"./button-Bae9vdts.js";import{f as l}from"./ec2-DJL24ekw.js";import{O as u}from"./ec2-DFivrtZe.js";import{t as d}from"./_id-B8giJPUP.js";import{t as f}from"./page-heading-M0NyqAmu.js";import{t as p}from"./error-banner-BcDqaPk7.js";import{t as m}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as h,t as g}from"./detail-row-CclMDqj8.js";var _=t(n()),v=e();function y(){let{id:e}=d.useParams(),t=i(),{data:n}=r(l(e)),y=n.KeyPairs?.[0],b=u(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o,{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=a(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(p,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(f,{actions:(0,v.jsxs)(c,{onClick:()=>{S(!0)},size:`sm`,variant:`destructive`,children:[(0,v.jsx)(s,{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}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{E as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./back-link-DjawJm5W.js";import{t as s}from"./trash-DHuPKozD.js";import{t as c}from"./button-Bae9vdts.js";import{f as l}from"./ec2-DJL24ekw.js";import{O as u}from"./ec2-iXujaheD.js";import{t as d}from"./_id-BXvaEM7B.js";import{t as f}from"./page-heading-M0NyqAmu.js";import{t as p}from"./error-banner-BcDqaPk7.js";import{t as m}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as h,t as g}from"./detail-row-CclMDqj8.js";var _=t(n()),v=e();function y(){let{id:e}=d.useParams(),t=i(),{data:n}=r(l(e)),y=n.KeyPairs?.[0],b=u(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o,{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=a(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(p,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(f,{actions:(0,v.jsxs)(c,{onClick:()=>{S(!0)},size:`sm`,variant:`destructive`,children:[(0,v.jsx)(s,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BFiWwc3U.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CZhTTYNn.js similarity index 85% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BFiWwc3U.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CZhTTYNn.js index 7331136ce..f277da057 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BFiWwc3U.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CZhTTYNn.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-CaeeEov0.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/badge-BYQj3YeB.js","assets/useRender-DyI7F-Qi.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js","assets/ec2-CmqOirWQ.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{O as r,_ as i,d as a,x as o}from"./ec2-DJL24ekw.js";var s=e(`/_auth/ec2/(route-tables)/describe-route-tables/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...o(t.id),staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Route Table | Mulga`}]}),component:t(()=>n(()=>import(`./_id-CaeeEov0.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])),`component`)});export{s as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-yDbgsS1K.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/badge-BYQj3YeB.js","assets/useRender-DyI7F-Qi.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js","assets/ec2-Cr9GrTUU.js","assets/elbv2-B_G5anft.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{O as r,_ as i,d as a,x as o}from"./ec2-DJL24ekw.js";var s=e(`/_auth/ec2/(route-tables)/describe-route-tables/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...o(t.id),staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Route Table | Mulga`}]}),component:t(()=>n(()=>import(`./_id-yDbgsS1K.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])),`component`)});export{s as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-YzyaSfEH.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CaQBG_tF.js similarity index 81% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-YzyaSfEH.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CaQBG_tF.js index 3ae6a6a9e..d170b6f75 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-YzyaSfEH.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CaQBG_tF.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-feUT3qnC.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{g as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.id} | NAT Gateway | Mulga`}]}),component:t(()=>n(()=>import(`./_id-feUT3qnC.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{i as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-DXXFtZQq.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{g as r}from"./ec2-DJL24ekw.js";var i=e(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.id} | NAT Gateway | Mulga`}]}),component:t(()=>n(()=>import(`./_id-DXXFtZQq.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{i as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-UTIPU7Ql.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cho_Bq75.js similarity index 75% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-UTIPU7Ql.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cho_Bq75.js index bba6ab3dc..d4e95d7a3 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-UTIPU7Ql.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cho_Bq75.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-CCzBHuPA.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/plus-DMni1ZkC.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/ec2-CmqOirWQ.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{t as n}from"./createLucideIcon-DI_DJF-h.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{C as i}from"./ec2-DJL24ekw.js";var a={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};a.node;var o=n(a),s=e(`/_auth/ec2/(security-groups)/describe-security-groups/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...i(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.id} | Security Group | Mulga`}]}),component:t(()=>r(()=>import(`./_id-CCzBHuPA.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])),`component`)});export{o as n,s as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-C72MPTbM.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/plus-DMni1ZkC.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/ec2-Cr9GrTUU.js","assets/elbv2-B_G5anft.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{t as n}from"./createLucideIcon-DI_DJF-h.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{C as i}from"./ec2-DJL24ekw.js";var a={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};a.node;var o=n(a),s=e(`/_auth/ec2/(security-groups)/describe-security-groups/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...i(t.id),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.id} | Security Group | Mulga`}]}),component:t(()=>r(()=>import(`./_id-C72MPTbM.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])),`component`)});export{o as n,s as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-jyowKAL_.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cl2VpnIe.js similarity index 68% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-jyowKAL_.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cl2VpnIe.js index 28b2cf2e9..7a37d5d48 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-jyowKAL_.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cl2VpnIe.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BrlJkVbk.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/pencil-Cx6ej4Kx.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/acm-BGw6nz9A.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/certificate-import-dialog-CGT29fMd.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/ec2-DJL24ekw.js","assets/elbv2-CBiYqcpA.js","assets/commandBuilder-C5yeyMcZ.js","assets/elbv2-19pV3l7Z.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/elbv2-D92OK4oO.js","assets/attributes-editor-D0211674.js","assets/tags-editor-CGAehu-w.js","assets/plus-DMni1ZkC.js","assets/tabs-CAMCnrj7.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{O as i}from"./ec2-DJL24ekw.js";import{i as a,n as o,r as s,s as c,u as l}from"./elbv2-19pV3l7Z.js";var u=e(`/_auth/ec2/(load-balancers)/describe-load-balancers/$id`)({loader:async({context:e,params:t})=>{let r=n(t.id);await Promise.all([e.queryClient.query({...a(r),staleTime:`static`}),e.queryClient.query({...o(r),staleTime:`static`}),e.queryClient.query({...s(r),staleTime:`static`}),e.queryClient.query({...c([r]),staleTime:`static`}),e.queryClient.query({...l,staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${n(e.id)} | Load Balancer | Mulga`}]}),component:t(()=>r(()=>import(`./_id-BrlJkVbk.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54])),`component`)});export{u as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-Dkl-AQwo.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/pencil-Cx6ej4Kx.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/acm-BGw6nz9A.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/listener-form-y_owZS3C.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/elbv2-B_G5anft.js","assets/ec2-DJL24ekw.js","assets/elbv2-CBiYqcpA.js","assets/commandBuilder-C5yeyMcZ.js","assets/elbv2-19pV3l7Z.js","assets/page-heading-M0NyqAmu.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/attributes-editor-D0211674.js","assets/tags-editor-CGAehu-w.js","assets/plus-DMni1ZkC.js","assets/tabs-CAMCnrj7.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{O as i}from"./ec2-DJL24ekw.js";import{i as a,n as o,r as s,s as c,u as l}from"./elbv2-19pV3l7Z.js";var u=e(`/_auth/ec2/(load-balancers)/describe-load-balancers/$id`)({loader:async({context:e,params:t})=>{let r=n(t.id);await Promise.all([e.queryClient.query({...a(r),staleTime:`static`}),e.queryClient.query({...o(r),staleTime:`static`}),e.queryClient.query({...s(r),staleTime:`static`}),e.queryClient.query({...c([r]),staleTime:`static`}),e.queryClient.query({...l,staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${n(e.id)} | Load Balancer | Mulga`}]}),component:t(()=>r(()=>import(`./_id-Dkl-AQwo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54])),`component`)});export{u as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CEXDg-b_.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CmJP1sd4.js similarity index 91% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CEXDg-b_.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CmJP1sd4.js index a0145e52e..377629062 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CEXDg-b_.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CmJP1sd4.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-DkieDCBQ.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/rds-DnVYe-Nj.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/rds-BKbEDMHo.js","assets/queryOptions-Dfvzj6n2.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/tabs-CAMCnrj7.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/delete-db-snapshot-dialog-CD5YShBB.js","assets/rds-hO6CGpr0.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/rds-events-panel-0IRk0Dqj.js","assets/rds-tags-tab-COIsvcce.js","assets/useQuery-DVjCHx2S.js","assets/tags-editor-CGAehu-w.js","assets/plus-DMni1ZkC.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{g as i,i as a,p as o}from"./rds-BKbEDMHo.js";var s=e(`/_auth/rds/(snapshots)/describe-db-snapshots/$id`)({loader:async({context:e,params:t})=>{let r=n(t.id),[s]=await Promise.all([e.queryClient.query({...a(r),staleTime:`static`}),e.queryClient.query({...o(r),staleTime:`static`})]),c=s.DBSnapshots?.[0]?.DBSnapshotArn??``;c!==``&&await e.queryClient.query({...i(c),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${n(e.id)} | RDS | Mulga`}]}),component:t(()=>r(()=>import(`./_id-DkieDCBQ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),`component`)});export{s as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-B7I_2hid.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/rds-DnVYe-Nj.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/rds-BKbEDMHo.js","assets/queryOptions-Dfvzj6n2.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/tabs-CAMCnrj7.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/delete-db-snapshot-dialog-CD5YShBB.js","assets/rds-hO6CGpr0.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/rds-events-panel-0IRk0Dqj.js","assets/rds-tags-tab-COIsvcce.js","assets/useQuery-DVjCHx2S.js","assets/tags-editor-CGAehu-w.js","assets/plus-DMni1ZkC.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{g as i,i as a,p as o}from"./rds-BKbEDMHo.js";var s=e(`/_auth/rds/(snapshots)/describe-db-snapshots/$id`)({loader:async({context:e,params:t})=>{let r=n(t.id),[s]=await Promise.all([e.queryClient.query({...a(r),staleTime:`static`}),e.queryClient.query({...o(r),staleTime:`static`})]),c=s.DBSnapshots?.[0]?.DBSnapshotArn??``;c!==``&&await e.queryClient.query({...i(c),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${n(e.id)} | RDS | Mulga`}]}),component:t(()=>r(()=>import(`./_id-B7I_2hid.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),`component`)});export{s as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DY6kdRSk.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DHAyVS2z.js similarity index 91% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DY6kdRSk.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DHAyVS2z.js index 768121cad..5e7e6f544 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DY6kdRSk.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DHAyVS2z.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-B_mVxzMX.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/back-link-DjawJm5W.js","assets/check-DKS02ExQ.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/copy-3Ip4Zkw5.js","assets/network-DNraRZY6.js","assets/rotate-cw-BEktaUIR.js","assets/trash-DHuPKozD.js","assets/triangle-alert-Jc46kC7J.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/iam-Fo1DnIKB.js","assets/commandBuilder-CivibiZ7.js","assets/json-DGqns_nK.js","assets/admin-B1g5ktL3.js","assets/signed-fetch-BHraeSLO.js","assets/use-admin--3prNhUW.js","assets/sts-BM0Odtlr.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/ami-details-COgMA7Qb.js","assets/gpu-instance-type-select-Dr56r-me.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{a as r,c as i,s as a}from"./ec2-DJL24ekw.js";var o=e(`/_auth/ec2/(instances)/describe-instances/$id`)({loader:async({context:e,params:t})=>{let[n]=await Promise.all([e.queryClient.query({...a(t.id),staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`})]),o=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.query({...r(o),staleTime:`static`}),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??`Instance`} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-B_mVxzMX.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58])),`component`)});export{o as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BgOMx6S7.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/back-link-DjawJm5W.js","assets/check-DKS02ExQ.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/copy-3Ip4Zkw5.js","assets/network-DNraRZY6.js","assets/rotate-cw-BEktaUIR.js","assets/trash-DHuPKozD.js","assets/triangle-alert-Jc46kC7J.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/iam-Fo1DnIKB.js","assets/commandBuilder-CivibiZ7.js","assets/json-DGqns_nK.js","assets/admin-B1g5ktL3.js","assets/signed-fetch-BHraeSLO.js","assets/use-admin--3prNhUW.js","assets/sts-BM0Odtlr.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/ami-details-COgMA7Qb.js","assets/gpu-instance-type-select-Dr56r-me.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{a as r,c as i,s as a}from"./ec2-DJL24ekw.js";var o=e(`/_auth/ec2/(instances)/describe-instances/$id`)({loader:async({context:e,params:t})=>{let[n]=await Promise.all([e.queryClient.query({...a(t.id),staleTime:`static`}),e.queryClient.query({...i,staleTime:`static`})]),o=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.query({...r(o),staleTime:`static`}),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??`Instance`} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BgOMx6S7.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58])),`component`)});export{o as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-feUT3qnC.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DXXFtZQq.js similarity index 93% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-feUT3qnC.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DXXFtZQq.js index 775204bed..79f7f6ad6 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-feUT3qnC.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DXXFtZQq.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{g as u}from"./ec2-DJL24ekw.js";import{j as d}from"./ec2-DFivrtZe.js";import{t as f}from"./_id-YzyaSfEH.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{t as m}from"./error-banner-BcDqaPk7.js";import{t as h}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as g,t as _}from"./detail-row-CclMDqj8.js";import{t as v}from"./state-badge-BD9XGBez.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=d(),[S,C]=(0,y.useState)(!1),w=n.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(e),t({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{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=o(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(m,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(p,{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)(c,{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)(i,{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)(i,{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)(i,{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}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{g as u}from"./ec2-DJL24ekw.js";import{j as d}from"./ec2-iXujaheD.js";import{t as f}from"./_id-CaQBG_tF.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{t as m}from"./error-banner-BcDqaPk7.js";import{t as h}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as g,t as _}from"./detail-row-CclMDqj8.js";import{t as v}from"./state-badge-BiFj5bbX.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=d(),[S,C]=(0,y.useState)(!1),w=n.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(e),t({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{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=o(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(m,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(p,{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)(c,{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)(i,{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)(i,{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)(i,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dkl-AQwo.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dkl-AQwo.js new file mode 100644 index 000000000..d48f203a1 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dkl-AQwo.js @@ -0,0 +1 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{E as o,M as s,j as c,k as l}from"./httpRequest-Bc1WZmsd.js";import{t as u}from"./back-link-DjawJm5W.js";import{c as d,i as f,n as p,s as m,t as h}from"./select-Bgl6IAYG.js";import{t as g}from"./pencil-Cx6ej4Kx.js";import{t as _}from"./trash-DHuPKozD.js";import{t as v}from"./button-Bae9vdts.js";import{t as y}from"./input-CpcyJw4R.js";import{t as b}from"./acm-BGw6nz9A.js";import{t as x}from"./listener-form-y_owZS3C.js";import{O as S,w as C}from"./ec2-DJL24ekw.js";import{_ as w,a as T,d as E,f as D,g as O,h as k,o as A,r as j,s as M,t as N,u as P}from"./elbv2-CBiYqcpA.js";import{i as F,n as I,o as L,r as R,s as z,t as B,u as V}from"./elbv2-19pV3l7Z.js";import{t as H}from"./_id-Cl2VpnIe.js";import{t as ee}from"./page-heading-M0NyqAmu.js";import{i as te,n as ne,r as re,t as ie}from"./zod-VwMMRSfy.js";import{t as U}from"./error-banner-BcDqaPk7.js";import{r as ae,s as oe,t as se}from"./field-ChkDR_wL.js";import{a as ce,i as le,l as ue,n as de,o as fe,r as pe,s as me,t as he}from"./alert-dialog-BYzNCmBp.js";import{t as W}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as G,t as K}from"./detail-row-CclMDqj8.js";import{t as q}from"./state-badge-BiFj5bbX.js";import{c as J,i as ge,n as Y,o as X,s as Z}from"./elbv2-B_G5anft.js";import{n as _e,t as ve}from"./attributes-editor-D0211674.js";import{t as ye}from"./tags-editor-CGAehu-w.js";import{i as be,n as xe,r as Se,t as Ce}from"./tabs-CAMCnrj7.js";var we=r(),Q=t(n(),1),$=e();function Te({listenerArn:e,targetGroups:t}){let{data:n}=i(B(e)),r=j(),a=D(),o=M(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),[d,f]=(0,Q.useState)(),p=n.Rules??[],m=new Map;for(let e of t)e.TargetGroupArn&&e.TargetGroupName&&m.set(e.TargetGroupArn,e.TargetGroupName);return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[r.error&&(0,$.jsx)(U,{error:r.error,msg:`Failed to create rule`}),a.error&&(0,$.jsx)(U,{error:a.error,msg:`Failed to modify rule`}),o.error&&(0,$.jsx)(U,{error:o.error,msg:`Failed to delete rule`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[p.length,` rule`,p.length===1?``:`s`,` (including default)`]}),(0,$.jsx)(v,{onClick:()=>{c(!0)},size:`sm`,children:`Add rule`})]}),(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Priority`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Conditions`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Forward to`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:p.map(e=>(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Priority}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Ee(e.Conditions,e.IsDefault===!0)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Oe(e,m)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:e.IsDefault===!0?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Edit via listener`}):(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(v,{"aria-label":`Edit rule ${e.Priority}`,onClick:()=>{u(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(g,{className:`size-4`})}),(0,$.jsx)(v,{"aria-label":`Delete rule ${e.Priority}`,onClick:()=>{f(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(_,{className:`size-4`})})]})})]},e.RuleArn??e.Priority??`default`))})]})}),s&&(0,$.jsx)(Ne,{isPending:r.isPending,mode:`add`,onOpenChange:c,onSubmit:async t=>{try{await r.mutateAsync({listenerArn:e,priority:t.priority,conditions:t.conditions.map(ke),forwardTargetGroupArn:t.forwardTargetGroupArn}),c(!1)}catch{}},open:s,targetGroups:t}),(0,$.jsx)(Ne,{initialRule:l,isPending:a.isPending,mode:`edit`,onOpenChange:e=>{e||u(void 0)},onSubmit:async t=>{if(l?.RuleArn)try{await a.mutateAsync({ruleArn:l.RuleArn,listenerArn:e,conditions:t.conditions.map(ke),forwardTargetGroupArn:t.forwardTargetGroupArn}),u(void 0)}catch{}},open:l!==void 0,targetGroups:t}),(0,$.jsx)(W,{description:d?`Delete rule with priority ${d.Priority}? This cannot be undone.`:``,isPending:o.isPending,onConfirm:async()=>{if(d?.RuleArn)try{await o.mutateAsync({ruleArn:d.RuleArn,listenerArn:e})}finally{f(void 0)}},onOpenChange:e=>{e||f(void 0)},open:d!==void 0,title:`Delete rule`})]})}function Ee(e,t){return t?`default`:!e||e.length===0?`—`:e.map(e=>{let t=De(e);return`${e.Field}: ${t.join(`, `)}`}).join(` AND `)}function De(e){if(e.Field===void 0)return e.Values??[];switch(e.Field){case`host-header`:return e.HostHeaderConfig?.Values??e.Values??[];case`path-pattern`:return e.PathPatternConfig?.Values??e.Values??[];case`http-header`:{let t=e.HttpHeaderConfig?.HttpHeaderName??`?`;return(e.HttpHeaderConfig?.Values??[]).map(e=>`${t}=${e}`)}case`http-request-method`:return e.HttpRequestMethodConfig?.Values??[];case`source-ip`:return e.SourceIpConfig?.Values??[];case`query-string`:return(e.QueryStringConfig?.Values??[]).map(e=>e.Key?`${e.Key}=${e.Value??``}`:e.Value??``);default:return e.Values??[]}}function Oe(e,t){let n=e.Actions?.[0];return n?n.Type===`forward`&&n.TargetGroupArn?t.get(n.TargetGroupArn)??n.TargetGroupArn:n.Type??`—`:`—`}function ke(e){let t=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);return e.field===`query-string`?{field:e.field,values:[],queryStringPairs:t.map(e=>{let t=e.indexOf(`=`);return t===-1?{value:e}:{key:e.slice(0,t),value:e.slice(t+1)}})}:{field:e.field,values:t,httpHeaderName:e.httpHeaderName}}var Ae=1,je=[{field:`path-pattern`,rawValues:``}];function Me(e){let t=Number(e.Priority??Ae),n=e.Conditions?.map(e=>ze(e))??[];return{priority:Number.isFinite(t)?t:Ae,conditions:n.length>0?n:je,forwardTargetGroupArn:e.Actions?.[0]?.TargetGroupArn??``}}function Ne(e){let t=(0,we.c)(83),{open:n,onOpenChange:r,onSubmit:i,isPending:a,targetGroups:o,mode:s,initialRule:c}=e,l,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=ie(ge),u={priority:Ae,conditions:je,forwardTargetGroupArn:``},t[0]=l,t[1]=u):(l=t[0],u=t[1]);let f;t[2]===c?f=t[3]:(f=c?Me(c):void 0,t[2]=c,t[3]=f);let g;t[4]===f?g=t[5]:(g={resolver:l,defaultValues:u,values:f},t[4]=f,t[5]=g);let _=te(g),b;t[6]===_.control?b=t[7]:(b={control:_.control,name:`conditions`},t[6]=_.control,t[7]=b);let{fields:x,append:S,remove:C}=re(b),w;t[8]!==_||t[9]!==i?(w=_.handleSubmit(i),t[8]=_,t[9]=i,t[10]=w):w=t[10];let T=w,E=s===`add`?`Add rule`:`Edit rule`,D;t[11]===E?D=t[12]:(D=(0,$.jsx)(ue,{children:E}),t[11]=E,t[12]=D);let O;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(ce,{children:`Routing rules match incoming requests and forward them to a target group. Rules evaluate in priority order; the listener default applies when no rule matches.`}),t[13]=O):O=t[13];let k;t[14]===D?k=t[15]:(k=(0,$.jsxs)(me,{children:[D,O]}),t[14]=D,t[15]=k);let A;t[16]===T?A=t[17]:(A=e=>{e.preventDefault(),T()},t[16]=T,t[17]=A);let j;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(oe,{children:(0,$.jsx)(`label`,{htmlFor:`rule-priority`,children:`Priority`})}),t[18]=j):j=t[18];let M=!!_.formState.errors.priority,N;t[19]===_?N=t[20]:(N=_.register(`priority`,{valueAsNumber:!0}),t[19]=_,t[20]=N);let P;t[21]!==M||t[22]!==N?(P=(0,$.jsx)(y,{"aria-invalid":M,id:`rule-priority`,inputMode:`numeric`,type:`number`,...N}),t[21]=M,t[22]=N,t[23]=P):P=t[23];let F;t[24]===_.formState.errors.priority?F=t[25]:(F=(0,$.jsx)(ae,{errors:[_.formState.errors.priority]}),t[24]=_.formState.errors.priority,t[25]=F);let I;t[26]!==P||t[27]!==F?(I=(0,$.jsxs)(se,{children:[j,P,F]}),t[26]=P,t[27]=F,t[28]=I):I=t[28];let L;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(oe,{children:`Conditions`}),t[29]=L):L=t[29];let R=x.length>=5,z;t[30]===S?z=t[31]:(z=()=>{S({field:`path-pattern`,rawValues:``})},t[30]=S,t[31]=z);let B;t[32]!==R||t[33]!==z?(B=(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,(0,$.jsx)(v,{disabled:R,onClick:z,size:`sm`,type:`button`,variant:`outline`,children:`Add condition`})]}),t[32]=R,t[33]=z,t[34]=B):B=t[34];let V;if(t[35]!==x||t[36]!==_||t[37]!==C){let e;t[39]!==x.length||t[40]!==_||t[41]!==C?(e=(e,t)=>(0,$.jsx)(Fe,{form:_,index:t,onRemove:x.length>1?()=>{C(t)}:void 0},e.id),t[39]=x.length,t[40]=_,t[41]=C,t[42]=e):e=t[42],V=x.map(e),t[35]=x,t[36]=_,t[37]=C,t[38]=V}else V=t[38];let H;t[43]!==B||t[44]!==V?(H=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[B,V]}),t[43]=B,t[44]=V,t[45]=H):H=t[45];let ee;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(oe,{children:(0,$.jsx)(`label`,{htmlFor:`rule-forward-tg`,children:`Forward to target group`})}),t[46]=ee):ee=t[46];let U;t[47]!==_.formState.errors.forwardTargetGroupArn||t[48]!==o?(U=e=>{let{field:t}=e;return(0,$.jsxs)(h,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(m,{"aria-invalid":!!_.formState.errors.forwardTargetGroupArn,className:`w-full`,id:`rule-forward-tg`,children:(0,$.jsx)(d,{placeholder:`Select target group`})}),(0,$.jsx)(p,{children:o.map(Pe)})]})},t[47]=_.formState.errors.forwardTargetGroupArn,t[48]=o,t[49]=U):U=t[49];let W;t[50]!==_.control||t[51]!==U?(W=(0,$.jsx)(ne,{control:_.control,name:`forwardTargetGroupArn`,render:U}),t[50]=_.control,t[51]=U,t[52]=W):W=t[52];let G;t[53]===_.formState.errors.forwardTargetGroupArn?G=t[54]:(G=(0,$.jsx)(ae,{errors:[_.formState.errors.forwardTargetGroupArn]}),t[53]=_.formState.errors.forwardTargetGroupArn,t[54]=G);let K;t[55]!==W||t[56]!==G?(K=(0,$.jsxs)(se,{children:[ee,W,G]}),t[55]=W,t[56]=G,t[57]=K):K=t[57];let q;t[58]!==A||t[59]!==I||t[60]!==H||t[61]!==K?(q=(0,$.jsxs)(`form`,{className:`min-w-0 space-y-4`,onSubmit:A,children:[I,H,K]}),t[58]=A,t[59]=I,t[60]=H,t[61]=K,t[62]=q):q=t[62];let J;t[63]===a?J=t[64]:(J=(0,$.jsx)(pe,{disabled:a,children:`Cancel`}),t[63]=a,t[64]=J);let Y;t[65]!==a||t[66]!==s?(Y=Be(s,a),t[65]=a,t[66]=s,t[67]=Y):Y=t[67];let X;t[68]!==T||t[69]!==a||t[70]!==Y?(X=(0,$.jsx)(de,{disabled:a,onClick:T,children:Y}),t[68]=T,t[69]=a,t[70]=Y,t[71]=X):X=t[71];let Z;t[72]!==J||t[73]!==X?(Z=(0,$.jsxs)(fe,{children:[J,X]}),t[72]=J,t[73]=X,t[74]=Z):Z=t[74];let _e;t[75]!==k||t[76]!==q||t[77]!==Z?(_e=(0,$.jsxs)(le,{width:`xl`,children:[k,q,Z]}),t[75]=k,t[76]=q,t[77]=Z,t[78]=_e):_e=t[78];let ve;return t[79]!==r||t[80]!==n||t[81]!==_e?(ve=(0,$.jsx)(he,{onOpenChange:r,open:n,children:_e}),t[79]=r,t[80]=n,t[81]=_e,t[82]=ve):ve=t[82],ve}function Pe(e){return(0,$.jsxs)(f,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function Fe(e){let t=(0,we.c)(54),{form:n,index:r,onRemove:i}=e,a,o,s,c,l,u,g,b,x,S;if(t[0]!==n||t[1]!==r||t[2]!==i){let e=n.watch(`conditions.${r}.field`);s=n.formState.errors.conditions?.[r],b=`space-y-2 rounded-md border p-3`;let C=`rule-cond-${r}-field`,w;t[13]===C?w=t[14]:(w=(0,$.jsx)(oe,{children:(0,$.jsx)(`label`,{htmlFor:C,children:`Type`})}),t[13]=C,t[14]=w);let T=`conditions.${r}.field`,E;t[15]===r?E=t[16]:(E=e=>{let{field:t}=e;return(0,$.jsxs)(h,{onValueChange:t.onChange,value:t.value,children:[(0,$.jsx)(m,{className:`w-full`,id:`rule-cond-${r}-field`,children:(0,$.jsx)(d,{})}),(0,$.jsxs)(p,{children:[(0,$.jsx)(f,{value:`path-pattern`,children:`Path pattern`}),(0,$.jsx)(f,{value:`host-header`,children:`Host header`}),(0,$.jsx)(f,{value:`http-header`,children:`HTTP header`}),(0,$.jsx)(f,{value:`http-request-method`,children:`HTTP method`}),(0,$.jsx)(f,{value:`source-ip`,children:`Source IP CIDR`}),(0,$.jsx)(f,{value:`query-string`,children:`Query string`})]})]})},t[15]=r,t[16]=E);let D;t[17]!==n.control||t[18]!==T||t[19]!==E?(D=(0,$.jsx)(ne,{control:n.control,name:T,render:E}),t[17]=n.control,t[18]=T,t[19]=E,t[20]=D):D=t[20];let O;t[21]!==D||t[22]!==w?(O=(0,$.jsxs)(`div`,{className:`flex-1`,children:[w,D]}),t[21]=D,t[22]=w,t[23]=O):O=t[23];let k;t[24]!==r||t[25]!==i?(k=i&&(0,$.jsx)(v,{"aria-label":`Remove condition ${r+1}`,className:`self-end`,onClick:i,size:`sm`,type:`button`,variant:`ghost`,children:(0,$.jsx)(_,{className:`size-4`})}),t[24]=r,t[25]=i,t[26]=k):k=t[26],t[27]!==O||t[28]!==k?(x=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[O,k]}),t[27]=O,t[28]=k,t[29]=x):x=t[29],S=e===`http-header`&&(0,$.jsxs)(se,{children:[(0,$.jsx)(oe,{children:(0,$.jsx)(`label`,{htmlFor:`rule-cond-${r}-hdr-name`,children:`Header name`})}),(0,$.jsx)(y,{"aria-invalid":!!s?.httpHeaderName,id:`rule-cond-${r}-hdr-name`,placeholder:`X-Tenant`,...n.register(`conditions.${r}.httpHeaderName`)}),(0,$.jsx)(ae,{errors:[s?.httpHeaderName]})]}),o=se;let A=`rule-cond-${r}-values`,j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`(comma or newline separated, max 5)`}),t[30]=j):j=t[30],t[31]===A?g=t[32]:(g=(0,$.jsx)(oe,{children:(0,$.jsxs)(`label`,{htmlFor:A,children:[`Values`,` `,j]})}),t[31]=A,t[32]=g),a=y,c=!!s?.rawValues,l=`rule-cond-${r}-values`,u=Ie(e),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=g,t[10]=b,t[11]=x,t[12]=S}else a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],g=t[9],b=t[10],x=t[11],S=t[12];let C;t[33]!==n||t[34]!==r?(C=n.register(`conditions.${r}.rawValues`),t[33]=n,t[34]=r,t[35]=C):C=t[35];let w;t[36]!==a||t[37]!==c||t[38]!==l||t[39]!==u||t[40]!==C?(w=(0,$.jsx)(a,{"aria-invalid":c,id:l,placeholder:u,...C}),t[36]=a,t[37]=c,t[38]=l,t[39]=u,t[40]=C,t[41]=w):w=t[41];let T=s?.rawValues,E;t[42]===T?E=t[43]:(E=(0,$.jsx)(ae,{errors:[T]}),t[42]=T,t[43]=E);let D;t[44]!==o||t[45]!==E||t[46]!==g||t[47]!==w?(D=(0,$.jsxs)(o,{children:[g,w,E]}),t[44]=o,t[45]=E,t[46]=g,t[47]=w,t[48]=D):D=t[48];let O;return t[49]!==D||t[50]!==b||t[51]!==x||t[52]!==S?(O=(0,$.jsxs)(`div`,{className:b,children:[x,S,D]}),t[49]=D,t[50]=b,t[51]=x,t[52]=S,t[53]=O):O=t[53],O}function Ie(e){switch(e){case`path-pattern`:return`/api/*`;case`host-header`:return`*.example.com`;case`http-header`:return`acme`;case`http-request-method`:return`GET, POST`;case`source-ip`:return`10.0.0.0/8`;case`query-string`:return`key=value`;default:return``}}var Le=new Set([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]);function Re(e){return e!==void 0&&Le.has(e)}function ze(e){let t=De(e);return{field:Re(e.Field)?e.Field:`path-pattern`,httpHeaderName:e.HttpHeaderConfig?.HttpHeaderName,rawValues:t.join(`, `)}}function Be(e,t){return t?e===`add`?`Adding…`:`Saving…`:e===`add`?`Add rule`:`Save changes`}function Ve(e){return{protocol:X(e),port:80,defaultTargetGroupArn:``}}function He(e,t){let n=t.find(t=>t===e.Protocol)??t[0]??`HTTP`,r=Z(n);return{protocol:n,port:e.Port??80,defaultTargetGroupArn:e.DefaultActions?.[0]?.TargetGroupArn??``,certificateArn:r?e.Certificates?.[0]?.CertificateArn:void 0,sslPolicy:n===`HTTPS`?e.SslPolicy:void 0}}function Ue(e){if(e.Protocol!==`HTTPS`)return`—`;let t=e.Certificates?.[0]?.CertificateArn?.split(`/`).pop(),n=e.SslPolicy;return t&&n?`${n} · ${t}`:n??t??`—`}function We({loadBalancerArn:e,vpcId:t,lbType:n}){let r=J(n),{data:a}=i(I(e)),{data:o}=i(V),{data:s}=i(b),{data:c}=i(L),l=N(),u=T(),d=P(),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(),[y,x]=(0,Q.useState)(),[S,C]=(0,Q.useState)(),w=a.Listeners??[],E=o.TargetGroups??[],D=E.filter(e=>e.VpcId===t),O=s.CertificateSummaryList??[],k=c.SslPolicies??[],A=new Map;for(let e of E)e.TargetGroupArn&&e.TargetGroupName&&A.set(e.TargetGroupArn,e.TargetGroupName);let j=e=>{let t=e.DefaultActions?.[0];if(!t)return`—`;if(t.Type===`forward`&&t.TargetGroupArn){let e=A.get(t.TargetGroupArn);return e?`forward → ${e}`:`forward → ${t.TargetGroupArn}`}return t.Type??`—`};return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[l.error&&(0,$.jsx)(U,{error:l.error,msg:`Failed to create listener`}),d.error&&(0,$.jsx)(U,{error:d.error,msg:`Failed to modify listener`}),u.error&&(0,$.jsx)(U,{error:u.error,msg:`Failed to delete listener`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[w.length,` listener`,w.length===1?``:`s`]}),(0,$.jsx)(v,{onClick:()=>{p(!0)},size:`sm`,children:`Add listener`})]}),w.length===0?(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No listeners configured.`}):(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`TLS`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Default action`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Listener ARN`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:w.map(e=>{let t=e.ListenerArn??``,n=S===t;return(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol}),(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Port}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Ue(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:j(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(v,{"aria-label":`${n?`Hide`:`Show`} rules for listener ${e.Protocol}:${e.Port}`,onClick:()=>{C(n?void 0:t)},size:`sm`,variant:`ghost`,children:n?`Hide rules`:`Rules`}),(0,$.jsx)(v,{"aria-label":`Edit listener ${e.Protocol}:${e.Port}`,onClick:()=>{h(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(g,{className:`size-4`})}),(0,$.jsx)(v,{"aria-label":`Delete listener ${e.Protocol}:${e.Port}`,onClick:()=>{x(e)},size:`sm`,variant:`ghost`,children:(0,$.jsx)(_,{className:`size-4`})})]})})]}),n&&t&&(0,$.jsx)(`tr`,{className:`border-b bg-muted/30 last:border-0`,children:(0,$.jsx)(`td`,{className:`px-4 py-3`,colSpan:6,children:(0,$.jsx)(Te,{listenerArn:t,targetGroups:D})})})]},t)})})]})}),f&&(0,$.jsx)(Ge,{certificates:O,isPending:l.isPending,lbType:n,onOpenChange:p,onSubmit:async t=>{try{await l.mutateAsync({loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),p(!1)}catch{}},open:f,protocols:r,sslPolicies:k,targetGroups:D}),(0,$.jsx)(Ke,{certificates:O,isPending:d.isPending,listener:m,onOpenChange:e=>{e||h(void 0)},onSubmit:async t=>{if(m?.ListenerArn)try{await d.mutateAsync({listenerArn:m.ListenerArn,loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),h(void 0)}catch{}},protocols:r,sslPolicies:k,targetGroups:D}),(0,$.jsx)(W,{description:y?`Delete listener ${y.Protocol}:${y.Port}? This cannot be undone.`:``,isPending:u.isPending,onConfirm:async()=>{if(y?.ListenerArn)try{await u.mutateAsync(y.ListenerArn)}finally{x(void 0)}},onOpenChange:e=>{e||x(void 0)},open:y!==void 0,title:`Delete listener`})]})}function Ge(e){let t=(0,we.c)(36),{open:n,onOpenChange:r,lbType:i,protocols:a,targetGroups:o,certificates:s,sslPolicies:c,isPending:l,onSubmit:u}=e,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=ie(Y),t[0]=d):d=t[0];let f;t[1]===i?f=t[2]:(f=Ve(i),t[1]=i,t[2]=f);let p;t[3]===f?p=t[4]:(p={resolver:d,defaultValues:f},t[3]=f,t[4]=p);let m=te(p),h;t[5]!==m||t[6]!==u?(h=m.handleSubmit(u),t[5]=m,t[6]=u,t[7]=h):h=t[7];let g=h,_;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsxs)(me,{children:[(0,$.jsx)(ue,{children:`Add listener`}),(0,$.jsx)(ce,{children:`Listeners forward incoming traffic to a default target group.`})]}),t[8]=_):_=t[8];let v;t[9]===g?v=t[10]:(v=e=>{e.preventDefault(),g()},t[9]=g,t[10]=v);let y;t[11]!==s||t[12]!==m||t[13]!==a||t[14]!==c||t[15]!==o?(y=(0,$.jsx)(x,{certificates:s,form:m,protocols:a,sslPolicies:c,targetGroups:o}),t[11]=s,t[12]=m,t[13]=a,t[14]=c,t[15]=o,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:v,children:y}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let S;t[20]===l?S=t[21]:(S=(0,$.jsx)(pe,{disabled:l,children:`Cancel`}),t[20]=l,t[21]=S);let C=l?`Adding…`:`Add listener`,w;t[22]!==g||t[23]!==l||t[24]!==C?(w=(0,$.jsx)(de,{disabled:l,onClick:g,children:C}),t[22]=g,t[23]=l,t[24]=C,t[25]=w):w=t[25];let T;t[26]!==w||t[27]!==S?(T=(0,$.jsxs)(fe,{children:[S,w]}),t[26]=w,t[27]=S,t[28]=T):T=t[28];let E;t[29]!==T||t[30]!==b?(E=(0,$.jsxs)(le,{width:`md`,children:[_,b,T]}),t[29]=T,t[30]=b,t[31]=E):E=t[31];let D;return t[32]!==r||t[33]!==n||t[34]!==E?(D=(0,$.jsx)(he,{onOpenChange:r,open:n,children:E}),t[32]=r,t[33]=n,t[34]=E,t[35]=D):D=t[35],D}function Ke(e){let t=(0,we.c)(38),{listener:n,onOpenChange:r,protocols:i,targetGroups:a,certificates:o,sslPolicies:s,isPending:c,onSubmit:l}=e,u=n!==void 0,d,f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=ie(Y),f={protocol:`HTTP`,port:80,defaultTargetGroupArn:``},t[0]=d,t[1]=f):(d=t[0],f=t[1]);let p;t[2]!==n||t[3]!==i?(p=n?He(n,i):void 0,t[2]=n,t[3]=i,t[4]=p):p=t[4];let m;t[5]===p?m=t[6]:(m={resolver:d,defaultValues:f,values:p},t[5]=p,t[6]=m);let h=te(m),g;t[7]!==h||t[8]!==l?(g=h.handleSubmit(l),t[7]=h,t[8]=l,t[9]=g):g=t[9];let _=g,v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(me,{children:[(0,$.jsx)(ue,{children:`Edit listener`}),(0,$.jsx)(ce,{children:`Update port, protocol, or default target group. Changes apply without dropping the listener.`})]}),t[10]=v):v=t[10];let y;t[11]===_?y=t[12]:(y=e=>{e.preventDefault(),_()},t[11]=_,t[12]=y);let b;t[13]!==o||t[14]!==h||t[15]!==i||t[16]!==s||t[17]!==a?(b=(0,$.jsx)(x,{certificates:o,form:h,protocols:i,sslPolicies:s,targetGroups:a}),t[13]=o,t[14]=h,t[15]=i,t[16]=s,t[17]=a,t[18]=b):b=t[18];let S;t[19]!==y||t[20]!==b?(S=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:y,children:b}),t[19]=y,t[20]=b,t[21]=S):S=t[21];let C;t[22]===c?C=t[23]:(C=(0,$.jsx)(pe,{disabled:c,children:`Cancel`}),t[22]=c,t[23]=C);let w=c?`Saving…`:`Save changes`,T;t[24]!==_||t[25]!==c||t[26]!==w?(T=(0,$.jsx)(de,{disabled:c,onClick:_,children:w}),t[24]=_,t[25]=c,t[26]=w,t[27]=T):T=t[27];let E;t[28]!==C||t[29]!==T?(E=(0,$.jsxs)(fe,{children:[C,T]}),t[28]=C,t[29]=T,t[30]=E):E=t[30];let D;t[31]!==E||t[32]!==S?(D=(0,$.jsxs)(le,{width:`md`,children:[v,S,E]}),t[31]=E,t[32]=S,t[33]=D):D=t[33];let O;return t[34]!==r||t[35]!==u||t[36]!==D?(O=(0,$.jsx)(he,{onOpenChange:r,open:u,children:D}),t[34]=r,t[35]=u,t[36]=D,t[37]=O):O=t[37],O}function qe(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function Je(e){let t=(0,we.c)(48),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:c}=e,l;t[0]===r?l=t[1]:(l=[...r],t[0]=r,t[1]=l);let u=l,[d,f]=(0,Q.useState)(u),p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{f(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=p):p=t[2];let m=p,h;t[3]===u?h=t[4]:(h=()=>{f(u)},t[3]=u,t[4]=h);let g=h,_;t[5]!==u||t[6]!==d?(_=qe(d,u),t[5]=u,t[6]=d,t[7]=_):_=t[7];let y=!_,b=d.length===0,x;t[8]===d?x=t[9]:(x=new Set(d),t[8]=d,t[9]=x);let S=x,C;t[10]!==y||t[11]!==b||t[12]!==i||t[13]!==d?(C=e=>{e.preventDefault(),y&&!b&&i(d)},t[10]=y,t[11]=b,t[12]=i,t[13]=d,t[14]=C):C=t[14];let w;t[15]===o?w=t[16]:(w=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update security groups`}),t[15]=o,t[16]=w);let T;t[17]!==y||t[18]!==c?(T=c&&!y&&(0,$.jsx)(`output`,{className:`mb-4 block rounded-md border border-success bg-success/10 p-3 text-sm text-success-foreground`,children:`Security groups updated.`}),t[17]=y,t[18]=c,t[19]=T):T=t[19];let E;t[20]!==n||t[21]!==S?(E=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No security groups in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Security group ${s(e)}`,checked:S.has(e.GroupId??``),onChange:()=>{m(e.GroupId??``)},type:`checkbox`}),(0,$.jsx)(`span`,{className:`font-mono`,children:s(e)})]},e.GroupId)),t[20]=n,t[21]=S,t[22]=E):E=t[22];let D;t[23]===b?D=t[24]:(D=b&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one security group is required.`}),t[23]=b,t[24]=D);let O;t[25]!==D||t[26]!==E?(O=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[E,D]}),t[25]=D,t[26]=E,t[27]=O):O=t[27];let k=y?`Unsaved changes`:`No changes`,A;t[28]===k?A=t[29]:(A=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:k}),t[28]=k,t[29]=A);let j=a||!y,M;t[30]!==g||t[31]!==j?(M=(0,$.jsx)(v,{disabled:j,onClick:g,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[30]=g,t[31]=j,t[32]=M):M=t[32];let N=a||!y||b,P=a?`Saving…`:`Save changes`,F;t[33]!==N||t[34]!==P?(F=(0,$.jsx)(v,{disabled:N,size:`sm`,type:`submit`,children:P}),t[33]=N,t[34]=P,t[35]=F):F=t[35];let I;t[36]!==A||t[37]!==M||t[38]!==F?(I=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[A,M,F]}),t[36]=A,t[37]=M,t[38]=F,t[39]=I):I=t[39];let L;t[40]!==O||t[41]!==I?(L=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[O,I]}),t[40]=O,t[41]=I,t[42]=L):L=t[42];let R;return t[43]!==L||t[44]!==C||t[45]!==w||t[46]!==T?(R=(0,$.jsxs)(`form`,{onSubmit:C,children:[w,T,L]}),t[43]=L,t[44]=C,t[45]=w,t[46]=T,t[47]=R):R=t[47],R}function Ye(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function Xe(e){let t=l(e.Tags),n=e.AvailabilityZone?` · ${e.AvailabilityZone}`:``,r=e.CidrBlock?` (${e.CidrBlock})`:``;return`${e.SubnetId}${t?` — ${t}`:``}${r}${n}`}function Ze(e){let t=(0,we.c)(49),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,m;t[3]===l?m=t[4]:(m=()=>{d(l)},t[3]=l,t[4]=m);let h=m,g;t[5]!==l||t[6]!==u?(g=Ye(u,l),t[5]=l,t[6]=u,t[7]=g):g=t[7];let _=!g,y=u.length===0,b;t[8]===u?b=t[9]:(b=new Set(u),t[8]=u,t[9]=b);let x=b,S;t[10]!==_||t[11]!==y||t[12]!==i||t[13]!==u?(S=e=>{e.preventDefault(),_&&!y&&i(u)},t[10]=_,t[11]=y,t[12]=i,t[13]=u,t[14]=S):S=t[14];let C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-warning bg-warning/10 p-3 text-sm text-warning-foreground`,role:`note`,children:`Applying a subnet change re-homes the load balancer by relaunching its underlying system VM. Expect a brief data-plane interruption while it restarts.`}),t[15]=C):C=t[15];let w;t[16]===o?w=t[17]:(w=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update subnets`}),t[16]=o,t[17]=w);let T;t[18]!==_||t[19]!==s?(T=s&&!_&&(0,$.jsx)(`output`,{className:`mb-4 block rounded-md border border-success bg-success/10 p-3 text-sm text-success-foreground`,children:`Subnets updated.`}),t[18]=_,t[19]=s,t[20]=T):T=t[20];let E;t[21]!==n||t[22]!==x?(E=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnets in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:x.has(e.SubnetId??``),onChange:()=>{p(e.SubnetId??``)},type:`checkbox`}),(0,$.jsx)(`span`,{className:`font-mono`,children:Xe(e)})]},e.SubnetId)),t[21]=n,t[22]=x,t[23]=E):E=t[23];let D;t[24]===y?D=t[25]:(D=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one subnet is required.`}),t[24]=y,t[25]=D);let O;t[26]!==E||t[27]!==D?(O=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[E,D]}),t[26]=E,t[27]=D,t[28]=O):O=t[28];let k=_?`Unsaved changes`:`No changes`,A;t[29]===k?A=t[30]:(A=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:k}),t[29]=k,t[30]=A);let j=a||!_,M;t[31]!==h||t[32]!==j?(M=(0,$.jsx)(v,{disabled:j,onClick:h,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[31]=h,t[32]=j,t[33]=M):M=t[33];let N=a||!_||y,P=a?`Saving…`:`Save changes`,F;t[34]!==N||t[35]!==P?(F=(0,$.jsx)(v,{disabled:N,size:`sm`,type:`submit`,children:P}),t[34]=N,t[35]=P,t[36]=F):F=t[36];let I;t[37]!==A||t[38]!==M||t[39]!==F?(I=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[A,M,F]}),t[37]=A,t[38]=M,t[39]=F,t[40]=I):I=t[40];let L;t[41]!==O||t[42]!==I?(L=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[O,I]}),t[41]=O,t[42]=I,t[43]=L):L=t[43];let R;return t[44]!==L||t[45]!==S||t[46]!==w||t[47]!==T?(R=(0,$.jsxs)(`form`,{onSubmit:S,children:[C,w,T,L]}),t[44]=L,t[45]=S,t[46]=w,t[47]=T,t[48]=R):R=t[48],R}function Qe({arn:e}){let t=a(),{data:n}=i(F(e)),{data:r}=i(R(e)),{data:s}=i(z([e])),{data:c}=i(S),{data:d}=i(C),f=A(),p=E(),m=w(),h=k(),g=O(),[y,b]=(0,Q.useState)(!1),x=n.LoadBalancers?.[0];if(!x?.LoadBalancerArn)return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`Load balancer not found.`})]});let T=async()=>{try{await f.mutateAsync(e),t({to:`/ec2/describe-load-balancers`})}finally{b(!1)}},D=c.Subnets??[],j=e=>{let t=D.find(t=>t.SubnetId===e);if(!t)return e;let n=l(t.Tags),r=t.CidrBlock?` (${t.CidrBlock})`:``;return n?`${e} — ${n}${r}`:`${e}${r}`},M=r.Attributes??[],N=s?.TagDescriptions?.find(t=>t.ResourceArn===e)?.Tags??[],P=(x.SecurityGroups??[]).filter(e=>e!==void 0),I=(d.SecurityGroups??[]).filter(e=>e.VpcId===x.VpcId),L=D.filter(e=>e.VpcId===x.VpcId),B=(x.AvailabilityZones??[]).map(e=>e.SubnetId).filter(e=>e!==void 0),V=x.Type===`network`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),f.error&&(0,$.jsx)(U,{error:f.error,msg:`Failed to delete load balancer`}),(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsx)(ee,{actions:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(v,{onClick:()=>{b(!0)},size:`sm`,variant:`destructive`,children:[(0,$.jsx)(_,{className:`size-4`}),`Delete`]}),(0,$.jsx)(q,{state:x.State?.Code})]}),subtitle:`Load Balancer Details`,title:x.LoadBalancerName??x.LoadBalancerArn}),(0,$.jsxs)(Ce,{defaultValue:`overview`,children:[(0,$.jsxs)(xe,{children:[(0,$.jsx)(be,{value:`overview`,children:`Overview`}),(0,$.jsx)(be,{value:`listeners`,children:`Listeners`}),(0,$.jsx)(be,{value:`subnets`,children:`Subnets`}),!V&&(0,$.jsx)(be,{value:`security-groups`,children:`Security groups`}),(0,$.jsx)(be,{value:`attributes`,children:`Attributes`}),(0,$.jsx)(be,{value:`tags`,children:`Tags`})]}),(0,$.jsxs)(Se,{value:`overview`,children:[(0,$.jsxs)(G,{children:[(0,$.jsx)(G.Header,{children:`Load balancer`}),(0,$.jsxs)(G.Content,{children:[(0,$.jsx)(K,{label:`ARN`,value:x.LoadBalancerArn}),(0,$.jsx)(K,{label:`DNS name`,value:x.DNSName}),(0,$.jsx)(K,{label:`State`,value:x.State?.Reason?`${x.State.Code} — ${x.State.Reason}`:x.State?.Code}),(0,$.jsx)(K,{label:`Type`,value:x.Type}),(0,$.jsx)(K,{label:`Scheme`,value:x.Scheme}),(0,$.jsx)(K,{label:`IP address type`,value:x.IpAddressType}),(0,$.jsx)(K,{label:`VPC`,value:x.VpcId}),(0,$.jsx)(K,{label:`Created at`,value:o(x.CreatedTime)})]})]}),(0,$.jsxs)(G,{children:[(0,$.jsx)(G.Header,{children:`Availability zones`}),(0,$.jsx)(G.Content,{children:(x.AvailabilityZones??[]).map(e=>(0,$.jsx)(K,{label:e.ZoneName??`—`,value:e.SubnetId?j(e.SubnetId):void 0},`${e.ZoneName}-${e.SubnetId}`))})]}),(x.SecurityGroups??[]).length>0&&(0,$.jsxs)(G,{children:[(0,$.jsx)(G.Header,{children:`Security groups`}),(0,$.jsx)(G.Content,{children:(x.SecurityGroups??[]).map(e=>(0,$.jsx)(K,{label:`Security group`,value:e},e))})]})]}),(0,$.jsx)(Se,{value:`listeners`,children:(0,$.jsx)(We,{lbType:V?`network`:`application`,loadBalancerArn:e,vpcId:x.VpcId})}),(0,$.jsx)(Se,{value:`subnets`,children:(0,$.jsx)(Ze,{available:L,current:B,error:g.error,isPending:g.isPending,isSuccess:g.isSuccess,onSubmit:t=>{g.mutate({loadBalancerArn:e,subnetIds:t})}})}),!V&&(0,$.jsx)(Se,{value:`security-groups`,children:(0,$.jsx)(Je,{available:I,current:P,error:h.error,isPending:h.isPending,isSuccess:h.isSuccess,onSubmit:t=>{h.mutate({loadBalancerArn:e,securityGroupIds:t})}})}),(0,$.jsx)(Se,{value:`attributes`,children:(0,$.jsx)(ve,{attributes:M,error:p.error,isPending:p.isPending,isSuccess:p.isSuccess,onSubmit:t=>{p.mutate({loadBalancerArn:e,attributes:t})},specs:_e})}),(0,$.jsx)(Se,{value:`tags`,children:(0,$.jsx)(ye,{error:m.error,isPending:m.isPending,isSuccess:m.isSuccess,onSubmit:t=>{m.mutate({resourceArn:e,tags:t,initialKeys:N.map(e=>e.Key??``).filter(e=>e.length>0)})},tags:N})})]})]}),(0,$.jsx)(W,{description:`Are you sure you want to delete load balancer "${x.LoadBalancerName??x.LoadBalancerArn}"? This action cannot be undone.`,isPending:f.isPending,onConfirm:T,onOpenChange:b,open:y,title:`Delete load balancer`})]})}function $e(){let e=(0,we.c)(4),{id:t}=H.useParams(),n;e[0]===t?n=e[1]:(n=c(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,$.jsx)(Qe,{arn:n}),e[2]=n,e[3]=r),r}export{$e as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BVvKP72w.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dsjd39jS.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BVvKP72w.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dsjd39jS.js index a6ff6db6f..29cea2c5a 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BVvKP72w.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dsjd39jS.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{t as a}from"./input-CpcyJw4R.js";import{k as o}from"./ec2-DJL24ekw.js";import{X as s}from"./ec2-DFivrtZe.js";import{t as c}from"./_id-FEWgr3M8.js";import{t as l}from"./page-heading-M0NyqAmu.js";import{i as u,t as d}from"./zod-VwMMRSfy.js";import{t as f}from"./error-banner-BcDqaPk7.js";import{t as p}from"./form-actions-C3zG6ld2.js";import{r as m,s as h,t as g}from"./field-ChkDR_wL.js";import{y as _}from"./ec2-CmqOirWQ.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=c.useParams(),b=r(),x;e[0]===t?x=e[1]:(x=o(t),e[0]=t,e[1]=x);let{data:S}=n(x),C=S.Volumes?.[0],w=C?.VolumeId,T=s(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=d(_.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),e[2]=E,e[3]=D);let O;e[4]===E?O=e[5]:(O={size:E},e[4]=E,e[5]=O);let k;e[6]!==D||e[7]!==O?(k={resolver:D,defaultValues:O},e[6]=D,e[7]=O,e[8]=k):k=e[8];let{handleSubmit:A,register:j,formState:M}=u(k),{errors:N,isSubmitting:P}=M;if(!w){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),e[9]=t):t=e[9],t}let F;e[10]!==T||e[11]!==b||e[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[10]=T,e[11]=b,e[12]=w,e[13]=F):F=e[13];let I=F,L,R;e[14]===w?(L=e[15],R=e[16]):(L=(0,y.jsx)(i,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(l,{subtitle:w,title:`Resize Volume`}),e[14]=w,e[15]=L,e[16]=R);let z;e[17]===T.error?z=e[18]:(z=T.error&&(0,y.jsx)(f,{error:T.error,msg:`Failed to resize volume`}),e[17]=T.error,e[18]=z);let B;e[19]!==A||e[20]!==I?(B=A(I),e[19]=A,e[20]=I,e[21]=B):B=e[21];let V;e[22]===E?V=e[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`]})}),e[22]=E,e[23]=V);let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(h,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),e[24]=H):H=e[24];let U=!!N.size,W=E+1,G;e[25]===j?G=e[26]:(G=j(`size`,{valueAsNumber:!0}),e[25]=j,e[26]=G);let K;e[27]!==U||e[28]!==W||e[29]!==G?(K=(0,y.jsx)(a,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),e[27]=U,e[28]=W,e[29]=G,e[30]=K):K=e[30];let q;e[31]===N.size?q=e[32]:(q=(0,y.jsx)(m,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(g,{children:[H,K,q]}),e[33]=K,e[34]=q,e[35]=J):J=e[35];let Y;e[36]!==b||e[37]!==w?(Y=async()=>{await b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[36]=b,e[37]=w,e[38]=Y):Y=e[38];let X;e[39]!==P||e[40]!==T.isPending||e[41]!==Y?(X=(0,y.jsx)(p,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),e[39]=P,e[40]=T.isPending,e[41]=Y,e[42]=X):X=e[42];let Z;e[43]!==V||e[44]!==J||e[45]!==X||e[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),e[43]=V,e[44]=J,e[45]=X,e[46]=B,e[47]=Z):Z=e[47];let Q;return e[48]!==Z||e[49]!==L||e[50]!==R||e[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),e[48]=Z,e[49]=L,e[50]=R,e[51]=z,e[52]=Q):Q=e[52],Q}export{b as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{t as a}from"./input-CpcyJw4R.js";import{k as o}from"./ec2-DJL24ekw.js";import{X as s}from"./ec2-iXujaheD.js";import{t as c}from"./_id-BzF3654U.js";import{t as l}from"./page-heading-M0NyqAmu.js";import{i as u,t as d}from"./zod-VwMMRSfy.js";import{t as f}from"./error-banner-BcDqaPk7.js";import{t as p}from"./form-actions-C3zG6ld2.js";import{r as m,s as h,t as g}from"./field-ChkDR_wL.js";import{y as _}from"./ec2-Cr9GrTUU.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=c.useParams(),b=r(),x;e[0]===t?x=e[1]:(x=o(t),e[0]=t,e[1]=x);let{data:S}=n(x),C=S.Volumes?.[0],w=C?.VolumeId,T=s(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=d(_.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),e[2]=E,e[3]=D);let O;e[4]===E?O=e[5]:(O={size:E},e[4]=E,e[5]=O);let k;e[6]!==D||e[7]!==O?(k={resolver:D,defaultValues:O},e[6]=D,e[7]=O,e[8]=k):k=e[8];let{handleSubmit:A,register:j,formState:M}=u(k),{errors:N,isSubmitting:P}=M;if(!w){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),e[9]=t):t=e[9],t}let F;e[10]!==T||e[11]!==b||e[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[10]=T,e[11]=b,e[12]=w,e[13]=F):F=e[13];let I=F,L,R;e[14]===w?(L=e[15],R=e[16]):(L=(0,y.jsx)(i,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(l,{subtitle:w,title:`Resize Volume`}),e[14]=w,e[15]=L,e[16]=R);let z;e[17]===T.error?z=e[18]:(z=T.error&&(0,y.jsx)(f,{error:T.error,msg:`Failed to resize volume`}),e[17]=T.error,e[18]=z);let B;e[19]!==A||e[20]!==I?(B=A(I),e[19]=A,e[20]=I,e[21]=B):B=e[21];let V;e[22]===E?V=e[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`]})}),e[22]=E,e[23]=V);let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(h,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),e[24]=H):H=e[24];let U=!!N.size,W=E+1,G;e[25]===j?G=e[26]:(G=j(`size`,{valueAsNumber:!0}),e[25]=j,e[26]=G);let K;e[27]!==U||e[28]!==W||e[29]!==G?(K=(0,y.jsx)(a,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),e[27]=U,e[28]=W,e[29]=G,e[30]=K):K=e[30];let q;e[31]===N.size?q=e[32]:(q=(0,y.jsx)(m,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(g,{children:[H,K,q]}),e[33]=K,e[34]=q,e[35]=J):J=e[35];let Y;e[36]!==b||e[37]!==w?(Y=async()=>{await b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[36]=b,e[37]=w,e[38]=Y):Y=e[38];let X;e[39]!==P||e[40]!==T.isPending||e[41]!==Y?(X=(0,y.jsx)(p,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),e[39]=P,e[40]=T.isPending,e[41]=Y,e[42]=X):X=e[42];let Z;e[43]!==V||e[44]!==J||e[45]!==X||e[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),e[43]=V,e[44]=J,e[45]=X,e[46]=B,e[47]=Z):Z=e[47];let Q;return e[48]!==Z||e[49]!==L||e[50]!==R||e[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),e[48]=Z,e[49]=L,e[50]=R,e[51]=z,e[52]=Q):Q=e[52],Q}export{b as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BpksemvD.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Duo4646P.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BpksemvD.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Duo4646P.js index 07b7a90e5..e6337e356 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BpksemvD.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Duo4646P.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./trash-DHuPKozD.js";import{t as m}from"./button-Bae9vdts.js";import{M as h,u as g}from"./ec2-DJL24ekw.js";import{D as _,V as v,o as y}from"./ec2-DFivrtZe.js";import{t as b}from"./_id-Cl4gNg8Q.js";import{t as x}from"./page-heading-M0NyqAmu.js";import{t as S}from"./error-banner-BcDqaPk7.js";import{t as C}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as w,t as T}from"./detail-row-CclMDqj8.js";var E=t(n()),D=e();function O(){let{id:e}=b.useParams(),t=a(),{data:n}=r(g(e)),{data:O}=r(h),k=y(),A=v(),j=_(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(null),[I,L]=(0,E.useState)(``),R=n.InternetGateways?.[0],z=O.Vpcs??[],B=async()=>{try{await j.mutateAsync(e),t({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},V=async()=>{I&&await k.mutateAsync({internetGatewayId:e,vpcId:I})},H=async()=>{if(P)try{await A.mutateAsync({internetGatewayId:e,vpcId:P})}catch{}finally{F(null)}};if(!R?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let U=R.Attachments?.[0],W=!!U?.VpcId,G=o(R.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(S,{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)(x,{actions:(0,D.jsxs)(m,{disabled:W||j.isPending,onClick:()=>{N(!0)},size:`sm`,variant:`destructive`,children:[(0,D.jsx)(p,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:G?`${R.InternetGatewayId} (${G})`:R.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:R.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:R.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:U?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:W?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(i,{className:`text-primary hover:underline`,params:{id:U.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:U.VpcId}),(0,D.jsx)(m,{disabled:A.isPending,onClick:()=>{F(U.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)(f,{onValueChange:e=>{L(e??``)},value:I,children:[(0,D.jsx)(d,{className:`w-full`,children:(0,D.jsx)(c,{placeholder:`Select a VPC`})}),(0,D.jsx)(u,{children:z.map(e=>{let t=o(e.Tags);return(0,D.jsx)(l,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(m,{disabled:!I||k.isPending,onClick:V,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${R.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:B,onOpenChange:N,open:M,title:`Delete Internet Gateway`}),(0,D.jsx)(C,{confirmLabel:`Detach`,description:`Detach "${R.InternetGatewayId}" from "${P}"? Every subnet in the VPC that routes through it loses internet access.`,isPending:A.isPending,onConfirm:H,onOpenChange:e=>{e||F(null)},open:P!==null,pendingLabel:`Detaching…`,title:`Detach Internet Gateway`})]})}export{O as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./trash-DHuPKozD.js";import{t as m}from"./button-Bae9vdts.js";import{M as h,u as g}from"./ec2-DJL24ekw.js";import{D as _,V as v,o as y}from"./ec2-iXujaheD.js";import{t as b}from"./_id-EXa1ce3y.js";import{t as x}from"./page-heading-M0NyqAmu.js";import{t as S}from"./error-banner-BcDqaPk7.js";import{t as C}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as w,t as T}from"./detail-row-CclMDqj8.js";var E=t(n()),D=e();function O(){let{id:e}=b.useParams(),t=a(),{data:n}=r(g(e)),{data:O}=r(h),k=y(),A=v(),j=_(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(null),[I,L]=(0,E.useState)(``),R=n.InternetGateways?.[0],z=O.Vpcs??[],B=async()=>{try{await j.mutateAsync(e),t({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},V=async()=>{I&&await k.mutateAsync({internetGatewayId:e,vpcId:I})},H=async()=>{if(P)try{await A.mutateAsync({internetGatewayId:e,vpcId:P})}catch{}finally{F(null)}};if(!R?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let U=R.Attachments?.[0],W=!!U?.VpcId,G=o(R.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(S,{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)(x,{actions:(0,D.jsxs)(m,{disabled:W||j.isPending,onClick:()=>{N(!0)},size:`sm`,variant:`destructive`,children:[(0,D.jsx)(p,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:G?`${R.InternetGatewayId} (${G})`:R.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:R.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:R.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:U?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:W?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(i,{className:`text-primary hover:underline`,params:{id:U.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:U.VpcId}),(0,D.jsx)(m,{disabled:A.isPending,onClick:()=>{F(U.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)(f,{onValueChange:e=>{L(e??``)},value:I,children:[(0,D.jsx)(d,{className:`w-full`,children:(0,D.jsx)(c,{placeholder:`Select a VPC`})}),(0,D.jsx)(u,{children:z.map(e=>{let t=o(e.Tags);return(0,D.jsx)(l,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(m,{disabled:!I||k.isPending,onClick:V,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${R.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:B,onOpenChange:N,open:M,title:`Delete Internet Gateway`}),(0,D.jsx)(C,{confirmLabel:`Detach`,description:`Detach "${R.InternetGatewayId}" from "${P}"? Every subnet in the VPC that routes through it loses internet access.`,isPending:A.isPending,onConfirm:H,onOpenChange:e=>{e||F(null)},open:P!==null,pendingLabel:`Detaching…`,title:`Detach Internet Gateway`})]})}export{O as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DQz2NYRM.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dvn2ziMO.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DQz2NYRM.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dvn2ziMO.js index 200390807..03e2bc393 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-DQz2NYRM.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dvn2ziMO.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-C5tKSRd_.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/camera-1Qc58YO0.js","assets/pencil-Cx6ej4Kx.js","assets/cli-command-panel-DPooQRso.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/copy-3Ip4Zkw5.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/rds-DnVYe-Nj.js","assets/rds-hO6CGpr0.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/rds-BKbEDMHo.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/tabs-CAMCnrj7.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/picker-notice-Cj5Hb6RJ.js","assets/security-group-checkboxes-CgmGDP6L.js","assets/select-Bgl6IAYG.js","assets/usePositioner-CRZWTJxW.js","assets/create-db-snapshot-dialog-DKy5_7Dd.js","assets/tags-field-array-B4zgmLw4.js","assets/plus-DMni1ZkC.js","assets/delete-db-snapshot-dialog-CD5YShBB.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/rds-events-panel-0IRk0Dqj.js","assets/rds-tags-tab-COIsvcce.js","assets/tags-editor-CGAehu-w.js","assets/delete-db-instance-dialog-1KZXTOil.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{c as i,g as a,n as o,s,t as c}from"./rds-BKbEDMHo.js";var l=e(`/_auth/rds/(db-instances)/describe-db-instances/$id`)({loader:async({context:e,params:t})=>{let r=n(t.id),[l]=await Promise.all([e.queryClient.query({...o(r),staleTime:`static`}),e.queryClient.query({...s(r),staleTime:`static`}),e.queryClient.query({...i(r),staleTime:`static`}),e.queryClient.query({...c(r),staleTime:`static`})]),u=l.DBInstances?.[0]?.DBInstanceArn??``;await e.queryClient.query({...a(u),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${n(e.id)} | RDS | Mulga`}]}),component:t(()=>r(()=>import(`./_id-C5tKSRd_.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64])),`component`)});export{l as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-FblVF7Ln.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/camera-1Qc58YO0.js","assets/pencil-Cx6ej4Kx.js","assets/cli-command-panel-DPooQRso.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/copy-3Ip4Zkw5.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/trash-DHuPKozD.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/rds-DnVYe-Nj.js","assets/rds-hO6CGpr0.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/rds-BKbEDMHo.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/tabs-CAMCnrj7.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/picker-notice-Cj5Hb6RJ.js","assets/security-group-checkboxes-CgmGDP6L.js","assets/select-Bgl6IAYG.js","assets/usePositioner-CRZWTJxW.js","assets/create-db-snapshot-dialog-DKy5_7Dd.js","assets/tags-field-array-B4zgmLw4.js","assets/plus-DMni1ZkC.js","assets/delete-db-snapshot-dialog-CD5YShBB.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/rds-events-panel-0IRk0Dqj.js","assets/rds-tags-tab-COIsvcce.js","assets/tags-editor-CGAehu-w.js","assets/delete-db-instance-dialog-1KZXTOil.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{c as i,g as a,n as o,s,t as c}from"./rds-BKbEDMHo.js";var l=e(`/_auth/rds/(db-instances)/describe-db-instances/$id`)({loader:async({context:e,params:t})=>{let r=n(t.id),[l]=await Promise.all([e.queryClient.query({...o(r),staleTime:`static`}),e.queryClient.query({...s(r),staleTime:`static`}),e.queryClient.query({...i(r),staleTime:`static`}),e.queryClient.query({...c(r),staleTime:`static`})]),u=l.DBInstances?.[0]?.DBInstanceArn??``;await e.queryClient.query({...a(u),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${n(e.id)} | RDS | Mulga`}]}),component:t(()=>r(()=>import(`./_id-FblVF7Ln.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64])),`component`)});export{l as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CUjg1-jG.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dw7ARlpP.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CUjg1-jG.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dw7ARlpP.js index ce78f1289..51bd6b783 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CUjg1-jG.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Dw7ARlpP.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{A as i}from"./removable-TyvHreKc.js";import{t as a}from"./useMutation-DV0DQvGm.js";import{t as o}from"./useSuspenseQuery-C2bXkW_k.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{o as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./circle-arrow-up-B72wB_yn.js";import{t as d}from"./trash-DHuPKozD.js";import{t as f}from"./button-Bae9vdts.js";import{a as p}from"./ec2-DJL24ekw.js";import{B as m}from"./ec2-DFivrtZe.js";import{r as h}from"./signed-fetch-BHraeSLO.js";import{t as g}from"./use-admin--3prNhUW.js";import{t as _}from"./_id-mj6gqk73.js";import{t as v}from"./page-heading-M0NyqAmu.js";import{t as y}from"./error-banner-BcDqaPk7.js";import{a as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./alert-dialog-BYzNCmBp.js";import{t as O}from"./delete-confirmation-dialog-BIyYnba2.js";import{t as k}from"./state-badge-BD9XGBez.js";import{i as A}from"./system-managed-Dk7ySh_E.js";import{t as j}from"./ami-details-COgMA7Qb.js";var M=t(n()),N=r();function P(){let e=(0,N.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:F,onSuccess:()=>{t.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=t,e[1]=n),a(n)}async function F(e){let t=c();if(!t)throw Error(`Not authenticated`);return await h({action:`PromoteImage`,credentials:t,params:{ImageId:e}})}var I=e(),L=`000000000000`;function R(){let{id:e}=_.useParams(),t=s(),{data:n}=o(p(e)),r=n?.Images?.[0],{isAdmin:i}=g(),a=m(),c=P(),[h,N]=(0,M.useState)(!1),[F,R]=(0,M.useState)(!1);if(!r?.ImageId||A(r))return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(l,{to:`/ec2/describe-images`,children:`Back to images`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]});let z=r.OwnerId===L;async function B(){try{await a.mutateAsync(e),t({to:`/ec2/describe-images`})}finally{N(!1)}}async function V(){try{await c.mutateAsync(e),R(!1)}catch{}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(l,{to:`/ec2/describe-images`,children:`Back to images`}),a.error&&(0,I.jsx)(y,{error:a.error,msg:`Failed to deregister image`}),c.error&&(0,I.jsx)(y,{error:c.error,msg:`Failed to promote image`}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(v,{actions:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&!z&&(0,I.jsxs)(f,{onClick:()=>{R(!0)},size:`sm`,variant:`outline`,children:[(0,I.jsx)(u,{className:`size-4`}),`Promote to System`]}),(0,I.jsxs)(f,{onClick:()=>{N(!0)},size:`sm`,variant:`destructive`,children:[(0,I.jsx)(d,{className:`size-4`}),`Deregister`]}),(0,I.jsx)(k,{state:r.State})]}),subtitle:`Image Details`,title:r.ImageId}),(0,I.jsx)(j,{image:r,showExtendedDetails:!0})]}),(0,I.jsx)(O,{description:`Are you sure you want to deregister "${r.ImageId}"? The backing snapshot will not be deleted.`,isPending:a.isPending,onConfirm:B,onOpenChange:N,open:h,title:`Deregister Image`}),(0,I.jsx)(D,{onOpenChange:R,open:F,children:(0,I.jsxs)(x,{children:[(0,I.jsxs)(E,{children:[(0,I.jsx)(S,{children:`Promote to System Image`}),(0,I.jsxs)(b,{children:[`This will make “`,r.ImageId,`” visible to all accounts as a system image. This cannot be undone via the UI.`]})]}),(0,I.jsxs)(w,{children:[(0,I.jsx)(T,{children:`Cancel`}),(0,I.jsx)(C,{disabled:c.isPending,onClick:V,children:c.isPending?`Promoting…`:`Promote`})]})]})})]})}export{R as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{A as i}from"./removable-TyvHreKc.js";import{t as a}from"./useMutation-DV0DQvGm.js";import{t as o}from"./useSuspenseQuery-C2bXkW_k.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{o as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./circle-arrow-up-B72wB_yn.js";import{t as d}from"./trash-DHuPKozD.js";import{t as f}from"./button-Bae9vdts.js";import{a as p}from"./ec2-DJL24ekw.js";import{B as m}from"./ec2-iXujaheD.js";import{r as h}from"./signed-fetch-BHraeSLO.js";import{t as g}from"./use-admin--3prNhUW.js";import{t as _}from"./_id-CB17TYHV.js";import{t as v}from"./page-heading-M0NyqAmu.js";import{t as y}from"./error-banner-BcDqaPk7.js";import{a as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./alert-dialog-BYzNCmBp.js";import{t as O}from"./delete-confirmation-dialog-BIyYnba2.js";import{t as k}from"./state-badge-BiFj5bbX.js";import{i as A}from"./system-managed-Dk7ySh_E.js";import{t as j}from"./ami-details-COgMA7Qb.js";var M=t(n()),N=r();function P(){let e=(0,N.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:F,onSuccess:()=>{t.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=t,e[1]=n),a(n)}async function F(e){let t=c();if(!t)throw Error(`Not authenticated`);return await h({action:`PromoteImage`,credentials:t,params:{ImageId:e}})}var I=e(),L=`000000000000`;function R(){let{id:e}=_.useParams(),t=s(),{data:n}=o(p(e)),r=n?.Images?.[0],{isAdmin:i}=g(),a=m(),c=P(),[h,N]=(0,M.useState)(!1),[F,R]=(0,M.useState)(!1);if(!r?.ImageId||A(r))return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(l,{to:`/ec2/describe-images`,children:`Back to images`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]});let z=r.OwnerId===L;async function B(){try{await a.mutateAsync(e),t({to:`/ec2/describe-images`})}finally{N(!1)}}async function V(){try{await c.mutateAsync(e),R(!1)}catch{}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(l,{to:`/ec2/describe-images`,children:`Back to images`}),a.error&&(0,I.jsx)(y,{error:a.error,msg:`Failed to deregister image`}),c.error&&(0,I.jsx)(y,{error:c.error,msg:`Failed to promote image`}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(v,{actions:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&!z&&(0,I.jsxs)(f,{onClick:()=>{R(!0)},size:`sm`,variant:`outline`,children:[(0,I.jsx)(u,{className:`size-4`}),`Promote to System`]}),(0,I.jsxs)(f,{onClick:()=>{N(!0)},size:`sm`,variant:`destructive`,children:[(0,I.jsx)(d,{className:`size-4`}),`Deregister`]}),(0,I.jsx)(k,{state:r.State})]}),subtitle:`Image Details`,title:r.ImageId}),(0,I.jsx)(j,{image:r,showExtendedDetails:!0})]}),(0,I.jsx)(O,{description:`Are you sure you want to deregister "${r.ImageId}"? The backing snapshot will not be deleted.`,isPending:a.isPending,onConfirm:B,onOpenChange:N,open:h,title:`Deregister Image`}),(0,I.jsx)(D,{onOpenChange:R,open:F,children:(0,I.jsxs)(x,{children:[(0,I.jsxs)(E,{children:[(0,I.jsx)(S,{children:`Promote to System Image`}),(0,I.jsxs)(b,{children:[`This will make “`,r.ImageId,`” visible to all accounts as a system image. This cannot be undone via the UI.`]})]}),(0,I.jsxs)(w,{children:[(0,I.jsx)(T,{children:`Cancel`}),(0,I.jsx)(C,{disabled:c.isPending,onClick:V,children:c.isPending?`Promoting…`:`Promote`})]})]})})]})}export{R as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cl4gNg8Q.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-EXa1ce3y.js similarity index 90% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cl4gNg8Q.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-EXa1ce3y.js index d0bd93c65..562e70a1d 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-Cl4gNg8Q.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-EXa1ce3y.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-BpksemvD.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{M as r,u as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Internet Gateway | Mulga`}]}),component:t(()=>n(()=>import(`./_id-BpksemvD.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-Duo4646P.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/trash-DHuPKozD.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/detail-row-CclMDqj8.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{M as r,u as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | Internet Gateway | Mulga`}]}),component:t(()=>n(()=>import(`./_id-Duo4646P.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C5tKSRd_.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-FblVF7Ln.js similarity index 99% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C5tKSRd_.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-FblVF7Ln.js index 54d3d180b..11c3c5af8 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-C5tKSRd_.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-FblVF7Ln.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{E as ee,j as te}from"./httpRequest-Bc1WZmsd.js";import{t as ne}from"./back-link-DjawJm5W.js";import{t as re}from"./camera-1Qc58YO0.js";import{t as ie}from"./pencil-Cx6ej4Kx.js";import{t as ae}from"./cli-command-panel-DPooQRso.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{t as u}from"./input-CpcyJw4R.js";import{w as d}from"./ec2-DJL24ekw.js";import{S as oe,a as f,c as se,d as ce,f as le,l as ue,m as de,p as fe,u as pe}from"./rds-DnVYe-Nj.js";import{d as p,l as m,m as h,p as me}from"./rds-hO6CGpr0.js";import{c as he,d as ge,l as _e,n as g,o as ve,s as ye,t as _}from"./rds-BKbEDMHo.js";import{t as v}from"./_id-DQz2NYRM.js";import{t as be}from"./page-heading-M0NyqAmu.js";import{a as xe,i as y,n as Se,t as Ce}from"./zod-VwMMRSfy.js";import{t as we}from"./error-banner-BcDqaPk7.js";import{t as b}from"./form-actions-C3zG6ld2.js";import{n as Te,r as Ee,s as De,t as x}from"./field-ChkDR_wL.js";import{a as Oe,i as S,l as ke,s as Ae,t as je}from"./alert-dialog-BYzNCmBp.js";import{n as C,t as w}from"./detail-row-CclMDqj8.js";import{t as Me}from"./state-badge-BD9XGBez.js";import{i as T,n as Ne,r as Pe,t as Fe}from"./tabs-CAMCnrj7.js";import{n as Ie,t as Le}from"./picker-notice-Cj5Hb6RJ.js";import{a as Re,o as ze,s as Be,t as Ve}from"./security-group-checkboxes-CgmGDP6L.js";import{t as He}from"./create-db-snapshot-dialog-DKy5_7Dd.js";import{t as Ue}from"./delete-db-snapshot-dialog-CD5YShBB.js";import{t as We}from"./rds-events-panel-0IRk0Dqj.js";import{t as Ge}from"./rds-tags-tab-COIsvcce.js";import{t as Ke}from"./delete-db-instance-dialog-1KZXTOil.js";var E=t(n(),1),qe=r(),D=e(),Je=[{label:`Identifier`,note:`The identifier is the endpoint hostname and the certificate subject; renaming in place is not implemented.`},{label:`Engine version`,note:`There is no in-place engine-version upgrade.`},{label:`Port`,note:`The port is fixed at create; changing it would break every client and the serving certificate.`},{label:`DB subnet group`,note:`The endpoint ENI is placed at create; moving it would change the address clients resolve.`}];function O(e){let t=(0,qe.c)(222),{open:n,onOpenChange:r,instance:a}=e,o=m(),s=i(ge),ee=i(d),te=i(ve),ne=a.Engine??``,re;t[0]===ne?re=t[1]:(re=_e(ne),t[0]=ne,t[1]=re);let ie=i(re),ae=a.DBInstanceIdentifier??``,c=a.AllocatedStorage??0,l;t[2]===a.VpcSecurityGroups?l=t[3]:(l=a.VpcSecurityGroups?.map(et).filter(Boolean)??[],t[2]=a.VpcSecurityGroups,t[3]=l);let f=l,se;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(se=Ce(oe),t[4]=se):se=t[4];let ce=a.DBInstanceClass??``,le=a.DBParameterGroups?.[0]?.DBParameterGroupName??``,ue=a.DeletionProtection??!1,de=a.BackupRetentionPeriod??0,fe=a.PreferredBackupWindow??``,pe=a.PreferredMaintenanceWindow??``,p;t[5]!==f||t[6]!==c||t[7]!==pe||t[8]!==ce||t[9]!==le||t[10]!==ue||t[11]!==de||t[12]!==fe?(p={resolver:se,defaultValues:{currentAllocatedStorage:c,dbInstanceClass:ce,allocatedStorage:c,dbParameterGroupName:le,vpcSecurityGroupIds:f,deletionProtection:ue,backupRetentionPeriod:de,preferredBackupWindow:fe,preferredMaintenanceWindow:pe,masterUserPassword:``,applyImmediately:!1}},t[5]=f,t[6]=c,t[7]=pe,t[8]=ce,t[9]=le,t[10]=ue,t[11]=de,t[12]=fe,t[13]=p):p=t[13];let{control:h,formState:me,handleSubmit:he,register:g,setValue:ye}=y(p),{errors:_,isSubmitting:v}=me,be;t[14]===h?be=t[15]:(be={control:h},t[14]=h,t[15]=be);let C=xe(be),w=C.dbInstanceClass??``,Me=C.allocatedStorage??c,T;t[16]===C.vpcSecurityGroupIds?T=t[17]:(T=C.vpcSecurityGroupIds??[],t[16]=C.vpcSecurityGroupIds,t[17]=T);let Ne=T,Pe;t[18]===ie.data?.OrderableDBInstanceOptions?Pe=t[19]:(Pe=ie.data?.OrderableDBInstanceOptions??[],t[18]=ie.data?.OrderableDBInstanceOptions,t[19]=Pe);let Fe;t[20]===Pe?Fe=t[21]:(Fe=new Set(Pe.map($e).filter(Boolean)),t[20]=Pe,t[21]=Fe);let He;t[22]===Fe?He=t[23]:(He=[...Fe],t[22]=Fe,t[23]=He);let Ue=He,We,Ge,Ke,E,O,k,tt,nt,A,rt,it,at,ot,st,ct,lt,j,M,ut,N;if(t[24]!==h||t[25]!==c||t[26]!==te.data?.DBEngineVersions||t[27]!==_.allocatedStorage||t[28]!==he||t[29]!==ae||t[30]!==a.DBInstanceClass||t[31]!==a.DBSubnetGroup?.VpcId||t[32]!==a.Engine||t[33]!==Ue||t[34]!==o||t[35]!==r||t[36]!==n||t[37]!==ie||t[38]!==s||t[39]!==g||t[40]!==ee||t[41]!==w||t[42]!==Me||t[43]!==ye){let e;t[64]===s.data?.DBParameterGroups?e=t[65]:(e=s.data?.DBParameterGroups??[],t[64]=s.data?.DBParameterGroups,t[65]=e);let i;t[66]===te.data?.DBEngineVersions?i=t[67]:(i=te.data?.DBEngineVersions??[],t[66]=te.data?.DBEngineVersions,t[67]=i);let ne=Be(e,i,a.Engine??``),re=a.DBSubnetGroup?.VpcId,l;t[68]===ee.data?.SecurityGroups?l=t[69]:(l=ee.data?.SecurityGroups??[],t[68]=ee.data?.SecurityGroups,t[69]=l);let d;if(t[70]!==re||t[71]!==l){let e;t[73]===re?e=t[74]:(e=e=>re===void 0||e.VpcId===re,t[73]=re,t[74]=e),d=l.filter(e),t[70]=re,t[71]=l,t[72]=d}else d=t[72];O=d;let oe=w!==a.DBInstanceClass,f=Me!==c,se=Ue.length===0,ce=`No instance class this cluster's nodes can run is available for ${a.Engine}.`,le;t[75]!==ie||t[76]!==se||t[77]!==ce?(le=Ie(ie,se,{loading:`Loading the instance classes…`,failed:`Could not read the instance classes`,empty:ce}),t[75]=ie,t[76]=se,t[77]=ce,t[78]=le):le=t[78];let ue=le,de=ne.length===0,fe;t[79]!==s||t[80]!==de?(fe=Ie(s,de,{loading:`Loading the parameter groups…`,failed:`Could not read the parameter groups`,empty:`No parameter group of this instance's engine family exists.`}),t[79]=s,t[80]=de,t[81]=fe):fe=t[81];let pe=fe,p=O.length===0,m;t[82]!==ee||t[83]!==p?(m=Ie(ee,p,{loading:`Loading the security groups…`,failed:`Could not read the security groups`,empty:`No security group in this instance's VPC is available.`}),t[82]=ee,t[83]=p,t[84]=m):m=t[84],E=m;let me;t[85]===ye?me=t[86]:(me=e=>{ye(`vpcSecurityGroupIds`,e,{shouldValidate:!0})},t[85]=ye,t[86]=me),k=me;let ge;t[87]!==ae||t[88]!==o||t[89]!==r?(ge=async e=>{await o.mutateAsync({...e,dbInstanceIdentifier:ae}),r(!1)},t[87]=ae,t[88]=o,t[89]=r,t[90]=ge):ge=t[90];let _e=ge;Ke=je,ut=r,N=n,Ge=S,j=`max-h-[85vh] overflow-y-auto`;let ve;t[91]===ae?ve=t[92]:(ve=(0,D.jsxs)(ke,{children:[`Modify `,ae]}),t[91]=ae,t[92]=ve);let v;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,D.jsx)(Oe,{children:`Changes apply in the maintenance window unless you apply them immediately.`}),t[93]=v):v=t[93],t[94]===ve?M=t[95]:(M=(0,D.jsxs)(Ae,{children:[ve,v]}),t[94]=ve,t[95]=M),ot=`space-y-4`,t[96]!==he||t[97]!==_e?(st=he(_e),t[96]=he,t[97]=_e,t[98]=st):st=t[98];let be;t[99]===Ue?be=t[100]:(be=Ue.map(Qe),t[99]=Ue,t[100]=be);let xe=oe&&`Changing the class replaces the VM. The database is unavailable while it does.`;t[101]!==ue||t[102]!==h||t[103]!==be||t[104]!==xe?(ct=(0,D.jsx)(ze,{control:h,id:`modify-class`,label:`DB instance class`,name:`dbInstanceClass`,notice:ue,options:be,placeholder:`Select an instance class`,warning:xe}),t[101]=ue,t[102]=h,t[103]=be,t[104]=xe,t[105]=ct):ct=t[105];let y;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-storage`,children:`Allocated storage (GiB)`})}),t[106]=y):y=t[106];let Se=!!_.allocatedStorage,Ce;t[107]===g?Ce=t[108]:(Ce=g(`allocatedStorage`,{valueAsNumber:!0}),t[107]=g,t[108]=Ce);let we;t[109]!==c||t[110]!==Se||t[111]!==Ce?(we=(0,D.jsx)(u,{"aria-invalid":Se,id:`modify-storage`,min:c,type:`number`,...Ce}),t[109]=c,t[110]=Se,t[111]=Ce,t[112]=we):we=t[112];let b;t[113]===c?b=t[114]:(b=(0,D.jsxs)(Te,{children:[`Currently `,c,` GiB. Storage grows only.`]}),t[113]=c,t[114]=b);let C;t[115]===f?C=t[116]:(C=f&&(0,D.jsx)(`p`,{className:`text-xs text-tactical-amber`,children:`Growing storage stops and starts the instance to extend the filesystem.`}),t[115]=f,t[116]=C);let T;t[117]===_.allocatedStorage?T=t[118]:(T=(0,D.jsx)(Ee,{errors:[_.allocatedStorage]}),t[117]=_.allocatedStorage,t[118]=T),t[119]!==we||t[120]!==b||t[121]!==C||t[122]!==T?(lt=(0,D.jsxs)(x,{children:[y,we,b,C,T]}),t[119]=we,t[120]=b,t[121]=C,t[122]=T,t[123]=lt):lt=t[123],We=ze,tt=h,nt=`modify-parameter-group`,A=`DB parameter group`,rt=`dbParameterGroupName`,it=pe,at=ne.map(Ze),t[24]=h,t[25]=c,t[26]=te.data?.DBEngineVersions,t[27]=_.allocatedStorage,t[28]=he,t[29]=ae,t[30]=a.DBInstanceClass,t[31]=a.DBSubnetGroup?.VpcId,t[32]=a.Engine,t[33]=Ue,t[34]=o,t[35]=r,t[36]=n,t[37]=ie,t[38]=s,t[39]=g,t[40]=ee,t[41]=w,t[42]=Me,t[43]=ye,t[44]=We,t[45]=Ge,t[46]=Ke,t[47]=E,t[48]=O,t[49]=k,t[50]=tt,t[51]=nt,t[52]=A,t[53]=rt,t[54]=it,t[55]=at,t[56]=ot,t[57]=st,t[58]=ct,t[59]=lt,t[60]=j,t[61]=M,t[62]=ut,t[63]=N}else We=t[44],Ge=t[45],Ke=t[46],E=t[47],O=t[48],k=t[49],tt=t[50],nt=t[51],A=t[52],rt=t[53],it=t[54],at=t[55],ot=t[56],st=t[57],ct=t[58],lt=t[59],j=t[60],M=t[61],ut=t[62],N=t[63];let P;t[124]!==We||t[125]!==tt||t[126]!==nt||t[127]!==A||t[128]!==rt||t[129]!==it||t[130]!==at?(P=(0,D.jsx)(We,{control:tt,id:nt,label:A,name:rt,notice:it,options:at,placeholder:`Engine default group`}),t[124]=We,t[125]=tt,t[126]=nt,t[127]=A,t[128]=rt,t[129]=it,t[130]=at,t[131]=P):P=t[131];let dt;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,D.jsx)(De,{children:`VPC security groups`}),t[132]=dt):dt=t[132];let F;t[133]!==E||t[134]!==O||t[135]!==Ne||t[136]!==k?(F=(0,D.jsxs)(x,{children:[dt,E?(0,D.jsx)(Le,{notice:E}):(0,D.jsx)(Ve,{emptyText:`No security group in this instance's VPC is available.`,groups:O,onChange:k,selected:Ne})]}),t[133]=E,t[134]=O,t[135]=Ne,t[136]=k,t[137]=F):F=t[137];let ft;t[138]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-retention`,children:`Backup retention (days)`})}),t[138]=ft):ft=t[138];let pt=!!_.backupRetentionPeriod,mt;t[139]===g?mt=t[140]:(mt=g(`backupRetentionPeriod`,{valueAsNumber:!0}),t[139]=g,t[140]=mt);let I;t[141]!==pt||t[142]!==mt?(I=(0,D.jsx)(u,{"aria-invalid":pt,id:`modify-retention`,max:7,min:0,type:`number`,...mt}),t[141]=pt,t[142]=mt,t[143]=I):I=t[143];let L;t[144]===_.backupRetentionPeriod?L=t[145]:(L=(0,D.jsx)(Ee,{errors:[_.backupRetentionPeriod]}),t[144]=_.backupRetentionPeriod,t[145]=L);let R;t[146]!==I||t[147]!==L?(R=(0,D.jsxs)(x,{children:[ft,I,L]}),t[146]=I,t[147]=L,t[148]=R):R=t[148];let z;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-backup-window`,children:`Preferred backup window`})}),t[149]=z):z=t[149];let ht=!!_.preferredBackupWindow,B;t[150]===g?B=t[151]:(B=g(`preferredBackupWindow`),t[150]=g,t[151]=B);let V;t[152]!==ht||t[153]!==B?(V=(0,D.jsx)(u,{"aria-invalid":ht,id:`modify-backup-window`,placeholder:`hh24:mi-hh24:mi in UTC`,...B}),t[152]=ht,t[153]=B,t[154]=V):V=t[154];let H;t[155]===_.preferredBackupWindow?H=t[156]:(H=(0,D.jsx)(Ee,{errors:[_.preferredBackupWindow]}),t[155]=_.preferredBackupWindow,t[156]=H);let U;t[157]!==V||t[158]!==H?(U=(0,D.jsxs)(x,{children:[z,V,H]}),t[157]=V,t[158]=H,t[159]=U):U=t[159];let W;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-maintenance-window`,children:`Preferred maintenance window`})}),t[160]=W):W=t[160];let G=!!_.preferredMaintenanceWindow,K;t[161]===g?K=t[162]:(K=g(`preferredMaintenanceWindow`),t[161]=g,t[162]=K);let q;t[163]!==G||t[164]!==K?(q=(0,D.jsx)(u,{"aria-invalid":G,id:`modify-maintenance-window`,placeholder:`ddd:hh24:mi-ddd:hh24:mi in UTC`,...K}),t[163]=G,t[164]=K,t[165]=q):q=t[165];let J;t[166]===_.preferredMaintenanceWindow?J=t[167]:(J=(0,D.jsx)(Ee,{errors:[_.preferredMaintenanceWindow]}),t[166]=_.preferredMaintenanceWindow,t[167]=J);let Y;t[168]!==q||t[169]!==J?(Y=(0,D.jsxs)(x,{children:[W,q,J]}),t[168]=q,t[169]=J,t[170]=Y):Y=t[170];let X;t[171]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-password`,children:`Reset master password`})}),t[171]=X):X=t[171];let gt=!!_.masterUserPassword,Z;t[172]===g?Z=t[173]:(Z=g(`masterUserPassword`),t[172]=g,t[173]=Z);let Q;t[174]!==gt||t[175]!==Z?(Q=(0,D.jsx)(u,{"aria-invalid":gt,id:`modify-password`,type:`password`,...Z}),t[174]=gt,t[175]=Z,t[176]=Q):Q=t[176];let _t;t[177]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,D.jsx)(Te,{children:`Leave blank to keep the current password.`}),t[177]=_t):_t=t[177];let $;t[178]===_.masterUserPassword?$=t[179]:($=(0,D.jsx)(Ee,{errors:[_.masterUserPassword]}),t[178]=_.masterUserPassword,t[179]=$);let vt;t[180]!==Q||t[181]!==$?(vt=(0,D.jsxs)(x,{children:[X,Q,_t,$]}),t[180]=Q,t[181]=$,t[182]=vt):vt=t[182];let yt;t[183]===h?yt=t[184]:(yt=(0,D.jsx)(Re,{control:h,name:`deletionProtection`}),t[183]=h,t[184]=yt);let bt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,D.jsx)(De,{children:`Apply immediately`}),t[185]=bt):bt=t[185];let xt;t[186]===h?xt=t[187]:(xt=(0,D.jsxs)(x,{children:[bt,(0,D.jsx)(Se,{control:h,name:`applyImmediately`,render:Xe})]}),t[186]=h,t[187]=xt);let St;t[188]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,D.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border p-3`,children:[(0,D.jsx)(`h3`,{className:`text-xs font-medium`,children:`Fixed at create`}),Je.map(Ye)]}),t[188]=St):St=t[188];let Ct;t[189]===o.error?Ct=t[190]:(Ct=o.error&&(0,D.jsx)(we,{error:o.error,msg:`Failed to modify the DB instance`}),t[189]=o.error,t[190]=Ct);let wt;t[191]===r?wt=t[192]:(wt=()=>{r(!1)},t[191]=r,t[192]=wt);let Tt;t[193]!==v||t[194]!==o.isPending||t[195]!==wt?(Tt=(0,D.jsx)(`div`,{className:`flex justify-end`,children:(0,D.jsx)(b,{isPending:o.isPending,isSubmitting:v,onCancel:wt,pendingLabel:`Saving…`,submitLabel:`Save Changes`})}),t[193]=v,t[194]=o.isPending,t[195]=wt,t[196]=Tt):Tt=t[196];let Et;t[197]!==ot||t[198]!==st||t[199]!==ct||t[200]!==lt||t[201]!==P||t[202]!==F||t[203]!==R||t[204]!==U||t[205]!==Y||t[206]!==vt||t[207]!==yt||t[208]!==xt||t[209]!==Ct||t[210]!==Tt?(Et=(0,D.jsxs)(`form`,{className:ot,onSubmit:st,children:[ct,lt,P,F,R,U,Y,vt,yt,xt,St,Ct,Tt]}),t[197]=ot,t[198]=st,t[199]=ct,t[200]=lt,t[201]=P,t[202]=F,t[203]=R,t[204]=U,t[205]=Y,t[206]=vt,t[207]=yt,t[208]=xt,t[209]=Ct,t[210]=Tt,t[211]=Et):Et=t[211];let Dt;t[212]!==Ge||t[213]!==j||t[214]!==M||t[215]!==Et?(Dt=(0,D.jsxs)(Ge,{className:j,children:[M,Et]}),t[212]=Ge,t[213]=j,t[214]=M,t[215]=Et,t[216]=Dt):Dt=t[216];let Ot;return t[217]!==Ke||t[218]!==ut||t[219]!==N||t[220]!==Dt?(Ot=(0,D.jsx)(Ke,{onOpenChange:ut,open:N,children:Dt}),t[217]=Ke,t[218]=ut,t[219]=N,t[220]=Dt,t[221]=Ot):Ot=t[221],Ot}function Ye(e){return(0,D.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,D.jsx)(`span`,{className:`font-medium`,children:e.label}),` —`,` `,e.note]},e.label)}function Xe(e){let{field:t}=e;return(0,D.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,D.jsx)(`input`,{"aria-label":`Apply immediately`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),(0,D.jsx)(`span`,{children:`Apply now instead of waiting for the maintenance window`})]})}function Ze(e){return{value:e.DBParameterGroupName??``,label:e.DBParameterGroupName??``}}function Qe(e){return{value:e,label:e}}function $e(e){return e.DBInstanceClass??``}function et(e){return e.VpcSecurityGroupId??``}function k(e,t){return e.EventCategories?.includes(t)??!1}function tt(e,t){return e.filter(t).toSorted((e,t)=>(e.Date?.getTime()??0)-(t.Date?.getTime()??0)).at(-1)}function nt(e){let t=e.Endpoint?.Address;if(!t)return[];let n=e.Endpoint?.Port??e.DbInstancePort,r=e.MasterUsername??``,i=e.DBName??r;return e.Engine===`postgres`?[{label:`Connect`,parts:[{type:`bin`,value:`psql`},{type:`value`,value:` "host=${t} port=${n} dbname=${i} user=${r} sslmode=require"`}]}]:[{label:`Connect`,parts:[{type:`bin`,value:`mariadb`},{type:`flag`,value:` --host`},{type:`value`,value:`=${t}`},{type:`flag`,value:` --port`},{type:`value`,value:`=${n}`},{type:`flag`,value:` --user`},{type:`value`,value:`=${r}`},{type:`flag`,value:` --ssl`},{type:`value`,value:` ${i}`}]}]}function A(e){let t=(0,qe.c)(266),{dbInstanceIdentifier:n}=e,r=s(),i;t[0]===n?i=t[1]:(i=g(n),t[0]=n,t[1]=i);let{data:te}=a(i),u=te.DBInstances?.[0],d=u?.DBInstanceArn??``,oe;t[2]===n?oe=t[3]:(oe=ye(n),t[2]=n,t[3]=oe);let{data:f}=a(oe),m;t[4]===n?m=t[5]:(m=he(n),t[4]=n,t[5]=m);let{data:ge}=a(m),_e;t[6]===n?_e=t[7]:(_e=_(n),t[6]=n,t[7]=_e);let{data:ve}=a(_e),v=me(),xe=h(),y=p(),[Se,Ce]=(0,E.useState)(!1),[b,Te]=(0,E.useState)(!1),[Ee,De]=(0,E.useState)(!1),[x,Oe]=(0,E.useState)(null);if(!u?.DBInstanceIdentifier){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(ne,{to:`/rds/describe-db-instances`,children:`Back to databases`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`DB instance not found.`})]}),t[8]=e):e=t[8],e}let S=u.DBInstanceStatus,ke;t[9]===f.Events?ke=t[10]:(ke=f.Events??[],t[9]=f.Events,t[10]=ke);let Ae=ke,je=v.error??xe.error??y.error,Ie,Le,Re,ze,Be,Ve,Je,Ye,Xe,Ze,Qe,$e,et,k,A,j,M,ut,N,P,dt,F,ft,pt,mt,I;if(t[11]!==ve.DBInstanceAutomatedBackups?.[0]||t[12]!==n||t[13]!==Ae||t[14]!==u||t[15]!==je||t[16]!==y||t[17]!==ge.DBSnapshots||t[18]!==v||t[19]!==S||t[20]!==xe){let e=tt(Ae,lt),r=tt(Ae,ct),i;t[47]===ge.DBSnapshots?i=t[48]:(i=ge.DBSnapshots??[],t[47]=ge.DBSnapshots,t[48]=i),Ve=i;let a=Ve.filter(st).toSorted(ot).at(-1),o=ve.DBInstanceAutomatedBackups?.[0],s=u.PendingModifiedValues,te=s?.AllocatedStorage!==void 0||s?.DBInstanceClass!==void 0;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,D.jsx)(ne,{to:`/rds/describe-db-instances`,children:`Back to databases`}),t[49]=dt):dt=t[49],t[50]===je?F=t[51]:(F=je&&(0,D.jsx)(we,{error:je,msg:`Failed to change the DB instance state.`}),t[50]=je,t[51]=F),ut=`space-y-6`;let d;t[52]!==v.isPending||t[53]!==S?(d=!fe(S)||v.isPending,t[52]=v.isPending,t[53]=S,t[54]=d):d=t[54];let oe;t[55]!==n||t[56]!==v?(oe=()=>{v.mutate(n)},t[55]=n,t[56]=v,t[57]=oe):oe=t[57];let f;t[58]!==d||t[59]!==oe?(f=(0,D.jsx)(l,{disabled:d,onClick:oe,size:`sm`,variant:`outline`,children:`Start`}),t[58]=d,t[59]=oe,t[60]=f):f=t[60];let ce;t[61]!==S||t[62]!==xe.isPending?(ce=!de(S)||xe.isPending,t[61]=S,t[62]=xe.isPending,t[63]=ce):ce=t[63];let ue;t[64]!==n||t[65]!==xe?(ue=()=>{xe.mutate(n)},t[64]=n,t[65]=xe,t[66]=ue):ue=t[66];let p;t[67]!==ce||t[68]!==ue?(p=(0,D.jsx)(l,{disabled:ce,onClick:ue,size:`sm`,variant:`outline`,children:`Stop`}),t[67]=ce,t[68]=ue,t[69]=p):p=t[69];let m;t[70]!==y.isPending||t[71]!==S?(m=!pe(S)||y.isPending,t[70]=y.isPending,t[71]=S,t[72]=m):m=t[72];let h;t[73]!==n||t[74]!==y?(h=()=>{y.mutate(n)},t[73]=n,t[74]=y,t[75]=h):h=t[75];let me;t[76]!==m||t[77]!==h?(me=(0,D.jsx)(l,{disabled:m,onClick:h,size:`sm`,variant:`outline`,children:`Reboot`}),t[76]=m,t[77]=h,t[78]=me):me=t[78];let he;t[79]===S?he=t[80]:(he=le(S),t[79]=S,t[80]=he);let _e=!he,g;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{De(!0)},t[81]=g):g=t[81];let ye;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,D.jsx)(re,{className:`size-4`}),t[82]=ye):ye=t[82];let _;t[83]===_e?_=t[84]:(_=(0,D.jsxs)(l,{disabled:_e,onClick:g,size:`sm`,variant:`outline`,children:[ye,`Take Snapshot`]}),t[83]=_e,t[84]=_);let Se;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Se=()=>{Te(!0)},t[85]=Se):Se=t[85];let b;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,D.jsxs)(l,{onClick:Se,size:`sm`,variant:`outline`,children:[(0,D.jsx)(ie,{className:`size-4`}),`Modify`]}),t[86]=b):b=t[86];let Ee;t[87]===S?Ee=t[88]:(Ee=se(S),t[87]=S,t[88]=Ee);let x=!Ee,Oe;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=()=>{Ce(!0)},t[89]=Oe):Oe=t[89];let ke;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,D.jsx)(c,{className:`size-4`}),t[90]=ke):ke=t[90];let He;t[91]===x?He=t[92]:(He=(0,D.jsxs)(l,{disabled:x,onClick:Oe,size:`sm`,variant:`destructive`,children:[ke,`Delete`]}),t[91]=x,t[92]=He);let Ue;t[93]!==f||t[94]!==p||t[95]!==me||t[96]!==_||t[97]!==He?(Ue=(0,D.jsxs)(`div`,{className:`flex gap-2`,children:[f,p,me,_,b,He]}),t[93]=f,t[94]=p,t[95]=me,t[96]=_,t[97]=He,t[98]=Ue):Ue=t[98],t[99]!==n||t[100]!==Ue?(N=(0,D.jsx)(be,{actions:Ue,subtitle:`DB Instance`,title:n}),t[99]=n,t[100]=Ue,t[101]=N):N=t[101];let We;t[102]===S?We=t[103]:(We=(0,D.jsx)(Me,{state:S}),t[102]=S,t[103]=We);let Ge;t[104]===u.StatusInfos?Ge=t[105]:(Ge=u.StatusInfos?.map(at),t[104]=u.StatusInfos,t[105]=Ge),t[106]!==We||t[107]!==Ge?(P=(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[We,Ge]}),t[106]=We,t[107]=Ge,t[108]=P):P=t[108],Be=Fe,k=`connectivity`,t[109]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,D.jsxs)(Ne,{children:[(0,D.jsx)(T,{value:`connectivity`,children:`Connectivity`}),(0,D.jsx)(T,{value:`configuration`,children:`Configuration`}),(0,D.jsx)(T,{value:`backups`,children:`Backups`}),(0,D.jsx)(T,{value:`tags`,children:`Tags`}),(0,D.jsx)(T,{value:`events`,children:`Events`})]}),t[109]=A):A=t[109];let Ke;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,D.jsx)(C.Header,{children:`Endpoint`}),t[110]=Ke):Ke=t[110];let E=u.Endpoint?.Address,qe;t[111]===E?qe=t[112]:(qe=(0,D.jsx)(w,{label:`Address`,value:E}),t[111]=E,t[112]=qe);let O;t[113]!==u.DbInstancePort||t[114]!==u.Endpoint?.Port?(O=(u.Endpoint?.Port??u.DbInstancePort)?.toString(),t[113]=u.DbInstancePort,t[114]=u.Endpoint?.Port,t[115]=O):O=t[115];let L;t[116]===O?L=t[117]:(L=(0,D.jsx)(w,{label:`Port`,value:O}),t[116]=O,t[117]=L);let R=u.DBSubnetGroup?.VpcId,z;t[118]===R?z=t[119]:(z=(0,D.jsx)(w,{label:`VPC`,value:R}),t[118]=R,t[119]=z);let ht=u.DBSubnetGroup?.DBSubnetGroupName,B;t[120]===ht?B=t[121]:(B=(0,D.jsx)(w,{label:`DB subnet group`,value:ht}),t[120]=ht,t[121]=B);let V;t[122]===u.VpcSecurityGroups?V=t[123]:(V=u.VpcSecurityGroups?.map(it).join(`, `),t[122]=u.VpcSecurityGroups,t[123]=V);let H;t[124]===V?H=t[125]:(H=(0,D.jsx)(w,{label:`Security groups`,value:V}),t[124]=V,t[125]=H);let U;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(w,{label:`Publicly accessible`,value:`No — private VPC address`}),t[126]=U):U=t[126];let W;t[127]!==qe||t[128]!==L||t[129]!==z||t[130]!==B||t[131]!==H?(W=(0,D.jsxs)(C,{children:[Ke,(0,D.jsxs)(C.Content,{children:[qe,L,z,B,H,U]})]}),t[127]=qe,t[128]=L,t[129]=z,t[130]=B,t[131]=H,t[132]=W):W=t[132];let G;t[133]===u?G=t[134]:(G=nt(u),t[133]=u,t[134]=G);let K;t[135]===G?K=t[136]:(K=(0,D.jsx)(ae,{commands:G}),t[135]=G,t[136]=K),t[137]!==W||t[138]!==K?(j=(0,D.jsx)(Pe,{value:`connectivity`,children:(0,D.jsxs)(`div`,{className:`space-y-4`,children:[W,K]})}),t[137]=W,t[138]=K,t[139]=j):j=t[139];let q;t[140]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,D.jsx)(C.Header,{children:`Configuration`}),t[140]=q):q=t[140];let J;t[141]===u.Engine?J=t[142]:(J=(0,D.jsx)(w,{label:`Engine`,value:u.Engine}),t[141]=u.Engine,t[142]=J);let Y;t[143]===u.EngineVersion?Y=t[144]:(Y=(0,D.jsx)(w,{label:`Version`,value:u.EngineVersion}),t[143]=u.EngineVersion,t[144]=Y);let X;t[145]===u.DBInstanceClass?X=t[146]:(X=(0,D.jsx)(w,{label:`Instance class`,value:u.DBInstanceClass}),t[145]=u.DBInstanceClass,t[146]=X);let gt=u.AllocatedStorage?`${u.AllocatedStorage} GiB`:void 0,Z;t[147]===gt?Z=t[148]:(Z=(0,D.jsx)(w,{label:`Allocated storage`,value:gt}),t[147]=gt,t[148]=Z);let Q;t[149]===u.StorageType?Q=t[150]:(Q=(0,D.jsx)(w,{label:`Storage type`,value:u.StorageType}),t[149]=u.StorageType,t[150]=Q);let _t=u.StorageEncrypted?`Encrypted — always on`:`Not encrypted`,$;t[151]===_t?$=t[152]:($=(0,D.jsx)(w,{label:`Encryption`,value:_t}),t[151]=_t,t[152]=$);let vt;t[153]===u.DBParameterGroups?vt=t[154]:(vt=u.DBParameterGroups?.map(rt).join(`, `),t[153]=u.DBParameterGroups,t[154]=vt);let yt;t[155]===vt?yt=t[156]:(yt=(0,D.jsx)(w,{label:`Parameter group`,value:vt}),t[155]=vt,t[156]=yt);let bt;t[157]===u.MasterUsername?bt=t[158]:(bt=(0,D.jsx)(w,{label:`Master username`,value:u.MasterUsername}),t[157]=u.MasterUsername,t[158]=bt);let xt;t[159]===u.DBName?xt=t[160]:(xt=(0,D.jsx)(w,{label:`Initial database`,value:u.DBName}),t[159]=u.DBName,t[160]=xt);let St=u.DeletionProtection?`On`:`Off`,Ct;t[161]===St?Ct=t[162]:(Ct=(0,D.jsx)(w,{label:`Deletion protection`,value:St}),t[161]=St,t[162]=Ct);let wt;t[163]===u.InstanceCreateTime?wt=t[164]:(wt=ee(u.InstanceCreateTime),t[163]=u.InstanceCreateTime,t[164]=wt);let Tt;t[165]===wt?Tt=t[166]:(Tt=(0,D.jsx)(w,{label:`Created`,value:wt}),t[165]=wt,t[166]=Tt);let Et;t[167]!==J||t[168]!==Y||t[169]!==X||t[170]!==Z||t[171]!==Q||t[172]!==$||t[173]!==yt||t[174]!==bt||t[175]!==xt||t[176]!==Ct||t[177]!==Tt?(Et=(0,D.jsxs)(C,{children:[q,(0,D.jsxs)(C.Content,{children:[J,Y,X,Z,Q,$,yt,bt,xt,Ct,Tt]})]}),t[167]=J,t[168]=Y,t[169]=X,t[170]=Z,t[171]=Q,t[172]=$,t[173]=yt,t[174]=bt,t[175]=xt,t[176]=Ct,t[177]=Tt,t[178]=Et):Et=t[178];let Dt;t[179]!==te||t[180]!==s?(Dt=te&&(0,D.jsxs)(C,{children:[(0,D.jsx)(C.Header,{children:`Pending Changes`}),(0,D.jsxs)(C.Content,{children:[(0,D.jsx)(w,{label:`Instance class`,value:s?.DBInstanceClass}),(0,D.jsx)(w,{label:`Allocated storage`,value:s?.AllocatedStorage?`${s.AllocatedStorage} GiB`:void 0})]})]}),t[179]=te,t[180]=s,t[181]=Dt):Dt=t[181],t[182]!==Et||t[183]!==Dt?(M=(0,D.jsx)(Pe,{value:`configuration`,children:(0,D.jsxs)(`div`,{className:`space-y-4`,children:[Et,Dt]})}),t[182]=Et,t[183]=Dt,t[184]=M):M=t[184],ze=Pe,et=`backups`,Ze=`space-y-4`,Qe=e&&(0,D.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,D.jsx)(`p`,{className:`font-medium`,children:`An automated backup failed`}),(0,D.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.Message,` (`,ee(e.Date),`)`]})]}),$e=r&&(0,D.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,D.jsx)(`p`,{className:`font-medium`,children:`A backup raised a warning`}),(0,D.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[r.Message,` (`,ee(r.Date),`)`]})]}),Re=C,t[185]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,D.jsx)(C.Header,{children:`Automated Backups`}),t[185]=Xe):Xe=t[185],Le=C.Content;let Ot=u.BackupRetentionPeriod===0?`Disabled`:`${u.BackupRetentionPeriod} days`;t[186]===Ot?mt=t[187]:(mt=(0,D.jsx)(w,{label:`Retention`,value:Ot}),t[186]=Ot,t[187]=mt);let kt=o?.Status??`None — automated backups are off`;t[188]===kt?I=t[189]:(I=(0,D.jsx)(w,{label:`Status`,value:kt}),t[188]=kt,t[189]=I),t[190]===u.PreferredBackupWindow?Je=t[191]:(Je=(0,D.jsx)(w,{label:`Preferred backup window`,value:u.PreferredBackupWindow}),t[190]=u.PreferredBackupWindow,t[191]=Je),t[192]===u.PreferredMaintenanceWindow?Ye=t[193]:(Ye=(0,D.jsx)(w,{label:`Preferred maintenance window`,value:u.PreferredMaintenanceWindow}),t[192]=u.PreferredMaintenanceWindow,t[193]=Ye),Ie=w,ft=`Last backup`,pt=a?.SnapshotCreateTime&&ee(a.SnapshotCreateTime),t[11]=ve.DBInstanceAutomatedBackups?.[0],t[12]=n,t[13]=Ae,t[14]=u,t[15]=je,t[16]=y,t[17]=ge.DBSnapshots,t[18]=v,t[19]=S,t[20]=xe,t[21]=Ie,t[22]=Le,t[23]=Re,t[24]=ze,t[25]=Be,t[26]=Ve,t[27]=Je,t[28]=Ye,t[29]=Xe,t[30]=Ze,t[31]=Qe,t[32]=$e,t[33]=et,t[34]=k,t[35]=A,t[36]=j,t[37]=M,t[38]=ut,t[39]=N,t[40]=P,t[41]=dt,t[42]=F,t[43]=ft,t[44]=pt,t[45]=mt,t[46]=I}else Ie=t[21],Le=t[22],Re=t[23],ze=t[24],Be=t[25],Ve=t[26],Je=t[27],Ye=t[28],Xe=t[29],Ze=t[30],Qe=t[31],$e=t[32],et=t[33],k=t[34],A=t[35],j=t[36],M=t[37],ut=t[38],N=t[39],P=t[40],dt=t[41],F=t[42],ft=t[43],pt=t[44],mt=t[45],I=t[46];let L;t[194]!==Ie||t[195]!==ft||t[196]!==pt?(L=(0,D.jsx)(Ie,{label:ft,value:pt}),t[194]=Ie,t[195]=ft,t[196]=pt,t[197]=L):L=t[197];let R;t[198]!==Le||t[199]!==Je||t[200]!==Ye||t[201]!==L||t[202]!==mt||t[203]!==I?(R=(0,D.jsxs)(Le,{children:[mt,I,Je,Ye,L]}),t[198]=Le,t[199]=Je,t[200]=Ye,t[201]=L,t[202]=mt,t[203]=I,t[204]=R):R=t[204];let z;t[205]!==Re||t[206]!==Xe||t[207]!==R?(z=(0,D.jsxs)(Re,{children:[Xe,R]}),t[205]=Re,t[206]=Xe,t[207]=R,t[208]=z):z=t[208];let ht;t[209]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,D.jsx)(`h3`,{className:`text-sm font-medium`,children:`Snapshots`}),t[209]=ht):ht=t[209];let B;t[210]!==r||t[211]!==Ve?(B=(0,D.jsxs)(`div`,{className:`space-y-2`,children:[ht,Ve.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:`Identifier`}),(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:`Status`}),(0,D.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,D.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,D.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,D.jsx)(`tbody`,{children:Ve.map(e=>{let t=e.DBSnapshotIdentifier;return t?(0,D.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,D.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,D.jsx)(o,{className:`text-primary hover:underline`,params:{id:t},to:`/rds/describe-db-snapshots/$id`,children:t})}),(0,D.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,D.jsx)(`td`,{className:`px-4 py-2`,children:(0,D.jsx)(Me,{state:e.Status})}),(0,D.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:ee(e.SnapshotCreateTime)}),(0,D.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,D.jsx)(l,{disabled:!ce(e.Status),onClick:async()=>{await r({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:t}})},size:`sm`,variant:`outline`,children:`Restore`}),(0,D.jsx)(l,{disabled:!ue(e.Status,e.SnapshotType),onClick:()=>{Oe(t)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},t):null})})]})}):(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots of this instance.`})]}),t[210]=r,t[211]=Ve,t[212]=B):B=t[212];let V;t[213]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Automated backups are daily snapshots taken in the backup window, deleted by retention rather than by hand. There is no point-in-time restore.`}),t[213]=V):V=t[213];let H;t[214]!==Ze||t[215]!==Qe||t[216]!==$e||t[217]!==z||t[218]!==B?(H=(0,D.jsxs)(`div`,{className:Ze,children:[Qe,$e,z,B,V]}),t[214]=Ze,t[215]=Qe,t[216]=$e,t[217]=z,t[218]=B,t[219]=H):H=t[219];let U;t[220]!==ze||t[221]!==et||t[222]!==H?(U=(0,D.jsx)(ze,{value:et,children:H}),t[220]=ze,t[221]=et,t[222]=H,t[223]=U):U=t[223];let W;t[224]===d?W=t[225]:(W=(0,D.jsx)(Pe,{value:`tags`,children:(0,D.jsx)(Ge,{arn:d})}),t[224]=d,t[225]=W);let G;t[226]===Ae?G=t[227]:(G=(0,D.jsx)(Pe,{value:`events`,children:(0,D.jsx)(We,{events:Ae})}),t[226]=Ae,t[227]=G);let K;t[228]!==Be||t[229]!==k||t[230]!==A||t[231]!==j||t[232]!==M||t[233]!==U||t[234]!==W||t[235]!==G?(K=(0,D.jsxs)(Be,{defaultValue:k,children:[A,j,M,U,W,G]}),t[228]=Be,t[229]=k,t[230]=A,t[231]=j,t[232]=M,t[233]=U,t[234]=W,t[235]=G,t[236]=K):K=t[236];let q;t[237]!==ut||t[238]!==N||t[239]!==P||t[240]!==K?(q=(0,D.jsxs)(`div`,{className:ut,children:[N,P,K]}),t[237]=ut,t[238]=N,t[239]=P,t[240]=K,t[241]=q):q=t[241];let J;t[242]!==u||t[243]!==b?(J=b&&(0,D.jsx)(O,{instance:u,onOpenChange:Te,open:!0}),t[242]=u,t[243]=b,t[244]=J):J=t[244];let Y;t[245]!==n||t[246]!==Ee?(Y=Ee&&(0,D.jsx)(He,{dbInstanceIdentifier:n,onOpenChange:De,open:!0}),t[245]=n,t[246]=Ee,t[247]=Y):Y=t[247];let X;t[248]===x?X=t[249]:(X=x&&(0,D.jsx)(Ue,{dbSnapshotIdentifier:x,onOpenChange:e=>{e||Oe(null)},open:!0}),t[248]=x,t[249]=X);let gt=u.DeletionProtection??!1,Z;t[250]===r?Z=t[251]:(Z=async()=>{await r({to:`/rds/describe-db-instances`})},t[250]=r,t[251]=Z);let Q;t[252]===Symbol.for(`react.memo_cache_sentinel`)?(Q=()=>{Ce(!1),Te(!0)},t[252]=Q):Q=t[252];let _t;t[253]!==n||t[254]!==Se||t[255]!==gt||t[256]!==Z?(_t=(0,D.jsx)(Ke,{dbInstanceIdentifier:n,deletionProtection:gt,onDeleted:Z,onModify:Q,onOpenChange:Ce,open:Se}),t[253]=n,t[254]=Se,t[255]=gt,t[256]=Z,t[257]=_t):_t=t[257];let $;return t[258]!==dt||t[259]!==F||t[260]!==q||t[261]!==J||t[262]!==Y||t[263]!==X||t[264]!==_t?($=(0,D.jsxs)(D.Fragment,{children:[dt,F,q,J,Y,X,_t]}),t[258]=dt,t[259]=F,t[260]=q,t[261]=J,t[262]=Y,t[263]=X,t[264]=_t,t[265]=$):$=t[265],$}function rt(e){return`${e.DBParameterGroupName} (${e.ParameterApplyStatus})`}function it(e){return e.VpcSecurityGroupId}function at(e){return(0,D.jsxs)(`span`,{className:`text-xs text-tactical-amber`,children:[e.StatusType,`: `,e.Message??e.Status]},`${e.StatusType}-${e.Status}`)}function ot(e,t){return(e.SnapshotCreateTime?.getTime()??0)-(t.SnapshotCreateTime?.getTime()??0)}function st(e){return e.SnapshotType===f}function ct(e){return k(e,`backup`)&&k(e,`notification`)}function lt(e){return k(e,`backup`)&&k(e,`failure`)}function j(){let e=(0,qe.c)(4),{id:t}=v.useParams(),n;e[0]===t?n=e[1]:(n=te(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,D.jsx)(A,{dbInstanceIdentifier:n}),e[2]=n,e[3]=r),r}export{j as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useQuery-DVjCHx2S.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{E as ee,j as te}from"./httpRequest-Bc1WZmsd.js";import{t as ne}from"./back-link-DjawJm5W.js";import{t as re}from"./camera-1Qc58YO0.js";import{t as ie}from"./pencil-Cx6ej4Kx.js";import{t as ae}from"./cli-command-panel-DPooQRso.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{t as u}from"./input-CpcyJw4R.js";import{w as d}from"./ec2-DJL24ekw.js";import{S as oe,a as f,c as se,d as ce,f as le,l as ue,m as de,p as fe,u as pe}from"./rds-DnVYe-Nj.js";import{d as p,l as m,m as h,p as me}from"./rds-hO6CGpr0.js";import{c as he,d as ge,l as _e,n as g,o as ve,s as ye,t as _}from"./rds-BKbEDMHo.js";import{t as v}from"./_id-Dvn2ziMO.js";import{t as be}from"./page-heading-M0NyqAmu.js";import{a as xe,i as y,n as Se,t as Ce}from"./zod-VwMMRSfy.js";import{t as we}from"./error-banner-BcDqaPk7.js";import{t as b}from"./form-actions-C3zG6ld2.js";import{n as Te,r as Ee,s as De,t as x}from"./field-ChkDR_wL.js";import{a as Oe,i as S,l as ke,s as Ae,t as je}from"./alert-dialog-BYzNCmBp.js";import{n as C,t as w}from"./detail-row-CclMDqj8.js";import{t as Me}from"./state-badge-BiFj5bbX.js";import{i as T,n as Ne,r as Pe,t as Fe}from"./tabs-CAMCnrj7.js";import{n as Ie,t as Le}from"./picker-notice-Cj5Hb6RJ.js";import{a as Re,o as ze,s as Be,t as Ve}from"./security-group-checkboxes-CgmGDP6L.js";import{t as He}from"./create-db-snapshot-dialog-DKy5_7Dd.js";import{t as Ue}from"./delete-db-snapshot-dialog-CD5YShBB.js";import{t as We}from"./rds-events-panel-0IRk0Dqj.js";import{t as Ge}from"./rds-tags-tab-COIsvcce.js";import{t as Ke}from"./delete-db-instance-dialog-1KZXTOil.js";var E=t(n(),1),qe=r(),D=e(),Je=[{label:`Identifier`,note:`The identifier is the endpoint hostname and the certificate subject; renaming in place is not implemented.`},{label:`Engine version`,note:`There is no in-place engine-version upgrade.`},{label:`Port`,note:`The port is fixed at create; changing it would break every client and the serving certificate.`},{label:`DB subnet group`,note:`The endpoint ENI is placed at create; moving it would change the address clients resolve.`}];function O(e){let t=(0,qe.c)(222),{open:n,onOpenChange:r,instance:a}=e,o=m(),s=i(ge),ee=i(d),te=i(ve),ne=a.Engine??``,re;t[0]===ne?re=t[1]:(re=_e(ne),t[0]=ne,t[1]=re);let ie=i(re),ae=a.DBInstanceIdentifier??``,c=a.AllocatedStorage??0,l;t[2]===a.VpcSecurityGroups?l=t[3]:(l=a.VpcSecurityGroups?.map(et).filter(Boolean)??[],t[2]=a.VpcSecurityGroups,t[3]=l);let f=l,se;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(se=Ce(oe),t[4]=se):se=t[4];let ce=a.DBInstanceClass??``,le=a.DBParameterGroups?.[0]?.DBParameterGroupName??``,ue=a.DeletionProtection??!1,de=a.BackupRetentionPeriod??0,fe=a.PreferredBackupWindow??``,pe=a.PreferredMaintenanceWindow??``,p;t[5]!==f||t[6]!==c||t[7]!==pe||t[8]!==ce||t[9]!==le||t[10]!==ue||t[11]!==de||t[12]!==fe?(p={resolver:se,defaultValues:{currentAllocatedStorage:c,dbInstanceClass:ce,allocatedStorage:c,dbParameterGroupName:le,vpcSecurityGroupIds:f,deletionProtection:ue,backupRetentionPeriod:de,preferredBackupWindow:fe,preferredMaintenanceWindow:pe,masterUserPassword:``,applyImmediately:!1}},t[5]=f,t[6]=c,t[7]=pe,t[8]=ce,t[9]=le,t[10]=ue,t[11]=de,t[12]=fe,t[13]=p):p=t[13];let{control:h,formState:me,handleSubmit:he,register:g,setValue:ye}=y(p),{errors:_,isSubmitting:v}=me,be;t[14]===h?be=t[15]:(be={control:h},t[14]=h,t[15]=be);let C=xe(be),w=C.dbInstanceClass??``,Me=C.allocatedStorage??c,T;t[16]===C.vpcSecurityGroupIds?T=t[17]:(T=C.vpcSecurityGroupIds??[],t[16]=C.vpcSecurityGroupIds,t[17]=T);let Ne=T,Pe;t[18]===ie.data?.OrderableDBInstanceOptions?Pe=t[19]:(Pe=ie.data?.OrderableDBInstanceOptions??[],t[18]=ie.data?.OrderableDBInstanceOptions,t[19]=Pe);let Fe;t[20]===Pe?Fe=t[21]:(Fe=new Set(Pe.map($e).filter(Boolean)),t[20]=Pe,t[21]=Fe);let He;t[22]===Fe?He=t[23]:(He=[...Fe],t[22]=Fe,t[23]=He);let Ue=He,We,Ge,Ke,E,O,k,tt,nt,A,rt,it,at,ot,st,ct,lt,j,M,ut,N;if(t[24]!==h||t[25]!==c||t[26]!==te.data?.DBEngineVersions||t[27]!==_.allocatedStorage||t[28]!==he||t[29]!==ae||t[30]!==a.DBInstanceClass||t[31]!==a.DBSubnetGroup?.VpcId||t[32]!==a.Engine||t[33]!==Ue||t[34]!==o||t[35]!==r||t[36]!==n||t[37]!==ie||t[38]!==s||t[39]!==g||t[40]!==ee||t[41]!==w||t[42]!==Me||t[43]!==ye){let e;t[64]===s.data?.DBParameterGroups?e=t[65]:(e=s.data?.DBParameterGroups??[],t[64]=s.data?.DBParameterGroups,t[65]=e);let i;t[66]===te.data?.DBEngineVersions?i=t[67]:(i=te.data?.DBEngineVersions??[],t[66]=te.data?.DBEngineVersions,t[67]=i);let ne=Be(e,i,a.Engine??``),re=a.DBSubnetGroup?.VpcId,l;t[68]===ee.data?.SecurityGroups?l=t[69]:(l=ee.data?.SecurityGroups??[],t[68]=ee.data?.SecurityGroups,t[69]=l);let d;if(t[70]!==re||t[71]!==l){let e;t[73]===re?e=t[74]:(e=e=>re===void 0||e.VpcId===re,t[73]=re,t[74]=e),d=l.filter(e),t[70]=re,t[71]=l,t[72]=d}else d=t[72];O=d;let oe=w!==a.DBInstanceClass,f=Me!==c,se=Ue.length===0,ce=`No instance class this cluster's nodes can run is available for ${a.Engine}.`,le;t[75]!==ie||t[76]!==se||t[77]!==ce?(le=Ie(ie,se,{loading:`Loading the instance classes…`,failed:`Could not read the instance classes`,empty:ce}),t[75]=ie,t[76]=se,t[77]=ce,t[78]=le):le=t[78];let ue=le,de=ne.length===0,fe;t[79]!==s||t[80]!==de?(fe=Ie(s,de,{loading:`Loading the parameter groups…`,failed:`Could not read the parameter groups`,empty:`No parameter group of this instance's engine family exists.`}),t[79]=s,t[80]=de,t[81]=fe):fe=t[81];let pe=fe,p=O.length===0,m;t[82]!==ee||t[83]!==p?(m=Ie(ee,p,{loading:`Loading the security groups…`,failed:`Could not read the security groups`,empty:`No security group in this instance's VPC is available.`}),t[82]=ee,t[83]=p,t[84]=m):m=t[84],E=m;let me;t[85]===ye?me=t[86]:(me=e=>{ye(`vpcSecurityGroupIds`,e,{shouldValidate:!0})},t[85]=ye,t[86]=me),k=me;let ge;t[87]!==ae||t[88]!==o||t[89]!==r?(ge=async e=>{await o.mutateAsync({...e,dbInstanceIdentifier:ae}),r(!1)},t[87]=ae,t[88]=o,t[89]=r,t[90]=ge):ge=t[90];let _e=ge;Ke=je,ut=r,N=n,Ge=S,j=`max-h-[85vh] overflow-y-auto`;let ve;t[91]===ae?ve=t[92]:(ve=(0,D.jsxs)(ke,{children:[`Modify `,ae]}),t[91]=ae,t[92]=ve);let v;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,D.jsx)(Oe,{children:`Changes apply in the maintenance window unless you apply them immediately.`}),t[93]=v):v=t[93],t[94]===ve?M=t[95]:(M=(0,D.jsxs)(Ae,{children:[ve,v]}),t[94]=ve,t[95]=M),ot=`space-y-4`,t[96]!==he||t[97]!==_e?(st=he(_e),t[96]=he,t[97]=_e,t[98]=st):st=t[98];let be;t[99]===Ue?be=t[100]:(be=Ue.map(Qe),t[99]=Ue,t[100]=be);let xe=oe&&`Changing the class replaces the VM. The database is unavailable while it does.`;t[101]!==ue||t[102]!==h||t[103]!==be||t[104]!==xe?(ct=(0,D.jsx)(ze,{control:h,id:`modify-class`,label:`DB instance class`,name:`dbInstanceClass`,notice:ue,options:be,placeholder:`Select an instance class`,warning:xe}),t[101]=ue,t[102]=h,t[103]=be,t[104]=xe,t[105]=ct):ct=t[105];let y;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-storage`,children:`Allocated storage (GiB)`})}),t[106]=y):y=t[106];let Se=!!_.allocatedStorage,Ce;t[107]===g?Ce=t[108]:(Ce=g(`allocatedStorage`,{valueAsNumber:!0}),t[107]=g,t[108]=Ce);let we;t[109]!==c||t[110]!==Se||t[111]!==Ce?(we=(0,D.jsx)(u,{"aria-invalid":Se,id:`modify-storage`,min:c,type:`number`,...Ce}),t[109]=c,t[110]=Se,t[111]=Ce,t[112]=we):we=t[112];let b;t[113]===c?b=t[114]:(b=(0,D.jsxs)(Te,{children:[`Currently `,c,` GiB. Storage grows only.`]}),t[113]=c,t[114]=b);let C;t[115]===f?C=t[116]:(C=f&&(0,D.jsx)(`p`,{className:`text-xs text-tactical-amber`,children:`Growing storage stops and starts the instance to extend the filesystem.`}),t[115]=f,t[116]=C);let T;t[117]===_.allocatedStorage?T=t[118]:(T=(0,D.jsx)(Ee,{errors:[_.allocatedStorage]}),t[117]=_.allocatedStorage,t[118]=T),t[119]!==we||t[120]!==b||t[121]!==C||t[122]!==T?(lt=(0,D.jsxs)(x,{children:[y,we,b,C,T]}),t[119]=we,t[120]=b,t[121]=C,t[122]=T,t[123]=lt):lt=t[123],We=ze,tt=h,nt=`modify-parameter-group`,A=`DB parameter group`,rt=`dbParameterGroupName`,it=pe,at=ne.map(Ze),t[24]=h,t[25]=c,t[26]=te.data?.DBEngineVersions,t[27]=_.allocatedStorage,t[28]=he,t[29]=ae,t[30]=a.DBInstanceClass,t[31]=a.DBSubnetGroup?.VpcId,t[32]=a.Engine,t[33]=Ue,t[34]=o,t[35]=r,t[36]=n,t[37]=ie,t[38]=s,t[39]=g,t[40]=ee,t[41]=w,t[42]=Me,t[43]=ye,t[44]=We,t[45]=Ge,t[46]=Ke,t[47]=E,t[48]=O,t[49]=k,t[50]=tt,t[51]=nt,t[52]=A,t[53]=rt,t[54]=it,t[55]=at,t[56]=ot,t[57]=st,t[58]=ct,t[59]=lt,t[60]=j,t[61]=M,t[62]=ut,t[63]=N}else We=t[44],Ge=t[45],Ke=t[46],E=t[47],O=t[48],k=t[49],tt=t[50],nt=t[51],A=t[52],rt=t[53],it=t[54],at=t[55],ot=t[56],st=t[57],ct=t[58],lt=t[59],j=t[60],M=t[61],ut=t[62],N=t[63];let P;t[124]!==We||t[125]!==tt||t[126]!==nt||t[127]!==A||t[128]!==rt||t[129]!==it||t[130]!==at?(P=(0,D.jsx)(We,{control:tt,id:nt,label:A,name:rt,notice:it,options:at,placeholder:`Engine default group`}),t[124]=We,t[125]=tt,t[126]=nt,t[127]=A,t[128]=rt,t[129]=it,t[130]=at,t[131]=P):P=t[131];let dt;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,D.jsx)(De,{children:`VPC security groups`}),t[132]=dt):dt=t[132];let F;t[133]!==E||t[134]!==O||t[135]!==Ne||t[136]!==k?(F=(0,D.jsxs)(x,{children:[dt,E?(0,D.jsx)(Le,{notice:E}):(0,D.jsx)(Ve,{emptyText:`No security group in this instance's VPC is available.`,groups:O,onChange:k,selected:Ne})]}),t[133]=E,t[134]=O,t[135]=Ne,t[136]=k,t[137]=F):F=t[137];let ft;t[138]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-retention`,children:`Backup retention (days)`})}),t[138]=ft):ft=t[138];let pt=!!_.backupRetentionPeriod,mt;t[139]===g?mt=t[140]:(mt=g(`backupRetentionPeriod`,{valueAsNumber:!0}),t[139]=g,t[140]=mt);let I;t[141]!==pt||t[142]!==mt?(I=(0,D.jsx)(u,{"aria-invalid":pt,id:`modify-retention`,max:7,min:0,type:`number`,...mt}),t[141]=pt,t[142]=mt,t[143]=I):I=t[143];let L;t[144]===_.backupRetentionPeriod?L=t[145]:(L=(0,D.jsx)(Ee,{errors:[_.backupRetentionPeriod]}),t[144]=_.backupRetentionPeriod,t[145]=L);let R;t[146]!==I||t[147]!==L?(R=(0,D.jsxs)(x,{children:[ft,I,L]}),t[146]=I,t[147]=L,t[148]=R):R=t[148];let z;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-backup-window`,children:`Preferred backup window`})}),t[149]=z):z=t[149];let ht=!!_.preferredBackupWindow,B;t[150]===g?B=t[151]:(B=g(`preferredBackupWindow`),t[150]=g,t[151]=B);let V;t[152]!==ht||t[153]!==B?(V=(0,D.jsx)(u,{"aria-invalid":ht,id:`modify-backup-window`,placeholder:`hh24:mi-hh24:mi in UTC`,...B}),t[152]=ht,t[153]=B,t[154]=V):V=t[154];let H;t[155]===_.preferredBackupWindow?H=t[156]:(H=(0,D.jsx)(Ee,{errors:[_.preferredBackupWindow]}),t[155]=_.preferredBackupWindow,t[156]=H);let U;t[157]!==V||t[158]!==H?(U=(0,D.jsxs)(x,{children:[z,V,H]}),t[157]=V,t[158]=H,t[159]=U):U=t[159];let W;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-maintenance-window`,children:`Preferred maintenance window`})}),t[160]=W):W=t[160];let G=!!_.preferredMaintenanceWindow,K;t[161]===g?K=t[162]:(K=g(`preferredMaintenanceWindow`),t[161]=g,t[162]=K);let q;t[163]!==G||t[164]!==K?(q=(0,D.jsx)(u,{"aria-invalid":G,id:`modify-maintenance-window`,placeholder:`ddd:hh24:mi-ddd:hh24:mi in UTC`,...K}),t[163]=G,t[164]=K,t[165]=q):q=t[165];let J;t[166]===_.preferredMaintenanceWindow?J=t[167]:(J=(0,D.jsx)(Ee,{errors:[_.preferredMaintenanceWindow]}),t[166]=_.preferredMaintenanceWindow,t[167]=J);let Y;t[168]!==q||t[169]!==J?(Y=(0,D.jsxs)(x,{children:[W,q,J]}),t[168]=q,t[169]=J,t[170]=Y):Y=t[170];let X;t[171]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,D.jsx)(De,{children:(0,D.jsx)(`label`,{htmlFor:`modify-password`,children:`Reset master password`})}),t[171]=X):X=t[171];let gt=!!_.masterUserPassword,Z;t[172]===g?Z=t[173]:(Z=g(`masterUserPassword`),t[172]=g,t[173]=Z);let Q;t[174]!==gt||t[175]!==Z?(Q=(0,D.jsx)(u,{"aria-invalid":gt,id:`modify-password`,type:`password`,...Z}),t[174]=gt,t[175]=Z,t[176]=Q):Q=t[176];let _t;t[177]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,D.jsx)(Te,{children:`Leave blank to keep the current password.`}),t[177]=_t):_t=t[177];let $;t[178]===_.masterUserPassword?$=t[179]:($=(0,D.jsx)(Ee,{errors:[_.masterUserPassword]}),t[178]=_.masterUserPassword,t[179]=$);let vt;t[180]!==Q||t[181]!==$?(vt=(0,D.jsxs)(x,{children:[X,Q,_t,$]}),t[180]=Q,t[181]=$,t[182]=vt):vt=t[182];let yt;t[183]===h?yt=t[184]:(yt=(0,D.jsx)(Re,{control:h,name:`deletionProtection`}),t[183]=h,t[184]=yt);let bt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,D.jsx)(De,{children:`Apply immediately`}),t[185]=bt):bt=t[185];let xt;t[186]===h?xt=t[187]:(xt=(0,D.jsxs)(x,{children:[bt,(0,D.jsx)(Se,{control:h,name:`applyImmediately`,render:Xe})]}),t[186]=h,t[187]=xt);let St;t[188]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,D.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border p-3`,children:[(0,D.jsx)(`h3`,{className:`text-xs font-medium`,children:`Fixed at create`}),Je.map(Ye)]}),t[188]=St):St=t[188];let Ct;t[189]===o.error?Ct=t[190]:(Ct=o.error&&(0,D.jsx)(we,{error:o.error,msg:`Failed to modify the DB instance`}),t[189]=o.error,t[190]=Ct);let wt;t[191]===r?wt=t[192]:(wt=()=>{r(!1)},t[191]=r,t[192]=wt);let Tt;t[193]!==v||t[194]!==o.isPending||t[195]!==wt?(Tt=(0,D.jsx)(`div`,{className:`flex justify-end`,children:(0,D.jsx)(b,{isPending:o.isPending,isSubmitting:v,onCancel:wt,pendingLabel:`Saving…`,submitLabel:`Save Changes`})}),t[193]=v,t[194]=o.isPending,t[195]=wt,t[196]=Tt):Tt=t[196];let Et;t[197]!==ot||t[198]!==st||t[199]!==ct||t[200]!==lt||t[201]!==P||t[202]!==F||t[203]!==R||t[204]!==U||t[205]!==Y||t[206]!==vt||t[207]!==yt||t[208]!==xt||t[209]!==Ct||t[210]!==Tt?(Et=(0,D.jsxs)(`form`,{className:ot,onSubmit:st,children:[ct,lt,P,F,R,U,Y,vt,yt,xt,St,Ct,Tt]}),t[197]=ot,t[198]=st,t[199]=ct,t[200]=lt,t[201]=P,t[202]=F,t[203]=R,t[204]=U,t[205]=Y,t[206]=vt,t[207]=yt,t[208]=xt,t[209]=Ct,t[210]=Tt,t[211]=Et):Et=t[211];let Dt;t[212]!==Ge||t[213]!==j||t[214]!==M||t[215]!==Et?(Dt=(0,D.jsxs)(Ge,{className:j,children:[M,Et]}),t[212]=Ge,t[213]=j,t[214]=M,t[215]=Et,t[216]=Dt):Dt=t[216];let Ot;return t[217]!==Ke||t[218]!==ut||t[219]!==N||t[220]!==Dt?(Ot=(0,D.jsx)(Ke,{onOpenChange:ut,open:N,children:Dt}),t[217]=Ke,t[218]=ut,t[219]=N,t[220]=Dt,t[221]=Ot):Ot=t[221],Ot}function Ye(e){return(0,D.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,D.jsx)(`span`,{className:`font-medium`,children:e.label}),` —`,` `,e.note]},e.label)}function Xe(e){let{field:t}=e;return(0,D.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,D.jsx)(`input`,{"aria-label":`Apply immediately`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),(0,D.jsx)(`span`,{children:`Apply now instead of waiting for the maintenance window`})]})}function Ze(e){return{value:e.DBParameterGroupName??``,label:e.DBParameterGroupName??``}}function Qe(e){return{value:e,label:e}}function $e(e){return e.DBInstanceClass??``}function et(e){return e.VpcSecurityGroupId??``}function k(e,t){return e.EventCategories?.includes(t)??!1}function tt(e,t){return e.filter(t).toSorted((e,t)=>(e.Date?.getTime()??0)-(t.Date?.getTime()??0)).at(-1)}function nt(e){let t=e.Endpoint?.Address;if(!t)return[];let n=e.Endpoint?.Port??e.DbInstancePort,r=e.MasterUsername??``,i=e.DBName??r;return e.Engine===`postgres`?[{label:`Connect`,parts:[{type:`bin`,value:`psql`},{type:`value`,value:` "host=${t} port=${n} dbname=${i} user=${r} sslmode=require"`}]}]:[{label:`Connect`,parts:[{type:`bin`,value:`mariadb`},{type:`flag`,value:` --host`},{type:`value`,value:`=${t}`},{type:`flag`,value:` --port`},{type:`value`,value:`=${n}`},{type:`flag`,value:` --user`},{type:`value`,value:`=${r}`},{type:`flag`,value:` --ssl`},{type:`value`,value:` ${i}`}]}]}function A(e){let t=(0,qe.c)(266),{dbInstanceIdentifier:n}=e,r=s(),i;t[0]===n?i=t[1]:(i=g(n),t[0]=n,t[1]=i);let{data:te}=a(i),u=te.DBInstances?.[0],d=u?.DBInstanceArn??``,oe;t[2]===n?oe=t[3]:(oe=ye(n),t[2]=n,t[3]=oe);let{data:f}=a(oe),m;t[4]===n?m=t[5]:(m=he(n),t[4]=n,t[5]=m);let{data:ge}=a(m),_e;t[6]===n?_e=t[7]:(_e=_(n),t[6]=n,t[7]=_e);let{data:ve}=a(_e),v=me(),xe=h(),y=p(),[Se,Ce]=(0,E.useState)(!1),[b,Te]=(0,E.useState)(!1),[Ee,De]=(0,E.useState)(!1),[x,Oe]=(0,E.useState)(null);if(!u?.DBInstanceIdentifier){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(ne,{to:`/rds/describe-db-instances`,children:`Back to databases`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`DB instance not found.`})]}),t[8]=e):e=t[8],e}let S=u.DBInstanceStatus,ke;t[9]===f.Events?ke=t[10]:(ke=f.Events??[],t[9]=f.Events,t[10]=ke);let Ae=ke,je=v.error??xe.error??y.error,Ie,Le,Re,ze,Be,Ve,Je,Ye,Xe,Ze,Qe,$e,et,k,A,j,M,ut,N,P,dt,F,ft,pt,mt,I;if(t[11]!==ve.DBInstanceAutomatedBackups?.[0]||t[12]!==n||t[13]!==Ae||t[14]!==u||t[15]!==je||t[16]!==y||t[17]!==ge.DBSnapshots||t[18]!==v||t[19]!==S||t[20]!==xe){let e=tt(Ae,lt),r=tt(Ae,ct),i;t[47]===ge.DBSnapshots?i=t[48]:(i=ge.DBSnapshots??[],t[47]=ge.DBSnapshots,t[48]=i),Ve=i;let a=Ve.filter(st).toSorted(ot).at(-1),o=ve.DBInstanceAutomatedBackups?.[0],s=u.PendingModifiedValues,te=s?.AllocatedStorage!==void 0||s?.DBInstanceClass!==void 0;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,D.jsx)(ne,{to:`/rds/describe-db-instances`,children:`Back to databases`}),t[49]=dt):dt=t[49],t[50]===je?F=t[51]:(F=je&&(0,D.jsx)(we,{error:je,msg:`Failed to change the DB instance state.`}),t[50]=je,t[51]=F),ut=`space-y-6`;let d;t[52]!==v.isPending||t[53]!==S?(d=!fe(S)||v.isPending,t[52]=v.isPending,t[53]=S,t[54]=d):d=t[54];let oe;t[55]!==n||t[56]!==v?(oe=()=>{v.mutate(n)},t[55]=n,t[56]=v,t[57]=oe):oe=t[57];let f;t[58]!==d||t[59]!==oe?(f=(0,D.jsx)(l,{disabled:d,onClick:oe,size:`sm`,variant:`outline`,children:`Start`}),t[58]=d,t[59]=oe,t[60]=f):f=t[60];let ce;t[61]!==S||t[62]!==xe.isPending?(ce=!de(S)||xe.isPending,t[61]=S,t[62]=xe.isPending,t[63]=ce):ce=t[63];let ue;t[64]!==n||t[65]!==xe?(ue=()=>{xe.mutate(n)},t[64]=n,t[65]=xe,t[66]=ue):ue=t[66];let p;t[67]!==ce||t[68]!==ue?(p=(0,D.jsx)(l,{disabled:ce,onClick:ue,size:`sm`,variant:`outline`,children:`Stop`}),t[67]=ce,t[68]=ue,t[69]=p):p=t[69];let m;t[70]!==y.isPending||t[71]!==S?(m=!pe(S)||y.isPending,t[70]=y.isPending,t[71]=S,t[72]=m):m=t[72];let h;t[73]!==n||t[74]!==y?(h=()=>{y.mutate(n)},t[73]=n,t[74]=y,t[75]=h):h=t[75];let me;t[76]!==m||t[77]!==h?(me=(0,D.jsx)(l,{disabled:m,onClick:h,size:`sm`,variant:`outline`,children:`Reboot`}),t[76]=m,t[77]=h,t[78]=me):me=t[78];let he;t[79]===S?he=t[80]:(he=le(S),t[79]=S,t[80]=he);let _e=!he,g;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{De(!0)},t[81]=g):g=t[81];let ye;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,D.jsx)(re,{className:`size-4`}),t[82]=ye):ye=t[82];let _;t[83]===_e?_=t[84]:(_=(0,D.jsxs)(l,{disabled:_e,onClick:g,size:`sm`,variant:`outline`,children:[ye,`Take Snapshot`]}),t[83]=_e,t[84]=_);let Se;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Se=()=>{Te(!0)},t[85]=Se):Se=t[85];let b;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,D.jsxs)(l,{onClick:Se,size:`sm`,variant:`outline`,children:[(0,D.jsx)(ie,{className:`size-4`}),`Modify`]}),t[86]=b):b=t[86];let Ee;t[87]===S?Ee=t[88]:(Ee=se(S),t[87]=S,t[88]=Ee);let x=!Ee,Oe;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=()=>{Ce(!0)},t[89]=Oe):Oe=t[89];let ke;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,D.jsx)(c,{className:`size-4`}),t[90]=ke):ke=t[90];let He;t[91]===x?He=t[92]:(He=(0,D.jsxs)(l,{disabled:x,onClick:Oe,size:`sm`,variant:`destructive`,children:[ke,`Delete`]}),t[91]=x,t[92]=He);let Ue;t[93]!==f||t[94]!==p||t[95]!==me||t[96]!==_||t[97]!==He?(Ue=(0,D.jsxs)(`div`,{className:`flex gap-2`,children:[f,p,me,_,b,He]}),t[93]=f,t[94]=p,t[95]=me,t[96]=_,t[97]=He,t[98]=Ue):Ue=t[98],t[99]!==n||t[100]!==Ue?(N=(0,D.jsx)(be,{actions:Ue,subtitle:`DB Instance`,title:n}),t[99]=n,t[100]=Ue,t[101]=N):N=t[101];let We;t[102]===S?We=t[103]:(We=(0,D.jsx)(Me,{state:S}),t[102]=S,t[103]=We);let Ge;t[104]===u.StatusInfos?Ge=t[105]:(Ge=u.StatusInfos?.map(at),t[104]=u.StatusInfos,t[105]=Ge),t[106]!==We||t[107]!==Ge?(P=(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[We,Ge]}),t[106]=We,t[107]=Ge,t[108]=P):P=t[108],Be=Fe,k=`connectivity`,t[109]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,D.jsxs)(Ne,{children:[(0,D.jsx)(T,{value:`connectivity`,children:`Connectivity`}),(0,D.jsx)(T,{value:`configuration`,children:`Configuration`}),(0,D.jsx)(T,{value:`backups`,children:`Backups`}),(0,D.jsx)(T,{value:`tags`,children:`Tags`}),(0,D.jsx)(T,{value:`events`,children:`Events`})]}),t[109]=A):A=t[109];let Ke;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,D.jsx)(C.Header,{children:`Endpoint`}),t[110]=Ke):Ke=t[110];let E=u.Endpoint?.Address,qe;t[111]===E?qe=t[112]:(qe=(0,D.jsx)(w,{label:`Address`,value:E}),t[111]=E,t[112]=qe);let O;t[113]!==u.DbInstancePort||t[114]!==u.Endpoint?.Port?(O=(u.Endpoint?.Port??u.DbInstancePort)?.toString(),t[113]=u.DbInstancePort,t[114]=u.Endpoint?.Port,t[115]=O):O=t[115];let L;t[116]===O?L=t[117]:(L=(0,D.jsx)(w,{label:`Port`,value:O}),t[116]=O,t[117]=L);let R=u.DBSubnetGroup?.VpcId,z;t[118]===R?z=t[119]:(z=(0,D.jsx)(w,{label:`VPC`,value:R}),t[118]=R,t[119]=z);let ht=u.DBSubnetGroup?.DBSubnetGroupName,B;t[120]===ht?B=t[121]:(B=(0,D.jsx)(w,{label:`DB subnet group`,value:ht}),t[120]=ht,t[121]=B);let V;t[122]===u.VpcSecurityGroups?V=t[123]:(V=u.VpcSecurityGroups?.map(it).join(`, `),t[122]=u.VpcSecurityGroups,t[123]=V);let H;t[124]===V?H=t[125]:(H=(0,D.jsx)(w,{label:`Security groups`,value:V}),t[124]=V,t[125]=H);let U;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(w,{label:`Publicly accessible`,value:`No — private VPC address`}),t[126]=U):U=t[126];let W;t[127]!==qe||t[128]!==L||t[129]!==z||t[130]!==B||t[131]!==H?(W=(0,D.jsxs)(C,{children:[Ke,(0,D.jsxs)(C.Content,{children:[qe,L,z,B,H,U]})]}),t[127]=qe,t[128]=L,t[129]=z,t[130]=B,t[131]=H,t[132]=W):W=t[132];let G;t[133]===u?G=t[134]:(G=nt(u),t[133]=u,t[134]=G);let K;t[135]===G?K=t[136]:(K=(0,D.jsx)(ae,{commands:G}),t[135]=G,t[136]=K),t[137]!==W||t[138]!==K?(j=(0,D.jsx)(Pe,{value:`connectivity`,children:(0,D.jsxs)(`div`,{className:`space-y-4`,children:[W,K]})}),t[137]=W,t[138]=K,t[139]=j):j=t[139];let q;t[140]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,D.jsx)(C.Header,{children:`Configuration`}),t[140]=q):q=t[140];let J;t[141]===u.Engine?J=t[142]:(J=(0,D.jsx)(w,{label:`Engine`,value:u.Engine}),t[141]=u.Engine,t[142]=J);let Y;t[143]===u.EngineVersion?Y=t[144]:(Y=(0,D.jsx)(w,{label:`Version`,value:u.EngineVersion}),t[143]=u.EngineVersion,t[144]=Y);let X;t[145]===u.DBInstanceClass?X=t[146]:(X=(0,D.jsx)(w,{label:`Instance class`,value:u.DBInstanceClass}),t[145]=u.DBInstanceClass,t[146]=X);let gt=u.AllocatedStorage?`${u.AllocatedStorage} GiB`:void 0,Z;t[147]===gt?Z=t[148]:(Z=(0,D.jsx)(w,{label:`Allocated storage`,value:gt}),t[147]=gt,t[148]=Z);let Q;t[149]===u.StorageType?Q=t[150]:(Q=(0,D.jsx)(w,{label:`Storage type`,value:u.StorageType}),t[149]=u.StorageType,t[150]=Q);let _t=u.StorageEncrypted?`Encrypted — always on`:`Not encrypted`,$;t[151]===_t?$=t[152]:($=(0,D.jsx)(w,{label:`Encryption`,value:_t}),t[151]=_t,t[152]=$);let vt;t[153]===u.DBParameterGroups?vt=t[154]:(vt=u.DBParameterGroups?.map(rt).join(`, `),t[153]=u.DBParameterGroups,t[154]=vt);let yt;t[155]===vt?yt=t[156]:(yt=(0,D.jsx)(w,{label:`Parameter group`,value:vt}),t[155]=vt,t[156]=yt);let bt;t[157]===u.MasterUsername?bt=t[158]:(bt=(0,D.jsx)(w,{label:`Master username`,value:u.MasterUsername}),t[157]=u.MasterUsername,t[158]=bt);let xt;t[159]===u.DBName?xt=t[160]:(xt=(0,D.jsx)(w,{label:`Initial database`,value:u.DBName}),t[159]=u.DBName,t[160]=xt);let St=u.DeletionProtection?`On`:`Off`,Ct;t[161]===St?Ct=t[162]:(Ct=(0,D.jsx)(w,{label:`Deletion protection`,value:St}),t[161]=St,t[162]=Ct);let wt;t[163]===u.InstanceCreateTime?wt=t[164]:(wt=ee(u.InstanceCreateTime),t[163]=u.InstanceCreateTime,t[164]=wt);let Tt;t[165]===wt?Tt=t[166]:(Tt=(0,D.jsx)(w,{label:`Created`,value:wt}),t[165]=wt,t[166]=Tt);let Et;t[167]!==J||t[168]!==Y||t[169]!==X||t[170]!==Z||t[171]!==Q||t[172]!==$||t[173]!==yt||t[174]!==bt||t[175]!==xt||t[176]!==Ct||t[177]!==Tt?(Et=(0,D.jsxs)(C,{children:[q,(0,D.jsxs)(C.Content,{children:[J,Y,X,Z,Q,$,yt,bt,xt,Ct,Tt]})]}),t[167]=J,t[168]=Y,t[169]=X,t[170]=Z,t[171]=Q,t[172]=$,t[173]=yt,t[174]=bt,t[175]=xt,t[176]=Ct,t[177]=Tt,t[178]=Et):Et=t[178];let Dt;t[179]!==te||t[180]!==s?(Dt=te&&(0,D.jsxs)(C,{children:[(0,D.jsx)(C.Header,{children:`Pending Changes`}),(0,D.jsxs)(C.Content,{children:[(0,D.jsx)(w,{label:`Instance class`,value:s?.DBInstanceClass}),(0,D.jsx)(w,{label:`Allocated storage`,value:s?.AllocatedStorage?`${s.AllocatedStorage} GiB`:void 0})]})]}),t[179]=te,t[180]=s,t[181]=Dt):Dt=t[181],t[182]!==Et||t[183]!==Dt?(M=(0,D.jsx)(Pe,{value:`configuration`,children:(0,D.jsxs)(`div`,{className:`space-y-4`,children:[Et,Dt]})}),t[182]=Et,t[183]=Dt,t[184]=M):M=t[184],ze=Pe,et=`backups`,Ze=`space-y-4`,Qe=e&&(0,D.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,D.jsx)(`p`,{className:`font-medium`,children:`An automated backup failed`}),(0,D.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.Message,` (`,ee(e.Date),`)`]})]}),$e=r&&(0,D.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,D.jsx)(`p`,{className:`font-medium`,children:`A backup raised a warning`}),(0,D.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[r.Message,` (`,ee(r.Date),`)`]})]}),Re=C,t[185]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,D.jsx)(C.Header,{children:`Automated Backups`}),t[185]=Xe):Xe=t[185],Le=C.Content;let Ot=u.BackupRetentionPeriod===0?`Disabled`:`${u.BackupRetentionPeriod} days`;t[186]===Ot?mt=t[187]:(mt=(0,D.jsx)(w,{label:`Retention`,value:Ot}),t[186]=Ot,t[187]=mt);let kt=o?.Status??`None — automated backups are off`;t[188]===kt?I=t[189]:(I=(0,D.jsx)(w,{label:`Status`,value:kt}),t[188]=kt,t[189]=I),t[190]===u.PreferredBackupWindow?Je=t[191]:(Je=(0,D.jsx)(w,{label:`Preferred backup window`,value:u.PreferredBackupWindow}),t[190]=u.PreferredBackupWindow,t[191]=Je),t[192]===u.PreferredMaintenanceWindow?Ye=t[193]:(Ye=(0,D.jsx)(w,{label:`Preferred maintenance window`,value:u.PreferredMaintenanceWindow}),t[192]=u.PreferredMaintenanceWindow,t[193]=Ye),Ie=w,ft=`Last backup`,pt=a?.SnapshotCreateTime&&ee(a.SnapshotCreateTime),t[11]=ve.DBInstanceAutomatedBackups?.[0],t[12]=n,t[13]=Ae,t[14]=u,t[15]=je,t[16]=y,t[17]=ge.DBSnapshots,t[18]=v,t[19]=S,t[20]=xe,t[21]=Ie,t[22]=Le,t[23]=Re,t[24]=ze,t[25]=Be,t[26]=Ve,t[27]=Je,t[28]=Ye,t[29]=Xe,t[30]=Ze,t[31]=Qe,t[32]=$e,t[33]=et,t[34]=k,t[35]=A,t[36]=j,t[37]=M,t[38]=ut,t[39]=N,t[40]=P,t[41]=dt,t[42]=F,t[43]=ft,t[44]=pt,t[45]=mt,t[46]=I}else Ie=t[21],Le=t[22],Re=t[23],ze=t[24],Be=t[25],Ve=t[26],Je=t[27],Ye=t[28],Xe=t[29],Ze=t[30],Qe=t[31],$e=t[32],et=t[33],k=t[34],A=t[35],j=t[36],M=t[37],ut=t[38],N=t[39],P=t[40],dt=t[41],F=t[42],ft=t[43],pt=t[44],mt=t[45],I=t[46];let L;t[194]!==Ie||t[195]!==ft||t[196]!==pt?(L=(0,D.jsx)(Ie,{label:ft,value:pt}),t[194]=Ie,t[195]=ft,t[196]=pt,t[197]=L):L=t[197];let R;t[198]!==Le||t[199]!==Je||t[200]!==Ye||t[201]!==L||t[202]!==mt||t[203]!==I?(R=(0,D.jsxs)(Le,{children:[mt,I,Je,Ye,L]}),t[198]=Le,t[199]=Je,t[200]=Ye,t[201]=L,t[202]=mt,t[203]=I,t[204]=R):R=t[204];let z;t[205]!==Re||t[206]!==Xe||t[207]!==R?(z=(0,D.jsxs)(Re,{children:[Xe,R]}),t[205]=Re,t[206]=Xe,t[207]=R,t[208]=z):z=t[208];let ht;t[209]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,D.jsx)(`h3`,{className:`text-sm font-medium`,children:`Snapshots`}),t[209]=ht):ht=t[209];let B;t[210]!==r||t[211]!==Ve?(B=(0,D.jsxs)(`div`,{className:`space-y-2`,children:[ht,Ve.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:`Identifier`}),(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:`Status`}),(0,D.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,D.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,D.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,D.jsx)(`tbody`,{children:Ve.map(e=>{let t=e.DBSnapshotIdentifier;return t?(0,D.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,D.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,D.jsx)(o,{className:`text-primary hover:underline`,params:{id:t},to:`/rds/describe-db-snapshots/$id`,children:t})}),(0,D.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,D.jsx)(`td`,{className:`px-4 py-2`,children:(0,D.jsx)(Me,{state:e.Status})}),(0,D.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:ee(e.SnapshotCreateTime)}),(0,D.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,D.jsx)(l,{disabled:!ce(e.Status),onClick:async()=>{await r({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:t}})},size:`sm`,variant:`outline`,children:`Restore`}),(0,D.jsx)(l,{disabled:!ue(e.Status,e.SnapshotType),onClick:()=>{Oe(t)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},t):null})})]})}):(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots of this instance.`})]}),t[210]=r,t[211]=Ve,t[212]=B):B=t[212];let V;t[213]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Automated backups are daily snapshots taken in the backup window, deleted by retention rather than by hand. There is no point-in-time restore.`}),t[213]=V):V=t[213];let H;t[214]!==Ze||t[215]!==Qe||t[216]!==$e||t[217]!==z||t[218]!==B?(H=(0,D.jsxs)(`div`,{className:Ze,children:[Qe,$e,z,B,V]}),t[214]=Ze,t[215]=Qe,t[216]=$e,t[217]=z,t[218]=B,t[219]=H):H=t[219];let U;t[220]!==ze||t[221]!==et||t[222]!==H?(U=(0,D.jsx)(ze,{value:et,children:H}),t[220]=ze,t[221]=et,t[222]=H,t[223]=U):U=t[223];let W;t[224]===d?W=t[225]:(W=(0,D.jsx)(Pe,{value:`tags`,children:(0,D.jsx)(Ge,{arn:d})}),t[224]=d,t[225]=W);let G;t[226]===Ae?G=t[227]:(G=(0,D.jsx)(Pe,{value:`events`,children:(0,D.jsx)(We,{events:Ae})}),t[226]=Ae,t[227]=G);let K;t[228]!==Be||t[229]!==k||t[230]!==A||t[231]!==j||t[232]!==M||t[233]!==U||t[234]!==W||t[235]!==G?(K=(0,D.jsxs)(Be,{defaultValue:k,children:[A,j,M,U,W,G]}),t[228]=Be,t[229]=k,t[230]=A,t[231]=j,t[232]=M,t[233]=U,t[234]=W,t[235]=G,t[236]=K):K=t[236];let q;t[237]!==ut||t[238]!==N||t[239]!==P||t[240]!==K?(q=(0,D.jsxs)(`div`,{className:ut,children:[N,P,K]}),t[237]=ut,t[238]=N,t[239]=P,t[240]=K,t[241]=q):q=t[241];let J;t[242]!==u||t[243]!==b?(J=b&&(0,D.jsx)(O,{instance:u,onOpenChange:Te,open:!0}),t[242]=u,t[243]=b,t[244]=J):J=t[244];let Y;t[245]!==n||t[246]!==Ee?(Y=Ee&&(0,D.jsx)(He,{dbInstanceIdentifier:n,onOpenChange:De,open:!0}),t[245]=n,t[246]=Ee,t[247]=Y):Y=t[247];let X;t[248]===x?X=t[249]:(X=x&&(0,D.jsx)(Ue,{dbSnapshotIdentifier:x,onOpenChange:e=>{e||Oe(null)},open:!0}),t[248]=x,t[249]=X);let gt=u.DeletionProtection??!1,Z;t[250]===r?Z=t[251]:(Z=async()=>{await r({to:`/rds/describe-db-instances`})},t[250]=r,t[251]=Z);let Q;t[252]===Symbol.for(`react.memo_cache_sentinel`)?(Q=()=>{Ce(!1),Te(!0)},t[252]=Q):Q=t[252];let _t;t[253]!==n||t[254]!==Se||t[255]!==gt||t[256]!==Z?(_t=(0,D.jsx)(Ke,{dbInstanceIdentifier:n,deletionProtection:gt,onDeleted:Z,onModify:Q,onOpenChange:Ce,open:Se}),t[253]=n,t[254]=Se,t[255]=gt,t[256]=Z,t[257]=_t):_t=t[257];let $;return t[258]!==dt||t[259]!==F||t[260]!==q||t[261]!==J||t[262]!==Y||t[263]!==X||t[264]!==_t?($=(0,D.jsxs)(D.Fragment,{children:[dt,F,q,J,Y,X,_t]}),t[258]=dt,t[259]=F,t[260]=q,t[261]=J,t[262]=Y,t[263]=X,t[264]=_t,t[265]=$):$=t[265],$}function rt(e){return`${e.DBParameterGroupName} (${e.ParameterApplyStatus})`}function it(e){return e.VpcSecurityGroupId}function at(e){return(0,D.jsxs)(`span`,{className:`text-xs text-tactical-amber`,children:[e.StatusType,`: `,e.Message??e.Status]},`${e.StatusType}-${e.Status}`)}function ot(e,t){return(e.SnapshotCreateTime?.getTime()??0)-(t.SnapshotCreateTime?.getTime()??0)}function st(e){return e.SnapshotType===f}function ct(e){return k(e,`backup`)&&k(e,`notification`)}function lt(e){return k(e,`backup`)&&k(e,`failure`)}function j(){let e=(0,qe.c)(4),{id:t}=v.useParams(),n;e[0]===t?n=e[1]:(n=te(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,D.jsx)(A,{dbInstanceIdentifier:n}),e[2]=n,e[3]=r),r}export{j as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-zM6Uwgr9.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-LXVvO8g4.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-zM6Uwgr9.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-LXVvO8g4.js index 3eb9c4632..da55c0355 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-zM6Uwgr9.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-LXVvO8g4.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{E as o,k as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./createLucideIcon-DI_DJF-h.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as ee}from"./camera-1Qc58YO0.js";import{c as u,i as d,n as f,s as p,t as m}from"./select-Bgl6IAYG.js";import{t as h}from"./trash-DHuPKozD.js";import{n as g,t as _}from"./button-Bae9vdts.js";import{t as v}from"./input-CpcyJw4R.js";import{k as y,l as te}from"./ec2-DJL24ekw.js";import{H as ne,R as re,s as b}from"./ec2-DFivrtZe.js";import{t as ie}from"./_id-CMj6qdrO.js";import{t as x}from"./page-heading-M0NyqAmu.js";import{t as S}from"./error-banner-BcDqaPk7.js";import{s as C,t as w}from"./field-ChkDR_wL.js";import{a as T,i as E,l as D,n as O,o as k,r as A,s as j,t as M}from"./alert-dialog-BYzNCmBp.js";import{t as ae}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as N,t as P}from"./detail-row-CclMDqj8.js";import{t as F}from"./state-badge-BD9XGBez.js";var I={name:`link-2-off`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]};I.node;var L=c(I),R={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};R.node;var z=c(R),B=t(n()),V=e();function H(){let{id:e}=ie.useParams(),t=a(),{data:n}=r(y(e)),{data:c}=r(te),I=n.Volumes?.[0],R=re(),H=b(),U=ne(),[W,G]=(0,B.useState)(null),[K,q]=(0,B.useState)(``),[J,Y]=(0,B.useState)(``),[X,Z]=(0,B.useState)(!1),oe=c.Reservations?.flatMap(e=>e.Instances?.filter(e=>e.State?.Name===`running`)??[])??[],Q=I?.State===`available`&&(!I.Attachments||I.Attachments.length===0),$=()=>{G(null)};return I?.VolumeId?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(l,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),R.error&&(0,V.jsx)(S,{error:R.error,msg:`Failed to delete volume`}),H.error&&(0,V.jsx)(S,{error:H.error,msg:`Failed to attach volume`}),U.error&&(0,V.jsx)(S,{error:U.error,msg:`Failed to detach volume`}),(0,V.jsxs)(`div`,{className:`space-y-6`,children:[(0,V.jsx)(x,{actions:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(_,{disabled:!Q,onClick:()=>{G(`delete`)},size:`sm`,variant:`destructive`,children:[(0,V.jsx)(h,{className:`size-4`}),`Delete`]}),Q?(0,V.jsx)(i,{className:g({variant:`outline`}),params:{id:I.VolumeId},to:`/ec2/modify-volume/$id`,children:`Resize Volume`}):(0,V.jsx)(_,{disabled:!0,variant:`outline`,children:`Resize Volume`}),Q?(0,V.jsxs)(_,{onClick:()=>{G(`attach`)},size:`sm`,variant:`outline`,children:[(0,V.jsx)(z,{className:`size-4`}),`Attach`]}):null,I.Attachments&&I.Attachments.length>0?(0,V.jsxs)(_,{onClick:()=>{G(`detach`)},size:`sm`,variant:`outline`,children:[(0,V.jsx)(L,{className:`size-4`}),`Detach`]}):null,(0,V.jsxs)(i,{className:g({variant:`outline`,size:`sm`}),search:{volumeId:I.VolumeId},to:`/ec2/create-snapshot`,children:[(0,V.jsx)(ee,{className:`size-4`}),`Create Snapshot`]}),(0,V.jsx)(F,{state:I.State})]}),subtitle:`Volume Details`,title:I.VolumeId}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`Volume Information`}),(0,V.jsxs)(N.Content,{children:[(0,V.jsx)(P,{label:`Volume ID`,value:I.VolumeId}),(0,V.jsx)(P,{label:`Size`,value:`${I.Size} GiB`}),(0,V.jsx)(P,{label:`Volume Type`,value:I.VolumeType}),(0,V.jsx)(P,{label:`State`,value:I.State}),(0,V.jsx)(P,{label:`Availability Zone`,value:I.AvailabilityZone}),(0,V.jsx)(P,{label:`Create Time`,value:o(I.CreateTime)}),(0,V.jsx)(P,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`}),(0,V.jsx)(P,{label:`KMS Key ID`,value:I.KmsKeyId})]})]}),I.Attachments&&I.Attachments.length>0&&(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`Attachments`}),I.Attachments.map(e=>(0,V.jsxs)(N.Content,{children:[(0,V.jsx)(P,{label:`Instance ID`,value:e.InstanceId?(0,V.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,V.jsx)(P,{label:`Device`,value:e.Device}),(0,V.jsx)(P,{label:`Status`,value:e.State}),(0,V.jsx)(P,{label:`Attach Time`,value:o(e.AttachTime)}),(0,V.jsx)(P,{label:`Delete on Termination`,value:e.DeleteOnTermination?`Yes`:`No`})]},e.InstanceId))]})]}),(0,V.jsx)(ae,{description:`Are you sure you want to delete the volume "${I.VolumeId}"? This action cannot be undone.`,isPending:R.isPending,onConfirm:async()=>{try{await R.mutateAsync(e),t({to:`/ec2/describe-volumes`})}finally{$()}},onOpenChange:e=>{e||$()},open:W===`delete`,title:`Delete Volume`}),(0,V.jsx)(M,{onOpenChange:e=>{e||($(),q(``),Y(``))},open:W===`attach`,children:(0,V.jsxs)(E,{children:[(0,V.jsxs)(j,{children:[(0,V.jsx)(D,{children:`Attach Volume`}),(0,V.jsx)(T,{children:`Attach this volume to a running instance.`})]}),(0,V.jsxs)(w,{children:[(0,V.jsx)(C,{children:(0,V.jsx)(`label`,{htmlFor:`attachInstance`,children:`Instance`})}),(0,V.jsxs)(m,{onValueChange:e=>{q(e??``)},value:K,children:[(0,V.jsx)(p,{className:`w-full`,id:`attachInstance`,children:(0,V.jsx)(u,{placeholder:`Select an instance`})}),(0,V.jsx)(f,{children:oe.map(e=>{let t=s(e.Tags);return(0,V.jsxs)(d,{value:e.InstanceId??``,children:[e.InstanceId,t?` (${t})`:``]},e.InstanceId)})})]})]}),(0,V.jsxs)(w,{children:[(0,V.jsx)(C,{children:(0,V.jsx)(`label`,{htmlFor:`attachDevice`,children:`Device (optional)`})}),(0,V.jsx)(v,{id:`attachDevice`,onChange:e=>{Y(e.target.value)},placeholder:`/dev/sdf`,value:J})]}),(0,V.jsxs)(k,{children:[(0,V.jsx)(A,{children:`Cancel`}),(0,V.jsx)(O,{disabled:H.isPending||!K,onClick:async()=>{try{await H.mutateAsync({volumeId:e,instanceId:K,device:J||void 0}),$(),q(``),Y(``)}catch{}},children:H.isPending?`Attaching…`:`Attach`})]})]})}),(0,V.jsx)(M,{onOpenChange:e=>{e||($(),Z(!1))},open:W===`detach`,children:(0,V.jsxs)(E,{children:[(0,V.jsxs)(j,{children:[(0,V.jsx)(D,{children:`Detach Volume`}),(0,V.jsxs)(T,{children:[`Are you sure you want to detach the volume "`,I.VolumeId,`" from instance "`,I.Attachments?.[0]?.InstanceId,`"?`]})]}),(0,V.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(`input`,{"aria-label":`Force detach`,checked:X,onChange:e=>{Z(e.target.checked)},type:`checkbox`}),`Force detach`]}),(0,V.jsxs)(k,{children:[(0,V.jsx)(A,{children:`Cancel`}),(0,V.jsx)(O,{disabled:U.isPending,onClick:async()=>{let t=I?.Attachments?.[0]?.InstanceId;try{await U.mutateAsync({volumeId:e,instanceId:t??void 0,force:X||void 0}),$(),Z(!1)}catch{}},children:U.isPending?`Detaching…`:`Detach`})]})]})})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(l,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]})}export{H as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{E as o,k as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./createLucideIcon-DI_DJF-h.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as ee}from"./camera-1Qc58YO0.js";import{c as u,i as d,n as f,s as p,t as m}from"./select-Bgl6IAYG.js";import{t as h}from"./trash-DHuPKozD.js";import{n as g,t as _}from"./button-Bae9vdts.js";import{t as v}from"./input-CpcyJw4R.js";import{k as y,l as te}from"./ec2-DJL24ekw.js";import{H as ne,R as re,s as b}from"./ec2-iXujaheD.js";import{t as ie}from"./_id-BXpGhYvJ.js";import{t as x}from"./page-heading-M0NyqAmu.js";import{t as S}from"./error-banner-BcDqaPk7.js";import{s as C,t as w}from"./field-ChkDR_wL.js";import{a as T,i as E,l as D,n as O,o as k,r as A,s as j,t as M}from"./alert-dialog-BYzNCmBp.js";import{t as ae}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as N,t as P}from"./detail-row-CclMDqj8.js";import{t as F}from"./state-badge-BiFj5bbX.js";var I={name:`link-2-off`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]};I.node;var L=c(I),R={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};R.node;var z=c(R),B=t(n()),V=e();function H(){let{id:e}=ie.useParams(),t=a(),{data:n}=r(y(e)),{data:c}=r(te),I=n.Volumes?.[0],R=re(),H=b(),U=ne(),[W,G]=(0,B.useState)(null),[K,q]=(0,B.useState)(``),[J,Y]=(0,B.useState)(``),[X,Z]=(0,B.useState)(!1),oe=c.Reservations?.flatMap(e=>e.Instances?.filter(e=>e.State?.Name===`running`)??[])??[],Q=I?.State===`available`&&(!I.Attachments||I.Attachments.length===0),$=()=>{G(null)};return I?.VolumeId?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(l,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),R.error&&(0,V.jsx)(S,{error:R.error,msg:`Failed to delete volume`}),H.error&&(0,V.jsx)(S,{error:H.error,msg:`Failed to attach volume`}),U.error&&(0,V.jsx)(S,{error:U.error,msg:`Failed to detach volume`}),(0,V.jsxs)(`div`,{className:`space-y-6`,children:[(0,V.jsx)(x,{actions:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(_,{disabled:!Q,onClick:()=>{G(`delete`)},size:`sm`,variant:`destructive`,children:[(0,V.jsx)(h,{className:`size-4`}),`Delete`]}),Q?(0,V.jsx)(i,{className:g({variant:`outline`}),params:{id:I.VolumeId},to:`/ec2/modify-volume/$id`,children:`Resize Volume`}):(0,V.jsx)(_,{disabled:!0,variant:`outline`,children:`Resize Volume`}),Q?(0,V.jsxs)(_,{onClick:()=>{G(`attach`)},size:`sm`,variant:`outline`,children:[(0,V.jsx)(z,{className:`size-4`}),`Attach`]}):null,I.Attachments&&I.Attachments.length>0?(0,V.jsxs)(_,{onClick:()=>{G(`detach`)},size:`sm`,variant:`outline`,children:[(0,V.jsx)(L,{className:`size-4`}),`Detach`]}):null,(0,V.jsxs)(i,{className:g({variant:`outline`,size:`sm`}),search:{volumeId:I.VolumeId},to:`/ec2/create-snapshot`,children:[(0,V.jsx)(ee,{className:`size-4`}),`Create Snapshot`]}),(0,V.jsx)(F,{state:I.State})]}),subtitle:`Volume Details`,title:I.VolumeId}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`Volume Information`}),(0,V.jsxs)(N.Content,{children:[(0,V.jsx)(P,{label:`Volume ID`,value:I.VolumeId}),(0,V.jsx)(P,{label:`Size`,value:`${I.Size} GiB`}),(0,V.jsx)(P,{label:`Volume Type`,value:I.VolumeType}),(0,V.jsx)(P,{label:`State`,value:I.State}),(0,V.jsx)(P,{label:`Availability Zone`,value:I.AvailabilityZone}),(0,V.jsx)(P,{label:`Create Time`,value:o(I.CreateTime)}),(0,V.jsx)(P,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`}),(0,V.jsx)(P,{label:`KMS Key ID`,value:I.KmsKeyId})]})]}),I.Attachments&&I.Attachments.length>0&&(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`Attachments`}),I.Attachments.map(e=>(0,V.jsxs)(N.Content,{children:[(0,V.jsx)(P,{label:`Instance ID`,value:e.InstanceId?(0,V.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,V.jsx)(P,{label:`Device`,value:e.Device}),(0,V.jsx)(P,{label:`Status`,value:e.State}),(0,V.jsx)(P,{label:`Attach Time`,value:o(e.AttachTime)}),(0,V.jsx)(P,{label:`Delete on Termination`,value:e.DeleteOnTermination?`Yes`:`No`})]},e.InstanceId))]})]}),(0,V.jsx)(ae,{description:`Are you sure you want to delete the volume "${I.VolumeId}"? This action cannot be undone.`,isPending:R.isPending,onConfirm:async()=>{try{await R.mutateAsync(e),t({to:`/ec2/describe-volumes`})}finally{$()}},onOpenChange:e=>{e||$()},open:W===`delete`,title:`Delete Volume`}),(0,V.jsx)(M,{onOpenChange:e=>{e||($(),q(``),Y(``))},open:W===`attach`,children:(0,V.jsxs)(E,{children:[(0,V.jsxs)(j,{children:[(0,V.jsx)(D,{children:`Attach Volume`}),(0,V.jsx)(T,{children:`Attach this volume to a running instance.`})]}),(0,V.jsxs)(w,{children:[(0,V.jsx)(C,{children:(0,V.jsx)(`label`,{htmlFor:`attachInstance`,children:`Instance`})}),(0,V.jsxs)(m,{onValueChange:e=>{q(e??``)},value:K,children:[(0,V.jsx)(p,{className:`w-full`,id:`attachInstance`,children:(0,V.jsx)(u,{placeholder:`Select an instance`})}),(0,V.jsx)(f,{children:oe.map(e=>{let t=s(e.Tags);return(0,V.jsxs)(d,{value:e.InstanceId??``,children:[e.InstanceId,t?` (${t})`:``]},e.InstanceId)})})]})]}),(0,V.jsxs)(w,{children:[(0,V.jsx)(C,{children:(0,V.jsx)(`label`,{htmlFor:`attachDevice`,children:`Device (optional)`})}),(0,V.jsx)(v,{id:`attachDevice`,onChange:e=>{Y(e.target.value)},placeholder:`/dev/sdf`,value:J})]}),(0,V.jsxs)(k,{children:[(0,V.jsx)(A,{children:`Cancel`}),(0,V.jsx)(O,{disabled:H.isPending||!K,onClick:async()=>{try{await H.mutateAsync({volumeId:e,instanceId:K,device:J||void 0}),$(),q(``),Y(``)}catch{}},children:H.isPending?`Attaching…`:`Attach`})]})]})}),(0,V.jsx)(M,{onOpenChange:e=>{e||($(),Z(!1))},open:W===`detach`,children:(0,V.jsxs)(E,{children:[(0,V.jsxs)(j,{children:[(0,V.jsx)(D,{children:`Detach Volume`}),(0,V.jsxs)(T,{children:[`Are you sure you want to detach the volume "`,I.VolumeId,`" from instance "`,I.Attachments?.[0]?.InstanceId,`"?`]})]}),(0,V.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(`input`,{"aria-label":`Force detach`,checked:X,onChange:e=>{Z(e.target.checked)},type:`checkbox`}),`Force detach`]}),(0,V.jsxs)(k,{children:[(0,V.jsx)(A,{children:`Cancel`}),(0,V.jsx)(O,{disabled:U.isPending,onClick:async()=>{let t=I?.Attachments?.[0]?.InstanceId;try{await U.mutateAsync({volumeId:e,instanceId:t??void 0,force:X||void 0}),$(),Z(!1)}catch{}},children:U.isPending?`Detaching…`:`Detach`})]})]})})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(l,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]})}export{H as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-mBt-oIEO.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-TLd3PJNv.js similarity index 82% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-mBt-oIEO.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-TLd3PJNv.js index 1b3037a97..d2d3a1669 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-mBt-oIEO.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-TLd3PJNv.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-DCKnfSun.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{l as r,v as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(placement-groups)/describe-placement-groups/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-DCKnfSun.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_id-4nIG286T.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{l as r,v as i}from"./ec2-DJL24ekw.js";var a=e(`/_auth/ec2/(placement-groups)/describe-placement-groups/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...i(t.id),staleTime:`static`}),e.queryClient.query({...r,staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:t(()=>n(()=>import(`./_id-4nIG286T.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BiAD_ye1.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-rAI6aGg-.js similarity index 93% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BiAD_ye1.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-rAI6aGg-.js index c2fb04a42..12745cf00 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-BiAD_ye1.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-rAI6aGg-.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{O as u,j as d}from"./ec2-DJL24ekw.js";import{z as f}from"./ec2-DFivrtZe.js";import{t as p}from"./_id-CFipLulu.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{t as h}from"./error-banner-BcDqaPk7.js";import{t as g}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as _,t as v}from"./detail-row-CclMDqj8.js";import{t as y}from"./state-badge-BD9XGBez.js";var b=t(n()),x=e();function S(){let{id:e}=p.useParams(),t=a(),{data:n}=r(d(e)),{data:S}=r(u),C=n.Vpcs?.[0],w=f(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(t=>t.VpcId===e)??[],O=async()=>{try{await w.mutateAsync(e),t({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=o(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(h,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(m,{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)(c,{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)(i,{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}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{t as c}from"./trash-DHuPKozD.js";import{t as l}from"./button-Bae9vdts.js";import{O as u,j as d}from"./ec2-DJL24ekw.js";import{z as f}from"./ec2-iXujaheD.js";import{t as p}from"./_id-BtW0qAgz.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{t as h}from"./error-banner-BcDqaPk7.js";import{t as g}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as _,t as v}from"./detail-row-CclMDqj8.js";import{t as y}from"./state-badge-BiFj5bbX.js";var b=t(n()),x=e();function S(){let{id:e}=p.useParams(),t=a(),{data:n}=r(d(e)),{data:S}=r(u),C=n.Vpcs?.[0],w=f(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(t=>t.VpcId===e)??[],O=async()=>{try{await w.mutateAsync(e),t({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=o(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(h,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(m,{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)(c,{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)(i,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CaeeEov0.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-yDbgsS1K.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CaeeEov0.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-yDbgsS1K.js index ef43768fc..8102539b1 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-CaeeEov0.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_id-yDbgsS1K.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./trash-DHuPKozD.js";import{t as m}from"./button-Bae9vdts.js";import{t as h}from"./input-CpcyJw4R.js";import{O as g,_,d as ee,x as te}from"./ec2-DJL24ekw.js";import{G as ne,N as re,P as ie,a as ae,y as oe}from"./ec2-DFivrtZe.js";import{t as se}from"./_id-BFiWwc3U.js";import{t as ce}from"./page-heading-M0NyqAmu.js";import{t as v}from"./badge-BYQj3YeB.js";import{a as y,i as b,n as x,t as S}from"./zod-VwMMRSfy.js";import{t as C}from"./error-banner-BcDqaPk7.js";import{r as w,s as T,t as E}from"./field-ChkDR_wL.js";import{t as D}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as O,t as k}from"./detail-row-CclMDqj8.js";import{d as le,r as ue}from"./ec2-CmqOirWQ.js";var A=t(n()),j=e();function de(e){return e.GatewayId??e.NatGatewayId??e.NetworkInterfaceId??e.InstanceId??e.VpcPeeringConnectionId??`—`}function M(){let{id:e}=se.useParams(),t=a(),{data:n}=r(te(e)),{data:M}=r(ee),{data:fe}=r(_),{data:N}=r(g),P=ie(),F=oe(),I=re(),L=ae(),R=ne(),[z,B]=(0,A.useState)(!1),[V,H]=(0,A.useState)(null),[U,W]=(0,A.useState)(null),G=n.RouteTables?.[0],K=b({resolver:S(le),defaultValues:{destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``}}),pe=y({control:K.control,name:`targetType`}),q=b({resolver:S(ue),defaultValues:{subnetId:``}});if(!G?.RouteTableId)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Route Table not found.`})]});let J=G.RouteTableId,Y=o(G.Tags),X=G.Associations?.some(e=>e.Main)??!1,Z=G.Routes??[],Q=(G.Associations??[]).filter(e=>e.SubnetId),me=(M.InternetGateways??[]).filter(e=>e.Attachments?.some(e=>e.VpcId===G.VpcId)),he=(fe.NatGateways??[]).filter(e=>e.VpcId===G.VpcId&&e.State===`available`),ge=new Set(Q.map(e=>e.SubnetId)),$=(N.Subnets??[]).filter(e=>e.VpcId===G.VpcId&&!ge.has(e.SubnetId)),_e=async()=>{try{await P.mutateAsync(J),t({to:`/ec2/describe-route-tables`})}finally{B(!1)}},ve=async()=>{if(V)try{await I.mutateAsync({routeTableId:J,destinationCidrBlock:V})}catch{}finally{H(null)}},ye=async()=>{if(U)try{await R.mutateAsync(U.associationId)}catch{}finally{W(null)}},be=async e=>{await F.mutateAsync({routeTableId:J,destinationCidrBlock:e.destinationCidrBlock,gatewayId:e.targetType===`igw`?e.targetId:void 0,natGatewayId:e.targetType===`nat`?e.targetId:void 0}),K.reset({destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``})},xe=async e=>{await L.mutateAsync({routeTableId:J,subnetId:e.subnetId}),q.reset({subnetId:``})};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),P.error&&(0,j.jsx)(C,{error:P.error,msg:`Failed to delete Route Table`}),(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsx)(ce,{actions:(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(m,{disabled:X||P.isPending,onClick:()=>{B(!0)},size:`sm`,variant:`destructive`,children:[(0,j.jsx)(p,{className:`size-4`}),`Delete`]}),X&&(0,j.jsx)(v,{variant:`secondary`,children:`Main`})]}),subtitle:`Route Table Details`,title:Y?`${G.RouteTableId} (${Y})`:G.RouteTableId}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Route Table Information`}),(0,j.jsxs)(O.Content,{children:[(0,j.jsx)(k,{label:`Route Table ID`,value:G.RouteTableId}),(0,j.jsx)(k,{label:`Main`,value:X?`Yes`:`No`}),(0,j.jsx)(k,{label:`VPC ID`,value:G.VpcId?(0,j.jsx)(i,{className:`text-primary hover:underline`,params:{id:G.VpcId},to:`/ec2/describe-vpcs/$id`,children:G.VpcId}):`—`}),(0,j.jsx)(k,{label:`Owner ID`,value:G.OwnerId??`—`})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Routes`}),(0,j.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,j.jsx)(`div`,{className:`overflow-x-auto rounded-md border`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,j.jsx)(`thead`,{className:`bg-muted/50 text-left text-muted-foreground`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`p-2 font-medium`,children:`Destination`}),(0,j.jsx)(`th`,{className:`p-2 font-medium`,children:`Target`}),(0,j.jsx)(`th`,{className:`p-2 font-medium`,children:`Status`}),(0,j.jsx)(`th`,{className:`p-2`,children:(0,j.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,j.jsx)(`tbody`,{children:Z.length>0?Z.map(e=>{let t=e.DestinationCidrBlock??e.DestinationPrefixListId??`—`,n=e.GatewayId===`local`,r=e.DestinationCidrBlock;return(0,j.jsxs)(`tr`,{className:`border-t`,children:[(0,j.jsx)(`td`,{className:`p-2 font-mono`,children:t}),(0,j.jsx)(`td`,{className:`p-2 font-mono`,children:de(e)}),(0,j.jsx)(`td`,{className:`p-2`,children:e.State??`—`}),(0,j.jsx)(`td`,{className:`p-2 text-right`,children:!n&&r&&(0,j.jsxs)(m,{disabled:I.isPending,onClick:()=>{H(r)},size:`sm`,variant:`ghost`,children:[(0,j.jsx)(p,{className:`size-4`}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Delete route to `,r]})]})})]},t)}):(0,j.jsx)(`tr`,{children:(0,j.jsx)(`td`,{className:`p-2 text-muted-foreground`,colSpan:4,children:`No routes.`})})})]})}),(F.error??I.error)&&(0,j.jsx)(C,{error:F.error??I.error??void 0,msg:`Failed to update route`}),(0,j.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_1fr_1fr_auto]`,onSubmit:K.handleSubmit(be),children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`destinationCidrBlock`,children:`Destination`})}),(0,j.jsx)(h,{id:`destinationCidrBlock`,placeholder:`0.0.0.0/0`,...K.register(`destinationCidrBlock`)}),(0,j.jsx)(w,{errors:[K.formState.errors.destinationCidrBlock]})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`targetType`,children:`Target type`})}),(0,j.jsx)(x,{control:K.control,name:`targetType`,render:({field:e})=>(0,j.jsxs)(f,{onValueChange:t=>{e.onChange(t),K.setValue(`targetId`,``)},value:e.value,children:[(0,j.jsx)(d,{className:`w-full`,id:`targetType`,children:(0,j.jsx)(c,{})}),(0,j.jsxs)(u,{children:[(0,j.jsx)(l,{value:`igw`,children:`Internet Gateway`}),(0,j.jsx)(l,{value:`nat`,children:`NAT Gateway`})]})]})})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`targetId`,children:`Target`})}),(0,j.jsx)(x,{control:K.control,name:`targetId`,render:({field:e})=>(0,j.jsxs)(f,{onValueChange:t=>{e.onChange(t)},value:e.value??``,children:[(0,j.jsx)(d,{"aria-invalid":!!K.formState.errors.targetId,className:`w-full`,id:`targetId`,children:(0,j.jsx)(c,{placeholder:`Select target`})}),(0,j.jsx)(u,{children:pe===`igw`?me.map(e=>(0,j.jsx)(l,{value:e.InternetGatewayId??``,children:e.InternetGatewayId},e.InternetGatewayId)):he.map(e=>(0,j.jsx)(l,{value:e.NatGatewayId??``,children:e.NatGatewayId},e.NatGatewayId))})]})}),(0,j.jsx)(w,{errors:[K.formState.errors.targetId]})]}),(0,j.jsx)(m,{disabled:F.isPending,size:`sm`,type:`submit`,children:`Add route`})]})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Subnet Associations`}),(0,j.jsxs)(`div`,{className:`space-y-4 p-4`,children:[Q.length>0?(0,j.jsx)(`ul`,{className:`space-y-2`,children:Q.map(e=>{let t=e.RouteTableAssociationId;return(0,j.jsxs)(`li`,{className:`flex items-center justify-between rounded-md border p-2 text-sm`,children:[(0,j.jsx)(i,{className:`font-mono text-primary hover:underline`,params:{id:e.SubnetId??``},to:`/ec2/describe-subnets/$id`,children:e.SubnetId}),(0,j.jsxs)(m,{disabled:!t||R.isPending,onClick:()=>{t&&W({associationId:t,subnetId:e.SubnetId??t})},size:`sm`,variant:`ghost`,children:[(0,j.jsx)(p,{className:`size-4`}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Disassociate `,e.SubnetId]})]})]},t)})}):(0,j.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnet associations.`}),(L.error??R.error)&&(0,j.jsx)(C,{error:L.error??R.error??void 0,msg:`Failed to update association`}),(0,j.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_auto]`,onSubmit:q.handleSubmit(xe),children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`subnetId`,children:`Associate subnet`})}),(0,j.jsx)(x,{control:q.control,name:`subnetId`,render:({field:e})=>(0,j.jsxs)(f,{onValueChange:t=>{e.onChange(t)},value:e.value??``,children:[(0,j.jsx)(d,{"aria-invalid":!!q.formState.errors.subnetId,className:`w-full`,id:`subnetId`,children:(0,j.jsx)(c,{placeholder:`Select a subnet`})}),(0,j.jsx)(u,{children:$.map(e=>{let t=o(e.Tags);return(0,j.jsx)(l,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)})})]})}),(0,j.jsx)(w,{errors:[q.formState.errors.subnetId]})]}),(0,j.jsx)(m,{disabled:L.isPending,size:`sm`,type:`submit`,children:`Associate`})]})]})]})]}),(0,j.jsx)(D,{description:`Are you sure you want to delete the Route Table "${G.RouteTableId}"? This action cannot be undone.`,isPending:P.isPending,onConfirm:_e,onOpenChange:B,open:z,title:`Delete Route Table`}),(0,j.jsx)(D,{description:`Delete the route to ${V} from "${J}"? Traffic to that destination from every subnet using this table stops being routed.`,isPending:I.isPending,onConfirm:ve,onOpenChange:e=>{e||H(null)},open:V!==null,title:`Delete Route`}),(0,j.jsx)(D,{confirmLabel:`Disassociate`,description:`Disassociate "${U?.subnetId}" from "${J}"? The subnet stops using this table's routes.`,isPending:R.isPending,onConfirm:ye,onOpenChange:e=>{e||W(null)},open:U!==null,pendingLabel:`Disassociating…`,title:`Disassociate Subnet`})]})}export{M as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime-DTT1fEHg.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as i}from"./link-cv-r823H.js";import{t as a}from"./useNavigate-BiiHYpLW.js";import{k as o}from"./httpRequest-Bc1WZmsd.js";import{t as s}from"./back-link-DjawJm5W.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./trash-DHuPKozD.js";import{t as m}from"./button-Bae9vdts.js";import{t as h}from"./input-CpcyJw4R.js";import{O as g,_,d as ee,x as te}from"./ec2-DJL24ekw.js";import{G as ne,N as re,P as ie,a as ae,y as oe}from"./ec2-iXujaheD.js";import{t as se}from"./_id-CZhTTYNn.js";import{t as ce}from"./page-heading-M0NyqAmu.js";import{t as v}from"./badge-BYQj3YeB.js";import{a as y,i as b,n as x,t as S}from"./zod-VwMMRSfy.js";import{t as C}from"./error-banner-BcDqaPk7.js";import{r as w,s as T,t as E}from"./field-ChkDR_wL.js";import{t as D}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as O,t as k}from"./detail-row-CclMDqj8.js";import{d as le,r as ue}from"./ec2-Cr9GrTUU.js";var A=t(n()),j=e();function de(e){return e.GatewayId??e.NatGatewayId??e.NetworkInterfaceId??e.InstanceId??e.VpcPeeringConnectionId??`—`}function M(){let{id:e}=se.useParams(),t=a(),{data:n}=r(te(e)),{data:M}=r(ee),{data:fe}=r(_),{data:N}=r(g),P=ie(),F=oe(),I=re(),L=ae(),R=ne(),[z,B]=(0,A.useState)(!1),[V,H]=(0,A.useState)(null),[U,W]=(0,A.useState)(null),G=n.RouteTables?.[0],K=b({resolver:S(le),defaultValues:{destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``}}),pe=y({control:K.control,name:`targetType`}),q=b({resolver:S(ue),defaultValues:{subnetId:``}});if(!G?.RouteTableId)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Route Table not found.`})]});let J=G.RouteTableId,Y=o(G.Tags),X=G.Associations?.some(e=>e.Main)??!1,Z=G.Routes??[],Q=(G.Associations??[]).filter(e=>e.SubnetId),me=(M.InternetGateways??[]).filter(e=>e.Attachments?.some(e=>e.VpcId===G.VpcId)),he=(fe.NatGateways??[]).filter(e=>e.VpcId===G.VpcId&&e.State===`available`),ge=new Set(Q.map(e=>e.SubnetId)),$=(N.Subnets??[]).filter(e=>e.VpcId===G.VpcId&&!ge.has(e.SubnetId)),_e=async()=>{try{await P.mutateAsync(J),t({to:`/ec2/describe-route-tables`})}finally{B(!1)}},ve=async()=>{if(V)try{await I.mutateAsync({routeTableId:J,destinationCidrBlock:V})}catch{}finally{H(null)}},ye=async()=>{if(U)try{await R.mutateAsync(U.associationId)}catch{}finally{W(null)}},be=async e=>{await F.mutateAsync({routeTableId:J,destinationCidrBlock:e.destinationCidrBlock,gatewayId:e.targetType===`igw`?e.targetId:void 0,natGatewayId:e.targetType===`nat`?e.targetId:void 0}),K.reset({destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``})},xe=async e=>{await L.mutateAsync({routeTableId:J,subnetId:e.subnetId}),q.reset({subnetId:``})};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),P.error&&(0,j.jsx)(C,{error:P.error,msg:`Failed to delete Route Table`}),(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsx)(ce,{actions:(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(m,{disabled:X||P.isPending,onClick:()=>{B(!0)},size:`sm`,variant:`destructive`,children:[(0,j.jsx)(p,{className:`size-4`}),`Delete`]}),X&&(0,j.jsx)(v,{variant:`secondary`,children:`Main`})]}),subtitle:`Route Table Details`,title:Y?`${G.RouteTableId} (${Y})`:G.RouteTableId}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Route Table Information`}),(0,j.jsxs)(O.Content,{children:[(0,j.jsx)(k,{label:`Route Table ID`,value:G.RouteTableId}),(0,j.jsx)(k,{label:`Main`,value:X?`Yes`:`No`}),(0,j.jsx)(k,{label:`VPC ID`,value:G.VpcId?(0,j.jsx)(i,{className:`text-primary hover:underline`,params:{id:G.VpcId},to:`/ec2/describe-vpcs/$id`,children:G.VpcId}):`—`}),(0,j.jsx)(k,{label:`Owner ID`,value:G.OwnerId??`—`})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Routes`}),(0,j.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,j.jsx)(`div`,{className:`overflow-x-auto rounded-md border`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,j.jsx)(`thead`,{className:`bg-muted/50 text-left text-muted-foreground`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`p-2 font-medium`,children:`Destination`}),(0,j.jsx)(`th`,{className:`p-2 font-medium`,children:`Target`}),(0,j.jsx)(`th`,{className:`p-2 font-medium`,children:`Status`}),(0,j.jsx)(`th`,{className:`p-2`,children:(0,j.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,j.jsx)(`tbody`,{children:Z.length>0?Z.map(e=>{let t=e.DestinationCidrBlock??e.DestinationPrefixListId??`—`,n=e.GatewayId===`local`,r=e.DestinationCidrBlock;return(0,j.jsxs)(`tr`,{className:`border-t`,children:[(0,j.jsx)(`td`,{className:`p-2 font-mono`,children:t}),(0,j.jsx)(`td`,{className:`p-2 font-mono`,children:de(e)}),(0,j.jsx)(`td`,{className:`p-2`,children:e.State??`—`}),(0,j.jsx)(`td`,{className:`p-2 text-right`,children:!n&&r&&(0,j.jsxs)(m,{disabled:I.isPending,onClick:()=>{H(r)},size:`sm`,variant:`ghost`,children:[(0,j.jsx)(p,{className:`size-4`}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Delete route to `,r]})]})})]},t)}):(0,j.jsx)(`tr`,{children:(0,j.jsx)(`td`,{className:`p-2 text-muted-foreground`,colSpan:4,children:`No routes.`})})})]})}),(F.error??I.error)&&(0,j.jsx)(C,{error:F.error??I.error??void 0,msg:`Failed to update route`}),(0,j.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_1fr_1fr_auto]`,onSubmit:K.handleSubmit(be),children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`destinationCidrBlock`,children:`Destination`})}),(0,j.jsx)(h,{id:`destinationCidrBlock`,placeholder:`0.0.0.0/0`,...K.register(`destinationCidrBlock`)}),(0,j.jsx)(w,{errors:[K.formState.errors.destinationCidrBlock]})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`targetType`,children:`Target type`})}),(0,j.jsx)(x,{control:K.control,name:`targetType`,render:({field:e})=>(0,j.jsxs)(f,{onValueChange:t=>{e.onChange(t),K.setValue(`targetId`,``)},value:e.value,children:[(0,j.jsx)(d,{className:`w-full`,id:`targetType`,children:(0,j.jsx)(c,{})}),(0,j.jsxs)(u,{children:[(0,j.jsx)(l,{value:`igw`,children:`Internet Gateway`}),(0,j.jsx)(l,{value:`nat`,children:`NAT Gateway`})]})]})})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`targetId`,children:`Target`})}),(0,j.jsx)(x,{control:K.control,name:`targetId`,render:({field:e})=>(0,j.jsxs)(f,{onValueChange:t=>{e.onChange(t)},value:e.value??``,children:[(0,j.jsx)(d,{"aria-invalid":!!K.formState.errors.targetId,className:`w-full`,id:`targetId`,children:(0,j.jsx)(c,{placeholder:`Select target`})}),(0,j.jsx)(u,{children:pe===`igw`?me.map(e=>(0,j.jsx)(l,{value:e.InternetGatewayId??``,children:e.InternetGatewayId},e.InternetGatewayId)):he.map(e=>(0,j.jsx)(l,{value:e.NatGatewayId??``,children:e.NatGatewayId},e.NatGatewayId))})]})}),(0,j.jsx)(w,{errors:[K.formState.errors.targetId]})]}),(0,j.jsx)(m,{disabled:F.isPending,size:`sm`,type:`submit`,children:`Add route`})]})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Subnet Associations`}),(0,j.jsxs)(`div`,{className:`space-y-4 p-4`,children:[Q.length>0?(0,j.jsx)(`ul`,{className:`space-y-2`,children:Q.map(e=>{let t=e.RouteTableAssociationId;return(0,j.jsxs)(`li`,{className:`flex items-center justify-between rounded-md border p-2 text-sm`,children:[(0,j.jsx)(i,{className:`font-mono text-primary hover:underline`,params:{id:e.SubnetId??``},to:`/ec2/describe-subnets/$id`,children:e.SubnetId}),(0,j.jsxs)(m,{disabled:!t||R.isPending,onClick:()=>{t&&W({associationId:t,subnetId:e.SubnetId??t})},size:`sm`,variant:`ghost`,children:[(0,j.jsx)(p,{className:`size-4`}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Disassociate `,e.SubnetId]})]})]},t)})}):(0,j.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnet associations.`}),(L.error??R.error)&&(0,j.jsx)(C,{error:L.error??R.error??void 0,msg:`Failed to update association`}),(0,j.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_auto]`,onSubmit:q.handleSubmit(xe),children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(T,{children:(0,j.jsx)(`label`,{htmlFor:`subnetId`,children:`Associate subnet`})}),(0,j.jsx)(x,{control:q.control,name:`subnetId`,render:({field:e})=>(0,j.jsxs)(f,{onValueChange:t=>{e.onChange(t)},value:e.value??``,children:[(0,j.jsx)(d,{"aria-invalid":!!q.formState.errors.subnetId,className:`w-full`,id:`subnetId`,children:(0,j.jsx)(c,{placeholder:`Select a subnet`})}),(0,j.jsx)(u,{children:$.map(e=>{let t=o(e.Tags);return(0,j.jsx)(l,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)})})]})}),(0,j.jsx)(w,{errors:[q.formState.errors.subnetId]})]}),(0,j.jsx)(m,{disabled:L.isPending,size:`sm`,type:`submit`,children:`Associate`})]})]})]})]}),(0,j.jsx)(D,{description:`Are you sure you want to delete the Route Table "${G.RouteTableId}"? This action cannot be undone.`,isPending:P.isPending,onConfirm:_e,onOpenChange:B,open:z,title:`Delete Route Table`}),(0,j.jsx)(D,{description:`Delete the route to ${V} from "${J}"? Traffic to that destination from every subnet using this table stops being routed.`,isPending:I.isPending,onConfirm:ve,onOpenChange:e=>{e||H(null)},open:V!==null,title:`Delete Route`}),(0,j.jsx)(D,{confirmLabel:`Disassociate`,description:`Disassociate "${U?.subnetId}" from "${J}"? The subnet stops using this table's routes.`,isPending:R.isPending,onConfirm:ye,onOpenChange:e=>{e||W(null)},open:U!==null,pendingLabel:`Disassociating…`,title:`Disassociate Subnet`})]})}export{M as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-DVgnMfa6.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-8QsoGS6s.js similarity index 91% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-DVgnMfa6.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-8QsoGS6s.js index 66e6be2ad..859146cda 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-DVgnMfa6.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-8QsoGS6s.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_knowledgeBaseId-7x_R9xN1.js","assets/compiler-runtime-DTT1fEHg.js","assets/useMutation-DV0DQvGm.js","assets/removable-TyvHreKc.js","assets/mutation--CHjRtbG.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/bedrockAgent-BC2z7N7d.js","assets/commandBuilder-_yiOeL0z.js","assets/bedrockAgent-BIsnxh0q.js","assets/queryOptions-Dfvzj6n2.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{r,t as i}from"./bedrockAgent-BIsnxh0q.js";var a=e(`/_auth/bedrock/(knowledge-bases)/list-knowledge-bases/$knowledgeBaseId`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.knowledgeBaseId),staleTime:`static`}),e.queryClient.query({...i(t.knowledgeBaseId),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.knowledgeBaseId} | Knowledge Base | Mulga`}]}),component:t(()=>n(()=>import(`./_knowledgeBaseId-7x_R9xN1.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_knowledgeBaseId-CJfx6abx.js","assets/compiler-runtime-DTT1fEHg.js","assets/useMutation-DV0DQvGm.js","assets/removable-TyvHreKc.js","assets/mutation--CHjRtbG.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/reason-parts-DS9EIifS.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/bedrockAgent-BC2z7N7d.js","assets/commandBuilder-_yiOeL0z.js","assets/bedrockAgent-BIsnxh0q.js","assets/queryOptions-Dfvzj6n2.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{r,t as i}from"./bedrockAgent-BIsnxh0q.js";var a=e(`/_auth/bedrock/(knowledge-bases)/list-knowledge-bases/$knowledgeBaseId`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.knowledgeBaseId),staleTime:`static`}),e.queryClient.query({...i(t.knowledgeBaseId),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.knowledgeBaseId} | Knowledge Base | Mulga`}]}),component:t(()=>n(()=>import(`./_knowledgeBaseId-CJfx6abx.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-7x_R9xN1.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-CJfx6abx.js similarity index 99% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-7x_R9xN1.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-CJfx6abx.js index 0d1846d1e..4f02acde2 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-7x_R9xN1.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_knowledgeBaseId-CJfx6abx.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useMutation-DV0DQvGm.js";import{t as a}from"./useQuery-DVjCHx2S.js";import{t as o}from"./useSuspenseQuery-C2bXkW_k.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{E as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./trash-DHuPKozD.js";import{t as d}from"./button-Bae9vdts.js";import{t as f}from"./input-CpcyJw4R.js";import{Ao as p,ba as m,bo as h,i as g,ya as _}from"./awsClient-I-S7JTV9.js";import{a as v,i as y,r as b,s as x,t as S}from"./bedrockAgent-BC2z7N7d.js";import{n as C,r as w,t as T}from"./bedrockAgent-BIsnxh0q.js";import{t as E}from"./_knowledgeBaseId-DVgnMfa6.js";import{t as D}from"./page-heading-M0NyqAmu.js";import{i as O,t as k}from"./zod-VwMMRSfy.js";import{t as A}from"./error-banner-BcDqaPk7.js";import{c as j,r as M,s as N,t as ee}from"./field-ChkDR_wL.js";import{t as P}from"./textarea-BNxO_Zsf.js";import{t as te}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as ne,t as F}from"./detail-row-CclMDqj8.js";import{t as re}from"./state-badge-BD9XGBez.js";var I=p(m,`AmazonBedrockAgentRunTimeService`,`BedrockAgentRuntimeClient`,h),ie={},L=(e,t,n,r)=>[],R=class extends I(ie,L,`Retrieve`,_){},ae=r(),oe=t(n(),1),z=e(),B=3;function V(e){let t=(0,ae.c)(18),{job:n}=e,r=n.statistics,i=n.ingestionJobId,a;t[0]===n.ingestionJobId?a=t[1]:(a=(0,z.jsx)(`span`,{className:`font-mono`,children:n.ingestionJobId}),t[0]=n.ingestionJobId,t[1]=a);let o;t[2]===n.status?o=t[3]:(o=(0,z.jsx)(re,{state:n.status}),t[2]=n.status,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,z.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let l;t[7]===n.startedAt?l=t[8]:(l=c(n.startedAt),t[7]=n.startedAt,t[8]=l);let u;t[9]===l?u=t[10]:(u=(0,z.jsxs)(`div`,{className:`text-muted-foreground`,children:[`Started `,l]}),t[9]=l,t[10]=u);let d;t[11]===r?d=t[12]:(d=r&&(0,z.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`scanned `,r.numberOfDocumentsScanned??0,` · indexed`,` `,(r.numberOfNewDocumentsIndexed??0)+(r.numberOfModifiedDocumentsIndexed??0),` `,`· failed `,r.numberOfDocumentsFailed??0]}),t[11]=r,t[12]=d);let f;return t[13]!==n.ingestionJobId||t[14]!==s||t[15]!==u||t[16]!==d?(f=(0,z.jsxs)(`div`,{className:`rounded-md border p-2 text-xs`,children:[s,u,d]},i),t[13]=n.ingestionJobId,t[14]=s,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function se(e){let t=(0,ae.c)(72),{knowledgeBaseId:n,dataSource:r}=e,i=r.dataSourceId??``,[o,s]=(0,oe.useState)(!1),c;t[0]!==i||t[1]!==n?(c=C(n,i),t[0]=i,t[1]=n,t[2]=c):c=t[2];let{data:l,isLoading:f,isError:p,error:m}=a(c),h=b(),g;t[3]===l?.ingestionJobSummaries?g=t[4]:(g=l?.ingestionJobSummaries??[],t[3]=l?.ingestionJobSummaries,t[4]=g);let _,v,y,x,S,w,T,E;if(t[5]!==r.name||t[6]!==r.status||t[7]!==i||t[8]!==h||t[9]!==m?.message||t[10]!==p||t[11]!==f||t[12]!==n||t[13]!==g){let e=g.slice(0,B),a;t[22]!==i||t[23]!==h||t[24]!==n?(a=async function(){try{await h.mutateAsync({dataSourceId:i,knowledgeBaseId:n}),s(!1)}catch{}},t[22]=i,t[23]=h,t[24]=n,t[25]=a):a=t[25],_=a,v=`rounded-lg border bg-card p-4`;let o;t[26]===r.name?o=t[27]:(o=(0,z.jsx)(`h3`,{className:`font-medium`,children:r.name}),t[26]=r.name,t[27]=o);let c;t[28]===i?c=t[29]:(c=(0,z.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:i}),t[28]=i,t[29]=c);let l;t[30]!==o||t[31]!==c?(l=(0,z.jsxs)(`div`,{children:[o,c]}),t[30]=o,t[31]=c,t[32]=l):l=t[32];let b;t[33]===r.status?b=t[34]:(b=(0,z.jsx)(re,{state:r.status}),t[33]=r.status,t[34]=b);let C=`Remove data source ${r.name??i}`,D;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{s(!0)},t[35]=D):D=t[35];let O;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,z.jsx)(u,{className:`size-3.5`}),t[36]=O):O=t[36];let k;t[37]===C?k=t[38]:(k=(0,z.jsx)(d,{"aria-label":C,onClick:D,size:`icon-sm`,variant:`destructive`,children:O}),t[37]=C,t[38]=k);let A;t[39]!==b||t[40]!==k?(A=(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[b,k]}),t[39]=b,t[40]=k,t[41]=A):A=t[41],t[42]!==l||t[43]!==A?(y=(0,z.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[l,A]}),t[42]=l,t[43]=A,t[44]=y):y=t[44],t[45]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Recent ingestion jobs`}),t[45]=x):x=t[45],t[46]===f?S=t[47]:(S=f&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading jobs…`}),t[46]=f,t[47]=S),t[48]!==m?.message||t[49]!==p?(w=p&&(0,z.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`Failed to load ingestion jobs: `,m?.message]}),t[48]=m?.message,t[49]=p,t[50]=w):w=t[50],T=!f&&!p&&e.length===0&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No ingestion jobs have run yet.`}),E=e.length>0&&(0,z.jsx)(`div`,{className:`space-y-2`,children:e.map(H)}),t[5]=r.name,t[6]=r.status,t[7]=i,t[8]=h,t[9]=m?.message,t[10]=p,t[11]=f,t[12]=n,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=x,t[18]=S,t[19]=w,t[20]=T,t[21]=E}else _=t[14],v=t[15],y=t[16],x=t[17],S=t[18],w=t[19],T=t[20],E=t[21];let D=`This removes "${r.name??i}" from the knowledge base. It cannot be undone.`,O;t[51]===h.error?O=t[52]:(O=h.error&&(0,z.jsx)(`span`,{className:`mt-2 block text-destructive`,children:h.error.message}),t[51]=h.error,t[52]=O);let k;t[53]!==D||t[54]!==O?(k=(0,z.jsxs)(z.Fragment,{children:[D,O]}),t[53]=D,t[54]=O,t[55]=k):k=t[55];let A;t[56]===_?A=t[57]:(A=()=>{_()},t[56]=_,t[57]=A);let j;t[58]!==h.isPending||t[59]!==o||t[60]!==k||t[61]!==A?(j=(0,z.jsx)(te,{description:k,isPending:h.isPending,onConfirm:A,onOpenChange:s,open:o,title:`Remove Data Source`}),t[58]=h.isPending,t[59]=o,t[60]=k,t[61]=A,t[62]=j):j=t[62];let M;return t[63]!==j||t[64]!==v||t[65]!==y||t[66]!==x||t[67]!==S||t[68]!==w||t[69]!==T||t[70]!==E?(M=(0,z.jsxs)(`div`,{className:v,children:[y,x,S,w,T,E,j]}),t[63]=j,t[64]=v,t[65]=y,t[66]=x,t[67]=S,t[68]=w,t[69]=T,t[70]=E,t[71]=M):M=t[71],M}function H(e){return(0,z.jsx)(V,{job:e},e.ingestionJobId)}function U(){let e=(0,ae.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:W},e[0]=t):t=e[0],i(t)}async function W(e){let{knowledgeBaseId:t,query:n}=e,r=new R({knowledgeBaseId:t,retrievalQuery:{text:n}});return await g().send(r)}function ce(e){return e.location?.s3Location?.uri}function le(e){let t=(0,ae.c)(33),{knowledgeBaseId:n}=e,[r,i]=(0,oe.useState)(``),a=U(),o;t[0]!==n||t[1]!==r||t[2]!==a?(o=async function(){if(r.trim().length!==0)try{await a.mutateAsync({knowledgeBaseId:n,query:r})}catch{}},t[0]=n,t[1]=r,t[2]=a,t[3]=o):o=t[3];let s=o,c;t[4]===a.data?.retrievalResults?c=t[5]:(c=a.data?.retrievalResults??[],t[4]=a.data?.retrievalResults,t[5]=c);let l=c,u,f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Retrieve tester`}),f=(0,z.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`Run a similarity query against this knowledge base and inspect the returned chunks.`}),t[6]=u,t[7]=f):(u=t[6],f=t[7]);let p;t[8]===s?p=t[9]:(p=e=>{e.preventDefault(),s()},t[8]=s,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsx)(j,{htmlFor:`retrieve-query`,children:`Query`}),t[10]=m):m=t[10];let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>{i(e.target.value)},t[11]=h):h=t[11];let g;t[12]===r?g=t[13]:(g=(0,z.jsx)(P,{id:`retrieve-query`,onChange:h,placeholder:`What would you like to ask this knowledge base?`,rows:3,value:r}),t[12]=r,t[13]=g);let _;t[14]!==r||t[15]!==a.isPending?(_=a.isPending||r.trim().length===0,t[14]=r,t[15]=a.isPending,t[16]=_):_=t[16];let v=a.isPending?`Retrieving…`:`Retrieve`,y;t[17]!==v||t[18]!==_?(y=(0,z.jsx)(d,{disabled:_,type:`submit`,children:v}),t[17]=v,t[18]=_,t[19]=y):y=t[19];let b;t[20]!==y||t[21]!==p||t[22]!==g?(b=(0,z.jsxs)(`form`,{className:`space-y-2`,onSubmit:p,children:[m,g,y]}),t[20]=y,t[21]=p,t[22]=g,t[23]=b):b=t[23];let x;t[24]===a.error?x=t[25]:(x=a.error&&(0,z.jsx)(`p`,{className:`mt-4 text-sm text-destructive`,children:a.error.message}),t[24]=a.error,t[25]=x);let S;t[26]!==l||t[27]!==a.isSuccess?(S=a.isSuccess&&(0,z.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,z.jsxs)(`h3`,{className:`text-sm font-medium`,children:[l.length,` chunk`,l.length===1?``:`s`,` returned`]}),l.length>0?l.map(G):(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`No chunks matched this query.`})]}),t[26]=l,t[27]=a.isSuccess,t[28]=S):S=t[28];let C;return t[29]!==b||t[30]!==x||t[31]!==S?(C=(0,z.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[u,f,b,x,S]}),t[29]=b,t[30]=x,t[31]=S,t[32]=C):C=t[32],C}function G(e,t){let n=ce(e),r=e.documentId??`${n??`chunk`}-${t}`;return(0,z.jsxs)(`div`,{className:`rounded-md border p-3 text-sm`,children:[(0,z.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:n??`unknown source`}),e.score!==void 0&&(0,z.jsxs)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 text-xs`,children:[`score `,e.score.toFixed(4)]})]}),(0,z.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded bg-muted p-2 font-mono text-xs break-words whitespace-pre-wrap`,children:e.content?.text??`(no content)`})]},r)}function ue(e){let t=(0,ae.c)(94),{knowledgeBaseId:n}=e,[r,i]=(0,oe.useState)(!1),a=S(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:k(x),defaultValues:v},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=O(o),{errors:p,isSubmitting:m}=s,h;t[1]!==a||t[2]!==n||t[3]!==u?(h=async e=>{await a.mutateAsync({data:e,knowledgeBaseId:n}),u(v),i(!1)},t[1]=a,t[2]=n,t[3]=u,t[4]=h):h=t[4];let g=h;if(!r){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(d,{onClick:()=>{i(!0)},size:`sm`,variant:`outline`,children:`Add data source`}),t[5]=e):e=t[5],e}let _;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,z.jsx)(`h3`,{className:`mb-3 font-medium`,children:`Add data source`}),t[6]=_):_=t[6];let y;t[7]===a.error?y=t[8]:(y=a.error&&(0,z.jsx)(A,{error:a.error,msg:`Failed to create the data source`}),t[7]=a.error,t[8]=y);let b;t[9]!==c||t[10]!==g?(b=e=>{c(g)(e)},t[9]=c,t[10]=g,t[11]=b):b=t[11];let C;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-name`,children:`Name`})}),t[12]=C):C=t[12];let w=!!p.name,T;t[13]===l?T=t[14]:(T=l(`name`),t[13]=l,t[14]=T);let E;t[15]!==w||t[16]!==T?(E=(0,z.jsx)(f,{"aria-invalid":w,id:`ds-name`,placeholder:`product-docs-bucket`,...T}),t[15]=w,t[16]=T,t[17]=E):E=t[17];let D;t[18]===p.name?D=t[19]:(D=(0,z.jsx)(M,{errors:[p.name]}),t[18]=p.name,t[19]=D);let j;t[20]!==E||t[21]!==D?(j=(0,z.jsxs)(ee,{children:[C,E,D]}),t[20]=E,t[21]=D,t[22]=j):j=t[22];let P;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-bucket-arn`,children:`S3 bucket ARN`})}),t[23]=P):P=t[23];let te=!!p.bucketArn,ne;t[24]===l?ne=t[25]:(ne=l(`bucketArn`),t[24]=l,t[25]=ne);let F;t[26]!==te||t[27]!==ne?(F=(0,z.jsx)(f,{"aria-invalid":te,id:`ds-bucket-arn`,placeholder:`arn:aws:s3:::product-docs`,...ne}),t[26]=te,t[27]=ne,t[28]=F):F=t[28];let re;t[29]===p.bucketArn?re=t[30]:(re=(0,z.jsx)(M,{errors:[p.bucketArn]}),t[29]=p.bucketArn,t[30]=re);let I;t[31]!==F||t[32]!==re?(I=(0,z.jsxs)(ee,{children:[P,F,re]}),t[31]=F,t[32]=re,t[33]=I):I=t[33];let ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-inclusion-prefix`,children:`Inclusion prefix`})}),t[34]=ie):ie=t[34];let L;t[35]===l?L=t[36]:(L=l(`inclusionPrefix`),t[35]=l,t[36]=L);let R;t[37]===L?R=t[38]:(R=(0,z.jsxs)(ee,{children:[ie,(0,z.jsx)(f,{id:`ds-inclusion-prefix`,placeholder:`Optional`,...L})]}),t[37]=L,t[38]=R);let B;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,z.jsx)(N,{children:`Chunking`}),t[39]=B):B=t[39];let V;t[40]===l?V=t[41]:(V=l(`chunkingEnabled`),t[40]=l,t[41]=V);let se;t[42]===V?se=t[43]:(se=(0,z.jsx)(`input`,{"aria-label":`Enable fixed-size chunking`,type:`checkbox`,...V}),t[42]=V,t[43]=se);let H;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,z.jsx)(`span`,{children:`Split documents using fixed-size chunking`}),t[44]=H):H=t[44];let U;t[45]===se?U=t[46]:(U=(0,z.jsxs)(ee,{children:[B,(0,z.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[se,H]})]}),t[45]=se,t[46]=U);let W;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-max-tokens`,children:`Max tokens per chunk`})}),t[47]=W):W=t[47];let ce=!!p.maxTokens,le;t[48]===l?le=t[49]:(le=l(`maxTokens`,{valueAsNumber:!0}),t[48]=l,t[49]=le);let G;t[50]!==ce||t[51]!==le?(G=(0,z.jsx)(f,{"aria-invalid":ce,id:`ds-max-tokens`,min:1,type:`number`,...le}),t[50]=ce,t[51]=le,t[52]=G):G=t[52];let ue;t[53]===p.maxTokens?ue=t[54]:(ue=(0,z.jsx)(M,{errors:[p.maxTokens]}),t[53]=p.maxTokens,t[54]=ue);let K;t[55]!==G||t[56]!==ue?(K=(0,z.jsxs)(ee,{children:[W,G,ue]}),t[55]=G,t[56]=ue,t[57]=K):K=t[57];let q;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-overlap-percentage`,children:`Overlap %`})}),t[58]=q):q=t[58];let de=!!p.overlapPercentage,J;t[59]===l?J=t[60]:(J=l(`overlapPercentage`,{valueAsNumber:!0}),t[59]=l,t[60]=J);let Y;t[61]!==de||t[62]!==J?(Y=(0,z.jsx)(f,{"aria-invalid":de,id:`ds-overlap-percentage`,max:99,min:0,type:`number`,...J}),t[61]=de,t[62]=J,t[63]=Y):Y=t[63];let X;t[64]===p.overlapPercentage?X=t[65]:(X=(0,z.jsx)(M,{errors:[p.overlapPercentage]}),t[64]=p.overlapPercentage,t[65]=X);let fe;t[66]!==Y||t[67]!==X?(fe=(0,z.jsxs)(ee,{children:[q,Y,X]}),t[66]=Y,t[67]=X,t[68]=fe):fe=t[68];let Z;t[69]!==K||t[70]!==fe?(Z=(0,z.jsxs)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2`,children:[K,fe]}),t[69]=K,t[70]=fe,t[71]=Z):Z=t[71];let pe=m||a.isPending,Q;t[72]===u?Q=t[73]:(Q=()=>{u(v),i(!1)},t[72]=u,t[73]=Q);let $;t[74]!==pe||t[75]!==Q?($=(0,z.jsx)(d,{disabled:pe,onClick:Q,type:`button`,variant:`outline`,children:`Cancel`}),t[74]=pe,t[75]=Q,t[76]=$):$=t[76];let me=m||a.isPending,he=m||a.isPending?`Adding…`:`Add data source`,ge;t[77]!==me||t[78]!==he?(ge=(0,z.jsx)(d,{disabled:me,type:`submit`,children:he}),t[77]=me,t[78]=he,t[79]=ge):ge=t[79];let _e;t[80]!==$||t[81]!==ge?(_e=(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[$,ge]}),t[80]=$,t[81]=ge,t[82]=_e):_e=t[82];let ve;t[83]!==j||t[84]!==I||t[85]!==R||t[86]!==U||t[87]!==Z||t[88]!==_e||t[89]!==b?(ve=(0,z.jsxs)(`form`,{className:`space-y-4`,onSubmit:b,children:[j,I,R,U,Z,_e]}),t[83]=j,t[84]=I,t[85]=R,t[86]=U,t[87]=Z,t[88]=_e,t[89]=b,t[90]=ve):ve=t[90];let ye;return t[91]!==ve||t[92]!==y?(ye=(0,z.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[_,y,ve]}),t[91]=ve,t[92]=y,t[93]=ye):ye=t[93],ye}function K(e){let t=(0,ae.c)(82),{knowledgeBaseId:n}=e,r=s(),[i,a]=(0,oe.useState)(!1),f;t[0]===n?f=t[1]:(f=w(n),t[0]=n,t[1]=f);let{data:p}=o(f),m;t[2]===n?m=t[3]:(m=T(n),t[2]=n,t[3]=m);let{data:h}=o(m),g=y(),{knowledgeBase:_}=p,v;t[4]===h.dataSourceSummaries?v=t[5]:(v=h.dataSourceSummaries??[],t[4]=h.dataSourceSummaries,t[5]=v);let b=v;if(!_){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(l,{to:`/bedrock/list-knowledge-bases`,children:`Back to knowledge bases`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Knowledge base not found.`})]}),t[6]=e):e=t[6],e}let x=_.knowledgeBaseConfiguration?.vectorKnowledgeBaseConfiguration?.embeddingModelArn,S;t[7]!==g||t[8]!==n||t[9]!==r?(S=async function(){try{await g.mutateAsync(n),a(!1),await r({to:`/bedrock/list-knowledge-bases`})}catch{}},t[7]=g,t[8]=n,t[9]=r,t[10]=S):S=t[10];let C=S,E;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,z.jsx)(l,{to:`/bedrock/list-knowledge-bases`,children:`Back to knowledge bases`}),t[11]=E):E=t[11];let O;t[12]===_.status?O=t[13]:(O=(0,z.jsx)(re,{state:_.status}),t[12]=_.status,t[13]=O);let k;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>{a(!0)},t[14]=k):k=t[14];let A;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,z.jsxs)(d,{onClick:k,size:`sm`,variant:`destructive`,children:[(0,z.jsx)(u,{className:`size-4`}),`Delete`]}),t[15]=A):A=t[15];let j;t[16]===O?j=t[17]:(j=(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[O,A]}),t[16]=O,t[17]=j);let M=_.name??n,N;t[18]!==M||t[19]!==j?(N=(0,z.jsx)(D,{actions:j,subtitle:`Knowledge Base Details`,title:M}),t[18]=M,t[19]=j,t[20]=N):N=t[20];let ee;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,z.jsx)(ne.Header,{children:`Knowledge Base Information`}),t[21]=ee):ee=t[21];let P;t[22]===_.knowledgeBaseId?P=t[23]:(P=(0,z.jsx)(F,{label:`Knowledge Base ID`,value:_.knowledgeBaseId}),t[22]=_.knowledgeBaseId,t[23]=P);let I;t[24]===_.knowledgeBaseArn?I=t[25]:(I=(0,z.jsx)(F,{label:`ARN`,value:_.knowledgeBaseArn}),t[24]=_.knowledgeBaseArn,t[25]=I);let ie=_.description??`-`,L;t[26]===ie?L=t[27]:(L=(0,z.jsx)(F,{label:`Description`,value:ie}),t[26]=ie,t[27]=L);let R;t[28]===_.roleArn?R=t[29]:(R=(0,z.jsx)(F,{label:`Role ARN`,value:_.roleArn}),t[28]=_.roleArn,t[29]=R);let B;t[30]===x?B=t[31]:(B=(0,z.jsx)(F,{label:`Embedding Model`,value:x}),t[30]=x,t[31]=B);let V;t[32]===_.createdAt?V=t[33]:(V=c(_.createdAt),t[32]=_.createdAt,t[33]=V);let H;t[34]===V?H=t[35]:(H=(0,z.jsx)(F,{label:`Created`,value:V}),t[34]=V,t[35]=H);let U;t[36]===_.updatedAt?U=t[37]:(U=c(_.updatedAt),t[36]=_.updatedAt,t[37]=U);let W;t[38]===U?W=t[39]:(W=(0,z.jsx)(F,{label:`Updated`,value:U}),t[38]=U,t[39]=W);let ce;t[40]===_.failureReasons?ce=t[41]:(ce=_.failureReasons&&_.failureReasons.length>0&&(0,z.jsx)(F,{label:`Failure Reasons`,value:_.failureReasons.join(`; `)}),t[40]=_.failureReasons,t[41]=ce);let G;t[42]!==P||t[43]!==I||t[44]!==L||t[45]!==R||t[46]!==B||t[47]!==H||t[48]!==W||t[49]!==ce?(G=(0,z.jsxs)(ne,{children:[ee,(0,z.jsxs)(ne.Content,{children:[P,I,L,R,B,H,W,ce]})]}),t[42]=P,t[43]=I,t[44]=L,t[45]=R,t[46]=B,t[47]=H,t[48]=W,t[49]=ce,t[50]=G):G=t[50];let K;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,z.jsx)(`h2`,{className:`font-semibold`,children:`Data Sources`}),t[51]=K):K=t[51];let q;t[52]===n?q=t[53]:(q=(0,z.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[K,(0,z.jsx)(ue,{knowledgeBaseId:n})]}),t[52]=n,t[53]=q);let de;t[54]!==b||t[55]!==n?(de=b.length>0?(0,z.jsx)(`div`,{className:`space-y-4`,children:b.map(e=>(0,z.jsx)(se,{dataSource:e,knowledgeBaseId:n},e.dataSourceId))}):(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`No data sources configured for this knowledge base.`}),t[54]=b,t[55]=n,t[56]=de):de=t[56];let J;t[57]!==q||t[58]!==de?(J=(0,z.jsxs)(`div`,{children:[q,de]}),t[57]=q,t[58]=de,t[59]=J):J=t[59];let Y;t[60]===n?Y=t[61]:(Y=(0,z.jsx)(le,{knowledgeBaseId:n}),t[60]=n,t[61]=Y);let X;t[62]!==N||t[63]!==G||t[64]!==J||t[65]!==Y?(X=(0,z.jsxs)(`div`,{className:`space-y-6`,children:[N,G,J,Y]}),t[62]=N,t[63]=G,t[64]=J,t[65]=Y,t[66]=X):X=t[66];let fe=`This tears down "${_.name??n}" and all of its data sources. It cannot be undone.`,Z;t[67]===g.error?Z=t[68]:(Z=g.error&&(0,z.jsx)(`span`,{className:`mt-2 block text-destructive`,children:g.error.message}),t[67]=g.error,t[68]=Z);let pe;t[69]!==fe||t[70]!==Z?(pe=(0,z.jsxs)(z.Fragment,{children:[fe,Z]}),t[69]=fe,t[70]=Z,t[71]=pe):pe=t[71];let Q;t[72]===C?Q=t[73]:(Q=()=>{C()},t[72]=C,t[73]=Q);let $;t[74]!==g.isPending||t[75]!==i||t[76]!==pe||t[77]!==Q?($=(0,z.jsx)(te,{description:pe,isPending:g.isPending,onConfirm:Q,onOpenChange:a,open:i,title:`Delete Knowledge Base`}),t[74]=g.isPending,t[75]=i,t[76]=pe,t[77]=Q,t[78]=$):$=t[78];let me;return t[79]!==X||t[80]!==$?(me=(0,z.jsxs)(z.Fragment,{children:[E,X,$]}),t[79]=X,t[80]=$,t[81]=me):me=t[81],me}function q(){let e=(0,ae.c)(2),{knowledgeBaseId:t}=E.useParams(),n;return e[0]===t?n=e[1]:(n=(0,z.jsx)(K,{knowledgeBaseId:t}),e[0]=t,e[1]=n),n}export{q as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useMutation-DV0DQvGm.js";import{t as a}from"./useQuery-DVjCHx2S.js";import{t as o}from"./useSuspenseQuery-C2bXkW_k.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{E as c}from"./httpRequest-Bc1WZmsd.js";import{t as l}from"./back-link-DjawJm5W.js";import{t as u}from"./trash-DHuPKozD.js";import{t as d}from"./button-Bae9vdts.js";import{t as f}from"./input-CpcyJw4R.js";import{Ao as p,ba as m,bo as h,i as g,ya as _}from"./awsClient-I-S7JTV9.js";import{a as v,i as y,r as b,s as x,t as S}from"./bedrockAgent-BC2z7N7d.js";import{n as C,r as w,t as T}from"./bedrockAgent-BIsnxh0q.js";import{t as E}from"./_knowledgeBaseId-8QsoGS6s.js";import{t as D}from"./page-heading-M0NyqAmu.js";import{i as O,t as k}from"./zod-VwMMRSfy.js";import{t as A}from"./error-banner-BcDqaPk7.js";import{c as j,r as M,s as N,t as ee}from"./field-ChkDR_wL.js";import{t as P}from"./textarea-BNxO_Zsf.js";import{t as te}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as ne,t as F}from"./detail-row-CclMDqj8.js";import{t as re}from"./state-badge-BiFj5bbX.js";var I=p(m,`AmazonBedrockAgentRunTimeService`,`BedrockAgentRuntimeClient`,h),ie={},L=(e,t,n,r)=>[],R=class extends I(ie,L,`Retrieve`,_){},ae=r(),oe=t(n(),1),z=e(),B=3;function V(e){let t=(0,ae.c)(18),{job:n}=e,r=n.statistics,i=n.ingestionJobId,a;t[0]===n.ingestionJobId?a=t[1]:(a=(0,z.jsx)(`span`,{className:`font-mono`,children:n.ingestionJobId}),t[0]=n.ingestionJobId,t[1]=a);let o;t[2]===n.status?o=t[3]:(o=(0,z.jsx)(re,{state:n.status}),t[2]=n.status,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,z.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let l;t[7]===n.startedAt?l=t[8]:(l=c(n.startedAt),t[7]=n.startedAt,t[8]=l);let u;t[9]===l?u=t[10]:(u=(0,z.jsxs)(`div`,{className:`text-muted-foreground`,children:[`Started `,l]}),t[9]=l,t[10]=u);let d;t[11]===r?d=t[12]:(d=r&&(0,z.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`scanned `,r.numberOfDocumentsScanned??0,` · indexed`,` `,(r.numberOfNewDocumentsIndexed??0)+(r.numberOfModifiedDocumentsIndexed??0),` `,`· failed `,r.numberOfDocumentsFailed??0]}),t[11]=r,t[12]=d);let f;return t[13]!==n.ingestionJobId||t[14]!==s||t[15]!==u||t[16]!==d?(f=(0,z.jsxs)(`div`,{className:`rounded-md border p-2 text-xs`,children:[s,u,d]},i),t[13]=n.ingestionJobId,t[14]=s,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function se(e){let t=(0,ae.c)(72),{knowledgeBaseId:n,dataSource:r}=e,i=r.dataSourceId??``,[o,s]=(0,oe.useState)(!1),c;t[0]!==i||t[1]!==n?(c=C(n,i),t[0]=i,t[1]=n,t[2]=c):c=t[2];let{data:l,isLoading:f,isError:p,error:m}=a(c),h=b(),g;t[3]===l?.ingestionJobSummaries?g=t[4]:(g=l?.ingestionJobSummaries??[],t[3]=l?.ingestionJobSummaries,t[4]=g);let _,v,y,x,S,w,T,E;if(t[5]!==r.name||t[6]!==r.status||t[7]!==i||t[8]!==h||t[9]!==m?.message||t[10]!==p||t[11]!==f||t[12]!==n||t[13]!==g){let e=g.slice(0,B),a;t[22]!==i||t[23]!==h||t[24]!==n?(a=async function(){try{await h.mutateAsync({dataSourceId:i,knowledgeBaseId:n}),s(!1)}catch{}},t[22]=i,t[23]=h,t[24]=n,t[25]=a):a=t[25],_=a,v=`rounded-lg border bg-card p-4`;let o;t[26]===r.name?o=t[27]:(o=(0,z.jsx)(`h3`,{className:`font-medium`,children:r.name}),t[26]=r.name,t[27]=o);let c;t[28]===i?c=t[29]:(c=(0,z.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:i}),t[28]=i,t[29]=c);let l;t[30]!==o||t[31]!==c?(l=(0,z.jsxs)(`div`,{children:[o,c]}),t[30]=o,t[31]=c,t[32]=l):l=t[32];let b;t[33]===r.status?b=t[34]:(b=(0,z.jsx)(re,{state:r.status}),t[33]=r.status,t[34]=b);let C=`Remove data source ${r.name??i}`,D;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{s(!0)},t[35]=D):D=t[35];let O;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,z.jsx)(u,{className:`size-3.5`}),t[36]=O):O=t[36];let k;t[37]===C?k=t[38]:(k=(0,z.jsx)(d,{"aria-label":C,onClick:D,size:`icon-sm`,variant:`destructive`,children:O}),t[37]=C,t[38]=k);let A;t[39]!==b||t[40]!==k?(A=(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[b,k]}),t[39]=b,t[40]=k,t[41]=A):A=t[41],t[42]!==l||t[43]!==A?(y=(0,z.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[l,A]}),t[42]=l,t[43]=A,t[44]=y):y=t[44],t[45]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Recent ingestion jobs`}),t[45]=x):x=t[45],t[46]===f?S=t[47]:(S=f&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading jobs…`}),t[46]=f,t[47]=S),t[48]!==m?.message||t[49]!==p?(w=p&&(0,z.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`Failed to load ingestion jobs: `,m?.message]}),t[48]=m?.message,t[49]=p,t[50]=w):w=t[50],T=!f&&!p&&e.length===0&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No ingestion jobs have run yet.`}),E=e.length>0&&(0,z.jsx)(`div`,{className:`space-y-2`,children:e.map(H)}),t[5]=r.name,t[6]=r.status,t[7]=i,t[8]=h,t[9]=m?.message,t[10]=p,t[11]=f,t[12]=n,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=x,t[18]=S,t[19]=w,t[20]=T,t[21]=E}else _=t[14],v=t[15],y=t[16],x=t[17],S=t[18],w=t[19],T=t[20],E=t[21];let D=`This removes "${r.name??i}" from the knowledge base. It cannot be undone.`,O;t[51]===h.error?O=t[52]:(O=h.error&&(0,z.jsx)(`span`,{className:`mt-2 block text-destructive`,children:h.error.message}),t[51]=h.error,t[52]=O);let k;t[53]!==D||t[54]!==O?(k=(0,z.jsxs)(z.Fragment,{children:[D,O]}),t[53]=D,t[54]=O,t[55]=k):k=t[55];let A;t[56]===_?A=t[57]:(A=()=>{_()},t[56]=_,t[57]=A);let j;t[58]!==h.isPending||t[59]!==o||t[60]!==k||t[61]!==A?(j=(0,z.jsx)(te,{description:k,isPending:h.isPending,onConfirm:A,onOpenChange:s,open:o,title:`Remove Data Source`}),t[58]=h.isPending,t[59]=o,t[60]=k,t[61]=A,t[62]=j):j=t[62];let M;return t[63]!==j||t[64]!==v||t[65]!==y||t[66]!==x||t[67]!==S||t[68]!==w||t[69]!==T||t[70]!==E?(M=(0,z.jsxs)(`div`,{className:v,children:[y,x,S,w,T,E,j]}),t[63]=j,t[64]=v,t[65]=y,t[66]=x,t[67]=S,t[68]=w,t[69]=T,t[70]=E,t[71]=M):M=t[71],M}function H(e){return(0,z.jsx)(V,{job:e},e.ingestionJobId)}function U(){let e=(0,ae.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:W},e[0]=t):t=e[0],i(t)}async function W(e){let{knowledgeBaseId:t,query:n}=e,r=new R({knowledgeBaseId:t,retrievalQuery:{text:n}});return await g().send(r)}function ce(e){return e.location?.s3Location?.uri}function le(e){let t=(0,ae.c)(33),{knowledgeBaseId:n}=e,[r,i]=(0,oe.useState)(``),a=U(),o;t[0]!==n||t[1]!==r||t[2]!==a?(o=async function(){if(r.trim().length!==0)try{await a.mutateAsync({knowledgeBaseId:n,query:r})}catch{}},t[0]=n,t[1]=r,t[2]=a,t[3]=o):o=t[3];let s=o,c;t[4]===a.data?.retrievalResults?c=t[5]:(c=a.data?.retrievalResults??[],t[4]=a.data?.retrievalResults,t[5]=c);let l=c,u,f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Retrieve tester`}),f=(0,z.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`Run a similarity query against this knowledge base and inspect the returned chunks.`}),t[6]=u,t[7]=f):(u=t[6],f=t[7]);let p;t[8]===s?p=t[9]:(p=e=>{e.preventDefault(),s()},t[8]=s,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsx)(j,{htmlFor:`retrieve-query`,children:`Query`}),t[10]=m):m=t[10];let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>{i(e.target.value)},t[11]=h):h=t[11];let g;t[12]===r?g=t[13]:(g=(0,z.jsx)(P,{id:`retrieve-query`,onChange:h,placeholder:`What would you like to ask this knowledge base?`,rows:3,value:r}),t[12]=r,t[13]=g);let _;t[14]!==r||t[15]!==a.isPending?(_=a.isPending||r.trim().length===0,t[14]=r,t[15]=a.isPending,t[16]=_):_=t[16];let v=a.isPending?`Retrieving…`:`Retrieve`,y;t[17]!==v||t[18]!==_?(y=(0,z.jsx)(d,{disabled:_,type:`submit`,children:v}),t[17]=v,t[18]=_,t[19]=y):y=t[19];let b;t[20]!==y||t[21]!==p||t[22]!==g?(b=(0,z.jsxs)(`form`,{className:`space-y-2`,onSubmit:p,children:[m,g,y]}),t[20]=y,t[21]=p,t[22]=g,t[23]=b):b=t[23];let x;t[24]===a.error?x=t[25]:(x=a.error&&(0,z.jsx)(`p`,{className:`mt-4 text-sm text-destructive`,children:a.error.message}),t[24]=a.error,t[25]=x);let S;t[26]!==l||t[27]!==a.isSuccess?(S=a.isSuccess&&(0,z.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,z.jsxs)(`h3`,{className:`text-sm font-medium`,children:[l.length,` chunk`,l.length===1?``:`s`,` returned`]}),l.length>0?l.map(G):(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`No chunks matched this query.`})]}),t[26]=l,t[27]=a.isSuccess,t[28]=S):S=t[28];let C;return t[29]!==b||t[30]!==x||t[31]!==S?(C=(0,z.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[u,f,b,x,S]}),t[29]=b,t[30]=x,t[31]=S,t[32]=C):C=t[32],C}function G(e,t){let n=ce(e),r=e.documentId??`${n??`chunk`}-${t}`;return(0,z.jsxs)(`div`,{className:`rounded-md border p-3 text-sm`,children:[(0,z.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:n??`unknown source`}),e.score!==void 0&&(0,z.jsxs)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 text-xs`,children:[`score `,e.score.toFixed(4)]})]}),(0,z.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded bg-muted p-2 font-mono text-xs break-words whitespace-pre-wrap`,children:e.content?.text??`(no content)`})]},r)}function ue(e){let t=(0,ae.c)(94),{knowledgeBaseId:n}=e,[r,i]=(0,oe.useState)(!1),a=S(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:k(x),defaultValues:v},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=O(o),{errors:p,isSubmitting:m}=s,h;t[1]!==a||t[2]!==n||t[3]!==u?(h=async e=>{await a.mutateAsync({data:e,knowledgeBaseId:n}),u(v),i(!1)},t[1]=a,t[2]=n,t[3]=u,t[4]=h):h=t[4];let g=h;if(!r){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(d,{onClick:()=>{i(!0)},size:`sm`,variant:`outline`,children:`Add data source`}),t[5]=e):e=t[5],e}let _;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,z.jsx)(`h3`,{className:`mb-3 font-medium`,children:`Add data source`}),t[6]=_):_=t[6];let y;t[7]===a.error?y=t[8]:(y=a.error&&(0,z.jsx)(A,{error:a.error,msg:`Failed to create the data source`}),t[7]=a.error,t[8]=y);let b;t[9]!==c||t[10]!==g?(b=e=>{c(g)(e)},t[9]=c,t[10]=g,t[11]=b):b=t[11];let C;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-name`,children:`Name`})}),t[12]=C):C=t[12];let w=!!p.name,T;t[13]===l?T=t[14]:(T=l(`name`),t[13]=l,t[14]=T);let E;t[15]!==w||t[16]!==T?(E=(0,z.jsx)(f,{"aria-invalid":w,id:`ds-name`,placeholder:`product-docs-bucket`,...T}),t[15]=w,t[16]=T,t[17]=E):E=t[17];let D;t[18]===p.name?D=t[19]:(D=(0,z.jsx)(M,{errors:[p.name]}),t[18]=p.name,t[19]=D);let j;t[20]!==E||t[21]!==D?(j=(0,z.jsxs)(ee,{children:[C,E,D]}),t[20]=E,t[21]=D,t[22]=j):j=t[22];let P;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-bucket-arn`,children:`S3 bucket ARN`})}),t[23]=P):P=t[23];let te=!!p.bucketArn,ne;t[24]===l?ne=t[25]:(ne=l(`bucketArn`),t[24]=l,t[25]=ne);let F;t[26]!==te||t[27]!==ne?(F=(0,z.jsx)(f,{"aria-invalid":te,id:`ds-bucket-arn`,placeholder:`arn:aws:s3:::product-docs`,...ne}),t[26]=te,t[27]=ne,t[28]=F):F=t[28];let re;t[29]===p.bucketArn?re=t[30]:(re=(0,z.jsx)(M,{errors:[p.bucketArn]}),t[29]=p.bucketArn,t[30]=re);let I;t[31]!==F||t[32]!==re?(I=(0,z.jsxs)(ee,{children:[P,F,re]}),t[31]=F,t[32]=re,t[33]=I):I=t[33];let ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-inclusion-prefix`,children:`Inclusion prefix`})}),t[34]=ie):ie=t[34];let L;t[35]===l?L=t[36]:(L=l(`inclusionPrefix`),t[35]=l,t[36]=L);let R;t[37]===L?R=t[38]:(R=(0,z.jsxs)(ee,{children:[ie,(0,z.jsx)(f,{id:`ds-inclusion-prefix`,placeholder:`Optional`,...L})]}),t[37]=L,t[38]=R);let B;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,z.jsx)(N,{children:`Chunking`}),t[39]=B):B=t[39];let V;t[40]===l?V=t[41]:(V=l(`chunkingEnabled`),t[40]=l,t[41]=V);let se;t[42]===V?se=t[43]:(se=(0,z.jsx)(`input`,{"aria-label":`Enable fixed-size chunking`,type:`checkbox`,...V}),t[42]=V,t[43]=se);let H;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,z.jsx)(`span`,{children:`Split documents using fixed-size chunking`}),t[44]=H):H=t[44];let U;t[45]===se?U=t[46]:(U=(0,z.jsxs)(ee,{children:[B,(0,z.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[se,H]})]}),t[45]=se,t[46]=U);let W;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-max-tokens`,children:`Max tokens per chunk`})}),t[47]=W):W=t[47];let ce=!!p.maxTokens,le;t[48]===l?le=t[49]:(le=l(`maxTokens`,{valueAsNumber:!0}),t[48]=l,t[49]=le);let G;t[50]!==ce||t[51]!==le?(G=(0,z.jsx)(f,{"aria-invalid":ce,id:`ds-max-tokens`,min:1,type:`number`,...le}),t[50]=ce,t[51]=le,t[52]=G):G=t[52];let ue;t[53]===p.maxTokens?ue=t[54]:(ue=(0,z.jsx)(M,{errors:[p.maxTokens]}),t[53]=p.maxTokens,t[54]=ue);let K;t[55]!==G||t[56]!==ue?(K=(0,z.jsxs)(ee,{children:[W,G,ue]}),t[55]=G,t[56]=ue,t[57]=K):K=t[57];let q;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,z.jsx)(N,{children:(0,z.jsx)(`label`,{htmlFor:`ds-overlap-percentage`,children:`Overlap %`})}),t[58]=q):q=t[58];let de=!!p.overlapPercentage,J;t[59]===l?J=t[60]:(J=l(`overlapPercentage`,{valueAsNumber:!0}),t[59]=l,t[60]=J);let Y;t[61]!==de||t[62]!==J?(Y=(0,z.jsx)(f,{"aria-invalid":de,id:`ds-overlap-percentage`,max:99,min:0,type:`number`,...J}),t[61]=de,t[62]=J,t[63]=Y):Y=t[63];let X;t[64]===p.overlapPercentage?X=t[65]:(X=(0,z.jsx)(M,{errors:[p.overlapPercentage]}),t[64]=p.overlapPercentage,t[65]=X);let fe;t[66]!==Y||t[67]!==X?(fe=(0,z.jsxs)(ee,{children:[q,Y,X]}),t[66]=Y,t[67]=X,t[68]=fe):fe=t[68];let Z;t[69]!==K||t[70]!==fe?(Z=(0,z.jsxs)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2`,children:[K,fe]}),t[69]=K,t[70]=fe,t[71]=Z):Z=t[71];let pe=m||a.isPending,Q;t[72]===u?Q=t[73]:(Q=()=>{u(v),i(!1)},t[72]=u,t[73]=Q);let $;t[74]!==pe||t[75]!==Q?($=(0,z.jsx)(d,{disabled:pe,onClick:Q,type:`button`,variant:`outline`,children:`Cancel`}),t[74]=pe,t[75]=Q,t[76]=$):$=t[76];let me=m||a.isPending,he=m||a.isPending?`Adding…`:`Add data source`,ge;t[77]!==me||t[78]!==he?(ge=(0,z.jsx)(d,{disabled:me,type:`submit`,children:he}),t[77]=me,t[78]=he,t[79]=ge):ge=t[79];let _e;t[80]!==$||t[81]!==ge?(_e=(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[$,ge]}),t[80]=$,t[81]=ge,t[82]=_e):_e=t[82];let ve;t[83]!==j||t[84]!==I||t[85]!==R||t[86]!==U||t[87]!==Z||t[88]!==_e||t[89]!==b?(ve=(0,z.jsxs)(`form`,{className:`space-y-4`,onSubmit:b,children:[j,I,R,U,Z,_e]}),t[83]=j,t[84]=I,t[85]=R,t[86]=U,t[87]=Z,t[88]=_e,t[89]=b,t[90]=ve):ve=t[90];let ye;return t[91]!==ve||t[92]!==y?(ye=(0,z.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[_,y,ve]}),t[91]=ve,t[92]=y,t[93]=ye):ye=t[93],ye}function K(e){let t=(0,ae.c)(82),{knowledgeBaseId:n}=e,r=s(),[i,a]=(0,oe.useState)(!1),f;t[0]===n?f=t[1]:(f=w(n),t[0]=n,t[1]=f);let{data:p}=o(f),m;t[2]===n?m=t[3]:(m=T(n),t[2]=n,t[3]=m);let{data:h}=o(m),g=y(),{knowledgeBase:_}=p,v;t[4]===h.dataSourceSummaries?v=t[5]:(v=h.dataSourceSummaries??[],t[4]=h.dataSourceSummaries,t[5]=v);let b=v;if(!_){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(l,{to:`/bedrock/list-knowledge-bases`,children:`Back to knowledge bases`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Knowledge base not found.`})]}),t[6]=e):e=t[6],e}let x=_.knowledgeBaseConfiguration?.vectorKnowledgeBaseConfiguration?.embeddingModelArn,S;t[7]!==g||t[8]!==n||t[9]!==r?(S=async function(){try{await g.mutateAsync(n),a(!1),await r({to:`/bedrock/list-knowledge-bases`})}catch{}},t[7]=g,t[8]=n,t[9]=r,t[10]=S):S=t[10];let C=S,E;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,z.jsx)(l,{to:`/bedrock/list-knowledge-bases`,children:`Back to knowledge bases`}),t[11]=E):E=t[11];let O;t[12]===_.status?O=t[13]:(O=(0,z.jsx)(re,{state:_.status}),t[12]=_.status,t[13]=O);let k;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>{a(!0)},t[14]=k):k=t[14];let A;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,z.jsxs)(d,{onClick:k,size:`sm`,variant:`destructive`,children:[(0,z.jsx)(u,{className:`size-4`}),`Delete`]}),t[15]=A):A=t[15];let j;t[16]===O?j=t[17]:(j=(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[O,A]}),t[16]=O,t[17]=j);let M=_.name??n,N;t[18]!==M||t[19]!==j?(N=(0,z.jsx)(D,{actions:j,subtitle:`Knowledge Base Details`,title:M}),t[18]=M,t[19]=j,t[20]=N):N=t[20];let ee;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,z.jsx)(ne.Header,{children:`Knowledge Base Information`}),t[21]=ee):ee=t[21];let P;t[22]===_.knowledgeBaseId?P=t[23]:(P=(0,z.jsx)(F,{label:`Knowledge Base ID`,value:_.knowledgeBaseId}),t[22]=_.knowledgeBaseId,t[23]=P);let I;t[24]===_.knowledgeBaseArn?I=t[25]:(I=(0,z.jsx)(F,{label:`ARN`,value:_.knowledgeBaseArn}),t[24]=_.knowledgeBaseArn,t[25]=I);let ie=_.description??`-`,L;t[26]===ie?L=t[27]:(L=(0,z.jsx)(F,{label:`Description`,value:ie}),t[26]=ie,t[27]=L);let R;t[28]===_.roleArn?R=t[29]:(R=(0,z.jsx)(F,{label:`Role ARN`,value:_.roleArn}),t[28]=_.roleArn,t[29]=R);let B;t[30]===x?B=t[31]:(B=(0,z.jsx)(F,{label:`Embedding Model`,value:x}),t[30]=x,t[31]=B);let V;t[32]===_.createdAt?V=t[33]:(V=c(_.createdAt),t[32]=_.createdAt,t[33]=V);let H;t[34]===V?H=t[35]:(H=(0,z.jsx)(F,{label:`Created`,value:V}),t[34]=V,t[35]=H);let U;t[36]===_.updatedAt?U=t[37]:(U=c(_.updatedAt),t[36]=_.updatedAt,t[37]=U);let W;t[38]===U?W=t[39]:(W=(0,z.jsx)(F,{label:`Updated`,value:U}),t[38]=U,t[39]=W);let ce;t[40]===_.failureReasons?ce=t[41]:(ce=_.failureReasons&&_.failureReasons.length>0&&(0,z.jsx)(F,{label:`Failure Reasons`,value:_.failureReasons.join(`; `)}),t[40]=_.failureReasons,t[41]=ce);let G;t[42]!==P||t[43]!==I||t[44]!==L||t[45]!==R||t[46]!==B||t[47]!==H||t[48]!==W||t[49]!==ce?(G=(0,z.jsxs)(ne,{children:[ee,(0,z.jsxs)(ne.Content,{children:[P,I,L,R,B,H,W,ce]})]}),t[42]=P,t[43]=I,t[44]=L,t[45]=R,t[46]=B,t[47]=H,t[48]=W,t[49]=ce,t[50]=G):G=t[50];let K;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,z.jsx)(`h2`,{className:`font-semibold`,children:`Data Sources`}),t[51]=K):K=t[51];let q;t[52]===n?q=t[53]:(q=(0,z.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[K,(0,z.jsx)(ue,{knowledgeBaseId:n})]}),t[52]=n,t[53]=q);let de;t[54]!==b||t[55]!==n?(de=b.length>0?(0,z.jsx)(`div`,{className:`space-y-4`,children:b.map(e=>(0,z.jsx)(se,{dataSource:e,knowledgeBaseId:n},e.dataSourceId))}):(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`No data sources configured for this knowledge base.`}),t[54]=b,t[55]=n,t[56]=de):de=t[56];let J;t[57]!==q||t[58]!==de?(J=(0,z.jsxs)(`div`,{children:[q,de]}),t[57]=q,t[58]=de,t[59]=J):J=t[59];let Y;t[60]===n?Y=t[61]:(Y=(0,z.jsx)(le,{knowledgeBaseId:n}),t[60]=n,t[61]=Y);let X;t[62]!==N||t[63]!==G||t[64]!==J||t[65]!==Y?(X=(0,z.jsxs)(`div`,{className:`space-y-6`,children:[N,G,J,Y]}),t[62]=N,t[63]=G,t[64]=J,t[65]=Y,t[66]=X):X=t[66];let fe=`This tears down "${_.name??n}" and all of its data sources. It cannot be undone.`,Z;t[67]===g.error?Z=t[68]:(Z=g.error&&(0,z.jsx)(`span`,{className:`mt-2 block text-destructive`,children:g.error.message}),t[67]=g.error,t[68]=Z);let pe;t[69]!==fe||t[70]!==Z?(pe=(0,z.jsxs)(z.Fragment,{children:[fe,Z]}),t[69]=fe,t[70]=Z,t[71]=pe):pe=t[71];let Q;t[72]===C?Q=t[73]:(Q=()=>{C()},t[72]=C,t[73]=Q);let $;t[74]!==g.isPending||t[75]!==i||t[76]!==pe||t[77]!==Q?($=(0,z.jsx)(te,{description:pe,isPending:g.isPending,onConfirm:Q,onOpenChange:a,open:i,title:`Delete Knowledge Base`}),t[74]=g.isPending,t[75]=i,t[76]=pe,t[77]=Q,t[78]=$):$=t[78];let me;return t[79]!==X||t[80]!==$?(me=(0,z.jsxs)(z.Fragment,{children:[E,X,$]}),t[79]=X,t[80]=$,t[81]=me):me=t[81],me}function q(){let e=(0,ae.c)(2),{knowledgeBaseId:t}=E.useParams(),n;return e[0]===t?n=e[1]:(n=(0,z.jsx)(K,{knowledgeBaseId:t}),e[0]=t,e[1]=n),n}export{q as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-ZN8s2NQr.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-6EqNx3_u.js similarity index 91% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-ZN8s2NQr.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-6EqNx3_u.js index 06855a731..a2ede639b 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-ZN8s2NQr.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-6EqNx3_u.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_name-_T90gXai.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/rds-BKbEDMHo.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/rds-DnVYe-Nj.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/tabs-CAMCnrj7.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/rds-tags-tab-COIsvcce.js","assets/useQuery-DVjCHx2S.js","assets/rds-hO6CGpr0.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/tags-editor-CGAehu-w.js","assets/plus-DMni1ZkC.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/delete-db-subnet-group-dialog-CPCbs2hR.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{g as i,m as a}from"./rds-BKbEDMHo.js";var o=e(`/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name`)({loader:async({context:e,params:t})=>{let r=n(t.name),o=(await e.queryClient.query({...a(r),staleTime:`static`})).DBSubnetGroups?.[0]?.DBSubnetGroupArn??``;o!==``&&await e.queryClient.query({...i(o),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${n(e.name)} | RDS | Mulga`}]}),component:t(()=>r(()=>import(`./_name-_T90gXai.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])),`component`)});export{o as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_name-BUzANTk6.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/trash-DHuPKozD.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/rds-BKbEDMHo.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/rds-DnVYe-Nj.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/tabs-CAMCnrj7.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/rds-tags-tab-COIsvcce.js","assets/useQuery-DVjCHx2S.js","assets/rds-hO6CGpr0.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/tags-editor-CGAehu-w.js","assets/plus-DMni1ZkC.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/delete-db-subnet-group-dialog-CPCbs2hR.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{j as n}from"./httpRequest-Bc1WZmsd.js";import{_o as r}from"./awsClient-I-S7JTV9.js";import{g as i,m as a}from"./rds-BKbEDMHo.js";var o=e(`/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name`)({loader:async({context:e,params:t})=>{let r=n(t.name),o=(await e.queryClient.query({...a(r),staleTime:`static`})).DBSubnetGroups?.[0]?.DBSubnetGroupArn??``;o!==``&&await e.queryClient.query({...i(o),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${n(e.name)} | RDS | Mulga`}]}),component:t(()=>r(()=>import(`./_name-BUzANTk6.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])),`component`)});export{o as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-_T90gXai.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-BUzANTk6.js similarity index 96% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-_T90gXai.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-BUzANTk6.js index f2d99f608..61a973ea2 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-_T90gXai.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_name-BUzANTk6.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{j as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./trash-DHuPKozD.js";import{t as u}from"./button-Bae9vdts.js";import{m as d}from"./rds-BKbEDMHo.js";import{t as f}from"./_name-ZN8s2NQr.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{n as m,t as h}from"./detail-row-CclMDqj8.js";import{t as g}from"./state-badge-BD9XGBez.js";import{i as _,n as v,r as y,t as b}from"./tabs-CAMCnrj7.js";import{t as x}from"./rds-tags-tab-COIsvcce.js";import{t as S}from"./delete-db-subnet-group-dialog-CPCbs2hR.js";var C=r(),w=t(n(),1),T=e();function E(e){let t=(0,C.c)(53),{dbSubnetGroupName:n}=e,r=o(),a;t[0]===n?a=t[1]:(a=d(n),t[0]=n,t[1]=a);let{data:s}=i(a),f=s.DBSubnetGroups?.[0],E=f?.DBSubnetGroupArn??``,[O,k]=(0,w.useState)(!1);if(!f?.DBSubnetGroupName){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(c,{to:`/rds/describe-db-subnet-groups`,children:`Back to subnet groups`}),(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`DB subnet group not found.`})]}),t[2]=e):e=t[2],e}let A;t[3]===f.Subnets?A=t[4]:(A=f.Subnets??[],t[3]=f.Subnets,t[4]=A);let j=A,M;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,T.jsx)(c,{to:`/rds/describe-db-subnet-groups`,children:`Back to subnet groups`}),t[5]=M):M=t[5];let N;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{k(!0)},t[6]=N):N=t[6];let P;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,T.jsxs)(u,{onClick:N,size:`sm`,variant:`destructive`,children:[(0,T.jsx)(l,{className:`size-4`}),`Delete`]}),t[7]=P):P=t[7];let F;t[8]===n?F=t[9]:(F=(0,T.jsx)(p,{actions:P,subtitle:`DB Subnet Group`,title:n}),t[8]=n,t[9]=F);let I;t[10]===f.SubnetGroupStatus?I=t[11]:(I=(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsx)(g,{state:f.SubnetGroupStatus})}),t[10]=f.SubnetGroupStatus,t[11]=I);let L;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,T.jsxs)(v,{children:[(0,T.jsx)(_,{value:`subnets`,children:`Subnets`}),(0,T.jsx)(_,{value:`tags`,children:`Tags`})]}),t[12]=L):L=t[12];let R;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(m.Header,{children:`Details`}),t[13]=R):R=t[13];let z;t[14]===f.DBSubnetGroupDescription?z=t[15]:(z=(0,T.jsx)(h,{label:`Description`,value:f.DBSubnetGroupDescription}),t[14]=f.DBSubnetGroupDescription,t[15]=z);let B;t[16]===f.VpcId?B=t[17]:(B=(0,T.jsx)(h,{label:`VPC`,value:f.VpcId}),t[16]=f.VpcId,t[17]=B);let V;t[18]===j.length?V=t[19]:(V=j.length.toString(),t[18]=j.length,t[19]=V);let H;t[20]===V?H=t[21]:(H=(0,T.jsx)(h,{label:`Subnets`,value:V}),t[20]=V,t[21]=H);let U;t[22]===f.DBSubnetGroupArn?U=t[23]:(U=(0,T.jsx)(h,{label:`ARN`,value:f.DBSubnetGroupArn}),t[22]=f.DBSubnetGroupArn,t[23]=U);let W;t[24]!==z||t[25]!==B||t[26]!==H||t[27]!==U?(W=(0,T.jsxs)(m,{children:[R,(0,T.jsxs)(m.Content,{children:[z,B,H,U]})]}),t[24]=z,t[25]=B,t[26]=H,t[27]=U,t[28]=W):W=t[28];let G;t[29]===j?G=t[30]:(G=j.length>0?(0,T.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,T.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,T.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Subnet`}),(0,T.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Availability zone`}),(0,T.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`})]})}),(0,T.jsx)(`tbody`,{children:j.map(D)})]})}):(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`This group holds no subnets.`}),t[29]=j,t[30]=G);let K;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This group records which subnets RDS may place an endpoint in; each subnet's own CIDR, addresses and routing live on its EC2 page. This console cannot edit membership; use aws rds modify-db-subnet-group. A running DB instance keeps the subnet its endpoint was placed in.`}),t[31]=K):K=t[31];let q;t[32]!==W||t[33]!==G?(q=(0,T.jsx)(y,{value:`subnets`,children:(0,T.jsxs)(`div`,{className:`space-y-4`,children:[W,G,K]})}),t[32]=W,t[33]=G,t[34]=q):q=t[34];let J;t[35]===E?J=t[36]:(J=(0,T.jsx)(y,{value:`tags`,children:(0,T.jsx)(x,{arn:E})}),t[35]=E,t[36]=J);let Y;t[37]!==q||t[38]!==J?(Y=(0,T.jsxs)(b,{defaultValue:`subnets`,children:[L,q,J]}),t[37]=q,t[38]=J,t[39]=Y):Y=t[39];let X;t[40]!==Y||t[41]!==F||t[42]!==I?(X=(0,T.jsxs)(`div`,{className:`space-y-6`,children:[F,I,Y]}),t[40]=Y,t[41]=F,t[42]=I,t[43]=X):X=t[43];let Z;t[44]===r?Z=t[45]:(Z=async()=>{await r({to:`/rds/describe-db-subnet-groups`})},t[44]=r,t[45]=Z);let Q;t[46]!==n||t[47]!==O||t[48]!==Z?(Q=(0,T.jsx)(S,{dbSubnetGroupName:n,onDeleted:Z,onOpenChange:k,open:O}),t[46]=n,t[47]=O,t[48]=Z,t[49]=Q):Q=t[49];let $;return t[50]!==X||t[51]!==Q?($=(0,T.jsxs)(T.Fragment,{children:[M,X,Q]}),t[50]=X,t[51]=Q,t[52]=$):$=t[52],$}function D(e){return(0,T.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,T.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,T.jsx)(a,{className:`text-primary hover:underline`,params:{id:e.SubnetIdentifier??``},to:`/ec2/describe-subnets/$id`,children:e.SubnetIdentifier})}),(0,T.jsx)(`td`,{className:`px-4 py-2`,children:e.SubnetAvailabilityZone?.Name??`—`}),(0,T.jsx)(`td`,{className:`px-4 py-2`,children:e.SubnetStatus})]},e.SubnetIdentifier)}function O(){let e=(0,C.c)(4),{name:t}=f.useParams(),n;e[0]===t?n=e[1]:(n=s(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,T.jsx)(E,{dbSubnetGroupName:n}),e[2]=n,e[3]=r),r}export{O as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{j as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./trash-DHuPKozD.js";import{t as u}from"./button-Bae9vdts.js";import{m as d}from"./rds-BKbEDMHo.js";import{t as f}from"./_name-6EqNx3_u.js";import{t as p}from"./page-heading-M0NyqAmu.js";import{n as m,t as h}from"./detail-row-CclMDqj8.js";import{t as g}from"./state-badge-BiFj5bbX.js";import{i as _,n as v,r as y,t as b}from"./tabs-CAMCnrj7.js";import{t as x}from"./rds-tags-tab-COIsvcce.js";import{t as S}from"./delete-db-subnet-group-dialog-CPCbs2hR.js";var C=r(),w=t(n(),1),T=e();function E(e){let t=(0,C.c)(53),{dbSubnetGroupName:n}=e,r=o(),a;t[0]===n?a=t[1]:(a=d(n),t[0]=n,t[1]=a);let{data:s}=i(a),f=s.DBSubnetGroups?.[0],E=f?.DBSubnetGroupArn??``,[O,k]=(0,w.useState)(!1);if(!f?.DBSubnetGroupName){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(c,{to:`/rds/describe-db-subnet-groups`,children:`Back to subnet groups`}),(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`DB subnet group not found.`})]}),t[2]=e):e=t[2],e}let A;t[3]===f.Subnets?A=t[4]:(A=f.Subnets??[],t[3]=f.Subnets,t[4]=A);let j=A,M;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,T.jsx)(c,{to:`/rds/describe-db-subnet-groups`,children:`Back to subnet groups`}),t[5]=M):M=t[5];let N;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{k(!0)},t[6]=N):N=t[6];let P;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,T.jsxs)(u,{onClick:N,size:`sm`,variant:`destructive`,children:[(0,T.jsx)(l,{className:`size-4`}),`Delete`]}),t[7]=P):P=t[7];let F;t[8]===n?F=t[9]:(F=(0,T.jsx)(p,{actions:P,subtitle:`DB Subnet Group`,title:n}),t[8]=n,t[9]=F);let I;t[10]===f.SubnetGroupStatus?I=t[11]:(I=(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsx)(g,{state:f.SubnetGroupStatus})}),t[10]=f.SubnetGroupStatus,t[11]=I);let L;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,T.jsxs)(v,{children:[(0,T.jsx)(_,{value:`subnets`,children:`Subnets`}),(0,T.jsx)(_,{value:`tags`,children:`Tags`})]}),t[12]=L):L=t[12];let R;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(m.Header,{children:`Details`}),t[13]=R):R=t[13];let z;t[14]===f.DBSubnetGroupDescription?z=t[15]:(z=(0,T.jsx)(h,{label:`Description`,value:f.DBSubnetGroupDescription}),t[14]=f.DBSubnetGroupDescription,t[15]=z);let B;t[16]===f.VpcId?B=t[17]:(B=(0,T.jsx)(h,{label:`VPC`,value:f.VpcId}),t[16]=f.VpcId,t[17]=B);let V;t[18]===j.length?V=t[19]:(V=j.length.toString(),t[18]=j.length,t[19]=V);let H;t[20]===V?H=t[21]:(H=(0,T.jsx)(h,{label:`Subnets`,value:V}),t[20]=V,t[21]=H);let U;t[22]===f.DBSubnetGroupArn?U=t[23]:(U=(0,T.jsx)(h,{label:`ARN`,value:f.DBSubnetGroupArn}),t[22]=f.DBSubnetGroupArn,t[23]=U);let W;t[24]!==z||t[25]!==B||t[26]!==H||t[27]!==U?(W=(0,T.jsxs)(m,{children:[R,(0,T.jsxs)(m.Content,{children:[z,B,H,U]})]}),t[24]=z,t[25]=B,t[26]=H,t[27]=U,t[28]=W):W=t[28];let G;t[29]===j?G=t[30]:(G=j.length>0?(0,T.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,T.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,T.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Subnet`}),(0,T.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Availability zone`}),(0,T.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`})]})}),(0,T.jsx)(`tbody`,{children:j.map(D)})]})}):(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`This group holds no subnets.`}),t[29]=j,t[30]=G);let K;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This group records which subnets RDS may place an endpoint in; each subnet's own CIDR, addresses and routing live on its EC2 page. This console cannot edit membership; use aws rds modify-db-subnet-group. A running DB instance keeps the subnet its endpoint was placed in.`}),t[31]=K):K=t[31];let q;t[32]!==W||t[33]!==G?(q=(0,T.jsx)(y,{value:`subnets`,children:(0,T.jsxs)(`div`,{className:`space-y-4`,children:[W,G,K]})}),t[32]=W,t[33]=G,t[34]=q):q=t[34];let J;t[35]===E?J=t[36]:(J=(0,T.jsx)(y,{value:`tags`,children:(0,T.jsx)(x,{arn:E})}),t[35]=E,t[36]=J);let Y;t[37]!==q||t[38]!==J?(Y=(0,T.jsxs)(b,{defaultValue:`subnets`,children:[L,q,J]}),t[37]=q,t[38]=J,t[39]=Y):Y=t[39];let X;t[40]!==Y||t[41]!==F||t[42]!==I?(X=(0,T.jsxs)(`div`,{className:`space-y-6`,children:[F,I,Y]}),t[40]=Y,t[41]=F,t[42]=I,t[43]=X):X=t[43];let Z;t[44]===r?Z=t[45]:(Z=async()=>{await r({to:`/rds/describe-db-subnet-groups`})},t[44]=r,t[45]=Z);let Q;t[46]!==n||t[47]!==O||t[48]!==Z?(Q=(0,T.jsx)(S,{dbSubnetGroupName:n,onDeleted:Z,onOpenChange:k,open:O}),t[46]=n,t[47]=O,t[48]=Z,t[49]=Q):Q=t[49];let $;return t[50]!==X||t[51]!==Q?($=(0,T.jsxs)(T.Fragment,{children:[M,X,Q]}),t[50]=X,t[51]=Q,t[52]=$):$=t[52],$}function D(e){return(0,T.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,T.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,T.jsx)(a,{className:`text-primary hover:underline`,params:{id:e.SubnetIdentifier??``},to:`/ec2/describe-subnets/$id`,children:e.SubnetIdentifier})}),(0,T.jsx)(`td`,{className:`px-4 py-2`,children:e.SubnetAvailabilityZone?.Name??`—`}),(0,T.jsx)(`td`,{className:`px-4 py-2`,children:e.SubnetStatus})]},e.SubnetIdentifier)}function O(){let e=(0,C.c)(4),{name:t}=f.useParams(),n;e[0]===t?n=e[1]:(n=s(t),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,T.jsx)(E,{dbSubnetGroupName:n}),e[2]=n,e[3]=r),r}export{O as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-BG2NVlBw.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-B2bE-Lsy.js similarity index 84% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-BG2NVlBw.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-B2bE-Lsy.js index bed831ab1..5b5a995ef 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-BG2NVlBw.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-B2bE-Lsy.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_serviceName-Dz1I0Y0N.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/ecs-DRWPOVsw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/httpRequest-Bc1WZmsd.js","assets/index.browser-ByUCT8up.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{i as r,s as i}from"./ecs-DRWPOVsw.js";var a=e(`/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.clusterName),staleTime:`static`}),e.queryClient.query({...i(t.clusterName),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.serviceName} | ECS | Mulga`}]}),component:t(()=>n(()=>import(`./_serviceName-Dz1I0Y0N.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),`component`)});export{a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_serviceName-D1ZbNNwO.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/ecs-DRWPOVsw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/httpRequest-Bc1WZmsd.js","assets/index.browser-ByUCT8up.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{i as r,s as i}from"./ecs-DRWPOVsw.js";var a=e(`/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.clusterName),staleTime:`static`}),e.queryClient.query({...i(t.clusterName),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.serviceName} | ECS | Mulga`}]}),component:t(()=>n(()=>import(`./_serviceName-D1ZbNNwO.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),`component`)});export{a as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-Dz1I0Y0N.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-D1ZbNNwO.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-Dz1I0Y0N.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-D1ZbNNwO.js index dd9db3b58..998355007 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-Dz1I0Y0N.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_serviceName-D1ZbNNwO.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./back-link-DjawJm5W.js";import{i as a,s as o}from"./ecs-DRWPOVsw.js";import{t as s}from"./_serviceName-BG2NVlBw.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{n as l,t as u}from"./detail-row-CclMDqj8.js";import{t as d}from"./state-badge-BD9XGBez.js";var f=t(),p=e();function m(e){return e?.split(`/`).at(-1)??``}function h(e,t){return(e.attachments??[]).find(e=>e.type===`ElasticNetworkInterface`)?.details?.find(e=>e.name===t)?.value}function g(e){let t=(0,f.c)(69),{clusterName:s,serviceName:g}=e,b;t[0]===s?b=t[1]:(b=a(s),t[0]=s,t[1]=b);let{data:x}=n(b),S;t[2]===s?S=t[3]:(S=o(s),t[2]=s,t[3]=S);let{data:C}=n(S),w,T,E,D,O,k,A,j,M,N;if(t[4]!==s||t[5]!==g||t[6]!==x||t[7]!==C){E=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[18]===g?e=t[19]:(e=e=>e.serviceName===g,t[18]=g,t[19]=e);let n=x.find(e);if(!n){let e;t[20]===s?e=t[21]:(e={clusterName:s},t[20]=s,t[21]=e);let n;t[22]!==s||t[23]!==e?(n=(0,p.jsx)(i,{params:e,to:`/ecs/list-clusters/$clusterName`,children:s}),t[22]=s,t[23]=e,t[24]=n):n=t[24];let r;t[25]===g?r=t[26]:(r=(0,p.jsx)(c,{subtitle:`Service Details`,title:g}),t[25]=g,t[26]=r);let a;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`Service not found.`}),t[27]=a):a=t[27];let o;t[28]!==n||t[29]!==r?(o=(0,p.jsxs)(p.Fragment,{children:[n,r,a]}),t[28]=n,t[29]=r,t[30]=o):o=t[30],E=o;break bb0}let a=n.loadBalancers??[],o;t[31]===g?o=t[32]:(o=e=>e.group===`service:${g}`,t[31]=g,t[32]=o);let f=C.filter(o),b=n.deployments??[],S=n.events??[],P;t[33]===s?P=t[34]:(P={clusterName:s},t[33]=s,t[34]=P),t[35]!==s||t[36]!==P?(A=(0,p.jsx)(i,{params:P,to:`/ecs/list-clusters/$clusterName`,children:s}),t[35]=s,t[36]=P,t[37]=A):A=t[37],j=(0,p.jsx)(c,{actions:(0,p.jsx)(d,{state:n.status}),subtitle:`Service Details`,title:g});let F;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,p.jsx)(l.Header,{children:`Configuration`}),t[38]=F):F=t[38];let I=String(n.desiredCount??0),L;t[39]===I?L=t[40]:(L=(0,p.jsx)(u,{label:`Desired count`,value:I}),t[39]=I,t[40]=L);let R=String(n.runningCount??0),z;t[41]===R?z=t[42]:(z=(0,p.jsx)(u,{label:`Running count`,value:R}),t[41]=R,t[42]=z);let B=String(n.pendingCount??0),V;t[43]===B?V=t[44]:(V=(0,p.jsx)(u,{label:`Pending count`,value:B}),t[43]=B,t[44]=V);let H=(0,p.jsxs)(l.Content,{children:[(0,p.jsx)(u,{label:`Status`,value:(0,p.jsx)(d,{state:n.status})}),L,z,V,(0,p.jsx)(u,{label:`Task definition`,value:m(n.taskDefinition)}),(0,p.jsx)(u,{label:`Launch type`,value:n.launchType}),(0,p.jsx)(u,{label:`Scheduling strategy`,value:n.schedulingStrategy})]});t[45]===H?M=t[46]:(M=(0,p.jsxs)(l,{children:[F,H]}),t[45]=H,t[46]=M);let U;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Load balancers`}),t[47]=U):U=t[47];let W=a.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Group`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Container`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`})]})}),(0,p.jsx)(`tbody`,{children:a.map(y)})]})});t[48]===W?N=t[49]:(N=(0,p.jsxs)(`div`,{className:`mt-6`,children:[U,W]}),t[48]=W,t[49]=N);let G;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Tasks`}),t[50]=G):G=t[50];let K=f.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Private IP`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Public IP`})]})}),(0,p.jsx)(`tbody`,{children:f.map(e=>{let t=m(e.taskArn);return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,p.jsx)(r,{className:`underline`,params:{clusterName:s,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:(0,p.jsx)(d,{state:e.lastStatus})}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:h(e,`privateIPv4Address`)??`—`}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:h(e,`publicIPv4Address`)??`—`})]},t)})})]})});t[51]===K?w=t[52]:(w=(0,p.jsxs)(`div`,{className:`mt-6`,children:[G,K]}),t[51]=K,t[52]=w);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Deployments`}),t[53]=q):q=t[53];let J=b.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`})]})}),(0,p.jsx)(`tbody`,{children:b.map(v)})]})});t[54]===J?T=t[55]:(T=(0,p.jsxs)(`div`,{className:`mt-6`,children:[q,J]}),t[54]=J,t[55]=T),D=`mt-6`,t[56]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Events`}),t[56]=O):O=t[56],k=S.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Time`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Message`})]})}),(0,p.jsx)(`tbody`,{children:S.map(_)})]})})}t[4]=s,t[5]=g,t[6]=x,t[7]=C,t[8]=w,t[9]=T,t[10]=E,t[11]=D,t[12]=O,t[13]=k,t[14]=A,t[15]=j,t[16]=M,t[17]=N}else w=t[8],T=t[9],E=t[10],D=t[11],O=t[12],k=t[13],A=t[14],j=t[15],M=t[16],N=t[17];if(E!==Symbol.for(`react.early_return_sentinel`))return E;let P;t[57]!==D||t[58]!==O||t[59]!==k?(P=(0,p.jsxs)(`div`,{className:D,children:[O,k]}),t[57]=D,t[58]=O,t[59]=k,t[60]=P):P=t[60];let F;return t[61]!==w||t[62]!==T||t[63]!==P||t[64]!==A||t[65]!==j||t[66]!==M||t[67]!==N?(F=(0,p.jsxs)(p.Fragment,{children:[A,j,M,N,w,T,P]}),t[61]=w,t[62]=T,t[63]=P,t[64]=A,t[65]=j,t[66]=M,t[67]=N,t[68]=F):F=t[68],F}function _(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.createdAt?new Date(e.createdAt).toISOString():``}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.message})]},e.id)}function v(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.status}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:m(e.taskDefinition)}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0})]},e.id)}function y(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:m(e.targetGroupArn)}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.containerName}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.containerPort})]},`${e.targetGroupArn??``}-${e.containerName??``}-${e.containerPort??``}`)}function b(){let e=(0,f.c)(3),{clusterName:t,serviceName:n}=s.useParams(),r;return e[0]!==t||e[1]!==n?(r=(0,p.jsx)(g,{clusterName:t,serviceName:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{b as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./back-link-DjawJm5W.js";import{i as a,s as o}from"./ecs-DRWPOVsw.js";import{t as s}from"./_serviceName-B2bE-Lsy.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{n as l,t as u}from"./detail-row-CclMDqj8.js";import{t as d}from"./state-badge-BiFj5bbX.js";var f=t(),p=e();function m(e){return e?.split(`/`).at(-1)??``}function h(e,t){return(e.attachments??[]).find(e=>e.type===`ElasticNetworkInterface`)?.details?.find(e=>e.name===t)?.value}function g(e){let t=(0,f.c)(69),{clusterName:s,serviceName:g}=e,b;t[0]===s?b=t[1]:(b=a(s),t[0]=s,t[1]=b);let{data:x}=n(b),S;t[2]===s?S=t[3]:(S=o(s),t[2]=s,t[3]=S);let{data:C}=n(S),w,T,E,D,O,k,A,j,M,N;if(t[4]!==s||t[5]!==g||t[6]!==x||t[7]!==C){E=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[18]===g?e=t[19]:(e=e=>e.serviceName===g,t[18]=g,t[19]=e);let n=x.find(e);if(!n){let e;t[20]===s?e=t[21]:(e={clusterName:s},t[20]=s,t[21]=e);let n;t[22]!==s||t[23]!==e?(n=(0,p.jsx)(i,{params:e,to:`/ecs/list-clusters/$clusterName`,children:s}),t[22]=s,t[23]=e,t[24]=n):n=t[24];let r;t[25]===g?r=t[26]:(r=(0,p.jsx)(c,{subtitle:`Service Details`,title:g}),t[25]=g,t[26]=r);let a;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`Service not found.`}),t[27]=a):a=t[27];let o;t[28]!==n||t[29]!==r?(o=(0,p.jsxs)(p.Fragment,{children:[n,r,a]}),t[28]=n,t[29]=r,t[30]=o):o=t[30],E=o;break bb0}let a=n.loadBalancers??[],o;t[31]===g?o=t[32]:(o=e=>e.group===`service:${g}`,t[31]=g,t[32]=o);let f=C.filter(o),b=n.deployments??[],S=n.events??[],P;t[33]===s?P=t[34]:(P={clusterName:s},t[33]=s,t[34]=P),t[35]!==s||t[36]!==P?(A=(0,p.jsx)(i,{params:P,to:`/ecs/list-clusters/$clusterName`,children:s}),t[35]=s,t[36]=P,t[37]=A):A=t[37],j=(0,p.jsx)(c,{actions:(0,p.jsx)(d,{state:n.status}),subtitle:`Service Details`,title:g});let F;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,p.jsx)(l.Header,{children:`Configuration`}),t[38]=F):F=t[38];let I=String(n.desiredCount??0),L;t[39]===I?L=t[40]:(L=(0,p.jsx)(u,{label:`Desired count`,value:I}),t[39]=I,t[40]=L);let R=String(n.runningCount??0),z;t[41]===R?z=t[42]:(z=(0,p.jsx)(u,{label:`Running count`,value:R}),t[41]=R,t[42]=z);let B=String(n.pendingCount??0),V;t[43]===B?V=t[44]:(V=(0,p.jsx)(u,{label:`Pending count`,value:B}),t[43]=B,t[44]=V);let H=(0,p.jsxs)(l.Content,{children:[(0,p.jsx)(u,{label:`Status`,value:(0,p.jsx)(d,{state:n.status})}),L,z,V,(0,p.jsx)(u,{label:`Task definition`,value:m(n.taskDefinition)}),(0,p.jsx)(u,{label:`Launch type`,value:n.launchType}),(0,p.jsx)(u,{label:`Scheduling strategy`,value:n.schedulingStrategy})]});t[45]===H?M=t[46]:(M=(0,p.jsxs)(l,{children:[F,H]}),t[45]=H,t[46]=M);let U;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Load balancers`}),t[47]=U):U=t[47];let W=a.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Group`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Container`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`})]})}),(0,p.jsx)(`tbody`,{children:a.map(y)})]})});t[48]===W?N=t[49]:(N=(0,p.jsxs)(`div`,{className:`mt-6`,children:[U,W]}),t[48]=W,t[49]=N);let G;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Tasks`}),t[50]=G):G=t[50];let K=f.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Private IP`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Public IP`})]})}),(0,p.jsx)(`tbody`,{children:f.map(e=>{let t=m(e.taskArn);return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,p.jsx)(r,{className:`underline`,params:{clusterName:s,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:(0,p.jsx)(d,{state:e.lastStatus})}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:h(e,`privateIPv4Address`)??`—`}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:h(e,`publicIPv4Address`)??`—`})]},t)})})]})});t[51]===K?w=t[52]:(w=(0,p.jsxs)(`div`,{className:`mt-6`,children:[G,K]}),t[51]=K,t[52]=w);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Deployments`}),t[53]=q):q=t[53];let J=b.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`})]})}),(0,p.jsx)(`tbody`,{children:b.map(v)})]})});t[54]===J?T=t[55]:(T=(0,p.jsxs)(`div`,{className:`mt-6`,children:[q,J]}),t[54]=J,t[55]=T),D=`mt-6`,t[56]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Events`}),t[56]=O):O=t[56],k=S.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Time`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Message`})]})}),(0,p.jsx)(`tbody`,{children:S.map(_)})]})})}t[4]=s,t[5]=g,t[6]=x,t[7]=C,t[8]=w,t[9]=T,t[10]=E,t[11]=D,t[12]=O,t[13]=k,t[14]=A,t[15]=j,t[16]=M,t[17]=N}else w=t[8],T=t[9],E=t[10],D=t[11],O=t[12],k=t[13],A=t[14],j=t[15],M=t[16],N=t[17];if(E!==Symbol.for(`react.early_return_sentinel`))return E;let P;t[57]!==D||t[58]!==O||t[59]!==k?(P=(0,p.jsxs)(`div`,{className:D,children:[O,k]}),t[57]=D,t[58]=O,t[59]=k,t[60]=P):P=t[60];let F;return t[61]!==w||t[62]!==T||t[63]!==P||t[64]!==A||t[65]!==j||t[66]!==M||t[67]!==N?(F=(0,p.jsxs)(p.Fragment,{children:[A,j,M,N,w,T,P]}),t[61]=w,t[62]=T,t[63]=P,t[64]=A,t[65]=j,t[66]=M,t[67]=N,t[68]=F):F=t[68],F}function _(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.createdAt?new Date(e.createdAt).toISOString():``}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.message})]},e.id)}function v(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.status}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:m(e.taskDefinition)}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0})]},e.id)}function y(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:m(e.targetGroupArn)}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.containerName}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.containerPort})]},`${e.targetGroupArn??``}-${e.containerName??``}-${e.containerPort??``}`)}function b(){let e=(0,f.c)(3),{clusterName:t,serviceName:n}=s.useParams(),r;return e[0]!==t||e[1]!==n?(r=(0,p.jsx)(g,{clusterName:t,serviceName:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{b as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-DpClY7GP.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-BKjSISSI.js similarity index 84% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-DpClY7GP.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-BKjSISSI.js index 8001d9105..952bf99b9 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-DpClY7GP.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-BKjSISSI.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_taskId-CLDdDoe1.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/createLucideIcon-DI_DJF-h.js","assets/ecs-DRWPOVsw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/httpRequest-Bc1WZmsd.js","assets/index.browser-ByUCT8up.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{s as r}from"./ecs-DRWPOVsw.js";var i=e(`/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.clusterName),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.taskId} | ECS | Mulga`}]}),component:t(()=>n(()=>import(`./_taskId-CLDdDoe1.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),`component`)});export{i as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_taskId-C5CFrXhI.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/createLucideIcon-DI_DJF-h.js","assets/ecs-DRWPOVsw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/httpRequest-Bc1WZmsd.js","assets/index.browser-ByUCT8up.js","assets/page-heading-M0NyqAmu.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{s as r}from"./ecs-DRWPOVsw.js";var i=e(`/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId`)({loader:async({context:e,params:t})=>{await e.queryClient.query({...r(t.clusterName),staleTime:`static`})},head:({params:e})=>({meta:[{title:`${e.taskId} | ECS | Mulga`}]}),component:t(()=>n(()=>import(`./_taskId-C5CFrXhI.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),`component`)});export{i as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-CLDdDoe1.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-C5CFrXhI.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-CLDdDoe1.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-C5CFrXhI.js index d8b99b387..a374a9bf1 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-CLDdDoe1.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_taskId-C5CFrXhI.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./back-link-DjawJm5W.js";import{s as i}from"./ecs-DRWPOVsw.js";import{t as a}from"./_taskId-DpClY7GP.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{n as s,t as c}from"./detail-row-CclMDqj8.js";import{t as l}from"./state-badge-BD9XGBez.js";var u=t(),d=e();function f(e){return e?.split(`/`).at(-1)??``}function p(e,t){return e?.details?.find(e=>e.name===t)?.value}function m(e){return e?new Date(e).toISOString():``}function h(e){let t=(0,u.c)(48),{clusterName:a,taskId:h}=e,v;t[0]===a?v=t[1]:(v=i(a),t[0]=a,t[1]=v);let{data:y}=n(v),b,x,S,C,w,T,E,D;if(t[2]!==a||t[3]!==h||t[4]!==y){D=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[13]===h?e=t[14]:(e=e=>(e.taskArn??``).endsWith(h),t[13]=h,t[14]=e);let n=y.find(e);if(!n){let e;t[15]===a?e=t[16]:(e={clusterName:a},t[15]=a,t[16]=e);let n;t[17]!==a||t[18]!==e?(n=(0,d.jsx)(r,{params:e,to:`/ecs/list-clusters/$clusterName`,children:a}),t[17]=a,t[18]=e,t[19]=n):n=t[19];let i;t[20]===h?i=t[21]:(i=(0,d.jsx)(o,{subtitle:`Task Details`,title:h}),t[20]=h,t[21]=i);let s;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Task not found.`}),t[22]=s):s=t[22];let c;t[23]!==n||t[24]!==i?(c=(0,d.jsxs)(d.Fragment,{children:[n,i,s]}),t[23]=n,t[24]=i,t[25]=c):c=t[25],D=c;break bb0}let i=(n.attachments??[]).find(_),u=n.containers??[],v=u.some(g),O;t[26]===a?O=t[27]:(O={clusterName:a},t[26]=a,t[27]=O),t[28]!==a||t[29]!==O?(C=(0,d.jsx)(r,{params:O,to:`/ecs/list-clusters/$clusterName`,children:a}),t[28]=a,t[29]=O,t[30]=C):C=t[30],w=(0,d.jsx)(o,{actions:(0,d.jsx)(l,{state:n.lastStatus}),subtitle:`Task Details`,title:f(n.taskArn)});let k;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,d.jsx)(s.Header,{children:`Configuration`}),t[31]=k):k=t[31];let A=(0,d.jsxs)(s.Content,{children:[(0,d.jsx)(c,{label:`Task ID`,value:f(n.taskArn)}),(0,d.jsx)(c,{label:`Last status`,value:(0,d.jsx)(l,{state:n.lastStatus})}),(0,d.jsx)(c,{label:`Desired status`,value:n.desiredStatus}),(0,d.jsx)(c,{label:`Task definition`,value:f(n.taskDefinitionArn)}),(0,d.jsx)(c,{label:`Launch type`,value:n.launchType}),(0,d.jsx)(c,{label:`Container instance`,value:f(n.containerInstanceArn)}),(0,d.jsx)(c,{label:`Created at`,value:m(n.createdAt)}),(0,d.jsx)(c,{label:`Started at`,value:m(n.startedAt)}),(0,d.jsx)(c,{label:`Stopped at`,value:m(n.stoppedAt)}),n.stoppedReason?(0,d.jsx)(c,{label:`Stopped reason`,value:n.stoppedReason}):null]});t[32]===A?T=t[33]:(T=(0,d.jsxs)(s,{children:[k,A]}),t[32]=A,t[33]=T);let j;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,d.jsx)(s.Header,{children:`Networking`}),t[34]=j):j=t[34];let M=i?(0,d.jsxs)(s.Content,{children:[(0,d.jsx)(c,{label:`ENI ID`,value:p(i,`networkInterfaceId`)}),(0,d.jsx)(c,{label:`Private IP`,value:p(i,`privateIPv4Address`)}),(0,d.jsx)(c,{label:`Public IP`,value:p(i,`publicIPv4Address`)}),(0,d.jsx)(c,{label:`Subnet`,value:p(i,`subnetId`)}),(0,d.jsx)(c,{label:`MAC`,value:p(i,`macAddress`)})]}):(0,d.jsx)(`div`,{className:`p-4`,children:(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Network mode does not assign an ENI.`})});t[35]===M?E=t[36]:(E=(0,d.jsx)(`div`,{className:`mt-6`,children:(0,d.jsxs)(s,{children:[j,M]})}),t[35]=M,t[36]=E),b=`mt-6`,t[37]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,d.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Containers`}),t[37]=x):x=t[37],S=u.length===0?(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No containers.`}):(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:`Image`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Exit Code / Reason`}),v&&(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`GPUs`})]})}),(0,d.jsx)(`tbody`,{children:u.map(e=>(0,d.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:e.name}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.image}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.lastStatus})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.healthStatus}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.exitCode===void 0?e.reason??``:String(e.exitCode)}),v&&(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.gpuIds&&e.gpuIds.length>0?e.gpuIds.join(`, `):`—`})]},e.name??e.containerArn))})]})})}t[2]=a,t[3]=h,t[4]=y,t[5]=b,t[6]=x,t[7]=S,t[8]=C,t[9]=w,t[10]=T,t[11]=E,t[12]=D}else b=t[5],x=t[6],S=t[7],C=t[8],w=t[9],T=t[10],E=t[11],D=t[12];if(D!==Symbol.for(`react.early_return_sentinel`))return D;let O;t[38]!==b||t[39]!==x||t[40]!==S?(O=(0,d.jsxs)(`div`,{className:b,children:[x,S]}),t[38]=b,t[39]=x,t[40]=S,t[41]=O):O=t[41];let k;return t[42]!==O||t[43]!==C||t[44]!==w||t[45]!==T||t[46]!==E?(k=(0,d.jsxs)(d.Fragment,{children:[C,w,T,E,O]}),t[42]=O,t[43]=C,t[44]=w,t[45]=T,t[46]=E,t[47]=k):k=t[47],k}function g(e){return(e.gpuIds?.length??0)>0}function _(e){return e.type===`ElasticNetworkInterface`}function v(){let e=(0,u.c)(3),{clusterName:t,taskId:n}=a.useParams(),r;return e[0]!==t||e[1]!==n?(r=(0,d.jsx)(h,{clusterName:t,taskId:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{v as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./back-link-DjawJm5W.js";import{s as i}from"./ecs-DRWPOVsw.js";import{t as a}from"./_taskId-BKjSISSI.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{n as s,t as c}from"./detail-row-CclMDqj8.js";import{t as l}from"./state-badge-BiFj5bbX.js";var u=t(),d=e();function f(e){return e?.split(`/`).at(-1)??``}function p(e,t){return e?.details?.find(e=>e.name===t)?.value}function m(e){return e?new Date(e).toISOString():``}function h(e){let t=(0,u.c)(48),{clusterName:a,taskId:h}=e,v;t[0]===a?v=t[1]:(v=i(a),t[0]=a,t[1]=v);let{data:y}=n(v),b,x,S,C,w,T,E,D;if(t[2]!==a||t[3]!==h||t[4]!==y){D=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[13]===h?e=t[14]:(e=e=>(e.taskArn??``).endsWith(h),t[13]=h,t[14]=e);let n=y.find(e);if(!n){let e;t[15]===a?e=t[16]:(e={clusterName:a},t[15]=a,t[16]=e);let n;t[17]!==a||t[18]!==e?(n=(0,d.jsx)(r,{params:e,to:`/ecs/list-clusters/$clusterName`,children:a}),t[17]=a,t[18]=e,t[19]=n):n=t[19];let i;t[20]===h?i=t[21]:(i=(0,d.jsx)(o,{subtitle:`Task Details`,title:h}),t[20]=h,t[21]=i);let s;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Task not found.`}),t[22]=s):s=t[22];let c;t[23]!==n||t[24]!==i?(c=(0,d.jsxs)(d.Fragment,{children:[n,i,s]}),t[23]=n,t[24]=i,t[25]=c):c=t[25],D=c;break bb0}let i=(n.attachments??[]).find(_),u=n.containers??[],v=u.some(g),O;t[26]===a?O=t[27]:(O={clusterName:a},t[26]=a,t[27]=O),t[28]!==a||t[29]!==O?(C=(0,d.jsx)(r,{params:O,to:`/ecs/list-clusters/$clusterName`,children:a}),t[28]=a,t[29]=O,t[30]=C):C=t[30],w=(0,d.jsx)(o,{actions:(0,d.jsx)(l,{state:n.lastStatus}),subtitle:`Task Details`,title:f(n.taskArn)});let k;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,d.jsx)(s.Header,{children:`Configuration`}),t[31]=k):k=t[31];let A=(0,d.jsxs)(s.Content,{children:[(0,d.jsx)(c,{label:`Task ID`,value:f(n.taskArn)}),(0,d.jsx)(c,{label:`Last status`,value:(0,d.jsx)(l,{state:n.lastStatus})}),(0,d.jsx)(c,{label:`Desired status`,value:n.desiredStatus}),(0,d.jsx)(c,{label:`Task definition`,value:f(n.taskDefinitionArn)}),(0,d.jsx)(c,{label:`Launch type`,value:n.launchType}),(0,d.jsx)(c,{label:`Container instance`,value:f(n.containerInstanceArn)}),(0,d.jsx)(c,{label:`Created at`,value:m(n.createdAt)}),(0,d.jsx)(c,{label:`Started at`,value:m(n.startedAt)}),(0,d.jsx)(c,{label:`Stopped at`,value:m(n.stoppedAt)}),n.stoppedReason?(0,d.jsx)(c,{label:`Stopped reason`,value:n.stoppedReason}):null]});t[32]===A?T=t[33]:(T=(0,d.jsxs)(s,{children:[k,A]}),t[32]=A,t[33]=T);let j;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,d.jsx)(s.Header,{children:`Networking`}),t[34]=j):j=t[34];let M=i?(0,d.jsxs)(s.Content,{children:[(0,d.jsx)(c,{label:`ENI ID`,value:p(i,`networkInterfaceId`)}),(0,d.jsx)(c,{label:`Private IP`,value:p(i,`privateIPv4Address`)}),(0,d.jsx)(c,{label:`Public IP`,value:p(i,`publicIPv4Address`)}),(0,d.jsx)(c,{label:`Subnet`,value:p(i,`subnetId`)}),(0,d.jsx)(c,{label:`MAC`,value:p(i,`macAddress`)})]}):(0,d.jsx)(`div`,{className:`p-4`,children:(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Network mode does not assign an ENI.`})});t[35]===M?E=t[36]:(E=(0,d.jsx)(`div`,{className:`mt-6`,children:(0,d.jsxs)(s,{children:[j,M]})}),t[35]=M,t[36]=E),b=`mt-6`,t[37]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,d.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Containers`}),t[37]=x):x=t[37],S=u.length===0?(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No containers.`}):(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:`Image`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Exit Code / Reason`}),v&&(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`GPUs`})]})}),(0,d.jsx)(`tbody`,{children:u.map(e=>(0,d.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:e.name}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.image}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.lastStatus})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.healthStatus}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.exitCode===void 0?e.reason??``:String(e.exitCode)}),v&&(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.gpuIds&&e.gpuIds.length>0?e.gpuIds.join(`, `):`—`})]},e.name??e.containerArn))})]})})}t[2]=a,t[3]=h,t[4]=y,t[5]=b,t[6]=x,t[7]=S,t[8]=C,t[9]=w,t[10]=T,t[11]=E,t[12]=D}else b=t[5],x=t[6],S=t[7],C=t[8],w=t[9],T=t[10],E=t[11],D=t[12];if(D!==Symbol.for(`react.early_return_sentinel`))return D;let O;t[38]!==b||t[39]!==x||t[40]!==S?(O=(0,d.jsxs)(`div`,{className:b,children:[x,S]}),t[38]=b,t[39]=x,t[40]=S,t[41]=O):O=t[41];let k;return t[42]!==O||t[43]!==C||t[44]!==w||t[45]!==T||t[46]!==E?(k=(0,d.jsxs)(d.Fragment,{children:[C,w,T,E,O]}),t[42]=O,t[43]=C,t[44]=w,t[45]=T,t[46]=E,t[47]=k):k=t[47],k}function g(e){return(e.gpuIds?.length??0)>0}function _(e){return e.type===`ElasticNetworkInterface`}function v(){let e=(0,u.c)(3),{clusterName:t,taskId:n}=a.useParams(),r;return e[0]!==t||e[1]!==n?(r=(0,d.jsx)(h,{clusterName:t,taskId:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{v as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-DYz225MP.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-Bo0jc5mn.js similarity index 92% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-DYz225MP.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-Bo0jc5mn.js index 49c6e3deb..3ffb3f888 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-DYz225MP.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-Bo0jc5mn.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_userName-CF7E9G3t.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/check-DKS02ExQ.js","assets/trash-DHuPKozD.js","assets/triangle-alert-Jc46kC7J.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/iam-CKwYVJXn.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/commandBuilder-CivibiZ7.js","assets/iam-Fo1DnIKB.js","assets/queryOptions-Dfvzj6n2.js","assets/json-DGqns_nK.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BD9XGBez.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/inline-policies-panel-KhZTsfXu.js","assets/useQuery-DVjCHx2S.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/json-editor-C1MMnH7_.js","assets/textarea-BNxO_Zsf.js","assets/iam-CRgvEy8_.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{S as r,b as i,c as a,i as o,p as s,t as c}from"./iam-Fo1DnIKB.js";var l=e(`/_auth/iam/(users)/list-users/$userName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.userName),staleTime:`static`}),e.queryClient.query({...c(t.userName),staleTime:`static`}),e.queryClient.query({...o(t.userName),staleTime:`static`}),e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...a(t.userName),staleTime:`static`}),e.queryClient.query({...i(t.userName),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.userName} | IAM | Mulga`}]}),component:t(()=>n(()=>import(`./_userName-CF7E9G3t.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])),`component`)});export{l as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_userName-EDUBssLB.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/matchContext-Dxo67MeP.js","assets/useNavigate-BiiHYpLW.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/createLucideIcon-DI_DJF-h.js","assets/check-DKS02ExQ.js","assets/trash-DHuPKozD.js","assets/triangle-alert-Jc46kC7J.js","assets/button-Bae9vdts.js","assets/dist-oTooRiSa.js","assets/iam-CKwYVJXn.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/commandBuilder-CivibiZ7.js","assets/iam-Fo1DnIKB.js","assets/queryOptions-Dfvzj6n2.js","assets/json-DGqns_nK.js","assets/page-heading-M0NyqAmu.js","assets/error-banner-BcDqaPk7.js","assets/alert-dialog-BYzNCmBp.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/detail-row-CclMDqj8.js","assets/state-badge-BiFj5bbX.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/inline-policies-panel-KhZTsfXu.js","assets/useQuery-DVjCHx2S.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/json-editor-C1MMnH7_.js","assets/textarea-BNxO_Zsf.js","assets/iam-CRgvEy8_.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{_o as n}from"./awsClient-I-S7JTV9.js";import{S as r,b as i,c as a,i as o,p as s,t as c}from"./iam-Fo1DnIKB.js";var l=e(`/_auth/iam/(users)/list-users/$userName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.query({...r(t.userName),staleTime:`static`}),e.queryClient.query({...c(t.userName),staleTime:`static`}),e.queryClient.query({...o(t.userName),staleTime:`static`}),e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...a(t.userName),staleTime:`static`}),e.queryClient.query({...i(t.userName),staleTime:`static`})])},head:({params:e})=>({meta:[{title:`${e.userName} | IAM | Mulga`}]}),component:t(()=>n(()=>import(`./_userName-EDUBssLB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])),`component`)});export{l as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-CF7E9G3t.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-EDUBssLB.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-CF7E9G3t.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-EDUBssLB.js index 7e17ed46e..c5a7821b4 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-CF7E9G3t.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/_userName-EDUBssLB.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{E as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./check-DKS02ExQ.js";import{t as u}from"./trash-DHuPKozD.js";import{t as d}from"./triangle-alert-Jc46kC7J.js";import{t as f}from"./button-Bae9vdts.js";import{O as p,f as m,k as h,o as g,y as _}from"./iam-CKwYVJXn.js";import{S as v,c as y,t as b}from"./iam-Fo1DnIKB.js";import{t as x}from"./_userName-DYz225MP.js";import{t as S}from"./page-heading-M0NyqAmu.js";import{t as C}from"./error-banner-BcDqaPk7.js";import{a as w,c as T,i as E,l as D,o as O,r as k,s as A,t as j}from"./alert-dialog-BYzNCmBp.js";import{t as M}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as N,t as P}from"./detail-row-CclMDqj8.js";import{t as F}from"./state-badge-BD9XGBez.js";import{t as I}from"./use-copy-to-clipboard-Bscc1MgN.js";import{n as L,t as R}from"./inline-policies-panel-KhZTsfXu.js";var z=t(n()),B=r(),V=e();function H(e){let t=(0,B.c)(27),{onClose:n,accessKeyId:r,secretAccessKey:i}=e,{copied:a,copy:o}=I(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsxs)(A,{children:[(0,V.jsx)(T,{children:(0,V.jsx)(d,{className:`text-destructive`})}),(0,V.jsx)(D,{children:`Save Your Access Key`}),(0,V.jsx)(w,{children:`This is your only chance to view the secret access key. Please copy it now. You won't be able to retrieve it again.`})]}),t[0]=s):s=t[0];let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Access Key ID: `}),t[1]=c):c=t[1];let u;t[2]===r?u=t[3]:(u=(0,V.jsxs)(`div`,{children:[c,r]}),t[2]=r,t[3]=u);let p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Secret Access Key: `}),t[4]=p):p=t[4];let m;t[5]===i?m=t[6]:(m=(0,V.jsxs)(`div`,{children:[p,i]}),t[5]=i,t[6]=m);let h;t[7]!==u||t[8]!==m?(h=(0,V.jsxs)(`div`,{className:`space-y-2 rounded-md border p-4 font-mono text-sm`,children:[u,m]}),t[7]=u,t[8]=m,t[9]=h):h=t[9];let g;t[10]!==r||t[11]!==o||t[12]!==i?(g=async()=>{await o(`Access Key ID: ${r}\nSecret Access Key: ${i}`)},t[10]=r,t[11]=o,t[12]=i,t[13]=g):g=t[13];let _;t[14]===a?_=t[15]:(_=a?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(l,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[14]=a,t[15]=_);let v;t[16]!==g||t[17]!==_?(v=(0,V.jsx)(f,{className:`w-full`,onClick:g,type:`button`,variant:`outline`,children:_}),t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]!==h||t[20]!==v?(y=(0,V.jsxs)(`div`,{className:`space-y-3`,children:[h,v]}),t[19]=h,t[20]=v,t[21]=y):y=t[21];let b;t[22]===n?b=t[23]:(b=(0,V.jsx)(O,{children:(0,V.jsx)(k,{onClick:n,children:`Close and Continue`})}),t[22]=n,t[23]=b);let x;return t[24]!==y||t[25]!==b?(x=(0,V.jsx)(j,{open:!0,children:(0,V.jsxs)(E,{className:`max-w-2xl`,children:[s,y,b]})}),t[24]=y,t[25]=b,t[26]=x):x=t[26],x}function U(){let{userName:e}=x.useParams(),t=o(),{data:n}=i(v(e)),{data:r}=i(b(e)),{data:l}=i(y(e)),d=_(),w=g(),T=m(),E=h(),D=p(),[O,k]=(0,z.useState)(!1),[A,j]=(0,z.useState)(null),[I,B]=(0,z.useState)(null),[U,W]=(0,z.useState)(null),G=n.User,K=r.AccessKeyMetadata??[],q=l.Groups??[],J=async()=>{try{await d.mutateAsync(e),t({to:`/iam/list-users`})}finally{k(!1)}},Y=async()=>{let t=await w.mutateAsync(e);t.AccessKey&&j({accessKeyId:t.AccessKey.AccessKeyId??``,secretAccessKey:t.AccessKey.SecretAccessKey??``})},X=async t=>{if(t.AccessKeyId){B(t.AccessKeyId);try{await E.mutateAsync({userName:e,accessKeyId:t.AccessKeyId,status:t.Status===`Active`?`Inactive`:`Active`})}finally{B(null)}}},Z=async t=>{B(t);try{await T.mutateAsync({userName:e,accessKeyId:t})}finally{B(null)}},Q=async t=>{W(t);try{await D.mutateAsync({groupName:t,userName:e})}finally{W(null)}};return G?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(c,{to:`/iam/list-users`,children:`Back to users`}),d.error&&(0,V.jsx)(C,{error:d.error,msg:`Failed to delete user`}),w.error&&(0,V.jsx)(C,{error:w.error,msg:`Failed to create access key`}),T.error&&(0,V.jsx)(C,{error:T.error,msg:`Failed to delete access key`}),D.error&&(0,V.jsx)(C,{error:D.error,msg:`Failed to remove from group`}),(0,V.jsxs)(`div`,{className:`space-y-6`,children:[(0,V.jsx)(S,{actions:(0,V.jsxs)(f,{onClick:()=>{k(!0)},size:`sm`,variant:`destructive`,children:[(0,V.jsx)(u,{className:`size-4`}),`Delete`]}),subtitle:`User Details`,title:G.UserName??``}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`User Information`}),(0,V.jsxs)(N.Content,{children:[(0,V.jsx)(P,{label:`User Name`,value:G.UserName}),(0,V.jsx)(P,{label:`User ID`,value:G.UserId}),(0,V.jsx)(P,{label:`ARN`,value:G.Arn}),(0,V.jsx)(P,{label:`Path`,value:G.Path}),(0,V.jsx)(P,{label:`Created`,value:s(G.CreateDate)})]})]}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsx)(`span`,{children:`Access Keys`}),(0,V.jsx)(f,{disabled:w.isPending,onClick:Y,size:`sm`,children:w.isPending?`Creating...`:`Create Access Key`})]})}),(0,V.jsx)(N.Content,{children:K.length>0?(0,V.jsx)(`div`,{className:`col-span-2 space-y-3`,children:K.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`font-mono text-sm`,children:e.AccessKeyId}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Created `,s(e.CreateDate)]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(F,{state:e.Status}),(0,V.jsx)(f,{disabled:I===e.AccessKeyId,onClick:async()=>{await X(e)},size:`sm`,variant:`outline`,children:e.Status===`Active`?`Deactivate`:`Activate`}),(0,V.jsx)(f,{disabled:I===e.AccessKeyId,onClick:()=>{e.AccessKeyId&&Z(e.AccessKeyId)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},e.AccessKeyId))}):(0,V.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No access keys.`})})]}),(0,V.jsx)(L,{kind:`user`,name:e}),(0,V.jsx)(R,{kind:`user`,name:e}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`Groups`}),(0,V.jsx)(N.Content,{children:q.length>0?(0,V.jsx)(`div`,{className:`col-span-2 space-y-3`,children:q.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,V.jsx)(a,{className:`text-sm font-medium hover:underline`,params:{groupName:e.GroupName??``},to:`/iam/list-groups/$groupName`,children:e.GroupName}),(0,V.jsx)(f,{disabled:U===e.GroupName,onClick:()=>{e.GroupName&&Q(e.GroupName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.GroupName))}):(0,V.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`Not a member of any group.`})})]})]}),(0,V.jsx)(M,{description:`Are you sure you want to delete the user "${e}"? This action cannot be undone. You must detach all policies and delete all access keys first.`,isPending:d.isPending,onConfirm:J,onOpenChange:k,open:O,title:`Delete User`}),A&&(0,V.jsx)(H,{accessKeyId:A.accessKeyId,onClose:()=>{j(null)},secretAccessKey:A.secretAccessKey})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(c,{to:`/iam/list-users`,children:`Back to users`}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`User not found.`})]})}export{U as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{E as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./back-link-DjawJm5W.js";import{t as l}from"./check-DKS02ExQ.js";import{t as u}from"./trash-DHuPKozD.js";import{t as d}from"./triangle-alert-Jc46kC7J.js";import{t as f}from"./button-Bae9vdts.js";import{O as p,f as m,k as h,o as g,y as _}from"./iam-CKwYVJXn.js";import{S as v,c as y,t as b}from"./iam-Fo1DnIKB.js";import{t as x}from"./_userName-Bo0jc5mn.js";import{t as S}from"./page-heading-M0NyqAmu.js";import{t as C}from"./error-banner-BcDqaPk7.js";import{a as w,c as T,i as E,l as D,o as O,r as k,s as A,t as j}from"./alert-dialog-BYzNCmBp.js";import{t as M}from"./delete-confirmation-dialog-BIyYnba2.js";import{n as N,t as P}from"./detail-row-CclMDqj8.js";import{t as F}from"./state-badge-BiFj5bbX.js";import{t as I}from"./use-copy-to-clipboard-Bscc1MgN.js";import{n as L,t as R}from"./inline-policies-panel-KhZTsfXu.js";var z=t(n()),B=r(),V=e();function H(e){let t=(0,B.c)(27),{onClose:n,accessKeyId:r,secretAccessKey:i}=e,{copied:a,copy:o}=I(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsxs)(A,{children:[(0,V.jsx)(T,{children:(0,V.jsx)(d,{className:`text-destructive`})}),(0,V.jsx)(D,{children:`Save Your Access Key`}),(0,V.jsx)(w,{children:`This is your only chance to view the secret access key. Please copy it now. You won't be able to retrieve it again.`})]}),t[0]=s):s=t[0];let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Access Key ID: `}),t[1]=c):c=t[1];let u;t[2]===r?u=t[3]:(u=(0,V.jsxs)(`div`,{children:[c,r]}),t[2]=r,t[3]=u);let p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Secret Access Key: `}),t[4]=p):p=t[4];let m;t[5]===i?m=t[6]:(m=(0,V.jsxs)(`div`,{children:[p,i]}),t[5]=i,t[6]=m);let h;t[7]!==u||t[8]!==m?(h=(0,V.jsxs)(`div`,{className:`space-y-2 rounded-md border p-4 font-mono text-sm`,children:[u,m]}),t[7]=u,t[8]=m,t[9]=h):h=t[9];let g;t[10]!==r||t[11]!==o||t[12]!==i?(g=async()=>{await o(`Access Key ID: ${r}\nSecret Access Key: ${i}`)},t[10]=r,t[11]=o,t[12]=i,t[13]=g):g=t[13];let _;t[14]===a?_=t[15]:(_=a?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(l,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[14]=a,t[15]=_);let v;t[16]!==g||t[17]!==_?(v=(0,V.jsx)(f,{className:`w-full`,onClick:g,type:`button`,variant:`outline`,children:_}),t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]!==h||t[20]!==v?(y=(0,V.jsxs)(`div`,{className:`space-y-3`,children:[h,v]}),t[19]=h,t[20]=v,t[21]=y):y=t[21];let b;t[22]===n?b=t[23]:(b=(0,V.jsx)(O,{children:(0,V.jsx)(k,{onClick:n,children:`Close and Continue`})}),t[22]=n,t[23]=b);let x;return t[24]!==y||t[25]!==b?(x=(0,V.jsx)(j,{open:!0,children:(0,V.jsxs)(E,{className:`max-w-2xl`,children:[s,y,b]})}),t[24]=y,t[25]=b,t[26]=x):x=t[26],x}function U(){let{userName:e}=x.useParams(),t=o(),{data:n}=i(v(e)),{data:r}=i(b(e)),{data:l}=i(y(e)),d=_(),w=g(),T=m(),E=h(),D=p(),[O,k]=(0,z.useState)(!1),[A,j]=(0,z.useState)(null),[I,B]=(0,z.useState)(null),[U,W]=(0,z.useState)(null),G=n.User,K=r.AccessKeyMetadata??[],q=l.Groups??[],J=async()=>{try{await d.mutateAsync(e),t({to:`/iam/list-users`})}finally{k(!1)}},Y=async()=>{let t=await w.mutateAsync(e);t.AccessKey&&j({accessKeyId:t.AccessKey.AccessKeyId??``,secretAccessKey:t.AccessKey.SecretAccessKey??``})},X=async t=>{if(t.AccessKeyId){B(t.AccessKeyId);try{await E.mutateAsync({userName:e,accessKeyId:t.AccessKeyId,status:t.Status===`Active`?`Inactive`:`Active`})}finally{B(null)}}},Z=async t=>{B(t);try{await T.mutateAsync({userName:e,accessKeyId:t})}finally{B(null)}},Q=async t=>{W(t);try{await D.mutateAsync({groupName:t,userName:e})}finally{W(null)}};return G?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(c,{to:`/iam/list-users`,children:`Back to users`}),d.error&&(0,V.jsx)(C,{error:d.error,msg:`Failed to delete user`}),w.error&&(0,V.jsx)(C,{error:w.error,msg:`Failed to create access key`}),T.error&&(0,V.jsx)(C,{error:T.error,msg:`Failed to delete access key`}),D.error&&(0,V.jsx)(C,{error:D.error,msg:`Failed to remove from group`}),(0,V.jsxs)(`div`,{className:`space-y-6`,children:[(0,V.jsx)(S,{actions:(0,V.jsxs)(f,{onClick:()=>{k(!0)},size:`sm`,variant:`destructive`,children:[(0,V.jsx)(u,{className:`size-4`}),`Delete`]}),subtitle:`User Details`,title:G.UserName??``}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`User Information`}),(0,V.jsxs)(N.Content,{children:[(0,V.jsx)(P,{label:`User Name`,value:G.UserName}),(0,V.jsx)(P,{label:`User ID`,value:G.UserId}),(0,V.jsx)(P,{label:`ARN`,value:G.Arn}),(0,V.jsx)(P,{label:`Path`,value:G.Path}),(0,V.jsx)(P,{label:`Created`,value:s(G.CreateDate)})]})]}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsx)(`span`,{children:`Access Keys`}),(0,V.jsx)(f,{disabled:w.isPending,onClick:Y,size:`sm`,children:w.isPending?`Creating...`:`Create Access Key`})]})}),(0,V.jsx)(N.Content,{children:K.length>0?(0,V.jsx)(`div`,{className:`col-span-2 space-y-3`,children:K.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`font-mono text-sm`,children:e.AccessKeyId}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Created `,s(e.CreateDate)]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(F,{state:e.Status}),(0,V.jsx)(f,{disabled:I===e.AccessKeyId,onClick:async()=>{await X(e)},size:`sm`,variant:`outline`,children:e.Status===`Active`?`Deactivate`:`Activate`}),(0,V.jsx)(f,{disabled:I===e.AccessKeyId,onClick:()=>{e.AccessKeyId&&Z(e.AccessKeyId)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},e.AccessKeyId))}):(0,V.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No access keys.`})})]}),(0,V.jsx)(L,{kind:`user`,name:e}),(0,V.jsx)(R,{kind:`user`,name:e}),(0,V.jsxs)(N,{children:[(0,V.jsx)(N.Header,{children:`Groups`}),(0,V.jsx)(N.Content,{children:q.length>0?(0,V.jsx)(`div`,{className:`col-span-2 space-y-3`,children:q.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,V.jsx)(a,{className:`text-sm font-medium hover:underline`,params:{groupName:e.GroupName??``},to:`/iam/list-groups/$groupName`,children:e.GroupName}),(0,V.jsx)(f,{disabled:U===e.GroupName,onClick:()=>{e.GroupName&&Q(e.GroupName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.GroupName))}):(0,V.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`Not a member of any group.`})})]})]}),(0,V.jsx)(M,{description:`Are you sure you want to delete the user "${e}"? This action cannot be undone. You must detach all policies and delete all access keys first.`,isPending:d.isPending,onConfirm:J,onOpenChange:k,open:O,title:`Delete User`}),A&&(0,V.jsx)(H,{accessKeyId:A.accessKeyId,onClose:()=>{j(null)},secretAccessKey:A.secretAccessKey})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(c,{to:`/iam/list-users`,children:`Back to users`}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`User not found.`})]})}export{U as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/allocate-address-CzxUw1t6.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/allocate-address-DiTLfKWR.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/allocate-address-CzxUw1t6.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/allocate-address-DiTLfKWR.js index d1398cfc2..77d7e3d61 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/allocate-address-CzxUw1t6.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/allocate-address-DiTLfKWR.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{n as o}from"./ec2-DFivrtZe.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{a as c,i as l,t as u}from"./zod-VwMMRSfy.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{t as f}from"./form-actions-C3zG6ld2.js";import{s as p,t as m}from"./field-ChkDR_wL.js";import{n as h}from"./ec2-CmqOirWQ.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=c(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;t(n?{to:`/ec2/describe-addresses/$id`,params:{id:n}}:{to:`/ec2/describe-addresses`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(r,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(s,{title:`Allocate Elastic IP`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(d,{error:v.error,msg:`Failed to allocate Elastic IP`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(a,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(i,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>{await t({to:`/ec2/describe-addresses`})},e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(f,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{n as o}from"./ec2-iXujaheD.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{a as c,i as l,t as u}from"./zod-VwMMRSfy.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{t as f}from"./form-actions-C3zG6ld2.js";import{s as p,t as m}from"./field-ChkDR_wL.js";import{n as h}from"./ec2-Cr9GrTUU.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=c(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;t(n?{to:`/ec2/describe-addresses/$id`,params:{id:n}}:{to:`/ec2/describe-addresses`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(r,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(s,{title:`Allocate Elastic IP`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(d,{error:v.error,msg:`Failed to allocate Elastic IP`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(a,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(i,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>{await t({to:`/ec2/describe-addresses`})},e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(f,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/certificate-import-dialog-CGT29fMd.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/certificate-import-dialog-CGT29fMd.js deleted file mode 100644 index ffd3d4887..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/certificate-import-dialog-CGT29fMd.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{A as i}from"./removable-TyvHreKc.js";import{t as a}from"./useMutation-DV0DQvGm.js";import{n as o,za as s}from"./awsClient-I-S7JTV9.js";import{i as c,n as l,r as u}from"./acm-BGw6nz9A.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{s as f,t as p}from"./field-ChkDR_wL.js";import{t as m}from"./textarea-BNxO_Zsf.js";import{a as h,i as g,l as _,n as v,o as y,r as b,s as ee,t as x}from"./alert-dialog-BYzNCmBp.js";var S=class extends c(l,u,`ImportCertificate`,s){},C=t(n(),1),w=r(),T=new TextEncoder;function E(){let e=(0,w.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:D,onSuccess:()=>{t.invalidateQueries({queryKey:[`acm`,`certificates`]})}},e[0]=t,e[1]=n),a(n)}async function D(e){let t=new S({Certificate:T.encode(e.certificate),PrivateKey:T.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?T.encode(e.certificateChain):void 0});return await o().send(t)}var O=e();function k(e){let t=(0,w.c)(53),{open:n,onOpenChange:r,onImported:i}=e,[a,o]=(0,C.useState)(``),[s,c]=(0,C.useState)(``),[l,u]=(0,C.useState)(``),S=E(),T;t[0]===S?T=t[1]:(T=()=>{o(``),c(``),u(``),S.reset()},t[0]=S,t[1]=T);let D=T,k;t[2]!==r||t[3]!==D?(k=e=>{e||D(),r(e)},t[2]=r,t[3]=D,t[4]=k):k=t[4];let A=k,j;t[5]!==a||t[6]!==s?(j=a.trim().length>0&&s.trim().length>0,t[5]=a,t[6]=s,t[7]=j):j=t[7];let M=j,N;t[8]!==M||t[9]!==a||t[10]!==l||t[11]!==S||t[12]!==i||t[13]!==r||t[14]!==s||t[15]!==D?(N=async()=>{if(M)try{let e=await S.mutateAsync({certificate:a,privateKey:s,certificateChain:l});e.CertificateArn&&i(e.CertificateArn),D(),r(!1)}catch{}},t[8]=M,t[9]=a,t[10]=l,t[11]=S,t[12]=i,t[13]=r,t[14]=s,t[15]=D,t[16]=N):N=t[16];let P=N,F;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,O.jsxs)(ee,{children:[(0,O.jsx)(_,{children:`Import certificate`}),(0,O.jsx)(h,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),t[17]=F):F=t[17];let I;t[18]===S.error?I=t[19]:(I=S.error&&(0,O.jsx)(d,{error:S.error,msg:`Failed to import certificate`}),t[18]=S.error,t[19]=I);let L;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,O.jsx)(f,{children:(0,O.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),t[20]=L):L=t[20];let R;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{o(e.target.value)},t[21]=R):R=t[21];let z;t[22]===a?z=t[23]:(z=(0,O.jsxs)(p,{children:[L,(0,O.jsx)(m,{size:`sm`,variant:`code`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:a})]}),t[22]=a,t[23]=z);let B;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,O.jsx)(f,{children:(0,O.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),t[24]=B):B=t[24];let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>{c(e.target.value)},t[25]=V):V=t[25];let H;t[26]===s?H=t[27]:(H=(0,O.jsxs)(p,{children:[B,(0,O.jsx)(m,{size:`sm`,variant:`code`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:s})]}),t[26]=s,t[27]=H);let U;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,O.jsx)(f,{children:(0,O.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),t[28]=U):U=t[28];let W;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>{u(e.target.value)},t[29]=W):W=t[29];let G;t[30]===l?G=t[31]:(G=(0,O.jsxs)(p,{children:[U,(0,O.jsx)(m,{size:`sm`,variant:`code`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:l})]}),t[30]=l,t[31]=G);let K;t[32]!==H||t[33]!==G||t[34]!==z?(K=(0,O.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),t[32]=H,t[33]=G,t[34]=z,t[35]=K):K=t[35];let q;t[36]===S.isPending?q=t[37]:(q=(0,O.jsx)(b,{disabled:S.isPending,children:`Cancel`}),t[36]=S.isPending,t[37]=q);let J=!M||S.isPending,Y=S.isPending?`Importing…`:`Import`,X;t[38]!==P||t[39]!==J||t[40]!==Y?(X=(0,O.jsx)(v,{disabled:J,onClick:P,children:Y}),t[38]=P,t[39]=J,t[40]=Y,t[41]=X):X=t[41];let Z;t[42]!==q||t[43]!==X?(Z=(0,O.jsxs)(y,{children:[q,X]}),t[42]=q,t[43]=X,t[44]=Z):Z=t[44];let Q;t[45]!==K||t[46]!==Z||t[47]!==I?(Q=(0,O.jsxs)(g,{width:`lg`,children:[F,I,K,Z]}),t[45]=K,t[46]=Z,t[47]=I,t[48]=Q):Q=t[48];let $;return t[49]!==A||t[50]!==n||t[51]!==Q?($=(0,O.jsx)(x,{onOpenChange:A,open:n,children:Q}),t[49]=A,t[50]=n,t[51]=Q,t[52]=$):$=t[52],$}export{k as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-internet-gateway-DFMxm206.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-internet-gateway-CSQ2FjBW.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-internet-gateway-DFMxm206.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-internet-gateway-CSQ2FjBW.js index 2a9b39f03..fdd35f279 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-internet-gateway-DFMxm206.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-internet-gateway-CSQ2FjBW.js @@ -1,2 +1,2 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{p as o}from"./ec2-DFivrtZe.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{a as c,i as l,t as u}from"./zod-VwMMRSfy.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{t as f}from"./form-actions-C3zG6ld2.js";import{s as p,t as m}from"./field-ChkDR_wL.js";import{a as h}from"./ec2-CmqOirWQ.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=c(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;t(n?{to:`/ec2/describe-internet-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-internet-gateways`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(r,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(s,{title:`Create Internet Gateway`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(d,{error:v.error,msg:`Failed to create Internet Gateway`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(a,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(i,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>{await t({to:`/ec2/describe-internet-gateways`})},e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(f,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[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{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{p as o}from"./ec2-iXujaheD.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{a as c,i as l,t as u}from"./zod-VwMMRSfy.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{t as f}from"./form-actions-C3zG6ld2.js";import{s as p,t as m}from"./field-ChkDR_wL.js";import{a as h}from"./ec2-Cr9GrTUU.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:u(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=l(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=c(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;t(n?{to:`/ec2/describe-internet-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-internet-gateways`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(r,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(s,{title:`Create Internet Gateway`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(d,{error:v.error,msg:`Failed to create Internet Gateway`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(a,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(i,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>{await t({to:`/ec2/describe-internet-gateways`})},e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(f,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-key-pair-Bw3g9hRn.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-key-pair-dW4BQsgU.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-key-pair-Bw3g9hRn.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-key-pair-dW4BQsgU.js index bfa5bcfdb..29be42c11 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-key-pair-Bw3g9hRn.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-key-pair-dW4BQsgU.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as ee}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{t as te}from"./check-DKS02ExQ.js";import{c as a,i as o,n as s,s as c,t as ne}from"./select-Bgl6IAYG.js";import{t as l}from"./download-Di86UJcc.js";import{t as u}from"./cli-command-panel-DPooQRso.js";import{t as d}from"./triangle-alert-Jc46kC7J.js";import{t as f}from"./button-Bae9vdts.js";import{t as p}from"./input-CpcyJw4R.js";import{m}from"./ec2-DFivrtZe.js";import{t as h}from"./page-heading-M0NyqAmu.js";import{a as g,i as _,n as v,t as y}from"./zod-VwMMRSfy.js";import{t as b}from"./error-banner-BcDqaPk7.js";import{t as x}from"./form-actions-C3zG6ld2.js";import{n as S,r as C,s as w,t as T}from"./field-ChkDR_wL.js";import{a as re,c as E,i as ie,l as D,o as ae,r as O,s as oe,t as k}from"./alert-dialog-BYzNCmBp.js";import{t as A}from"./use-copy-to-clipboard-Bscc1MgN.js";import{o as j}from"./ec2-CmqOirWQ.js";var M=t(n(),1),se=r(),N=e();function P(e){let t=(0,se.c)(38),{open:n,keyName:r,keyMaterial:i}=e,a=ee(),{copied:o,copy:s}=A(),c;t[0]!==i||t[1]!==r?(c=()=>{let e=new Blob([i],{type:`text/plain`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${r}.pem`,n.click(),URL.revokeObjectURL(t)},t[0]=i,t[1]=r,t[2]=c):c=t[2];let ne=c,u;t[3]===a?u=t[4]:(u=()=>{a({to:`/ec2/describe-key-pairs`})},t[3]=a,t[4]=u);let p=u,m,h;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,N.jsx)(E,{children:(0,N.jsx)(d,{className:`text-destructive`})}),h=(0,N.jsx)(D,{children:`Save Your Private Key`}),t[5]=m,t[6]=h):(m=t[5],h=t[6]);let g;t[7]===r?g=t[8]:(g=(0,N.jsxs)(oe,{children:[m,h,(0,N.jsxs)(re,{children:[`This is your only chance to save the private key file for`,` `,(0,N.jsx)(`strong`,{children:r}),`. Please download or copy it now. You won't be able to retrieve it again.`]})]}),t[7]=r,t[8]=g);let _=`Private key material for ${r}`,v;t[9]!==i||t[10]!==_?(v=(0,N.jsx)(`textarea`,{"aria-label":_,className:`w-full resize-none overflow-y-auto rounded-md border border-input bg-input/20 px-2 py-2 font-mono text-xs`,readOnly:!0,rows:4,value:i}),t[9]=i,t[10]=_,t[11]=v):v=t[11];let y;t[12]!==s||t[13]!==i?(y=async()=>{await s(i)},t[12]=s,t[13]=i,t[14]=y):y=t[14];let b;t[15]===o?b=t[16]:(b=o?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(te,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[15]=o,t[16]=b);let x;t[17]!==y||t[18]!==b?(x=(0,N.jsx)(f,{className:`flex-1`,onClick:y,type:`button`,variant:`outline`,children:b}),t[17]=y,t[18]=b,t[19]=x):x=t[19];let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,N.jsx)(l,{className:`mr-2 size-4`}),t[20]=S):S=t[20];let C;t[21]===ne?C=t[22]:(C=(0,N.jsxs)(f,{className:`flex-1`,onClick:ne,type:`button`,variant:`outline`,children:[S,`Download .pem File`]}),t[21]=ne,t[22]=C);let w;t[23]!==x||t[24]!==C?(w=(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[x,C]}),t[23]=x,t[24]=C,t[25]=w):w=t[25];let T;t[26]!==w||t[27]!==v?(T=(0,N.jsxs)(`div`,{className:`space-y-3`,children:[v,w]}),t[26]=w,t[27]=v,t[28]=T):T=t[28];let j;t[29]===p?j=t[30]:(j=(0,N.jsx)(ae,{children:(0,N.jsx)(O,{onClick:p,children:`Close and Continue`})}),t[29]=p,t[30]=j);let M;t[31]!==T||t[32]!==j||t[33]!==g?(M=(0,N.jsxs)(ie,{className:`max-w-2xl`,children:[g,T,j]}),t[31]=T,t[32]=j,t[33]=g,t[34]=M):M=t[34];let P;return t[35]!==n||t[36]!==M?(P=(0,N.jsx)(k,{open:n,children:M}),t[35]=n,t[36]=M,t[37]=P):P=t[37],P}function F(){let e=(0,se.c)(58),t=ee(),n=m(),[r,te]=(0,M.useState)(null),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=y(j),e[0]=l):l=e[0];let d;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(d={resolver:l,defaultValues:{keyType:`rsa`}},e[1]=d):d=e[1];let{handleSubmit:f,register:re,control:E,formState:ie}=_(d),{errors:D,isSubmitting:ae}=ie,O;e[2]===E?O=e[3]:(O={control:E},e[2]=E,e[3]=O);let oe=g(O),k;e[4]===n?k=e[5]:(k=async e=>{let t=await n.mutateAsync(e);t.KeyMaterial&&te({keyName:e.keyName,material:t.KeyMaterial})},e[4]=n,e[5]=k);let A=k,F,I;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,N.jsx)(i,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),I=(0,N.jsx)(h,{title:`Create Key Pair`}),e[6]=F,e[7]=I):(F=e[6],I=e[7]);let L;e[8]===n.error?L=e[9]:(L=n.error&&(0,N.jsx)(b,{error:n.error,msg:`Failed to create key pair`}),e[8]=n.error,e[9]=L);let R;e[10]!==f||e[11]!==A?(R=f(A),e[10]=f,e[11]=A,e[12]=R):R=e[12];let z;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,N.jsx)(w,{children:(0,N.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[13]=z):z=e[13];let le=!!D.keyName,B;e[14]===re?B=e[15]:(B=re(`keyName`),e[14]=re,e[15]=B);let V;e[16]!==le||e[17]!==B?(V=(0,N.jsx)(p,{"aria-invalid":le,id:`keyName`,placeholder:`my-key-pair…`,...B}),e[16]=le,e[17]=B,e[18]=V):V=e[18];let H;e[19]===D.keyName?H=e[20]:(H=(0,N.jsx)(C,{errors:[D.keyName]}),e[19]=D.keyName,e[20]=H);let U;e[21]!==V||e[22]!==H?(U=(0,N.jsxs)(T,{children:[z,V,H]}),e[21]=V,e[22]=H,e[23]=U):U=e[23];let ue;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,N.jsx)(w,{children:(0,N.jsx)(`label`,{htmlFor:`keyType`,children:`Key Type`})}),e[24]=ue):ue=e[24];let W;e[25]===D.keyType?W=e[26]:(W=e=>{let{field:t}=e;return(0,N.jsxs)(ne,{onValueChange:e=>{t.onChange(e)},value:t.value,children:[(0,N.jsx)(c,{"aria-invalid":!!D.keyType,className:`w-full`,id:`keyType`,children:(0,N.jsx)(a,{placeholder:`Select a key type`})}),(0,N.jsxs)(s,{children:[(0,N.jsx)(o,{value:`rsa`,children:`RSA (2048-bit)`}),(0,N.jsx)(o,{value:`ed25519`,children:`ED25519`})]})]})},e[25]=D.keyType,e[26]=W);let G;e[27]!==E||e[28]!==W?(G=(0,N.jsx)(v,{control:E,name:`keyType`,render:W}),e[27]=E,e[28]=W,e[29]=G):G=e[29];let de;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,N.jsx)(S,{children:`RSA is required to retrieve a Windows administrator password. ED25519 works for SSH only.`}),e[30]=de):de=e[30];let K;e[31]===D.keyType?K=e[32]:(K=(0,N.jsx)(C,{errors:[D.keyType]}),e[31]=D.keyType,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,N.jsxs)(T,{children:[ue,G,de,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===oe?J=e[37]:(J=ce(oe),e[36]=oe,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,N.jsx)(u,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-key-pairs`})},e[40]=t,e[41]=X);let Z;e[42]!==n.isPending||e[43]!==ae||e[44]!==X?(Z=(0,N.jsx)(x,{isPending:n.isPending,isSubmitting:ae,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Key Pair`}),e[42]=n.isPending,e[43]=ae,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==U||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==R?(Q=(0,N.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:R,children:[U,q,Y,Z]}),e[46]=U,e[47]=q,e[48]=Y,e[49]=Z,e[50]=R,e[51]=Q):Q=e[51];let $;e[52]===r?$=e[53]:($=r&&(0,N.jsx)(P,{keyMaterial:r.material,keyName:r.keyName,open:!!r}),e[52]=r,e[53]=$);let fe;return e[54]!==Q||e[55]!==$||e[56]!==L?(fe=(0,N.jsxs)(N.Fragment,{children:[F,I,L,Q,$]}),e[54]=Q,e[55]=$,e[56]=L,e[57]=fe):fe=e[57],fe}function ce(e){let t=e.keyName??``,n=e.keyType??`rsa`;return[{label:`Create Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-key-pair`},{type:`flag`,value:` --key-name`},{type:`value`,value:` ${t||``}`},{type:`flag`,value:` --key-type`},{type:`value`,value:` ${n}`}]}]}var I=F;export{I as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as ee}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{t as te}from"./check-DKS02ExQ.js";import{c as a,i as o,n as s,s as c,t as ne}from"./select-Bgl6IAYG.js";import{t as l}from"./download-Di86UJcc.js";import{t as u}from"./cli-command-panel-DPooQRso.js";import{t as d}from"./triangle-alert-Jc46kC7J.js";import{t as f}from"./button-Bae9vdts.js";import{t as p}from"./input-CpcyJw4R.js";import{m}from"./ec2-iXujaheD.js";import{t as h}from"./page-heading-M0NyqAmu.js";import{a as g,i as _,n as v,t as y}from"./zod-VwMMRSfy.js";import{t as b}from"./error-banner-BcDqaPk7.js";import{t as x}from"./form-actions-C3zG6ld2.js";import{n as S,r as C,s as w,t as T}from"./field-ChkDR_wL.js";import{a as re,c as E,i as ie,l as D,o as ae,r as O,s as oe,t as k}from"./alert-dialog-BYzNCmBp.js";import{t as A}from"./use-copy-to-clipboard-Bscc1MgN.js";import{o as j}from"./ec2-Cr9GrTUU.js";var M=t(n(),1),se=r(),N=e();function P(e){let t=(0,se.c)(38),{open:n,keyName:r,keyMaterial:i}=e,a=ee(),{copied:o,copy:s}=A(),c;t[0]!==i||t[1]!==r?(c=()=>{let e=new Blob([i],{type:`text/plain`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${r}.pem`,n.click(),URL.revokeObjectURL(t)},t[0]=i,t[1]=r,t[2]=c):c=t[2];let ne=c,u;t[3]===a?u=t[4]:(u=()=>{a({to:`/ec2/describe-key-pairs`})},t[3]=a,t[4]=u);let p=u,m,h;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,N.jsx)(E,{children:(0,N.jsx)(d,{className:`text-destructive`})}),h=(0,N.jsx)(D,{children:`Save Your Private Key`}),t[5]=m,t[6]=h):(m=t[5],h=t[6]);let g;t[7]===r?g=t[8]:(g=(0,N.jsxs)(oe,{children:[m,h,(0,N.jsxs)(re,{children:[`This is your only chance to save the private key file for`,` `,(0,N.jsx)(`strong`,{children:r}),`. Please download or copy it now. You won't be able to retrieve it again.`]})]}),t[7]=r,t[8]=g);let _=`Private key material for ${r}`,v;t[9]!==i||t[10]!==_?(v=(0,N.jsx)(`textarea`,{"aria-label":_,className:`w-full resize-none overflow-y-auto rounded-md border border-input bg-input/20 px-2 py-2 font-mono text-xs`,readOnly:!0,rows:4,value:i}),t[9]=i,t[10]=_,t[11]=v):v=t[11];let y;t[12]!==s||t[13]!==i?(y=async()=>{await s(i)},t[12]=s,t[13]=i,t[14]=y):y=t[14];let b;t[15]===o?b=t[16]:(b=o?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(te,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[15]=o,t[16]=b);let x;t[17]!==y||t[18]!==b?(x=(0,N.jsx)(f,{className:`flex-1`,onClick:y,type:`button`,variant:`outline`,children:b}),t[17]=y,t[18]=b,t[19]=x):x=t[19];let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,N.jsx)(l,{className:`mr-2 size-4`}),t[20]=S):S=t[20];let C;t[21]===ne?C=t[22]:(C=(0,N.jsxs)(f,{className:`flex-1`,onClick:ne,type:`button`,variant:`outline`,children:[S,`Download .pem File`]}),t[21]=ne,t[22]=C);let w;t[23]!==x||t[24]!==C?(w=(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[x,C]}),t[23]=x,t[24]=C,t[25]=w):w=t[25];let T;t[26]!==w||t[27]!==v?(T=(0,N.jsxs)(`div`,{className:`space-y-3`,children:[v,w]}),t[26]=w,t[27]=v,t[28]=T):T=t[28];let j;t[29]===p?j=t[30]:(j=(0,N.jsx)(ae,{children:(0,N.jsx)(O,{onClick:p,children:`Close and Continue`})}),t[29]=p,t[30]=j);let M;t[31]!==T||t[32]!==j||t[33]!==g?(M=(0,N.jsxs)(ie,{className:`max-w-2xl`,children:[g,T,j]}),t[31]=T,t[32]=j,t[33]=g,t[34]=M):M=t[34];let P;return t[35]!==n||t[36]!==M?(P=(0,N.jsx)(k,{open:n,children:M}),t[35]=n,t[36]=M,t[37]=P):P=t[37],P}function F(){let e=(0,se.c)(58),t=ee(),n=m(),[r,te]=(0,M.useState)(null),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=y(j),e[0]=l):l=e[0];let d;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(d={resolver:l,defaultValues:{keyType:`rsa`}},e[1]=d):d=e[1];let{handleSubmit:f,register:re,control:E,formState:ie}=_(d),{errors:D,isSubmitting:ae}=ie,O;e[2]===E?O=e[3]:(O={control:E},e[2]=E,e[3]=O);let oe=g(O),k;e[4]===n?k=e[5]:(k=async e=>{let t=await n.mutateAsync(e);t.KeyMaterial&&te({keyName:e.keyName,material:t.KeyMaterial})},e[4]=n,e[5]=k);let A=k,F,I;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,N.jsx)(i,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),I=(0,N.jsx)(h,{title:`Create Key Pair`}),e[6]=F,e[7]=I):(F=e[6],I=e[7]);let L;e[8]===n.error?L=e[9]:(L=n.error&&(0,N.jsx)(b,{error:n.error,msg:`Failed to create key pair`}),e[8]=n.error,e[9]=L);let R;e[10]!==f||e[11]!==A?(R=f(A),e[10]=f,e[11]=A,e[12]=R):R=e[12];let z;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,N.jsx)(w,{children:(0,N.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[13]=z):z=e[13];let le=!!D.keyName,B;e[14]===re?B=e[15]:(B=re(`keyName`),e[14]=re,e[15]=B);let V;e[16]!==le||e[17]!==B?(V=(0,N.jsx)(p,{"aria-invalid":le,id:`keyName`,placeholder:`my-key-pair…`,...B}),e[16]=le,e[17]=B,e[18]=V):V=e[18];let H;e[19]===D.keyName?H=e[20]:(H=(0,N.jsx)(C,{errors:[D.keyName]}),e[19]=D.keyName,e[20]=H);let U;e[21]!==V||e[22]!==H?(U=(0,N.jsxs)(T,{children:[z,V,H]}),e[21]=V,e[22]=H,e[23]=U):U=e[23];let ue;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,N.jsx)(w,{children:(0,N.jsx)(`label`,{htmlFor:`keyType`,children:`Key Type`})}),e[24]=ue):ue=e[24];let W;e[25]===D.keyType?W=e[26]:(W=e=>{let{field:t}=e;return(0,N.jsxs)(ne,{onValueChange:e=>{t.onChange(e)},value:t.value,children:[(0,N.jsx)(c,{"aria-invalid":!!D.keyType,className:`w-full`,id:`keyType`,children:(0,N.jsx)(a,{placeholder:`Select a key type`})}),(0,N.jsxs)(s,{children:[(0,N.jsx)(o,{value:`rsa`,children:`RSA (2048-bit)`}),(0,N.jsx)(o,{value:`ed25519`,children:`ED25519`})]})]})},e[25]=D.keyType,e[26]=W);let G;e[27]!==E||e[28]!==W?(G=(0,N.jsx)(v,{control:E,name:`keyType`,render:W}),e[27]=E,e[28]=W,e[29]=G):G=e[29];let de;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,N.jsx)(S,{children:`RSA is required to retrieve a Windows administrator password. ED25519 works for SSH only.`}),e[30]=de):de=e[30];let K;e[31]===D.keyType?K=e[32]:(K=(0,N.jsx)(C,{errors:[D.keyType]}),e[31]=D.keyType,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,N.jsxs)(T,{children:[ue,G,de,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===oe?J=e[37]:(J=ce(oe),e[36]=oe,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,N.jsx)(u,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-key-pairs`})},e[40]=t,e[41]=X);let Z;e[42]!==n.isPending||e[43]!==ae||e[44]!==X?(Z=(0,N.jsx)(x,{isPending:n.isPending,isSubmitting:ae,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Key Pair`}),e[42]=n.isPending,e[43]=ae,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==U||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==R?(Q=(0,N.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:R,children:[U,q,Y,Z]}),e[46]=U,e[47]=q,e[48]=Y,e[49]=Z,e[50]=R,e[51]=Q):Q=e[51];let $;e[52]===r?$=e[53]:($=r&&(0,N.jsx)(P,{keyMaterial:r.material,keyName:r.keyName,open:!!r}),e[52]=r,e[53]=$);let fe;return e[54]!==Q||e[55]!==$||e[56]!==L?(fe=(0,N.jsxs)(N.Fragment,{children:[F,I,L,Q,$]}),e[54]=Q,e[55]=$,e[56]=L,e[57]=fe):fe=e[57],fe}function ce(e){let t=e.keyName??``,n=e.keyType??`rsa`;return[{label:`Create Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-key-pair`},{type:`flag`,value:` --key-name`},{type:`value`,value:` ${t||``}`},{type:`flag`,value:` --key-type`},{type:`value`,value:` ${n}`}]}]}var I=F;export{I as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-launch-template-Dmuf_adB.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-launch-template-DulI-7mK.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-launch-template-Dmuf_adB.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-launch-template-DulI-7mK.js index 7e603f06b..9360afe95 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-launch-template-Dmuf_adB.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-launch-template-DulI-7mK.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{h as o,t as s}from"./ec2-DFivrtZe.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{a as l,i as u,t as ee}from"./zod-VwMMRSfy.js";import{t as te}from"./error-banner-BcDqaPk7.js";import{t as ne}from"./form-actions-C3zG6ld2.js";import{r as d,s as f,t as p}from"./field-ChkDR_wL.js";import{s as m}from"./ec2-CmqOirWQ.js";import{t as h}from"./launch-template-data-fields-CcRkOt3t.js";var g=t(),_=e();function v(){let e=(0,g.c)(56),t=n(),v=o(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=ee(m),e[0]=y):y=e[0];let x;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:y,defaultValues:{launchTemplateName:``,versionDescription:``,imageId:``,instanceType:``,securityGroupIds:[],userData:``}},e[1]=x):x=e[1];let{control:S,handleSubmit:C,register:w,formState:T}=u(x),{errors:E,isSubmitting:D}=T,O;e[2]===S?O=e[3]:(O={control:S},e[2]=S,e[3]=O);let k=l(O),A;e[4]!==v||e[5]!==t?(A=async e=>{let n=(await v.mutateAsync(e)).LaunchTemplate?.LaunchTemplateId;if(!n){t({to:`/ec2/describe-launch-templates`});return}t({to:`/ec2/describe-launch-templates/$id`,params:{id:n}})},e[4]=v,e[5]=t,e[6]=A):A=e[6];let j=A,M,N;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,_.jsx)(r,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),N=(0,_.jsx)(c,{title:`Create Launch Template`}),e[7]=M,e[8]=N):(M=e[7],N=e[8]);let P;e[9]===v.error?P=e[10]:(P=v.error&&(0,_.jsx)(te,{error:v.error,msg:`Failed to create launch template`}),e[9]=v.error,e[10]=P);let F;e[11]!==C||e[12]!==j?(F=C(j),e[11]=C,e[12]=j,e[13]=F):F=e[13];let I;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateName`,children:`Name`})}),e[14]=I):I=e[14];let L=!!E.launchTemplateName,R;e[15]===w?R=e[16]:(R=w(`launchTemplateName`),e[15]=w,e[16]=R);let z;e[17]!==L||e[18]!==R?(z=(0,_.jsx)(a,{"aria-invalid":L,id:`launchTemplateName`,placeholder:`my-launch-template`,...R}),e[17]=L,e[18]=R,e[19]=z):z=e[19];let B;e[20]===E.launchTemplateName?B=e[21]:(B=(0,_.jsx)(d,{errors:[E.launchTemplateName]}),e[20]=E.launchTemplateName,e[21]=B);let V;e[22]!==z||e[23]!==B?(V=(0,_.jsxs)(p,{children:[I,z,B]}),e[22]=z,e[23]=B,e[24]=V):V=e[24];let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),e[25]=H):H=e[25];let U;e[26]===w?U=e[27]:(U=w(`versionDescription`),e[26]=w,e[27]=U);let W;e[28]===U?W=e[29]:(W=(0,_.jsxs)(p,{children:[H,(0,_.jsx)(a,{id:`versionDescription`,placeholder:`Initial version`,...U})]}),e[28]=U,e[29]=W);let G;e[30]!==S||e[31]!==E||e[32]!==w?(G=(0,_.jsx)(h,{control:S,errors:E,register:w}),e[30]=S,e[31]=E,e[32]=w,e[33]=G):G=e[33];let K=k.launchTemplateName??``,q=k.versionDescription??``,J;e[34]!==K||e[35]!==q||e[36]!==k?(J=b(K,q,s(k)),e[34]=K,e[35]=q,e[36]=k,e[37]=J):J=e[37];let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-launch-templates`})},e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==D||e[44]!==X?(Z=(0,_.jsx)(ne,{isPending:v.isPending,isSubmitting:D,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Launch Template`}),e[42]=v.isPending,e[43]=D,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==V||e[47]!==W||e[48]!==G||e[49]!==Y||e[50]!==Z||e[51]!==F?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,W,G,Y,Z]}),e[46]=V,e[47]=W,e[48]=G,e[49]=Y,e[50]=Z,e[51]=F,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==P?($=(0,_.jsxs)(_.Fragment,{children:[M,N,P,Q]}),e[53]=Q,e[54]=P,e[55]=$):$=e[55],$}function y(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function b(e,t,n){let r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-launch-template`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{h as o,t as s}from"./ec2-iXujaheD.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{a as l,i as u,t as ee}from"./zod-VwMMRSfy.js";import{t as te}from"./error-banner-BcDqaPk7.js";import{t as ne}from"./form-actions-C3zG6ld2.js";import{r as d,s as f,t as p}from"./field-ChkDR_wL.js";import{s as m}from"./ec2-Cr9GrTUU.js";import{t as h}from"./launch-template-data-fields-4CYo9au8.js";var g=t(),_=e();function v(){let e=(0,g.c)(56),t=n(),v=o(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=ee(m),e[0]=y):y=e[0];let x;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:y,defaultValues:{launchTemplateName:``,versionDescription:``,imageId:``,instanceType:``,securityGroupIds:[],userData:``}},e[1]=x):x=e[1];let{control:S,handleSubmit:C,register:w,formState:T}=u(x),{errors:E,isSubmitting:D}=T,O;e[2]===S?O=e[3]:(O={control:S},e[2]=S,e[3]=O);let k=l(O),A;e[4]!==v||e[5]!==t?(A=async e=>{let n=(await v.mutateAsync(e)).LaunchTemplate?.LaunchTemplateId;if(!n){t({to:`/ec2/describe-launch-templates`});return}t({to:`/ec2/describe-launch-templates/$id`,params:{id:n}})},e[4]=v,e[5]=t,e[6]=A):A=e[6];let j=A,M,N;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,_.jsx)(r,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),N=(0,_.jsx)(c,{title:`Create Launch Template`}),e[7]=M,e[8]=N):(M=e[7],N=e[8]);let P;e[9]===v.error?P=e[10]:(P=v.error&&(0,_.jsx)(te,{error:v.error,msg:`Failed to create launch template`}),e[9]=v.error,e[10]=P);let F;e[11]!==C||e[12]!==j?(F=C(j),e[11]=C,e[12]=j,e[13]=F):F=e[13];let I;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateName`,children:`Name`})}),e[14]=I):I=e[14];let L=!!E.launchTemplateName,R;e[15]===w?R=e[16]:(R=w(`launchTemplateName`),e[15]=w,e[16]=R);let z;e[17]!==L||e[18]!==R?(z=(0,_.jsx)(a,{"aria-invalid":L,id:`launchTemplateName`,placeholder:`my-launch-template`,...R}),e[17]=L,e[18]=R,e[19]=z):z=e[19];let B;e[20]===E.launchTemplateName?B=e[21]:(B=(0,_.jsx)(d,{errors:[E.launchTemplateName]}),e[20]=E.launchTemplateName,e[21]=B);let V;e[22]!==z||e[23]!==B?(V=(0,_.jsxs)(p,{children:[I,z,B]}),e[22]=z,e[23]=B,e[24]=V):V=e[24];let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),e[25]=H):H=e[25];let U;e[26]===w?U=e[27]:(U=w(`versionDescription`),e[26]=w,e[27]=U);let W;e[28]===U?W=e[29]:(W=(0,_.jsxs)(p,{children:[H,(0,_.jsx)(a,{id:`versionDescription`,placeholder:`Initial version`,...U})]}),e[28]=U,e[29]=W);let G;e[30]!==S||e[31]!==E||e[32]!==w?(G=(0,_.jsx)(h,{control:S,errors:E,register:w}),e[30]=S,e[31]=E,e[32]=w,e[33]=G):G=e[33];let K=k.launchTemplateName??``,q=k.versionDescription??``,J;e[34]!==K||e[35]!==q||e[36]!==k?(J=b(K,q,s(k)),e[34]=K,e[35]=q,e[36]=k,e[37]=J):J=e[37];let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-launch-templates`})},e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==D||e[44]!==X?(Z=(0,_.jsx)(ne,{isPending:v.isPending,isSubmitting:D,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Launch Template`}),e[42]=v.isPending,e[43]=D,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==V||e[47]!==W||e[48]!==G||e[49]!==Y||e[50]!==Z||e[51]!==F?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,W,G,Y,Z]}),e[46]=V,e[47]=W,e[48]=G,e[49]=Y,e[50]=Z,e[51]=F,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==P?($=(0,_.jsxs)(_.Fragment,{children:[M,N,P,Q]}),e[53]=Q,e[54]=P,e[55]=$):$=e[55],$}function y(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function b(e,t,n){let r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-launch-template`},{type:`flag`,value:` \\ --launch-template-name`},{type:`value`,value:` ${e?y(e):``}`}];return t&&r.push({type:`flag`,value:` \\ --version-description`},{type:`value`,value:` ${y(t)}`}),r.push({type:`flag`,value:` \\ --launch-template-data`},{type:`value`,value:` ${y(JSON.stringify(n))}`}),[{label:`Create Launch Template`,parts:r}]}export{v as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-load-balancer-V0SGa9eg.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-load-balancer-V0SGa9eg.js deleted file mode 100644 index aeff24b97..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-load-balancer-V0SGa9eg.js +++ /dev/null @@ -1,21 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./useNavigate-BiiHYpLW.js";import{k as a}from"./httpRequest-Bc1WZmsd.js";import{t as te}from"./back-link-DjawJm5W.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as d}from"./cli-command-panel-DPooQRso.js";import{t as f}from"./button-Bae9vdts.js";import{t as ne}from"./input-CpcyJw4R.js";import{t as p}from"./acm-BGw6nz9A.js";import{t as re}from"./certificate-import-dialog-CGT29fMd.js";import{M as ie,O as ae,w as oe}from"./ec2-DJL24ekw.js";import{n as se}from"./elbv2-CBiYqcpA.js";import{o as ce,u as le}from"./elbv2-19pV3l7Z.js";import{t as ue}from"./page-heading-M0NyqAmu.js";import{a as m,i as de,n as h,t as fe}from"./zod-VwMMRSfy.js";import{t as pe}from"./error-banner-BcDqaPk7.js";import{t as me}from"./form-actions-C3zG6ld2.js";import{r as g,s as _,t as v}from"./field-ChkDR_wL.js";import{t as he}from"./tags-field-array-B4zgmLw4.js";import{t as y}from"./target-group-form-DZJOr6m0.js";import{a as b,c as x,o as ge,r as _e,s as ve,t as ye}from"./elbv2-D92OK4oO.js";var S=r(),be=t(n(),1),C=e();function w(e){let t=a(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function xe(e){let t=a(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function Se(e){return e===`TLS`||e===`TCP`?`TCP`:e===`UDP`?`UDP`:e===`TCP_UDP`?`TCP_UDP`:`HTTP`}function Ce(e){let t=new Map;for(let n of e){let e=n.AvailabilityZone??`unknown`,r=t.get(e)??[];r.push(n),t.set(e,r)}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({az:e,subnets:t}))}function T(){let e=(0,S.c)(243),t=ee(),{data:n}=i(ie),{data:r}=i(ae),{data:a}=i(oe),{data:s}=i(le),{data:w}=i(p),{data:T}=i(ce),k=se(),[A,Ae]=(0,be.useState)(null),[je,Me]=(0,be.useState)(!1),Ne;e[0]===n.Vpcs?Ne=e[1]:(Ne=n.Vpcs??[],e[0]=n.Vpcs,e[1]=Ne);let j=Ne,Pe;e[2]===r.Subnets?Pe=e[3]:(Pe=r.Subnets??[],e[2]=r.Subnets,e[3]=Pe);let Fe=Pe,Ie;e[4]===a.SecurityGroups?Ie=e[5]:(Ie=a.SecurityGroups??[],e[4]=a.SecurityGroups,e[5]=Ie);let Le=Ie,Re;e[6]===s.TargetGroups?Re=e[7]:(Re=s.TargetGroups??[],e[6]=s.TargetGroups,e[7]=Re);let ze=Re,Be;e[8]===w.CertificateSummaryList?Be=e[9]:(Be=w.CertificateSummaryList??[],e[8]=w.CertificateSummaryList,e[9]=Be);let Ve=Be,He;e[10]===T.SslPolicies?He=e[11]:(He=T.SslPolicies??[],e[10]=T.SslPolicies,e[11]=He);let Ue=He,We;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(We=fe(_e),e[12]=We):We=e[12];let Ge=j[0]?.VpcId??``,Ke,qe,Je,Ye;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(Je=[],Ye=[],Ke=[],qe={protocol:`HTTP`,port:80,targetGroupMode:`new`,existingTargetGroupArn:``,certificateArn:void 0,sslPolicy:void 0},e[13]=Ke,e[14]=qe,e[15]=Je,e[16]=Ye):(Ke=e[13],qe=e[14],Je=e[15],Ye=e[16]);let Xe;e[17]===Ge?Xe=e[18]:(Xe={resolver:We,defaultValues:{name:``,type:`application`,scheme:`internet-facing`,vpcId:Ge,subnetIds:Je,securityGroupIds:Ye,tags:Ke,listener:qe}},e[17]=Ge,e[18]=Xe);let Ze=de(Xe),Qe;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=fe(b),e[19]=Qe):Qe=e[19];let $e=j[0]?.VpcId??``,et,tt;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(et={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tt=[],e[20]=et,e[21]=tt):(et=e[20],tt=e[21]);let nt;e[22]===$e?nt=e[23]:(nt={resolver:Qe,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:$e,healthCheck:et,tags:tt}},e[22]=$e,e[23]=nt);let M=de(nt),{handleSubmit:rt,register:N,watch:it,control:P,setValue:F,getValues:I,formState:at}=Ze,{errors:L,isSubmitting:ot}=at,st;e[24]===P?st=e[25]:(st={control:P,name:`vpcId`},e[24]=P,e[25]=st);let R=m(st),ct;e[26]===P?ct=e[27]:(ct={control:P,name:`subnetIds`},e[26]=P,e[27]=ct);let lt=m(ct),ut;e[28]===P?ut=e[29]:(ut={control:P,name:`securityGroupIds`},e[28]=P,e[29]=ut);let dt=m(ut),ft;e[30]===lt?ft=e[31]:(ft=new Set(lt),e[30]=lt,e[31]=ft);let pt=ft,mt;e[32]===dt?mt=e[33]:(mt=new Set(dt),e[32]=dt,e[33]=mt);let ht=mt,gt;e[34]===P?gt=e[35]:(gt={control:P,name:`type`},e[34]=P,e[35]=gt);let _t=m(gt),vt;e[36]===P?vt=e[37]:(vt={control:P,name:`listener.protocol`},e[36]=P,e[37]=vt);let z=m(vt),yt;e[38]===P?yt=e[39]:(yt={control:P,name:`listener.targetGroupMode`},e[38]=P,e[39]=yt);let B=m(yt),bt=_t===`network`,xt;e[40]===z?xt=e[41]:(xt=ve(z),e[40]=z,e[41]=xt);let St=xt,Ct;e[42]===_t?Ct=e[43]:(Ct=x(_t),e[42]=_t,e[43]=Ct);let wt=Ct,Tt;e[44]===bt?Tt=e[45]:(Tt=bt?[`TCP`,`UDP`,`TLS`,`TCP_UDP`]:[`HTTP`,`HTTPS`],e[44]=bt,e[45]=Tt);let Et=Tt,Dt,Ot,V,H,U,W,G,K,kt,q,J,Y,X,Z;if(e[46]!==Le||e[47]!==Fe||e[48]!==ze||e[49]!==P||e[50]!==L.name||e[51]!==L.subnetIds||e[52]!==L.vpcId||e[53]!==I||e[54]!==rt||e[55]!==bt||e[56]!==t||e[57]!==N||e[58]!==ht||e[59]!==pt||e[60]!==R||e[61]!==F||e[62]!==M||e[63]!==j||e[64]!==k||e[65]!==A){let n;e[80]===R?n=e[81]:(n=e=>e.VpcId===R,e[80]=R,e[81]=n);let r=Fe.filter(n),i;e[82]===R?i=e[83]:(i=e=>e.VpcId===R,e[82]=R,e[83]=i);let ee=Le.filter(i),a;if(e[84]!==ze||e[85]!==R){let t;e[87]===R?t=e[88]:(t=e=>e.VpcId===R,e[87]=R,e[88]=t),a=ze.filter(t),e[84]=ze,e[85]=R,e[86]=a}else a=e[86];Z=a;let s;e[89]===M?s=e[90]:(s=e=>{let t=Se(e);M.setValue(`protocol`,t),M.setValue(`healthCheck.protocol`,t===`HTTP`?`HTTP`:`TCP`)},e[89]=M,e[90]=s);let d=s,f;e[91]!==F||e[92]!==d?(f=e=>{F(`type`,e);let t=ge(e);F(`listener.protocol`,t),F(`listener.port`,80),F(`listener.certificateArn`,void 0),F(`listener.sslPolicy`,void 0),e===`network`&&F(`securityGroupIds`,[]),d(t)},e[91]=F,e[92]=d,e[93]=f):f=e[93];let p=f,re;e[94]!==I||e[95]!==F||e[96]!==d?(re=e=>{F(`listener.protocol`,e);let t=I(`listener.port`);ve(e)?(t===80&&F(`listener.port`,443),e===`HTTPS`&&!I(`listener.sslPolicy`)&&F(`listener.sslPolicy`,ye)):(t===443&&F(`listener.port`,80),F(`listener.certificateArn`,void 0),F(`listener.sslPolicy`,void 0)),d(e)},e[94]=I,e[95]=F,e[96]=d,e[97]=re):re=e[97],Dt=re;let ie;e[98]!==F||e[99]!==M?(ie=e=>{let t=(e===void 0?``:e)??``;F(`vpcId`,t,{shouldValidate:!0}),F(`subnetIds`,[],{shouldValidate:!0}),F(`securityGroupIds`,[]),F(`listener.existingTargetGroupArn`,``),M.setValue(`vpcId`,t)},e[98]=F,e[99]=M,e[100]=ie):ie=e[100];let ae=ie,oe;e[101]!==I||e[102]!==F?(oe=e=>{let t=I(`subnetIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];F(`subnetIds`,n,{shouldValidate:!0})},e[101]=I,e[102]=F,e[103]=oe):oe=e[103];let se=oe,ce;e[104]!==I||e[105]!==F?(ce=e=>{let t=I(`securityGroupIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];F(`securityGroupIds`,n)},e[104]=I,e[105]=F,e[106]=ce):ce=e[106];let le=ce,m;e[107]!==t||e[108]!==M||e[109]!==k?(m=async e=>{Ae(null);let n;if(e.listener.targetGroupMode===`new`){if(!await M.trigger())return;n=M.getValues()}let r=await k.mutateAsync({lb:{name:e.name,type:e.type,scheme:e.scheme,vpcId:e.vpcId,subnetIds:e.subnetIds,securityGroupIds:e.securityGroupIds,tags:e.tags},listener:{protocol:e.listener.protocol,port:e.listener.port,targetGroupMode:e.listener.targetGroupMode,existingTargetGroupArn:e.listener.existingTargetGroupArn,certificateArn:e.listener.certificateArn,sslPolicy:e.listener.sslPolicy,newTargetGroup:n}});Ae(r),!r.error&&r.loadBalancerArn&&t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r.loadBalancerArn)}})},e[107]=t,e[108]=M,e[109]=k,e[110]=m):m=e[110];let de=m,fe=Ce(r);e[111]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,C.jsx)(te,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),J=(0,C.jsx)(ue,{title:`Create Load Balancer`}),e[111]=q,e[112]=J):(q=e[111],J=e[112]),e[113]===k.error?Y=e[114]:(Y=k.error&&(0,C.jsx)(pe,{error:k.error,msg:`Failed to create load balancer`}),e[113]=k.error,e[114]=Y),e[115]===A?X=e[116]:(X=A?.error&&(0,C.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,C.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,A.failedStep]}),(0,C.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:A.error.message}),A.created.length>0&&(0,C.jsxs)(`div`,{className:`mt-3`,children:[(0,C.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources (clean up manually if needed):`}),(0,C.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:A.created.map(Oe)})]})]}),e[115]=A,e[116]=X),Ot=`max-w-4xl space-y-6`,e[117]!==rt||e[118]!==de?(V=rt(de),e[117]=rt,e[118]=de,e[119]=V):V=e[119];let me;e[120]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`lb-name`,children:`Name`})}),e[120]=me):me=e[120];let he=!!L.name,y;e[121]===N?y=e[122]:(y=N(`name`),e[121]=N,e[122]=y);let b;e[123]!==he||e[124]!==y?(b=(0,C.jsx)(ne,{"aria-invalid":he,id:`lb-name`,placeholder:`my-load-balancer`,...y}),e[123]=he,e[124]=y,e[125]=b):b=e[125];let x;e[126]===L.name?x=e[127]:(x=(0,C.jsx)(g,{errors:[L.name]}),e[126]=L.name,e[127]=x),e[128]!==b||e[129]!==x?(H=(0,C.jsxs)(v,{children:[me,b,x]}),e[128]=b,e[129]=x,e[130]=H):H=e[130];let _e;e[131]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,C.jsx)(_,{children:`Type`}),e[131]=_e):_e=e[131];let S;e[132]===p?S=e[133]:(S=e=>{let{field:t}=e;return(0,C.jsxs)(`div`,{className:`flex gap-4`,children:[(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Application Load Balancer`,checked:t.value===`application`,name:`lb-type`,onChange:()=>{p(`application`)},type:`radio`}),`Application (ALB)`]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Network Load Balancer`,checked:t.value===`network`,name:`lb-type`,onChange:()=>{p(`network`)},type:`radio`}),`Network (NLB)`]})]})},e[132]=p,e[133]=S),e[134]!==P||e[135]!==S?(U=(0,C.jsxs)(v,{children:[_e,(0,C.jsx)(h,{control:P,name:`type`,render:S})]}),e[134]=P,e[135]=S,e[136]=U):U=e[136];let be;e[137]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,C.jsx)(_,{children:`Scheme`}),e[137]=be):be=e[137],e[138]===P?W=e[139]:(W=(0,C.jsxs)(v,{children:[be,(0,C.jsx)(h,{control:P,name:`scheme`,render:De})]}),e[138]=P,e[139]=W);let w;e[140]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`lb-vpc`,children:`VPC`})}),e[140]=w):w=e[140];let T;e[141]!==L.vpcId||e[142]!==ae||e[143]!==j?(T=e=>{let{field:t}=e;return(0,C.jsxs)(u,{onValueChange:e=>{ae(e)},value:t.value??``,children:[(0,C.jsx)(l,{"aria-invalid":!!L.vpcId,className:`w-full`,id:`lb-vpc`,children:(0,C.jsx)(o,{placeholder:`Select VPC`})}),(0,C.jsx)(c,{children:j.map(Ee)})]})},e[141]=L.vpcId,e[142]=ae,e[143]=j,e[144]=T):T=e[144];let E;e[145]!==P||e[146]!==T?(E=(0,C.jsx)(h,{control:P,name:`vpcId`,render:T}),e[145]=P,e[146]=T,e[147]=E):E=e[147];let D;e[148]===L.vpcId?D=e[149]:(D=(0,C.jsx)(g,{errors:[L.vpcId]}),e[148]=L.vpcId,e[149]=D),e[150]!==E||e[151]!==D?(G=(0,C.jsxs)(v,{children:[w,E,D]}),e[150]=E,e[151]=D,e[152]=G):G=e[152];let we;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,C.jsx)(_,{children:`Subnets (select at least 1)`}),e[153]=we):we=e[153];let Te=fe.length===0?(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,C.jsx)(`div`,{className:`space-y-3`,children:fe.map(e=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.az}),(0,C.jsx)(`div`,{className:`space-y-1`,children:e.subnets.map(e=>(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Subnet ${xe(e)}`,checked:pt.has(e.SubnetId??``),onChange:()=>{se(e.SubnetId??``)},type:`checkbox`}),(0,C.jsx)(`span`,{className:`font-mono`,children:xe(e)})]},e.SubnetId))})]},e.az))}),O;e[154]===L.subnetIds?O=e[155]:(O=(0,C.jsx)(g,{errors:[L.subnetIds]}),e[154]=L.subnetIds,e[155]=O),e[156]!==Te||e[157]!==O?(K=(0,C.jsxs)(v,{children:[we,Te,O]}),e[156]=Te,e[157]=O,e[158]=K):K=e[158],kt=!bt&&(0,C.jsxs)(v,{children:[(0,C.jsx)(_,{children:`Security groups`}),ee.length===0?(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the selected VPC.`}):(0,C.jsx)(`div`,{className:`space-y-1`,children:ee.map(e=>(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:ht.has(e.GroupId??``),onChange:()=>{le(e.GroupId??``)},type:`checkbox`}),(0,C.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),e[46]=Le,e[47]=Fe,e[48]=ze,e[49]=P,e[50]=L.name,e[51]=L.subnetIds,e[52]=L.vpcId,e[53]=I,e[54]=rt,e[55]=bt,e[56]=t,e[57]=N,e[58]=ht,e[59]=pt,e[60]=R,e[61]=F,e[62]=M,e[63]=j,e[64]=k,e[65]=A,e[66]=Dt,e[67]=Ot,e[68]=V,e[69]=H,e[70]=U,e[71]=W,e[72]=G,e[73]=K,e[74]=kt,e[75]=q,e[76]=J,e[77]=Y,e[78]=X,e[79]=Z}else Dt=e[66],Ot=e[67],V=e[68],H=e[69],U=e[70],W=e[71],G=e[72],K=e[73],kt=e[74],q=e[75],J=e[76],Y=e[77],X=e[78],Z=e[79];let At;e[159]===P?At=e[160]:(At=(0,C.jsx)(he,{control:P,name:`tags`}),e[159]=P,e[160]=At);let jt;e[161]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,C.jsx)(`h2`,{className:`text-sm font-semibold`,children:`First listener & default target group`}),e[161]=jt):jt=e[161];let Mt;e[162]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),e[162]=Mt):Mt=e[162];let Nt;e[163]!==Dt||e[164]!==wt?(Nt=e=>{let{field:t}=e;return(0,C.jsxs)(u,{onValueChange:e=>{e&&Dt(e)},value:t.value,children:[(0,C.jsx)(l,{className:`w-full`,id:`listener-protocol`,children:(0,C.jsx)(o,{})}),(0,C.jsx)(c,{children:wt.map(O)})]})},e[163]=Dt,e[164]=wt,e[165]=Nt):Nt=e[165];let Pt;e[166]!==P||e[167]!==Nt?(Pt=(0,C.jsxs)(v,{children:[Mt,(0,C.jsx)(h,{control:P,name:`listener.protocol`,render:Nt})]}),e[166]=P,e[167]=Nt,e[168]=Pt):Pt=e[168];let Ft;e[169]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),e[169]=Ft):Ft=e[169];let It=!!L.listener?.port,Lt;e[170]===N?Lt=e[171]:(Lt=N(`listener.port`,{valueAsNumber:!0}),e[170]=N,e[171]=Lt);let Rt;e[172]!==It||e[173]!==Lt?(Rt=(0,C.jsx)(ne,{"aria-invalid":It,id:`listener-port`,inputMode:`numeric`,type:`number`,...Lt}),e[172]=It,e[173]=Lt,e[174]=Rt):Rt=e[174];let zt=L.listener?.port,Bt;e[175]===zt?Bt=e[176]:(Bt=(0,C.jsx)(g,{errors:[zt]}),e[175]=zt,e[176]=Bt);let Vt;e[177]!==Rt||e[178]!==Bt?(Vt=(0,C.jsxs)(v,{children:[Ft,Rt,Bt]}),e[177]=Rt,e[178]=Bt,e[179]=Vt):Vt=e[179];let Q;e[180]!==Ve||e[181]!==P||e[182]!==L.listener?.certificateArn||e[183]!==St||e[184]!==z||e[185]!==Ue?(Q=St&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(v,{children:[(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,C.jsx)(h,{control:P,name:`listener.certificateArn`,render:e=>{let{field:t}=e;return(0,C.jsxs)(u,{onValueChange:t.onChange,value:t.value??``,children:[(0,C.jsx)(l,{"aria-invalid":!!L.listener?.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,C.jsx)(o,{placeholder:`Select certificate`})}),(0,C.jsx)(c,{children:Ve.map(Te)})]})}}),(0,C.jsx)(g,{errors:[L.listener?.certificateArn]}),(0,C.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[Ve.length===0&&(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,C.jsx)(f,{className:`ml-auto`,onClick:()=>{Me(!0)},size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),z===`HTTPS`&&(0,C.jsxs)(v,{children:[(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,C.jsx)(h,{control:P,name:`listener.sslPolicy`,render:e=>{let{field:t}=e;return(0,C.jsxs)(u,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,C.jsx)(l,{className:`w-full`,id:`listener-ssl-policy`,children:(0,C.jsx)(o,{})}),(0,C.jsx)(c,{children:Ue.map(we)})]})}})]})]}),e[180]=Ve,e[181]=P,e[182]=L.listener?.certificateArn,e[183]=St,e[184]=z,e[185]=Ue,e[186]=Q):Q=e[186];let Ht;e[187]===Symbol.for(`react.memo_cache_sentinel`)?(Ht=(0,C.jsx)(_,{children:`Default target group`}),e[187]=Ht):Ht=e[187];let Ut;e[188]===P?Ut=e[189]:(Ut=(0,C.jsxs)(v,{children:[Ht,(0,C.jsx)(h,{control:P,name:`listener.targetGroupMode`,render:D})]}),e[188]=P,e[189]=Ut);let Wt;e[190]!==P||e[191]!==L.listener?.existingTargetGroupArn||e[192]!==B||e[193]!==Z?(Wt=B===`existing`&&(0,C.jsxs)(v,{children:[(0,C.jsx)(_,{children:(0,C.jsx)(`label`,{htmlFor:`tg-existing`,children:`Target group`})}),(0,C.jsx)(h,{control:P,name:`listener.existingTargetGroupArn`,render:e=>{let{field:t}=e;return(0,C.jsxs)(u,{onValueChange:t.onChange,value:t.value??``,children:[(0,C.jsx)(l,{"aria-invalid":!!L.listener?.existingTargetGroupArn,className:`w-full`,id:`tg-existing`,children:(0,C.jsx)(o,{placeholder:`Select target group`})}),(0,C.jsx)(c,{children:Z.map(E)})]})}}),(0,C.jsx)(g,{errors:[L.listener?.existingTargetGroupArn]}),Z.length===0&&(0,C.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups in this VPC. Choose “Create new” instead.`})]}),e[190]=P,e[191]=L.listener?.existingTargetGroupArn,e[192]=B,e[193]=Z,e[194]=Wt):Wt=e[194];let Gt;e[195]!==Et||e[196]!==M||e[197]!==B||e[198]!==j?(Gt=B===`new`&&(0,C.jsx)(`div`,{className:`space-y-4 border-l-2 border-muted pl-4`,children:(0,C.jsx)(y,{allowedProtocols:Et,form:M,vpcs:j})}),e[195]=Et,e[196]=M,e[197]=B,e[198]=j,e[199]=Gt):Gt=e[199];let Kt;e[200]!==Pt||e[201]!==Vt||e[202]!==Q||e[203]!==Ut||e[204]!==Wt||e[205]!==Gt?(Kt=(0,C.jsxs)(`div`,{className:`space-y-4 rounded-md border bg-card p-4`,children:[jt,Pt,Vt,Q,Ut,Wt,Gt]}),e[200]=Pt,e[201]=Vt,e[202]=Q,e[203]=Ut,e[204]=Wt,e[205]=Gt,e[206]=Kt):Kt=e[206];let qt;e[207]===F?qt=e[208]:(qt=e=>{F(`listener.certificateArn`,e,{shouldValidate:!0})},e[207]=F,e[208]=qt);let Jt;e[209]!==je||e[210]!==qt?(Jt=(0,C.jsx)(re,{onImported:qt,onOpenChange:Me,open:je}),e[209]=je,e[210]=qt,e[211]=Jt):Jt=e[211];let Yt;e[212]!==M.watch||e[213]!==it?(Yt=ke(it,M.watch),e[212]=M.watch,e[213]=it,e[214]=Yt):Yt=e[214];let Xt;e[215]===Yt?Xt=e[216]:(Xt=(0,C.jsx)(d,{commands:Yt}),e[215]=Yt,e[216]=Xt);let Zt;e[217]===t?Zt=e[218]:(Zt=async()=>{await t({to:`/ec2/describe-load-balancers`})},e[217]=t,e[218]=Zt);let $;e[219]!==ot||e[220]!==Zt||e[221]!==k.isPending?($=(0,C.jsx)(me,{isPending:k.isPending,isSubmitting:ot,onCancel:Zt,pendingLabel:`Creating…`,submitLabel:`Create Load Balancer`}),e[219]=ot,e[220]=Zt,e[221]=k.isPending,e[222]=$):$=e[222];let Qt;e[223]!==Ot||e[224]!==V||e[225]!==H||e[226]!==U||e[227]!==W||e[228]!==G||e[229]!==K||e[230]!==kt||e[231]!==At||e[232]!==Kt||e[233]!==Jt||e[234]!==Xt||e[235]!==$?(Qt=(0,C.jsxs)(`form`,{className:Ot,onSubmit:V,children:[H,U,W,G,K,kt,At,Kt,Jt,Xt,$]}),e[223]=Ot,e[224]=V,e[225]=H,e[226]=U,e[227]=W,e[228]=G,e[229]=K,e[230]=kt,e[231]=At,e[232]=Kt,e[233]=Jt,e[234]=Xt,e[235]=$,e[236]=Qt):Qt=e[236];let $t;return e[237]!==q||e[238]!==J||e[239]!==Y||e[240]!==X||e[241]!==Qt?($t=(0,C.jsxs)(C.Fragment,{children:[q,J,Y,X,Qt]}),e[237]=q,e[238]=J,e[239]=Y,e[240]=X,e[241]=Qt,e[242]=$t):$t=e[242],$t}function E(e){return(0,C.jsxs)(s,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function D(e){let{field:t}=e;return(0,C.jsxs)(`div`,{className:`flex gap-4`,children:[(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Create new target group`,checked:t.value===`new`,name:`tg-mode`,onChange:()=>{t.onChange(`new`)},type:`radio`}),`Create new`]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Use existing target group`,checked:t.value===`existing`,name:`tg-mode`,onChange:()=>{t.onChange(`existing`)},type:`radio`}),`Use existing`]})]})}function we(e){return(0,C.jsx)(s,{value:e.Name??``,children:e.Name},e.Name)}function Te(e){return(0,C.jsx)(s,{value:e.CertificateArn??``,children:e.DomainName??e.CertificateArn?.split(`/`).pop()},e.CertificateArn)}function O(e){return(0,C.jsx)(s,{value:e,children:e},e)}function Ee(e){return(0,C.jsx)(s,{value:e.VpcId??``,children:w(e)},e.VpcId)}function De(e){let{field:t}=e;return(0,C.jsxs)(`div`,{className:`flex gap-4`,children:[(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Internet-facing`,checked:t.value===`internet-facing`,name:`scheme`,onChange:()=>{t.onChange(`internet-facing`)},type:`radio`}),`Internet-facing`]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,C.jsx)(`input`,{"aria-label":`Internal`,checked:t.value===`internal`,name:`scheme`,onChange:()=>{t.onChange(`internal`)},type:`radio`}),`Internal`]})]})}function Oe(e,t){return(0,C.jsxs)(`li`,{children:[e.type,`: `,e.id??`(created)`]},t)}function ke(e,t){let n=e(`name`)||``,r=e(`type`)||`application`,i=e(`scheme`)||`internet-facing`,ee=e(`subnetIds`),a=e(`securityGroupIds`),te=e(`listener.protocol`)||`HTTP`,o=e(`listener.port`)??80,s=e(`listener.certificateArn`),c=e(`listener.sslPolicy`),l=e(`listener.targetGroupMode`),u=e(`listener.existingTargetGroupArn`),d=[],f={type:`comment`,value:r===`network`?`# Create NLB with listener and default target group - -`:`# Create ALB with listener and default target group - -`};if(l===`new`){let e=t(`name`)||``,n=t(`port`)??80,r=t(`vpcId`),i=t(`protocol`)||`HTTP`;d.push({label:`Create Target Group`,parts:[f,{type:`variable`,value:`TG_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ - --name`},{type:`value`,value:` ${e}`},{type:`flag`,value:` \\ - --protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` --port`},{type:`value`,value:` ${n}`},{type:`flag`,value:` \\ - --target-type instance --vpc-id`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'TargetGroups[0].TargetGroupArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]})}else d.push({label:`Use Existing Target Group`,parts:[f,{type:`variable`,value:`TG_ARN=`},{type:`value`,value:u||``}]});let ne=[{type:`variable`,value:`LB_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-load-balancer`},{type:`flag`,value:` \\ - --name`},{type:`value`,value:` ${n}`},{type:`flag`,value:` \\ - --scheme`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\ - --type`},{type:`value`,value:` ${r}`}];ee.length>0&&ne.push({type:`flag`,value:` \\ - --subnets`},{type:`value`,value:` ${ee.join(` `)}`}),a.length>0&&ne.push({type:`flag`,value:` \\ - --security-groups`},{type:`value`,value:` ${a.join(` `)}`}),ne.push({type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'LoadBalancers[0].LoadBalancerArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}),d.push({label:`Create Load Balancer`,parts:ne});let p=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-listener`},{type:`flag`,value:` \\ - --load-balancer-arn`},{type:`variable`,value:` "$LB_ARN"`},{type:`flag`,value:` \\ - --protocol`},{type:`value`,value:` ${te}`},{type:`flag`,value:` \\ - --port`},{type:`value`,value:` ${o}`}];return(te===`HTTPS`||te===`TLS`)&&s&&(p.push({type:`flag`,value:` \\ - --certificates`},{type:`value`,value:` CertificateArn=${s}`}),te===`HTTPS`&&c&&p.push({type:`flag`,value:` \\ - --ssl-policy`},{type:`value`,value:` ${c}`})),p.push({type:`flag`,value:` \\ - --default-actions`},{type:`value`,value:` Type=forward,TargetGroupArn="$TG_ARN"`}),d.push({label:`Create Listener`,parts:p}),d}var k=T;export{k as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-load-balancer-W6nchY7J.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-load-balancer-W6nchY7J.js new file mode 100644 index 000000000..21790c312 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-load-balancer-W6nchY7J.js @@ -0,0 +1,21 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./useNavigate-BiiHYpLW.js";import{M as te,k as a}from"./httpRequest-Bc1WZmsd.js";import{t as ne}from"./back-link-DjawJm5W.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as d}from"./cli-command-panel-DPooQRso.js";import{t as f}from"./button-Bae9vdts.js";import{t as re}from"./input-CpcyJw4R.js";import{t as ie}from"./acm-BGw6nz9A.js";import{n as ae,r as oe}from"./listener-form-y_owZS3C.js";import{M as se,O as ce,w as le}from"./ec2-DJL24ekw.js";import{n as ue}from"./elbv2-CBiYqcpA.js";import{o as de,u as fe}from"./elbv2-19pV3l7Z.js";import{t as pe}from"./page-heading-M0NyqAmu.js";import{a as p,i as me,n as m,t as he}from"./zod-VwMMRSfy.js";import{t as ge}from"./error-banner-BcDqaPk7.js";import{t as _e}from"./form-actions-C3zG6ld2.js";import{r as h,s as g,t as _}from"./field-ChkDR_wL.js";import{t as ve}from"./tags-field-array-B4zgmLw4.js";import{a as v,c as y,o as ye,r as b,s as be}from"./elbv2-B_G5anft.js";import{t as x}from"./target-group-form-DZJOr6m0.js";var xe=r(),Se=t(n(),1),S=e();function C(e){let t=a(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function Ce(e){let t=a(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function we(e){return e===`TLS`||e===`TCP`?`TCP`:e===`UDP`?`UDP`:e===`TCP_UDP`?`TCP_UDP`:`HTTP`}function Te(e){let t=new Map;for(let n of e){let e=n.AvailabilityZone??`unknown`,r=t.get(e)??[];r.push(n),t.set(e,r)}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({az:e,subnets:t}))}function w(){let e=(0,xe.c)(243),t=ee(),{data:n}=i(se),{data:r}=i(ce),{data:a}=i(le),{data:s}=i(fe),{data:C}=i(ie),{data:w}=i(de),D=ue(),[O,Ne]=(0,Se.useState)(null),[Pe,Fe]=(0,Se.useState)(!1),Ie;e[0]===n.Vpcs?Ie=e[1]:(Ie=n.Vpcs??[],e[0]=n.Vpcs,e[1]=Ie);let k=Ie,Le;e[2]===r.Subnets?Le=e[3]:(Le=r.Subnets??[],e[2]=r.Subnets,e[3]=Le);let Re=Le,ze;e[4]===a.SecurityGroups?ze=e[5]:(ze=a.SecurityGroups??[],e[4]=a.SecurityGroups,e[5]=ze);let Be=ze,Ve;e[6]===s.TargetGroups?Ve=e[7]:(Ve=s.TargetGroups??[],e[6]=s.TargetGroups,e[7]=Ve);let He=Ve,Ue;e[8]===C.CertificateSummaryList?Ue=e[9]:(Ue=C.CertificateSummaryList??[],e[8]=C.CertificateSummaryList,e[9]=Ue);let We=Ue,Ge;e[10]===w.SslPolicies?Ge=e[11]:(Ge=w.SslPolicies??[],e[10]=w.SslPolicies,e[11]=Ge);let Ke=Ge,qe;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(qe=he(b),e[12]=qe):qe=e[12];let Je=k[0]?.VpcId??``,Ye,Xe,Ze,Qe;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=[],Qe=[],Ye=[],Xe={protocol:`HTTP`,port:80,targetGroupMode:`new`,existingTargetGroupArn:``,certificateArn:void 0,sslPolicy:void 0},e[13]=Ye,e[14]=Xe,e[15]=Ze,e[16]=Qe):(Ye=e[13],Xe=e[14],Ze=e[15],Qe=e[16]);let $e;e[17]===Je?$e=e[18]:($e={resolver:qe,defaultValues:{name:``,type:`application`,scheme:`internet-facing`,vpcId:Je,subnetIds:Ze,securityGroupIds:Qe,tags:Ye,listener:Xe}},e[17]=Je,e[18]=$e);let et=me($e),tt;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(tt=he(v),e[19]=tt):tt=e[19];let nt=k[0]?.VpcId??``,rt,it;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(rt={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},it=[],e[20]=rt,e[21]=it):(rt=e[20],it=e[21]);let at;e[22]===nt?at=e[23]:(at={resolver:tt,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:nt,healthCheck:rt,tags:it}},e[22]=nt,e[23]=at);let A=me(at),{handleSubmit:ot,register:j,watch:st,control:M,setValue:N,getValues:P,formState:ct}=et,{errors:F,isSubmitting:lt}=ct,ut;e[24]===M?ut=e[25]:(ut={control:M,name:`vpcId`},e[24]=M,e[25]=ut);let I=p(ut),dt;e[26]===M?dt=e[27]:(dt={control:M,name:`subnetIds`},e[26]=M,e[27]=dt);let ft=p(dt),pt;e[28]===M?pt=e[29]:(pt={control:M,name:`securityGroupIds`},e[28]=M,e[29]=pt);let mt=p(pt),ht;e[30]===ft?ht=e[31]:(ht=new Set(ft),e[30]=ft,e[31]=ht);let gt=ht,_t;e[32]===mt?_t=e[33]:(_t=new Set(mt),e[32]=mt,e[33]=_t);let vt=_t,yt;e[34]===M?yt=e[35]:(yt={control:M,name:`type`},e[34]=M,e[35]=yt);let bt=p(yt),xt;e[36]===M?xt=e[37]:(xt={control:M,name:`listener.protocol`},e[36]=M,e[37]=xt);let L=p(xt),St;e[38]===M?St=e[39]:(St={control:M,name:`listener.targetGroupMode`},e[38]=M,e[39]=St);let R=p(St),z=bt===`network`,Ct;e[40]===L?Ct=e[41]:(Ct=be(L),e[40]=L,e[41]=Ct);let wt=Ct,Tt;e[42]===bt?Tt=e[43]:(Tt=y(bt),e[42]=bt,e[43]=Tt);let Et=Tt,Dt;e[44]===z?Dt=e[45]:(Dt=z?[`TCP`,`UDP`,`TLS`,`TCP_UDP`]:[`HTTP`,`HTTPS`],e[44]=z,e[45]=Dt);let Ot=Dt,B,kt,V,H,U,W,G,K,At,q,J,Y,X,Z;if(e[46]!==Be||e[47]!==Re||e[48]!==He||e[49]!==M||e[50]!==F.name||e[51]!==F.subnetIds||e[52]!==F.vpcId||e[53]!==P||e[54]!==ot||e[55]!==z||e[56]!==t||e[57]!==j||e[58]!==vt||e[59]!==gt||e[60]!==I||e[61]!==N||e[62]!==A||e[63]!==k||e[64]!==D||e[65]!==O){let n;e[80]===I?n=e[81]:(n=e=>e.VpcId===I,e[80]=I,e[81]=n);let r=Re.filter(n),i;e[82]===I?i=e[83]:(i=e=>e.VpcId===I,e[82]=I,e[83]=i);let ee=Be.filter(i),a;if(e[84]!==He||e[85]!==I){let t;e[87]===I?t=e[88]:(t=e=>e.VpcId===I,e[87]=I,e[88]=t),a=He.filter(t),e[84]=He,e[85]=I,e[86]=a}else a=e[86];Z=a;let s;e[89]===A?s=e[90]:(s=e=>{let t=we(e);A.setValue(`protocol`,t),A.setValue(`healthCheck.protocol`,t===`HTTP`?`HTTP`:`TCP`)},e[89]=A,e[90]=s);let d=s,f;e[91]!==N||e[92]!==d?(f=e=>{N(`type`,e);let t=ye(e);N(`listener.protocol`,t),N(`listener.port`,80),N(`listener.certificateArn`,void 0),N(`listener.sslPolicy`,void 0),e===`network`&&N(`securityGroupIds`,[]),d(t)},e[91]=N,e[92]=d,e[93]=f):f=e[93];let ie=f,oe;e[94]!==P||e[95]!==N||e[96]!==d?(oe=e=>{N(`listener.protocol`,e);let t=ae(e,P(`listener`));N(`listener.port`,t.port),N(`listener.certificateArn`,t.certificateArn),N(`listener.sslPolicy`,t.sslPolicy),d(e)},e[94]=P,e[95]=N,e[96]=d,e[97]=oe):oe=e[97],B=oe;let se;e[98]!==N||e[99]!==A?(se=e=>{let t=(e===void 0?``:e)??``;N(`vpcId`,t,{shouldValidate:!0}),N(`subnetIds`,[],{shouldValidate:!0}),N(`securityGroupIds`,[]),N(`listener.existingTargetGroupArn`,``),A.setValue(`vpcId`,t)},e[98]=N,e[99]=A,e[100]=se):se=e[100];let ce=se,le;e[101]!==P||e[102]!==N?(le=e=>{let t=P(`subnetIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];N(`subnetIds`,n,{shouldValidate:!0})},e[101]=P,e[102]=N,e[103]=le):le=e[103];let ue=le,de;e[104]!==P||e[105]!==N?(de=e=>{let t=P(`securityGroupIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];N(`securityGroupIds`,n)},e[104]=P,e[105]=N,e[106]=de):de=e[106];let fe=de,p;e[107]!==t||e[108]!==A||e[109]!==D?(p=async e=>{Ne(null);let n;if(e.listener.targetGroupMode===`new`){if(!await A.trigger())return;n=A.getValues()}let r=await D.mutateAsync({lb:{name:e.name,type:e.type,scheme:e.scheme,vpcId:e.vpcId,subnetIds:e.subnetIds,securityGroupIds:e.securityGroupIds,tags:e.tags},listener:{protocol:e.listener.protocol,port:e.listener.port,targetGroupMode:e.listener.targetGroupMode,existingTargetGroupArn:e.listener.existingTargetGroupArn,certificateArn:e.listener.certificateArn,sslPolicy:e.listener.sslPolicy,newTargetGroup:n}});Ne(r),!r.error&&r.loadBalancerArn&&t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r.loadBalancerArn)}})},e[107]=t,e[108]=A,e[109]=D,e[110]=p):p=e[110];let me=p,he=Te(r);e[111]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,S.jsx)(ne,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),J=(0,S.jsx)(pe,{title:`Create Load Balancer`}),e[111]=q,e[112]=J):(q=e[111],J=e[112]),e[113]===D.error?Y=e[114]:(Y=D.error&&(0,S.jsx)(ge,{error:D.error,msg:`Failed to create load balancer`}),e[113]=D.error,e[114]=Y),e[115]===O?X=e[116]:(X=O?.error&&(0,S.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,S.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,O.failedStep]}),(0,S.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:O.error.message}),O.created.length>0&&(0,S.jsxs)(`div`,{className:`mt-3`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources (clean up manually if needed):`}),(0,S.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:O.created.map(je)})]})]}),e[115]=O,e[116]=X),kt=`max-w-4xl space-y-6`,e[117]!==ot||e[118]!==me?(V=ot(me),e[117]=ot,e[118]=me,e[119]=V):V=e[119];let _e;e[120]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`lb-name`,children:`Name`})}),e[120]=_e):_e=e[120];let ve=!!F.name,v;e[121]===j?v=e[122]:(v=j(`name`),e[121]=j,e[122]=v);let y;e[123]!==ve||e[124]!==v?(y=(0,S.jsx)(re,{"aria-invalid":ve,id:`lb-name`,placeholder:`my-load-balancer`,...v}),e[123]=ve,e[124]=v,e[125]=y):y=e[125];let b;e[126]===F.name?b=e[127]:(b=(0,S.jsx)(h,{errors:[F.name]}),e[126]=F.name,e[127]=b),e[128]!==y||e[129]!==b?(H=(0,S.jsxs)(_,{children:[_e,y,b]}),e[128]=y,e[129]=b,e[130]=H):H=e[130];let be;e[131]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,S.jsx)(g,{children:`Type`}),e[131]=be):be=e[131];let x;e[132]===ie?x=e[133]:(x=e=>{let{field:t}=e;return(0,S.jsxs)(`div`,{className:`flex gap-4`,children:[(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Application Load Balancer`,checked:t.value===`application`,name:`lb-type`,onChange:()=>{ie(`application`)},type:`radio`}),`Application (ALB)`]}),(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Network Load Balancer`,checked:t.value===`network`,name:`lb-type`,onChange:()=>{ie(`network`)},type:`radio`}),`Network (NLB)`]})]})},e[132]=ie,e[133]=x),e[134]!==M||e[135]!==x?(U=(0,S.jsxs)(_,{children:[be,(0,S.jsx)(m,{control:M,name:`type`,render:x})]}),e[134]=M,e[135]=x,e[136]=U):U=e[136];let xe;e[137]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,S.jsx)(g,{children:`Scheme`}),e[137]=xe):xe=e[137],e[138]===M?W=e[139]:(W=(0,S.jsxs)(_,{children:[xe,(0,S.jsx)(m,{control:M,name:`scheme`,render:Ae})]}),e[138]=M,e[139]=W);let Se;e[140]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`lb-vpc`,children:`VPC`})}),e[140]=Se):Se=e[140];let C;e[141]!==F.vpcId||e[142]!==ce||e[143]!==k?(C=e=>{let{field:t}=e;return(0,S.jsxs)(u,{onValueChange:e=>{ce(e)},value:t.value??``,children:[(0,S.jsx)(l,{"aria-invalid":!!F.vpcId,className:`w-full`,id:`lb-vpc`,children:(0,S.jsx)(o,{placeholder:`Select VPC`})}),(0,S.jsx)(c,{children:k.map(ke)})]})},e[141]=F.vpcId,e[142]=ce,e[143]=k,e[144]=C):C=e[144];let w;e[145]!==M||e[146]!==C?(w=(0,S.jsx)(m,{control:M,name:`vpcId`,render:C}),e[145]=M,e[146]=C,e[147]=w):w=e[147];let T;e[148]===F.vpcId?T=e[149]:(T=(0,S.jsx)(h,{errors:[F.vpcId]}),e[148]=F.vpcId,e[149]=T),e[150]!==w||e[151]!==T?(G=(0,S.jsxs)(_,{children:[Se,w,T]}),e[150]=w,e[151]=T,e[152]=G):G=e[152];let Ee;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,S.jsx)(g,{children:`Subnets (select at least 1)`}),e[153]=Ee):Ee=e[153];let De=he.length===0?(0,S.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,S.jsx)(`div`,{className:`space-y-3`,children:he.map(e=>(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.az}),(0,S.jsx)(`div`,{className:`space-y-1`,children:e.subnets.map(e=>(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Subnet ${Ce(e)}`,checked:gt.has(e.SubnetId??``),onChange:()=>{ue(e.SubnetId??``)},type:`checkbox`}),(0,S.jsx)(`span`,{className:`font-mono`,children:Ce(e)})]},e.SubnetId))})]},e.az))}),E;e[154]===F.subnetIds?E=e[155]:(E=(0,S.jsx)(h,{errors:[F.subnetIds]}),e[154]=F.subnetIds,e[155]=E),e[156]!==De||e[157]!==E?(K=(0,S.jsxs)(_,{children:[Ee,De,E]}),e[156]=De,e[157]=E,e[158]=K):K=e[158],At=!z&&(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{children:`Security groups`}),ee.length===0?(0,S.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the selected VPC.`}):(0,S.jsx)(`div`,{className:`space-y-1`,children:ee.map(e=>(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Security group ${te(e)}`,checked:vt.has(e.GroupId??``),onChange:()=>{fe(e.GroupId??``)},type:`checkbox`}),(0,S.jsx)(`span`,{className:`font-mono`,children:te(e)})]},e.GroupId))})]}),e[46]=Be,e[47]=Re,e[48]=He,e[49]=M,e[50]=F.name,e[51]=F.subnetIds,e[52]=F.vpcId,e[53]=P,e[54]=ot,e[55]=z,e[56]=t,e[57]=j,e[58]=vt,e[59]=gt,e[60]=I,e[61]=N,e[62]=A,e[63]=k,e[64]=D,e[65]=O,e[66]=B,e[67]=kt,e[68]=V,e[69]=H,e[70]=U,e[71]=W,e[72]=G,e[73]=K,e[74]=At,e[75]=q,e[76]=J,e[77]=Y,e[78]=X,e[79]=Z}else B=e[66],kt=e[67],V=e[68],H=e[69],U=e[70],W=e[71],G=e[72],K=e[73],At=e[74],q=e[75],J=e[76],Y=e[77],X=e[78],Z=e[79];let jt;e[159]===M?jt=e[160]:(jt=(0,S.jsx)(ve,{control:M,name:`tags`}),e[159]=M,e[160]=jt);let Mt;e[161]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,S.jsx)(`h2`,{className:`text-sm font-semibold`,children:`First listener & default target group`}),e[161]=Mt):Mt=e[161];let Nt;e[162]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),e[162]=Nt):Nt=e[162];let Pt;e[163]!==B||e[164]!==Et?(Pt=e=>{let{field:t}=e;return(0,S.jsxs)(u,{onValueChange:e=>{e&&B(e)},value:t.value,children:[(0,S.jsx)(l,{className:`w-full`,id:`listener-protocol`,children:(0,S.jsx)(o,{})}),(0,S.jsx)(c,{children:Et.map(Oe)})]})},e[163]=B,e[164]=Et,e[165]=Pt):Pt=e[165];let Ft;e[166]!==M||e[167]!==Pt?(Ft=(0,S.jsxs)(_,{children:[Nt,(0,S.jsx)(m,{control:M,name:`listener.protocol`,render:Pt})]}),e[166]=M,e[167]=Pt,e[168]=Ft):Ft=e[168];let It;e[169]===Symbol.for(`react.memo_cache_sentinel`)?(It=(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),e[169]=It):It=e[169];let Lt=!!F.listener?.port,Rt;e[170]===j?Rt=e[171]:(Rt=j(`listener.port`,{valueAsNumber:!0}),e[170]=j,e[171]=Rt);let zt;e[172]!==Lt||e[173]!==Rt?(zt=(0,S.jsx)(re,{"aria-invalid":Lt,id:`listener-port`,inputMode:`numeric`,type:`number`,...Rt}),e[172]=Lt,e[173]=Rt,e[174]=zt):zt=e[174];let Bt=F.listener?.port,Vt;e[175]===Bt?Vt=e[176]:(Vt=(0,S.jsx)(h,{errors:[Bt]}),e[175]=Bt,e[176]=Vt);let Q;e[177]!==zt||e[178]!==Vt?(Q=(0,S.jsxs)(_,{children:[It,zt,Vt]}),e[177]=zt,e[178]=Vt,e[179]=Q):Q=e[179];let Ht;e[180]!==We||e[181]!==M||e[182]!==F.listener?.certificateArn||e[183]!==wt||e[184]!==L||e[185]!==Ke?(Ht=wt&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,S.jsx)(m,{control:M,name:`listener.certificateArn`,render:e=>{let{field:t}=e;return(0,S.jsxs)(u,{onValueChange:t.onChange,value:t.value??``,children:[(0,S.jsx)(l,{"aria-invalid":!!F.listener?.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,S.jsx)(o,{placeholder:`Select certificate`})}),(0,S.jsx)(c,{children:We.map(E)})]})}}),(0,S.jsx)(h,{errors:[F.listener?.certificateArn]}),(0,S.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[We.length===0&&(0,S.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,S.jsx)(f,{className:`ml-auto`,onClick:()=>{Fe(!0)},size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),L===`HTTPS`&&(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,S.jsx)(m,{control:M,name:`listener.sslPolicy`,render:e=>{let{field:t}=e;return(0,S.jsxs)(u,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,S.jsx)(l,{className:`w-full`,id:`listener-ssl-policy`,children:(0,S.jsx)(o,{})}),(0,S.jsx)(c,{children:Ke.map(De)})]})}})]})]}),e[180]=We,e[181]=M,e[182]=F.listener?.certificateArn,e[183]=wt,e[184]=L,e[185]=Ke,e[186]=Ht):Ht=e[186];let Ut;e[187]===Symbol.for(`react.memo_cache_sentinel`)?(Ut=(0,S.jsx)(g,{children:`Default target group`}),e[187]=Ut):Ut=e[187];let Wt;e[188]===M?Wt=e[189]:(Wt=(0,S.jsxs)(_,{children:[Ut,(0,S.jsx)(m,{control:M,name:`listener.targetGroupMode`,render:Ee})]}),e[188]=M,e[189]=Wt);let Gt;e[190]!==M||e[191]!==F.listener?.existingTargetGroupArn||e[192]!==R||e[193]!==Z?(Gt=R===`existing`&&(0,S.jsxs)(_,{children:[(0,S.jsx)(g,{children:(0,S.jsx)(`label`,{htmlFor:`tg-existing`,children:`Target group`})}),(0,S.jsx)(m,{control:M,name:`listener.existingTargetGroupArn`,render:e=>{let{field:t}=e;return(0,S.jsxs)(u,{onValueChange:t.onChange,value:t.value??``,children:[(0,S.jsx)(l,{"aria-invalid":!!F.listener?.existingTargetGroupArn,className:`w-full`,id:`tg-existing`,children:(0,S.jsx)(o,{placeholder:`Select target group`})}),(0,S.jsx)(c,{children:Z.map(T)})]})}}),(0,S.jsx)(h,{errors:[F.listener?.existingTargetGroupArn]}),Z.length===0&&(0,S.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups in this VPC. Choose “Create new” instead.`})]}),e[190]=M,e[191]=F.listener?.existingTargetGroupArn,e[192]=R,e[193]=Z,e[194]=Gt):Gt=e[194];let Kt;e[195]!==Ot||e[196]!==A||e[197]!==R||e[198]!==k?(Kt=R===`new`&&(0,S.jsx)(`div`,{className:`space-y-4 border-l-2 border-muted pl-4`,children:(0,S.jsx)(x,{allowedProtocols:Ot,form:A,vpcs:k})}),e[195]=Ot,e[196]=A,e[197]=R,e[198]=k,e[199]=Kt):Kt=e[199];let qt;e[200]!==Ft||e[201]!==Q||e[202]!==Ht||e[203]!==Wt||e[204]!==Gt||e[205]!==Kt?(qt=(0,S.jsxs)(`div`,{className:`space-y-4 rounded-md border bg-card p-4`,children:[Mt,Ft,Q,Ht,Wt,Gt,Kt]}),e[200]=Ft,e[201]=Q,e[202]=Ht,e[203]=Wt,e[204]=Gt,e[205]=Kt,e[206]=qt):qt=e[206];let Jt;e[207]===N?Jt=e[208]:(Jt=e=>{N(`listener.certificateArn`,e,{shouldValidate:!0})},e[207]=N,e[208]=Jt);let Yt;e[209]!==Pe||e[210]!==Jt?(Yt=(0,S.jsx)(oe,{onImported:Jt,onOpenChange:Fe,open:Pe}),e[209]=Pe,e[210]=Jt,e[211]=Yt):Yt=e[211];let Xt;e[212]!==A.watch||e[213]!==st?(Xt=Me(st,A.watch),e[212]=A.watch,e[213]=st,e[214]=Xt):Xt=e[214];let Zt;e[215]===Xt?Zt=e[216]:(Zt=(0,S.jsx)(d,{commands:Xt}),e[215]=Xt,e[216]=Zt);let Qt;e[217]===t?Qt=e[218]:(Qt=async()=>{await t({to:`/ec2/describe-load-balancers`})},e[217]=t,e[218]=Qt);let $;e[219]!==lt||e[220]!==Qt||e[221]!==D.isPending?($=(0,S.jsx)(_e,{isPending:D.isPending,isSubmitting:lt,onCancel:Qt,pendingLabel:`Creating…`,submitLabel:`Create Load Balancer`}),e[219]=lt,e[220]=Qt,e[221]=D.isPending,e[222]=$):$=e[222];let $t;e[223]!==kt||e[224]!==V||e[225]!==H||e[226]!==U||e[227]!==W||e[228]!==G||e[229]!==K||e[230]!==At||e[231]!==jt||e[232]!==qt||e[233]!==Yt||e[234]!==Zt||e[235]!==$?($t=(0,S.jsxs)(`form`,{className:kt,onSubmit:V,children:[H,U,W,G,K,At,jt,qt,Yt,Zt,$]}),e[223]=kt,e[224]=V,e[225]=H,e[226]=U,e[227]=W,e[228]=G,e[229]=K,e[230]=At,e[231]=jt,e[232]=qt,e[233]=Yt,e[234]=Zt,e[235]=$,e[236]=$t):$t=e[236];let en;return e[237]!==q||e[238]!==J||e[239]!==Y||e[240]!==X||e[241]!==$t?(en=(0,S.jsxs)(S.Fragment,{children:[q,J,Y,X,$t]}),e[237]=q,e[238]=J,e[239]=Y,e[240]=X,e[241]=$t,e[242]=en):en=e[242],en}function T(e){return(0,S.jsxs)(s,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function Ee(e){let{field:t}=e;return(0,S.jsxs)(`div`,{className:`flex gap-4`,children:[(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Create new target group`,checked:t.value===`new`,name:`tg-mode`,onChange:()=>{t.onChange(`new`)},type:`radio`}),`Create new`]}),(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Use existing target group`,checked:t.value===`existing`,name:`tg-mode`,onChange:()=>{t.onChange(`existing`)},type:`radio`}),`Use existing`]})]})}function De(e){return(0,S.jsx)(s,{value:e.Name??``,children:e.Name},e.Name)}function E(e){return(0,S.jsx)(s,{value:e.CertificateArn??``,children:e.DomainName??e.CertificateArn?.split(`/`).pop()},e.CertificateArn)}function Oe(e){return(0,S.jsx)(s,{value:e,children:e},e)}function ke(e){return(0,S.jsx)(s,{value:e.VpcId??``,children:C(e)},e.VpcId)}function Ae(e){let{field:t}=e;return(0,S.jsxs)(`div`,{className:`flex gap-4`,children:[(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Internet-facing`,checked:t.value===`internet-facing`,name:`scheme`,onChange:()=>{t.onChange(`internet-facing`)},type:`radio`}),`Internet-facing`]}),(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Internal`,checked:t.value===`internal`,name:`scheme`,onChange:()=>{t.onChange(`internal`)},type:`radio`}),`Internal`]})]})}function je(e,t){return(0,S.jsxs)(`li`,{children:[e.type,`: `,e.id??`(created)`]},t)}function Me(e,t){let n=e(`name`)||``,r=e(`type`)||`application`,i=e(`scheme`)||`internet-facing`,ee=e(`subnetIds`),te=e(`securityGroupIds`),a=e(`listener.protocol`)||`HTTP`,ne=e(`listener.port`)??80,o=e(`listener.certificateArn`),s=e(`listener.sslPolicy`),c=e(`listener.targetGroupMode`),l=e(`listener.existingTargetGroupArn`),u=[],d={type:`comment`,value:r===`network`?`# Create NLB with listener and default target group + +`:`# Create ALB with listener and default target group + +`};if(c===`new`){let e=t(`name`)||``,n=t(`port`)??80,r=t(`vpcId`),i=t(`protocol`)||`HTTP`;u.push({label:`Create Target Group`,parts:[d,{type:`variable`,value:`TG_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ + --name`},{type:`value`,value:` ${e}`},{type:`flag`,value:` \\ + --protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` --port`},{type:`value`,value:` ${n}`},{type:`flag`,value:` \\ + --target-type instance --vpc-id`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'TargetGroups[0].TargetGroupArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]})}else u.push({label:`Use Existing Target Group`,parts:[d,{type:`variable`,value:`TG_ARN=`},{type:`value`,value:l||``}]});let f=[{type:`variable`,value:`LB_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-load-balancer`},{type:`flag`,value:` \\ + --name`},{type:`value`,value:` ${n}`},{type:`flag`,value:` \\ + --scheme`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\ + --type`},{type:`value`,value:` ${r}`}];ee.length>0&&f.push({type:`flag`,value:` \\ + --subnets`},{type:`value`,value:` ${ee.join(` `)}`}),te.length>0&&f.push({type:`flag`,value:` \\ + --security-groups`},{type:`value`,value:` ${te.join(` `)}`}),f.push({type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'LoadBalancers[0].LoadBalancerArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}),u.push({label:`Create Load Balancer`,parts:f});let re=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-listener`},{type:`flag`,value:` \\ + --load-balancer-arn`},{type:`variable`,value:` "$LB_ARN"`},{type:`flag`,value:` \\ + --protocol`},{type:`value`,value:` ${a}`},{type:`flag`,value:` \\ + --port`},{type:`value`,value:` ${ne}`}];return(a===`HTTPS`||a===`TLS`)&&o&&(re.push({type:`flag`,value:` \\ + --certificates`},{type:`value`,value:` CertificateArn=${o}`}),a===`HTTPS`&&s&&re.push({type:`flag`,value:` \\ + --ssl-policy`},{type:`value`,value:` ${s}`})),re.push({type:`flag`,value:` \\ + --default-actions`},{type:`value`,value:` Type=forward,TargetGroupArn="$TG_ARN"`}),u.push({label:`Create Listener`,parts:re}),u}var D=w;export{D as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-nat-gateway-CjaZ-0f9.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-nat-gateway-BizJZv4a.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-nat-gateway-CjaZ-0f9.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-nat-gateway-BizJZv4a.js index 82062da12..ec39c2dfb 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-nat-gateway-CjaZ-0f9.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-nat-gateway-BizJZv4a.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{k as a}from"./httpRequest-Bc1WZmsd.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as te}from"./cli-command-panel-DPooQRso.js";import{t as ne}from"./input-CpcyJw4R.js";import{O as re,n as ie}from"./ec2-DJL24ekw.js";import{_ as ae}from"./ec2-DFivrtZe.js";import{t as oe}from"./page-heading-M0NyqAmu.js";import{a as se,i as ce,n as le,t as ue}from"./zod-VwMMRSfy.js";import{t as de}from"./error-banner-BcDqaPk7.js";import{t as fe}from"./form-actions-C3zG6ld2.js";import{r as pe,s as d,t as f}from"./field-ChkDR_wL.js";import{l as me}from"./ec2-CmqOirWQ.js";var he=t(),p=e();function m(){let e=(0,he.c)(68),t=i(),{data:a}=n(re),{data:s}=n(ie),m=ae(),h;e[0]===a.Subnets?h=e[1]:(h=a.Subnets??[],e[0]=a.Subnets,e[1]=h);let g=h,_;e[2]===g?_=e[3]:(_=g.filter(ye),e[2]=g,e[3]=_);let xe=_,v=xe.length>0?xe:g,y;e[4]===s.Addresses?y=e[5]:(y=s.Addresses??[],e[4]=s.Addresses,e[5]=y);let b;e[6]===y?b=e[7]:(b=y.filter(ve),e[6]=y,e[7]=b);let x=b,S;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:ue(me),defaultValues:{subnetId:``,allocationId:``,name:``}},e[8]=S):S=e[8];let{control:C,handleSubmit:w,register:T,formState:Se}=ce(S),{errors:E,isSubmitting:D}=Se,O;e[9]===C?O=e[10]:(O={control:C},e[9]=C,e[10]=O);let k=se(O),A;e[11]!==m||e[12]!==t?(A=async e=>{let n=(await m.mutateAsync({subnetId:e.subnetId,allocationId:e.allocationId,name:e.name?.trim()??void 0})).NatGateway?.NatGatewayId;t(n?{to:`/ec2/describe-nat-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-nat-gateways`})},e[11]=m,e[12]=t,e[13]=A):A=e[13];let j=A,M,N;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(ee,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),N=(0,p.jsx)(oe,{title:`Create NAT Gateway`}),e[14]=M,e[15]=N):(M=e[14],N=e[15]);let P;e[16]===m.error?P=e[17]:(P=m.error&&(0,p.jsx)(de,{error:m.error,msg:`Failed to create NAT Gateway`}),e[16]=m.error,e[17]=P);let F;e[18]!==w||e[19]!==j?(F=w(j),e[18]=w,e[19]=j,e[20]=F):F=e[20];let I;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,p.jsx)(d,{children:(0,p.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[21]=I):I=e[21];let L;e[22]===T?L=e[23]:(L=T(`name`),e[22]=T,e[23]=L);let R;e[24]===L?R=e[25]:(R=(0,p.jsxs)(f,{children:[I,(0,p.jsx)(ne,{id:`name`,placeholder:`my-nat-gateway`,...L})]}),e[24]=L,e[25]=R);let z;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,p.jsx)(d,{children:(0,p.jsx)(`label`,{htmlFor:`subnetId`,children:`Public subnet`})}),e[26]=z):z=e[26];let B;e[27]!==E.subnetId||e[28]!==v?(B=e=>{let{field:t}=e;return(0,p.jsxs)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,p.jsx)(l,{"aria-invalid":!!E.subnetId,className:`w-full`,id:`subnetId`,children:(0,p.jsx)(o,{placeholder:`Select a public subnet`})}),(0,p.jsx)(c,{children:v.map(_e)})]})},e[27]=E.subnetId,e[28]=v,e[29]=B):B=e[29];let V;e[30]!==C||e[31]!==B?(V=(0,p.jsx)(le,{control:C,name:`subnetId`,render:B}),e[30]=C,e[31]=B,e[32]=V):V=e[32];let H;e[33]===E.subnetId?H=e[34]:(H=(0,p.jsx)(pe,{errors:[E.subnetId]}),e[33]=E.subnetId,e[34]=H);let U;e[35]!==V||e[36]!==H?(U=(0,p.jsxs)(f,{children:[z,V,H]}),e[35]=V,e[36]=H,e[37]=U):U=e[37];let W;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,p.jsx)(d,{children:(0,p.jsx)(`label`,{htmlFor:`allocationId`,children:`Elastic IP`})}),e[38]=W):W=e[38];let G;e[39]!==x||e[40]!==C||e[41]!==E.allocationId?(G=x.length>0?(0,p.jsx)(le,{control:C,name:`allocationId`,render:e=>{let{field:t}=e;return(0,p.jsxs)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,p.jsx)(l,{"aria-invalid":!!E.allocationId,className:`w-full`,id:`allocationId`,children:(0,p.jsx)(o,{placeholder:`Select an Elastic IP`})}),(0,p.jsx)(c,{children:x.map(ge)})]})}}):(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No available Elastic IPs.`,` `,(0,p.jsx)(r,{className:`text-primary hover:underline`,to:`/ec2/allocate-address`,children:`Allocate one`}),` `,`first.`]}),e[39]=x,e[40]=C,e[41]=E.allocationId,e[42]=G):G=e[42];let K;e[43]===E.allocationId?K=e[44]:(K=(0,p.jsx)(pe,{errors:[E.allocationId]}),e[43]=E.allocationId,e[44]=K);let q;e[45]!==G||e[46]!==K?(q=(0,p.jsxs)(f,{children:[W,G,K]}),e[45]=G,e[46]=K,e[47]=q):q=e[47];let J;e[48]===k?J=e[49]:(J=be(k),e[48]=k,e[49]=J);let Y;e[50]===J?Y=e[51]:(Y=(0,p.jsx)(te,{commands:J}),e[50]=J,e[51]=Y);let X;e[52]===t?X=e[53]:(X=async()=>{await t({to:`/ec2/describe-nat-gateways`})},e[52]=t,e[53]=X);let Z;e[54]!==m.isPending||e[55]!==D||e[56]!==X?(Z=(0,p.jsx)(fe,{isPending:m.isPending,isSubmitting:D,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create NAT Gateway`}),e[54]=m.isPending,e[55]=D,e[56]=X,e[57]=Z):Z=e[57];let Q;e[58]!==F||e[59]!==R||e[60]!==U||e[61]!==q||e[62]!==Y||e[63]!==Z?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[R,U,q,Y,Z]}),e[58]=F,e[59]=R,e[60]=U,e[61]=q,e[62]=Y,e[63]=Z,e[64]=Q):Q=e[64];let $;return e[65]!==P||e[66]!==Q?($=(0,p.jsxs)(p.Fragment,{children:[M,N,P,Q]}),e[65]=P,e[66]=Q,e[67]=$):$=e[67],$}function ge(e){return(0,p.jsx)(s,{value:e.AllocationId??``,children:`${e.AllocationId} (${e.PublicIp})`},e.AllocationId)}function _e(e){let t=a(e.Tags);return(0,p.jsx)(s,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)}function ve(e){return!e.AssociationId}function ye(e){return e.MapPublicIpOnLaunch}function be(e){let t=e.subnetId??``,n=e.allocationId??``,r=e.name??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-nat-gateway`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{k as a}from"./httpRequest-Bc1WZmsd.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as te}from"./cli-command-panel-DPooQRso.js";import{t as ne}from"./input-CpcyJw4R.js";import{O as re,n as ie}from"./ec2-DJL24ekw.js";import{_ as ae}from"./ec2-iXujaheD.js";import{t as oe}from"./page-heading-M0NyqAmu.js";import{a as se,i as ce,n as le,t as ue}from"./zod-VwMMRSfy.js";import{t as de}from"./error-banner-BcDqaPk7.js";import{t as fe}from"./form-actions-C3zG6ld2.js";import{r as pe,s as d,t as f}from"./field-ChkDR_wL.js";import{l as me}from"./ec2-Cr9GrTUU.js";var he=t(),p=e();function m(){let e=(0,he.c)(68),t=i(),{data:a}=n(re),{data:s}=n(ie),m=ae(),h;e[0]===a.Subnets?h=e[1]:(h=a.Subnets??[],e[0]=a.Subnets,e[1]=h);let g=h,_;e[2]===g?_=e[3]:(_=g.filter(ye),e[2]=g,e[3]=_);let xe=_,v=xe.length>0?xe:g,y;e[4]===s.Addresses?y=e[5]:(y=s.Addresses??[],e[4]=s.Addresses,e[5]=y);let b;e[6]===y?b=e[7]:(b=y.filter(ve),e[6]=y,e[7]=b);let x=b,S;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:ue(me),defaultValues:{subnetId:``,allocationId:``,name:``}},e[8]=S):S=e[8];let{control:C,handleSubmit:w,register:T,formState:Se}=ce(S),{errors:E,isSubmitting:D}=Se,O;e[9]===C?O=e[10]:(O={control:C},e[9]=C,e[10]=O);let k=se(O),A;e[11]!==m||e[12]!==t?(A=async e=>{let n=(await m.mutateAsync({subnetId:e.subnetId,allocationId:e.allocationId,name:e.name?.trim()??void 0})).NatGateway?.NatGatewayId;t(n?{to:`/ec2/describe-nat-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-nat-gateways`})},e[11]=m,e[12]=t,e[13]=A):A=e[13];let j=A,M,N;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(ee,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),N=(0,p.jsx)(oe,{title:`Create NAT Gateway`}),e[14]=M,e[15]=N):(M=e[14],N=e[15]);let P;e[16]===m.error?P=e[17]:(P=m.error&&(0,p.jsx)(de,{error:m.error,msg:`Failed to create NAT Gateway`}),e[16]=m.error,e[17]=P);let F;e[18]!==w||e[19]!==j?(F=w(j),e[18]=w,e[19]=j,e[20]=F):F=e[20];let I;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,p.jsx)(d,{children:(0,p.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[21]=I):I=e[21];let L;e[22]===T?L=e[23]:(L=T(`name`),e[22]=T,e[23]=L);let R;e[24]===L?R=e[25]:(R=(0,p.jsxs)(f,{children:[I,(0,p.jsx)(ne,{id:`name`,placeholder:`my-nat-gateway`,...L})]}),e[24]=L,e[25]=R);let z;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,p.jsx)(d,{children:(0,p.jsx)(`label`,{htmlFor:`subnetId`,children:`Public subnet`})}),e[26]=z):z=e[26];let B;e[27]!==E.subnetId||e[28]!==v?(B=e=>{let{field:t}=e;return(0,p.jsxs)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,p.jsx)(l,{"aria-invalid":!!E.subnetId,className:`w-full`,id:`subnetId`,children:(0,p.jsx)(o,{placeholder:`Select a public subnet`})}),(0,p.jsx)(c,{children:v.map(_e)})]})},e[27]=E.subnetId,e[28]=v,e[29]=B):B=e[29];let V;e[30]!==C||e[31]!==B?(V=(0,p.jsx)(le,{control:C,name:`subnetId`,render:B}),e[30]=C,e[31]=B,e[32]=V):V=e[32];let H;e[33]===E.subnetId?H=e[34]:(H=(0,p.jsx)(pe,{errors:[E.subnetId]}),e[33]=E.subnetId,e[34]=H);let U;e[35]!==V||e[36]!==H?(U=(0,p.jsxs)(f,{children:[z,V,H]}),e[35]=V,e[36]=H,e[37]=U):U=e[37];let W;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,p.jsx)(d,{children:(0,p.jsx)(`label`,{htmlFor:`allocationId`,children:`Elastic IP`})}),e[38]=W):W=e[38];let G;e[39]!==x||e[40]!==C||e[41]!==E.allocationId?(G=x.length>0?(0,p.jsx)(le,{control:C,name:`allocationId`,render:e=>{let{field:t}=e;return(0,p.jsxs)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,p.jsx)(l,{"aria-invalid":!!E.allocationId,className:`w-full`,id:`allocationId`,children:(0,p.jsx)(o,{placeholder:`Select an Elastic IP`})}),(0,p.jsx)(c,{children:x.map(ge)})]})}}):(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No available Elastic IPs.`,` `,(0,p.jsx)(r,{className:`text-primary hover:underline`,to:`/ec2/allocate-address`,children:`Allocate one`}),` `,`first.`]}),e[39]=x,e[40]=C,e[41]=E.allocationId,e[42]=G):G=e[42];let K;e[43]===E.allocationId?K=e[44]:(K=(0,p.jsx)(pe,{errors:[E.allocationId]}),e[43]=E.allocationId,e[44]=K);let q;e[45]!==G||e[46]!==K?(q=(0,p.jsxs)(f,{children:[W,G,K]}),e[45]=G,e[46]=K,e[47]=q):q=e[47];let J;e[48]===k?J=e[49]:(J=be(k),e[48]=k,e[49]=J);let Y;e[50]===J?Y=e[51]:(Y=(0,p.jsx)(te,{commands:J}),e[50]=J,e[51]=Y);let X;e[52]===t?X=e[53]:(X=async()=>{await t({to:`/ec2/describe-nat-gateways`})},e[52]=t,e[53]=X);let Z;e[54]!==m.isPending||e[55]!==D||e[56]!==X?(Z=(0,p.jsx)(fe,{isPending:m.isPending,isSubmitting:D,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create NAT Gateway`}),e[54]=m.isPending,e[55]=D,e[56]=X,e[57]=Z):Z=e[57];let Q;e[58]!==F||e[59]!==R||e[60]!==U||e[61]!==q||e[62]!==Y||e[63]!==Z?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[R,U,q,Y,Z]}),e[58]=F,e[59]=R,e[60]=U,e[61]=q,e[62]=Y,e[63]=Z,e[64]=Q):Q=e[64];let $;return e[65]!==P||e[66]!==Q?($=(0,p.jsxs)(p.Fragment,{children:[M,N,P,Q]}),e[65]=P,e[66]=Q,e[67]=$):$=e[67],$}function ge(e){return(0,p.jsx)(s,{value:e.AllocationId??``,children:`${e.AllocationId} (${e.PublicIp})`},e.AllocationId)}function _e(e){let t=a(e.Tags);return(0,p.jsx)(s,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)}function ve(e){return!e.AssociationId}function ye(e){return e.MapPublicIpOnLaunch}function be(e){let t=e.subnetId??``,n=e.allocationId??``,r=e.name??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-nat-gateway`},{type:`flag`,value:` \\ --subnet-id`},{type:`value`,value:` ${t||``}`},{type:`flag`,value:` \\ --allocation-id`},{type:`value`,value:` ${n||``}`}];return r.trim()&&i.push({type:`flag`,value:` \\ --tag-specifications`},{type:`value`,value:` 'ResourceType=natgateway,Tags=[{Key=Name,Value=${r.trim()}}]'`}),[{label:`Create NAT Gateway`,parts:i}]}export{m as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-placement-group-DQGuSx0N.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-placement-group-DwCGRPfh.js similarity index 96% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-placement-group-DQGuSx0N.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-placement-group-DwCGRPfh.js index e4c3d6f76..a8bef2a79 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-placement-group-DQGuSx0N.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-placement-group-DwCGRPfh.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as r,i,n as te,s as a,t as ne}from"./select-Bgl6IAYG.js";import{t as re}from"./cli-command-panel-DPooQRso.js";import{t as o}from"./input-CpcyJw4R.js";import{v as s}from"./ec2-DFivrtZe.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{a as l,i as u,n as d,t as f}from"./zod-VwMMRSfy.js";import{t as p}from"./error-banner-BcDqaPk7.js";import{t as m}from"./form-actions-C3zG6ld2.js";import{r as h,s as g,t as _}from"./field-ChkDR_wL.js";import{u as v}from"./ec2-CmqOirWQ.js";var y=t(),b=e();function x(){let e=(0,y.c)(54),t=n(),x=s(),S;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:f(v),defaultValues:{groupName:``,strategy:`spread`}},e[0]=S):S=e[0];let{control:C,handleSubmit:w,register:T,formState:E}=u(S),{errors:D,isSubmitting:O}=E,k;e[1]===C?k=e[2]:(k={control:C},e[1]=C,e[2]=k);let A=l(k),j;e[3]!==x||e[4]!==t?(j=async e=>{let n=await x.mutateAsync(e);t({to:`/ec2/describe-placement-groups/$id`,params:{id:n.PlacementGroup?.GroupId??``}})},e[3]=x,e[4]=t,e[5]=j):j=e[5];let M=j,N,P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,b.jsx)(ee,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,b.jsx)(c,{title:`Create Placement Group`}),e[6]=N,e[7]=P):(N=e[6],P=e[7]);let F;e[8]===x.error?F=e[9]:(F=x.error&&(0,b.jsx)(p,{error:x.error,msg:`Failed to create placement group`}),e[8]=x.error,e[9]=F);let I;e[10]!==w||e[11]!==M?(I=w(M),e[10]=w,e[11]=M,e[12]=I):I=e[12];let L;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,b.jsx)(g,{children:(0,b.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[13]=L):L=e[13];let R=!!D.groupName,z;e[14]===T?z=e[15]:(z=T(`groupName`),e[14]=T,e[15]=z);let B;e[16]!==z||e[17]!==R?(B=(0,b.jsx)(o,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[16]=z,e[17]=R,e[18]=B):B=e[18];let V;e[19]===D.groupName?V=e[20]:(V=(0,b.jsx)(h,{errors:[D.groupName]}),e[19]=D.groupName,e[20]=V);let H;e[21]!==B||e[22]!==V?(H=(0,b.jsxs)(_,{children:[L,B,V]}),e[21]=B,e[22]=V,e[23]=H):H=e[23];let U;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,b.jsx)(g,{children:(0,b.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[24]=U):U=e[24];let W;e[25]===D.strategy?W=e[26]:(W=e=>{let{field:t}=e;return(0,b.jsxs)(ne,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,b.jsx)(a,{"aria-invalid":!!D.strategy,className:`w-full`,id:`strategy`,children:(0,b.jsx)(r,{})}),(0,b.jsxs)(te,{children:[(0,b.jsx)(i,{value:`spread`,children:`spread`}),(0,b.jsx)(i,{value:`cluster`,children:`cluster`})]})]})},e[25]=D.strategy,e[26]=W);let G;e[27]!==C||e[28]!==W?(G=(0,b.jsx)(d,{control:C,name:`strategy`,render:W}),e[27]=C,e[28]=W,e[29]=G):G=e[29];let K;e[30]===D.strategy?K=e[31]:(K=(0,b.jsx)(h,{errors:[D.strategy]}),e[30]=D.strategy,e[31]=K);let q;e[32]!==G||e[33]!==K?(q=(0,b.jsxs)(_,{children:[U,G,K]}),e[32]=G,e[33]=K,e[34]=q):q=e[34];let J;e[35]===A?J=e[36]:(J=ie(A),e[35]=A,e[36]=J);let Y;e[37]===J?Y=e[38]:(Y=(0,b.jsx)(re,{commands:J}),e[37]=J,e[38]=Y);let X;e[39]===t?X=e[40]:(X=async()=>{await t({to:`/ec2/describe-placement-groups`})},e[39]=t,e[40]=X);let Z;e[41]!==x.isPending||e[42]!==O||e[43]!==X?(Z=(0,b.jsx)(m,{isPending:x.isPending,isSubmitting:O,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[41]=x.isPending,e[42]=O,e[43]=X,e[44]=Z):Z=e[44];let Q;e[45]!==H||e[46]!==q||e[47]!==Y||e[48]!==Z||e[49]!==I?(Q=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[45]=H,e[46]=q,e[47]=Y,e[48]=Z,e[49]=I,e[50]=Q):Q=e[50];let $;return e[51]!==Q||e[52]!==F?($=(0,b.jsxs)(b.Fragment,{children:[N,P,F,Q]}),e[51]=Q,e[52]=F,e[53]=$):$=e[53],$}function S(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ie(e){let t=e.groupName??``,n=e.strategy??``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as r,i,n as te,s as a,t as ne}from"./select-Bgl6IAYG.js";import{t as re}from"./cli-command-panel-DPooQRso.js";import{t as o}from"./input-CpcyJw4R.js";import{v as s}from"./ec2-iXujaheD.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{a as l,i as u,n as d,t as f}from"./zod-VwMMRSfy.js";import{t as p}from"./error-banner-BcDqaPk7.js";import{t as m}from"./form-actions-C3zG6ld2.js";import{r as h,s as g,t as _}from"./field-ChkDR_wL.js";import{u as v}from"./ec2-Cr9GrTUU.js";var y=t(),b=e();function x(){let e=(0,y.c)(54),t=n(),x=s(),S;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:f(v),defaultValues:{groupName:``,strategy:`spread`}},e[0]=S):S=e[0];let{control:C,handleSubmit:w,register:T,formState:E}=u(S),{errors:D,isSubmitting:O}=E,k;e[1]===C?k=e[2]:(k={control:C},e[1]=C,e[2]=k);let A=l(k),j;e[3]!==x||e[4]!==t?(j=async e=>{let n=await x.mutateAsync(e);t({to:`/ec2/describe-placement-groups/$id`,params:{id:n.PlacementGroup?.GroupId??``}})},e[3]=x,e[4]=t,e[5]=j):j=e[5];let M=j,N,P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,b.jsx)(ee,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,b.jsx)(c,{title:`Create Placement Group`}),e[6]=N,e[7]=P):(N=e[6],P=e[7]);let F;e[8]===x.error?F=e[9]:(F=x.error&&(0,b.jsx)(p,{error:x.error,msg:`Failed to create placement group`}),e[8]=x.error,e[9]=F);let I;e[10]!==w||e[11]!==M?(I=w(M),e[10]=w,e[11]=M,e[12]=I):I=e[12];let L;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,b.jsx)(g,{children:(0,b.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[13]=L):L=e[13];let R=!!D.groupName,z;e[14]===T?z=e[15]:(z=T(`groupName`),e[14]=T,e[15]=z);let B;e[16]!==z||e[17]!==R?(B=(0,b.jsx)(o,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[16]=z,e[17]=R,e[18]=B):B=e[18];let V;e[19]===D.groupName?V=e[20]:(V=(0,b.jsx)(h,{errors:[D.groupName]}),e[19]=D.groupName,e[20]=V);let H;e[21]!==B||e[22]!==V?(H=(0,b.jsxs)(_,{children:[L,B,V]}),e[21]=B,e[22]=V,e[23]=H):H=e[23];let U;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,b.jsx)(g,{children:(0,b.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[24]=U):U=e[24];let W;e[25]===D.strategy?W=e[26]:(W=e=>{let{field:t}=e;return(0,b.jsxs)(ne,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,b.jsx)(a,{"aria-invalid":!!D.strategy,className:`w-full`,id:`strategy`,children:(0,b.jsx)(r,{})}),(0,b.jsxs)(te,{children:[(0,b.jsx)(i,{value:`spread`,children:`spread`}),(0,b.jsx)(i,{value:`cluster`,children:`cluster`})]})]})},e[25]=D.strategy,e[26]=W);let G;e[27]!==C||e[28]!==W?(G=(0,b.jsx)(d,{control:C,name:`strategy`,render:W}),e[27]=C,e[28]=W,e[29]=G):G=e[29];let K;e[30]===D.strategy?K=e[31]:(K=(0,b.jsx)(h,{errors:[D.strategy]}),e[30]=D.strategy,e[31]=K);let q;e[32]!==G||e[33]!==K?(q=(0,b.jsxs)(_,{children:[U,G,K]}),e[32]=G,e[33]=K,e[34]=q):q=e[34];let J;e[35]===A?J=e[36]:(J=ie(A),e[35]=A,e[36]=J);let Y;e[37]===J?Y=e[38]:(Y=(0,b.jsx)(re,{commands:J}),e[37]=J,e[38]=Y);let X;e[39]===t?X=e[40]:(X=async()=>{await t({to:`/ec2/describe-placement-groups`})},e[39]=t,e[40]=X);let Z;e[41]!==x.isPending||e[42]!==O||e[43]!==X?(Z=(0,b.jsx)(m,{isPending:x.isPending,isSubmitting:O,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[41]=x.isPending,e[42]=O,e[43]=X,e[44]=Z):Z=e[44];let Q;e[45]!==H||e[46]!==q||e[47]!==Y||e[48]!==Z||e[49]!==I?(Q=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[45]=H,e[46]=q,e[47]=Y,e[48]=Z,e[49]=I,e[50]=Q):Q=e[50];let $;return e[51]!==Q||e[52]!==F?($=(0,b.jsxs)(b.Fragment,{children:[N,P,F,Q]}),e[51]=Q,e[52]=F,e[53]=$):$=e[53],$}function S(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ie(e){let t=e.groupName??``,n=e.strategy??``;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:` ${t?S(t):``}`},{type:`flag`,value:` \\ --strategy`},{type:`value`,value:` ${n||`spread`}`}]}]}export{x as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-route-table-DSTcxAZd.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-route-table-CvCL2dgp.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-route-table-DSTcxAZd.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-route-table-CvCL2dgp.js index 36b3716e6..fd729f381 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-route-table-DSTcxAZd.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-route-table-CvCL2dgp.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./back-link-DjawJm5W.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as d}from"./input-CpcyJw4R.js";import{M as f}from"./ec2-DJL24ekw.js";import{b as p}from"./ec2-DFivrtZe.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{i as h,n as g,t as _}from"./zod-VwMMRSfy.js";import{t as v}from"./error-banner-BcDqaPk7.js";import{t as y}from"./form-actions-C3zG6ld2.js";import{r as b,s as x,t as S}from"./field-ChkDR_wL.js";import{f as C}from"./ec2-CmqOirWQ.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=r(),{data:i}=n(f),s=p(),E;e[0]===i.Vpcs?E=e[1]:(E=i.Vpcs??[],e[0]=i.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:_(C),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=h(k),{errors:P,isSubmitting:F}=N,I;e[3]!==s||e[4]!==t?(I=async e=>{let n=(await s.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;t(n?{to:`/ec2/describe-route-tables/$id`,params:{id:n}}:{to:`/ec2/describe-route-tables`})},e[3]=s,e[4]=t,e[5]=I):I=e[5];let L=I,R,z;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(a,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(m,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===s.error?B=e[9]:(B=s.error&&(0,T.jsx)(v,{error:s.error,msg:`Failed to create Route Table`}),e[8]=s.error,e[9]=B);let V;e[10]!==j||e[11]!==L?(V=j(L),e[10]=j,e[11]=L,e[12]=V):V=e[12];let H;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(x,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=H):H=e[13];let U;e[14]===M?U=e[15]:(U=M(`name`),e[14]=M,e[15]=U);let W;e[16]===U?W=e[17]:(W=(0,T.jsxs)(S,{children:[H,(0,T.jsx)(d,{id:`name`,placeholder:`my-route-table`,...U})]}),e[16]=U,e[17]=W);let G;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(x,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[18]=G):G=e[18];let K;e[19]!==P.vpcId||e[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,T.jsx)(l,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(o,{placeholder:`Select a VPC`})}),(0,T.jsx)(c,{children:O.map(D)})]})},e[19]=P.vpcId,e[20]=O,e[21]=K):K=e[21];let q;e[22]!==A||e[23]!==K?(q=(0,T.jsx)(g,{control:A,name:`vpcId`,render:K}),e[22]=A,e[23]=K,e[24]=q):q=e[24];let J;e[25]===P.vpcId?J=e[26]:(J=(0,T.jsx)(b,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(S,{children:[G,q,J]}),e[27]=q,e[28]=J,e[29]=Y):Y=e[29];let X;e[30]===t?X=e[31]:(X=async()=>{await t({to:`/ec2/describe-route-tables`})},e[30]=t,e[31]=X);let Z;e[32]!==s.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(y,{isPending:s.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=s.isPending,e[33]=F,e[34]=X,e[35]=Z):Z=e[35];let Q;e[36]!==W||e[37]!==Y||e[38]!==Z||e[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),e[36]=W,e[37]=Y,e[38]=Z,e[39]=V,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),e[41]=Q,e[42]=B,e[43]=$):$=e[43],$}function D(e){let t=i(e.Tags);return(0,T.jsx)(s,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./back-link-DjawJm5W.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as d}from"./input-CpcyJw4R.js";import{M as f}from"./ec2-DJL24ekw.js";import{b as p}from"./ec2-iXujaheD.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{i as h,n as g,t as _}from"./zod-VwMMRSfy.js";import{t as v}from"./error-banner-BcDqaPk7.js";import{t as y}from"./form-actions-C3zG6ld2.js";import{r as b,s as x,t as S}from"./field-ChkDR_wL.js";import{f as C}from"./ec2-Cr9GrTUU.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=r(),{data:i}=n(f),s=p(),E;e[0]===i.Vpcs?E=e[1]:(E=i.Vpcs??[],e[0]=i.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:_(C),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=h(k),{errors:P,isSubmitting:F}=N,I;e[3]!==s||e[4]!==t?(I=async e=>{let n=(await s.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;t(n?{to:`/ec2/describe-route-tables/$id`,params:{id:n}}:{to:`/ec2/describe-route-tables`})},e[3]=s,e[4]=t,e[5]=I):I=e[5];let L=I,R,z;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(a,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(m,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===s.error?B=e[9]:(B=s.error&&(0,T.jsx)(v,{error:s.error,msg:`Failed to create Route Table`}),e[8]=s.error,e[9]=B);let V;e[10]!==j||e[11]!==L?(V=j(L),e[10]=j,e[11]=L,e[12]=V):V=e[12];let H;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(x,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=H):H=e[13];let U;e[14]===M?U=e[15]:(U=M(`name`),e[14]=M,e[15]=U);let W;e[16]===U?W=e[17]:(W=(0,T.jsxs)(S,{children:[H,(0,T.jsx)(d,{id:`name`,placeholder:`my-route-table`,...U})]}),e[16]=U,e[17]=W);let G;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(x,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[18]=G):G=e[18];let K;e[19]!==P.vpcId||e[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,T.jsx)(l,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(o,{placeholder:`Select a VPC`})}),(0,T.jsx)(c,{children:O.map(D)})]})},e[19]=P.vpcId,e[20]=O,e[21]=K):K=e[21];let q;e[22]!==A||e[23]!==K?(q=(0,T.jsx)(g,{control:A,name:`vpcId`,render:K}),e[22]=A,e[23]=K,e[24]=q):q=e[24];let J;e[25]===P.vpcId?J=e[26]:(J=(0,T.jsx)(b,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(S,{children:[G,q,J]}),e[27]=q,e[28]=J,e[29]=Y):Y=e[29];let X;e[30]===t?X=e[31]:(X=async()=>{await t({to:`/ec2/describe-route-tables`})},e[30]=t,e[31]=X);let Z;e[32]!==s.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(y,{isPending:s.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=s.isPending,e[33]=F,e[34]=X,e[35]=Z):Z=e[35];let Q;e[36]!==W||e[37]!==Y||e[38]!==Z||e[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),e[36]=W,e[37]=Y,e[38]=Z,e[39]=V,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),e[41]=Q,e[42]=B,e[43]=$):$=e[43],$}function D(e){let t=i(e.Tags);return(0,T.jsx)(s,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-security-group-ydsUjq9K.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-security-group-DDFS2csw.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-security-group-ydsUjq9K.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-security-group-DDFS2csw.js index 22980ca1c..5a64981ae 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-security-group-ydsUjq9K.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-security-group-DDFS2csw.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as a,i as o,n as te,s as ne,t as re}from"./select-Bgl6IAYG.js";import{t as ie}from"./cli-command-panel-DPooQRso.js";import{t as s}from"./input-CpcyJw4R.js";import{M as ae}from"./ec2-DJL24ekw.js";import{x as oe}from"./ec2-DFivrtZe.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{a as se,i as ce,n as le,t as ue}from"./zod-VwMMRSfy.js";import{t as de}from"./error-banner-BcDqaPk7.js";import{t as fe}from"./form-actions-C3zG6ld2.js";import{r as l,s as u,t as d}from"./field-ChkDR_wL.js";import{p as pe}from"./ec2-CmqOirWQ.js";var me=t(),f=e();function p(){let e=(0,me.c)(71),t=r(),{data:i}=n(ae),o=oe(),p;e[0]===i.Vpcs?p=e[1]:(p=i.Vpcs??[],e[0]=i.Vpcs,e[1]=p);let m=p,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=ue(pe),e[2]=h):h=e[2];let g=m[0]?.VpcId??``,_;e[3]===g?_=e[4]:(_={resolver:h,defaultValues:{groupName:``,description:``,vpcId:g}},e[3]=g,e[4]=_);let{control:v,handleSubmit:y,register:b,formState:_e}=ce(_),{errors:x,isSubmitting:S}=_e,C;e[5]===v?C=e[6]:(C={control:v},e[5]=v,e[6]=C);let w=se(C),T;e[7]!==o||e[8]!==t?(T=async e=>{let n=(await o.mutateAsync(e)).GroupId;t(n?{to:`/ec2/describe-security-groups/$id`,params:{id:n}}:{to:`/ec2/describe-security-groups`})},e[7]=o,e[8]=t,e[9]=T):T=e[9];let E=T,D,O;e[10]===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)(c,{title:`Create Security Group`}),e[10]=D,e[11]=O):(D=e[10],O=e[11]);let k;e[12]===o.error?k=e[13]:(k=o.error&&(0,f.jsx)(de,{error:o.error,msg:`Failed to create security group`}),e[12]=o.error,e[13]=k);let A;e[14]!==y||e[15]!==E?(A=y(E),e[14]=y,e[15]=E,e[16]=A):A=e[16];let j;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[17]=j):j=e[17];let M=!!x.groupName,N;e[18]===b?N=e[19]:(N=b(`groupName`),e[18]=b,e[19]=N);let P;e[20]!==M||e[21]!==N?(P=(0,f.jsx)(s,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[20]=M,e[21]=N,e[22]=P):P=e[22];let F;e[23]===x.groupName?F=e[24]:(F=(0,f.jsx)(l,{errors:[x.groupName]}),e[23]=x.groupName,e[24]=F);let I;e[25]!==P||e[26]!==F?(I=(0,f.jsxs)(d,{children:[j,P,F]}),e[25]=P,e[26]=F,e[27]=I):I=e[27];let L;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[28]=L):L=e[28];let R=!!x.description,z;e[29]===b?z=e[30]:(z=b(`description`),e[29]=b,e[30]=z);let B;e[31]!==R||e[32]!==z?(B=(0,f.jsx)(s,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[31]=R,e[32]=z,e[33]=B):B=e[33];let V;e[34]===x.description?V=e[35]:(V=(0,f.jsx)(l,{errors:[x.description]}),e[34]=x.description,e[35]=V);let H;e[36]!==B||e[37]!==V?(H=(0,f.jsxs)(d,{children:[L,B,V]}),e[36]=B,e[37]=V,e[38]=H):H=e[38];let U;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[39]=U):U=e[39];let W;e[40]!==x.vpcId||e[41]!==m?(W=e=>{let{field:t}=e;return(0,f.jsxs)(re,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,f.jsx)(ne,{"aria-invalid":!!x.vpcId,className:`w-full`,id:`vpcId`,children:(0,f.jsx)(a,{})}),(0,f.jsx)(te,{children:m.map(he)})]})},e[40]=x.vpcId,e[41]=m,e[42]=W):W=e[42];let G;e[43]!==v||e[44]!==W?(G=(0,f.jsx)(le,{control:v,name:`vpcId`,render:W}),e[43]=v,e[44]=W,e[45]=G):G=e[45];let K;e[46]===x.vpcId?K=e[47]:(K=(0,f.jsx)(l,{errors:[x.vpcId]}),e[46]=x.vpcId,e[47]=K);let q;e[48]!==G||e[49]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),e[48]=G,e[49]=K,e[50]=q):q=e[50];let J;e[51]===w?J=e[52]:(J=ge(w),e[51]=w,e[52]=J);let Y;e[53]===J?Y=e[54]:(Y=(0,f.jsx)(ie,{commands:J}),e[53]=J,e[54]=Y);let X;e[55]===t?X=e[56]:(X=async()=>{await t({to:`/ec2/describe-security-groups`})},e[55]=t,e[56]=X);let Z;e[57]!==o.isPending||e[58]!==S||e[59]!==X?(Z=(0,f.jsx)(fe,{isPending:o.isPending,isSubmitting:S,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[57]=o.isPending,e[58]=S,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==A||e[62]!==I||e[63]!==H||e[64]!==q||e[65]!==Y||e[66]!==Z?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[61]=A,e[62]=I,e[63]=H,e[64]=q,e[65]=Y,e[66]=Z,e[67]=Q):Q=e[67];let $;return e[68]!==Q||e[69]!==k?($=(0,f.jsxs)(f.Fragment,{children:[D,O,k,Q]}),e[68]=Q,e[69]=k,e[70]=$):$=e[70],$}function he(e){let t=i(e.Tags);return(0,f.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ge(e){let t=e.groupName??``,n=e.description??``,r=e.vpcId??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as a,i as o,n as te,s as ne,t as re}from"./select-Bgl6IAYG.js";import{t as ie}from"./cli-command-panel-DPooQRso.js";import{t as s}from"./input-CpcyJw4R.js";import{M as ae}from"./ec2-DJL24ekw.js";import{x as oe}from"./ec2-iXujaheD.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{a as se,i as ce,n as le,t as ue}from"./zod-VwMMRSfy.js";import{t as de}from"./error-banner-BcDqaPk7.js";import{t as fe}from"./form-actions-C3zG6ld2.js";import{r as l,s as u,t as d}from"./field-ChkDR_wL.js";import{p as pe}from"./ec2-Cr9GrTUU.js";var me=t(),f=e();function p(){let e=(0,me.c)(71),t=r(),{data:i}=n(ae),o=oe(),p;e[0]===i.Vpcs?p=e[1]:(p=i.Vpcs??[],e[0]=i.Vpcs,e[1]=p);let m=p,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=ue(pe),e[2]=h):h=e[2];let g=m[0]?.VpcId??``,_;e[3]===g?_=e[4]:(_={resolver:h,defaultValues:{groupName:``,description:``,vpcId:g}},e[3]=g,e[4]=_);let{control:v,handleSubmit:y,register:b,formState:_e}=ce(_),{errors:x,isSubmitting:S}=_e,C;e[5]===v?C=e[6]:(C={control:v},e[5]=v,e[6]=C);let w=se(C),T;e[7]!==o||e[8]!==t?(T=async e=>{let n=(await o.mutateAsync(e)).GroupId;t(n?{to:`/ec2/describe-security-groups/$id`,params:{id:n}}:{to:`/ec2/describe-security-groups`})},e[7]=o,e[8]=t,e[9]=T):T=e[9];let E=T,D,O;e[10]===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)(c,{title:`Create Security Group`}),e[10]=D,e[11]=O):(D=e[10],O=e[11]);let k;e[12]===o.error?k=e[13]:(k=o.error&&(0,f.jsx)(de,{error:o.error,msg:`Failed to create security group`}),e[12]=o.error,e[13]=k);let A;e[14]!==y||e[15]!==E?(A=y(E),e[14]=y,e[15]=E,e[16]=A):A=e[16];let j;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[17]=j):j=e[17];let M=!!x.groupName,N;e[18]===b?N=e[19]:(N=b(`groupName`),e[18]=b,e[19]=N);let P;e[20]!==M||e[21]!==N?(P=(0,f.jsx)(s,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[20]=M,e[21]=N,e[22]=P):P=e[22];let F;e[23]===x.groupName?F=e[24]:(F=(0,f.jsx)(l,{errors:[x.groupName]}),e[23]=x.groupName,e[24]=F);let I;e[25]!==P||e[26]!==F?(I=(0,f.jsxs)(d,{children:[j,P,F]}),e[25]=P,e[26]=F,e[27]=I):I=e[27];let L;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[28]=L):L=e[28];let R=!!x.description,z;e[29]===b?z=e[30]:(z=b(`description`),e[29]=b,e[30]=z);let B;e[31]!==R||e[32]!==z?(B=(0,f.jsx)(s,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[31]=R,e[32]=z,e[33]=B):B=e[33];let V;e[34]===x.description?V=e[35]:(V=(0,f.jsx)(l,{errors:[x.description]}),e[34]=x.description,e[35]=V);let H;e[36]!==B||e[37]!==V?(H=(0,f.jsxs)(d,{children:[L,B,V]}),e[36]=B,e[37]=V,e[38]=H):H=e[38];let U;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[39]=U):U=e[39];let W;e[40]!==x.vpcId||e[41]!==m?(W=e=>{let{field:t}=e;return(0,f.jsxs)(re,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,f.jsx)(ne,{"aria-invalid":!!x.vpcId,className:`w-full`,id:`vpcId`,children:(0,f.jsx)(a,{})}),(0,f.jsx)(te,{children:m.map(he)})]})},e[40]=x.vpcId,e[41]=m,e[42]=W):W=e[42];let G;e[43]!==v||e[44]!==W?(G=(0,f.jsx)(le,{control:v,name:`vpcId`,render:W}),e[43]=v,e[44]=W,e[45]=G):G=e[45];let K;e[46]===x.vpcId?K=e[47]:(K=(0,f.jsx)(l,{errors:[x.vpcId]}),e[46]=x.vpcId,e[47]=K);let q;e[48]!==G||e[49]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),e[48]=G,e[49]=K,e[50]=q):q=e[50];let J;e[51]===w?J=e[52]:(J=ge(w),e[51]=w,e[52]=J);let Y;e[53]===J?Y=e[54]:(Y=(0,f.jsx)(ie,{commands:J}),e[53]=J,e[54]=Y);let X;e[55]===t?X=e[56]:(X=async()=>{await t({to:`/ec2/describe-security-groups`})},e[55]=t,e[56]=X);let Z;e[57]!==o.isPending||e[58]!==S||e[59]!==X?(Z=(0,f.jsx)(fe,{isPending:o.isPending,isSubmitting:S,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[57]=o.isPending,e[58]=S,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==A||e[62]!==I||e[63]!==H||e[64]!==q||e[65]!==Y||e[66]!==Z?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[61]=A,e[62]=I,e[63]=H,e[64]=q,e[65]=Y,e[66]=Z,e[67]=Q):Q=e[67];let $;return e[68]!==Q||e[69]!==k?($=(0,f.jsxs)(f.Fragment,{children:[D,O,k,Q]}),e[68]=Q,e[69]=k,e[70]=$):$=e[70],$}function he(e){let t=i(e.Tags);return(0,f.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ge(e){let t=e.groupName??``,n=e.description??``,r=e.vpcId??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\ --group-name`},{type:`value`,value:` ${t||``}`},{type:`flag`,value:` \\ --description`},{type:`value`,value:` "${n||``}"`}];return r&&i.push({type:`flag`,value:` \\ --vpc-id`},{type:`value`,value:` ${r}`}),[{label:`Create Security Group`,parts:i}]}export{p as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-Djw10eEM.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-BdM1V9nv.js similarity index 81% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-Djw10eEM.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-BdM1V9nv.js index 4a972f073..a143c0b75 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-Djw10eEM.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-BdM1V9nv.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-service-Dx-_UkeH.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/signed-fetch-BHraeSLO.js","assets/elbv2-19pV3l7Z.js","assets/commandBuilder-C5yeyMcZ.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ecs-CA1ohYPx.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{O as a,w as o}from"./ec2-DJL24ekw.js";import{o as s}from"./ecs-DRWPOVsw.js";import{u as c}from"./elbv2-19pV3l7Z.js";var l=()=>i(()=>import(`./create-service-Dx-_UkeH.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),u=r({cluster:n().catch(``)}),d=e(`/_auth/ecs/(clusters)/create-service`)({validateSearch:u,loader:async({context:e})=>{await Promise.all([e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...o,staleTime:`static`}),e.queryClient.query({...c,staleTime:`static`})])},head:()=>({meta:[{title:`Create Service | ECS | Mulga`}]}),component:t(l,`component`)});export{d as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-service-CGe6v6p3.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/signed-fetch-BHraeSLO.js","assets/elbv2-19pV3l7Z.js","assets/commandBuilder-C5yeyMcZ.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ecs-CA1ohYPx.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{O as a,w as o}from"./ec2-DJL24ekw.js";import{o as s}from"./ecs-DRWPOVsw.js";import{u as c}from"./elbv2-19pV3l7Z.js";var l=()=>i(()=>import(`./create-service-CGe6v6p3.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),u=r({cluster:n().catch(``)}),d=e(`/_auth/ecs/(clusters)/create-service`)({validateSearch:u,loader:async({context:e})=>{await Promise.all([e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...o,staleTime:`static`}),e.queryClient.query({...c,staleTime:`static`})])},head:()=>({meta:[{title:`Create Service | ECS | Mulga`}]}),component:t(l,`component`)});export{d as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-CGe6v6p3.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-CGe6v6p3.js new file mode 100644 index 000000000..79fc51129 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-CGe6v6p3.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useQuery-DVjCHx2S.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./useNavigate-BiiHYpLW.js";import{M as te}from"./httpRequest-Bc1WZmsd.js";import{t as ne}from"./back-link-DjawJm5W.js";import{c as re,i as ie,n as ae,s as oe,t as se}from"./select-Bgl6IAYG.js";import{t as ce}from"./input-CpcyJw4R.js";import{O as le,w as ue}from"./ec2-DJL24ekw.js";import{a as de,o as fe}from"./ecs-DRWPOVsw.js";import{n as pe}from"./ecs-BsOdvIYx.js";import{u as me}from"./elbv2-19pV3l7Z.js";import{t as i}from"./create-service-BdM1V9nv.js";import{t as he}from"./page-heading-M0NyqAmu.js";import{a as ge,i as _e,n as ve,t as ye}from"./zod-VwMMRSfy.js";import{t as be}from"./error-banner-BcDqaPk7.js";import{t as xe}from"./form-actions-C3zG6ld2.js";import{r as Se,s as a,t as o}from"./field-ChkDR_wL.js";import{n as Ce}from"./ecs-CA1ohYPx.js";var we=t(),s=e();function c(e){return e.split(`/`).at(-1)??e}function l(e){let t=(0,we.c)(125),{cluster:i}=e,c=ee(),l=pe(),{data:De}=r(fe),{data:Oe}=r(le),{data:ke}=r(ue),{data:Ae}=r(me),je;t[0]===Oe.Subnets?je=t[1]:(je=Oe.Subnets??[],t[0]=Oe.Subnets,t[1]=je);let Me=je,u;t[2]===ke.SecurityGroups?u=t[3]:(u=ke.SecurityGroups??[],t[2]=ke.SecurityGroups,t[3]=u);let Ne=u,Pe;t[4]===Ae.TargetGroups?Pe=t[5]:(Pe=Ae.TargetGroups??[],t[4]=Ae.TargetGroups,t[5]=Pe);let Fe=Pe,Ie;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=ye(Ce),t[6]=Ie):Ie=t[6];let Le,Re;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(Le=[],Re=[],t[7]=Le,t[8]=Re):(Le=t[7],Re=t[8]);let ze;t[9]===i?ze=t[10]:(ze={resolver:Ie,defaultValues:{cluster:i,serviceName:``,taskDefinition:``,desiredCount:1,subnets:Le,securityGroups:Re,assignPublicIp:!1,targetGroupArn:``,loadBalancerContainerName:``,loadBalancerContainerPort:``}},t[9]=i,t[10]=ze);let{control:d,handleSubmit:Be,register:f,setValue:Ve,getValues:He,formState:Ue}=_e(ze),{errors:p,isSubmitting:We}=Ue,Ge;t[11]===d?Ge=t[12]:(Ge={control:d,name:`taskDefinition`},t[11]=d,t[12]=Ge);let Ke=ge(Ge),m;t[13]===Ke?m=t[14]:(m=de(Ke),t[13]=Ke,t[14]=m);let{data:qe}=n(m),h=qe?.networkMode===`awsvpc`,g;t[15]===d?g=t[16]:(g={control:d,name:`subnets`},t[15]=d,t[16]=g);let _=ge(g),v;t[17]===d?v=t[18]:(v={control:d,name:`securityGroups`},t[17]=d,t[18]=v);let Je=ge(v),y;t[19]===_?y=t[20]:(y=new Set(_),t[19]=_,t[20]=y);let Ye=y,b;t[21]===Je?b=t[22]:(b=new Set(Je),t[21]=Je,t[22]=b);let Xe=b,x;t[23]!==He||t[24]!==Ve?(x=(e,t)=>{let n=He(e);Ve(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})},t[23]=He,t[24]=Ve,t[25]=x):x=t[25];let Ze=x,Qe;t[26]!==i||t[27]!==c?(Qe=function(){c({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:i}})},t[26]=i,t[27]=c,t[28]=Qe):Qe=t[28];let S=Qe,$e;t[29]!==h||t[30]!==l||t[31]!==S?($e=async function(e){await l.mutateAsync({...e,awsvpc:h}),S()},t[29]=h,t[30]=l,t[31]=S,t[32]=$e):$e=t[32];let et=$e,tt=h&&_.length===0,C;t[33]===i?C=t[34]:(C={clusterName:i},t[33]=i,t[34]=C);let w;t[35]!==i||t[36]!==C?(w=(0,s.jsx)(ne,{params:C,to:`/ecs/list-clusters/$clusterName`,children:i}),t[35]=i,t[36]=C,t[37]=w):w=t[37];let nt=`Cluster: ${i}`,T;t[38]===nt?T=t[39]:(T=(0,s.jsx)(he,{subtitle:nt,title:`Create Service`}),t[38]=nt,t[39]=T);let E;t[40]!==l.error||t[41]!==l.isError?(E=l.isError&&(0,s.jsx)(be,{error:l.error instanceof Error?l.error:void 0,msg:`Failed to create service.`}),t[40]=l.error,t[41]=l.isError,t[42]=E):E=t[42];let D;t[43]!==Be||t[44]!==et?(D=Be(et),t[43]=Be,t[44]=et,t[45]=D):D=t[45];let rt;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`serviceName`,children:`Service name`})}),t[46]=rt):rt=t[46];let O;t[47]===f?O=t[48]:(O=f(`serviceName`),t[47]=f,t[48]=O);let k;t[49]===O?k=t[50]:(k=(0,s.jsx)(ce,{id:`serviceName`,placeholder:`api`,...O}),t[49]=O,t[50]=k);let A;t[51]===p.serviceName?A=t[52]:(A=(0,s.jsx)(Se,{errors:[p.serviceName]}),t[51]=p.serviceName,t[52]=A);let j;t[53]!==k||t[54]!==A?(j=(0,s.jsxs)(o,{children:[rt,k,A]}),t[53]=k,t[54]=A,t[55]=j):j=t[55];let M;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),t[56]=M):M=t[56];let N;t[57]===De?N=t[58]:(N=e=>{let{field:t}=e;return(0,s.jsxs)(se,{onValueChange:t.onChange,value:t.value,children:[(0,s.jsx)(oe,{className:`w-full`,id:`taskDefinition`,children:(0,s.jsx)(re,{placeholder:`Select a task definition`})}),(0,s.jsx)(ae,{children:De.map(Ee)})]})},t[57]=De,t[58]=N);let P;t[59]!==d||t[60]!==N?(P=(0,s.jsx)(ve,{control:d,name:`taskDefinition`,render:N}),t[59]=d,t[60]=N,t[61]=P):P=t[61];let F;t[62]===p.taskDefinition?F=t[63]:(F=(0,s.jsx)(Se,{errors:[p.taskDefinition]}),t[62]=p.taskDefinition,t[63]=F);let I;t[64]!==P||t[65]!==F?(I=(0,s.jsxs)(o,{children:[M,P,F]}),t[64]=P,t[65]=F,t[66]=I):I=t[66];let L;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`desiredCount`,children:`Desired count`})}),t[67]=L):L=t[67];let R;t[68]===f?R=t[69]:(R=f(`desiredCount`,{valueAsNumber:!0}),t[68]=f,t[69]=R);let z;t[70]===R?z=t[71]:(z=(0,s.jsx)(ce,{id:`desiredCount`,type:`number`,...R}),t[70]=R,t[71]=z);let B;t[72]===p.desiredCount?B=t[73]:(B=(0,s.jsx)(Se,{errors:[p.desiredCount]}),t[72]=p.desiredCount,t[73]=B);let V;t[74]!==z||t[75]!==B?(V=(0,s.jsxs)(o,{children:[L,z,B]}),t[74]=z,t[75]=B,t[76]=V):V=t[76];let H;t[77]!==h||t[78]!==f||t[79]!==Ne||t[80]!==Xe||t[81]!==Ye||t[82]!==Me||t[83]!==Ze?(H=h&&(0,s.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,s.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,s.jsx)(`div`,{className:`mt-2 space-y-1`,children:Me.map(e=>(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,s.jsx)(`input`,{checked:Ye.has(e.SubnetId??``),onChange:()=>{Ze(`subnets`,e.SubnetId??``)},type:`checkbox`}),(0,s.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,s.jsx)(`div`,{className:`mt-2 space-y-1`,children:Ne.map(e=>(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,s.jsx)(`input`,{checked:Xe.has(e.GroupId??``),onChange:()=>{Ze(`securityGroups`,e.GroupId??``)},type:`checkbox`}),(0,s.jsx)(`span`,{className:`font-mono`,children:te(e)})]},e.GroupId))})]}),(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,s.jsx)(`input`,{type:`checkbox`,...f(`assignPublicIp`)}),(0,s.jsx)(`span`,{children:`Assign public IP`})]})]}),t[77]=h,t[78]=f,t[79]=Ne,t[80]=Xe,t[81]=Ye,t[82]=Me,t[83]=Ze,t[84]=H):H=t[84];let it;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,s.jsx)(`h2`,{className:`font-semibold`,children:`Load balancer (optional)`}),t[85]=it):it=t[85];let at;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`targetGroupArn`,children:`Target group`})}),t[86]=at):at=t[86];let U;t[87]===Fe?U=t[88]:(U=e=>{let{field:t}=e;return(0,s.jsxs)(se,{onValueChange:e=>{t.onChange(e===`none`?``:e)},value:t.value===``?`none`:t.value,children:[(0,s.jsx)(oe,{className:`w-full`,id:`targetGroupArn`,children:(0,s.jsx)(re,{})}),(0,s.jsxs)(ae,{children:[(0,s.jsx)(ie,{value:`none`,children:`none`}),Fe.map(Te)]})]})},t[87]=Fe,t[88]=U);let W;t[89]!==d||t[90]!==U?(W=(0,s.jsxs)(o,{children:[at,(0,s.jsx)(ve,{control:d,name:`targetGroupArn`,render:U})]}),t[89]=d,t[90]=U,t[91]=W):W=t[91];let G;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`lbContainerName`,children:`Container name`})}),t[92]=G):G=t[92];let K;t[93]===f?K=t[94]:(K=f(`loadBalancerContainerName`),t[93]=f,t[94]=K);let q;t[95]===K?q=t[96]:(q=(0,s.jsxs)(o,{children:[G,(0,s.jsx)(ce,{id:`lbContainerName`,placeholder:`app`,...K})]}),t[95]=K,t[96]=q);let ot;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`lbContainerPort`,children:`Container port`})}),t[97]=ot):ot=t[97];let J;t[98]===f?J=t[99]:(J=f(`loadBalancerContainerPort`),t[98]=f,t[99]=J);let Y;t[100]===J?Y=t[101]:(Y=(0,s.jsxs)(o,{children:[ot,(0,s.jsx)(ce,{id:`lbContainerPort`,placeholder:`80`,type:`number`,...J})]}),t[100]=J,t[101]=Y);let X;t[102]!==q||t[103]!==Y?(X=(0,s.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[q,Y]}),t[102]=q,t[103]=Y,t[104]=X):X=t[104];let Z;t[105]!==W||t[106]!==X?(Z=(0,s.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[it,W,X]}),t[105]=W,t[106]=X,t[107]=Z):Z=t[107];let st=l.isPending||tt,Q;t[108]!==S||t[109]!==We||t[110]!==st?(Q=(0,s.jsx)(xe,{isPending:st,isSubmitting:We,onCancel:S,pendingLabel:`Creating…`,submitLabel:`Create Service`}),t[108]=S,t[109]=We,t[110]=st,t[111]=Q):Q=t[111];let $;t[112]!==D||t[113]!==j||t[114]!==I||t[115]!==V||t[116]!==H||t[117]!==Z||t[118]!==Q?($=(0,s.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:D,children:[j,I,V,H,Z,Q]}),t[112]=D,t[113]=j,t[114]=I,t[115]=V,t[116]=H,t[117]=Z,t[118]=Q,t[119]=$):$=t[119];let ct;return t[120]!==w||t[121]!==T||t[122]!==E||t[123]!==$?(ct=(0,s.jsxs)(s.Fragment,{children:[w,T,E,$]}),t[120]=w,t[121]=T,t[122]=E,t[123]=$,t[124]=ct):ct=t[124],ct}function Te(e){return(0,s.jsx)(ie,{value:e.TargetGroupArn??``,children:e.TargetGroupName},e.TargetGroupArn)}function Ee(e){let t=c(e);return(0,s.jsx)(ie,{value:t,children:t},e)}function De(){let e=(0,we.c)(2),{cluster:t}=i.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,s.jsx)(l,{cluster:t}),e[0]=t,e[1]=n),n}export{De as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-Dx-_UkeH.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-Dx-_UkeH.js deleted file mode 100644 index 2a80b5e4b..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-service-Dx-_UkeH.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useQuery-DVjCHx2S.js";import{t as ee}from"./useSuspenseQuery-C2bXkW_k.js";import{t as te}from"./useNavigate-BiiHYpLW.js";import{t as ne}from"./back-link-DjawJm5W.js";import{c as re,i as ie,n as ae,s as oe,t as se}from"./select-Bgl6IAYG.js";import{t as r}from"./input-CpcyJw4R.js";import{O as ce,w as le}from"./ec2-DJL24ekw.js";import{a as ue,o as de}from"./ecs-DRWPOVsw.js";import{n as fe}from"./ecs-BsOdvIYx.js";import{u as pe}from"./elbv2-19pV3l7Z.js";import{t as i}from"./create-service-Djw10eEM.js";import{t as me}from"./page-heading-M0NyqAmu.js";import{a as he,i as ge,n as _e,t as ve}from"./zod-VwMMRSfy.js";import{t as ye}from"./error-banner-BcDqaPk7.js";import{t as be}from"./form-actions-C3zG6ld2.js";import{r as xe,s as a,t as o}from"./field-ChkDR_wL.js";import{n as Se}from"./ecs-CA1ohYPx.js";var Ce=t(),s=e();function we(e){return e.split(`/`).at(-1)??e}function c(e){let t=(0,Ce.c)(125),{cluster:i}=e,we=te(),c=fe(),{data:De}=ee(de),{data:Oe}=ee(ce),{data:ke}=ee(le),{data:Ae}=ee(pe),je;t[0]===Oe.Subnets?je=t[1]:(je=Oe.Subnets??[],t[0]=Oe.Subnets,t[1]=je);let Me=je,Ne;t[2]===ke.SecurityGroups?Ne=t[3]:(Ne=ke.SecurityGroups??[],t[2]=ke.SecurityGroups,t[3]=Ne);let Pe=Ne,l;t[4]===Ae.TargetGroups?l=t[5]:(l=Ae.TargetGroups??[],t[4]=Ae.TargetGroups,t[5]=l);let Fe=l,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=ve(Se),t[6]=u):u=t[6];let d,f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=[],f=[],t[7]=d,t[8]=f):(d=t[7],f=t[8]);let p;t[9]===i?p=t[10]:(p={resolver:u,defaultValues:{cluster:i,serviceName:``,taskDefinition:``,desiredCount:1,subnets:d,securityGroups:f,assignPublicIp:!1,targetGroupArn:``,loadBalancerContainerName:``,loadBalancerContainerPort:``}},t[9]=i,t[10]=p);let{control:m,handleSubmit:Ie,register:h,setValue:Le,getValues:Re,formState:ze}=ge(p),{errors:g,isSubmitting:Be}=ze,_;t[11]===m?_=t[12]:(_={control:m,name:`taskDefinition`},t[11]=m,t[12]=_);let Ve=he(_),v;t[13]===Ve?v=t[14]:(v=ue(Ve),t[13]=Ve,t[14]=v);let{data:He}=n(v),y=He?.networkMode===`awsvpc`,b;t[15]===m?b=t[16]:(b={control:m,name:`subnets`},t[15]=m,t[16]=b);let x=he(b),S;t[17]===m?S=t[18]:(S={control:m,name:`securityGroups`},t[17]=m,t[18]=S);let Ue=he(S),C;t[19]===x?C=t[20]:(C=new Set(x),t[19]=x,t[20]=C);let We=C,Ge;t[21]===Ue?Ge=t[22]:(Ge=new Set(Ue),t[21]=Ue,t[22]=Ge);let Ke=Ge,qe;t[23]!==Re||t[24]!==Le?(qe=(e,t)=>{let n=Re(e);Le(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})},t[23]=Re,t[24]=Le,t[25]=qe):qe=t[25];let Je=qe,Ye;t[26]!==i||t[27]!==we?(Ye=function(){we({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:i}})},t[26]=i,t[27]=we,t[28]=Ye):Ye=t[28];let w=Ye,Xe;t[29]!==y||t[30]!==c||t[31]!==w?(Xe=async function(e){await c.mutateAsync({...e,awsvpc:y}),w()},t[29]=y,t[30]=c,t[31]=w,t[32]=Xe):Xe=t[32];let Ze=Xe,Qe=y&&x.length===0,T;t[33]===i?T=t[34]:(T={clusterName:i},t[33]=i,t[34]=T);let E;t[35]!==i||t[36]!==T?(E=(0,s.jsx)(ne,{params:T,to:`/ecs/list-clusters/$clusterName`,children:i}),t[35]=i,t[36]=T,t[37]=E):E=t[37];let $e=`Cluster: ${i}`,D;t[38]===$e?D=t[39]:(D=(0,s.jsx)(me,{subtitle:$e,title:`Create Service`}),t[38]=$e,t[39]=D);let O;t[40]!==c.error||t[41]!==c.isError?(O=c.isError&&(0,s.jsx)(ye,{error:c.error instanceof Error?c.error:void 0,msg:`Failed to create service.`}),t[40]=c.error,t[41]=c.isError,t[42]=O):O=t[42];let k;t[43]!==Ie||t[44]!==Ze?(k=Ie(Ze),t[43]=Ie,t[44]=Ze,t[45]=k):k=t[45];let et;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`serviceName`,children:`Service name`})}),t[46]=et):et=t[46];let A;t[47]===h?A=t[48]:(A=h(`serviceName`),t[47]=h,t[48]=A);let j;t[49]===A?j=t[50]:(j=(0,s.jsx)(r,{id:`serviceName`,placeholder:`api`,...A}),t[49]=A,t[50]=j);let M;t[51]===g.serviceName?M=t[52]:(M=(0,s.jsx)(xe,{errors:[g.serviceName]}),t[51]=g.serviceName,t[52]=M);let N;t[53]!==j||t[54]!==M?(N=(0,s.jsxs)(o,{children:[et,j,M]}),t[53]=j,t[54]=M,t[55]=N):N=t[55];let tt;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),t[56]=tt):tt=t[56];let P;t[57]===De?P=t[58]:(P=e=>{let{field:t}=e;return(0,s.jsxs)(se,{onValueChange:t.onChange,value:t.value,children:[(0,s.jsx)(oe,{className:`w-full`,id:`taskDefinition`,children:(0,s.jsx)(re,{placeholder:`Select a task definition`})}),(0,s.jsx)(ae,{children:De.map(Ee)})]})},t[57]=De,t[58]=P);let F;t[59]!==m||t[60]!==P?(F=(0,s.jsx)(_e,{control:m,name:`taskDefinition`,render:P}),t[59]=m,t[60]=P,t[61]=F):F=t[61];let I;t[62]===g.taskDefinition?I=t[63]:(I=(0,s.jsx)(xe,{errors:[g.taskDefinition]}),t[62]=g.taskDefinition,t[63]=I);let L;t[64]!==F||t[65]!==I?(L=(0,s.jsxs)(o,{children:[tt,F,I]}),t[64]=F,t[65]=I,t[66]=L):L=t[66];let nt;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`desiredCount`,children:`Desired count`})}),t[67]=nt):nt=t[67];let R;t[68]===h?R=t[69]:(R=h(`desiredCount`,{valueAsNumber:!0}),t[68]=h,t[69]=R);let z;t[70]===R?z=t[71]:(z=(0,s.jsx)(r,{id:`desiredCount`,type:`number`,...R}),t[70]=R,t[71]=z);let B;t[72]===g.desiredCount?B=t[73]:(B=(0,s.jsx)(xe,{errors:[g.desiredCount]}),t[72]=g.desiredCount,t[73]=B);let V;t[74]!==z||t[75]!==B?(V=(0,s.jsxs)(o,{children:[nt,z,B]}),t[74]=z,t[75]=B,t[76]=V):V=t[76];let H;t[77]!==y||t[78]!==h||t[79]!==Pe||t[80]!==Ke||t[81]!==We||t[82]!==Me||t[83]!==Je?(H=y&&(0,s.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,s.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,s.jsx)(`div`,{className:`mt-2 space-y-1`,children:Me.map(e=>(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,s.jsx)(`input`,{checked:We.has(e.SubnetId??``),onChange:()=>{Je(`subnets`,e.SubnetId??``)},type:`checkbox`}),(0,s.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,s.jsx)(`div`,{className:`mt-2 space-y-1`,children:Pe.map(e=>(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,s.jsx)(`input`,{checked:Ke.has(e.GroupId??``),onChange:()=>{Je(`securityGroups`,e.GroupId??``)},type:`checkbox`}),(0,s.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,s.jsx)(`input`,{type:`checkbox`,...h(`assignPublicIp`)}),(0,s.jsx)(`span`,{children:`Assign public IP`})]})]}),t[77]=y,t[78]=h,t[79]=Pe,t[80]=Ke,t[81]=We,t[82]=Me,t[83]=Je,t[84]=H):H=t[84];let rt;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,s.jsx)(`h2`,{className:`font-semibold`,children:`Load balancer (optional)`}),t[85]=rt):rt=t[85];let it;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`targetGroupArn`,children:`Target group`})}),t[86]=it):it=t[86];let U;t[87]===Fe?U=t[88]:(U=e=>{let{field:t}=e;return(0,s.jsxs)(se,{onValueChange:e=>{t.onChange(e===`none`?``:e)},value:t.value===``?`none`:t.value,children:[(0,s.jsx)(oe,{className:`w-full`,id:`targetGroupArn`,children:(0,s.jsx)(re,{})}),(0,s.jsxs)(ae,{children:[(0,s.jsx)(ie,{value:`none`,children:`none`}),Fe.map(Te)]})]})},t[87]=Fe,t[88]=U);let W;t[89]!==m||t[90]!==U?(W=(0,s.jsxs)(o,{children:[it,(0,s.jsx)(_e,{control:m,name:`targetGroupArn`,render:U})]}),t[89]=m,t[90]=U,t[91]=W):W=t[91];let at;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`lbContainerName`,children:`Container name`})}),t[92]=at):at=t[92];let G;t[93]===h?G=t[94]:(G=h(`loadBalancerContainerName`),t[93]=h,t[94]=G);let K;t[95]===G?K=t[96]:(K=(0,s.jsxs)(o,{children:[at,(0,s.jsx)(r,{id:`lbContainerName`,placeholder:`app`,...G})]}),t[95]=G,t[96]=K);let ot;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`lbContainerPort`,children:`Container port`})}),t[97]=ot):ot=t[97];let q;t[98]===h?q=t[99]:(q=h(`loadBalancerContainerPort`),t[98]=h,t[99]=q);let J;t[100]===q?J=t[101]:(J=(0,s.jsxs)(o,{children:[ot,(0,s.jsx)(r,{id:`lbContainerPort`,placeholder:`80`,type:`number`,...q})]}),t[100]=q,t[101]=J);let Y;t[102]!==K||t[103]!==J?(Y=(0,s.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[K,J]}),t[102]=K,t[103]=J,t[104]=Y):Y=t[104];let X;t[105]!==W||t[106]!==Y?(X=(0,s.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[rt,W,Y]}),t[105]=W,t[106]=Y,t[107]=X):X=t[107];let st=c.isPending||Qe,Z;t[108]!==w||t[109]!==Be||t[110]!==st?(Z=(0,s.jsx)(be,{isPending:st,isSubmitting:Be,onCancel:w,pendingLabel:`Creating…`,submitLabel:`Create Service`}),t[108]=w,t[109]=Be,t[110]=st,t[111]=Z):Z=t[111];let Q;t[112]!==k||t[113]!==N||t[114]!==L||t[115]!==V||t[116]!==H||t[117]!==X||t[118]!==Z?(Q=(0,s.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:k,children:[N,L,V,H,X,Z]}),t[112]=k,t[113]=N,t[114]=L,t[115]=V,t[116]=H,t[117]=X,t[118]=Z,t[119]=Q):Q=t[119];let $;return t[120]!==E||t[121]!==D||t[122]!==O||t[123]!==Q?($=(0,s.jsxs)(s.Fragment,{children:[E,D,O,Q]}),t[120]=E,t[121]=D,t[122]=O,t[123]=Q,t[124]=$):$=t[124],$}function Te(e){return(0,s.jsx)(ie,{value:e.TargetGroupArn??``,children:e.TargetGroupName},e.TargetGroupArn)}function Ee(e){let t=we(e);return(0,s.jsx)(ie,{value:t,children:t},e)}function De(){let e=(0,Ce.c)(2),{cluster:t}=i.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,s.jsx)(c,{cluster:t}),e[0]=t,e[1]=n),n}export{De as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-DO08D5Ev.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-6kjBN-WR.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-DO08D5Ev.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-6kjBN-WR.js index 89b91bb23..c749effca 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-DO08D5Ev.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-6kjBN-WR.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as i,i as a,n as o,s,t as c}from"./select-Bgl6IAYG.js";import{t as l}from"./cli-command-panel-DPooQRso.js";import{A as te}from"./ec2-DJL24ekw.js";import{S as ne}from"./ec2-DFivrtZe.js";import{t as re}from"./create-snapshot-D2b7NxRk.js";import{t as ie}from"./page-heading-M0NyqAmu.js";import{a as ae,i as oe,n as se,t as ce}from"./zod-VwMMRSfy.js";import{t as le}from"./error-banner-BcDqaPk7.js";import{t as u}from"./form-actions-C3zG6ld2.js";import{r as d,s as f,t as p}from"./field-ChkDR_wL.js";import{t as m}from"./textarea-BNxO_Zsf.js";import{m as h}from"./ec2-CmqOirWQ.js";var g=t(),_=e();function v(){let e=(0,g.c)(53),t=r(),{data:a}=n(te),v=ne(),x;e[0]===a.Volumes?x=e[1]:(x=a.Volumes??[],e[0]=a.Volumes,e[1]=x);let S=x,{volumeId:ue}=re.useSearch(),C=ue??S[0]?.VolumeId??``,w;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=ce(h),e[2]=w):w=e[2];let T;e[3]===C?T=e[4]:(T={resolver:w,defaultValues:{volumeId:C,description:``}},e[3]=C,e[4]=T);let{control:E,handleSubmit:D,register:O,formState:k}=oe(T),{errors:A,isSubmitting:j}=k,M;e[5]===E?M=e[6]:(M={control:E},e[5]=E,e[6]=M);let N=ae(M),P;e[7]!==v||e[8]!==t?(P=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[7]=v,e[8]=t,e[9]=P):P=e[9];let F=P,I,L;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(ee,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,_.jsx)(ie,{title:`Create Snapshot`}),e[10]=I,e[11]=L):(I=e[10],L=e[11]);let R;e[12]===v.error?R=e[13]:(R=v.error&&(0,_.jsx)(le,{error:v.error,msg:`Failed to create snapshot`}),e[12]=v.error,e[13]=R);let z;e[14]!==D||e[15]!==F?(z=D(F),e[14]=D,e[15]=F,e[16]=z):z=e[16];let B;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[17]=B):B=e[17];let V;e[18]!==A.volumeId||e[19]!==S?(V=e=>{let{field:t}=e;return(0,_.jsxs)(c,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,_.jsx)(s,{"aria-invalid":!!A.volumeId,className:`w-full`,id:`volumeId`,children:(0,_.jsx)(i,{})}),(0,_.jsx)(o,{children:S.map(y)})]})},e[18]=A.volumeId,e[19]=S,e[20]=V):V=e[20];let H;e[21]!==E||e[22]!==V?(H=(0,_.jsx)(se,{control:E,name:`volumeId`,render:V}),e[21]=E,e[22]=V,e[23]=H):H=e[23];let U;e[24]===A.volumeId?U=e[25]:(U=(0,_.jsx)(d,{errors:[A.volumeId]}),e[24]=A.volumeId,e[25]=U);let W;e[26]!==H||e[27]!==U?(W=(0,_.jsxs)(p,{children:[B,H,U]}),e[26]=H,e[27]=U,e[28]=W):W=e[28];let G;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[29]=G):G=e[29];let K;e[30]===O?K=e[31]:(K=O(`description`),e[30]=O,e[31]=K);let q;e[32]===K?q=e[33]:(q=(0,_.jsxs)(p,{children:[G,(0,_.jsx)(m,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[32]=K,e[33]=q);let J;e[34]===N?J=e[35]:(J=b(N),e[34]=N,e[35]=J);let Y;e[36]===J?Y=e[37]:(Y=(0,_.jsx)(l,{commands:J}),e[36]=J,e[37]=Y);let X;e[38]===t?X=e[39]:(X=async()=>{await t({to:`/ec2/describe-snapshots`})},e[38]=t,e[39]=X);let Z;e[40]!==v.isPending||e[41]!==j||e[42]!==X?(Z=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:j,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[40]=v.isPending,e[41]=j,e[42]=X,e[43]=Z):Z=e[43];let Q;e[44]!==W||e[45]!==q||e[46]!==Y||e[47]!==Z||e[48]!==z?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[44]=W,e[45]=q,e[46]=Y,e[47]=Z,e[48]=z,e[49]=Q):Q=e[49];let $;return e[50]!==Q||e[51]!==R?($=(0,_.jsxs)(_.Fragment,{children:[I,L,R,Q]}),e[50]=Q,e[51]=R,e[52]=$):$=e[52],$}function y(e){return(0,_.jsxs)(a,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function b(e){let t=e.volumeId??``,n=e.description??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as ee}from"./back-link-DjawJm5W.js";import{c as i,i as a,n as o,s,t as c}from"./select-Bgl6IAYG.js";import{t as l}from"./cli-command-panel-DPooQRso.js";import{A as te}from"./ec2-DJL24ekw.js";import{S as ne}from"./ec2-iXujaheD.js";import{t as re}from"./create-snapshot-D5zAE9J5.js";import{t as ie}from"./page-heading-M0NyqAmu.js";import{a as ae,i as oe,n as se,t as ce}from"./zod-VwMMRSfy.js";import{t as le}from"./error-banner-BcDqaPk7.js";import{t as u}from"./form-actions-C3zG6ld2.js";import{r as d,s as f,t as p}from"./field-ChkDR_wL.js";import{t as m}from"./textarea-BNxO_Zsf.js";import{m as h}from"./ec2-Cr9GrTUU.js";var g=t(),_=e();function v(){let e=(0,g.c)(53),t=r(),{data:a}=n(te),v=ne(),x;e[0]===a.Volumes?x=e[1]:(x=a.Volumes??[],e[0]=a.Volumes,e[1]=x);let S=x,{volumeId:ue}=re.useSearch(),C=ue??S[0]?.VolumeId??``,w;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=ce(h),e[2]=w):w=e[2];let T;e[3]===C?T=e[4]:(T={resolver:w,defaultValues:{volumeId:C,description:``}},e[3]=C,e[4]=T);let{control:E,handleSubmit:D,register:O,formState:k}=oe(T),{errors:A,isSubmitting:j}=k,M;e[5]===E?M=e[6]:(M={control:E},e[5]=E,e[6]=M);let N=ae(M),P;e[7]!==v||e[8]!==t?(P=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[7]=v,e[8]=t,e[9]=P):P=e[9];let F=P,I,L;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(ee,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,_.jsx)(ie,{title:`Create Snapshot`}),e[10]=I,e[11]=L):(I=e[10],L=e[11]);let R;e[12]===v.error?R=e[13]:(R=v.error&&(0,_.jsx)(le,{error:v.error,msg:`Failed to create snapshot`}),e[12]=v.error,e[13]=R);let z;e[14]!==D||e[15]!==F?(z=D(F),e[14]=D,e[15]=F,e[16]=z):z=e[16];let B;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[17]=B):B=e[17];let V;e[18]!==A.volumeId||e[19]!==S?(V=e=>{let{field:t}=e;return(0,_.jsxs)(c,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,_.jsx)(s,{"aria-invalid":!!A.volumeId,className:`w-full`,id:`volumeId`,children:(0,_.jsx)(i,{})}),(0,_.jsx)(o,{children:S.map(y)})]})},e[18]=A.volumeId,e[19]=S,e[20]=V):V=e[20];let H;e[21]!==E||e[22]!==V?(H=(0,_.jsx)(se,{control:E,name:`volumeId`,render:V}),e[21]=E,e[22]=V,e[23]=H):H=e[23];let U;e[24]===A.volumeId?U=e[25]:(U=(0,_.jsx)(d,{errors:[A.volumeId]}),e[24]=A.volumeId,e[25]=U);let W;e[26]!==H||e[27]!==U?(W=(0,_.jsxs)(p,{children:[B,H,U]}),e[26]=H,e[27]=U,e[28]=W):W=e[28];let G;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[29]=G):G=e[29];let K;e[30]===O?K=e[31]:(K=O(`description`),e[30]=O,e[31]=K);let q;e[32]===K?q=e[33]:(q=(0,_.jsxs)(p,{children:[G,(0,_.jsx)(m,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[32]=K,e[33]=q);let J;e[34]===N?J=e[35]:(J=b(N),e[34]=N,e[35]=J);let Y;e[36]===J?Y=e[37]:(Y=(0,_.jsx)(l,{commands:J}),e[36]=J,e[37]=Y);let X;e[38]===t?X=e[39]:(X=async()=>{await t({to:`/ec2/describe-snapshots`})},e[38]=t,e[39]=X);let Z;e[40]!==v.isPending||e[41]!==j||e[42]!==X?(Z=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:j,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[40]=v.isPending,e[41]=j,e[42]=X,e[43]=Z):Z=e[43];let Q;e[44]!==W||e[45]!==q||e[46]!==Y||e[47]!==Z||e[48]!==z?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[44]=W,e[45]=q,e[46]=Y,e[47]=Z,e[48]=z,e[49]=Q):Q=e[49];let $;return e[50]!==Q||e[51]!==R?($=(0,_.jsxs)(_.Fragment,{children:[I,L,R,Q]}),e[50]=Q,e[51]=R,e[52]=$):$=e[52],$}function y(e){return(0,_.jsxs)(a,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function b(e){let t=e.volumeId??``,n=e.description??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\ --volume-id`},{type:`value`,value:` ${t||``}`}];return n&&r.push({type:`flag`,value:` \\ --description`},{type:`value`,value:` "${n}"`}),[{label:`Create Snapshot`,parts:r}]}export{v as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-D2b7NxRk.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-D5zAE9J5.js similarity index 74% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-D2b7NxRk.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-D5zAE9J5.js index aa7c3e053..1d04edce3 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-D2b7NxRk.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-snapshot-D5zAE9J5.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-snapshot-DO08D5Ev.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/cli-command-panel-DPooQRso.js","assets/copy-3Ip4Zkw5.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/ec2-CmqOirWQ.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{A as a}from"./ec2-DJL24ekw.js";var o=()=>i(()=>import(`./create-snapshot-DO08D5Ev.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])),s=r({volumeId:n().optional().catch(void 0)}),c=e(`/_auth/ec2/(snapshots)/create-snapshot`)({validateSearch:s,loader:async({context:e})=>{await e.queryClient.query({...a,staleTime:`static`})},head:()=>({meta:[{title:`Create Snapshot | EC2 | Mulga`}]}),component:t(o,`component`)});export{c as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-snapshot-6kjBN-WR.js","assets/compiler-runtime-DTT1fEHg.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/cli-command-panel-DPooQRso.js","assets/copy-3Ip4Zkw5.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/textarea-BNxO_Zsf.js","assets/ec2-Cr9GrTUU.js","assets/elbv2-B_G5anft.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{A as a}from"./ec2-DJL24ekw.js";var o=()=>i(()=>import(`./create-snapshot-6kjBN-WR.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])),s=r({volumeId:n().optional().catch(void 0)}),c=e(`/_auth/ec2/(snapshots)/create-snapshot`)({validateSearch:s,loader:async({context:e})=>{await e.queryClient.query({...a,staleTime:`static`})},head:()=>({meta:[{title:`Create Snapshot | EC2 | Mulga`}]}),component:t(o,`component`)});export{c as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-subnet-DRdJTQuZ.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-subnet-CwCaYy-j.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-subnet-DRdJTQuZ.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-subnet-CwCaYy-j.js index 28b9fa1e6..dd6394ea0 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-subnet-DRdJTQuZ.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-subnet-CwCaYy-j.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./back-link-DjawJm5W.js";import{c as ee,i as o,n as te,s as ne,t as re}from"./select-Bgl6IAYG.js";import{t as ie}from"./cli-command-panel-DPooQRso.js";import{t as ae}from"./input-CpcyJw4R.js";import{M as oe,r as se}from"./ec2-DJL24ekw.js";import{C as ce}from"./ec2-DFivrtZe.js";import{t as le}from"./page-heading-M0NyqAmu.js";import{a as ue,i as de,n as s,t as fe}from"./zod-VwMMRSfy.js";import{t as pe}from"./error-banner-BcDqaPk7.js";import{t as me}from"./form-actions-C3zG6ld2.js";import{r as he,s as c,t as l}from"./field-ChkDR_wL.js";import{h as ge}from"./ec2-CmqOirWQ.js";var _e=t(),u=e();function d(){let e=(0,_e.c)(72),t=r(),{data:i}=n(oe),{data:d}=n(se),f=ce(),p;e[0]===i.Vpcs?p=e[1]:(p=i.Vpcs??[],e[0]=i.Vpcs,e[1]=p);let m=p,h;e[2]===d.AvailabilityZones?h=e[3]:(h=d.AvailabilityZones??[],e[2]=d.AvailabilityZones,e[3]=h);let g=h,_;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=fe(ge),e[4]=_):_=e[4];let v=m[0]?.VpcId??``,y;e[5]===v?y=e[6]:(y={resolver:_,defaultValues:{vpcId:v,cidrBlock:`10.0.1.0/24`,availabilityZone:void 0,mapPublicIpOnLaunch:!1}},e[5]=v,e[6]=y);let{control:b,handleSubmit:Se,register:x,formState:Ce}=de(y),{errors:S,isSubmitting:C}=Ce,w;e[7]===b?w=e[8]:(w={control:b},e[7]=b,e[8]=w);let T=ue(w),E;e[9]!==f||e[10]!==t?(E=async e=>{let n=(await f.mutateAsync(e)).Subnet?.SubnetId;t(n?{to:`/ec2/describe-subnets/$id`,params:{id:n}}:{to:`/ec2/describe-subnets`})},e[9]=f,e[10]=t,e[11]=E):E=e[11];let D=E,O,k;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,u.jsx)(a,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),k=(0,u.jsx)(le,{title:`Create Subnet`}),e[12]=O,e[13]=k):(O=e[12],k=e[13]);let A;e[14]===f.error?A=e[15]:(A=f.error&&(0,u.jsx)(pe,{error:f.error,msg:`Failed to create subnet`}),e[14]=f.error,e[15]=A);let j;e[16]!==Se||e[17]!==D?(j=Se(D),e[16]=Se,e[17]=D,e[18]=j):j=e[18];let M;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[19]=M):M=e[19];let N;e[20]!==S.vpcId||e[21]!==m?(N=e=>{let{field:t}=e;return(0,u.jsxs)(re,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,u.jsx)(ne,{"aria-invalid":!!S.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(ee,{})}),(0,u.jsx)(te,{children:m.map(be)})]})},e[20]=S.vpcId,e[21]=m,e[22]=N):N=e[22];let P;e[23]!==b||e[24]!==N?(P=(0,u.jsx)(s,{control:b,name:`vpcId`,render:N}),e[23]=b,e[24]=N,e[25]=P):P=e[25];let F;e[26]===S.vpcId?F=e[27]:(F=(0,u.jsx)(he,{errors:[S.vpcId]}),e[26]=S.vpcId,e[27]=F);let I;e[28]!==P||e[29]!==F?(I=(0,u.jsxs)(l,{children:[M,P,F]}),e[28]=P,e[29]=F,e[30]=I):I=e[30];let L;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`cidrBlock`,children:`CIDR Block`})}),e[31]=L):L=e[31];let R=!!S.cidrBlock,z;e[32]===x?z=e[33]:(z=x(`cidrBlock`),e[32]=x,e[33]=z);let B;e[34]!==R||e[35]!==z?(B=(0,u.jsx)(ae,{"aria-invalid":R,id:`cidrBlock`,placeholder:`10.0.1.0/24`,...z}),e[34]=R,e[35]=z,e[36]=B):B=e[36];let V;e[37]===S.cidrBlock?V=e[38]:(V=(0,u.jsx)(he,{errors:[S.cidrBlock]}),e[37]=S.cidrBlock,e[38]=V);let H;e[39]!==B||e[40]!==V?(H=(0,u.jsxs)(l,{children:[L,B,V]}),e[39]=B,e[40]=V,e[41]=H):H=e[41];let U;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone (optional)`})}),e[42]=U):U=e[42];let W;e[43]===g?W=e[44]:(W=e=>{let{field:t}=e;return(0,u.jsxs)(re,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,u.jsx)(ne,{className:`w-full`,id:`availabilityZone`,children:(0,u.jsx)(ee,{})}),(0,u.jsxs)(te,{children:[(0,u.jsx)(o,{value:`none`,children:`none`}),g.map(ye)]})]})},e[43]=g,e[44]=W);let G;e[45]!==b||e[46]!==W?(G=(0,u.jsxs)(l,{children:[U,(0,u.jsx)(s,{control:b,name:`availabilityZone`,render:W})]}),e[45]=b,e[46]=W,e[47]=G):G=e[47];let K;e[48]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,u.jsx)(c,{children:`Auto-assign public IPv4`}),e[48]=K):K=e[48];let q;e[49]===b?q=e[50]:(q=(0,u.jsxs)(l,{children:[K,(0,u.jsx)(s,{control:b,name:`mapPublicIpOnLaunch`,render:ve})]}),e[49]=b,e[50]=q);let J;e[51]===T?J=e[52]:(J=xe(T),e[51]=T,e[52]=J);let Y;e[53]===J?Y=e[54]:(Y=(0,u.jsx)(ie,{commands:J}),e[53]=J,e[54]=Y);let X;e[55]===t?X=e[56]:(X=async()=>{await t({to:`/ec2/describe-subnets`})},e[55]=t,e[56]=X);let Z;e[57]!==f.isPending||e[58]!==C||e[59]!==X?(Z=(0,u.jsx)(me,{isPending:f.isPending,isSubmitting:C,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Subnet`}),e[57]=f.isPending,e[58]=C,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==j||e[62]!==I||e[63]!==H||e[64]!==G||e[65]!==q||e[66]!==Y||e[67]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[I,H,G,q,Y,Z]}),e[61]=j,e[62]=I,e[63]=H,e[64]=G,e[65]=q,e[66]=Y,e[67]=Z,e[68]=Q):Q=e[68];let $;return e[69]!==A||e[70]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[O,k,A,Q]}),e[69]=A,e[70]=Q,e[71]=$):$=e[71],$}function ve(e){let{field:t}=e;return(0,u.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,u.jsx)(`input`,{"aria-label":`Enable auto-assign public IPv4 address`,checked:t.value??!1,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Enable auto-assign public IPv4 address`]})}function ye(e){return(0,u.jsx)(o,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function be(e){let t=i(e.Tags);return(0,u.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function xe(e){let t=e.vpcId??``,n=e.cidrBlock??``,r=e.availabilityZone??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-subnet`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./back-link-DjawJm5W.js";import{c as ee,i as o,n as te,s as ne,t as re}from"./select-Bgl6IAYG.js";import{t as ie}from"./cli-command-panel-DPooQRso.js";import{t as ae}from"./input-CpcyJw4R.js";import{M as oe,r as se}from"./ec2-DJL24ekw.js";import{C as ce}from"./ec2-iXujaheD.js";import{t as le}from"./page-heading-M0NyqAmu.js";import{a as ue,i as de,n as s,t as fe}from"./zod-VwMMRSfy.js";import{t as pe}from"./error-banner-BcDqaPk7.js";import{t as me}from"./form-actions-C3zG6ld2.js";import{r as he,s as c,t as l}from"./field-ChkDR_wL.js";import{h as ge}from"./ec2-Cr9GrTUU.js";var _e=t(),u=e();function d(){let e=(0,_e.c)(72),t=r(),{data:i}=n(oe),{data:d}=n(se),f=ce(),p;e[0]===i.Vpcs?p=e[1]:(p=i.Vpcs??[],e[0]=i.Vpcs,e[1]=p);let m=p,h;e[2]===d.AvailabilityZones?h=e[3]:(h=d.AvailabilityZones??[],e[2]=d.AvailabilityZones,e[3]=h);let g=h,_;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=fe(ge),e[4]=_):_=e[4];let v=m[0]?.VpcId??``,y;e[5]===v?y=e[6]:(y={resolver:_,defaultValues:{vpcId:v,cidrBlock:`10.0.1.0/24`,availabilityZone:void 0,mapPublicIpOnLaunch:!1}},e[5]=v,e[6]=y);let{control:b,handleSubmit:Se,register:x,formState:Ce}=de(y),{errors:S,isSubmitting:C}=Ce,w;e[7]===b?w=e[8]:(w={control:b},e[7]=b,e[8]=w);let T=ue(w),E;e[9]!==f||e[10]!==t?(E=async e=>{let n=(await f.mutateAsync(e)).Subnet?.SubnetId;t(n?{to:`/ec2/describe-subnets/$id`,params:{id:n}}:{to:`/ec2/describe-subnets`})},e[9]=f,e[10]=t,e[11]=E):E=e[11];let D=E,O,k;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,u.jsx)(a,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),k=(0,u.jsx)(le,{title:`Create Subnet`}),e[12]=O,e[13]=k):(O=e[12],k=e[13]);let A;e[14]===f.error?A=e[15]:(A=f.error&&(0,u.jsx)(pe,{error:f.error,msg:`Failed to create subnet`}),e[14]=f.error,e[15]=A);let j;e[16]!==Se||e[17]!==D?(j=Se(D),e[16]=Se,e[17]=D,e[18]=j):j=e[18];let M;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[19]=M):M=e[19];let N;e[20]!==S.vpcId||e[21]!==m?(N=e=>{let{field:t}=e;return(0,u.jsxs)(re,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,u.jsx)(ne,{"aria-invalid":!!S.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(ee,{})}),(0,u.jsx)(te,{children:m.map(be)})]})},e[20]=S.vpcId,e[21]=m,e[22]=N):N=e[22];let P;e[23]!==b||e[24]!==N?(P=(0,u.jsx)(s,{control:b,name:`vpcId`,render:N}),e[23]=b,e[24]=N,e[25]=P):P=e[25];let F;e[26]===S.vpcId?F=e[27]:(F=(0,u.jsx)(he,{errors:[S.vpcId]}),e[26]=S.vpcId,e[27]=F);let I;e[28]!==P||e[29]!==F?(I=(0,u.jsxs)(l,{children:[M,P,F]}),e[28]=P,e[29]=F,e[30]=I):I=e[30];let L;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`cidrBlock`,children:`CIDR Block`})}),e[31]=L):L=e[31];let R=!!S.cidrBlock,z;e[32]===x?z=e[33]:(z=x(`cidrBlock`),e[32]=x,e[33]=z);let B;e[34]!==R||e[35]!==z?(B=(0,u.jsx)(ae,{"aria-invalid":R,id:`cidrBlock`,placeholder:`10.0.1.0/24`,...z}),e[34]=R,e[35]=z,e[36]=B):B=e[36];let V;e[37]===S.cidrBlock?V=e[38]:(V=(0,u.jsx)(he,{errors:[S.cidrBlock]}),e[37]=S.cidrBlock,e[38]=V);let H;e[39]!==B||e[40]!==V?(H=(0,u.jsxs)(l,{children:[L,B,V]}),e[39]=B,e[40]=V,e[41]=H):H=e[41];let U;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone (optional)`})}),e[42]=U):U=e[42];let W;e[43]===g?W=e[44]:(W=e=>{let{field:t}=e;return(0,u.jsxs)(re,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,u.jsx)(ne,{className:`w-full`,id:`availabilityZone`,children:(0,u.jsx)(ee,{})}),(0,u.jsxs)(te,{children:[(0,u.jsx)(o,{value:`none`,children:`none`}),g.map(ye)]})]})},e[43]=g,e[44]=W);let G;e[45]!==b||e[46]!==W?(G=(0,u.jsxs)(l,{children:[U,(0,u.jsx)(s,{control:b,name:`availabilityZone`,render:W})]}),e[45]=b,e[46]=W,e[47]=G):G=e[47];let K;e[48]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,u.jsx)(c,{children:`Auto-assign public IPv4`}),e[48]=K):K=e[48];let q;e[49]===b?q=e[50]:(q=(0,u.jsxs)(l,{children:[K,(0,u.jsx)(s,{control:b,name:`mapPublicIpOnLaunch`,render:ve})]}),e[49]=b,e[50]=q);let J;e[51]===T?J=e[52]:(J=xe(T),e[51]=T,e[52]=J);let Y;e[53]===J?Y=e[54]:(Y=(0,u.jsx)(ie,{commands:J}),e[53]=J,e[54]=Y);let X;e[55]===t?X=e[56]:(X=async()=>{await t({to:`/ec2/describe-subnets`})},e[55]=t,e[56]=X);let Z;e[57]!==f.isPending||e[58]!==C||e[59]!==X?(Z=(0,u.jsx)(me,{isPending:f.isPending,isSubmitting:C,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Subnet`}),e[57]=f.isPending,e[58]=C,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==j||e[62]!==I||e[63]!==H||e[64]!==G||e[65]!==q||e[66]!==Y||e[67]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[I,H,G,q,Y,Z]}),e[61]=j,e[62]=I,e[63]=H,e[64]=G,e[65]=q,e[66]=Y,e[67]=Z,e[68]=Q):Q=e[68];let $;return e[69]!==A||e[70]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[O,k,A,Q]}),e[69]=A,e[70]=Q,e[71]=$):$=e[71],$}function ve(e){let{field:t}=e;return(0,u.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,u.jsx)(`input`,{"aria-label":`Enable auto-assign public IPv4 address`,checked:t.value??!1,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Enable auto-assign public IPv4 address`]})}function ye(e){return(0,u.jsx)(o,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function be(e){let t=i(e.Tags);return(0,u.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function xe(e){let t=e.vpcId??``,n=e.cidrBlock??``,r=e.availabilityZone??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-subnet`},{type:`flag`,value:` \\ --vpc-id`},{type:`value`,value:` ${t||``}`},{type:`flag`,value:` \\ --cidr-block`},{type:`value`,value:` ${n||``}`}];r&&i.push({type:`flag`,value:` \\ --availability-zone`},{type:`value`,value:` ${r}`});let a=[{label:`Create Subnet`,parts:i}];return e.mapPublicIpOnLaunch===!0&&a.push({label:`Enable auto-assign public IPv4`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 modify-subnet-attribute`},{type:`flag`,value:` \\ diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-target-group-DZ5GDr-5.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-target-group-6Q20aaDf.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-target-group-DZ5GDr-5.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-target-group-6Q20aaDf.js index a0ecaebca..b9a478c4a 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-target-group-DZ5GDr-5.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-target-group-6Q20aaDf.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{t as a}from"./cli-command-panel-DPooQRso.js";import{M as o}from"./ec2-DJL24ekw.js";import{i as s}from"./elbv2-CBiYqcpA.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{i as l,t as u}from"./zod-VwMMRSfy.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{t as f}from"./form-actions-C3zG6ld2.js";import{t as p}from"./target-group-form-DZJOr6m0.js";import{a as m}from"./elbv2-D92OK4oO.js";var h=t(),g=e();function _(){let e=(0,h.c)(38),t=r(),{data:_}=n(o),y=s(),b;e[0]===_.Vpcs?b=e[1]:(b=_.Vpcs??[],e[0]=_.Vpcs,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=u(m),e[2]=S):S=e[2];let C=x[0]?.VpcId??``,w,T;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},T=[],e[3]=w,e[4]=T):(w=e[3],T=e[4]);let E;e[5]===C?E=e[6]:(E={resolver:S,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:C,healthCheck:w,tags:T}},e[5]=C,e[6]=E);let D=l(E),{handleSubmit:O,watch:k,formState:A}=D,{isSubmitting:j}=A,M;e[7]!==y||e[8]!==t?(M=async e=>{try{let n=(await y.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;t(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}},e[7]=y,e[8]=t,e[9]=M):M=e[9];let N=M,P,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,g.jsx)(i,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),F=(0,g.jsx)(c,{title:`Create Target Group`}),e[10]=P,e[11]=F):(P=e[10],F=e[11]);let I;e[12]===y.error?I=e[13]:(I=y.error&&(0,g.jsx)(d,{error:y.error,msg:`Failed to create target group`}),e[12]=y.error,e[13]=I);let L;e[14]!==O||e[15]!==N?(L=O(N),e[14]=O,e[15]=N,e[16]=L):L=e[16];let R;e[17]!==D||e[18]!==x?(R=(0,g.jsx)(p,{form:D,vpcs:x}),e[17]=D,e[18]=x,e[19]=R):R=e[19];let z;e[20]===k?z=e[21]:(z=v(k),e[20]=k,e[21]=z);let B;e[22]===z?B=e[23]:(B=(0,g.jsx)(a,{commands:z}),e[22]=z,e[23]=B);let V;e[24]===t?V=e[25]:(V=async()=>{await t({to:`/ec2/describe-target-groups`})},e[24]=t,e[25]=V);let H;e[26]!==y.isPending||e[27]!==j||e[28]!==V?(H=(0,g.jsx)(f,{isPending:y.isPending,isSubmitting:j,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Target Group`}),e[26]=y.isPending,e[27]=j,e[28]=V,e[29]=H):H=e[29];let U;e[30]!==L||e[31]!==R||e[32]!==B||e[33]!==H?(U=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[R,B,H]}),e[30]=L,e[31]=R,e[32]=B,e[33]=H,e[34]=U):U=e[34];let W;return e[35]!==I||e[36]!==U?(W=(0,g.jsxs)(g.Fragment,{children:[P,F,I,U]}),e[35]=I,e[36]=U,e[37]=W):W=e[37],W}function v(e){let t=e(`name`),n=e(`protocol`)||`HTTP`,r=e(`port`),i=e(`vpcId`),a=e(`healthCheck.protocol`)||`HTTP`,o=e(`healthCheck.path`)||`/`,s=e(`healthCheck.port`)||`traffic-port`,c=e(`healthCheck.intervalSeconds`),l=e(`healthCheck.timeoutSeconds`),u=e(`healthCheck.healthyThresholdCount`),d=e(`healthCheck.unhealthyThresholdCount`),f=e(`healthCheck.matcher`)||`200`,p=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{t as a}from"./cli-command-panel-DPooQRso.js";import{M as o}from"./ec2-DJL24ekw.js";import{i as s}from"./elbv2-CBiYqcpA.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{i as l,t as u}from"./zod-VwMMRSfy.js";import{t as d}from"./error-banner-BcDqaPk7.js";import{t as f}from"./form-actions-C3zG6ld2.js";import{a as p}from"./elbv2-B_G5anft.js";import{t as m}from"./target-group-form-DZJOr6m0.js";var h=t(),g=e();function _(){let e=(0,h.c)(38),t=r(),{data:_}=n(o),y=s(),b;e[0]===_.Vpcs?b=e[1]:(b=_.Vpcs??[],e[0]=_.Vpcs,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=u(p),e[2]=S):S=e[2];let C=x[0]?.VpcId??``,w,T;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},T=[],e[3]=w,e[4]=T):(w=e[3],T=e[4]);let E;e[5]===C?E=e[6]:(E={resolver:S,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:C,healthCheck:w,tags:T}},e[5]=C,e[6]=E);let D=l(E),{handleSubmit:O,watch:k,formState:A}=D,{isSubmitting:j}=A,M;e[7]!==y||e[8]!==t?(M=async e=>{try{let n=(await y.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;t(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}},e[7]=y,e[8]=t,e[9]=M):M=e[9];let N=M,P,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,g.jsx)(i,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),F=(0,g.jsx)(c,{title:`Create Target Group`}),e[10]=P,e[11]=F):(P=e[10],F=e[11]);let I;e[12]===y.error?I=e[13]:(I=y.error&&(0,g.jsx)(d,{error:y.error,msg:`Failed to create target group`}),e[12]=y.error,e[13]=I);let L;e[14]!==O||e[15]!==N?(L=O(N),e[14]=O,e[15]=N,e[16]=L):L=e[16];let R;e[17]!==D||e[18]!==x?(R=(0,g.jsx)(m,{form:D,vpcs:x}),e[17]=D,e[18]=x,e[19]=R):R=e[19];let z;e[20]===k?z=e[21]:(z=v(k),e[20]=k,e[21]=z);let B;e[22]===z?B=e[23]:(B=(0,g.jsx)(a,{commands:z}),e[22]=z,e[23]=B);let V;e[24]===t?V=e[25]:(V=async()=>{await t({to:`/ec2/describe-target-groups`})},e[24]=t,e[25]=V);let H;e[26]!==y.isPending||e[27]!==j||e[28]!==V?(H=(0,g.jsx)(f,{isPending:y.isPending,isSubmitting:j,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Target Group`}),e[26]=y.isPending,e[27]=j,e[28]=V,e[29]=H):H=e[29];let U;e[30]!==L||e[31]!==R||e[32]!==B||e[33]!==H?(U=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[R,B,H]}),e[30]=L,e[31]=R,e[32]=B,e[33]=H,e[34]=U):U=e[34];let W;return e[35]!==I||e[36]!==U?(W=(0,g.jsxs)(g.Fragment,{children:[P,F,I,U]}),e[35]=I,e[36]=U,e[37]=W):W=e[37],W}function v(e){let t=e(`name`),n=e(`protocol`)||`HTTP`,r=e(`port`),i=e(`vpcId`),a=e(`healthCheck.protocol`)||`HTTP`,o=e(`healthCheck.path`)||`/`,s=e(`healthCheck.port`)||`traffic-port`,c=e(`healthCheck.intervalSeconds`),l=e(`healthCheck.timeoutSeconds`),u=e(`healthCheck.healthyThresholdCount`),d=e(`healthCheck.unhealthyThresholdCount`),f=e(`healthCheck.matcher`)||`200`,p=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ --name`},{type:`value`,value:` ${t||``}`},{type:`flag`,value:` \\ --protocol`},{type:`value`,value:` ${n}`},{type:`flag`,value:` \\ --port`},{type:`value`,value:` ${r??80}`},{type:`flag`,value:` \\ diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-volume-Ccy7m1H7.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-volume-DWaiGJ7o.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-volume-Ccy7m1H7.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-volume-DWaiGJ7o.js index 214822c3b..6a33e9de3 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-volume-Ccy7m1H7.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-volume-DWaiGJ7o.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{c as ee,i as a,n as o,s,t as c}from"./select-Bgl6IAYG.js";import{t as l}from"./cli-command-panel-DPooQRso.js";import{t as te}from"./input-CpcyJw4R.js";import{r as ne}from"./ec2-DJL24ekw.js";import{w as re}from"./ec2-DFivrtZe.js";import{t as ie}from"./page-heading-M0NyqAmu.js";import{i as ae,n as oe,t as se}from"./zod-VwMMRSfy.js";import{t as ce}from"./error-banner-BcDqaPk7.js";import{t as le}from"./form-actions-C3zG6ld2.js";import{r as u,s as d,t as f}from"./field-ChkDR_wL.js";import{g as p}from"./ec2-CmqOirWQ.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=r(),{data:a}=n(ne),g=re(),y;e[0]===a.AvailabilityZones?y=e[1]:(y=a.AvailabilityZones??[],e[0]=a.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=se(p),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=ae(C),{errors:k,isSubmitting:A}=O,j;e[5]!==g||e[6]!==t?(j=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=g,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,h.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,h.jsx)(ie,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===g.error?F=e[11]:(F=g.error&&(0,h.jsx)(ce,{error:g.error,msg:`Failed to create volume`}),e[10]=g.error,e[11]=F);let I;e[12]!==T||e[13]!==M?(I=T(M),e[12]=T,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,h.jsx)(d,{children:(0,h.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=L):L=e[15];let R=!!k.size,z;e[16]===E?z=e[17]:(z=E(`size`,{valueAsNumber:!0}),e[16]=E,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,h.jsx)(te,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===k.size?V=e[22]:(V=(0,h.jsx)(u,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,h.jsxs)(f,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,h.jsx)(d,{children:(0,h.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=U):U=e[26];let W;e[27]!==b||e[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,h.jsx)(s,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,h.jsx)(ee,{})}),(0,h.jsx)(o,{children:b.map(_)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,h.jsx)(oe,{control:w,name:`availabilityZone`,render:W}),e[30]=w,e[31]=W,e[32]=G):G=e[32];let K;e[33]===k.availabilityZone?K=e[34]:(K=(0,h.jsx)(u,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(f,{children:[U,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===D?J=e[39]:(J=v(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(l,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>{await t({to:`/ec2/describe-volumes`})},e[42]=t,e[43]=X);let Z;e[44]!==g.isPending||e[45]!==A||e[46]!==X?(Z=(0,h.jsx)(le,{isPending:g.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=g.isPending,e[45]=A,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==H||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==I?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[48]=H,e[49]=q,e[50]=Y,e[51]=Z,e[52]=I,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==F?($=(0,h.jsxs)(h.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function _(e){return(0,h.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function v(e){let t=e(`size`),n=e(`availabilityZone`);return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./useNavigate-BiiHYpLW.js";import{t as i}from"./back-link-DjawJm5W.js";import{c as ee,i as a,n as o,s,t as c}from"./select-Bgl6IAYG.js";import{t as l}from"./cli-command-panel-DPooQRso.js";import{t as te}from"./input-CpcyJw4R.js";import{r as ne}from"./ec2-DJL24ekw.js";import{w as re}from"./ec2-iXujaheD.js";import{t as ie}from"./page-heading-M0NyqAmu.js";import{i as ae,n as oe,t as se}from"./zod-VwMMRSfy.js";import{t as ce}from"./error-banner-BcDqaPk7.js";import{t as le}from"./form-actions-C3zG6ld2.js";import{r as u,s as d,t as f}from"./field-ChkDR_wL.js";import{g as p}from"./ec2-Cr9GrTUU.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=r(),{data:a}=n(ne),g=re(),y;e[0]===a.AvailabilityZones?y=e[1]:(y=a.AvailabilityZones??[],e[0]=a.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=se(p),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=ae(C),{errors:k,isSubmitting:A}=O,j;e[5]!==g||e[6]!==t?(j=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=g,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,h.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,h.jsx)(ie,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===g.error?F=e[11]:(F=g.error&&(0,h.jsx)(ce,{error:g.error,msg:`Failed to create volume`}),e[10]=g.error,e[11]=F);let I;e[12]!==T||e[13]!==M?(I=T(M),e[12]=T,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,h.jsx)(d,{children:(0,h.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=L):L=e[15];let R=!!k.size,z;e[16]===E?z=e[17]:(z=E(`size`,{valueAsNumber:!0}),e[16]=E,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,h.jsx)(te,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===k.size?V=e[22]:(V=(0,h.jsx)(u,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,h.jsxs)(f,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,h.jsx)(d,{children:(0,h.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=U):U=e[26];let W;e[27]!==b||e[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,h.jsx)(s,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,h.jsx)(ee,{})}),(0,h.jsx)(o,{children:b.map(_)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,h.jsx)(oe,{control:w,name:`availabilityZone`,render:W}),e[30]=w,e[31]=W,e[32]=G):G=e[32];let K;e[33]===k.availabilityZone?K=e[34]:(K=(0,h.jsx)(u,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(f,{children:[U,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===D?J=e[39]:(J=v(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(l,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>{await t({to:`/ec2/describe-volumes`})},e[42]=t,e[43]=X);let Z;e[44]!==g.isPending||e[45]!==A||e[46]!==X?(Z=(0,h.jsx)(le,{isPending:g.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=g.isPending,e[45]=A,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==H||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==I?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[48]=H,e[49]=q,e[50]=Y,e[51]=Z,e[52]=I,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==F?($=(0,h.jsxs)(h.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function _(e){return(0,h.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function v(e){let t=e(`size`),n=e(`availabilityZone`);return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\ --size`},{type:`value`,value:` ${t||1}`},{type:`flag`,value:` \\ --availability-zone`},{type:`value`,value:` ${n||``}`}]}]}export{g as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-vpc-C-whSRxb.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-vpc-C-whSRxb.js deleted file mode 100644 index d3ec44bdc..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/create-vpc-C-whSRxb.js +++ /dev/null @@ -1,32 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{t as a}from"./back-link-DjawJm5W.js";import{t as o}from"./chevron-down-DuqoHmYM.js";import{t as s}from"./chevron-right-FPuH5D53.js";import{c,i as l,n as u,s as d,t as f}from"./select-Bgl6IAYG.js";import{t as p}from"./cli-command-panel-DPooQRso.js";import{t as ee}from"./button-Bae9vdts.js";import{t as te}from"./input-CpcyJw4R.js";import{E as m,T as h}from"./ec2-DFivrtZe.js";import{t as g}from"./page-heading-M0NyqAmu.js";import{a as _,i as ne,n as v,t as re}from"./zod-VwMMRSfy.js";import{t as ie}from"./error-banner-BcDqaPk7.js";import{t as ae}from"./form-actions-C3zG6ld2.js";import{r as oe,s as y,t as b}from"./field-ChkDR_wL.js";import{a as se,t as ce}from"./subnet-calculator-DDrAb5xp.js";import{_ as le}from"./ec2-CmqOirWQ.js";var x=r(),ue=t(n(),1),S=e();function de(e){let t=(0,x.c)(19),{form:n,type:r,count:i,defaults:a}=e,[c,l]=(0,ue.useState)(!1),u=r===`public`?`publicSubnetCidrs`:`privateSubnetCidrs`,d=n.formState.errors[u],f=c||d!==void 0;if(i===0)return null;let p;t[0]===c?p=t[1]:(p=()=>{l(!c)},t[0]=c,t[1]=p);let m;t[2]===f?m=t[3]:(m=f?(0,S.jsx)(o,{className:`size-3`}):(0,S.jsx)(s,{className:`size-3`}),t[2]=f,t[3]=m);let h;t[4]!==p||t[5]!==m||t[6]!==r?(h=(0,S.jsxs)(ee,{onClick:p,type:`button`,size:`inline`,variant:`link-muted`,children:[m,`Customize `,r,` subnet CIDR blocks`]}),t[4]=p,t[5]=m,t[6]=r,t[7]=h):h=t[7];let g;t[8]!==i||t[9]!==a||t[10]!==d||t[11]!==u||t[12]!==n||t[13]!==f||t[14]!==r?(g=f&&(0,S.jsx)(`div`,{className:`mt-2 space-y-2`,children:Array.from({length:i},(e,t)=>(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`span`,{className:`w-32 shrink-0 text-xs text-muted-foreground`,children:[r===`public`?`Public`:`Private`,` subnet `,t+1]}),(0,S.jsx)(te,{"aria-invalid":d?.[t]!==void 0,"aria-label":`${r===`public`?`Public`:`Private`} subnet ${t+1} CIDR`,placeholder:a[t],...n.register(`${u}.${t}`)})]}),(0,S.jsx)(oe,{className:`ml-34`,errors:[d?.[t]]})]},t))}),t[8]=i,t[9]=a,t[10]=d,t[11]=u,t[12]=n,t[13]=f,t[14]=r,t[15]=g):g=t[15];let _;return t[16]!==h||t[17]!==g?(_=(0,S.jsxs)(`div`,{className:`mt-2`,children:[h,g]}),t[16]=h,t[17]=g,t[18]=_):_=t[18],_}function C(e){let t=(0,x.c)(8),{label:n,cidr:r,variant:i}=e,a=`rounded-md border px-3 py-2 text-xs ${i===`public`?`border-success/30 bg-success/10`:`border-info/30 bg-info/10`}`,o;t[0]===n?o=t[1]:(o=(0,S.jsx)(`div`,{className:`font-medium`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,S.jsx)(`div`,{className:`text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,S.jsxs)(`div`,{className:a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function fe(e){let t=(0,x.c)(14),{mode:n,vpcCidr:r,publicSubnets:i,privateSubnets:a,hasIgw:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,S.jsx)(`h3`,{className:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`,children:`Preview`}),t[0]=s):s=t[0];let c;t[1]===r?c=t[2]:(c=(0,S.jsxs)(`div`,{className:`mb-3 text-xs font-medium`,children:[`VPC `,(0,S.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,r,`)`]})]}),t[1]=r,t[2]=c);let l;t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==i?(l=n===`vpc-and-more`&&(0,S.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Subnets`}),i.map(w),a.map(pe),i.length===0&&a.length===0&&(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No subnets`})]}),(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Route Tables`}),i.length>0&&(0,S.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:`Public Route Table`}),(0,S.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`0.0.0.0/0 → IGW`}),(0,S.jsx)(`div`,{className:`text-muted-foreground`,children:`local`})]}),a.length>0&&(0,S.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:`Private Route Table`}),(0,S.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`local`})]})]}),(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Network Connections`}),o&&(0,S.jsxs)(`div`,{className:`rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-xs`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:`Internet Gateway`}),(0,S.jsx)(`div`,{className:`text-muted-foreground`,children:`Attached to VPC`})]}),!o&&(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No internet gateway`})]})]}),t[3]=o,t[4]=n,t[5]=a,t[6]=i,t[7]=l):l=t[7];let u;t[8]===n?u=t[9]:(u=n===`vpc-only`&&(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`VPC only — no additional resources will be created.`}),t[8]=n,t[9]=u);let d;return t[10]!==c||t[11]!==l||t[12]!==u?(d=(0,S.jsxs)(`div`,{className:`rounded-lg border bg-muted/30 p-4`,children:[s,(0,S.jsxs)(`div`,{className:`rounded-lg border-2 border-dashed border-foreground/20 p-4`,children:[c,l,u]})]}),t[10]=c,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function pe(e){return(0,S.jsx)(C,{cidr:e.cidr,label:e.label,variant:`private`},e.cidr)}function w(e){return(0,S.jsx)(C,{cidr:e.cidr,label:e.label,variant:`public`},e.cidr)}var me=[0,1],T=[0,1,2];function E(){let e=(0,x.c)(90),t=i(),n=h(),r=m(),[o,s]=(0,ue.useState)(null),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=re(le),e[0]=c):c=e[0];let l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={resolver:c,defaultValues:{mode:`vpc-only`,namePrefix:``,autoGenerateNames:!0,cidrBlock:`10.0.0.0/16`,tenancy:`default`,natGateway:`none`,publicSubnetCount:1,privateSubnetCount:1,publicSubnetCidrs:[],privateSubnetCidrs:[],tags:[]}},e[1]=l):l=e[1];let u=ne(l),{handleSubmit:d,register:f,watch:ee,control:C,formState:pe}=u,{errors:w,isSubmitting:me}=pe,T;e[2]===C?T=e[3]:(T={control:C,name:`mode`},e[2]=C,e[3]=T);let E=_(T),Te;e[4]===C?Te=e[5]:(Te={control:C,name:`cidrBlock`},e[4]=C,e[5]=Te);let Ee=_(Te),De;e[6]===C?De=e[7]:(De={control:C,name:`publicSubnetCount`},e[6]=C,e[7]=De);let D=_(De),O;e[8]===C?O=e[9]:(O={control:C,name:`privateSubnetCount`},e[8]=C,e[9]=O);let Oe=_(O),ke;e[10]===C?ke=e[11]:(ke={control:C,name:`publicSubnetCidrs`},e[10]=C,e[11]=ke);let Ae=_(ke),je;e[12]===C?je=e[13]:(je={control:C,name:`privateSubnetCidrs`},e[12]=C,e[13]=je);let Me=_(je),k=Ee||`10.0.0.0/16`,Ne=E===`vpc-and-more`?D:0,Pe=E===`vpc-and-more`?Oe:0,Fe=ce(k,Ne,Pe),A=se(k,Ne,Pe,{publicCidrs:Ae,privateCidrs:Me}),[Ie,Le]=(0,ue.useState)(``),Re;e[14]!==n||e[15]!==t||e[16]!==r?(Re=async e=>{if(s(null),e.mode===`vpc-only`){let r=e.autoGenerateNames&&e.namePrefix?`${e.namePrefix}-vpc`:e.namePrefix,i=(await n.mutateAsync({cidrBlock:e.cidrBlock,name:r||void 0})).Vpc?.VpcId;t(i?{to:`/ec2/describe-vpcs/$id`,params:{id:i}}:{to:`/ec2/describe-vpcs`});return}Le(`Creating VPC and resources...`);let i=await r.mutateAsync(e);s(i),!i.error&&i.vpcId&&t({to:`/ec2/describe-vpcs/$id`,params:{id:i.vpcId}}),Le(``)},e[14]=n,e[15]=t,e[16]=r,e[17]=Re):Re=e[17];let ze=Re,Be=n.error??r.error,Ve=n.isPending||r.isPending,j,M;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,S.jsx)(a,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),M=(0,S.jsx)(g,{title:`Create VPC`}),e[18]=j,e[19]=M):(j=e[18],M=e[19]);let N;e[20]===Be?N=e[21]:(N=Be&&(0,S.jsx)(ie,{error:Be,msg:`Failed to create VPC`}),e[20]=Be,e[21]=N);let P;e[22]===o?P=e[23]:(P=o?.error&&(0,S.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,S.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,o.failedStep]}),(0,S.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:o.error.message}),o.created.length>0&&(0,S.jsxs)(`div`,{className:`mt-3`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources:`}),(0,S.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:o.created.map(Ce)})]})]}),e[22]=o,e[23]=P);let F;e[24]===Ie?F=e[25]:(F=Ie&&(0,S.jsx)(`div`,{className:`mb-4 max-w-4xl text-sm text-muted-foreground`,children:Ie}),e[24]=Ie,e[25]=F);let I;e[26]!==d||e[27]!==ze?(I=d(ze),e[26]=d,e[27]=ze,e[28]=I):I=e[28];let He;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,S.jsx)(y,{children:`Resources to create`}),e[29]=He):He=e[29];let L;e[30]===C?L=e[31]:(L=(0,S.jsxs)(b,{children:[He,(0,S.jsx)(v,{control:C,name:`mode`,render:Se})]}),e[30]=C,e[31]=L);let R;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,S.jsx)(y,{children:(0,S.jsx)(`label`,{htmlFor:`namePrefix`,children:`Name tag auto-generation`})}),e[32]=R):R=e[32];let z;e[33]===f?z=e[34]:(z=f(`namePrefix`),e[33]=f,e[34]=z);let B;e[35]===z?B=e[36]:(B=(0,S.jsx)(te,{id:`namePrefix`,placeholder:`project`,...z}),e[35]=z,e[36]=B);let V;e[37]===C?V=e[38]:(V=(0,S.jsx)(v,{control:C,name:`autoGenerateNames`,render:xe}),e[37]=C,e[38]=V);let H;e[39]!==B||e[40]!==V?(H=(0,S.jsxs)(b,{children:[R,(0,S.jsxs)(`div`,{className:`flex items-center gap-3`,children:[B,V]})]}),e[39]=B,e[40]=V,e[41]=H):H=e[41];let Ue;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,S.jsx)(y,{children:(0,S.jsx)(`label`,{htmlFor:`cidrBlock`,children:`IPv4 CIDR block`})}),e[42]=Ue):Ue=e[42];let We=!!w.cidrBlock,U;e[43]===f?U=e[44]:(U=f(`cidrBlock`),e[43]=f,e[44]=U);let W;e[45]!==We||e[46]!==U?(W=(0,S.jsx)(te,{"aria-invalid":We,id:`cidrBlock`,placeholder:`10.0.0.0/16`,...U}),e[45]=We,e[46]=U,e[47]=W):W=e[47];let G;e[48]===w.cidrBlock?G=e[49]:(G=(0,S.jsx)(oe,{errors:[w.cidrBlock]}),e[48]=w.cidrBlock,e[49]=G);let K;e[50]!==W||e[51]!==G?(K=(0,S.jsxs)(b,{children:[Ue,W,G]}),e[50]=W,e[51]=G,e[52]=K):K=e[52];let Ge;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,S.jsx)(y,{children:`Tenancy`}),e[53]=Ge):Ge=e[53];let q;e[54]===C?q=e[55]:(q=(0,S.jsxs)(b,{children:[Ge,(0,S.jsx)(v,{control:C,name:`tenancy`,render:be})]}),e[54]=C,e[55]=q);let Ke=E===`vpc-and-more`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(b,{children:[(0,S.jsx)(y,{children:`Number of public subnets`}),(0,S.jsx)(v,{control:C,name:`publicSubnetCount`,render:ye}),(0,S.jsx)(de,{count:D,defaults:Fe.publicSubnets.map(ve),form:u,type:`public`})]}),(0,S.jsxs)(b,{children:[(0,S.jsx)(y,{children:`Number of private subnets`}),(0,S.jsx)(v,{control:C,name:`privateSubnetCount`,render:_e}),(0,S.jsx)(de,{count:Oe,defaults:Fe.privateSubnets.map(ge),form:u,type:`private`})]}),D>0&&Oe>0&&(0,S.jsxs)(b,{children:[(0,S.jsx)(y,{children:`NAT gateways`}),(0,S.jsx)(v,{control:C,name:`natGateway`,render:he}),(0,S.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Creates an Elastic IP + NAT gateway in the public subnet and routes private subnet egress (0.0.0.0/0) through it.`})]})]}),qe=p,Je=we(ee,A),J;e[56]!==qe||e[57]!==Je?(J=(0,S.jsx)(qe,{commands:Je}),e[56]=qe,e[57]=Je,e[58]=J):J=e[58];let Y;e[59]===t?Y=e[60]:(Y=async()=>{await t({to:`/ec2/describe-vpcs`})},e[59]=t,e[60]=Y);let X;e[61]!==Ve||e[62]!==me||e[63]!==Y?(X=(0,S.jsx)(ae,{isPending:Ve,isSubmitting:me,onCancel:Y,pendingLabel:`Creating…`,submitLabel:`Create VPC`}),e[61]=Ve,e[62]=me,e[63]=Y,e[64]=X):X=e[64];let Z;e[65]!==I||e[66]!==L||e[67]!==H||e[68]!==K||e[69]!==q||e[70]!==Ke||e[71]!==J||e[72]!==X?(Z=(0,S.jsxs)(`form`,{className:`min-w-0 flex-1 space-y-6`,onSubmit:I,children:[L,H,K,q,Ke,J,X]}),e[65]=I,e[66]=L,e[67]=H,e[68]=K,e[69]=q,e[70]=Ke,e[71]=J,e[72]=X,e[73]=Z):Z=e[73];let Ye=E===`vpc-and-more`&&D>0,Q;e[74]!==E||e[75]!==A.privateSubnets||e[76]!==A.publicSubnets||e[77]!==Ye||e[78]!==k?(Q=(0,S.jsx)(`div`,{className:`hidden min-w-0 flex-1 lg:block`,children:(0,S.jsx)(fe,{hasIgw:Ye,mode:E,privateSubnets:A.privateSubnets,publicSubnets:A.publicSubnets,vpcCidr:k})}),e[74]=E,e[75]=A.privateSubnets,e[76]=A.publicSubnets,e[77]=Ye,e[78]=k,e[79]=Q):Q=e[79];let $;e[80]!==Z||e[81]!==Q?($=(0,S.jsxs)(`div`,{className:`flex max-w-6xl gap-8`,children:[Z,Q]}),e[80]=Z,e[81]=Q,e[82]=$):$=e[82];let Xe;return e[83]!==j||e[84]!==M||e[85]!==N||e[86]!==P||e[87]!==F||e[88]!==$?(Xe=(0,S.jsxs)(S.Fragment,{children:[j,M,N,P,F,$]}),e[83]=j,e[84]=M,e[85]=N,e[86]=P,e[87]=F,e[88]=$,e[89]=Xe):Xe=e[89],Xe}function he(e){let{field:t}=e;return(0,S.jsxs)(f,{onValueChange:t.onChange,value:t.value??`none`,children:[(0,S.jsx)(d,{id:`natGateway`,children:(0,S.jsx)(c,{})}),(0,S.jsxs)(u,{children:[(0,S.jsx)(l,{value:`none`,children:`None`}),(0,S.jsx)(l,{value:`single`,children:`In 1 AZ`})]})]})}function ge(e){return e.cidr}function _e(e){let{field:t}=e;return(0,S.jsx)(`div`,{className:`flex gap-1`,children:T.map(e=>(0,S.jsx)(ee,{onClick:()=>{t.onChange(e)},size:`sm`,type:`button`,variant:t.value===e?`default`:`outline`,children:e},e))})}function ve(e){return e.cidr}function ye(e){let{field:t}=e;return(0,S.jsx)(`div`,{className:`flex gap-1`,children:me.map(e=>(0,S.jsx)(ee,{onClick:()=>{t.onChange(e)},size:`sm`,type:`button`,variant:t.value===e?`default`:`outline`,children:e},e))})}function be(e){let{field:t}=e;return(0,S.jsxs)(f,{onValueChange:t.onChange,value:t.value,children:[(0,S.jsx)(d,{id:`tenancy`,children:(0,S.jsx)(c,{})}),(0,S.jsxs)(u,{children:[(0,S.jsx)(l,{value:`default`,children:`default`}),(0,S.jsx)(l,{value:`dedicated`,children:`dedicated`})]})]})}function xe(e){let{field:t}=e;return(0,S.jsxs)(`label`,{className:`flex shrink-0 items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Auto-generate name tags`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Auto-generate`]})}function Se(e){let{field:t}=e;return(0,S.jsxs)(`div`,{className:`flex gap-4`,children:[(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`VPC only`,checked:t.value===`vpc-only`,name:`mode`,onChange:()=>{t.onChange(`vpc-only`)},type:`radio`}),`VPC only`]}),(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`VPC and more`,checked:t.value===`vpc-and-more`,name:`mode`,onChange:()=>{t.onChange(`vpc-and-more`)},type:`radio`}),`VPC and more`]})]})}function Ce(e,t){return(0,S.jsxs)(`li`,{children:[e.type,`: `,e.id]},t)}function we(e,t){let n=e(`mode`),r=e(`cidrBlock`),i=e(`tenancy`),a=e(`natGateway`);if(n===`vpc-only`){let e=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-vpc`},{type:`flag`,value:` \\ - --cidr-block`},{type:`value`,value:` ${r||`10.0.0.0/16`}`}];return i&&i!=="default"&&e.push({type:`flag`,value:` \\ - --instance-tenancy`},{type:`value`,value:` ${i}`}),[{label:`Create VPC`,parts:e}]}let o=[],s=[...t.publicSubnets.map((e,t)=>({...e,name:`PUBLIC_SUBNET_${t+1}`})),...t.privateSubnets.map((e,t)=>({...e,name:`PRIVATE_SUBNET_${t+1}`}))];o.push({label:`Create VPC`,parts:[{type:`comment`,value:`# Create VPC with subnets, internet gateway, and routing - -`},{type:`variable`,value:`VPC_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-vpc`},{type:`flag`,value:` \\ - --cidr-block`},{type:`value`,value:` ${r||`10.0.0.0/16`}`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'Vpc.VpcId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]});for(let e of s)o.push({label:`Create Subnet (${e.name})`,parts:[{type:`variable`,value:`${e.name}_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-subnet`},{type:`flag`,value:` \\ - --vpc-id`},{type:`variable`,value:` "$VPC_ID"`},{type:`flag`,value:` \\ - --cidr-block`},{type:`value`,value:` ${e.cidr}`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'Subnet.SubnetId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]});if(t.publicSubnets.length>0){o.push({label:`Create Internet Gateway`,parts:[{type:`variable`,value:`IGW_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-internet-gateway`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'InternetGateway.InternetGatewayId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Attach Internet Gateway`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 attach-internet-gateway`},{type:`flag`,value:` \\ - --internet-gateway-id`},{type:`variable`,value:` "$IGW_ID"`},{type:`flag`,value:` \\ - --vpc-id`},{type:`variable`,value:` "$VPC_ID"`}]},{label:`Create Route Table`,parts:[{type:`variable`,value:`RT_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-route-table`},{type:`flag`,value:` \\ - --vpc-id`},{type:`variable`,value:` "$VPC_ID"`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'RouteTable.RouteTableId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create Default Route`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-route`},{type:`flag`,value:` \\ - --route-table-id`},{type:`variable`,value:` "$RT_ID"`},{type:`flag`,value:` \\ - --destination-cidr-block`},{type:`value`,value:` 0.0.0.0/0`},{type:`flag`,value:` \\ - --gateway-id`},{type:`variable`,value:` "$IGW_ID"`}]});for(let e=0;e0&&t.privateSubnets.length>0){o.push({label:`Allocate Elastic IP`,parts:[{type:`variable`,value:`EIP_ALLOC_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\ - --domain`},{type:`value`,value:` vpc`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'AllocationId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create NAT Gateway`,parts:[{type:`variable`,value:`NAT_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-nat-gateway`},{type:`flag`,value:` \\ - --subnet-id`},{type:`variable`,value:` "$PUBLIC_SUBNET_1_ID"`},{type:`flag`,value:` \\ - --allocation-id`},{type:`variable`,value:` "$EIP_ALLOC_ID"`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'NatGateway.NatGatewayId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create Private Route Table`,parts:[{type:`variable`,value:`PRIV_RT_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-route-table`},{type:`flag`,value:` \\ - --vpc-id`},{type:`variable`,value:` "$VPC_ID"`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'RouteTable.RouteTableId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create Private Default Route`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-route`},{type:`flag`,value:` \\ - --route-table-id`},{type:`variable`,value:` "$PRIV_RT_ID"`},{type:`flag`,value:` \\ - --destination-cidr-block`},{type:`value`,value:` 0.0.0.0/0`},{type:`flag`,value:` \\ - --nat-gateway-id`},{type:`variable`,value:` "$NAT_ID"`}]});for(let e=0;e{l(!c)},t[0]=c,t[1]=p);let h;t[2]===f?h=t[3]:(h=f?(0,S.jsx)(o,{className:`size-3`}):(0,S.jsx)(s,{className:`size-3`}),t[2]=f,t[3]=h);let g;t[4]!==p||t[5]!==h||t[6]!==r?(g=(0,S.jsxs)(m,{onClick:p,type:`button`,size:`inline`,variant:`link-muted`,children:[h,`Customize `,r,` subnet CIDR blocks`]}),t[4]=p,t[5]=h,t[6]=r,t[7]=g):g=t[7];let _;t[8]!==i||t[9]!==a||t[10]!==d||t[11]!==u||t[12]!==n||t[13]!==f||t[14]!==r?(_=f&&(0,S.jsx)(`div`,{className:`mt-2 space-y-2`,children:Array.from({length:i},(e,t)=>(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`span`,{className:`w-32 shrink-0 text-xs text-muted-foreground`,children:[r===`public`?`Public`:`Private`,` subnet `,t+1]}),(0,S.jsx)(ee,{"aria-invalid":d?.[t]!==void 0,"aria-label":`${r===`public`?`Public`:`Private`} subnet ${t+1} CIDR`,placeholder:a[t],...n.register(`${u}.${t}`)})]}),(0,S.jsx)(ae,{className:`ml-34`,errors:[d?.[t]]})]},t))}),t[8]=i,t[9]=a,t[10]=d,t[11]=u,t[12]=n,t[13]=f,t[14]=r,t[15]=_):_=t[15];let v;return t[16]!==g||t[17]!==_?(v=(0,S.jsxs)(`div`,{className:`mt-2`,children:[g,_]}),t[16]=g,t[17]=_,t[18]=v):v=t[18],v}function C(e){let t=(0,ue.c)(8),{label:n,cidr:r,variant:i}=e,a=`rounded-md border px-3 py-2 text-xs ${i===`public`?`border-success/30 bg-success/10`:`border-info/30 bg-info/10`}`,o;t[0]===n?o=t[1]:(o=(0,S.jsx)(`div`,{className:`font-medium`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,S.jsx)(`div`,{className:`text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,S.jsxs)(`div`,{className:a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function pe(e){let t=(0,ue.c)(14),{mode:n,vpcCidr:r,publicSubnets:i,privateSubnets:a,hasIgw:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,S.jsx)(`h3`,{className:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`,children:`Preview`}),t[0]=s):s=t[0];let c;t[1]===r?c=t[2]:(c=(0,S.jsxs)(`div`,{className:`mb-3 text-xs font-medium`,children:[`VPC `,(0,S.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,r,`)`]})]}),t[1]=r,t[2]=c);let l;t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==i?(l=n===`vpc-and-more`&&(0,S.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Subnets`}),i.map(w),a.map(me),i.length===0&&a.length===0&&(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No subnets`})]}),(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Route Tables`}),i.length>0&&(0,S.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:`Public Route Table`}),(0,S.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`0.0.0.0/0 → IGW`}),(0,S.jsx)(`div`,{className:`text-muted-foreground`,children:`local`})]}),a.length>0&&(0,S.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:`Private Route Table`}),(0,S.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`local`})]})]}),(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Network Connections`}),o&&(0,S.jsxs)(`div`,{className:`rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-xs`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:`Internet Gateway`}),(0,S.jsx)(`div`,{className:`text-muted-foreground`,children:`Attached to VPC`})]}),!o&&(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No internet gateway`})]})]}),t[3]=o,t[4]=n,t[5]=a,t[6]=i,t[7]=l):l=t[7];let u;t[8]===n?u=t[9]:(u=n===`vpc-only`&&(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`VPC only — no additional resources will be created.`}),t[8]=n,t[9]=u);let d;return t[10]!==c||t[11]!==l||t[12]!==u?(d=(0,S.jsxs)(`div`,{className:`rounded-lg border bg-muted/30 p-4`,children:[s,(0,S.jsxs)(`div`,{className:`rounded-lg border-2 border-dashed border-foreground/20 p-4`,children:[c,l,u]})]}),t[10]=c,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function me(e){return(0,S.jsx)(C,{cidr:e.cidr,label:e.label,variant:`private`},e.cidr)}function w(e){return(0,S.jsx)(C,{cidr:e.cidr,label:e.label,variant:`public`},e.cidr)}var he=[0,1],T=[0,1,2];function E(){let e=(0,ue.c)(92),t=i(),n=g(),r=h(),[o,s]=(0,de.useState)(null),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=ne(le),e[0]=c):c=e[0];let l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={resolver:c,defaultValues:{mode:`vpc-only`,namePrefix:``,autoGenerateNames:!0,cidrBlock:`10.0.0.0/16`,tenancy:`default`,natGateway:`none`,publicSubnetCount:1,privateSubnetCount:1,publicSubnetCidrs:[],privateSubnetCidrs:[],tags:[]}},e[1]=l):l=e[1];let u=te(l),{handleSubmit:d,register:f,watch:m,control:C,formState:me}=u,{errors:w,isSubmitting:he}=me,T;e[2]===C?T=e[3]:(T={control:C,name:`mode`},e[2]=C,e[3]=T);let E=v(T),Ee;e[4]===C?Ee=e[5]:(Ee={control:C,name:`cidrBlock`},e[4]=C,e[5]=Ee);let De=v(Ee),Oe;e[6]===C?Oe=e[7]:(Oe={control:C,name:`publicSubnetCount`},e[6]=C,e[7]=Oe);let ke=v(Oe),Ae;e[8]===C?Ae=e[9]:(Ae={control:C,name:`privateSubnetCount`},e[8]=C,e[9]=Ae);let je=v(Ae),D;e[10]===C?D=e[11]:(D={control:C,name:`publicSubnetCidrs`},e[10]=C,e[11]=D);let Me=v(D),Ne;e[12]===C?Ne=e[13]:(Ne={control:C,name:`privateSubnetCidrs`},e[12]=C,e[13]=Ne);let Pe=v(Ne),O=De||`10.0.0.0/16`,Fe=E===`vpc-and-more`?ke:0,Ie=E===`vpc-and-more`?je:0,Le=ce(O,Fe,Ie),k=se(O,Fe,Ie,{publicCidrs:Me,privateCidrs:Pe}),[Re,ze]=(0,de.useState)(``),Be;e[14]!==n||e[15]!==t||e[16]!==r?(Be=async e=>{if(s(null),e.mode===`vpc-only`){let r=e.autoGenerateNames&&e.namePrefix?`${e.namePrefix}-vpc`:e.namePrefix,i=(await n.mutateAsync({cidrBlock:e.cidrBlock,name:r||void 0,tags:e.tags})).Vpc?.VpcId;t(i?{to:`/ec2/describe-vpcs/$id`,params:{id:i}}:{to:`/ec2/describe-vpcs`});return}ze(`Creating VPC and resources...`);let i=await r.mutateAsync(e);s(i),!i.error&&i.vpcId&&t({to:`/ec2/describe-vpcs/$id`,params:{id:i.vpcId}}),ze(``)},e[14]=n,e[15]=t,e[16]=r,e[17]=Be):Be=e[17];let Ve=Be,He=n.error??r.error,Ue=n.isPending||r.isPending,A,j;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,S.jsx)(a,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),j=(0,S.jsx)(_,{title:`Create VPC`}),e[18]=A,e[19]=j):(A=e[18],j=e[19]);let M;e[20]===He?M=e[21]:(M=He&&(0,S.jsx)(re,{error:He,msg:`Failed to create VPC`}),e[20]=He,e[21]=M);let N;e[22]===o?N=e[23]:(N=o?.error&&(0,S.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,S.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,o.failedStep]}),(0,S.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:o.error.message}),o.created.length>0&&(0,S.jsxs)(`div`,{className:`mt-3`,children:[(0,S.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources:`}),(0,S.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:o.created.map(we)})]})]}),e[22]=o,e[23]=N);let P;e[24]===Re?P=e[25]:(P=Re&&(0,S.jsx)(`div`,{className:`mb-4 max-w-4xl text-sm text-muted-foreground`,children:Re}),e[24]=Re,e[25]=P);let F;e[26]!==d||e[27]!==Ve?(F=d(Ve),e[26]=d,e[27]=Ve,e[28]=F):F=e[28];let We;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,S.jsx)(b,{children:`Resources to create`}),e[29]=We):We=e[29];let I;e[30]===C?I=e[31]:(I=(0,S.jsxs)(x,{children:[We,(0,S.jsx)(y,{control:C,name:`mode`,render:Ce})]}),e[30]=C,e[31]=I);let L;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,S.jsx)(b,{children:(0,S.jsx)(`label`,{htmlFor:`namePrefix`,children:`Name tag auto-generation`})}),e[32]=L):L=e[32];let R;e[33]===f?R=e[34]:(R=f(`namePrefix`),e[33]=f,e[34]=R);let z;e[35]===R?z=e[36]:(z=(0,S.jsx)(ee,{id:`namePrefix`,placeholder:`project`,...R}),e[35]=R,e[36]=z);let B;e[37]===C?B=e[38]:(B=(0,S.jsx)(y,{control:C,name:`autoGenerateNames`,render:Se}),e[37]=C,e[38]=B);let V;e[39]!==z||e[40]!==B?(V=(0,S.jsxs)(x,{children:[L,(0,S.jsxs)(`div`,{className:`flex items-center gap-3`,children:[z,B]})]}),e[39]=z,e[40]=B,e[41]=V):V=e[41];let Ge;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,S.jsx)(b,{children:(0,S.jsx)(`label`,{htmlFor:`cidrBlock`,children:`IPv4 CIDR block`})}),e[42]=Ge):Ge=e[42];let Ke=!!w.cidrBlock,H;e[43]===f?H=e[44]:(H=f(`cidrBlock`),e[43]=f,e[44]=H);let U;e[45]!==Ke||e[46]!==H?(U=(0,S.jsx)(ee,{"aria-invalid":Ke,id:`cidrBlock`,placeholder:`10.0.0.0/16`,...H}),e[45]=Ke,e[46]=H,e[47]=U):U=e[47];let W;e[48]===w.cidrBlock?W=e[49]:(W=(0,S.jsx)(ae,{errors:[w.cidrBlock]}),e[48]=w.cidrBlock,e[49]=W);let G;e[50]!==U||e[51]!==W?(G=(0,S.jsxs)(x,{children:[Ge,U,W]}),e[50]=U,e[51]=W,e[52]=G):G=e[52];let qe;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,S.jsx)(b,{children:`Tenancy`}),e[53]=qe):qe=e[53];let K,q;e[54]===C?(K=e[55],q=e[56]):(K=(0,S.jsxs)(x,{children:[qe,(0,S.jsx)(y,{control:C,name:`tenancy`,render:xe})]}),q=(0,S.jsx)(oe,{control:C,name:`tags`}),e[54]=C,e[55]=K,e[56]=q);let Je=E===`vpc-and-more`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(x,{children:[(0,S.jsx)(b,{children:`Number of public subnets`}),(0,S.jsx)(y,{control:C,name:`publicSubnetCount`,render:be}),(0,S.jsx)(fe,{count:ke,defaults:Le.publicSubnets.map(ye),form:u,type:`public`})]}),(0,S.jsxs)(x,{children:[(0,S.jsx)(b,{children:`Number of private subnets`}),(0,S.jsx)(y,{control:C,name:`privateSubnetCount`,render:ve}),(0,S.jsx)(fe,{count:je,defaults:Le.privateSubnets.map(_e),form:u,type:`private`})]}),ke>0&&je>0&&(0,S.jsxs)(x,{children:[(0,S.jsx)(b,{children:`NAT gateways`}),(0,S.jsx)(y,{control:C,name:`natGateway`,render:ge}),(0,S.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Creates an Elastic IP + NAT gateway in the public subnet and routes private subnet egress (0.0.0.0/0) through it.`})]})]}),Ye=p,Xe=Te(m,k),J;e[57]!==Ye||e[58]!==Xe?(J=(0,S.jsx)(Ye,{commands:Xe}),e[57]=Ye,e[58]=Xe,e[59]=J):J=e[59];let Y;e[60]===t?Y=e[61]:(Y=async()=>{await t({to:`/ec2/describe-vpcs`})},e[60]=t,e[61]=Y);let X;e[62]!==Ue||e[63]!==he||e[64]!==Y?(X=(0,S.jsx)(ie,{isPending:Ue,isSubmitting:he,onCancel:Y,pendingLabel:`Creating…`,submitLabel:`Create VPC`}),e[62]=Ue,e[63]=he,e[64]=Y,e[65]=X):X=e[65];let Z;e[66]!==F||e[67]!==I||e[68]!==V||e[69]!==G||e[70]!==K||e[71]!==q||e[72]!==Je||e[73]!==J||e[74]!==X?(Z=(0,S.jsxs)(`form`,{className:`min-w-0 flex-1 space-y-6`,onSubmit:F,children:[I,V,G,K,q,Je,J,X]}),e[66]=F,e[67]=I,e[68]=V,e[69]=G,e[70]=K,e[71]=q,e[72]=Je,e[73]=J,e[74]=X,e[75]=Z):Z=e[75];let Ze=E===`vpc-and-more`&&ke>0,Q;e[76]!==E||e[77]!==k.privateSubnets||e[78]!==k.publicSubnets||e[79]!==Ze||e[80]!==O?(Q=(0,S.jsx)(`div`,{className:`hidden min-w-0 flex-1 lg:block`,children:(0,S.jsx)(pe,{hasIgw:Ze,mode:E,privateSubnets:k.privateSubnets,publicSubnets:k.publicSubnets,vpcCidr:O})}),e[76]=E,e[77]=k.privateSubnets,e[78]=k.publicSubnets,e[79]=Ze,e[80]=O,e[81]=Q):Q=e[81];let $;e[82]!==Z||e[83]!==Q?($=(0,S.jsxs)(`div`,{className:`flex max-w-6xl gap-8`,children:[Z,Q]}),e[82]=Z,e[83]=Q,e[84]=$):$=e[84];let Qe;return e[85]!==A||e[86]!==j||e[87]!==M||e[88]!==N||e[89]!==P||e[90]!==$?(Qe=(0,S.jsxs)(S.Fragment,{children:[A,j,M,N,P,$]}),e[85]=A,e[86]=j,e[87]=M,e[88]=N,e[89]=P,e[90]=$,e[91]=Qe):Qe=e[91],Qe}function ge(e){let{field:t}=e;return(0,S.jsxs)(f,{onValueChange:t.onChange,value:t.value??`none`,children:[(0,S.jsx)(d,{id:`natGateway`,children:(0,S.jsx)(c,{})}),(0,S.jsxs)(u,{children:[(0,S.jsx)(l,{value:`none`,children:`None`}),(0,S.jsx)(l,{value:`single`,children:`In 1 AZ`})]})]})}function _e(e){return e.cidr}function ve(e){let{field:t}=e;return(0,S.jsx)(`div`,{className:`flex gap-1`,children:T.map(e=>(0,S.jsx)(m,{onClick:()=>{t.onChange(e)},size:`sm`,type:`button`,variant:t.value===e?`default`:`outline`,children:e},e))})}function ye(e){return e.cidr}function be(e){let{field:t}=e;return(0,S.jsx)(`div`,{className:`flex gap-1`,children:he.map(e=>(0,S.jsx)(m,{onClick:()=>{t.onChange(e)},size:`sm`,type:`button`,variant:t.value===e?`default`:`outline`,children:e},e))})}function xe(e){let{field:t}=e;return(0,S.jsxs)(f,{onValueChange:t.onChange,value:t.value,children:[(0,S.jsx)(d,{id:`tenancy`,children:(0,S.jsx)(c,{})}),(0,S.jsxs)(u,{children:[(0,S.jsx)(l,{value:`default`,children:`default`}),(0,S.jsx)(l,{value:`dedicated`,children:`dedicated`})]})]})}function Se(e){let{field:t}=e;return(0,S.jsxs)(`label`,{className:`flex shrink-0 items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`Auto-generate name tags`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Auto-generate`]})}function Ce(e){let{field:t}=e;return(0,S.jsxs)(`div`,{className:`flex gap-4`,children:[(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`VPC only`,checked:t.value===`vpc-only`,name:`mode`,onChange:()=>{t.onChange(`vpc-only`)},type:`radio`}),`VPC only`]}),(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,S.jsx)(`input`,{"aria-label":`VPC and more`,checked:t.value===`vpc-and-more`,name:`mode`,onChange:()=>{t.onChange(`vpc-and-more`)},type:`radio`}),`VPC and more`]})]})}function we(e,t){return(0,S.jsxs)(`li`,{children:[e.type,`: `,e.id]},t)}function Te(e,t){let n=e(`mode`),r=e(`cidrBlock`),i=e(`tenancy`),a=e(`natGateway`);if(n===`vpc-only`){let e=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-vpc`},{type:`flag`,value:` \\ + --cidr-block`},{type:`value`,value:` ${r||`10.0.0.0/16`}`}];return i&&i!=="default"&&e.push({type:`flag`,value:` \\ + --instance-tenancy`},{type:`value`,value:` ${i}`}),[{label:`Create VPC`,parts:e}]}let o=[],s=[...t.publicSubnets.map((e,t)=>({...e,name:`PUBLIC_SUBNET_${t+1}`})),...t.privateSubnets.map((e,t)=>({...e,name:`PRIVATE_SUBNET_${t+1}`}))];o.push({label:`Create VPC`,parts:[{type:`comment`,value:`# Create VPC with subnets, internet gateway, and routing + +`},{type:`variable`,value:`VPC_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-vpc`},{type:`flag`,value:` \\ + --cidr-block`},{type:`value`,value:` ${r||`10.0.0.0/16`}`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'Vpc.VpcId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]});for(let e of s)o.push({label:`Create Subnet (${e.name})`,parts:[{type:`variable`,value:`${e.name}_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-subnet`},{type:`flag`,value:` \\ + --vpc-id`},{type:`variable`,value:` "$VPC_ID"`},{type:`flag`,value:` \\ + --cidr-block`},{type:`value`,value:` ${e.cidr}`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'Subnet.SubnetId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]});if(t.publicSubnets.length>0){o.push({label:`Create Internet Gateway`,parts:[{type:`variable`,value:`IGW_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-internet-gateway`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'InternetGateway.InternetGatewayId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Attach Internet Gateway`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 attach-internet-gateway`},{type:`flag`,value:` \\ + --internet-gateway-id`},{type:`variable`,value:` "$IGW_ID"`},{type:`flag`,value:` \\ + --vpc-id`},{type:`variable`,value:` "$VPC_ID"`}]},{label:`Create Route Table`,parts:[{type:`variable`,value:`RT_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-route-table`},{type:`flag`,value:` \\ + --vpc-id`},{type:`variable`,value:` "$VPC_ID"`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'RouteTable.RouteTableId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create Default Route`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-route`},{type:`flag`,value:` \\ + --route-table-id`},{type:`variable`,value:` "$RT_ID"`},{type:`flag`,value:` \\ + --destination-cidr-block`},{type:`value`,value:` 0.0.0.0/0`},{type:`flag`,value:` \\ + --gateway-id`},{type:`variable`,value:` "$IGW_ID"`}]});for(let e=0;e0&&t.privateSubnets.length>0){o.push({label:`Allocate Elastic IP`,parts:[{type:`variable`,value:`EIP_ALLOC_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\ + --domain`},{type:`value`,value:` vpc`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'AllocationId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create NAT Gateway`,parts:[{type:`variable`,value:`NAT_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-nat-gateway`},{type:`flag`,value:` \\ + --subnet-id`},{type:`variable`,value:` "$PUBLIC_SUBNET_1_ID"`},{type:`flag`,value:` \\ + --allocation-id`},{type:`variable`,value:` "$EIP_ALLOC_ID"`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'NatGateway.NatGatewayId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create Private Route Table`,parts:[{type:`variable`,value:`PRIV_RT_ID=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws ec2 create-route-table`},{type:`flag`,value:` \\ + --vpc-id`},{type:`variable`,value:` "$VPC_ID"`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'RouteTable.RouteTableId'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]},{label:`Create Private Default Route`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-route`},{type:`flag`,value:` \\ + --route-table-id`},{type:`variable`,value:` "$PRIV_RT_ID"`},{type:`flag`,value:` \\ + --destination-cidr-block`},{type:`value`,value:` 0.0.0.0/0`},{type:`flag`,value:` \\ + --nat-gateway-id`},{type:`variable`,value:` "$NAT_ID"`}]});for(let e=0;e{await t({to:`/rds/create-db-instance`})},children:`Create Database`}),title:`Databases`}),e[2]=t,e[3]=M);let N;e[4]===j?N=e[5]:(N=j&&(0,S.jsx)(_,{error:j,msg:`Failed to change the DB instance state.`}),e[4]=j,e[5]=N);let P;e[6]!==A||e[7]!==t||e[8]!==E||e[9]!==r||e[10]!==w?(P=A.length>0?(0,S.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,S.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Class`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Endpoint`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,S.jsx)(`tbody`,{children:A.map(e=>{let n=e.DBInstanceIdentifier;if(!n)return null;let i=e.DBInstanceStatus;return(0,S.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-instances/$id`,params:{id:n}})},children:[(0,S.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(a,{className:`text-primary hover:underline`,onClick:T,params:{id:n},to:`/rds/describe-db-instances/$id`,children:n})}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:C(e)}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.DBInstanceClass}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:(0,S.jsx)(v,{state:i})}),(0,S.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.Endpoint?.Address??`—`}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,S.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,S.jsx)(s,{disabled:!u(i)||r.isPending,onClick:e=>{e.stopPropagation(),r.mutate(n)},size:`sm`,variant:`outline`,children:`Start`}),(0,S.jsx)(s,{disabled:!l(i)||w.isPending,onClick:e=>{e.stopPropagation(),w.mutate(n)},size:`sm`,variant:`outline`,children:`Stop`}),(0,S.jsx)(s,{disabled:!d(i)||E.isPending,onClick:e=>{e.stopPropagation(),E.mutate(n)},size:`sm`,variant:`outline`,children:`Reboot`}),(0,S.jsx)(s,{disabled:!c(i),onClick:t=>{t.stopPropagation(),O({identifier:n,deletionProtection:e.DeletionProtection??!1})},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB instances found.`}),e[6]=A,e[7]=t,e[8]=E,e[9]=r,e[10]=w,e[11]=P):P=e[11];let F;e[12]===D?F=e[13]:(F=D&&(0,S.jsx)(y,{dbInstanceIdentifier:D.identifier,deletionProtection:D.deletionProtection,onOpenChange:e=>{e||O(null)},open:!0}),e[12]=D,e[13]=F);let I;return e[14]!==M||e[15]!==N||e[16]!==P||e[17]!==F?(I=(0,S.jsxs)(S.Fragment,{children:[M,N,P,F]}),e[14]=M,e[15]=N,e[16]=P,e[17]=F,e[18]=I):I=e[18],I}function T(e){e.stopPropagation()}var E=w;export{E as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{t as s}from"./button-Bae9vdts.js";import{c,m as l,p as u,u as d}from"./rds-DnVYe-Nj.js";import{d as f,m as p,p as m}from"./rds-hO6CGpr0.js";import{r as h}from"./rds-BKbEDMHo.js";import{t as g}from"./page-heading-M0NyqAmu.js";import{t as _}from"./error-banner-BcDqaPk7.js";import{t as v}from"./state-badge-BiFj5bbX.js";import{t as y}from"./delete-db-instance-dialog-1KZXTOil.js";var b=r(),x=t(n(),1),S=e();function C(e){return[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}function w(){let e=(0,b.c)(19),t=o(),{data:n}=i(h),r=m(),w=p(),E=f(),[D,O]=(0,x.useState)(null),k;e[0]===n.DBInstances?k=e[1]:(k=n.DBInstances??[],e[0]=n.DBInstances,e[1]=k);let A=k,j=r.error??w.error??E.error,M;e[2]===t?M=e[3]:(M=(0,S.jsx)(g,{actions:(0,S.jsx)(s,{onClick:async()=>{await t({to:`/rds/create-db-instance`})},children:`Create Database`}),title:`Databases`}),e[2]=t,e[3]=M);let N;e[4]===j?N=e[5]:(N=j&&(0,S.jsx)(_,{error:j,msg:`Failed to change the DB instance state.`}),e[4]=j,e[5]=N);let P;e[6]!==A||e[7]!==t||e[8]!==E||e[9]!==r||e[10]!==w?(P=A.length>0?(0,S.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,S.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Class`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Endpoint`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,S.jsx)(`tbody`,{children:A.map(e=>{let n=e.DBInstanceIdentifier;if(!n)return null;let i=e.DBInstanceStatus;return(0,S.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-instances/$id`,params:{id:n}})},children:[(0,S.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(a,{className:`text-primary hover:underline`,onClick:T,params:{id:n},to:`/rds/describe-db-instances/$id`,children:n})}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:C(e)}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.DBInstanceClass}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:(0,S.jsx)(v,{state:i})}),(0,S.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.Endpoint?.Address??`—`}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,S.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,S.jsx)(s,{disabled:!u(i)||r.isPending,onClick:e=>{e.stopPropagation(),r.mutate(n)},size:`sm`,variant:`outline`,children:`Start`}),(0,S.jsx)(s,{disabled:!l(i)||w.isPending,onClick:e=>{e.stopPropagation(),w.mutate(n)},size:`sm`,variant:`outline`,children:`Stop`}),(0,S.jsx)(s,{disabled:!d(i)||E.isPending,onClick:e=>{e.stopPropagation(),E.mutate(n)},size:`sm`,variant:`outline`,children:`Reboot`}),(0,S.jsx)(s,{disabled:!c(i),onClick:t=>{t.stopPropagation(),O({identifier:n,deletionProtection:e.DeletionProtection??!1})},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB instances found.`}),e[6]=A,e[7]=t,e[8]=E,e[9]=r,e[10]=w,e[11]=P):P=e[11];let F;e[12]===D?F=e[13]:(F=D&&(0,S.jsx)(y,{dbInstanceIdentifier:D.identifier,deletionProtection:D.deletionProtection,onOpenChange:e=>{e||O(null)},open:!0}),e[12]=D,e[13]=F);let I;return e[14]!==M||e[15]!==N||e[16]!==P||e[17]!==F?(I=(0,S.jsxs)(S.Fragment,{children:[M,N,P,F]}),e[14]=M,e[15]=N,e[16]=P,e[17]=F,e[18]=I):I=e[18],I}function T(e){e.stopPropagation()}var E=w;export{E as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-snapshots-CunDnlE6.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-snapshots-D90zgrwD.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-snapshots-CunDnlE6.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-snapshots-D90zgrwD.js index cc513194a..84607873e 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-snapshots-CunDnlE6.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-snapshots-D90zgrwD.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{E as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./button-Bae9vdts.js";import{a as l,d as u,l as d,o as f}from"./rds-DnVYe-Nj.js";import{a as p}from"./rds-BKbEDMHo.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{t as h}from"./state-badge-BD9XGBez.js";import{t as g}from"./create-db-snapshot-dialog-DKy5_7Dd.js";import{t as _}from"./delete-db-snapshot-dialog-CD5YShBB.js";var v=r(),y=t(n(),1),b=e(),x=[{value:``,label:`All types`},{value:f,label:`Manual`},{value:l,label:`Automated`}];function S(){let e=(0,v.c)(26),t=o(),{data:n}=i(p),[r,l]=(0,y.useState)(``),[f,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),T;e[0]===n.DBSnapshots?T=e[1]:(T=n.DBSnapshots??[],e[0]=n.DBSnapshots,e[1]=T);let E,D,O;if(e[2]!==t||e[3]!==T||e[4]!==r){let n;e[8]===r?n=e[9]:(n=e=>r===``||e.SnapshotType===r,e[8]=r,e[9]=n);let i=T.filter(n);e[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,b.jsx)(m,{actions:(0,b.jsx)(c,{onClick:()=>{S(!0)},children:`Take Snapshot`}),title:`Snapshots`}),e[10]=E):E=e[10];let o;e[11]===r?o=e[12]:(o=x.map(e=>(0,b.jsx)(c,{onClick:()=>{l(e.value)},size:`sm`,variant:r===e.value?`default`:`outline`,children:e.label},e.value)),e[11]=r,e[12]=o),e[13]===o?D=e[14]:(D=(0,b.jsx)(`div`,{className:`mb-4 flex items-center gap-2`,children:o}),e[13]=o,e[14]=D),O=i.length>0?(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DB instance`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,b.jsx)(`tbody`,{children:i.map(e=>{let n=e.DBSnapshotIdentifier;if(!n)return null;let r=e.DBInstanceIdentifier??``;return(0,b.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-snapshots/$id`,children:n})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:r===``?`—`:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:r},to:`/rds/describe-db-instances/$id`,children:r})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:(0,b.jsx)(h,{state:e.Status})}),(0,b.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:s(e.SnapshotCreateTime)}),(0,b.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,b.jsx)(c,{disabled:!u(e.Status),onClick:async()=>{await t({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}})},size:`sm`,variant:`outline`,children:`Restore`}),(0,b.jsx)(c,{disabled:!d(e.Status,e.SnapshotType),onClick:()=>{w(n)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB snapshots found.`}),e[2]=t,e[3]=T,e[4]=r,e[5]=E,e[6]=D,e[7]=O}else E=e[5],D=e[6],O=e[7];let k;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,b.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Automated backups live in the reserved rds: namespace and cannot be deleted by hand — the instance's backup retention is what removes them.`}),e[15]=k):k=e[15];let A;e[16]===f?A=e[17]:(A=f&&(0,b.jsx)(g,{onOpenChange:S,open:!0}),e[16]=f,e[17]=A);let j;e[18]===C?j=e[19]:(j=C&&(0,b.jsx)(_,{dbSnapshotIdentifier:C,onOpenChange:e=>{e||w(null)},open:!0}),e[18]=C,e[19]=j);let M;return e[20]!==E||e[21]!==D||e[22]!==O||e[23]!==A||e[24]!==j?(M=(0,b.jsxs)(b.Fragment,{children:[E,D,O,k,A,j]}),e[20]=E,e[21]=D,e[22]=O,e[23]=A,e[24]=j,e[25]=M):M=e[25],M}var C=S;export{C as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{E as s}from"./httpRequest-Bc1WZmsd.js";import{t as c}from"./button-Bae9vdts.js";import{a as l,d as u,l as d,o as f}from"./rds-DnVYe-Nj.js";import{a as p}from"./rds-BKbEDMHo.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{t as h}from"./state-badge-BiFj5bbX.js";import{t as g}from"./create-db-snapshot-dialog-DKy5_7Dd.js";import{t as _}from"./delete-db-snapshot-dialog-CD5YShBB.js";var v=r(),y=t(n(),1),b=e(),x=[{value:``,label:`All types`},{value:f,label:`Manual`},{value:l,label:`Automated`}];function S(){let e=(0,v.c)(26),t=o(),{data:n}=i(p),[r,l]=(0,y.useState)(``),[f,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),T;e[0]===n.DBSnapshots?T=e[1]:(T=n.DBSnapshots??[],e[0]=n.DBSnapshots,e[1]=T);let E,D,O;if(e[2]!==t||e[3]!==T||e[4]!==r){let n;e[8]===r?n=e[9]:(n=e=>r===``||e.SnapshotType===r,e[8]=r,e[9]=n);let i=T.filter(n);e[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,b.jsx)(m,{actions:(0,b.jsx)(c,{onClick:()=>{S(!0)},children:`Take Snapshot`}),title:`Snapshots`}),e[10]=E):E=e[10];let o;e[11]===r?o=e[12]:(o=x.map(e=>(0,b.jsx)(c,{onClick:()=>{l(e.value)},size:`sm`,variant:r===e.value?`default`:`outline`,children:e.label},e.value)),e[11]=r,e[12]=o),e[13]===o?D=e[14]:(D=(0,b.jsx)(`div`,{className:`mb-4 flex items-center gap-2`,children:o}),e[13]=o,e[14]=D),O=i.length>0?(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DB instance`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,b.jsx)(`tbody`,{children:i.map(e=>{let n=e.DBSnapshotIdentifier;if(!n)return null;let r=e.DBInstanceIdentifier??``;return(0,b.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-snapshots/$id`,children:n})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:r===``?`—`:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:r},to:`/rds/describe-db-instances/$id`,children:r})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:(0,b.jsx)(h,{state:e.Status})}),(0,b.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:s(e.SnapshotCreateTime)}),(0,b.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,b.jsx)(c,{disabled:!u(e.Status),onClick:async()=>{await t({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}})},size:`sm`,variant:`outline`,children:`Restore`}),(0,b.jsx)(c,{disabled:!d(e.Status,e.SnapshotType),onClick:()=>{w(n)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB snapshots found.`}),e[2]=t,e[3]=T,e[4]=r,e[5]=E,e[6]=D,e[7]=O}else E=e[5],D=e[6],O=e[7];let k;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,b.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Automated backups live in the reserved rds: namespace and cannot be deleted by hand — the instance's backup retention is what removes them.`}),e[15]=k):k=e[15];let A;e[16]===f?A=e[17]:(A=f&&(0,b.jsx)(g,{onOpenChange:S,open:!0}),e[16]=f,e[17]=A);let j;e[18]===C?j=e[19]:(j=C&&(0,b.jsx)(_,{dbSnapshotIdentifier:C,onOpenChange:e=>{e||w(null)},open:!0}),e[18]=C,e[19]=j);let M;return e[20]!==E||e[21]!==D||e[22]!==O||e[23]!==A||e[24]!==j?(M=(0,b.jsxs)(b.Fragment,{children:[E,D,O,k,A,j]}),e[20]=E,e[21]=D,e[22]=O,e[23]=A,e[24]=j,e[25]=M):M=e[25],M}var C=S;export{C as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-subnet-groups-Dh5SgrDI.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-subnet-groups-LArErlrP.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-subnet-groups-Dh5SgrDI.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-subnet-groups-LArErlrP.js index c7c72129a..9a850a331 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-subnet-groups-Dh5SgrDI.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-db-subnet-groups-LArErlrP.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{t as s}from"./button-Bae9vdts.js";import{h as c}from"./rds-BKbEDMHo.js";import{t as l}from"./page-heading-M0NyqAmu.js";import{t as u}from"./state-badge-BD9XGBez.js";import{t as d}from"./delete-db-subnet-group-dialog-CPCbs2hR.js";var f=r(),p=t(n(),1),m=e();function h(){let e=(0,f.c)(13),t=o(),{data:n}=i(c),[r,h]=(0,p.useState)(null),_;e[0]===n.DBSubnetGroups?_=e[1]:(_=n.DBSubnetGroups??[],e[0]=n.DBSubnetGroups,e[1]=_);let v=_,y;e[2]===t?y=e[3]:(y=(0,m.jsx)(l,{actions:(0,m.jsx)(s,{onClick:async()=>{await t({to:`/rds/create-db-subnet-group`})},children:`Create Subnet Group`}),title:`DB Subnet Groups`}),e[2]=t,e[3]=y);let b;e[4]!==v||e[5]!==t?(b=v.length>0?(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Subnets`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,m.jsx)(`tbody`,{children:v.map(e=>{let n=e.DBSubnetGroupName;return n?(0,m.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-subnet-groups/$name`,params:{name:n}})},children:[(0,m.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(a,{className:`text-primary hover:underline`,onClick:g,params:{name:n},to:`/rds/describe-db-subnet-groups/$name`,children:n})}),(0,m.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??`—`}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:e.Subnets?.length??0}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:(0,m.jsx)(u,{state:e.SubnetGroupStatus})}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:e.DBSubnetGroupDescription}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,m.jsx)(s,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n):null})})]})}):(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB subnet groups found. Without one, a database is placed in the account's default VPC subnet.`}),e[4]=v,e[5]=t,e[6]=b):b=e[6];let x;e[7]===r?x=e[8]:(x=r&&(0,m.jsx)(d,{dbSubnetGroupName:r,onOpenChange:e=>{e||h(null)},open:!0}),e[7]=r,e[8]=x);let S;return e[9]!==y||e[10]!==b||e[11]!==x?(S=(0,m.jsxs)(m.Fragment,{children:[y,b,x]}),e[9]=y,e[10]=b,e[11]=x,e[12]=S):S=e[12],S}function g(e){e.stopPropagation()}var _=h;export{_ as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as a}from"./link-cv-r823H.js";import{t as o}from"./useNavigate-BiiHYpLW.js";import{t as s}from"./button-Bae9vdts.js";import{h as c}from"./rds-BKbEDMHo.js";import{t as l}from"./page-heading-M0NyqAmu.js";import{t as u}from"./state-badge-BiFj5bbX.js";import{t as d}from"./delete-db-subnet-group-dialog-CPCbs2hR.js";var f=r(),p=t(n(),1),m=e();function h(){let e=(0,f.c)(13),t=o(),{data:n}=i(c),[r,h]=(0,p.useState)(null),_;e[0]===n.DBSubnetGroups?_=e[1]:(_=n.DBSubnetGroups??[],e[0]=n.DBSubnetGroups,e[1]=_);let v=_,y;e[2]===t?y=e[3]:(y=(0,m.jsx)(l,{actions:(0,m.jsx)(s,{onClick:async()=>{await t({to:`/rds/create-db-subnet-group`})},children:`Create Subnet Group`}),title:`DB Subnet Groups`}),e[2]=t,e[3]=y);let b;e[4]!==v||e[5]!==t?(b=v.length>0?(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Subnets`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,m.jsx)(`tbody`,{children:v.map(e=>{let n=e.DBSubnetGroupName;return n?(0,m.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-subnet-groups/$name`,params:{name:n}})},children:[(0,m.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(a,{className:`text-primary hover:underline`,onClick:g,params:{name:n},to:`/rds/describe-db-subnet-groups/$name`,children:n})}),(0,m.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??`—`}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:e.Subnets?.length??0}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:(0,m.jsx)(u,{state:e.SubnetGroupStatus})}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:e.DBSubnetGroupDescription}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,m.jsx)(s,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n):null})})]})}):(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB subnet groups found. Without one, a database is placed in the account's default VPC subnet.`}),e[4]=v,e[5]=t,e[6]=b):b=e[6];let x;e[7]===r?x=e[8]:(x=r&&(0,m.jsx)(d,{dbSubnetGroupName:r,onOpenChange:e=>{e||h(null)},open:!0}),e[7]=r,e[8]=x);let S;return e[9]!==y||e[10]!==b||e[11]!==x?(S=(0,m.jsxs)(m.Fragment,{children:[y,b,x]}),e[9]=y,e[10]=b,e[11]=x,e[12]=S):S=e[12],S}function g(e){e.stopPropagation()}var _=h;export{_ as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-images-B7JaOUFh.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-images-uDOH87L-.js similarity index 93% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-images-B7JaOUFh.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-images-uDOH87L-.js index d502adb28..984071158 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-images-B7JaOUFh.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-images-uDOH87L-.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{o as r}from"./ec2-DJL24ekw.js";import{t as i}from"./page-heading-M0NyqAmu.js";import{t as a}from"./state-badge-BD9XGBez.js";import{t as o}from"./list-card-DXP5Yi9a.js";import{i as s}from"./system-managed-Dk7ySh_E.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(r),a;e[0]===t.Images?a=e[1]:(a=t.Images??[],e[0]=t.Images,e[1]=a);let o;if(e[2]!==a){let t=a.filter(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{title:`Images`}),e[4]=n):n=e[4],o=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[2]=a,e[3]=o}else o=e[3];return o}function d(e){return e.ImageId?(0,l.jsx)(o,{badge:(0,l.jsx)(a,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{o as r}from"./ec2-DJL24ekw.js";import{t as i}from"./page-heading-M0NyqAmu.js";import{t as a}from"./state-badge-BiFj5bbX.js";import{t as o}from"./list-card-DXP5Yi9a.js";import{i as s}from"./system-managed-Dk7ySh_E.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(r),a;e[0]===t.Images?a=e[1]:(a=t.Images??[],e[0]=t.Images,e[1]=a);let o;if(e[2]!==a){let t=a.filter(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{title:`Images`}),e[4]=n):n=e[4],o=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[2]=a,e[3]=o}else o=e[3];return o}function d(e){return e.ImageId?(0,l.jsx)(o,{badge:(0,l.jsx)(a,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-instances-DzyDjSI_.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-instances-Dy-wjx-1.js similarity index 71% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-instances-DzyDjSI_.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-instances-Dy-wjx-1.js index 12bbaffb3..d0b9565a0 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-instances-DzyDjSI_.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-instances-Dy-wjx-1.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{l as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BD9XGBez.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let e=(0,l.c)(3),{data:t}=n(a),s;if(e[0]!==t.Reservations){let n=(t.Reservations?.flatMap(h)??[]).toSorted(m),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/run-instances`,children:(0,u.jsx)(i,{children:`Run Instances`})}),title:`Instances`}),e[2]=a):a=e[2],s=(0,u.jsxs)(u.Fragment,{children:[a,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),e[0]=t.Reservations,e[1]=s}else s=e[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{l as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BiFj5bbX.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let e=(0,l.c)(3),{data:t}=n(a),s;if(e[0]!==t.Reservations){let n=(t.Reservations?.flatMap(h)??[]).toSorted(m),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/run-instances`,children:(0,u.jsx)(i,{children:`Run Instances`})}),title:`Instances`}),e[2]=a):a=e[2],s=(0,u.jsxs)(u.Fragment,{children:[a,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),e[0]=t.Reservations,e[1]=s}else s=e[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-load-balancers-B_3SaYaZ.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-load-balancers-D8qLLQ9R.js similarity index 97% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-load-balancers-B_3SaYaZ.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-load-balancers-D8qLLQ9R.js index a3866eefa..3448c3277 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-load-balancers-B_3SaYaZ.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-load-balancers-D8qLLQ9R.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{E as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./button-Bae9vdts.js";import{a as s}from"./elbv2-19pV3l7Z.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{t as l}from"./state-badge-BD9XGBez.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=i(),{data:f}=n(s),m;e[0]===f.LoadBalancers?m=e[1]:(m=f.LoadBalancers??[],e[0]=f.LoadBalancers,e[1]=m);let h=m,g;e[2]===t?g=e[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(o,{onClick:async()=>{await t({to:`/ec2/create-load-balancer`})},children:`Create Load Balancer`}),title:`Load Balancers`}),e[2]=t,e[3]=g);let _;e[4]!==h||e[5]!==t?(_=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 n=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(n)}})},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(n)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??n})}),(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:a(e.CreatedTime)})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),e[4]=h,e[5]=t,e[6]=_):_=e[6];let v;return e[7]!==g||e[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),e[7]=g,e[8]=_,e[9]=v):v=e[9],v}function p(e){e.stopPropagation()}var m=f;export{m as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./useNavigate-BiiHYpLW.js";import{E as a}from"./httpRequest-Bc1WZmsd.js";import{t as o}from"./button-Bae9vdts.js";import{a as s}from"./elbv2-19pV3l7Z.js";import{t as c}from"./page-heading-M0NyqAmu.js";import{t as l}from"./state-badge-BiFj5bbX.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=i(),{data:f}=n(s),m;e[0]===f.LoadBalancers?m=e[1]:(m=f.LoadBalancers??[],e[0]=f.LoadBalancers,e[1]=m);let h=m,g;e[2]===t?g=e[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(o,{onClick:async()=>{await t({to:`/ec2/create-load-balancer`})},children:`Create Load Balancer`}),title:`Load Balancers`}),e[2]=t,e[3]=g);let _;e[4]!==h||e[5]!==t?(_=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 n=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(n)}})},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(n)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??n})}),(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:a(e.CreatedTime)})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),e[4]=h,e[5]=t,e[6]=_):_=e[6];let v;return e[7]!==g||e[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),e[7]=g,e[8]=_,e[9]=v):v=e[9],v}function p(e){e.stopPropagation()}var m=f;export{m as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-nat-gateways-CwYFLl5Q.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-nat-gateways-BPbTBJMq.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-nat-gateways-CwYFLl5Q.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-nat-gateways-BPbTBJMq.js index 684422e8e..a9e471f25 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-nat-gateways-CwYFLl5Q.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-nat-gateways-BPbTBJMq.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{_ as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./state-badge-BD9XGBez.js";import{t as l}from"./list-card-DXP5Yi9a.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.NatGateways?i=e[1]:(i=t.NatGateways??[],e[0]=t.NatGateways,e[1]=i);let c=i,l;e[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)(a,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=i(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{_ as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./state-badge-BiFj5bbX.js";import{t as l}from"./list-card-DXP5Yi9a.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.NatGateways?i=e[1]:(i=t.NatGateways??[],e[0]=t.NatGateways,e[1]=i);let c=i,l;e[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)(a,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=i(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-placement-groups-CN3O7nu9.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-placement-groups-UnAMO3Vm.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-placement-groups-CN3O7nu9.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-placement-groups-UnAMO3Vm.js index 43e88551c..f22950de6 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-placement-groups-CN3O7nu9.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-placement-groups-UnAMO3Vm.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{y as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BD9XGBez.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.PlacementGroups?s=e[1]:(s=t.PlacementGroups??[],e[0]=t.PlacementGroups,e[1]=s);let c=s,d;e[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`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{y as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BiFj5bbX.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.PlacementGroups?s=e[1]:(s=t.PlacementGroups??[],e[0]=t.PlacementGroups,e[1]=s);let c=s,d;e[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`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-security-groups-BCsMrqa4.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-security-groups-BCsMrqa4.js deleted file mode 100644 index 5c97d7422..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-security-groups-BCsMrqa4.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{w as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./list-card-DXP5Yi9a.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.SecurityGroups?s=e[1]:(s=t.SecurityGroups??[],e[0]=t.SecurityGroups,e[1]=s);let u=s,f;e[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`}),e[2]=f):f=e[2];let p;return e[3]===u?p=e[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.`})]}),e[3]=u,e[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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-security-groups-CneDmHJo.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-security-groups-CneDmHJo.js new file mode 100644 index 000000000..ba1efee47 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-security-groups-CneDmHJo.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{M as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{w as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.SecurityGroups?i=e[1]:(i=t.SecurityGroups??[],e[0]=t.SecurityGroups,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/ec2/create-security-group`,children:(0,u.jsx)(a,{children:`Create Security Group`})}),title:`Security Groups`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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 security groups found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(c,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:i(e),to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{d as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-snapshots-D2N8dE3H.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-snapshots-Dse70vYJ.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-snapshots-D2N8dE3H.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-snapshots-Dse70vYJ.js index 63cd6b0fd..127b34975 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-snapshots-D2N8dE3H.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-snapshots-Dse70vYJ.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{E as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BD9XGBez.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Snapshots?s=e[1]:(s=t.Snapshots??[],e[0]=t.Snapshots,e[1]=s);let c=s,d;e[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`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{E as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BiFj5bbX.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Snapshots?s=e[1]:(s=t.Snapshots??[],e[0]=t.Snapshots,e[1]=s);let c=s,d;e[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`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-subnets-Ctvp-s82.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-subnets-CzhHYMcn.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-subnets-Ctvp-s82.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-subnets-CzhHYMcn.js index 8d070a819..316388632 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-subnets-Ctvp-s82.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-subnets-CzhHYMcn.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{O as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./state-badge-BD9XGBez.js";import{t as l}from"./list-card-DXP5Yi9a.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Subnets?i=e[1]:(i=t.Subnets??[],e[0]=t.Subnets,e[1]=i);let c=i,l;e[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)(a,{children:`Create Subnet`})}),title:`Subnets`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=i(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{O as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./state-badge-BiFj5bbX.js";import{t as l}from"./list-card-DXP5Yi9a.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Subnets?i=e[1]:(i=t.Subnets??[],e[0]=t.Subnets,e[1]=i);let c=i,l;e[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)(a,{children:`Create Subnet`})}),title:`Subnets`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=i(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-volumes-B3epygrO.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-volumes-Boo4HMfw.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-volumes-B3epygrO.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-volumes-Boo4HMfw.js index b1afa867e..520fb2e61 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-volumes-B3epygrO.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-volumes-Boo4HMfw.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{A as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BD9XGBez.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Volumes?s=e[1]:(s=t.Volumes??[],e[0]=t.Volumes,e[1]=s);let c=s,d;e[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`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{t as i}from"./button-Bae9vdts.js";import{A as a}from"./ec2-DJL24ekw.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BiFj5bbX.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Volumes?s=e[1]:(s=t.Volumes??[],e[0]=t.Volumes,e[1]=s);let c=s,d;e[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`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-vpcs-Deh6etz7.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-vpcs-g_JygVRv.js similarity index 94% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-vpcs-Deh6etz7.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-vpcs-g_JygVRv.js index 3b79f4fbb..8e9ac0e5d 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-vpcs-Deh6etz7.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/describe-vpcs-g_JygVRv.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{M as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./state-badge-BD9XGBez.js";import{t as l}from"./list-card-DXP5Yi9a.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Vpcs?i=e[1]:(i=t.Vpcs??[],e[0]=t.Vpcs,e[1]=i);let c=i,l;e[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)(a,{children:`Create VPC`})}),title:`VPCs`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.VpcId)return null;let t=i(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{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}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{k as i}from"./httpRequest-Bc1WZmsd.js";import{t as a}from"./button-Bae9vdts.js";import{M as o}from"./ec2-DJL24ekw.js";import{t as s}from"./page-heading-M0NyqAmu.js";import{t as c}from"./state-badge-BiFj5bbX.js";import{t as l}from"./list-card-DXP5Yi9a.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Vpcs?i=e[1]:(i=t.Vpcs??[],e[0]=t.Vpcs,e[1]=i);let c=i,l;e[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)(a,{children:`Create VPC`})}),title:`VPCs`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.VpcId)return null;let t=i(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{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}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-CmqOirWQ.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-CmqOirWQ.js deleted file mode 100644 index fe0883266..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-CmqOirWQ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,b as t,f as n,h as r,m as i,p as a,v as o}from"./httpRequest-Bc1WZmsd.js";import{a as s,i as c,n as l,r as u}from"./subnet-calculator-DDrAb5xp.js";var d=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,f=t().min(1,`Key name is required`).max(255,`Key name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Key name contains invalid characters`),p=[`gp3`],m=`launch-wizard-`,h=o({imageId:t().optional(),instanceType:t().optional(),keyName:t().optional(),launchTemplateId:t().optional(),launchTemplateVersion:t().optional(),subnetId:t().optional(),placementGroupName:t().optional(),count:r(`Instance count must be a whole number`).min(1,`Instance count must be at least 1`),rootDeviceName:t().optional(),rootVolumeSize:e().int(`Volume size must be a whole number`).min(1,`Volume size must be at least 1 GiB`).max(16384,`Volume size must be at most 16384 GiB`).optional(),rootVolumeType:n(p).optional(),rootDeleteOnTermination:i().optional(),securityGroupMode:n([`create`,`existing`]).optional(),securityGroupIds:a(t()).optional(),newSgName:t().optional(),newSgDescription:t().optional(),allowSsh:i().optional(),allowHttp:i().optional(),allowHttps:i().optional(),ruleSource:n([`anywhere`,`custom`]).optional(),customCidr:t().optional()}).superRefine((e,t)=>{if(e.launchTemplateId||(e.imageId||t.addIssue({code:`custom`,message:`Please select an image`,path:[`imageId`]}),e.instanceType||t.addIssue({code:`custom`,message:`Please select an instance type`,path:[`instanceType`]}),e.keyName||t.addIssue({code:`custom`,message:`Please select a key pair`,path:[`keyName`]})),e.securityGroupMode){if(e.securityGroupMode===`existing`){(e.securityGroupIds??[]).length===0&&t.addIssue({code:`custom`,message:`Select at least one security group`,path:[`securityGroupIds`]});return}(!e.newSgName||e.newSgName.trim().length===0)&&t.addIssue({code:`custom`,message:`Security group name is required`,path:[`newSgName`]}),e.ruleSource===`custom`&&(!e.customCidr||!c(e.customCidr,0,32))&&t.addIssue({code:`custom`,message:`Enter a valid CIDR (e.g. 203.0.113.0/24)`,path:[`customCidr`]})}});function g(e){let t=0,n=RegExp(`^${m}(\\d+)$`);for(let r of e){let e=n.exec(r);if(e){let n=Number(e[1]);n>t&&(t=n)}}return`${m}${t+1}`}var _=o({keyName:f,keyType:n([`rsa`,`ed25519`])}),v=o({keyName:f,publicKeyMaterial:t().min(1,`Public key is required`).refine(e=>e.trim().length>0,`Public key cannot be empty`)}),y=o({size:e().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`).max(16384,`Size must be at most 16384 GiB`),availabilityZone:t().min(1,`Availability zone is required`)}),b=o({size:e().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`)}),x=o({volumeId:t().min(1,`Volume is required`),description:t().optional()});o({sourceSnapshotId:t().min(1,`Source snapshot is required`),sourceRegion:t().min(1,`Source region is required`),description:t().optional()}),o({volumeId:t().min(1,`Volume is required`),instanceId:t().min(1,`Instance is required`),device:t().optional()}),o({volumeId:t().min(1,`Volume is required`),instanceId:t().optional(),force:i().optional()}),o({instanceType:t().min(1,`Instance type is required`)}),o({name:t().min(1,`Name is required`),description:t().optional()});var S=o({vpcId:t().min(1,`VPC is required`),cidrBlock:t().min(1,`CIDR block is required`).regex(d,`Must be a valid CIDR block (e.g. 10.0.1.0/24)`),availabilityZone:t().optional(),mapPublicIpOnLaunch:i().optional()}),C=o({name:t().optional()}),w=o({subnetId:t().min(1,`Subnet is required`),allocationId:t().min(1,`Elastic IP is required`),name:t().optional()}),T=o({name:t().optional()}),E=o({vpcId:t().min(1,`VPC is required`),name:t().optional()}),D=o({destinationCidrBlock:t().min(1,`Destination is required`).regex(d,`Must be a valid CIDR block (e.g. 0.0.0.0/0)`),targetType:n([`igw`,`nat`]),targetId:t().min(1,`Target is required`)}),O=o({subnetId:t().min(1,`Subnet is required`)});o({cidrBlock:t().min(1,`CIDR block is required`).regex(d,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`),name:t().optional()});var k=o({key:t().min(1,`Key is required`),value:t()}),A=o({mode:n([`vpc-only`,`vpc-and-more`]),namePrefix:t().optional(),autoGenerateNames:i(),cidrBlock:t().min(1,`CIDR block is required`).regex(d,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`).refine(e=>c(e),`CIDR has invalid octets or prefix length (must be /16 to /28)`),tenancy:n([`default`,`dedicated`]),natGateway:n([`none`,`single`]).optional(),publicSubnetCount:e().int().min(0).max(1),privateSubnetCount:e().int().min(0).max(2),publicSubnetCidrs:a(t()),privateSubnetCidrs:a(t()),tags:a(k)}).superRefine((e,t)=>{if(e.mode!==`vpc-and-more`||!c(e.cidrBlock))return;let n=s(e.cidrBlock,e.publicSubnetCount,e.privateSubnetCount,{publicCidrs:e.publicSubnetCidrs,privateCidrs:e.privateSubnetCidrs}),r=[...n.publicSubnets.map(({cidr:e},t)=>({cidr:e,path:[`publicSubnetCidrs`,t]})),...n.privateSubnets.map(({cidr:e},t)=>({cidr:e,path:[`privateSubnetCidrs`,t]}))],i=[];for(let n of r)c(n.cidr,16,28)?l(e.cidrBlock,n.cidr)?i.push(n):t.addIssue({code:`custom`,message:`Subnet CIDR ${n.cidr} must be within the VPC CIDR range`,path:n.path}):t.addIssue({code:`custom`,message:`Invalid subnet CIDR format or prefix length`,path:n.path});for(let[e,n]of i.entries())for(let r of i.slice(e+1))u(n.cidr,r.cidr)&&t.addIssue({code:`custom`,message:`Subnet CIDR ${r.cidr} must not overlap ${n.cidr}`,path:r.path})}),j=o({groupName:t().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Group name contains invalid characters`),strategy:n([`spread`,`cluster`])}),M=o({groupName:t().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`),description:t().min(1,`Description is required`).max(255,`Description must be 255 characters or less`),vpcId:t().min(1,`VPC is required`)}),N=o({ipProtocol:t().min(1,`Protocol is required`),fromPort:e().int().min(-1).max(65535),toPort:e().int().min(-1).max(65535),cidrIp:t().min(1,`CIDR is required`).regex(d,`Must be a valid CIDR block (e.g. 0.0.0.0/0)`)}),P=/^[a-zA-Z0-9()./_-]+$/,F=3,I=128,L=o({launchTemplateName:t().optional(),versionDescription:t().optional(),sourceVersion:t().optional(),imageId:t().min(1,`Please select an image`),instanceType:t().min(1,`Please select an instance type`),keyName:t().optional(),subnetId:t().optional(),securityGroupIds:a(t()).optional(),userData:t().optional(),rootVolumeSize:e().int(`Volume size must be a whole number`).min(1,`Volume size must be at least 1 GiB`).max(16384,`Volume size must be at most 16384 GiB`).optional(),rootVolumeType:n(p).optional()}),R=L.superRefine((e,t)=>{let n=e.launchTemplateName??``;if(n.lengthI){t.addIssue({code:`custom`,message:`Name must be ${F}–${I} characters`,path:[`launchTemplateName`]});return}P.test(n)||t.addIssue({code:`custom`,message:`Name may contain only letters, digits and ()./_-`,path:[`launchTemplateName`]})}),z=L;export{A as _,T as a,g as b,z as c,D as d,E as f,y as g,S as h,h as i,w as l,x as m,C as n,_ as o,M as p,O as r,R as s,p as t,j as u,v,N as x,b as y}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-Cr9GrTUU.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-Cr9GrTUU.js new file mode 100644 index 000000000..9b7710f1f --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-Cr9GrTUU.js @@ -0,0 +1 @@ +import{_ as e,b as t,f as n,h as r,m as i,p as a,v as o}from"./httpRequest-Bc1WZmsd.js";import{a as s,i as c,n as l,r as u}from"./subnet-calculator-DDrAb5xp.js";import{l as d}from"./elbv2-B_G5anft.js";var f=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,p=t().min(1,`Key name is required`).max(255,`Key name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Key name contains invalid characters`),m=[`gp3`],h=`launch-wizard-`,g=o({imageId:t().optional(),instanceType:t().optional(),keyName:t().optional(),launchTemplateId:t().optional(),launchTemplateVersion:t().optional(),subnetId:t().optional(),placementGroupName:t().optional(),count:r(`Instance count must be a whole number`).min(1,`Instance count must be at least 1`),rootDeviceName:t().optional(),rootVolumeSize:e().int(`Volume size must be a whole number`).min(1,`Volume size must be at least 1 GiB`).max(16384,`Volume size must be at most 16384 GiB`).optional(),rootVolumeType:n(m).optional(),rootDeleteOnTermination:i().optional(),securityGroupMode:n([`create`,`existing`]).optional(),securityGroupIds:a(t()).optional(),newSgName:t().optional(),newSgDescription:t().optional(),allowSsh:i().optional(),allowHttp:i().optional(),allowHttps:i().optional(),ruleSource:n([`anywhere`,`custom`]).optional(),customCidr:t().optional()}).superRefine((e,t)=>{if(e.launchTemplateId||(e.imageId||t.addIssue({code:`custom`,message:`Please select an image`,path:[`imageId`]}),e.instanceType||t.addIssue({code:`custom`,message:`Please select an instance type`,path:[`instanceType`]}),e.keyName||t.addIssue({code:`custom`,message:`Please select a key pair`,path:[`keyName`]})),e.securityGroupMode){if(e.securityGroupMode===`existing`){(e.securityGroupIds??[]).length===0&&t.addIssue({code:`custom`,message:`Select at least one security group`,path:[`securityGroupIds`]});return}(!e.newSgName||e.newSgName.trim().length===0)&&t.addIssue({code:`custom`,message:`Security group name is required`,path:[`newSgName`]}),e.ruleSource===`custom`&&(!e.customCidr||!c(e.customCidr,0,32))&&t.addIssue({code:`custom`,message:`Enter a valid CIDR (e.g. 203.0.113.0/24)`,path:[`customCidr`]})}});function _(e){let t=0,n=RegExp(`^${h}(\\d+)$`);for(let r of e){let e=n.exec(r);if(e){let n=Number(e[1]);n>t&&(t=n)}}return`${h}${t+1}`}var v=o({keyName:p,keyType:n([`rsa`,`ed25519`])}),y=o({keyName:p,publicKeyMaterial:t().min(1,`Public key is required`).refine(e=>e.trim().length>0,`Public key cannot be empty`)}),b=o({size:e().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`).max(16384,`Size must be at most 16384 GiB`),availabilityZone:t().min(1,`Availability zone is required`)}),x=o({size:e().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`)}),S=o({volumeId:t().min(1,`Volume is required`),description:t().optional()});o({sourceSnapshotId:t().min(1,`Source snapshot is required`),sourceRegion:t().min(1,`Source region is required`),description:t().optional()}),o({volumeId:t().min(1,`Volume is required`),instanceId:t().min(1,`Instance is required`),device:t().optional()}),o({volumeId:t().min(1,`Volume is required`),instanceId:t().optional(),force:i().optional()}),o({instanceType:t().min(1,`Instance type is required`)}),o({name:t().min(1,`Name is required`),description:t().optional()});var C=o({vpcId:t().min(1,`VPC is required`),cidrBlock:t().min(1,`CIDR block is required`).regex(f,`Must be a valid CIDR block (e.g. 10.0.1.0/24)`),availabilityZone:t().optional(),mapPublicIpOnLaunch:i().optional()}),w=o({name:t().optional()}),T=o({subnetId:t().min(1,`Subnet is required`),allocationId:t().min(1,`Elastic IP is required`),name:t().optional()}),E=o({name:t().optional()}),D=o({vpcId:t().min(1,`VPC is required`),name:t().optional()}),O=o({destinationCidrBlock:t().min(1,`Destination is required`).regex(f,`Must be a valid CIDR block (e.g. 0.0.0.0/0)`),targetType:n([`igw`,`nat`]),targetId:t().min(1,`Target is required`)}),k=o({subnetId:t().min(1,`Subnet is required`)});o({cidrBlock:t().min(1,`CIDR block is required`).regex(f,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`),name:t().optional(),tags:a(d).optional()});var A=o({mode:n([`vpc-only`,`vpc-and-more`]),namePrefix:t().optional(),autoGenerateNames:i(),cidrBlock:t().min(1,`CIDR block is required`).regex(f,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`).refine(e=>c(e),`CIDR has invalid octets or prefix length (must be /16 to /28)`),tenancy:n([`default`,`dedicated`]),natGateway:n([`none`,`single`]).optional(),publicSubnetCount:e().int().min(0).max(1),privateSubnetCount:e().int().min(0).max(2),publicSubnetCidrs:a(t()),privateSubnetCidrs:a(t()),tags:a(d)}).superRefine((e,t)=>{if(e.mode!==`vpc-and-more`||!c(e.cidrBlock))return;let n=s(e.cidrBlock,e.publicSubnetCount,e.privateSubnetCount,{publicCidrs:e.publicSubnetCidrs,privateCidrs:e.privateSubnetCidrs}),r=[...n.publicSubnets.map(({cidr:e},t)=>({cidr:e,path:[`publicSubnetCidrs`,t]})),...n.privateSubnets.map(({cidr:e},t)=>({cidr:e,path:[`privateSubnetCidrs`,t]}))],i=[];for(let n of r)c(n.cidr,16,28)?l(e.cidrBlock,n.cidr)?i.push(n):t.addIssue({code:`custom`,message:`Subnet CIDR ${n.cidr} must be within the VPC CIDR range`,path:n.path}):t.addIssue({code:`custom`,message:`Invalid subnet CIDR format or prefix length`,path:n.path});for(let[e,n]of i.entries())for(let r of i.slice(e+1))u(n.cidr,r.cidr)&&t.addIssue({code:`custom`,message:`Subnet CIDR ${r.cidr} must not overlap ${n.cidr}`,path:r.path})}),j=o({groupName:t().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Group name contains invalid characters`),strategy:n([`spread`,`cluster`])}),M=o({groupName:t().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`),description:t().min(1,`Description is required`).max(255,`Description must be 255 characters or less`),vpcId:t().min(1,`VPC is required`)}),N=o({ipProtocol:t().min(1,`Protocol is required`),fromPort:e().int().min(-1).max(65535),toPort:e().int().min(-1).max(65535),cidrIp:t().min(1,`CIDR is required`).regex(f,`Must be a valid CIDR block (e.g. 0.0.0.0/0)`)}),P=/^[a-zA-Z0-9()./_-]+$/,F=3,I=128,L=o({launchTemplateName:t().optional(),versionDescription:t().optional(),sourceVersion:t().optional(),imageId:t().min(1,`Please select an image`),instanceType:t().min(1,`Please select an instance type`),keyName:t().optional(),subnetId:t().optional(),securityGroupIds:a(t()).optional(),userData:t().optional(),rootVolumeSize:e().int(`Volume size must be a whole number`).min(1,`Volume size must be at least 1 GiB`).max(16384,`Volume size must be at most 16384 GiB`).optional(),rootVolumeType:n(m).optional()}),R=L.superRefine((e,t)=>{let n=e.launchTemplateName??``;if(n.lengthI){t.addIssue({code:`custom`,message:`Name must be ${F}–${I} characters`,path:[`launchTemplateName`]});return}P.test(n)||t.addIssue({code:`custom`,message:`Name may contain only letters, digits and ()./_-`,path:[`launchTemplateName`]})}),z=L;export{A as _,E as a,_ as b,z as c,O as d,D as f,b as g,C as h,g as i,T as l,S as m,w as n,v as o,M as p,k as r,R as s,m as t,j as u,y as v,N as x,x as y}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-DFivrtZe.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-DFivrtZe.js deleted file mode 100644 index 8726df6cd..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-DFivrtZe.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./compiler-runtime-DTT1fEHg.js";import{A as t}from"./removable-TyvHreKc.js";import{t as n}from"./useMutation-DV0DQvGm.js";import{$i as r,$r as i,Ci as a,Di as o,Ei as s,Ji as c,Jr as l,Kr as u,Oi as d,Qi as ee,Qr as te,Si as ne,Ti as re,Xi as ie,Xr as ae,Yi as oe,Yr as se,Zi as ce,Zr as le,_i as ue,aa as de,ai as fe,bi as pe,ca as me,ci as he,da as ge,di as _e,ea as ve,ei as ye,fa as be,fi as xe,gi as Se,hi as Ce,ia as we,ii as Te,la as f,li as p,mi as m,na as h,ni as g,oa as _,oi as v,pa as y,pi as b,qr as x,ra as S,ri as C,s as w,sa as T,si as E,ta as D,ti as O,ua as Ee,ui as De,vi as Oe,wi as ke,xi as Ae,yi as je}from"./awsClient-I-S7JTV9.js";import{F as Me,I as k,N as A,P as j,p as M}from"./ec2-DJL24ekw.js";import{a as Ne}from"./subnet-calculator-DDrAb5xp.js";var N=class extends k(A,j,`AllocateAddress`,u){},Pe=class extends k(A,j,`AssociateAddress`,x){},Fe=class extends k(A,j,`AssociateIamInstanceProfile`,l){},P=class extends k(A,j,`AssociateRouteTable`,se){},F=class extends k(A,j,`AttachInternetGateway`,ae){},Ie=class extends k(A,j,`AttachVolume`,le){},Le=class extends k(A,j,`AuthorizeSecurityGroupEgress`,te){},I=class extends k(A,j,`AuthorizeSecurityGroupIngress`,i){},Re=class extends k(A,Me,`CopySnapshot`,ye){},ze=class extends k(A,j,`CreateImage`,O){},L=class extends k(A,j,`CreateInternetGateway`,g){},Be=class extends k(A,j,`CreateKeyPair`,C){},Ve=class extends k(A,j,`CreateLaunchTemplate`,Te){},He=class extends k(A,j,`CreateLaunchTemplateVersion`,fe){},R=class extends k(A,j,`CreateNatGateway`,v){},Ue=class extends k(A,j,`CreatePlacementGroup`,E){},z=class extends k(A,j,`CreateRoute`,he){},B=class extends k(A,j,`CreateRouteTable`,p){},V=class extends k(A,j,`CreateSecurityGroup`,De){},We=class extends k(A,j,`CreateSnapshot`,_e){},H=class extends k(A,j,`CreateSubnet`,xe){},Ge=class extends k(A,j,`CreateVolume`,b){},U=class extends k(A,j,`CreateVpc`,m){},Ke=class extends k(A,j,`DeleteInternetGateway`,Ce){},qe=class extends k(A,j,`DeleteKeyPair`,Se){},Je=class extends k(A,j,`DeleteLaunchTemplate`,ue){},Ye=class extends k(A,j,`DeleteLaunchTemplateVersions`,Oe){},Xe=class extends k(A,j,`DeleteNatGateway`,je){},Ze=class extends k(A,j,`DeletePlacementGroup`,pe){},Qe=class extends k(A,j,`DeleteRoute`,Ae){},$e=class extends k(A,j,`DeleteRouteTable`,ne){},W=class extends k(A,j,`DeleteSecurityGroup`,a){},et=class extends k(A,j,`DeleteSnapshot`,ke){},tt=class extends k(A,j,`DeleteSubnet`,re){},nt=class extends k(A,j,`DeleteVolume`,s){},rt=class extends k(A,j,`DeleteVpc`,o){},it=class extends k(A,j,`DeregisterImage`,d){},at=class extends k(A,j,`DetachInternetGateway`,c){},ot=class extends k(A,j,`DetachVolume`,oe){},st=class extends k(A,j,`DisassociateAddress`,ie){},ct=class extends k(A,j,`DisassociateIamInstanceProfile`,ce){},lt=class extends k(A,j,`DisassociateRouteTable`,ee){},ut=class extends k(A,j,`GetConsoleOutput`,r){},dt=class extends k(A,j,`ImportKeyPair`,ve){},ft=class extends k(A,j,`ModifyInstanceAttribute`,D){},pt=class extends k(A,j,`ModifyLaunchTemplate`,h){},G=class extends k(A,j,`ModifySubnetAttribute`,S){},mt=class extends k(A,j,`ModifyVolume`,we){},ht=class extends k(A,j,`RebootInstances`,de){},gt=class extends k(A,j,`RegisterImage`,_){},_t=class extends k(A,j,`ReleaseAddress`,T){},vt=class extends k(A,j,`RevokeSecurityGroupEgress`,me){},yt=class extends k(A,j,`RevokeSecurityGroupIngress`,f){},bt=class extends k(A,j,`RunInstances`,Ee){},xt=class extends k(A,j,`StartInstances`,ge){},St=class extends k(A,j,`StopInstances`,be){},Ct=class extends k(A,j,`TerminateInstances`,y){},K={application_status_check:`application-status-check`,capacity_block:`capacity-block`,capacity_manager_data_export:`capacity-manager-data-export`,capacity_reservation:`capacity-reservation`,capacity_reservation_cancellation_quote:`capacity-reservation-cancellation-quote`,capacity_reservation_fleet:`capacity-reservation-fleet`,capacity_reservation_modification_quote:`capacity-reservation-modification-quote`,carrier_gateway:`carrier-gateway`,client_vpn_endpoint:`client-vpn-endpoint`,coip_pool:`coip-pool`,customer_gateway:`customer-gateway`,declarative_policies_report:`declarative-policies-report`,dedicated_host:`dedicated-host`,dhcp_options:`dhcp-options`,egress_only_internet_gateway:`egress-only-internet-gateway`,elastic_gpu:`elastic-gpu`,elastic_ip:`elastic-ip`,export_image_task:`export-image-task`,export_instance_task:`export-instance-task`,fleet:`fleet`,fpga_image:`fpga-image`,host_reservation:`host-reservation`,image:`image`,image_usage_report:`image-usage-report`,import_image_task:`import-image-task`,import_snapshot_task:`import-snapshot-task`,instance:`instance`,instance_connect_endpoint:`instance-connect-endpoint`,instance_event_window:`instance-event-window`,internet_gateway:`internet-gateway`,ipam:`ipam`,ipam_external_resource_verification_token:`ipam-external-resource-verification-token`,ipam_internet_registry_association:`ipam-internet-registry-association`,ipam_policy:`ipam-policy`,ipam_pool:`ipam-pool`,ipam_pool_allocation:`ipam-pool-allocation`,ipam_prefix_list_resolver:`ipam-prefix-list-resolver`,ipam_prefix_list_resolver_target:`ipam-prefix-list-resolver-target`,ipam_resource_discovery:`ipam-resource-discovery`,ipam_resource_discovery_association:`ipam-resource-discovery-association`,ipam_scope:`ipam-scope`,ipv4pool_ec2:`ipv4pool-ec2`,ipv6pool_ec2:`ipv6pool-ec2`,key_pair:`key-pair`,launch_template:`launch-template`,local_gateway:`local-gateway`,local_gateway_route_table:`local-gateway-route-table`,local_gateway_route_table_virtual_interface_group_association:`local-gateway-route-table-virtual-interface-group-association`,local_gateway_route_table_vpc_association:`local-gateway-route-table-vpc-association`,local_gateway_virtual_interface:`local-gateway-virtual-interface`,local_gateway_virtual_interface_group:`local-gateway-virtual-interface-group`,mac_modification_task:`mac-modification-task`,natgateway:`natgateway`,network_acl:`network-acl`,network_insights_access_scope:`network-insights-access-scope`,network_insights_access_scope_analysis:`network-insights-access-scope-analysis`,network_insights_analysis:`network-insights-analysis`,network_insights_path:`network-insights-path`,network_interface:`network-interface`,outpost_lag:`outpost-lag`,placement_group:`placement-group`,prefix_list:`prefix-list`,replace_root_volume_task:`replace-root-volume-task`,reserved_instances:`reserved-instances`,route_server:`route-server`,route_server_endpoint:`route-server-endpoint`,route_server_peer:`route-server-peer`,route_table:`route-table`,secondary_interface:`secondary-interface`,secondary_network:`secondary-network`,secondary_subnet:`secondary-subnet`,security_group:`security-group`,security_group_rule:`security-group-rule`,service_link_virtual_interface:`service-link-virtual-interface`,snapshot:`snapshot`,spot_fleet_request:`spot-fleet-request`,spot_instances_request:`spot-instances-request`,subnet:`subnet`,subnet_cidr_reservation:`subnet-cidr-reservation`,traffic_mirror_filter:`traffic-mirror-filter`,traffic_mirror_filter_rule:`traffic-mirror-filter-rule`,traffic_mirror_session:`traffic-mirror-session`,traffic_mirror_target:`traffic-mirror-target`,transit_gateway:`transit-gateway`,transit_gateway_attachment:`transit-gateway-attachment`,transit_gateway_connect_peer:`transit-gateway-connect-peer`,transit_gateway_metering_policy:`transit-gateway-metering-policy`,transit_gateway_multicast_domain:`transit-gateway-multicast-domain`,transit_gateway_policy_table:`transit-gateway-policy-table`,transit_gateway_route_table:`transit-gateway-route-table`,transit_gateway_route_table_announcement:`transit-gateway-route-table-announcement`,verified_access_endpoint:`verified-access-endpoint`,verified_access_endpoint_target:`verified-access-endpoint-target`,verified_access_group:`verified-access-group`,verified_access_instance:`verified-access-instance`,verified_access_policy:`verified-access-policy`,verified_access_trust_provider:`verified-access-trust-provider`,volume:`volume`,vpc:`vpc`,vpc_block_public_access_exclusion:`vpc-block-public-access-exclusion`,vpc_encryption_control:`vpc-encryption-control`,vpc_endpoint:`vpc-endpoint`,vpc_endpoint_connection:`vpc-endpoint-connection`,vpc_endpoint_connection_device_type:`vpc-endpoint-connection-device-type`,vpc_endpoint_service:`vpc-endpoint-service`,vpc_endpoint_service_permission:`vpc-endpoint-service-permission`,vpc_flow_log:`vpc-flow-log`,vpc_peering_connection:`vpc-peering-connection`,vpn_concentrator:`vpn-concentrator`,vpn_connection:`vpn-connection`,vpn_connection_device_type:`vpn-connection-device-type`,vpn_gateway:`vpn-gateway`},q=e(),wt=/\s+/;function Tt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Et,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function Et(e){let t=new xt({InstanceIds:[e]});return await w().send(t)}function Dt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Ot,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function Ot(e){let t=new St({InstanceIds:[e]});return await w().send(t)}function kt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:At,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function At(e){let t=new Ct({InstanceIds:[e]});return await w().send(t)}function jt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Mt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function Mt(e){let t=new ht({InstanceIds:[e]});return await w().send(t)}function Nt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Pt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})},onSettled:()=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Pt(e){let t=w();if(e.securityGroupMode!==`create`)return await J(t,e,e.securityGroupIds??[]);let n=await Ft(t,e);try{return await It(t,n,e),await J(t,e,[n])}catch(e){let r=e;try{await t.send(new W({GroupId:n}))}catch{}throw r}}async function J(e,t,n){let r=new bt({ImageId:t.imageId||void 0,InstanceType:t.instanceType?t.instanceType:void 0,KeyName:t.keyName||void 0,MinCount:t.count,MaxCount:t.count,SubnetId:t.subnetId||void 0,SecurityGroupIds:n.length>0?n:void 0,Placement:t.placementGroupName?{GroupName:t.placementGroupName}:void 0,BlockDeviceMappings:Lt(t),LaunchTemplate:t.launchTemplateId?{LaunchTemplateId:t.launchTemplateId,Version:t.launchTemplateVersion||`$Default`}:void 0});return await e.send(r)}async function Ft(e,t){let n=await e.send(new V({GroupName:t.newSgName,Description:t.newSgDescription||`Created by launch wizard`,VpcId:t.resolvedVpcId}));if(!n.GroupId)throw Error(`Security group was created but no ID was returned`);return n.GroupId}async function It(e,t,n){let r=[...n.allowSsh?[22]:[],...n.allowHttp?[80]:[],...n.allowHttps?[443]:[]];if(r.length===0)return;let i=n.ruleSource===`custom`&&n.customCidr?n.customCidr:`0.0.0.0/0`;await e.send(new I({GroupId:t,IpPermissions:r.map(e=>({IpProtocol:`tcp`,FromPort:e,ToPort:e,IpRanges:[{CidrIp:i}]}))}))}function Lt(e){let{rootDeviceName:t,rootVolumeSize:n,rootVolumeType:r,rootDeleteOnTermination:i}=e;return n!==void 0||r!==void 0||i!==void 0?[{DeviceName:t,Ebs:{...n!==void 0&&{VolumeSize:n},...r!==void 0&&{VolumeType:r},...i!==void 0&&{DeleteOnTermination:i}}}]:void 0}var Rt=`/dev/sda1`;function zt(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function Y(e){let t={};e.imageId&&(t.ImageId=e.imageId),e.instanceType&&(t.InstanceType=e.instanceType),e.keyName&&(t.KeyName=e.keyName);let n=e.securityGroupIds??[];return e.subnetId?t.NetworkInterfaces=[{DeviceIndex:0,SubnetId:e.subnetId,Groups:n.length>0?n:void 0}]:n.length>0&&(t.SecurityGroupIds=n),(e.rootVolumeSize!==void 0||e.rootVolumeType!==void 0)&&(t.BlockDeviceMappings=[{DeviceName:Rt,Ebs:{...e.rootVolumeSize!==void 0&&{VolumeSize:e.rootVolumeSize},...e.rootVolumeType!==void 0&&{VolumeType:e.rootVolumeType}}}]),e.userData&&(t.UserData=zt(e.userData)),t}function Bt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:X,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]})}},e[0]=r,e[1]=i),n(i)}async function X(e){let t=new Ve({LaunchTemplateName:e.launchTemplateName,VersionDescription:e.versionDescription||void 0,LaunchTemplateData:Y(e)});return await w().send(t)}function Vt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Ht,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]}),r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`,t.launchTemplateId,`versions`]})}},e[0]=r,e[1]=i),n(i)}async function Ht(e){let t=new He({LaunchTemplateId:e.launchTemplateId,SourceVersion:e.sourceVersion||void 0,VersionDescription:e.versionDescription||void 0,LaunchTemplateData:Y(e)});return await w().send(t)}function Ut(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Wt,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]}),r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`,t.launchTemplateId,`versions`]})}},e[0]=r,e[1]=i),n(i)}async function Wt(e){let t=new pt({LaunchTemplateId:e.launchTemplateId,DefaultVersion:e.defaultVersion});return await w().send(t)}function Gt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Kt,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]}),r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`,t.launchTemplateId,`versions`]})}},e[0]=r,e[1]=i),n(i)}async function Kt(e){let t=new Ye({LaunchTemplateId:e.launchTemplateId,Versions:e.versions}),n=await w().send(t),r=n.UnsuccessfullyDeletedLaunchTemplateVersions?.[0];if(r)throw Error(`Version ${r.VersionNumber} was not deleted: ${r.ResponseError?.Message??r.ResponseError?.Code??`unknown error`}`);return n}function qt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Jt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]})}},e[0]=r,e[1]=i),n(i)}async function Jt(e){let t=new Je({LaunchTemplateId:e});return await w().send(t)}function Yt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Xt,onSuccess:()=>{r.invalidateQueries(M)}},e[0]=r,e[1]=i),n(i)}async function Xt(e){let t=new Be({KeyName:e.keyName,KeyType:e.keyType}),n=await w().send(t);if(!n.KeyMaterial)throw Error(`Key pair was created but the API returned no private key. The key cannot be recovered — delete it and try again.`);return n}function Zt(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Qt,onSuccess:()=>{r.invalidateQueries(M)}},e[0]=r,e[1]=i),n(i)}async function Qt(e){let t=e.publicKeyMaterial.trim().split(wt).slice(0,2).join(` `),n=new dt({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await w().send(n)}function $t(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:en,onSuccess:()=>{r.invalidateQueries(M)}},e[0]=r,e[1]=i),n(i)}async function en(e){let t=new qe({KeyPairId:e});return await w().send(t)}function tn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:nn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=r,e[1]=i),n(i)}async function nn(e){let t=new Ge({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:`gp3`});return await w().send(t)}function rn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:an,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=r,e[1]=i),n(i)}async function an(e){let t=new mt({VolumeId:e.volumeId,Size:e.size});return await w().send(t)}function on(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:sn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=r,e[1]=i),n(i)}async function sn(e){let t=new nt({VolumeId:e});return await w().send(t)}function cn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:ln,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=r,e[1]=i),n(i)}async function ln(e){let t=new We({VolumeId:e.volumeId,Description:e.description||void 0});return await w().send(t)}function un(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:dn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=r,e[1]=i),n(i)}async function dn(e){let t=new et({SnapshotId:e});return await w().send(t)}function fn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:pn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=r,e[1]=i),n(i)}async function pn(e){let t=new Re({SourceSnapshotId:e.sourceSnapshotId,SourceRegion:e.sourceRegion,Description:e.description||void 0});return await w().send(t)}function mn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:hn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function hn(e){let t=new Ie({VolumeId:e.volumeId,InstanceId:e.instanceId,Device:e.device||void 0});return await w().send(t)}function gn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:_n,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function _n(e){let t=new ot({VolumeId:e.volumeId,InstanceId:e.instanceId||void 0,Force:e.force});return await w().send(t)}function vn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:yn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function yn(e){let{instanceId:t,...n}=e,r=new ft({InstanceId:t,InstanceType:{Value:n.instanceType}});return await w().send(r)}function bn(){let e=(0,q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:xn},e[0]=t):t=e[0],n(t)}async function xn(e){let t=new ut({InstanceId:e});return await w().send(t)}function Sn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Cn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=r,e[1]=i),n(i)}async function Cn(e){let t=new ze({InstanceId:e.instanceId,Name:e.name,Description:e.description||void 0});return await w().send(t)}function wn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Tn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=r,e[1]=i),n(i)}async function Tn(e){let t=new gt({Name:e.name,Description:e.description||void 0,BlockDeviceMappings:[{DeviceName:`/dev/sda1`,Ebs:{SnapshotId:e.snapshotId}}]});return await w().send(t)}function En(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Dn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=r,e[1]=i),n(i)}async function Dn(e){let t=new it({ImageId:e});return await w().send(t)}function On(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:kn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=r,e[1]=i),n(i)}async function kn(e){let t=new U({CidrBlock:e.cidrBlock,TagSpecifications:e.name?[{ResourceType:`vpc`,Tags:[{Key:`Name`,Value:e.name}]}]:void 0});return await w().send(t)}function An(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:jn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=r,e[1]=i),n(i)}async function jn(e){let t=new rt({VpcId:e});return await w().send(t)}function Mn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Nn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=r,e[1]=i),n(i)}async function Nn(e){let t=w(),n=await t.send(new H({VpcId:e.vpcId,CidrBlock:e.cidrBlock,AvailabilityZone:e.availabilityZone||void 0})),r=n.Subnet?.SubnetId;return e.mapPublicIpOnLaunch&&r&&await t.send(new G({SubnetId:r,MapPublicIpOnLaunch:{Value:!0}})),n}function Pn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Fn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=r,e[1]=i),n(i)}async function Fn(e){let t=new tt({SubnetId:e});return await w().send(t)}function In(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Ln,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Ln(e){let t=new Ue({GroupName:e.groupName,Strategy:e.strategy});return await w().send(t)}function Rn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:zn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=r,e[1]=i),n(i)}async function zn(e){let t=new Ze({GroupName:e});return await w().send(t)}function Bn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Vn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Vn(e){let t=new V({GroupName:e.groupName,Description:e.description,VpcId:e.vpcId});return await w().send(t)}function Hn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Un,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Un(e){let t=new W({GroupId:e});return await w().send(t)}function Wn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Gn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Gn(e){let t=new I({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await w().send(t)}function Kn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:qn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function qn(e){let t=new Le({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await w().send(t)}function Z(e){return{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,...e.sourceGroupId?{UserIdGroupPairs:[{GroupId:e.sourceGroupId}]}:{IpRanges:[{CidrIp:e.cidrIp??``}]}}}function Jn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Yn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Yn(e){let t=new yt({GroupId:e.groupId,IpPermissions:[Z(e)]});return await w().send(t)}function Xn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Zn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Zn(e){let t=new vt({GroupId:e.groupId,IpPermissions:[Z(e)]});return await w().send(t)}function Qn(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:$n,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function $n(e){let t=new L({TagSpecifications:Q(K.internet_gateway,e?.name,[])});return await w().send(t)}function er(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:tr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function tr(e){let t=new Ke({InternetGatewayId:e});return await w().send(t)}function nr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:rr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function rr(e){let t=new F({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await w().send(t)}function ir(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:ar,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function ar(e){let t=new at({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await w().send(t)}function or(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:sr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=r,e[1]=i),n(i)}async function sr(e){let t=new N({Domain:`vpc`,TagSpecifications:Q(K.elastic_ip,e?.name,[])});return await w().send(t)}function cr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:lr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=r,e[1]=i),n(i)}async function lr(e){let t=new _t({AllocationId:e});return await w().send(t)}function ur(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:dr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function dr(e){let t=new Pe({AllocationId:e.allocationId,InstanceId:e.instanceId,NetworkInterfaceId:e.networkInterfaceId});return await w().send(t)}function fr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:pr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function pr(e){let t=new st({AssociationId:e});return await w().send(t)}function mr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:hr,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function hr(e){let t=new Fe({InstanceId:e.instanceId,IamInstanceProfile:{Name:e.instanceProfileName}});return await w().send(t)}function gr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:_r,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function _r(e){let t=new ct({AssociationId:e.associationId});return await w().send(t)}function vr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:yr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),r.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=r,e[1]=i),n(i)}async function yr(e){let t=new R({SubnetId:e.subnetId,AllocationId:e.allocationId,TagSpecifications:Q(K.natgateway,e.name,[])});return await w().send(t)}function br(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:xr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`natGateways`]})}},e[0]=r,e[1]=i),n(i)}async function xr(e){let t=new Xe({NatGatewayId:e});return await w().send(t)}function Sr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Cr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Cr(e){let t=new B({VpcId:e.vpcId,TagSpecifications:Q(K.route_table,e.name,[])});return await w().send(t)}function wr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Tr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Tr(e){let t=new $e({RouteTableId:e});return await w().send(t)}function Er(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Dr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Dr(e){let t=new z({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock,GatewayId:e.gatewayId,NatGatewayId:e.natGatewayId});return await w().send(t)}function Or(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:kr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function kr(e){let t=new Qe({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock});return await w().send(t)}function Ar(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:jr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function jr(e){let t=new P({RouteTableId:e.routeTableId,SubnetId:e.subnetId});return await w().send(t)}function Mr(){let e=(0,q.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Nr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Nr(e){let t=new lt({AssociationId:e});return await w().send(t)}function Pr(e,t){let n=[];return e&&n.push({Key:`Name`,Value:e}),n.push(...t),n}function Q(e,t,n){let r=Pr(t,n);if(r.length!==0)return[{ResourceType:e,Tags:r}]}async function $(e){let t=await Promise.allSettled(e),n=[];for(let e of t){if(e.status===`rejected`)throw e.reason;n.push(e.value)}return n}function Fr(){let e=t();return n({mutationFn:async e=>{let t=w(),n=[],r=e.autoGenerateNames?e.namePrefix:void 0,i=e.tags.map(e=>({Key:e.key,Value:e.value})),a=`creating VPC`;try{let o=r?`${r}-vpc`:e.namePrefix,s=(await t.send(new U({CidrBlock:e.cidrBlock,InstanceTenancy:e.tenancy,TagSpecifications:Q(K.vpc,o,i)}))).Vpc?.VpcId;if(!s)throw Error(`VPC was created but no VPC ID was returned by the API`);if(n.push({type:`VPC`,id:s}),e.mode===`vpc-only`)return{vpcId:s,created:n};let c=Ne(e.cidrBlock,e.publicSubnetCount,e.privateSubnetCount,{publicCidrs:e.publicSubnetCidrs,privateCidrs:e.privateSubnetCidrs});a=`creating public subnets`;let l=await $(c.publicSubnets.map(async({cidr:e},a)=>{let o=r?`${r}-subnet-public-${a+1}`:void 0,c=(await t.send(new H({VpcId:s,CidrBlock:e,TagSpecifications:Q(K.subnet,o,i)}))).Subnet?.SubnetId;if(!c)throw Error(`Public subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Public Subnet`,id:c}),await t.send(new G({SubnetId:c,MapPublicIpOnLaunch:{Value:!0}})),c}));a=`creating private subnets`;let u=await $(c.privateSubnets.map(async({cidr:e},a)=>{let o=r?`${r}-subnet-private-${a+1}`:void 0,c=(await t.send(new H({VpcId:s,CidrBlock:e,TagSpecifications:Q(K.subnet,o,i)}))).Subnet?.SubnetId;if(!c)throw Error(`Private subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Private Subnet`,id:c}),c}));if(e.publicSubnetCount>0){a=`creating internet gateway`;let e=r?`${r}-igw`:void 0,o=(await t.send(new L({TagSpecifications:Q(K.internet_gateway,e,i)}))).InternetGateway?.InternetGatewayId;if(!o)throw Error(`Internet gateway was created but no ID was returned`);n.push({type:`Internet Gateway`,id:o}),a=`attaching internet gateway to VPC`,await t.send(new F({InternetGatewayId:o,VpcId:s})),a=`creating public route table`;let c=r?`${r}-rtb-public`:void 0,u=(await t.send(new B({VpcId:s,TagSpecifications:Q(K.route_table,c,i)}))).RouteTable?.RouteTableId;if(!u)throw Error(`Public route table was created but no ID was returned`);n.push({type:`Public Route Table`,id:u}),a=`creating default route to internet gateway`,await t.send(new z({RouteTableId:u,DestinationCidrBlock:`0.0.0.0/0`,GatewayId:o})),a=`associating public subnets with route table`,await Promise.all(l.map(async e=>await t.send(new P({RouteTableId:u,SubnetId:e}))))}if(e.privateSubnetCount>0){a=`creating private route table`;let o=r?`${r}-rtb-private`:void 0,c=(await t.send(new B({VpcId:s,TagSpecifications:Q(K.route_table,o,i)}))).RouteTable?.RouteTableId;if(!c)throw Error(`Private route table was created but no ID was returned`);if(n.push({type:`Private Route Table`,id:c}),a=`associating private subnets with route table`,await Promise.all(u.map(async e=>await t.send(new P({RouteTableId:c,SubnetId:e})))),e.natGateway===`single`&&l[0]){a=`allocating Elastic IP for NAT gateway`;let e=(await t.send(new N({Domain:`vpc`,TagSpecifications:Q(K.elastic_ip,r?`${r}-eip-nat`:void 0,i)}))).AllocationId;if(!e)throw Error(`Elastic IP was allocated but no allocation ID was returned`);n.push({type:`Elastic IP`,id:e}),a=`creating NAT gateway`;let o=(await t.send(new R({SubnetId:l[0],AllocationId:e,TagSpecifications:Q(K.natgateway,r?`${r}-nat`:void 0,i)}))).NatGateway?.NatGatewayId;if(!o)throw Error(`NAT gateway was created but no ID was returned`);n.push({type:`NAT Gateway`,id:o}),a=`creating default route to NAT gateway`,await t.send(new z({RouteTableId:c,DestinationCidrBlock:`0.0.0.0/0`,NatGatewayId:o}))}}return{vpcId:s,created:n}}catch(e){return{vpcId:n.find(e=>e.type===`VPC`)?.id,created:n,error:e instanceof Error?e:Error(String(e)),failedStep:`Failed while ${a}`}}},onSuccess:()=>{e.invalidateQueries({queryKey:[`ec2`,`vpcs`]}),e.invalidateQueries({queryKey:[`ec2`,`subnets`]}),e.invalidateQueries({queryKey:[`ec2`,`internetGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`routeTables`]}),e.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`addresses`]})}})}export{cr as $,Gt as A,En as B,Mn as C,er as D,Fr as E,Hn as F,Mr as G,gn as H,un as I,vn as J,bn as K,Pn as L,Rn as M,Or as N,$t as O,wr as P,wn as Q,on as R,cn as S,On as T,fr as U,ir as V,gr as W,rn as X,Ut as Y,jt as Z,vr as _,Ar as a,Sr as b,Kn as c,Sn as d,Xn as et,Nt as f,Vt as g,Bt as h,mr as i,kt as it,br as j,qt as k,Wn as l,Yt as m,or as n,Tt as nt,nr as o,Qn as p,Zt as q,ur as r,Dt as rt,mn as s,Y as t,Jn as tt,fn as u,In as v,tn as w,Bn as x,Er as y,An as z}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-iXujaheD.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-iXujaheD.js new file mode 100644 index 000000000..75579990a --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/ec2-iXujaheD.js @@ -0,0 +1 @@ +import{t as e}from"./compiler-runtime-DTT1fEHg.js";import{A as t}from"./removable-TyvHreKc.js";import{t as n}from"./useMutation-DV0DQvGm.js";import{$i as r,$r as i,Ci as a,Di as o,Ei as s,Ji as c,Jr as l,Kr as u,Oi as d,Qi as ee,Qr as te,Si as ne,Ti as re,Xi as ie,Xr as ae,Yi as oe,Yr as se,Zi as ce,Zr as le,_i as ue,aa as de,ai as fe,bi as pe,ca as me,ci as he,da as ge,di as _e,ea as ve,ei as ye,fa as be,fi as xe,gi as Se,hi as Ce,ia as we,ii as Te,la as Ee,li as f,mi as p,na as m,ni as h,oa as g,oi as _,pa as v,pi as y,qr as b,ra as x,ri as S,s as C,sa as w,si as T,ta as E,ti as D,ua as De,ui as Oe,vi as ke,wi as Ae,xi as je,yi as Me}from"./awsClient-I-S7JTV9.js";import{F as Ne,I as O,N as k,P as A,p as j}from"./ec2-DJL24ekw.js";import{a as Pe}from"./subnet-calculator-DDrAb5xp.js";var M=class extends O(k,A,`AllocateAddress`,u){},Fe=class extends O(k,A,`AssociateAddress`,b){},Ie=class extends O(k,A,`AssociateIamInstanceProfile`,l){},N=class extends O(k,A,`AssociateRouteTable`,se){},P=class extends O(k,A,`AttachInternetGateway`,ae){},Le=class extends O(k,A,`AttachVolume`,le){},Re=class extends O(k,A,`AuthorizeSecurityGroupEgress`,te){},F=class extends O(k,A,`AuthorizeSecurityGroupIngress`,i){},ze=class extends O(k,Ne,`CopySnapshot`,ye){},Be=class extends O(k,A,`CreateImage`,D){},I=class extends O(k,A,`CreateInternetGateway`,h){},Ve=class extends O(k,A,`CreateKeyPair`,S){},He=class extends O(k,A,`CreateLaunchTemplate`,Te){},Ue=class extends O(k,A,`CreateLaunchTemplateVersion`,fe){},L=class extends O(k,A,`CreateNatGateway`,_){},We=class extends O(k,A,`CreatePlacementGroup`,T){},R=class extends O(k,A,`CreateRoute`,he){},z=class extends O(k,A,`CreateRouteTable`,f){},B=class extends O(k,A,`CreateSecurityGroup`,Oe){},Ge=class extends O(k,A,`CreateSnapshot`,_e){},V=class extends O(k,A,`CreateSubnet`,xe){},Ke=class extends O(k,A,`CreateVolume`,y){},H=class extends O(k,A,`CreateVpc`,p){},qe=class extends O(k,A,`DeleteInternetGateway`,Ce){},Je=class extends O(k,A,`DeleteKeyPair`,Se){},Ye=class extends O(k,A,`DeleteLaunchTemplate`,ue){},Xe=class extends O(k,A,`DeleteLaunchTemplateVersions`,ke){},Ze=class extends O(k,A,`DeleteNatGateway`,Me){},Qe=class extends O(k,A,`DeletePlacementGroup`,pe){},$e=class extends O(k,A,`DeleteRoute`,je){},et=class extends O(k,A,`DeleteRouteTable`,ne){},U=class extends O(k,A,`DeleteSecurityGroup`,a){},tt=class extends O(k,A,`DeleteSnapshot`,Ae){},nt=class extends O(k,A,`DeleteSubnet`,re){},rt=class extends O(k,A,`DeleteVolume`,s){},it=class extends O(k,A,`DeleteVpc`,o){},at=class extends O(k,A,`DeregisterImage`,d){},ot=class extends O(k,A,`DetachInternetGateway`,c){},st=class extends O(k,A,`DetachVolume`,oe){},ct=class extends O(k,A,`DisassociateAddress`,ie){},lt=class extends O(k,A,`DisassociateIamInstanceProfile`,ce){},ut=class extends O(k,A,`DisassociateRouteTable`,ee){},dt=class extends O(k,A,`GetConsoleOutput`,r){},ft=class extends O(k,A,`ImportKeyPair`,ve){},pt=class extends O(k,A,`ModifyInstanceAttribute`,E){},mt=class extends O(k,A,`ModifyLaunchTemplate`,m){},W=class extends O(k,A,`ModifySubnetAttribute`,x){},ht=class extends O(k,A,`ModifyVolume`,we){},gt=class extends O(k,A,`RebootInstances`,de){},_t=class extends O(k,A,`RegisterImage`,g){},vt=class extends O(k,A,`ReleaseAddress`,w){},yt=class extends O(k,A,`RevokeSecurityGroupEgress`,me){},bt=class extends O(k,A,`RevokeSecurityGroupIngress`,Ee){},xt=class extends O(k,A,`RunInstances`,De){},St=class extends O(k,A,`StartInstances`,ge){},Ct=class extends O(k,A,`StopInstances`,be){},wt=class extends O(k,A,`TerminateInstances`,v){},G={application_status_check:`application-status-check`,capacity_block:`capacity-block`,capacity_manager_data_export:`capacity-manager-data-export`,capacity_reservation:`capacity-reservation`,capacity_reservation_cancellation_quote:`capacity-reservation-cancellation-quote`,capacity_reservation_fleet:`capacity-reservation-fleet`,capacity_reservation_modification_quote:`capacity-reservation-modification-quote`,carrier_gateway:`carrier-gateway`,client_vpn_endpoint:`client-vpn-endpoint`,coip_pool:`coip-pool`,customer_gateway:`customer-gateway`,declarative_policies_report:`declarative-policies-report`,dedicated_host:`dedicated-host`,dhcp_options:`dhcp-options`,egress_only_internet_gateway:`egress-only-internet-gateway`,elastic_gpu:`elastic-gpu`,elastic_ip:`elastic-ip`,export_image_task:`export-image-task`,export_instance_task:`export-instance-task`,fleet:`fleet`,fpga_image:`fpga-image`,host_reservation:`host-reservation`,image:`image`,image_usage_report:`image-usage-report`,import_image_task:`import-image-task`,import_snapshot_task:`import-snapshot-task`,instance:`instance`,instance_connect_endpoint:`instance-connect-endpoint`,instance_event_window:`instance-event-window`,internet_gateway:`internet-gateway`,ipam:`ipam`,ipam_external_resource_verification_token:`ipam-external-resource-verification-token`,ipam_internet_registry_association:`ipam-internet-registry-association`,ipam_policy:`ipam-policy`,ipam_pool:`ipam-pool`,ipam_pool_allocation:`ipam-pool-allocation`,ipam_prefix_list_resolver:`ipam-prefix-list-resolver`,ipam_prefix_list_resolver_target:`ipam-prefix-list-resolver-target`,ipam_resource_discovery:`ipam-resource-discovery`,ipam_resource_discovery_association:`ipam-resource-discovery-association`,ipam_scope:`ipam-scope`,ipv4pool_ec2:`ipv4pool-ec2`,ipv6pool_ec2:`ipv6pool-ec2`,key_pair:`key-pair`,launch_template:`launch-template`,local_gateway:`local-gateway`,local_gateway_route_table:`local-gateway-route-table`,local_gateway_route_table_virtual_interface_group_association:`local-gateway-route-table-virtual-interface-group-association`,local_gateway_route_table_vpc_association:`local-gateway-route-table-vpc-association`,local_gateway_virtual_interface:`local-gateway-virtual-interface`,local_gateway_virtual_interface_group:`local-gateway-virtual-interface-group`,mac_modification_task:`mac-modification-task`,natgateway:`natgateway`,network_acl:`network-acl`,network_insights_access_scope:`network-insights-access-scope`,network_insights_access_scope_analysis:`network-insights-access-scope-analysis`,network_insights_analysis:`network-insights-analysis`,network_insights_path:`network-insights-path`,network_interface:`network-interface`,outpost_lag:`outpost-lag`,placement_group:`placement-group`,prefix_list:`prefix-list`,replace_root_volume_task:`replace-root-volume-task`,reserved_instances:`reserved-instances`,route_server:`route-server`,route_server_endpoint:`route-server-endpoint`,route_server_peer:`route-server-peer`,route_table:`route-table`,secondary_interface:`secondary-interface`,secondary_network:`secondary-network`,secondary_subnet:`secondary-subnet`,security_group:`security-group`,security_group_rule:`security-group-rule`,service_link_virtual_interface:`service-link-virtual-interface`,snapshot:`snapshot`,spot_fleet_request:`spot-fleet-request`,spot_instances_request:`spot-instances-request`,subnet:`subnet`,subnet_cidr_reservation:`subnet-cidr-reservation`,traffic_mirror_filter:`traffic-mirror-filter`,traffic_mirror_filter_rule:`traffic-mirror-filter-rule`,traffic_mirror_session:`traffic-mirror-session`,traffic_mirror_target:`traffic-mirror-target`,transit_gateway:`transit-gateway`,transit_gateway_attachment:`transit-gateway-attachment`,transit_gateway_connect_peer:`transit-gateway-connect-peer`,transit_gateway_metering_policy:`transit-gateway-metering-policy`,transit_gateway_multicast_domain:`transit-gateway-multicast-domain`,transit_gateway_policy_table:`transit-gateway-policy-table`,transit_gateway_route_table:`transit-gateway-route-table`,transit_gateway_route_table_announcement:`transit-gateway-route-table-announcement`,verified_access_endpoint:`verified-access-endpoint`,verified_access_endpoint_target:`verified-access-endpoint-target`,verified_access_group:`verified-access-group`,verified_access_instance:`verified-access-instance`,verified_access_policy:`verified-access-policy`,verified_access_trust_provider:`verified-access-trust-provider`,volume:`volume`,vpc:`vpc`,vpc_block_public_access_exclusion:`vpc-block-public-access-exclusion`,vpc_encryption_control:`vpc-encryption-control`,vpc_endpoint:`vpc-endpoint`,vpc_endpoint_connection:`vpc-endpoint-connection`,vpc_endpoint_connection_device_type:`vpc-endpoint-connection-device-type`,vpc_endpoint_service:`vpc-endpoint-service`,vpc_endpoint_service_permission:`vpc-endpoint-service-permission`,vpc_flow_log:`vpc-flow-log`,vpc_peering_connection:`vpc-peering-connection`,vpn_concentrator:`vpn-concentrator`,vpn_connection:`vpn-connection`,vpn_connection_device_type:`vpn-connection-device-type`,vpn_gateway:`vpn-gateway`},K=e(),Tt=/\s+/;function Et(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Dt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function Dt(e){let t=new St({InstanceIds:[e]});return await C().send(t)}function Ot(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:kt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function kt(e){let t=new Ct({InstanceIds:[e]});return await C().send(t)}function At(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:jt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function jt(e){let t=new wt({InstanceIds:[e]});return await C().send(t)}function Mt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Nt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function Nt(e){let t=new gt({InstanceIds:[e]});return await C().send(t)}function Pt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Ft,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})},onSettled:()=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Ft(e){let t=C();if(e.securityGroupMode!==`create`)return await q(t,e,e.securityGroupIds??[]);let n=await It(t,e);try{return await Lt(t,n,e),await q(t,e,[n])}catch(e){let r=e;try{await t.send(new U({GroupId:n}))}catch{}throw r}}async function q(e,t,n){let r=new xt({ImageId:t.imageId||void 0,InstanceType:t.instanceType?t.instanceType:void 0,KeyName:t.keyName||void 0,MinCount:t.count,MaxCount:t.count,SubnetId:t.subnetId||void 0,SecurityGroupIds:n.length>0?n:void 0,Placement:t.placementGroupName?{GroupName:t.placementGroupName}:void 0,BlockDeviceMappings:Rt(t),LaunchTemplate:t.launchTemplateId?{LaunchTemplateId:t.launchTemplateId,Version:t.launchTemplateVersion||`$Default`}:void 0});return await e.send(r)}async function It(e,t){let n=await e.send(new B({GroupName:t.newSgName,Description:t.newSgDescription||`Created by launch wizard`,VpcId:t.resolvedVpcId}));if(!n.GroupId)throw Error(`Security group was created but no ID was returned`);return n.GroupId}async function Lt(e,t,n){let r=[...n.allowSsh?[22]:[],...n.allowHttp?[80]:[],...n.allowHttps?[443]:[]];if(r.length===0)return;let i=n.ruleSource===`custom`&&n.customCidr?n.customCidr:`0.0.0.0/0`;await e.send(new F({GroupId:t,IpPermissions:r.map(e=>({IpProtocol:`tcp`,FromPort:e,ToPort:e,IpRanges:[{CidrIp:i}]}))}))}function Rt(e){let{rootDeviceName:t,rootVolumeSize:n,rootVolumeType:r,rootDeleteOnTermination:i}=e;return n!==void 0||r!==void 0||i!==void 0?[{DeviceName:t,Ebs:{...n!==void 0&&{VolumeSize:n},...r!==void 0&&{VolumeType:r},...i!==void 0&&{DeleteOnTermination:i}}}]:void 0}var zt=`/dev/sda1`;function Bt(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function J(e){let t={};e.imageId&&(t.ImageId=e.imageId),e.instanceType&&(t.InstanceType=e.instanceType),e.keyName&&(t.KeyName=e.keyName);let n=e.securityGroupIds??[];return e.subnetId?t.NetworkInterfaces=[{DeviceIndex:0,SubnetId:e.subnetId,Groups:n.length>0?n:void 0}]:n.length>0&&(t.SecurityGroupIds=n),(e.rootVolumeSize!==void 0||e.rootVolumeType!==void 0)&&(t.BlockDeviceMappings=[{DeviceName:zt,Ebs:{...e.rootVolumeSize!==void 0&&{VolumeSize:e.rootVolumeSize},...e.rootVolumeType!==void 0&&{VolumeType:e.rootVolumeType}}}]),e.userData&&(t.UserData=Bt(e.userData)),t}function Vt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Y,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]})}},e[0]=r,e[1]=i),n(i)}async function Y(e){let t=new He({LaunchTemplateName:e.launchTemplateName,VersionDescription:e.versionDescription||void 0,LaunchTemplateData:J(e)});return await C().send(t)}function Ht(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Ut,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]}),r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`,t.launchTemplateId,`versions`]})}},e[0]=r,e[1]=i),n(i)}async function Ut(e){let t=new Ue({LaunchTemplateId:e.launchTemplateId,SourceVersion:e.sourceVersion||void 0,VersionDescription:e.versionDescription||void 0,LaunchTemplateData:J(e)});return await C().send(t)}function Wt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Gt,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]}),r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`,t.launchTemplateId,`versions`]})}},e[0]=r,e[1]=i),n(i)}async function Gt(e){let t=new mt({LaunchTemplateId:e.launchTemplateId,DefaultVersion:e.defaultVersion});return await C().send(t)}function Kt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:qt,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]}),r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`,t.launchTemplateId,`versions`]})}},e[0]=r,e[1]=i),n(i)}async function qt(e){let t=new Xe({LaunchTemplateId:e.launchTemplateId,Versions:e.versions}),n=await C().send(t),r=n.UnsuccessfullyDeletedLaunchTemplateVersions?.[0];if(r)throw Error(`Version ${r.VersionNumber} was not deleted: ${r.ResponseError?.Message??r.ResponseError?.Code??`unknown error`}`);return n}function Jt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Yt,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`launchTemplates`]})}},e[0]=r,e[1]=i),n(i)}async function Yt(e){let t=new Ye({LaunchTemplateId:e});return await C().send(t)}function Xt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Zt,onSuccess:()=>{r.invalidateQueries(j)}},e[0]=r,e[1]=i),n(i)}async function Zt(e){let t=new Ve({KeyName:e.keyName,KeyType:e.keyType}),n=await C().send(t);if(!n.KeyMaterial)throw Error(`Key pair was created but the API returned no private key. The key cannot be recovered — delete it and try again.`);return n}function Qt(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:$t,onSuccess:()=>{r.invalidateQueries(j)}},e[0]=r,e[1]=i),n(i)}async function $t(e){let t=e.publicKeyMaterial.trim().split(Tt).slice(0,2).join(` `),n=new ft({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await C().send(n)}function en(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:tn,onSuccess:()=>{r.invalidateQueries(j)}},e[0]=r,e[1]=i),n(i)}async function tn(e){let t=new Je({KeyPairId:e});return await C().send(t)}function nn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:rn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=r,e[1]=i),n(i)}async function rn(e){let t=new Ke({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:`gp3`});return await C().send(t)}function an(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:on,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=r,e[1]=i),n(i)}async function on(e){let t=new ht({VolumeId:e.volumeId,Size:e.size});return await C().send(t)}function sn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:cn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=r,e[1]=i),n(i)}async function cn(e){let t=new rt({VolumeId:e});return await C().send(t)}function ln(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:un,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=r,e[1]=i),n(i)}async function un(e){let t=new Ge({VolumeId:e.volumeId,Description:e.description||void 0});return await C().send(t)}function dn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:fn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=r,e[1]=i),n(i)}async function fn(e){let t=new tt({SnapshotId:e});return await C().send(t)}function pn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:mn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=r,e[1]=i),n(i)}async function mn(e){let t=new ze({SourceSnapshotId:e.sourceSnapshotId,SourceRegion:e.sourceRegion,Description:e.description||void 0});return await C().send(t)}function hn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:gn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function gn(e){let t=new Le({VolumeId:e.volumeId,InstanceId:e.instanceId,Device:e.device||void 0});return await C().send(t)}function _n(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:vn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`volumes`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function vn(e){let t=new st({VolumeId:e.volumeId,InstanceId:e.instanceId||void 0,Force:e.force});return await C().send(t)}function yn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:bn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function bn(e){let{instanceId:t,...n}=e,r=new pt({InstanceId:t,InstanceType:{Value:n.instanceType}});return await C().send(r)}function xn(){let e=(0,K.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:Sn},e[0]=t):t=e[0],n(t)}async function Sn(e){let t=new dt({InstanceId:e});return await C().send(t)}function Cn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:wn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=r,e[1]=i),n(i)}async function wn(e){let t=new Be({InstanceId:e.instanceId,Name:e.name,Description:e.description||void 0});return await C().send(t)}function Tn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:En,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=r,e[1]=i),n(i)}async function En(e){let t=new _t({Name:e.name,Description:e.description||void 0,BlockDeviceMappings:[{DeviceName:`/dev/sda1`,Ebs:{SnapshotId:e.snapshotId}}]});return await C().send(t)}function Dn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:On,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=r,e[1]=i),n(i)}async function On(e){let t=new at({ImageId:e});return await C().send(t)}function kn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:An,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=r,e[1]=i),n(i)}async function An(e){let t=new H({CidrBlock:e.cidrBlock,TagSpecifications:Q(G.vpc,e.name,Z(e.tags??[]))});return await C().send(t)}function jn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Mn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=r,e[1]=i),n(i)}async function Mn(e){let t=new it({VpcId:e});return await C().send(t)}function Nn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Pn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=r,e[1]=i),n(i)}async function Pn(e){let t=C(),n=await t.send(new V({VpcId:e.vpcId,CidrBlock:e.cidrBlock,AvailabilityZone:e.availabilityZone||void 0})),r=n.Subnet?.SubnetId;return e.mapPublicIpOnLaunch&&r&&await t.send(new W({SubnetId:r,MapPublicIpOnLaunch:{Value:!0}})),n}function Fn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:In,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=r,e[1]=i),n(i)}async function In(e){let t=new nt({SubnetId:e});return await C().send(t)}function Ln(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Rn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Rn(e){let t=new We({GroupName:e.groupName,Strategy:e.strategy});return await C().send(t)}function zn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Bn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Bn(e){let t=new Qe({GroupName:e});return await C().send(t)}function Vn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Hn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Hn(e){let t=new B({GroupName:e.groupName,Description:e.description,VpcId:e.vpcId});return await C().send(t)}function Un(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Wn,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=r,e[1]=i),n(i)}async function Wn(e){let t=new U({GroupId:e});return await C().send(t)}function Gn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Kn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Kn(e){let t=new F({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await C().send(t)}function qn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Jn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Jn(e){let t=new Re({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await C().send(t)}function X(e){return{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,...e.sourceGroupId?{UserIdGroupPairs:[{GroupId:e.sourceGroupId}]}:{IpRanges:[{CidrIp:e.cidrIp??``}]}}}function Yn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Xn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Xn(e){let t=new bt({GroupId:e.groupId,IpPermissions:[X(e)]});return await C().send(t)}function Zn(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Qn,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),r.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=r,e[1]=i),n(i)}async function Qn(e){let t=new yt({GroupId:e.groupId,IpPermissions:[X(e)]});return await C().send(t)}function $n(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:er,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function er(e){let t=new I({TagSpecifications:Q(G.internet_gateway,e?.name,[])});return await C().send(t)}function tr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:nr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function nr(e){let t=new qe({InternetGatewayId:e});return await C().send(t)}function rr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:ir,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function ir(e){let t=new P({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await C().send(t)}function ar(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:or,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=r,e[1]=i),n(i)}async function or(e){let t=new ot({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await C().send(t)}function sr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:cr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=r,e[1]=i),n(i)}async function cr(e){let t=new M({Domain:`vpc`,TagSpecifications:Q(G.elastic_ip,e?.name,[])});return await C().send(t)}function lr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:ur,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=r,e[1]=i),n(i)}async function ur(e){let t=new vt({AllocationId:e});return await C().send(t)}function dr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:fr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function fr(e){let t=new Fe({AllocationId:e.allocationId,InstanceId:e.instanceId,NetworkInterfaceId:e.networkInterfaceId});return await C().send(t)}function pr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:mr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`addresses`]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function mr(e){let t=new ct({AssociationId:e});return await C().send(t)}function hr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:gr,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function gr(e){let t=new Ie({InstanceId:e.instanceId,IamInstanceProfile:{Name:e.instanceProfileName}});return await C().send(t)}function _r(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:vr,onSuccess:(e,t)=>{r.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),r.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=r,e[1]=i),n(i)}async function vr(e){let t=new lt({AssociationId:e.associationId});return await C().send(t)}function yr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:br,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),r.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=r,e[1]=i),n(i)}async function br(e){let t=new L({SubnetId:e.subnetId,AllocationId:e.allocationId,TagSpecifications:Q(G.natgateway,e.name,[])});return await C().send(t)}function xr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Sr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`natGateways`]})}},e[0]=r,e[1]=i),n(i)}async function Sr(e){let t=new Ze({NatGatewayId:e});return await C().send(t)}function Cr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:wr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function wr(e){let t=new z({VpcId:e.vpcId,TagSpecifications:Q(G.route_table,e.name,[])});return await C().send(t)}function Tr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Er,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Er(e){let t=new et({RouteTableId:e});return await C().send(t)}function Dr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Or,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Or(e){let t=new R({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock,GatewayId:e.gatewayId,NatGatewayId:e.natGatewayId});return await C().send(t)}function kr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Ar,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Ar(e){let t=new $e({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock});return await C().send(t)}function jr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Mr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Mr(e){let t=new N({RouteTableId:e.routeTableId,SubnetId:e.subnetId});return await C().send(t)}function Nr(){let e=(0,K.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:Pr,onSuccess:()=>{r.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=r,e[1]=i),n(i)}async function Pr(e){let t=new ut({AssociationId:e});return await C().send(t)}function Z(e){return e.map(e=>({Key:e.key,Value:e.value}))}function Fr(e,t){let n=[];return e&&n.push({Key:`Name`,Value:e}),n.push(...t),n}function Q(e,t,n){let r=Fr(t,n);if(r.length!==0)return[{ResourceType:e,Tags:r}]}async function $(e){let t=await Promise.allSettled(e),n=[];for(let e of t){if(e.status===`rejected`)throw e.reason;n.push(e.value)}return n}function Ir(){let e=t();return n({mutationFn:async e=>{let t=C(),n=[],r=e.autoGenerateNames?e.namePrefix:void 0,i=Z(e.tags),a=`creating VPC`;try{let o=r?`${r}-vpc`:e.namePrefix,s=(await t.send(new H({CidrBlock:e.cidrBlock,InstanceTenancy:e.tenancy,TagSpecifications:Q(G.vpc,o,i)}))).Vpc?.VpcId;if(!s)throw Error(`VPC was created but no VPC ID was returned by the API`);if(n.push({type:`VPC`,id:s}),e.mode===`vpc-only`)return{vpcId:s,created:n};let c=Pe(e.cidrBlock,e.publicSubnetCount,e.privateSubnetCount,{publicCidrs:e.publicSubnetCidrs,privateCidrs:e.privateSubnetCidrs});a=`creating public subnets`;let l=await $(c.publicSubnets.map(async({cidr:e},a)=>{let o=r?`${r}-subnet-public-${a+1}`:void 0,c=(await t.send(new V({VpcId:s,CidrBlock:e,TagSpecifications:Q(G.subnet,o,i)}))).Subnet?.SubnetId;if(!c)throw Error(`Public subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Public Subnet`,id:c}),await t.send(new W({SubnetId:c,MapPublicIpOnLaunch:{Value:!0}})),c}));a=`creating private subnets`;let u=await $(c.privateSubnets.map(async({cidr:e},a)=>{let o=r?`${r}-subnet-private-${a+1}`:void 0,c=(await t.send(new V({VpcId:s,CidrBlock:e,TagSpecifications:Q(G.subnet,o,i)}))).Subnet?.SubnetId;if(!c)throw Error(`Private subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Private Subnet`,id:c}),c}));if(e.publicSubnetCount>0){a=`creating internet gateway`;let e=r?`${r}-igw`:void 0,o=(await t.send(new I({TagSpecifications:Q(G.internet_gateway,e,i)}))).InternetGateway?.InternetGatewayId;if(!o)throw Error(`Internet gateway was created but no ID was returned`);n.push({type:`Internet Gateway`,id:o}),a=`attaching internet gateway to VPC`,await t.send(new P({InternetGatewayId:o,VpcId:s})),a=`creating public route table`;let c=r?`${r}-rtb-public`:void 0,u=(await t.send(new z({VpcId:s,TagSpecifications:Q(G.route_table,c,i)}))).RouteTable?.RouteTableId;if(!u)throw Error(`Public route table was created but no ID was returned`);n.push({type:`Public Route Table`,id:u}),a=`creating default route to internet gateway`,await t.send(new R({RouteTableId:u,DestinationCidrBlock:`0.0.0.0/0`,GatewayId:o})),a=`associating public subnets with route table`,await Promise.all(l.map(async e=>await t.send(new N({RouteTableId:u,SubnetId:e}))))}if(e.privateSubnetCount>0){a=`creating private route table`;let o=r?`${r}-rtb-private`:void 0,c=(await t.send(new z({VpcId:s,TagSpecifications:Q(G.route_table,o,i)}))).RouteTable?.RouteTableId;if(!c)throw Error(`Private route table was created but no ID was returned`);if(n.push({type:`Private Route Table`,id:c}),a=`associating private subnets with route table`,await Promise.all(u.map(async e=>await t.send(new N({RouteTableId:c,SubnetId:e})))),e.natGateway===`single`&&l[0]){a=`allocating Elastic IP for NAT gateway`;let e=(await t.send(new M({Domain:`vpc`,TagSpecifications:Q(G.elastic_ip,r?`${r}-eip-nat`:void 0,i)}))).AllocationId;if(!e)throw Error(`Elastic IP was allocated but no allocation ID was returned`);n.push({type:`Elastic IP`,id:e}),a=`creating NAT gateway`;let o=(await t.send(new L({SubnetId:l[0],AllocationId:e,TagSpecifications:Q(G.natgateway,r?`${r}-nat`:void 0,i)}))).NatGateway?.NatGatewayId;if(!o)throw Error(`NAT gateway was created but no ID was returned`);n.push({type:`NAT Gateway`,id:o}),a=`creating default route to NAT gateway`,await t.send(new R({RouteTableId:c,DestinationCidrBlock:`0.0.0.0/0`,NatGatewayId:o}))}}return{vpcId:s,created:n}}catch(e){return{vpcId:n.find(e=>e.type===`VPC`)?.id,created:n,error:e instanceof Error?e:Error(String(e)),failedStep:`Failed while ${a}`}}},onSuccess:()=>{e.invalidateQueries({queryKey:[`ec2`,`vpcs`]}),e.invalidateQueries({queryKey:[`ec2`,`subnets`]}),e.invalidateQueries({queryKey:[`ec2`,`internetGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`routeTables`]}),e.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`addresses`]})}})}export{lr as $,Kt as A,Dn as B,Nn as C,tr as D,Ir as E,Un as F,Nr as G,_n as H,dn as I,yn as J,xn as K,Fn as L,zn as M,kr as N,en as O,Tr as P,Tn as Q,sn as R,ln as S,kn as T,pr as U,ar as V,_r as W,an as X,Wt as Y,Mt as Z,yr as _,jr as a,Cr as b,qn as c,Cn as d,Zn as et,Pt as f,Ht as g,Vt as h,hr as i,At as it,xr as j,Jt as k,Gn as l,Xt as m,sr as n,Et as nt,rr as o,$n as p,Qt as q,dr as r,Ot as rt,hn as s,J as t,Yn as tt,pn as u,Ln as v,nn as w,Vn as x,Dr as y,jn as z}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/elbv2-D92OK4oO.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/elbv2-B_G5anft.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/elbv2-D92OK4oO.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/elbv2-B_G5anft.js index acee84e35..1fbf73820 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/elbv2-D92OK4oO.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/elbv2-B_G5anft.js @@ -1 +1 @@ -import{_ as e,b as t,f as n,p as r,v as i,y as a}from"./httpRequest-Bc1WZmsd.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=t().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=t().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=i({key:t().min(1,`Tag key is required`).max(128),value:t().max(256)}),d=i({protocol:n([`HTTP`,`TCP`]),path:t().min(1,`Path is required`).max(1024),port:t().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:t().regex(/^\d{3}(?:[-,]\d{3})*$/,`Matcher must be HTTP codes like 200 or 200-299 or 200,201`)}),f=i({name:c,protocol:n([`HTTP`,`HTTPS`,`TCP`,`UDP`,`TLS`,`TCP_UDP`]),port:l,vpcId:t().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=i({protocol:n(_),port:l,defaultTargetGroupArn:t().min(1,`Target group is required`),certificateArn:t().optional(),sslPolicy:t().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=i({field:n([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:t().max(40).optional(),rawValues:t().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=i({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(C).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:t().min(1,`Target group is required`)}),T=i({name:s,type:n(m),scheme:n([`internet-facing`,`internal`]),vpcId:t().min(1,`VPC is required`),subnetIds:r(t()).min(1,`At least 1 subnet is required`),securityGroupIds:r(t()),tags:r(u),listener:i({protocol:n(_),port:l,targetGroupMode:n([`new`,`existing`]),existingTargetGroupArn:t().optional(),certificateArn:t().optional(),sslPolicy:t().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`})})});i({targets:r(i({instanceId:t().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),a(t(),t());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}; \ No newline at end of file +import{_ as e,b as t,f as n,p as r,v as i,y as a}from"./httpRequest-Bc1WZmsd.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=t().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=t().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=i({key:t().min(1,`Tag key is required`).max(128),value:t().max(256)}),d=i({protocol:n([`HTTP`,`TCP`]),path:t().min(1,`Path is required`).max(1024),port:t().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:t().regex(/^\d{3}(?:[-,]\d{3})*$/,`Matcher must be HTTP codes like 200 or 200-299 or 200,201`)}),f=i({name:c,protocol:n([`HTTP`,`HTTPS`,`TCP`,`UDP`,`TLS`,`TCP_UDP`]),port:l,vpcId:t().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=i({protocol:n(_),port:l,defaultTargetGroupArn:t().min(1,`Target group is required`),certificateArn:t().optional(),sslPolicy:t().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=i({field:n([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:t().max(40).optional(),rawValues:t().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=i({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(C).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:t().min(1,`Target group is required`)}),T=i({name:s,type:n(m),scheme:n([`internet-facing`,`internal`]),vpcId:t().min(1,`VPC is required`),subnetIds:r(t()).min(1,`At least 1 subnet is required`),securityGroupIds:r(t()),tags:r(u),listener:i({protocol:n(_),port:l,targetGroupMode:n([`new`,`existing`]),existingTargetGroupArn:t().optional(),certificateArn:t().optional(),sslPolicy:t().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`})})});i({targets:r(i({instanceId:t().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),a(t(),t());export{f as a,v as c,w as i,u as l,x as n,y as o,T as r,b as s,p as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/import-key-pair-Coqklk-P.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/import-key-pair-0ELY5K70.js similarity index 96% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/import-key-pair-Coqklk-P.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/import-key-pair-0ELY5K70.js index 12b01ecdd..ceca646ff 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/import-key-pair-Coqklk-P.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/import-key-pair-0ELY5K70.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{q as ee}from"./ec2-DFivrtZe.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{a as s,i as c,t as l}from"./zod-VwMMRSfy.js";import{t as te}from"./error-banner-BcDqaPk7.js";import{t as u}from"./form-actions-C3zG6ld2.js";import{r as d,s as f,t as p}from"./field-ChkDR_wL.js";import{t as m}from"./textarea-BNxO_Zsf.js";import{v as h}from"./ec2-CmqOirWQ.js";var g=t(),_=e();function v(){let e=(0,g.c)(55),t=n(),v=ee(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=s(D),k;e[3]!==v||e[4]!==t?(k=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[3]=v,e[4]=t,e[5]=k):k=e[5];let A=k,j,M;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(r,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,_.jsx)(o,{title:`Import Key Pair`}),e[6]=j,e[7]=M):(j=e[6],M=e[7]);let N;e[8]===v.error?N=e[9]:(N=v.error&&(0,_.jsx)(te,{error:v.error,msg:`Failed to import key pair`}),e[8]=v.error,e[9]=N);let P;e[10]!==x||e[11]!==A?(P=x(A),e[10]=x,e[11]=A,e[12]=P):P=e[12];let F;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[13]=F):F=e[13];let I=!!T.keyName,L;e[14]===S?L=e[15]:(L=S(`keyName`),e[14]=S,e[15]=L);let R;e[16]!==L||e[17]!==I?(R=(0,_.jsx)(a,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[16]=L,e[17]=I,e[18]=R):R=e[18];let z;e[19]===T.keyName?z=e[20]:(z=(0,_.jsx)(d,{errors:[T.keyName]}),e[19]=T.keyName,e[20]=z);let B;e[21]!==R||e[22]!==z?(B=(0,_.jsxs)(p,{children:[F,R,z]}),e[21]=R,e[22]=z,e[23]=B):B=e[23];let V,H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,_.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)`}),e[24]=V,e[25]=H):(V=e[24],H=e[25]);let U=!!T.publicKeyMaterial,W;e[26]===S?W=e[27]:(W=S(`publicKeyMaterial`),e[26]=S,e[27]=W);let G;e[28]!==U||e[29]!==W?(G=(0,_.jsx)(m,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[28]=U,e[29]=W,e[30]=G):G=e[30];let K;e[31]===T.publicKeyMaterial?K=e[32]:(K=(0,_.jsx)(d,{errors:[T.publicKeyMaterial]}),e[31]=T.publicKeyMaterial,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,_.jsxs)(p,{children:[V,H,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===O?J=e[37]:(J=y(O),e[36]=O,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-key-pairs`})},e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==E||e[44]!==X?(Z=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[42]=v.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==B||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==P?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[46]=B,e[47]=q,e[48]=Y,e[49]=Z,e[50]=P,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==N?($=(0,_.jsxs)(_.Fragment,{children:[j,M,N,Q]}),e[52]=Q,e[53]=N,e[54]=$):$=e[54],$}function y(e){return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useNavigate-BiiHYpLW.js";import{t as r}from"./back-link-DjawJm5W.js";import{t as i}from"./cli-command-panel-DPooQRso.js";import{t as a}from"./input-CpcyJw4R.js";import{q as ee}from"./ec2-iXujaheD.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{a as s,i as c,t as l}from"./zod-VwMMRSfy.js";import{t as te}from"./error-banner-BcDqaPk7.js";import{t as u}from"./form-actions-C3zG6ld2.js";import{r as d,s as f,t as p}from"./field-ChkDR_wL.js";import{t as m}from"./textarea-BNxO_Zsf.js";import{v as h}from"./ec2-Cr9GrTUU.js";var g=t(),_=e();function v(){let e=(0,g.c)(55),t=n(),v=ee(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=s(D),k;e[3]!==v||e[4]!==t?(k=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[3]=v,e[4]=t,e[5]=k):k=e[5];let A=k,j,M;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(r,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,_.jsx)(o,{title:`Import Key Pair`}),e[6]=j,e[7]=M):(j=e[6],M=e[7]);let N;e[8]===v.error?N=e[9]:(N=v.error&&(0,_.jsx)(te,{error:v.error,msg:`Failed to import key pair`}),e[8]=v.error,e[9]=N);let P;e[10]!==x||e[11]!==A?(P=x(A),e[10]=x,e[11]=A,e[12]=P):P=e[12];let F;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[13]=F):F=e[13];let I=!!T.keyName,L;e[14]===S?L=e[15]:(L=S(`keyName`),e[14]=S,e[15]=L);let R;e[16]!==L||e[17]!==I?(R=(0,_.jsx)(a,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[16]=L,e[17]=I,e[18]=R):R=e[18];let z;e[19]===T.keyName?z=e[20]:(z=(0,_.jsx)(d,{errors:[T.keyName]}),e[19]=T.keyName,e[20]=z);let B;e[21]!==R||e[22]!==z?(B=(0,_.jsxs)(p,{children:[F,R,z]}),e[21]=R,e[22]=z,e[23]=B):B=e[23];let V,H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,_.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)`}),e[24]=V,e[25]=H):(V=e[24],H=e[25]);let U=!!T.publicKeyMaterial,W;e[26]===S?W=e[27]:(W=S(`publicKeyMaterial`),e[26]=S,e[27]=W);let G;e[28]!==U||e[29]!==W?(G=(0,_.jsx)(m,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[28]=U,e[29]=W,e[30]=G):G=e[30];let K;e[31]===T.publicKeyMaterial?K=e[32]:(K=(0,_.jsx)(d,{errors:[T.publicKeyMaterial]}),e[31]=T.publicKeyMaterial,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,_.jsxs)(p,{children:[V,H,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===O?J=e[37]:(J=y(O),e[36]=O,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-key-pairs`})},e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==E||e[44]!==X?(Z=(0,_.jsx)(u,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[42]=v.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==B||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==P?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[46]=B,e[47]=q,e[48]=Y,e[49]=Z,e[50]=P,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==N?($=(0,_.jsxs)(_.Fragment,{children:[j,M,N,Q]}),e[52]=Q,e[53]=N,e[54]=$):$=e[54],$}function y(e){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:` ${(e.keyName??``)||``}`},{type:`flag`,value:` \\ --public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{v as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/index-C_owfUdE.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/index-Bd3ZSAtS.js similarity index 86% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/index-C_owfUdE.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/index-Bd3ZSAtS.js index dcfc3425b..1d3751054 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/index-C_owfUdE.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/index-Bd3ZSAtS.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-CubfShDh.js","assets/compiler-runtime-DTT1fEHg.js","assets/Match-7FVH5X8f.js","assets/matchContext-Dxo67MeP.js","assets/useSelector-d3lmLSFc.js","assets/with-selector-DwL8goiN.js","assets/_auth-TUbdreTD.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/link-cv-r823H.js","assets/httpRequest-Bc1WZmsd.js","assets/createLucideIcon-DI_DJF-h.js","assets/chevron-down-DuqoHmYM.js","assets/chevron-right-FPuH5D53.js","assets/waypoints-CeME1HWv.js","assets/network-DNraRZY6.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/s3-DOjTsnt2.js","assets/admin-B1g5ktL3.js","assets/signed-fetch-BHraeSLO.js","assets/use-admin--3prNhUW.js","assets/sts-BM0Odtlr.js","assets/page-heading-M0NyqAmu.js","assets/badge-BYQj3YeB.js","assets/dist-oTooRiSa.js","assets/useRender-DyI7F-Qi.js","assets/card-TXae8B0G.js","assets/alert-dialog-BYzNCmBp.js","assets/button-Bae9vdts.js","assets/DialogTitle-BredCU7I.js","assets/useValueAsRef-DbvX_oWn.js","assets/reason-parts-DS9EIifS.js","assets/useScrollLock-DPIS-H3s.js","assets/state-badge-BD9XGBez.js","assets/route-FwtkMxrS.js","assets/nodes-CDZdINDB.js","assets/service-metrics-BVtgmWJ_.js","assets/allocate-address-CzxUw1t6.js","assets/useNavigate-BiiHYpLW.js","assets/back-link-DjawJm5W.js","assets/cli-command-panel-DPooQRso.js","assets/check-DKS02ExQ.js","assets/copy-3Ip4Zkw5.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/input-CpcyJw4R.js","assets/useValueChanged-3Des54hH.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ec2-CmqOirWQ.js","assets/create-internet-gateway-DFMxm206.js","assets/create-key-pair-Bw3g9hRn.js","assets/select-Bgl6IAYG.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/download-Di86UJcc.js","assets/triangle-alert-Jc46kC7J.js","assets/import-key-pair-Coqklk-P.js","assets/textarea-BNxO_Zsf.js","assets/create-launch-template-Dmuf_adB.js","assets/launch-template-data-fields-CcRkOt3t.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/collapsible-BFqxt1IG.js","assets/create-load-balancer-V0SGa9eg.js","assets/acm-BGw6nz9A.js","assets/certificate-import-dialog-CGT29fMd.js","assets/elbv2-CBiYqcpA.js","assets/commandBuilder-C5yeyMcZ.js","assets/elbv2-19pV3l7Z.js","assets/tags-field-array-B4zgmLw4.js","assets/plus-DMni1ZkC.js","assets/trash-DHuPKozD.js","assets/target-group-form-DZJOr6m0.js","assets/elbv2-D92OK4oO.js","assets/create-nat-gateway-CjaZ-0f9.js","assets/create-placement-group-DQGuSx0N.js","assets/create-route-table-DSTcxAZd.js","assets/create-security-group-ydsUjq9K.js","assets/create-subnet-DRdJTQuZ.js","assets/create-target-group-DZ5GDr-5.js","assets/create-volume-Ccy7m1H7.js","assets/create-vpc-C-whSRxb.js","assets/task-definitions-CQw_GMot.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/delete-confirmation-dialog-BIyYnba2.js","assets/ecs-section-nav-DYhkEr-O.js","assets/create-cluster-CApKB1rK.js","assets/eks-2ambOpPc.js","assets/commandBuilder-Du4Y3jif.js","assets/json-DGqns_nK.js","assets/iam-CKwYVJXn.js","assets/commandBuilder-CivibiZ7.js","assets/iam-Fo1DnIKB.js","assets/system-managed-Dk7ySh_E.js","assets/system-image-required-ClBzX7Hd.js","assets/rotate-cw-BEktaUIR.js","assets/policy-document-viewer-BsPskksA.js","assets/create-group-pYEVC2_3.js","assets/iam-CRgvEy8_.js","assets/create-instance-profile-DxE9Kc_7.js","assets/create-policy-DkdYgt_C.js","assets/json-editor-C1MMnH7_.js","assets/create-role-BX7vmYsz.js","assets/create-user-DOwRczkA.js","assets/create-db-instance-D7UFjBf8.js","assets/rds-DnVYe-Nj.js","assets/rds-hO6CGpr0.js","assets/rds-BKbEDMHo.js","assets/picker-notice-Cj5Hb6RJ.js","assets/security-group-checkboxes-CgmGDP6L.js","assets/create-db-parameter-group-Bh4GnsZG.js","assets/create-db-subnet-group-CG8t0czE.js","assets/create-bucket-CFZ3UDyF.js","assets/s3-WggvfIGR.js","assets/ls-Ch0gLLl0.js","assets/list-card-DXP5Yi9a.js","assets/route-wY81OJOr.js","assets/list-model-catalog-A4jsVZ23.js","assets/list-guardrails-DMr8tneU.js","assets/bedrock-DIbdgKPF.js","assets/commandBuilder-BInkDaQ_.js","assets/create-Cux85l28.js","assets/bedrock-CysMJ0_R.js","assets/guardrail-form-page-vdyJmll-.js","assets/list-knowledge-bases-B75Tw2nR.js","assets/bedrockAgent-BIsnxh0q.js","assets/commandBuilder-_yiOeL0z.js","assets/create-B9l7cnNQ.js","assets/bedrockAgent-BC2z7N7d.js","assets/list-model-access-fq46KS1I.js","assets/playground-6qk0JzT_.js","assets/commandBuilder-B7VWL1AO.js","assets/describe-addresses-DKzX98T-.js","assets/describe-images-B7JaOUFh.js","assets/describe-instances-DzyDjSI_.js","assets/describe-internet-gateways-D2fxK-t7.js","assets/describe-key-pairs-uhUP3fNL.js","assets/describe-launch-templates-D2qJ15Ic.js","assets/describe-load-balancers-B_3SaYaZ.js","assets/describe-nat-gateways-CwYFLl5Q.js","assets/describe-placement-groups-CN3O7nu9.js","assets/describe-route-tables-C5vM_rCX.js","assets/describe-security-groups-BCsMrqa4.js","assets/describe-snapshots-D2N8dE3H.js","assets/describe-subnets-Ctvp-s82.js","assets/describe-target-groups-BHJFiqsY.js","assets/describe-volumes-B3epygrO.js","assets/describe-vpcs-Deh6etz7.js","assets/list-repositories-Civj5U6N.js","assets/ecr-BcyXDcHV.js","assets/ecr-YrTzxhA6.js","assets/list-clusters-6_bfITq9.js","assets/list-clusters-PZmdiM18.js","assets/eks-6qMVucHG.js","assets/list-groups-BS-D1f3l.js","assets/list-instance-profiles-B3NosDUO.js","assets/list-policies-CAROO7y7.js","assets/list-roles-DE4rvajX.js","assets/list-users-BTkkg-CL.js","assets/describe-db-instances-B6BR7T2v.js","assets/delete-db-instance-dialog-1KZXTOil.js","assets/describe-db-parameter-groups-DQyH8P2s.js","assets/delete-db-parameter-group-dialog-CZFhvCtH.js","assets/rds-delete-dialog-rZGyeBq2.js","assets/describe-db-snapshots-CunDnlE6.js","assets/create-db-snapshot-dialog-DKy5_7Dd.js","assets/delete-db-snapshot-dialog-CD5YShBB.js","assets/describe-db-subnet-groups-Dh5SgrDI.js","assets/delete-db-subnet-group-dialog-CPCbs2hR.js"])))=>i.map(i=>d[i]); -import{i as e,n as t,o as n,r,t as i}from"./compiler-runtime-DTT1fEHg.js";import{A as a,C as o,E as s,a as c,b as l,c as u,g as d,h as f,k as p,m,o as h,s as g,v as _,x as v,y}from"./removable-TyvHreKc.js";import{i as b}from"./useBaseQuery-BzVOpEso.js";import{t as x}from"./mutation--CHjRtbG.js";import{a as S,i as C,n as w,r as T,t as E}from"./lazyRouteComponent-qWqE2u8p.js";import{a as D,b as O,c as k,d as ee,f as te,i as ne,m as re,o as ie,s as ae,v as oe,w as se,x as ce}from"./matchContext-Dxo67MeP.js";import{t as A}from"./link-cv-r823H.js";import{a as le,i as ue,n as de,r as fe,t as pe}from"./Match-7FVH5X8f.js";import{n as me}from"./with-selector-DwL8goiN.js";import{t as he}from"./useSelector-d3lmLSFc.js";import{t as ge}from"./useNavigate-BiiHYpLW.js";import{f as _e,i as ve,n as j,t as M}from"./useValueAsRef-DbvX_oWn.js";import{a as ye,d as be,l as xe,n as Se,o as Ce,t as N}from"./dist-oTooRiSa.js";import{t as we}from"./useRender-DyI7F-Qi.js";import{C as P,a as Te,d as Ee,o as De,s as Oe,u as ke}from"./httpRequest-Bc1WZmsd.js";import{t as F}from"./createLucideIcon-DI_DJF-h.js";import{t as Ae}from"./camera-1Qc58YO0.js";import{a as je,i as Me,n as Ne,o as Pe,r as Fe,s as Ie,t as Le}from"./waypoints-CeME1HWv.js";import{n as Re,t as ze}from"./_id-DhXzkUJD.js";import{t as Be}from"./network-DNraRZY6.js";import{n as Ve,t as He}from"./_clusterName-DF0V7aoh.js";import{n as Ue,t as We}from"./_id-UTIPU7Ql.js";import{b as Ge,c as Ke,n as qe,o as Je,s as Ye,t as Xe,v as Ze,x as Qe}from"./button-Bae9vdts.js";import{D as $e,Dt as et,E as tt,Et as nt,I as rt,Mt as it,N as at,P as ot,Q as st,T as ct,Tt as lt,V as ut,W as dt,_ as ft,at as pt,b as mt,ct as ht,dt as gt,g as _t,h as vt,it as yt,j as bt,jt as xt,k as St,kt as Ct,lt as wt,m as Tt,nt as Et,pt as Dt,st as Ot,ut as kt,v as At,w as jt,wt as Mt,y as Nt,z as Pt}from"./useScrollLock-DPIS-H3s.js";import{_ as Ft,b as It,d as Lt,h as Rt,m as zt,o as Bt,p as Vt,r as Ht,v as Ut,x as Wt,y as Gt}from"./reason-parts-DS9EIifS.js";import{n as Kt,r as qt,t as I}from"./usePositioner-CRZWTJxW.js";import"./input-CpcyJw4R.js";import{t as Jt}from"./separator-BqVPQr-v.js";import{a as Yt,c as Xt,i as Zt,l as Qt,n as $t,o as en,r as tn,s as nn,t as rn}from"./DialogTitle-BredCU7I.js";import{_o as L,t as an}from"./awsClient-I-S7JTV9.js";import{t as on}from"./acm-BGw6nz9A.js";import{i as sn,t as cn}from"./bedrock-DIbdgKPF.js";import{i as ln}from"./bedrockAgent-BIsnxh0q.js";import{A as un,E as dn,M as fn,O as pn,S as mn,_ as hn,c as gn,d as _n,h as vn,l as yn,n as bn,o as xn,p as Sn,r as Cn,w as wn,y as Tn}from"./ec2-DJL24ekw.js";import{n as En}from"./ecr-BcyXDcHV.js";import{n as Dn,o as On}from"./ecs-DRWPOVsw.js";import{c as kn}from"./eks-6qMVucHG.js";import{a as An,o as jn,u as Mn}from"./elbv2-19pV3l7Z.js";import{C as Nn,f as Pn,l as Fn,p as In,y as Ln}from"./iam-Fo1DnIKB.js";import{a as Rn,d as zn,h as Bn,o as Vn,r as Hn}from"./rds-BKbEDMHo.js";import{n as Un}from"./s3-DOjTsnt2.js";import{n as Wn,r as Gn,t as Kn}from"./use-admin--3prNhUW.js";import{t as qn}from"./login-Dp5bFone.js";import{t as Jn}from"./run-instances-8RMGpU18.js";import{t as Yn}from"./create-snapshot-D2b7NxRk.js";import{t as Xn}from"./create-service-Djw10eEM.js";import{t as Zn}from"./register-task-definition-U98DM5k-.js";import{t as Qn}from"./run-task-BZ2XaUEF.js";import{t as $n}from"./_knowledgeBaseId-DVgnMfa6.js";import{t as er}from"./_id-4vlHIIDd.js";import{t as tr}from"./_id-mj6gqk73.js";import{t as nr}from"./_id-DY6kdRSk.js";import{t as rr}from"./_id-Cl4gNg8Q.js";import{t as ir}from"./_id-B8giJPUP.js";import{t as ar}from"./_id-DbTiAtNe.js";import{t as or}from"./_id-jyowKAL_.js";import{t as sr}from"./_id-YzyaSfEH.js";import{t as cr}from"./_id-mBt-oIEO.js";import{t as lr}from"./_id-BFiWwc3U.js";import{t as ur}from"./_id-C2vIpjOM.js";import{t as dr}from"./_id-De06XKat.js";import{t as fr}from"./_id-CMj6qdrO.js";import{t as pr}from"./_id-FEWgr3M8.js";import{t as mr}from"./_id-CFipLulu.js";import{t as hr}from"./_id-B6nqc7CF.js";import{t as gr}from"./_clusterName-DJOHvPop.js";import{t as _r}from"./_groupName-BvcKd10K.js";import{t as vr}from"./_instanceProfileName-BOsdSgno.js";import{t as yr}from"./_policyArn-BN6vggL9.js";import{t as br}from"./_roleName-B4WF5_nu.js";import{t as xr}from"./_userName-DYz225MP.js";import{t as Sr}from"./_id-DQz2NYRM.js";import{t as Cr}from"./_name-D8B6odnO.js";import{t as wr}from"./_id-CEXDg-b_.js";import{t as Tr}from"./_id-CBio_VIH.js";import{t as Er}from"./_name-ZN8s2NQr.js";import{t as Dr}from"./_bucket-CQaj5ptI.js";import{t as Or}from"./_-DE2wrcdt.js";import{t as kr}from"./_guardrailId.index-LFEeWBUo.js";import{t as Ar}from"./_guardrailId.edit-CgcBSYTM.js";import{t as jr}from"./_serviceName-BG2NVlBw.js";import{t as Mr}from"./_taskId-DpClY7GP.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Nr=class extends u{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new x({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Pr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Pr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Pr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Pr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){h.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>_(t,e))}findAll(e={}){return this.getAll().filter(t=>_(e,t))}notify(e){h.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return h.batch(()=>Promise.all(e.map(e=>e.continue().catch(l))))}};function Pr(e){return e.options.scope?.id}var Fr=class extends u{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new b({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){h.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>y(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>y(e,t)):t}notify(e){h.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){h.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){h.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ir=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Fr,this.#t=e.mutationCache||new Nr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=g.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(o(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=m(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return h.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;h.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return h.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=h.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(l).catch(l)}invalidateQueries(e,t={}){return h.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=h.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(l)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(l)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(o(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(o(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(l).catch(l)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(l).catch(l)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return c.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(f(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{v(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(f(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{v(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===s&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function Lr(e,t){if(e)return typeof e==`string`?e:e[t]}function Rr(e){return e?.scriptFormat??`module`}function zr(e,t,n){let r=Br(t),i=Lr(n,`script`)??r.crossOrigin;return{...Rr(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function Br(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Vr(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function Hr(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Ur({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Wr(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Gr=[],Kr=0,{link:qr,unlink:Jr,propagate:Yr,checkDirty:Xr,shallowPropagate:Zr}=Ur({update(e){return e._update()},notify(e){Gr[$r++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ri(e))}}),Qr=0,$r=0,ei,ti=0;function ni(e){try{++ti,e()}finally{--ti||ii()}}function ri(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Jr(n,e)}function ii(){if(!(ti>0)){for(;Qr<$r;){let e=Gr[Qr];Gr[Qr++]=void 0,e.notify()}Qr=0,$r=0}}function ai(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return ei!==void 0&&qr(i,ei,Kr),i._snapshot},subscribe(e){let t=Wr(e),n={current:!1},r=oi(()=>{i.get(),n.current?(ei=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ei,o=t?.compare??Object.is;if(n)ei=i,++Kr,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{ei=a,n&&(i.flags&=-5),ri(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Xr(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Zr(e)}}else e&32&&(i.flags=e&-33);return ei!==void 0&&qr(i,ei,Kr),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Yr(e),Zr(e),ii())}},i}function oi(e){let t=()=>{let t=ei;ei=n,++Kr,n.depsTail=void 0,n.flags=6;try{return e()}finally{ei=t,n.flags&=-5,ri(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Xr(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ri(this)}};return t(),n}var R=n(r(),1);function si(e,t){let n=e[1];e.length=0,n?.(t)}function ci({t:e}){let t=ne(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{si(n,!1),n.push(i,a),e(t),R.startTransition(r)}),S(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(oe(r.publicHref)!==oe(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...k(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}var z=t();function li(){let e=ne(),t=e.routesById[te],n=fe(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ci,{t:R.useState()[1]}),e.ssr?(0,z.jsx)(ui,{}):(0,z.jsx)(R.Suspense,{fallback:n,children:(0,z.jsx)(ui,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function ui(){let e=ne(),t=e._rendered,n=he(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;S(()=>{t[0]===n&&si(t,!0)},[t,n]);let a=i?(0,z.jsx)(pe,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(le,{getResetKey:()=>r,onCatch:void 0,children:a})}var di=e=>({createMutableStore:ai,createReadonlyStore:ai,batch:ni}),fi=e=>new pi(e),pi=class extends ae{constructor(e){super(e,di)}};function mi({router:e,children:t,...n}){se(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(D.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function hi({router:e,...t}){return(0,z.jsx)(mi,{router:e,...t,children:(0,z.jsx)(li,{})})}function gi(e){let t=ne();return he(t.stores.location,C(e,t))}function _i(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function vi(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=R.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,z.jsx)(yi,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function yi({attrs:e,children:t,preventScriptHoist:n}){ne();let r=ue(),i=R.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(R.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return _i(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,_i(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function bi(e,t,n,r){n=ie(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:ce(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),l=e.ssr?.manifest,u=[];l&&(n.forEach(e=>{(l.routes[e.routeId]?.css)?.forEach(e=>{let n=Hr(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:Lr(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),l.inlineStyle&&u.push({tag:`style`,attrs:{...l.inlineStyle.attrs,nonce:t},children:l.inlineStyle.children,inlineCss:!0}));let d=[];l&&n.forEach(e=>{l.routes[e.routeId]?.preloads?.forEach(e=>{d.push({tag:`link`,attrs:{...zr(l,e,r),nonce:t}})})});let f=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),p=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),m=[];return Vr(m,a),m.push(...d),Vr(m,c),m.push(...u),Vr(m,f),Vr(m,p),m}var xi=e=>{let t=ne(),n=t.options.ssr?.nonce,r=R.useCallback(r=>bi(t,n,r,e),[e,n,t]);return he(t.stores.matches,r,{compare:O})};function Si(e){let t=xi(e.assetCrossOrigin),n=ne().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,R.createElement)(vi,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Ci=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),wi=e(((e,t)=>{t.exports=Ci()})),Ti=e((e=>{var t=wi(),n=r(),i=_e();function a(e){var t=`https://react.dev/errors/`+e;if(1xe||(e.current=be[xe],be[xe]=null,xe--)}function N(e,t){xe++,be[xe]=e.current,e.current=t}var we=Se(null),P=Se(null),Te=Se(null),Ee=Se(null);function De(e,t){switch(N(Te,t),N(P,e),N(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ce(we),N(we,e)}function Oe(){Ce(we),Ce(P),Ce(Te)}function ke(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,N(Ee,e)),t=we.current;var n=dp(t,e.type);t!==n&&(N(P,e),N(we,n))}function F(e){P.current===e&&(Ce(we),Ce(P)),Ee.current===e&&(Ce(Ee),sh._currentValue=ye)}var Ae,je;function Me(e){if(Ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||``,je=-1i.map(i=>d[i]); +import{i as e,n as t,o as n,r,t as i}from"./compiler-runtime-DTT1fEHg.js";import{A as a,C as o,E as s,a as c,b as l,c as u,g as d,h as f,k as p,m,o as h,s as g,v as _,x as v,y}from"./removable-TyvHreKc.js";import{i as b}from"./useBaseQuery-BzVOpEso.js";import{t as x}from"./mutation--CHjRtbG.js";import{a as S,i as C,n as w,r as T,t as E}from"./lazyRouteComponent-qWqE2u8p.js";import{a as D,b as O,c as k,d as ee,f as te,i as ne,m as re,o as ie,s as ae,v as oe,w as se,x as ce}from"./matchContext-Dxo67MeP.js";import{t as A}from"./link-cv-r823H.js";import{a as le,i as ue,n as de,r as fe,t as pe}from"./Match-7FVH5X8f.js";import{n as me}from"./with-selector-DwL8goiN.js";import{t as he}from"./useSelector-d3lmLSFc.js";import{t as ge}from"./useNavigate-BiiHYpLW.js";import{f as _e,i as ve,n as j,t as M}from"./useValueAsRef-DbvX_oWn.js";import{a as ye,d as be,l as xe,n as Se,o as Ce,t as N}from"./dist-oTooRiSa.js";import{t as we}from"./useRender-DyI7F-Qi.js";import{C as P,a as Te,d as Ee,o as De,s as Oe,u as ke}from"./httpRequest-Bc1WZmsd.js";import{t as F}from"./createLucideIcon-DI_DJF-h.js";import{t as Ae}from"./camera-1Qc58YO0.js";import{a as je,i as Me,n as Ne,o as Pe,r as Fe,s as Ie,t as Le}from"./waypoints-CeME1HWv.js";import{n as Re,t as ze}from"./_id-BU4JPzyk.js";import{t as Be}from"./network-DNraRZY6.js";import{n as Ve,t as He}from"./_clusterName-DF0V7aoh.js";import{n as Ue,t as We}from"./_id-Cho_Bq75.js";import{b as Ge,c as Ke,n as qe,o as Je,s as Ye,t as Xe,v as Ze,x as Qe}from"./button-Bae9vdts.js";import{D as $e,Dt as et,E as tt,Et as nt,I as rt,Mt as it,N as at,P as ot,Q as st,T as ct,Tt as lt,V as ut,W as dt,_ as ft,at as pt,b as mt,ct as ht,dt as gt,g as _t,h as vt,it as yt,j as bt,jt as xt,k as St,kt as Ct,lt as wt,m as Tt,nt as Et,pt as Dt,st as Ot,ut as kt,v as At,w as jt,wt as Mt,y as Nt,z as Pt}from"./useScrollLock-DPIS-H3s.js";import{_ as Ft,b as It,d as Lt,h as Rt,m as zt,o as Bt,p as Vt,r as Ht,v as Ut,x as Wt,y as Gt}from"./reason-parts-DS9EIifS.js";import{n as Kt,r as qt,t as I}from"./usePositioner-CRZWTJxW.js";import"./input-CpcyJw4R.js";import{t as Jt}from"./separator-BqVPQr-v.js";import{a as Yt,c as Xt,i as Zt,l as Qt,n as $t,o as en,r as tn,s as nn,t as rn}from"./DialogTitle-BredCU7I.js";import{_o as L,t as an}from"./awsClient-I-S7JTV9.js";import{t as on}from"./acm-BGw6nz9A.js";import{i as sn,t as cn}from"./bedrock-DIbdgKPF.js";import{i as ln}from"./bedrockAgent-BIsnxh0q.js";import{A as un,E as dn,M as fn,O as pn,S as mn,_ as hn,c as gn,d as _n,h as vn,l as yn,n as bn,o as xn,p as Sn,r as Cn,w as wn,y as Tn}from"./ec2-DJL24ekw.js";import{n as En}from"./ecr-BcyXDcHV.js";import{n as Dn,o as On}from"./ecs-DRWPOVsw.js";import{c as kn}from"./eks-6qMVucHG.js";import{a as An,o as jn,u as Mn}from"./elbv2-19pV3l7Z.js";import{C as Nn,f as Pn,l as Fn,p as In,y as Ln}from"./iam-Fo1DnIKB.js";import{a as Rn,d as zn,h as Bn,o as Vn,r as Hn}from"./rds-BKbEDMHo.js";import{n as Un}from"./s3-DOjTsnt2.js";import{n as Wn,r as Gn,t as Kn}from"./use-admin--3prNhUW.js";import{t as qn}from"./login-Dp5bFone.js";import{t as Jn}from"./run-instances-B3erxZcb.js";import{t as Yn}from"./create-snapshot-D5zAE9J5.js";import{t as Xn}from"./create-service-BdM1V9nv.js";import{t as Zn}from"./register-task-definition-U98DM5k-.js";import{t as Qn}from"./run-task-CAY9EhS0.js";import{t as $n}from"./_knowledgeBaseId-8QsoGS6s.js";import{t as er}from"./_id-C4RVw0R5.js";import{t as tr}from"./_id-CB17TYHV.js";import{t as nr}from"./_id-DHAyVS2z.js";import{t as rr}from"./_id-EXa1ce3y.js";import{t as ir}from"./_id-BXvaEM7B.js";import{t as ar}from"./_id-BfKm8JnW.js";import{t as or}from"./_id-Cl2VpnIe.js";import{t as sr}from"./_id-CaQBG_tF.js";import{t as cr}from"./_id-TLd3PJNv.js";import{t as lr}from"./_id-CZhTTYNn.js";import{t as ur}from"./_id-BTFtkMPi.js";import{t as dr}from"./_id-De06XKat.js";import{t as fr}from"./_id-BXpGhYvJ.js";import{t as pr}from"./_id-BzF3654U.js";import{t as mr}from"./_id-BtW0qAgz.js";import{t as hr}from"./_id-B6nqc7CF.js";import{t as gr}from"./_clusterName-IpjQl0UQ.js";import{t as _r}from"./_groupName-BvcKd10K.js";import{t as vr}from"./_instanceProfileName-BOsdSgno.js";import{t as yr}from"./_policyArn-BN6vggL9.js";import{t as br}from"./_roleName-B4WF5_nu.js";import{t as xr}from"./_userName-Bo0jc5mn.js";import{t as Sr}from"./_id-Dvn2ziMO.js";import{t as Cr}from"./_name-D8B6odnO.js";import{t as wr}from"./_id-CmJP1sd4.js";import{t as Tr}from"./_id-CBio_VIH.js";import{t as Er}from"./_name-6EqNx3_u.js";import{t as Dr}from"./_bucket-CQaj5ptI.js";import{t as Or}from"./_-DE2wrcdt.js";import{t as kr}from"./_guardrailId.index-YWBYQFSM.js";import{t as Ar}from"./_guardrailId.edit-CgcBSYTM.js";import{t as jr}from"./_serviceName-B2bE-Lsy.js";import{t as Mr}from"./_taskId-BKjSISSI.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Nr=class extends u{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new x({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Pr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Pr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Pr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Pr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){h.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>_(t,e))}findAll(e={}){return this.getAll().filter(t=>_(e,t))}notify(e){h.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return h.batch(()=>Promise.all(e.map(e=>e.continue().catch(l))))}};function Pr(e){return e.options.scope?.id}var Fr=class extends u{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new b({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){h.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>y(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>y(e,t)):t}notify(e){h.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){h.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){h.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ir=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Fr,this.#t=e.mutationCache||new Nr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=g.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(o(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=m(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return h.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;h.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return h.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=h.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(l).catch(l)}invalidateQueries(e,t={}){return h.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=h.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(l)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(l)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(o(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(o(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(l).catch(l)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(l).catch(l)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return c.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(f(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{v(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(f(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{v(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===s&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function Lr(e,t){if(e)return typeof e==`string`?e:e[t]}function Rr(e){return e?.scriptFormat??`module`}function zr(e,t,n){let r=Br(t),i=Lr(n,`script`)??r.crossOrigin;return{...Rr(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function Br(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Vr(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function Hr(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Ur({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Wr(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Gr=[],Kr=0,{link:qr,unlink:Jr,propagate:Yr,checkDirty:Xr,shallowPropagate:Zr}=Ur({update(e){return e._update()},notify(e){Gr[$r++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ri(e))}}),Qr=0,$r=0,ei,ti=0;function ni(e){try{++ti,e()}finally{--ti||ii()}}function ri(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Jr(n,e)}function ii(){if(!(ti>0)){for(;Qr<$r;){let e=Gr[Qr];Gr[Qr++]=void 0,e.notify()}Qr=0,$r=0}}function ai(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return ei!==void 0&&qr(i,ei,Kr),i._snapshot},subscribe(e){let t=Wr(e),n={current:!1},r=oi(()=>{i.get(),n.current?(ei=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ei,o=t?.compare??Object.is;if(n)ei=i,++Kr,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{ei=a,n&&(i.flags&=-5),ri(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Xr(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Zr(e)}}else e&32&&(i.flags=e&-33);return ei!==void 0&&qr(i,ei,Kr),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Yr(e),Zr(e),ii())}},i}function oi(e){let t=()=>{let t=ei;ei=n,++Kr,n.depsTail=void 0,n.flags=6;try{return e()}finally{ei=t,n.flags&=-5,ri(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Xr(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ri(this)}};return t(),n}var R=n(r(),1);function si(e,t){let n=e[1];e.length=0,n?.(t)}function ci({t:e}){let t=ne(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{si(n,!1),n.push(i,a),e(t),R.startTransition(r)}),S(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(oe(r.publicHref)!==oe(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...k(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}var z=t();function li(){let e=ne(),t=e.routesById[te],n=fe(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ci,{t:R.useState()[1]}),e.ssr?(0,z.jsx)(ui,{}):(0,z.jsx)(R.Suspense,{fallback:n,children:(0,z.jsx)(ui,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function ui(){let e=ne(),t=e._rendered,n=he(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;S(()=>{t[0]===n&&si(t,!0)},[t,n]);let a=i?(0,z.jsx)(pe,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(le,{getResetKey:()=>r,onCatch:void 0,children:a})}var di=e=>({createMutableStore:ai,createReadonlyStore:ai,batch:ni}),fi=e=>new pi(e),pi=class extends ae{constructor(e){super(e,di)}};function mi({router:e,children:t,...n}){se(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(D.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function hi({router:e,...t}){return(0,z.jsx)(mi,{router:e,...t,children:(0,z.jsx)(li,{})})}function gi(e){let t=ne();return he(t.stores.location,C(e,t))}function _i(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function vi(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=R.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,z.jsx)(yi,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function yi({attrs:e,children:t,preventScriptHoist:n}){ne();let r=ue(),i=R.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(R.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return _i(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,_i(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function bi(e,t,n,r){n=ie(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:ce(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),l=e.ssr?.manifest,u=[];l&&(n.forEach(e=>{(l.routes[e.routeId]?.css)?.forEach(e=>{let n=Hr(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:Lr(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),l.inlineStyle&&u.push({tag:`style`,attrs:{...l.inlineStyle.attrs,nonce:t},children:l.inlineStyle.children,inlineCss:!0}));let d=[];l&&n.forEach(e=>{l.routes[e.routeId]?.preloads?.forEach(e=>{d.push({tag:`link`,attrs:{...zr(l,e,r),nonce:t}})})});let f=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),p=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),m=[];return Vr(m,a),m.push(...d),Vr(m,c),m.push(...u),Vr(m,f),Vr(m,p),m}var xi=e=>{let t=ne(),n=t.options.ssr?.nonce,r=R.useCallback(r=>bi(t,n,r,e),[e,n,t]);return he(t.stores.matches,r,{compare:O})};function Si(e){let t=xi(e.assetCrossOrigin),n=ne().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,R.createElement)(vi,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Ci=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),wi=e(((e,t)=>{t.exports=Ci()})),Ti=e((e=>{var t=wi(),n=r(),i=_e();function a(e){var t=`https://react.dev/errors/`+e;if(1xe||(e.current=be[xe],be[xe]=null,xe--)}function N(e,t){xe++,be[xe]=e.current,e.current=t}var we=Se(null),P=Se(null),Te=Se(null),Ee=Se(null);function De(e,t){switch(N(Te,t),N(P,e),N(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ce(we),N(we,e)}function Oe(){Ce(we),Ce(P),Ce(Te)}function ke(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,N(Ee,e)),t=we.current;var n=dp(t,e.type);t!==n&&(N(P,e),N(we,n))}function F(e){P.current===e&&(Ce(we),Ce(P)),Ee.current===e&&(Ce(Ee),sh._currentValue=ye)}var Ae,je;function Me(e){if(Ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||``,je=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ne=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Me(n):``}function Fe(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me(`Lazy`);case 13:return e.child!==t&&t!==null?Me(`Suspense Fallback`):Me(`Suspense`);case 19:return Me(`SuspenseList`);case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return Me(`Activity`);case 30:return Me(`ViewTransition`);default:return``}}function Ie(e){try{var t=``,n=null;do t+=Fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Le=Object.prototype.hasOwnProperty,Re=t.unstable_scheduleCallback,ze=t.unstable_cancelCallback,Be=t.unstable_shouldYield,Ve=t.unstable_requestPaint,He=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ge=t.unstable_UserBlockingPriority,Ke=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:rt,tt=Math.log,nt=Math.LN2;function rt(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var it=256,at=262144,ot=4194304;function st(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ct(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=st(n))):i=st(o):i=st(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=st(n))):i=st(o)):i=st(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ut(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function mt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ht(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Pn(),Nn=Mn=jn=null,br=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=On&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Ur($r,r)||($r=r,r=qf(Qr,`onSelect`),0>=o,i-=o,Yi=1<<32-et(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),V&&Zi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),V&&Zi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return V&&Zi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),V&&Zi(i,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),so(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ce&&eo(l)===r.type){n(e,r.sibling),c=i(r,o.props),so(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ii(o.props.children,e.mode,c,o.key),so(c,o),c.return=e,e=c):(c=Fi(o.type,o.key,o.props,null,e.mode,c),so(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=zi(o,e.mode,c),c.return=e,e=c}return s(e);case ce:return o=eo(o),_(e,r,o,c)}if(ve(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,oo(o),c);if(o.$$typeof===re)return _(e,r,Ta(e,o),c);co(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ao=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=ji(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var uo=lo(!0),fo=lo(!1),po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ho(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Oi(e),Di(e,null,n),t}return Ti(e,r,t,n),Oi(e)}function vo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}function yo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bo=!1;function xo(){if(bo){var e=za;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;po=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Z&f)===f:(r&f)===f){f!==0&&f===Ra&&(bo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:po=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ad|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,cc(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ha(c,r),Ad(e)):sc(e,t,r,Ad(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=$s(e).queue;Xs(e,i,t,ye,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:ye},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Ad())}function tc(){return wa(sh)}function nc(){return os().memoizedState}function rc(){return os().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=go(n);var r=_o(t,e,n);r!==null&&(Nd(r,t,n),vo(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Ei(e,t,n,r),n!==null&&(Nd(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Ad())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Hr(s,o))return Ti(e,t,i,0),Y===null&&Ci(),!1}catch{}if(n=Ei(e,t,i,r),n!==null)return Nd(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(a(479))}else t=Ei(e,n,r,2),t!==null&&Nd(t,e,2)}function lc(e){var t=e.alternate;return e===H||t!==null&&t===H}function uc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}var fc={readContext:wa,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},pc={readContext:wa,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){$e(!0);try{n(t)}finally{$e(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(as(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,H,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,i=as();if(V){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Y===null)throw Error(a(349));Z&127||hs(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},G.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=Y.identifierPrefix;if(V){var n=Xi,r=Yi;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[wt]=t,o[Tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ul(t)}}return hl(t),t.subtreeFlags&=-33554433,dl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=Te.current,ua(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=na,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||sa(t,!0)}else e=lp(e).createTextNode(r),e[wt]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ua(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[wt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(a(558))}return hl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ua(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[wt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),i=!1}else i=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pl(t,t.updateQueue),hl(t),null);case 4:return Oe(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,hl(t),null;case 10:return va(t.type),hl(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return hl(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)ml(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,ml(r,!1),e=o.updateQueue,t.updateQueue=e,pl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pi(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),V&&Zi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&He()>hd&&(t.flags|=128,i=!0,ml(r,!1),t.lanes=4194304)}}else{if(!i){if(e=Bo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,pl(t,e),ml(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!V)return hl(t),null}else 2*He()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,i=!0,ml(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=He(),e.sibling=null,o=Lo.current,o=i?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||V?Ro(t,o):(n=o,N(Ao,t),N(Lo,n),jo===null&&(jo=t)),V&&Zi(t,r.treeForkCount),e}return hl(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(hl(t),t.subtreeFlags&6&&(t.flags|=8192)):hl(t),n=t.updateQueue,n!==null&&pl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Ce(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Aa),hl(t),null;case 25:return null;case 30:return t.flags|=33554432,hl(t),null}throw Error(a(156,t.tag))}function _l(e,t){switch(ea(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(Aa),Oe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return F(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(a(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Oe(),null;case 10:return va(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&Ce(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Aa),null;case 25:return null;default:return null}}function vl(e,t){switch(ea(t),t.tag){case 3:va(Aa),Oe();break;case 26:case 27:case 5:F(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:va(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&Ce(Wa);break;case 24:va(Aa)}}function yl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Q(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){Q(e,e.return,t)}}}function Sl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Cl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=gi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);p(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Q(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Q(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Q(e,t,n)}else n.current=null}}function Tl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[wt]=e,Rt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,i).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,J&6)throw Error(a(331));var c=J;if(J|=4,qu(o.current),zu(o,o.current,s,n),J=c,Ef(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{M.p=i,j.T=r,lf(e,t)}}function ff(e,t,n){t=Vi(n,t),t=Ec(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(mt(e,2),Tf(e))}function Q(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Vi(n,e),n=Dc(2),r=_o(t,n,2),r!==null&&(Oc(n,r,t,e),mt(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nd=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Y===e&&(Z&n)===n&&(id===4||id===3&&(Z&62914560)===Z&&300>He()-pd?J&2?sd|=n:Bd(e,0):sd|=n,ld===Z&&(ld=0)),Tf(e)}function hf(e,t){t===0&&(t=ft()),e=B(e,t),e!==null&&(mt(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return Re(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Z,a=ct(r,r===Y?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||lt(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=He(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}vd!==0&&vd!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=L(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+L(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+L(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+L(n.imageSizes)+`"]`)):i+=`[href="`+L(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Mt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+L(r)+`"][href="`+L(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Lt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Rt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Lt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Rt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Lt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Rt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=Te.current)?bm(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Lt(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Lt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(i,e,o,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Lt(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Pm(e){return`href="`+L(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Mt]){r.loading=1;return}}else t=e.createElement(`link`),t[Mt]=!0,t.onload=t.onerror=zt.bind(null,t),np(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+L(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+L(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var i=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var o=e.querySelector(Fm(i));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=Im(n),(i=vm.get(i))&&Hm(r,i),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(i=e.querySelector(zm(o)))?(t.instance=i,Rt(i),i):(r=n,(i=vm.get(o))&&(r=T({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Rt(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ti()}))(),1),B=i(),Di=(0,R.createContext)(void 0);function Oi(e,t){try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return t}function ki(e){let t=(0,B.c)(14),{children:n,defaultTheme:r,storageKey:i}=e,a=r===void 0?`dark`:r,o=i===void 0?`ui-theme`:i,s;t[0]!==a||t[1]!==o?(s=()=>Oi(o,a),t[0]=a,t[1]=o,t[2]=s):s=t[2];let[c,l]=(0,R.useState)(s),u,d;t[3]===c?(u=t[4],d=t[5]):(u=()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),c===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(c)},d=[c],t[3]=c,t[4]=u,t[5]=d),(0,R.useEffect)(u,d);let f;t[6]===o?f=t[7]:(f=e=>{try{localStorage.setItem(o,e)}catch{}l(e)},t[6]=o,t[7]=f);let p;t[8]!==f||t[9]!==c?(p={theme:c,setTheme:f},t[8]=f,t[9]=c,t[10]=p):p=t[10];let m=p,h;return t[11]!==n||t[12]!==m?(h=(0,z.jsx)(Di.Provider,{value:m,children:n}),t[11]=n,t[12]=m,t[13]=h):h=t[13],h}function Ai(){let e=(0,R.useContext)(Di);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}var ji={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};ji.node;var Mi=F(ji),Ni={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Ni.node;var Pi=F(Ni),Fi={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};Fi.node;var Ii=F(Fi),Li={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};Li.node;var Ri=F(Li),zi={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};zi.node;var Bi=F(zi),Vi={name:`container`,size:24,node:[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]};Vi.node;var Hi=F(Vi),Ui={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};Ui.node;var Wi=F(Ui),Gi={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Gi.node;var Ki=F(Gi),qi={name:`file-stack`,size:24,node:[[`path`,{d:`M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1`,key:`likhh7`}],[`path`,{d:`M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1`,key:`17ky3x`}],[`path`,{d:`M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z`,key:`1hyeo0`}]]};qi.node;var Ji=F(qi),Yi={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Yi.node;var Xi=F(Yi),Zi={name:`id-card`,size:24,node:[[`path`,{d:`M13 19a4 4 0 00-8 0`,key:`cugzd5`}],[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]};Zi.node;var Qi=F(Zi),$i={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};$i.node;var ea=F($i),ta={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};ta.node;var na=F(ta),ra={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};ra.node;var V=F(ra),ia={name:`layout-list`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]};ia.node;var aa=F(ia),oa={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};oa.node;var sa=F(oa),ca={name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]};ca.node;var la=F(ca),ua={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};ua.node;var da=F(ua),fa={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};fa.node;var pa=F(fa),ma={name:`package`,size:24,node:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]};ma.node;var ha=F(ma),ga={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};ga.node;var _a=F(ga),va={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};va.node;var ya=F(va),ba={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};ba.node;var xa=F(ba),Sa={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Sa.node;var Ca=F(Sa),wa={name:`user-cog`,size:24,node:[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};wa.node;var Ta=F(wa),Ea={name:`users-round`,size:24,node:[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]],aliases:[`users-2`]};Ea.node;var Da=F(Ea),Oa={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Oa.node;var ka=F(Oa);function Aa(e,t){return t!=null&&!st(t)?0:typeof e==`function`?e():e}function ja(e,t,n){let r=Aa(e,n);return typeof r==`number`?r:r?.[t]}function Ma(e){return typeof e==`function`?e():e}function Na(e,t){return t||e===`click`||e===`mousedown`}function Pa(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Fa=R.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ut,currentIdRef:{current:null},currentContextRef:{current:null}});function Ia(e,t){e.current=t.current}function La(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=R.useRef(n),a=R.useRef(n),o=R.useRef(null),s=R.useRef(null),c=Gt();return Ye(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:ja(i.current,`open`),close:ja(n,`close`)}},[n,o,i,a]),(0,z.jsx)(Fa.Provider,{value:R.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Ra(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=R.useContext(Fa),[d,f]=R.useState(!1),p=R.useRef(n);return Ye(()=>{p.current=n},[n]),Ye(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),Ye(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:ja(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Ft(Lt))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),Ye(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,Ia(a,s),u.clear()}},[c,i,a,r,s,u]),R.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function za(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Ba(e){return e!=null&&e.clientX!=null}function Va(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=R.useRef(!1),l=R.useRef(null),[u,d]=R.useState(),[f,p]=R.useState([]),m=Ke(t=>{e.set(`positionReference`,t)}),h=Ke((t,n,i)=>{c.current||(!s.current.openEvent||Ba(s.current.openEvent))&&e.set(`positionReference`,za(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Ke(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=st(u)?a:i;R.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Ze(a);function r(t){let n=et(t);nt(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Ba(s.current.openEvent)?l.current=j(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),R.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),R.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),R.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=R.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return R.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}var Ha=me();function Ua(e){let t=R.useCallback(t=>e===void 0?Ce:e.subscribeStore(t),[e]),n=R.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Ha.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Wa=xt&&Ct;function Ga(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=R.useRef(!1),s=R.useRef(null),c=R.useRef(!0),l=Gt();R.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ze(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Qe(t)&&t===Mt(it(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return dt(j(r,`blur`,i),Wa&&j(r,`keydown`,a,!0),Wa&&j(r,`pointerdown`,l,!0))},[e,n]),R.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Ge(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=R.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=et(n.nativeEvent);if(Ge(a)){if(Wa&&!n.relatedTarget){if(!c.current&&!Ot(a))return}else if(!ht(a))return}let u=pt(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,Ft(Vt,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,Ft(Vt,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Ge(r)&&r.hasAttribute(ut(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Mt(it(t));(r||n!==t)&&(nt(a.current.floatingContext?.refs.floating.current,n)||nt(t,n)||o||pt(r??n,e.context.triggerElements)||e.setOpen(!1,Ft(Vt,i)))})}}},[a,r,e,l]);return R.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Ka=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Ut;restTimeout=new Ut;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},qa=new WeakMap;function Ja(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&qa.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),qa.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Ya(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=qa.get(n);a&&a!==e&&Ja(a),Ja(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,qa.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Xa(e){let t=e.context.dataRef.current,n=xe(()=>t.hoverInteractionState??Ka.create()).current;return t.hoverInteractionState||=n,It(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Za(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=ot(),u=at(),d=Xa(e),f=Gt(),p=Ke(()=>Na(c.current.openEvent?.type,d.interactedInside)),m=Ke(()=>Pa(c.current.openEvent?.type)),h=Ke(()=>{Ja(d)});Ye(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),R.useEffect(()=>h,[h]),Ye(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Ge(s)&&o){let e=s,t=o,n=it(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??lt(e,`[data-rootownerid]`)??n.body;return Ya(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),R.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Et(l.nodesRef.current,u).length>0)}function a(t){let n=ja(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Ft(zt,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=et(e);if(!yt(t)){d.interactedInside=!1;return}d.interactedInside=lt(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(pt(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Ge(o)&&Et(l.nodesRef.current,r,!1).some(e=>nt(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Ft(zt,n)),l.events.emit(`floating.closed`,n)})}let y=o;return dt(y&&j(y,`mouseenter`,g),y&&j(y,`mouseleave`,_),y&&j(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Qa=n(_e(),1),$a={current:null};function eo(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=$a,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=ot(l),v=Xa(e),y=R.useRef(!1),b=M(i),x=M(r),S=M(o),C=M(n),w=M(p),T=M(f),E=Ke(()=>Na(h.current.openEvent?.type,v.interactedInside)),D=Ke(()=>w.current?.()!==!1),O=Ke((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!nt(t,n);if(!Ge(r))return!1;let a=r;return i.hasMatchingElement(e=>nt(e,a))&&(!t||!nt(t,a))}),k=Ke(()=>{v.handler&&=(it(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),ee=Ke(()=>{Ja(v)});return u&&(v.handleCloseOptions=i?.__options),R.useEffect(()=>k,[k]),R.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===zt,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),R.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=ja(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Ft(zt,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Ft(zt,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Ge(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!st(v.pointerType))return;let n=Ma(S.current),r=ja(x.current,`open`,v.pointerType),i=et(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Ge(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(nt(t,i)){c=t;break}}Ge(o)&&Ge(s)&&!e.context.triggerElements.hasElement(o)&&nt(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Ge(c)&&Ge(s)&&nt(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,Ft(zt,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Ft(zt,t,c))}):g&&D()&&e.setOpen(!0,Ft(zt,t,c)))}function o(n){if(E()){ee();return}k();let r=e.select(`domReferenceElement`),i=it(r);v.restTimeout.clear(),v.restTimeoutPending=!1;let a=h.current.floatingContext??d?.();if(!pt(n.relatedTarget,e.context.triggerElements)){if(b.current&&a){e.select(`open`)||v.openChangeTimeout.clear();let r=c.current;v.handler=b.current({...a,tree:_,x:n.clientX,y:n.clientY,onClose(){ee(),k(),C.current&&!E()&&r===e.select(`domReferenceElement`)&&t(n,!0)}}),i.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!nt(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){nt(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?j(r,`mouseout`,l):void 0;return s?dt(j(r,`mousemove`,i,{once:!0}),j(r,`mouseenter`,i),j(r,`mouseleave`,o),f):dt(j(r,`mouseenter`,i),j(r,`mouseleave`,o),f)},[k,ee,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),R.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!st(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;Ya(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Ma(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Ft(zt,n,r))}v.pointerType===`touch`?Qa.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}var to=.1,no=to*to,ro=.5;function io(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ao(e,t,n,r,i,a,o,s,c,l){let u=!1;return io(e,t,n,r,i,a)&&(u=!u),io(e,t,i,a,o,s)&&(u=!u),io(e,t,o,s,c,l)&&(u=!u),io(e,t,c,l,n,r)&&(u=!u),u}function oo(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function so(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function co(e={}){let{blockPointerEvents:t=!1}=e,n=new Ut,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*no;return u=e,d=t,f=n,o0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,ee=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let te=!1;switch(c){case`top`:te=so(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:te=so(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:te=so(d,f,S.right-1,ee,x.left+1,k);break;case`right`:te=so(d,f,x.right-1,ee,S.left+1,k)}if(te)return;if(l&&!oo(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let ne=!1;switch(c){case`top`:{let n=T?ro/2:ro*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+ro+1,o=C||T?S.bottom-ro:S.top,s=C?T?S.bottom-ro:S.top:S.bottom-ro;ne=ao(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?ro/2:ro*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-ro,o=C||T?S.top+ro:S.bottom,s=C?T?S.top+ro:S.bottom:S.top+ro;ne=ao(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?ro/2:ro*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+ro+1,o=w||E?S.right-ro:S.left,s=w?E?S.right-ro:S.left:S.right-ro;ne=ao(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?ro/2:ro*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-ro,o=w||E?S.left+ro:S.right,s=w?E?S.left+ro:S.right:S.left+ro;ne=ao(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}ne?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var lo=vt(function(e){return $t(`dialog`,e)});function uo(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(lo,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function fo(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(tn,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function po(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`fixed inset-0 z-50 bg-black/80 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(Qt,{className:i,"data-slot":`sheet-overlay`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function mo(e){let t=(0,B.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0||o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(po,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=P(`fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,z.jsxs)(Xt,{"data-slot":`sheet-close`,render:(0,z.jsx)(Xe,{className:`absolute top-4 right-4`,size:`icon-sm`,variant:`ghost`}),children:[(0,z.jsx)(Ue,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,z.jsxs)(fo,{children:[l,(0,z.jsxs)(Zt,{className:u,"data-side":s,"data-slot":`sheet-content`,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function ho(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex flex-col gap-1.5 p-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-slot":`sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function go(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`text-sm font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(rn,{className:i,"data-slot":`sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _o(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`text-xs/relaxed text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(nn,{className:i,"data-slot":`sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var vo=R.createContext(void 0);function yo(e){let t=R.useContext(vo);if(t===void 0&&!e)throw Error(Je(72));return t}var bo={...en,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},xo=class extends Tt{constructor(e,t,n){let r=new ft;super(So(e,r,t,n),Co(r),bo)}setOpen=(e,t)=>{mt(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Ft(Rt,e))}};function So(e,t,n,r=!1){return{...Yt(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Co(e){return{popupRef:R.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var wo=vt(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=$e((e,t)=>new xo({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),jt(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=ct(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=R.useRef(null);Ye(()=>{m&&t&&p.setOpen(!1,Ft(Ht))},[m,t,p]),Ye(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),Ye(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),R.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Ft(Bt))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,z.jsxs)(vo.Provider,{value:p,children:[l&&(0,z.jsx)(Nt,{handle:l,store:p}),T&&(0,z.jsx)(To,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function To({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=bt(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Va(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=R.useMemo(()=>be(a.reference,i.reference),[a.reference,i.reference]);return tt(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??ye}),null}var Eo=R.createContext(void 0);function Do(){return R.useContext(Eo)}var Oo=`data-base-ui-tooltip-trigger`;function ko(e){let t=et(e);return Ge(t)?t:null}var Ao=_t(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=yo(!0),m=Ua(a)??p;if(!m)throw Error(Je(82));let h=Wt(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=R.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=St(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Do(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=Ra(v,{open:_}),O=Xa(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),ee=s??k,te=M(ee),ne=m.useState(`trackCursorAxis`),re=m.useState(`disableHoverablePopup`),ie=R.useRef(!1),ae=Gt(),oe=R.useRef(void 0);function se(){return D&&w.current!=null?0:c??C??600}function ce(e){let t=y.current;if(!t||!e)return!1;let n=lt(e,`[${Oo}]`);return n!==null&&n!==t&&nt(t,n)}function A(e){let t=ce(e);return ie.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,ae.clear()),t}let le=eo(v,{enabled:!ee,mouseOnly:!0,move:!1,handleClose:!re&&ne!==`both`?co():null,restMs:se,delay(){return u==null&&D?{close:ja(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!ie.current}}),ue=Ga(v,{enabled:!ee}).reference,de=e=>{let t=ie.current,n=ko(e),r=A(n),i=y.current,a=i&&n&&nt(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Ft(zt,e));return}if(t&&!r&&a&&!te.current&&!m.select(`open`)&&i&&st(oe.current)){let t=()=>{!ie.current&&!te.current&&!m.select(`open`)&&m.setOpen(!0,Ft(zt,e,i))},n=se();n===0?(ae.clear(),t()):ae.start(n,t)}},fe=m.useState(`appliedTriggerProps`,S||ne!==`none`);return Se(`button`,e,{state:{open:_},ref:[t,x,y],props:[le,ue,fe,{onMouseOver(e){de(e.nativeEvent)},onFocus(e){ce(ko(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){ie.current=!1,ae.clear(),oe.current=void 0},onPointerEnter(e){oe.current=e.pointerType},onPointerDown(e){oe.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[wt]:ee?``:void 0,[Oo]:ee?void 0:``},f],stateAttributesMapping:Dt})}),jo=R.createContext(void 0);function Mo(){let e=R.useContext(jo);if(e===void 0)throw Error(Je(70));return e}var No=R.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=rt({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,z.jsxs)(R.Fragment,{children:[l,c&&Qa.createPortal(n,c)]})}),Po=R.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return yo().useState(`mounted`)||n?(0,z.jsx)(jo.Provider,{value:n,children:(0,z.jsx)(No,{ref:t,...r})}):null}),Fo=R.createContext(void 0);function Io(){let e=R.useContext(Fo);if(e===void 0)throw Error(Je(71));return e}var Lo=R.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Pt,style:g,..._}=e,v=yo(),y=Mo(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=v.useState(`adaptiveOrigin`),O=qt({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:D}),k=R.useMemo(()=>({open:b,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,O.side,O.align,O.anchorHidden,S,T]),ee=I(e,k,{styles:O.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,z.jsx)(Fo.Provider,{value:O,children:ee})}),Ro=R.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=yo(),{side:s,align:c}=Io(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ve({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Za(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Se(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[At,f,Kt(d),a],stateAttributesMapping:gt})}),zo=R.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=yo(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Io(),f={open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)};return Se(`div`,e,{state:f,ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:kt})}),Bo=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=R.useMemo(()=>({open:t,close:n}),[t,n]);return(0,z.jsx)(Eo.Provider,{value:t,children:(0,z.jsx)(La,{delay:i,timeoutMs:r,children:e.children})})};function Vo(e){let t=(0,B.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,z.jsx)(Bo,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function H(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(Vo,{children:(0,z.jsx)(wo,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function U(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(Ao,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Ho(e){let t=(0,B.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=P(`z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background **:data-[slot=kbd]:rounded-md`,r),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsx)(zo,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`}),t[10]=m):m=t[10];let h;t[11]!==n||t[12]!==i||t[13]!==p?(h=(0,z.jsxs)(Ro,{className:p,"data-slot":`tooltip-content`,...i,children:[n,m]}),t[11]=n,t[12]=i,t[13]=p,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==f||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,z.jsx)(Po,{children:(0,z.jsx)(Lo,{align:d,alignOffset:f,className:`isolate z-50`,side:l,sideOffset:u,children:h})}),t[15]=d,t[16]=f,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}var Uo=window.matchMedia(`(max-width: 767px)`);function Wo(e){return Uo.addEventListener(`change`,e),()=>{Uo.removeEventListener(`change`,e)}}function Go(){return Uo.matches}function Ko(){return(0,R.useSyncExternalStore)(Wo,Go)}var qo=`sidebar_state`,Jo=604800,Yo=`12rem`,Xo=`16rem`,Zo=`3rem`,Qo=`b`,$o=R.createContext(null);function es(){let e=R.useContext($o);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function ts(e){let t=(0,B.c)(36),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0||c,u=Ko(),[d,f]=R.useState(!1),[p,m]=R.useState(l),h=i??p,g;t[8]!==h||t[9]!==o?(g=e=>{let t=typeof e==`function`?e(h):e;o?o(t):m(t),document.cookie=`${qo}=${t}; path=/; max-age=${Jo}`},t[8]=h,t[9]=o,t[10]=g):g=t[10];let _=g,v;t[11]!==u||t[12]!==_?(v=()=>{u?f(rs):_(ns)},t[11]=u,t[12]=_,t[13]=v):v=t[13];let y=v,b,x;t[14]===y?(b=t[15],x=t[16]):(b=()=>{let e=e=>{e.key===Qo&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},x=[y],t[14]=y,t[15]=b,t[16]=x),R.useEffect(b,x);let S=h?`expanded`:`collapsed`,C;t[17]!==u||t[18]!==h||t[19]!==d||t[20]!==_||t[21]!==S||t[22]!==y?(C={state:S,open:h,setOpen:_,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:y},t[17]=u,t[18]=h,t[19]=d,t[20]=_,t[21]=S,t[22]=y,t[23]=C):C=t[23];let w=C,T;t[24]===s?T=t[25]:(T={"--sidebar-width":Yo,"--sidebar-width-icon":Zo,...s},t[24]=s,t[25]=T);let E=T,D;t[26]===r?D=t[27]:(D=P(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[26]=r,t[27]=D);let O;t[28]!==n||t[29]!==a||t[30]!==D||t[31]!==E?(O=(0,z.jsx)(`div`,{className:D,"data-slot":`sidebar-wrapper`,style:E,...a,children:n}),t[28]=n,t[29]=a,t[30]=D,t[31]=E,t[32]=O):O=t[32];let k;return t[33]!==w||t[34]!==O?(k=(0,z.jsx)($o.Provider,{value:w,children:O}),t[33]=w,t[34]=O,t[35]=k):k=t[35],k}function ns(e){return!e}function rs(e){return!e}function is(e){let t=(0,B.c)(46),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offExamples`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=es();if(u===`none`){let e;t[7]===r?e=t[8]:(e=P(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,z.jsx)(`div`,{className:e,"data-slot":`sidebar`,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":Xo},t[13]=e):e=t[13];let r=e,a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,z.jsxs)(ho,{className:`sr-only`,children:[(0,z.jsx)(go,{children:`Sidebar`}),(0,z.jsx)(_o,{children:`Displays the mobile sidebar.`})]}),t[14]=a):a=t[14];let o;t[15]===n?o=t[16]:(o=(0,z.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[15]=n,t[16]=o);let s;t[17]!==c||t[18]!==o?(s=(0,z.jsxs)(mo,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,side:c,style:r,children:[a,o]}),t[17]=c,t[18]=o,t[19]=s):s=t[19];let l;return t[20]!==p||t[21]!==i||t[22]!==m||t[23]!==s?(l=(0,z.jsx)(uo,{onOpenChange:m,open:p,...i,children:s}),t[20]=p,t[21]=i,t[22]=m,t[23]=s,t[24]=l):l=t[24],l}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[25]===g?_=t[26]:(_=P(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offExamples]:w-0`,`group-data-[side=right]:rotate-180`,g),t[25]=g,t[26]=_);let v;t[27]===_?v=t[28]:(v=(0,z.jsx)(`div`,{className:_,"data-slot":`sidebar-gap`}),t[27]=_,t[28]=v);let y=c===`left`?`left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]`,b=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,x;t[29]!==r||t[30]!==y||t[31]!==b?(x=P(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,y,b,r),t[29]=r,t[30]=y,t[31]=b,t[32]=x):x=t[32];let S;t[33]===n?S=t[34]:(S=(0,z.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,children:n}),t[33]=n,t[34]=S);let C;t[35]!==i||t[36]!==x||t[37]!==S?(C=(0,z.jsx)(`div`,{className:x,"data-slot":`sidebar-container`,...i,children:S}),t[35]=i,t[36]=x,t[37]=S,t[38]=C):C=t[38];let w;return t[39]!==c||t[40]!==f||t[41]!==C||t[42]!==h||t[43]!==v||t[44]!==l?(w=(0,z.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":h,"data-side":c,"data-slot":`sidebar`,"data-state":f,"data-variant":l,children:[v,C]}),t[39]=c,t[40]=f,t[41]=C,t[42]=h,t[43]=v,t[44]=l,t[45]=w):w=t[45],w}function as(e){let t=(0,B.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=es(),o;t[4]===n?o=t[5]:(o=P(n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,z.jsx)(_a,{}),l=(0,z.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,z.jsxs)(Xe,{className:o,"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,onClick:s,size:`icon-lg`,variant:`ghost`,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function os(e){let t=(0,B.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{toggleSidebar:i}=es(),a;t[3]===n?a=t[4]:(a=P(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full hover:group-data-[collapsible=offExamples]:bg-sidebar`,`[[data-side=left][data-collapsible=offExamples]_&]:-right-2`,`[[data-side=right][data-collapsible=offExamples]_&]:-left-2`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a||t[7]!==i?(o=(0,z.jsx)(`button`,{"aria-label":`Toggle Sidebar`,className:a,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,onClick:i,tabIndex:-1,title:`Toggle Sidebar`,type:`button`,...r}),t[5]=r,t[6]=a,t[7]=i,t[8]=o):o=t[8],o}var ss=N(`flex flex-col gap-2 p-2`,{variants:{variant:{default:``,brand:`flex-row items-center px-4 py-3`}},defaultVariants:{variant:`default`}});function cs(e){let t=(0,B.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]!==n||t[5]!==a?(o=P(ss({variant:a,className:n})),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,z.jsx)(`div`,{className:o,"data-sidebar":`header`,"data-slot":`sidebar-header`,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function ls(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-sidebar":`footer`,"data-slot":`sidebar-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function us(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(Jt,{className:i,"data-sidebar":`separator`,"data-slot":`sidebar-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ds(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto`,`group-data-[collapsible=icon]:[scrollbar-width:none] group-data-[collapsible=icon]:[&::-webkit-scrollbar]:hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-sidebar":`content`,"data-slot":`sidebar-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fs(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`relative flex w-full min-w-0 flex-col px-2 py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-sidebar":`group`,"data-slot":`sidebar-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ps(e){let t=(0,B.c)(10),n,r,i,a;if(t[0]!==e){let{className:o,render:s,...c}=e;n=s,a=we,r=`div`,i=be({className:P(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,o)},c),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o={slot:`sidebar-group-label`,sidebar:`group-label`},t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==r||t[8]!==i?(s={defaultTagName:r,props:i,render:n,state:o},t[6]=n,t[7]=r,t[8]=i,t[9]=s):s=t[9],a(s)}function ms(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex w-full min-w-0 flex-col gap-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`ul`,{className:i,"data-sidebar":`menu`,"data-slot":`sidebar-menu`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function W(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`li`,{className:i,"data-sidebar":`menu-item`,"data-slot":`sidebar-menu-item`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var hs=N(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-xs`,sm:`h-7 text-xs`,lg:`h-12 text-xs group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function G(e){let t=(0,B.c)(18),{render:n,isActive:r,variant:i,size:a,tooltip:o,className:s,...c}=e,l=r!==void 0&&r,u=i===void 0?`default`:i,d=a===void 0?`default`:a,{isMobile:f,state:p}=es(),m=be({className:P(hs({variant:u,size:d}),s)},c),h;t[0]!==n||t[1]!==o?(h=o?(0,z.jsx)(U,{}):n,t[0]=n,t[1]=o,t[2]=h):h=t[2];let g;t[3]!==l||t[4]!==d?(g={slot:`sidebar-menu-button`,sidebar:`menu-button`,size:d,active:l},t[3]=l,t[4]=d,t[5]=g):g=t[5];let _;t[6]!==m||t[7]!==h||t[8]!==g?(_={defaultTagName:`button`,props:m,render:h,state:g},t[6]=m,t[7]=h,t[8]=g,t[9]=_):_=t[9];let v=we(_);if(!o)return v;let y;t[10]===o?y=t[11]:(y=typeof o==`string`?{children:o}:o,t[10]=o,t[11]=y);let b=y,x=p!==`collapsed`||f,S;t[12]!==x||t[13]!==b?(S=(0,z.jsx)(Ho,{align:`center`,hidden:x,side:`right`,...b}),t[12]=x,t[13]=b,t[14]=S):S=t[14];let C;return t[15]!==v||t[16]!==S?(C=(0,z.jsxs)(H,{children:[v,S]}),t[15]=v,t[16]=S,t[17]=C):C=t[17],C}var gs=new Set([`InvalidClientTokenId`,`AuthFailure`,`MissingAuthenticationToken`,`UnrecognizedClientException`,`ExpiredToken`,`ExpiredTokenException`,`InvalidAccessKeyId`]);function _s(e){return typeof e==`object`&&!!e&&`name`in e&&typeof e.name==`string`}function vs(e){return _s(e)&&gs.has(e.name)}var ys=!1;function bs(e,t){!ys&&vs(e)&&(ys=!0,Te(),an(),t.clear(),window.location.pathname!==`/login`&&(window.location.href=`/login?reason=expired`))}function xs(e){return Oe(()=>{an(),e.clear(),window.location.href=`/login`})}function Ss(){let e=new Ir({queryCache:new Fr({onError:t=>{bs(t,e)}}),mutationCache:new Nr({onError:t=>{bs(t,e)}}),defaultOptions:{queries:{staleTime:5e3,refetchIntervalInBackground:!1}}});return e}function Cs(){let e=(0,B.c)(8),{theme:t,setTheme:n}=Ai(),r;e[0]!==n||e[1]!==t?(r=()=>{n(t===`light`?`dark`:t===`dark`?`light`:`dark`)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i=r,a,o,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,z.jsx)(Ca,{className:`size-[1.2rem] scale-100 rotate-0 transition-transform dark:scale-0 dark:-rotate-90`}),o=(0,z.jsx)(pa,{className:`absolute size-[1.2rem] scale-0 rotate-90 transition-transform dark:scale-100 dark:rotate-0`}),s=(0,z.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`}),e[3]=a,e[4]=o,e[5]=s):(a=e[3],o=e[4],s=e[5]);let c;return e[6]===i?c=e[7]:(c=(0,z.jsxs)(Xe,{onClick:i,size:`icon-sm`,variant:`bare`,children:[a,o,s]}),e[6]=i,e[7]=c),c}function ws(){let e=(0,B.c)(7),{isAdmin:t,license:n}=Kn(),r=t&&n===`open-source`,i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=P(`z-50 flex h-10 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 text-sidebar-foreground`,`sticky top-0`),a=(0,z.jsx)(as,{className:`-ml-1`}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let o;e[2]===r?o=e[3]:(o=r&&(0,z.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:P(qe({variant:`outline`,size:`sm`})),children:`Upgrade`}),e[2]=r,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,z.jsx)(Cs,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,z.jsxs)(`header`,{className:i,children:[a,(0,z.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2`,children:[o,s]})]}),e[5]=o,e[6]=c),c}function Ts(){let e=(0,B.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(`h1`,{className:`text-4xl font-bold`,children:`404`}),n=(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Page not found`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,z.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4`,children:[t,n,(0,z.jsx)(A,{to:`/`,children:(0,z.jsx)(Xe,{variant:`outline`,children:`Go back home`})})]}),e[2]=r):r=e[2],r}function Es(){let e=(0,B.c)(259),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:Ds},e[0]=t):t=e[0];let n=gi(t),r=ge(),i=a(),{isAdmin:o}=Kn(),s;e[1]!==r||e[2]!==i?(s=function(){Te(),an(),i.clear(),r({to:`/login`})},e[1]=r,e[2]=i,e[3]=s):s=e[3];let c=s,l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsxs)(cs,{variant:`brand`,children:[(0,z.jsx)(`img`,{src:`/mulga-logo.svg`,alt:`Mulga`,className:`size-6 shrink-0 dark:invert`}),(0,z.jsx)(`span`,{className:`truncate text-sm font-semibold group-data-[collapsible=icon]:hidden`,children:`Spinifex`})]}),e[4]=l):l=e[4];let u;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(ps,{children:`General`}),e[5]=u):u=e[5];let d=n===`/`,f,p;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,z.jsx)(Xi,{className:`size-4`}),p=(0,z.jsx)(`span`,{children:`Dashboard`}),e[6]=f,e[7]=p):(f=e[6],p=e[7]);let m;e[8]===d?m=e[9]:(m=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/`,children:(0,z.jsxs)(G,{isActive:d,tooltip:`Dashboard`,children:[f,p]})})}),e[8]=d,e[9]=m);let h;e[10]!==o||e[11]!==n?(h=o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/nodes`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/nodes`),tooltip:`Nodes`,children:[(0,z.jsx)(Fe,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Nodes`})]})})}),e[10]=o,e[11]=n,e[12]=h):h=e[12];let g;e[13]!==m||e[14]!==h?(g=(0,z.jsxs)(fs,{children:[u,(0,z.jsxs)(ms,{children:[m,h]})]}),e[13]=m,e[14]=h,e[15]=g):g=e[15];let _;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,z.jsx)(ps,{children:`EC2`}),e[16]=_):_=e[16];let v;e[17]===n?v=e[18]:(v=n.startsWith(`/ec2/describe-instances`)||n.startsWith(`/ec2/run-instances`),e[17]=n,e[18]=v);let y,b;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,z.jsx)(Fe,{className:`size-4`}),b=(0,z.jsx)(`span`,{children:`Instances`}),e[19]=y,e[20]=b):(y=e[19],b=e[20]);let x;e[21]===v?x=e[22]:(x=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-instances`,children:(0,z.jsxs)(G,{isActive:v,tooltip:`Instances`,children:[y,b]})})}),e[21]=v,e[22]=x);let S;e[23]===n?S=e[24]:(S=n.startsWith(`/ec2/describe-launch-templates`)||n.startsWith(`/ec2/create-launch-template`),e[23]=n,e[24]=S);let C,w;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,z.jsx)(Ji,{className:`size-4`}),w=(0,z.jsx)(`span`,{children:`Launch Templates`}),e[25]=C,e[26]=w):(C=e[25],w=e[26]);let T;e[27]===S?T=e[28]:(T=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-launch-templates`,children:(0,z.jsxs)(G,{isActive:S,tooltip:`Launch Templates`,children:[C,w]})})}),e[27]=S,e[28]=T);let E;e[29]===n?E=e[30]:(E=n.startsWith(`/ec2/describe-images`),e[29]=n,e[30]=E);let D,O;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,z.jsx)(Re,{className:`size-4`}),O=(0,z.jsx)(`span`,{children:`Images`}),e[31]=D,e[32]=O):(D=e[31],O=e[32]);let k;e[33]===E?k=e[34]:(k=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-images`,children:(0,z.jsxs)(G,{isActive:E,tooltip:`Images`,children:[D,O]})})}),e[33]=E,e[34]=k);let ee;e[35]===n?ee=e[36]:(ee=n.startsWith(`/ec2/describe-key-pairs`),e[35]=n,e[36]=ee);let te,ne;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,z.jsx)(je,{className:`size-4`}),ne=(0,z.jsx)(`span`,{children:`Key Pairs`}),e[37]=te,e[38]=ne):(te=e[37],ne=e[38]);let re;e[39]===ee?re=e[40]:(re=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-key-pairs`,children:(0,z.jsxs)(G,{isActive:ee,tooltip:`Key Pairs`,children:[te,ne]})})}),e[39]=ee,e[40]=re);let ie;e[41]===n?ie=e[42]:(ie=n.startsWith(`/ec2/describe-addresses`)||n.startsWith(`/ec2/allocate-address`),e[41]=n,e[42]=ie);let ae,oe;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,z.jsx)(la,{className:`size-4`}),oe=(0,z.jsx)(`span`,{children:`Elastic IPs`}),e[43]=ae,e[44]=oe):(ae=e[43],oe=e[44]);let se;e[45]===ie?se=e[46]:(se=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-addresses`,children:(0,z.jsxs)(G,{isActive:ie,tooltip:`Elastic IPs`,children:[ae,oe]})})}),e[45]=ie,e[46]=se);let ce;e[47]===n?ce=e[48]:(ce=n.startsWith(`/ec2/describe-volumes`)||n.startsWith(`/ec2/create-volume`)||n.startsWith(`/ec2/modify-volume`),e[47]=n,e[48]=ce);let le,ue;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,z.jsx)(Pe,{className:`size-4`}),ue=(0,z.jsx)(`span`,{children:`Volumes`}),e[49]=le,e[50]=ue):(le=e[49],ue=e[50]);let de;e[51]===ce?de=e[52]:(de=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-volumes`,children:(0,z.jsxs)(G,{isActive:ce,tooltip:`Volumes`,children:[le,ue]})})}),e[51]=ce,e[52]=de);let fe;e[53]===n?fe=e[54]:(fe=n.startsWith(`/ec2/describe-snapshots`)||n.startsWith(`/ec2/create-snapshot`),e[53]=n,e[54]=fe);let pe,me;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,z.jsx)(Ae,{className:`size-4`}),me=(0,z.jsx)(`span`,{children:`Snapshots`}),e[55]=pe,e[56]=me):(pe=e[55],me=e[56]);let he;e[57]===fe?he=e[58]:(he=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-snapshots`,children:(0,z.jsxs)(G,{isActive:fe,tooltip:`Snapshots`,children:[pe,me]})})}),e[57]=fe,e[58]=he);let _e;e[59]===n?_e=e[60]:(_e=n.startsWith(`/ec2/describe-placement-groups`)||n.startsWith(`/ec2/create-placement-group`),e[59]=n,e[60]=_e);let ve,j;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,z.jsx)(na,{className:`size-4`}),j=(0,z.jsx)(`span`,{children:`Placement Groups`}),e[61]=ve,e[62]=j):(ve=e[61],j=e[62]);let M;e[63]===_e?M=e[64]:(M=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-placement-groups`,children:(0,z.jsxs)(G,{isActive:_e,tooltip:`Placement Groups`,children:[ve,j]})})}),e[63]=_e,e[64]=M);let ye;e[65]===n?ye=e[66]:(ye=n.startsWith(`/ec2/describe-load-balancers`)||n.startsWith(`/ec2/create-load-balancer`),e[65]=n,e[66]=ye);let be,xe;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,z.jsx)(Le,{className:`size-4`}),xe=(0,z.jsx)(`span`,{children:`Load Balancers`}),e[67]=be,e[68]=xe):(be=e[67],xe=e[68]);let Se;e[69]===ye?Se=e[70]:(Se=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-load-balancers`,children:(0,z.jsxs)(G,{isActive:ye,tooltip:`Load Balancers`,children:[be,xe]})})}),e[69]=ye,e[70]=Se);let Ce;e[71]===n?Ce=e[72]:(Ce=n.startsWith(`/ec2/describe-target-groups`)||n.startsWith(`/ec2/create-target-group`),e[71]=n,e[72]=Ce);let N,we;e[73]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,z.jsx)(Wi,{className:`size-4`}),we=(0,z.jsx)(`span`,{children:`Target Groups`}),e[73]=N,e[74]=we):(N=e[73],we=e[74]);let P;e[75]===Ce?P=e[76]:(P=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-target-groups`,children:(0,z.jsxs)(G,{isActive:Ce,tooltip:`Target Groups`,children:[N,we]})})}),e[75]=Ce,e[76]=P);let Ee;e[77]!==x||e[78]!==T||e[79]!==k||e[80]!==re||e[81]!==se||e[82]!==de||e[83]!==he||e[84]!==M||e[85]!==Se||e[86]!==P?(Ee=(0,z.jsxs)(fs,{children:[_,(0,z.jsxs)(ms,{children:[x,T,k,re,se,de,he,M,Se,P]})]}),e[77]=x,e[78]=T,e[79]=k,e[80]=re,e[81]=se,e[82]=de,e[83]=he,e[84]=M,e[85]=Se,e[86]=P,e[87]=Ee):Ee=e[87];let De;e[88]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,z.jsx)(ps,{children:`Networking`}),e[88]=De):De=e[88];let Oe;e[89]===n?Oe=e[90]:(Oe=n.startsWith(`/ec2/describe-vpcs`)||n.startsWith(`/ec2/create-vpc`),e[89]=n,e[90]=Oe);let F,ze;e[91]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,z.jsx)(Be,{className:`size-4`}),ze=(0,z.jsx)(`span`,{children:`VPCs`}),e[91]=F,e[92]=ze):(F=e[91],ze=e[92]);let He;e[93]===Oe?He=e[94]:(He=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-vpcs`,children:(0,z.jsxs)(G,{isActive:Oe,tooltip:`VPCs`,children:[F,ze]})})}),e[93]=Oe,e[94]=He);let Ue;e[95]===n?Ue=e[96]:(Ue=n.startsWith(`/ec2/describe-subnets`)||n.startsWith(`/ec2/create-subnet`),e[95]=n,e[96]=Ue);let We,Ge;e[97]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,z.jsx)(V,{className:`size-4`}),Ge=(0,z.jsx)(`span`,{children:`Subnets`}),e[97]=We,e[98]=Ge):(We=e[97],Ge=e[98]);let Ke;e[99]===Ue?Ke=e[100]:(Ke=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-subnets`,children:(0,z.jsxs)(G,{isActive:Ue,tooltip:`Subnets`,children:[We,Ge]})})}),e[99]=Ue,e[100]=Ke);let qe;e[101]===n?qe=e[102]:(qe=n.startsWith(`/ec2/describe-security-groups`)||n.startsWith(`/ec2/create-security-group`),e[101]=n,e[102]=qe);let Je,Ye;e[103]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,z.jsx)(xa,{className:`size-4`}),Ye=(0,z.jsx)(`span`,{children:`Security Groups`}),e[103]=Je,e[104]=Ye):(Je=e[103],Ye=e[104]);let Xe;e[105]===qe?Xe=e[106]:(Xe=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-security-groups`,children:(0,z.jsxs)(G,{isActive:qe,tooltip:`Security Groups`,children:[Je,Ye]})})}),e[105]=qe,e[106]=Xe);let Ze;e[107]===n?Ze=e[108]:(Ze=n.startsWith(`/ec2/describe-route-tables`)||n.startsWith(`/ec2/create-route-table`),e[107]=n,e[108]=Ze);let Qe,$e;e[109]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,z.jsx)(ya,{className:`size-4`}),$e=(0,z.jsx)(`span`,{children:`Route Tables`}),e[109]=Qe,e[110]=$e):(Qe=e[109],$e=e[110]);let et;e[111]===Ze?et=e[112]:(et=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-route-tables`,children:(0,z.jsxs)(G,{isActive:Ze,tooltip:`Route Tables`,children:[Qe,$e]})})}),e[111]=Ze,e[112]=et);let tt;e[113]===n?tt=e[114]:(tt=n.startsWith(`/ec2/describe-internet-gateways`),e[113]=n,e[114]=tt);let nt,rt;e[115]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,z.jsx)(Ie,{className:`size-4`}),rt=(0,z.jsx)(`span`,{children:`Internet Gateways`}),e[115]=nt,e[116]=rt):(nt=e[115],rt=e[116]);let it;e[117]===tt?it=e[118]:(it=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-internet-gateways`,children:(0,z.jsxs)(G,{isActive:tt,tooltip:`Internet Gateways`,children:[nt,rt]})})}),e[117]=tt,e[118]=it);let at;e[119]===n?at=e[120]:(at=n.startsWith(`/ec2/describe-nat-gateways`)||n.startsWith(`/ec2/create-nat-gateway`),e[119]=n,e[120]=at);let ot,st;e[121]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,z.jsx)(Me,{className:`size-4`}),st=(0,z.jsx)(`span`,{children:`NAT Gateways`}),e[121]=ot,e[122]=st):(ot=e[121],st=e[122]);let ct;e[123]===at?ct=e[124]:(ct=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-nat-gateways`,children:(0,z.jsxs)(G,{isActive:at,tooltip:`NAT Gateways`,children:[ot,st]})})}),e[123]=at,e[124]=ct);let lt;e[125]!==He||e[126]!==Ke||e[127]!==Xe||e[128]!==et||e[129]!==it||e[130]!==ct?(lt=(0,z.jsxs)(fs,{children:[De,(0,z.jsxs)(ms,{children:[He,Ke,Xe,et,it,ct]})]}),e[125]=He,e[126]=Ke,e[127]=Xe,e[128]=et,e[129]=it,e[130]=ct,e[131]=lt):lt=e[131];let ut;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,z.jsx)(ps,{children:`Containers`}),e[132]=ut):ut=e[132];let dt;e[133]===n?dt=e[134]:(dt=n.startsWith(`/eks/list-clusters`)||n.startsWith(`/eks/create-cluster`),e[133]=n,e[134]=dt);let ft,pt;e[135]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,z.jsx)(Ii,{className:`size-4`}),pt=(0,z.jsx)(`span`,{children:`EKS`}),e[135]=ft,e[136]=pt):(ft=e[135],pt=e[136]);let mt;e[137]===dt?mt=e[138]:(mt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/eks/list-clusters`,children:(0,z.jsxs)(G,{isActive:dt,tooltip:`EKS clusters`,children:[ft,pt]})})}),e[137]=dt,e[138]=mt);let ht;e[139]===n?ht=e[140]:(ht=n.startsWith(`/ecr/list-repositories`),e[139]=n,e[140]=ht);let gt,_t;e[141]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,z.jsx)(ha,{className:`size-4`}),_t=(0,z.jsx)(`span`,{children:`ECR`}),e[141]=gt,e[142]=_t):(gt=e[141],_t=e[142]);let vt;e[143]===ht?vt=e[144]:(vt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ecr/list-repositories`,children:(0,z.jsxs)(G,{isActive:ht,tooltip:`ECR repositories`,children:[gt,_t]})})}),e[143]=ht,e[144]=vt);let yt;e[145]===n?yt=e[146]:(yt=n.startsWith(`/ecs/`),e[145]=n,e[146]=yt);let bt,xt;e[147]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,z.jsx)(Hi,{className:`size-4`}),xt=(0,z.jsx)(`span`,{children:`ECS`}),e[147]=bt,e[148]=xt):(bt=e[147],xt=e[148]);let St;e[149]===yt?St=e[150]:(St=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ecs/list-clusters`,children:(0,z.jsxs)(G,{isActive:yt,tooltip:`ECS clusters`,children:[bt,xt]})})}),e[149]=yt,e[150]=St);let Ct;e[151]!==mt||e[152]!==vt||e[153]!==St?(Ct=(0,z.jsxs)(fs,{children:[ut,(0,z.jsxs)(ms,{children:[mt,vt,St]})]}),e[151]=mt,e[152]=vt,e[153]=St,e[154]=Ct):Ct=e[154];let wt;e[155]===Symbol.for(`react.memo_cache_sentinel`)?(wt=(0,z.jsx)(ps,{children:`RDS`}),e[155]=wt):wt=e[155];let Tt;e[156]===n?Tt=e[157]:(Tt=n.startsWith(`/rds/describe-db-instances`)||n.startsWith(`/rds/create-db-instance`),e[156]=n,e[157]=Tt);let Et,Dt;e[158]===Symbol.for(`react.memo_cache_sentinel`)?(Et=(0,z.jsx)(Ki,{className:`size-4`}),Dt=(0,z.jsx)(`span`,{children:`Databases`}),e[158]=Et,e[159]=Dt):(Et=e[158],Dt=e[159]);let Ot;e[160]===Tt?Ot=e[161]:(Ot=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-instances`,children:(0,z.jsxs)(G,{isActive:Tt,tooltip:`Databases`,children:[Et,Dt]})})}),e[160]=Tt,e[161]=Ot);let kt;e[162]===n?kt=e[163]:(kt=n.startsWith(`/rds/describe-db-snapshots`)||n.startsWith(`/rds/restore-db-instance-from-db-snapshot`),e[162]=n,e[163]=kt);let At,jt;e[164]===Symbol.for(`react.memo_cache_sentinel`)?(At=(0,z.jsx)(Ae,{className:`size-4`}),jt=(0,z.jsx)(`span`,{children:`Snapshots`}),e[164]=At,e[165]=jt):(At=e[164],jt=e[165]);let Mt;e[166]===kt?Mt=e[167]:(Mt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-snapshots`,children:(0,z.jsxs)(G,{isActive:kt,tooltip:`DB Snapshots`,children:[At,jt]})})}),e[166]=kt,e[167]=Mt);let Nt;e[168]===n?Nt=e[169]:(Nt=n.startsWith(`/rds/describe-db-subnet-groups`)||n.startsWith(`/rds/create-db-subnet-group`),e[168]=n,e[169]=Nt);let Pt,Ft;e[170]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,z.jsx)(V,{className:`size-4`}),Ft=(0,z.jsx)(`span`,{children:`Subnet Groups`}),e[170]=Pt,e[171]=Ft):(Pt=e[170],Ft=e[171]);let It;e[172]===Nt?It=e[173]:(It=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-subnet-groups`,children:(0,z.jsxs)(G,{isActive:Nt,tooltip:`DB Subnet Groups`,children:[Pt,Ft]})})}),e[172]=Nt,e[173]=It);let Lt;e[174]===n?Lt=e[175]:(Lt=n.startsWith(`/rds/describe-db-parameter-groups`)||n.startsWith(`/rds/create-db-parameter-group`),e[174]=n,e[175]=Lt);let Rt,zt;e[176]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=(0,z.jsx)(Ve,{className:`size-4`}),zt=(0,z.jsx)(`span`,{children:`Parameter Groups`}),e[176]=Rt,e[177]=zt):(Rt=e[176],zt=e[177]);let Bt;e[178]===Lt?Bt=e[179]:(Bt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-parameter-groups`,children:(0,z.jsxs)(G,{isActive:Lt,tooltip:`DB Parameter Groups`,children:[Rt,zt]})})}),e[178]=Lt,e[179]=Bt);let Vt;e[180]!==Mt||e[181]!==It||e[182]!==Bt||e[183]!==Ot?(Vt=(0,z.jsxs)(fs,{children:[wt,(0,z.jsxs)(ms,{children:[Ot,Mt,It,Bt]})]}),e[180]=Mt,e[181]=It,e[182]=Bt,e[183]=Ot,e[184]=Vt):Vt=e[184];let Ht;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(Ht=(0,z.jsx)(ps,{children:`IAM`}),e[185]=Ht):Ht=e[185];let Ut;e[186]===n?Ut=e[187]:(Ut=n.startsWith(`/iam/list-users`)||n.startsWith(`/iam/create-user`),e[186]=n,e[187]=Ut);let Wt,Gt;e[188]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=(0,z.jsx)(ka,{className:`size-4`}),Gt=(0,z.jsx)(`span`,{children:`Users`}),e[188]=Wt,e[189]=Gt):(Wt=e[188],Gt=e[189]);let Kt;e[190]===Ut?Kt=e[191]:(Kt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-users`,children:(0,z.jsxs)(G,{isActive:Ut,tooltip:`Users`,children:[Wt,Gt]})})}),e[190]=Ut,e[191]=Kt);let qt;e[192]===n?qt=e[193]:(qt=n.startsWith(`/iam/list-groups`)||n.startsWith(`/iam/create-group`),e[192]=n,e[193]=qt);let I,Jt;e[194]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,z.jsx)(Da,{className:`size-4`}),Jt=(0,z.jsx)(`span`,{children:`Groups`}),e[194]=I,e[195]=Jt):(I=e[194],Jt=e[195]);let Yt;e[196]===qt?Yt=e[197]:(Yt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-groups`,children:(0,z.jsxs)(G,{isActive:qt,tooltip:`Groups`,children:[I,Jt]})})}),e[196]=qt,e[197]=Yt);let Xt;e[198]===n?Xt=e[199]:(Xt=n.startsWith(`/iam/list-policies`)||n.startsWith(`/iam/create-policy`),e[198]=n,e[199]=Xt);let Zt,Qt;e[200]===Symbol.for(`react.memo_cache_sentinel`)?(Zt=(0,z.jsx)(Ne,{className:`size-4`}),Qt=(0,z.jsx)(`span`,{children:`Policies`}),e[200]=Zt,e[201]=Qt):(Zt=e[200],Qt=e[201]);let $t;e[202]===Xt?$t=e[203]:($t=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-policies`,children:(0,z.jsxs)(G,{isActive:Xt,tooltip:`Policies`,children:[Zt,Qt]})})}),e[202]=Xt,e[203]=$t);let en;e[204]===n?en=e[205]:(en=n.startsWith(`/iam/list-roles`)||n.startsWith(`/iam/create-role`),e[204]=n,e[205]=en);let tn,nn;e[206]===Symbol.for(`react.memo_cache_sentinel`)?(tn=(0,z.jsx)(Ta,{className:`size-4`}),nn=(0,z.jsx)(`span`,{children:`Roles`}),e[206]=tn,e[207]=nn):(tn=e[206],nn=e[207]);let rn;e[208]===en?rn=e[209]:(rn=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-roles`,children:(0,z.jsxs)(G,{isActive:en,tooltip:`Roles`,children:[tn,nn]})})}),e[208]=en,e[209]=rn);let L;e[210]===n?L=e[211]:(L=n.startsWith(`/iam/list-instance-profiles`)||n.startsWith(`/iam/create-instance-profile`),e[210]=n,e[211]=L);let on,sn;e[212]===Symbol.for(`react.memo_cache_sentinel`)?(on=(0,z.jsx)(Qi,{className:`size-4`}),sn=(0,z.jsx)(`span`,{children:`Instance Profiles`}),e[212]=on,e[213]=sn):(on=e[212],sn=e[213]);let cn;e[214]===L?cn=e[215]:(cn=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-instance-profiles`,children:(0,z.jsxs)(G,{isActive:L,tooltip:`Instance Profiles`,children:[on,sn]})})}),e[214]=L,e[215]=cn);let ln;e[216]!==Kt||e[217]!==Yt||e[218]!==$t||e[219]!==rn||e[220]!==cn?(ln=(0,z.jsxs)(fs,{children:[Ht,(0,z.jsxs)(ms,{children:[Kt,Yt,$t,rn,cn]})]}),e[216]=Kt,e[217]=Yt,e[218]=$t,e[219]=rn,e[220]=cn,e[221]=ln):ln=e[221];let un;e[222]===Symbol.for(`react.memo_cache_sentinel`)?(un=(0,z.jsx)(ps,{children:`S3`}),e[222]=un):un=e[222];let dn;e[223]===n?dn=e[224]:(dn=n.startsWith(`/s3/ls`),e[223]=n,e[224]=dn);let fn,pn;e[225]===Symbol.for(`react.memo_cache_sentinel`)?(fn=(0,z.jsx)(Fe,{className:`size-4`}),pn=(0,z.jsx)(`span`,{children:`Buckets`}),e[225]=fn,e[226]=pn):(fn=e[225],pn=e[226]);let mn;e[227]===dn?mn=e[228]:(mn=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/s3/ls`,children:(0,z.jsxs)(G,{isActive:dn,tooltip:`Buckets`,children:[fn,pn]})})}),e[227]=dn,e[228]=mn);let hn;e[229]!==o||e[230]!==n?(hn=o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/s3/service-metrics`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/s3/service-metrics`),tooltip:`Service Metrics`,children:[(0,z.jsx)(Mi,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Service Metrics`})]})})}),e[229]=o,e[230]=n,e[231]=hn):hn=e[231];let gn;e[232]!==mn||e[233]!==hn?(gn=(0,z.jsxs)(fs,{children:[un,(0,z.jsxs)(ms,{children:[mn,hn]})]}),e[232]=mn,e[233]=hn,e[234]=gn):gn=e[234];let _n;e[235]!==o||e[236]!==n?(_n=ke()&&(0,z.jsxs)(fs,{children:[(0,z.jsx)(ps,{children:`Ochre`}),(0,z.jsxs)(ms,{children:[(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-knowledge-bases`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-knowledge-bases`),tooltip:`Knowledge Bases`,children:[(0,z.jsx)(Ri,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Knowledge Bases`})]})})}),(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-guardrails`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-guardrails`),tooltip:`Guardrails`,children:[(0,z.jsx)(Ne,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Guardrails`})]})})}),(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/playground`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/playground`),tooltip:`Playground`,children:[(0,z.jsx)(da,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Playground`})]})})}),o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-model-catalog`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-model-catalog`),tooltip:`Model Catalog`,children:[(0,z.jsx)(aa,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Model Catalog`})]})})}),o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-model-access`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-model-access`),tooltip:`Model Access`,children:[(0,z.jsx)(ea,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Model Access`})]})})})]})]}),e[235]=o,e[236]=n,e[237]=_n):_n=e[237];let vn;e[238]===o?vn=e[239]:(vn=o&&(0,z.jsxs)(fs,{children:[(0,z.jsx)(ps,{children:`Documentation`}),(0,z.jsx)(ms,{children:(0,z.jsx)(W,{children:(0,z.jsx)(`a`,{href:`https://docs.mulgadc.com`,target:`_blank`,rel:`noopener noreferrer`,children:(0,z.jsxs)(G,{tooltip:`Documentation`,children:[(0,z.jsx)(Pi,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Docs`})]})})})})]}),e[238]=o,e[239]=vn);let yn;e[240]!==Vt||e[241]!==ln||e[242]!==gn||e[243]!==_n||e[244]!==vn||e[245]!==Ee||e[246]!==lt||e[247]!==g||e[248]!==Ct?(yn=(0,z.jsxs)(ds,{children:[g,Ee,lt,Ct,Vt,ln,gn,_n,vn]}),e[240]=Vt,e[241]=ln,e[242]=gn,e[243]=_n,e[244]=vn,e[245]=Ee,e[246]=lt,e[247]=g,e[248]=Ct,e[249]=yn):yn=e[249];let bn;e[250]===Symbol.for(`react.memo_cache_sentinel`)?(bn=(0,z.jsx)(us,{className:`mx-0 w-full`}),e[250]=bn):bn=e[250];let xn,Sn;e[251]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,z.jsx)(sa,{className:`size-4`}),Sn=(0,z.jsx)(`span`,{children:`Sign out`}),e[251]=xn,e[252]=Sn):(xn=e[251],Sn=e[252]);let Cn;e[253]===c?Cn=e[254]:(Cn=(0,z.jsxs)(ls,{children:[bn,(0,z.jsx)(ms,{children:(0,z.jsx)(W,{children:(0,z.jsxs)(G,{onClick:c,tooltip:`Sign out`,children:[xn,Sn]})})})]}),e[253]=c,e[254]=Cn);let wn;e[255]===Symbol.for(`react.memo_cache_sentinel`)?(wn=(0,z.jsx)(os,{}),e[255]=wn):wn=e[255];let Tn;return e[256]!==yn||e[257]!==Cn?(Tn=(0,z.jsxs)(is,{collapsible:`icon`,children:[l,yn,Cn,wn]}),e[256]=yn,e[257]=Cn,e[258]=Tn):Tn=e[258],Tn}function Ds(e){return e.pathname}function Os(e){let t=(0,B.c)(18),{error:n,reset:r}=e,i=ne(),o=a(),s;t[0]!==o||t[1]!==r||t[2]!==i?(s=function(){o.invalidateQueries(),r(),i.invalidate()},t[0]=o,t[1]=r,t[2]=i,t[3]=s):s=t[3];let c=s,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(Es,{}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(ws,{}),t[5]=u):u=t[5];let d,f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,z.jsx)(`div`,{className:`flex justify-center`,children:(0,z.jsx)(Bi,{className:`size-12 text-destructive`})}),f=(0,z.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Something went wrong`}),t[6]=d,t[7]=f):(d=t[6],f=t[7]);let p=(n instanceof Error?n.message:String(n))||`An unexpected error occurred`,m;t[8]===p?m=t[9]:(m=(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:p}),t[8]=p,t[9]=m);let h;t[10]===c?h=t[11]:(h=(0,z.jsx)(Xe,{onClick:c,variant:`default`,children:`Try Again`}),t[10]=c,t[11]=h);let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,z.jsx)(A,{to:`/`,children:(0,z.jsx)(Xe,{variant:`outline`,children:`Go Home`})}),t[12]=g):g=t[12];let _;t[13]===h?_=t[14]:(_=(0,z.jsxs)(`div`,{className:`flex justify-center gap-2`,children:[h,g]}),t[13]=h,t[14]=_);let v;return t[15]!==_||t[16]!==m?(v=(0,z.jsxs)(z.Fragment,{children:[l,(0,z.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[u,(0,z.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 pt-0`,children:(0,z.jsxs)(`div`,{className:`max-w-md space-y-4 text-center`,children:[d,f,m,_]})})]})]}),t[15]=_,t[16]=m,t[17]=v):v=t[17],v}var ks=T()({head:()=>({meta:[{title:`Mulga`}]}),component:()=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Si,{}),(0,z.jsx)(Es,{}),(0,z.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[(0,z.jsx)(ws,{}),(0,z.jsx)(`div`,{className:`flex flex-1 flex-col p-8`,children:(0,z.jsx)(de,{})})]})]}),errorComponent:Os,notFoundComponent:Ts}),As=w(`/_auth`)({beforeLoad:()=>{if(!De())throw ee({to:`/login`})},component:E(()=>L(()=>import(`./route-CubfShDh.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),js=w(`/_auth/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...yn,staleTime:`static`}),e.queryClient.query({...un,staleTime:`static`}),e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...Sn,staleTime:`static`}),e.queryClient.query({...Un,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`}),e.queryClient.query({...hn,staleTime:`static`}),e.queryClient.query({...bn,staleTime:`static`}),e.queryClient.query({..._n,staleTime:`static`})])},head:()=>({meta:[{title:`Dashboard | Mulga`}]}),component:E(()=>L(()=>import(`./_auth-TUbdreTD.js`),__vite__mapDeps([6,1,7,8,9,10,3,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,5,37])),`component`)}),Ms=w(`/_auth/bedrock`)({beforeLoad:()=>{ke()||re({throw:!0})},component:E(()=>L(()=>import(`./route-FwtkMxrS.js`),__vite__mapDeps([38,1,2,3,4,5])),`component`)});async function Ns({context:e}){let t=await e.queryClient.query(Wn);if(!Gn(t.Account))throw ee({to:`/`})}var Ps=w(`/_auth/nodes`)({beforeLoad:Ns,head:()=>({meta:[{title:`Nodes | Mulga`}]}),component:E(()=>L(()=>import(`./nodes-CDZdINDB.js`),__vite__mapDeps([39,1,7,8,9,10,3,11,13,12,14,22,18,23,26,27,28,29,30])),`component`)}),Fs=w(`/_auth/s3/service-metrics`)({beforeLoad:Ns,head:()=>({meta:[{title:`Service Metrics | S3 | Mulga`}]}),component:E(()=>L(()=>import(`./service-metrics-BVtgmWJ_.js`),__vite__mapDeps([40,1,7,8,9,22,18,11,23,26,27,28,29,30])),`component`)}),Is=w(`/_auth/ec2/(elastic-ips)/allocate-address`)({head:()=>({meta:[{title:`Allocate Elastic IP | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./allocate-address-CzxUw1t6.js`),__vite__mapDeps([41,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59])),`component`)}),Ls=w(`/_auth/ec2/(internet-gateways)/create-internet-gateway`)({head:()=>({meta:[{title:`Create Internet Gateway | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-internet-gateway-DFMxm206.js`),__vite__mapDeps([60,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59])),`component`)}),Rs=w(`/_auth/ec2/(key)/create-key-pair`)({head:()=>({meta:[{title:`Create Key Pair | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-key-pair-Bw3g9hRn.js`),__vite__mapDeps([61,1,42,3,43,10,12,45,62,34,28,11,32,35,13,36,5,49,63,64,65,66,67,44,46,47,68,48,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,31,33,59])),`component`)}),zs=w(`/_auth/ec2/(key)/import-key-pair`)({head:()=>({meta:[{title:`Import Key Pair | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./import-key-pair-Coqklk-P.js`),__vite__mapDeps([69,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,70,59])),`component`)}),Bs=w(`/_auth/ec2/(launch-templates)/create-launch-template`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...xn,staleTime:`static`}),e.queryClient.query({...gn,staleTime:`static`}),e.queryClient.query({...Sn,staleTime:`static`}),e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Launch Template | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-launch-template-Dmuf_adB.js`),__vite__mapDeps([71,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59,72,73,8,62,34,36,5,63,64,65,66,70,74])),`component`)}),Vs=w(`/_auth/ec2/(load-balancers)/create-load-balancer`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`}),e.queryClient.query({...Mn,staleTime:`static`}),e.queryClient.query({...on,staleTime:`static`}),e.queryClient.query({...jn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Load Balancer | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-load-balancer-V0SGa9eg.js`),__vite__mapDeps([75,1,73,8,9,42,3,11,43,10,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,76,18,19,20,77,51,52,55,57,58,70,31,33,17,78,79,80,26,54,56,81,82,83,84,74,85])),`component`)}),Hs=w(`/_auth/ec2/(nat-gateways)/create-nat-gateway`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...bn,staleTime:`static`})])},head:()=>({meta:[{title:`Create NAT Gateway | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-nat-gateway-CjaZ-0f9.js`),__vite__mapDeps([86,1,73,8,9,10,3,42,11,43,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59])),`component`)}),Us=w(`/_auth/ec2/(placement-groups)/create-placement-group`)({head:()=>({meta:[{title:`Create Placement Group | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-placement-group-DQGuSx0N.js`),__vite__mapDeps([87,1,42,3,43,10,12,62,34,28,11,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59])),`component`)}),Ws=w(`/_auth/ec2/(route-tables)/create-route-table`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`Create Route Table | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-route-table-DSTcxAZd.js`),__vite__mapDeps([88,1,73,8,9,42,3,11,43,10,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59])),`component`)}),Gs=w(`/_auth/ec2/(security-groups)/create-security-group`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`Create Security Group | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-security-group-ydsUjq9K.js`),__vite__mapDeps([89,1,73,8,9,42,3,11,43,10,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59])),`component`)}),Ks=w(`/_auth/ec2/(subnet)/create-subnet`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...Cn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Subnet | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-subnet-DRdJTQuZ.js`),__vite__mapDeps([90,1,73,8,9,42,3,11,43,10,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59])),`component`)}),qs=w(`/_auth/ec2/(target-groups)/create-target-group`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`Create Target Group | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-target-group-DZ5GDr-5.js`),__vite__mapDeps([91,1,73,8,9,42,3,43,10,12,44,11,45,13,46,32,28,47,17,18,19,20,78,51,52,79,26,54,55,56,84,62,34,35,36,5,49,63,64,65,66,48,57,58,81,82,83,74,85])),`component`)}),Js=w(`/_auth/ec2/(volumes)/create-volume`)({loader:async({context:e})=>{await e.queryClient.query({...Cn,staleTime:`static`})},head:()=>({meta:[{title:`Create Volume | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-volume-Ccy7m1H7.js`),__vite__mapDeps([92,1,73,8,9,42,3,43,10,12,62,34,28,11,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59])),`component`)}),Ys=w(`/_auth/ec2/(vpc)/create-vpc`)({head:()=>({meta:[{title:`Create VPC | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-vpc-C-whSRxb.js`),__vite__mapDeps([93,1,42,3,43,10,12,13,14,62,34,28,11,32,35,45,36,5,49,63,64,65,66,44,46,47,48,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59])),`component`)}),Xs=w(`/_auth/ecs/(clusters)/task-definitions`)({loader:async({context:e})=>{await e.queryClient.query({...On,staleTime:`static`})},head:()=>({meta:[{title:`Task Definitions | ECS | Mulga`}]}),component:E(()=>L(()=>import(`./task-definitions-CQw_GMot.js`),__vite__mapDeps([94,1,73,8,9,10,3,32,28,11,95,18,19,20,96,51,52,23,26,55,97,31,33,34,35,36,5,98])),`component`)}),Zs=w(`/_auth/eks/(clusters)/create-cluster`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...Ln,staleTime:`static`}),e.queryClient.query({...xn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Cluster | EKS | Mulga`}]}),component:E(()=>L(()=>import(`./create-cluster-CApKB1rK.js`),__vite__mapDeps([99,1,9,73,8,42,3,11,43,10,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,48,17,18,19,20,100,51,52,101,102,53,103,104,105,26,54,55,56,57,58,31,33,106,107,46,108,68,47,109])),`component`)}),Qs=w(`/_auth/iam/(groups)/create-group`)({head:()=>({meta:[{title:`Create Group | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-group-pYEVC2_3.js`),__vite__mapDeps([110,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,111,102])),`component`)}),$s=w(`/_auth/iam/(instance-profiles)/create-instance-profile`)({head:()=>({meta:[{title:`Create Instance Profile | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-instance-profile-DxE9Kc_7.js`),__vite__mapDeps([112,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,111,102])),`component`)}),ec=w(`/_auth/iam/(policies)/create-policy`)({head:()=>({meta:[{title:`Create Policy | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-policy-DkdYgt_C.js`),__vite__mapDeps([113,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,114,102,70,111])),`component`)}),tc=w(`/_auth/iam/(roles)/create-role`)({head:()=>({meta:[{title:`Create Role | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-role-BX7vmYsz.js`),__vite__mapDeps([115,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,114,102,70,111])),`component`)}),nc=w(`/_auth/iam/(users)/create-user`)({head:()=>({meta:[{title:`Create User | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-user-DOwRczkA.js`),__vite__mapDeps([116,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,111,102])),`component`)}),rc=w(`/_auth/rds/(db-instances)/create-db-instance`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...Vn,staleTime:`static`}),e.queryClient.query({...Bn,staleTime:`static`}),e.queryClient.query({...zn,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`}),e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...xn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Database | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./create-db-instance-D7UFjBf8.js`),__vite__mapDeps([117,1,9,7,8,73,42,3,43,10,12,62,34,28,11,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,17,18,19,20,118,119,51,52,120,26,54,55,56,57,58,81,82,83,106,107,108,68,121,122])),`component`)}),ic=w(`/_auth/rds/(parameter-groups)/create-db-parameter-group`)({loader:async({context:e})=>{await e.queryClient.query({...Vn,staleTime:`static`})},head:()=>({meta:[{title:`Create Parameter Group | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./create-db-parameter-group-Bh4GnsZG.js`),__vite__mapDeps([123,1,73,8,9,42,3,43,10,12,62,34,28,11,32,35,45,13,36,5,49,63,64,65,66,44,46,47,48,118,19,20,119,51,52,120,18,26,54,55,56,57,58,81,82,83])),`component`)}),ac=w(`/_auth/rds/(subnet-groups)/create-db-subnet-group`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...fn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Subnet Group | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./create-db-subnet-group-CG8t0czE.js`),__vite__mapDeps([124,1,73,8,9,42,3,11,43,10,12,44,45,13,46,32,28,47,48,49,35,17,18,19,20,118,119,51,52,26,54,55,56,57,58,81,82,83])),`component`)}),oc=w(`/_auth/s3/(buckets)/create-bucket`)({head:()=>({meta:[{title:`Create Bucket | S3 | Mulga`}]}),component:E(()=>L(()=>import(`./create-bucket-CFZ3UDyF.js`),__vite__mapDeps([125,1,42,3,11,43,10,12,44,45,13,46,32,28,47,48,49,35,126,9,51,52,19,20,26,54,55,56,57,58])),`component`)}),sc=w(`/_auth/s3/ls/`)({loader:async({context:e})=>{await e.queryClient.query({...Un,staleTime:`static`})},head:()=>({meta:[{title:`Buckets | S3 | Mulga`}]}),component:E(()=>L(()=>import(`./ls-Ch0gLLl0.js`),__vite__mapDeps([127,1,73,8,9,10,3,11,32,28,21,18,19,20,26,128])),`component`)}),cc=w(`/_auth/s3/ls/$bucket`)({component:E(()=>L(()=>import(`./route-wY81OJOr.js`),__vite__mapDeps([129,1,2,3,4,5])),`component`)}),lc=w(`/_auth/bedrock/(catalog)/list-model-catalog/`)({beforeLoad:Ns,head:()=>({meta:[{title:`Model Catalog | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-model-catalog-A4jsVZ23.js`),__vite__mapDeps([130,1,7,8,9,11,22,18,23,26,27,28,29,30])),`component`)}),uc=w(`/_auth/bedrock/(guardrails)/list-guardrails/`)({loader:async({context:e})=>{await e.queryClient.query({...sn,staleTime:`static`})},head:()=>({meta:[{title:`Guardrails | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-guardrails-DMr8tneU.js`),__vite__mapDeps([131,1,73,8,9,10,3,32,28,11,132,18,19,20,133,26,37,128])),`component`)}),dc=w(`/_auth/bedrock/(guardrails)/list-guardrails/create`)({head:()=>({meta:[{title:`Create Guardrail | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./create-Cux85l28.js`),__vite__mapDeps([134,1,135,9,51,52,11,19,20,133,136,42,3,43,10,12,62,34,28,32,35,45,13,36,5,49,63,64,65,66,82,83,48,26,54,55,56,57,58,81,70])),`component`)}),fc=w(`/_auth/bedrock/(knowledge-bases)/list-knowledge-bases/`)({loader:async({context:e})=>{await e.queryClient.query({...ln,staleTime:`static`})},head:()=>({meta:[{title:`Knowledge Bases | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-knowledge-bases-B75Tw2nR.js`),__vite__mapDeps([137,1,73,8,9,10,3,32,28,11,138,18,19,20,139,26,37,128])),`component`)}),pc=w(`/_auth/bedrock/(knowledge-bases)/list-knowledge-bases/create`)({loader:async({context:e})=>{await e.queryClient.query({...cn,staleTime:`static`})},head:()=>({meta:[{title:`Create Knowledge Base | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./create-B9l7cnNQ.js`),__vite__mapDeps([140,1,73,8,9,42,3,43,10,12,62,34,28,11,32,35,45,13,36,5,49,63,64,65,66,48,132,18,19,20,133,141,51,52,139,26,54,55,56,57,58,70])),`component`)}),mc=w(`/_auth/bedrock/(model-access)/list-model-access/`)({beforeLoad:Ns,head:()=>({meta:[{title:`Model Access | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-model-access-fq46KS1I.js`),__vite__mapDeps([142,1,9,51,52,7,8,62,34,28,11,32,35,12,45,13,36,5,49,63,64,65,66,48,22,18,23,26,27,29,30,57,58])),`component`)}),hc=w(`/_auth/bedrock/(playground)/playground/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...cn,staleTime:`static`}),e.queryClient.query({...sn,staleTime:`static`})])},head:()=>({meta:[{title:`Playground | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./playground-6qk0JzT_.js`),__vite__mapDeps([143,1,51,9,52,73,8,11,13,12,62,34,28,32,35,45,36,5,49,63,64,65,66,44,46,47,48,19,20,132,18,133,144,26,27,29,57,58,70])),`component`)}),gc=w(`/_auth/ec2/(elastic-ips)/describe-addresses/`)({loader:async({context:e})=>{await e.queryClient.query({...bn,staleTime:`static`})},head:()=>({meta:[{title:`Elastic IPs | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-addresses-DKzX98T-.js`),__vite__mapDeps([145,1,73,8,9,10,3,11,32,28,17,18,19,20,26,128])),`component`)}),_c=w(`/_auth/ec2/(images)/describe-images/`)({loader:async({context:e})=>{await e.queryClient.query({...xn,staleTime:`static`})},head:()=>({meta:[{title:`Images | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-images-B7JaOUFh.js`),__vite__mapDeps([146,1,73,8,9,17,18,11,19,20,26,37,128,10,3,106])),`component`)}),vc=w(`/_auth/ec2/(instances)/describe-instances/`)({loader:async({context:e})=>{await e.queryClient.query({...yn,staleTime:`static`})},head:()=>({meta:[{title:`Instances | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-instances-DzyDjSI_.js`),__vite__mapDeps([147,1,73,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),yc=w(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/`)({loader:async({context:e})=>{await e.queryClient.query({..._n,staleTime:`static`})},head:()=>({meta:[{title:`Internet Gateways | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-internet-gateways-D2fxK-t7.js`),__vite__mapDeps([148,1,73,8,9,10,3,11,32,28,17,18,19,20,26,128])),`component`)}),bc=w(`/_auth/ec2/(key)/describe-key-pairs/`)({loader:async({context:e})=>{await e.queryClient.query({...Sn,staleTime:`static`})},head:()=>({meta:[{title:`Key Pairs | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-key-pairs-uhUP3fNL.js`),__vite__mapDeps([149,1,73,8,9,10,3,32,28,11,17,18,19,20,26,128])),`component`)}),xc=w(`/_auth/ec2/(launch-templates)/describe-launch-templates/`)({loader:async({context:e})=>{await e.queryClient.query({...vn,staleTime:`static`})},head:()=>({meta:[{title:`Launch Templates | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-launch-templates-D2qJ15Ic.js`),__vite__mapDeps([150,1,73,8,9,10,3,32,28,11,17,18,19,20,26,27,29,128])),`component`)}),Sc=w(`/_auth/ec2/(load-balancers)/describe-load-balancers/`)({loader:async({context:e})=>{await e.queryClient.query({...An,staleTime:`static`})},head:()=>({meta:[{title:`Load Balancers | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-load-balancers-B_3SaYaZ.js`),__vite__mapDeps([151,1,73,8,9,10,3,42,11,32,28,80,18,19,20,79,26,37])),`component`)}),Cc=w(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/`)({loader:async({context:e})=>{await e.queryClient.query({...hn,staleTime:`static`})},head:()=>({meta:[{title:`NAT Gateways | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-nat-gateways-CwYFLl5Q.js`),__vite__mapDeps([152,1,73,8,9,10,3,11,32,28,17,18,19,20,26,37,128])),`component`)}),wc=w(`/_auth/ec2/(placement-groups)/describe-placement-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Tn,staleTime:`static`})},head:()=>({meta:[{title:`Placement Groups | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-placement-groups-CN3O7nu9.js`),__vite__mapDeps([153,1,73,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),Tc=w(`/_auth/ec2/(route-tables)/describe-route-tables/`)({loader:async({context:e})=>{await e.queryClient.query({...mn,staleTime:`static`})},head:()=>({meta:[{title:`Route Tables | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-route-tables-C5vM_rCX.js`),__vite__mapDeps([154,1,73,8,9,10,3,11,32,28,17,18,19,20,26,27,29,128])),`component`)}),Ec=w(`/_auth/ec2/(security-groups)/describe-security-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...wn,staleTime:`static`})},head:()=>({meta:[{title:`Security Groups | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-security-groups-BCsMrqa4.js`),__vite__mapDeps([155,1,73,8,9,10,3,32,28,11,17,18,19,20,26,128])),`component`)}),Dc=w(`/_auth/ec2/(snapshots)/describe-snapshots/`)({loader:async({context:e})=>{await e.queryClient.query({...dn,staleTime:`static`})},head:()=>({meta:[{title:`Snapshots | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-snapshots-D2N8dE3H.js`),__vite__mapDeps([156,1,73,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),Oc=w(`/_auth/ec2/(subnet)/describe-subnets/`)({loader:async({context:e})=>{await e.queryClient.query({...pn,staleTime:`static`})},head:()=>({meta:[{title:`Subnets | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-subnets-Ctvp-s82.js`),__vite__mapDeps([157,1,73,8,9,10,3,11,32,28,17,18,19,20,26,37,128])),`component`)}),kc=w(`/_auth/ec2/(target-groups)/describe-target-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Mn,staleTime:`static`})},head:()=>({meta:[{title:`Target Groups | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-target-groups-BHJFiqsY.js`),__vite__mapDeps([158,1,7,8,9,73,10,3,42,32,28,11,80,18,19,20,79,26])),`component`)}),Ac=w(`/_auth/ec2/(volumes)/describe-volumes/`)({loader:async({context:e})=>{await e.queryClient.query({...un,staleTime:`static`})},head:()=>({meta:[{title:`Volumes | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-volumes-B3epygrO.js`),__vite__mapDeps([159,1,73,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),jc=w(`/_auth/ec2/(vpc)/describe-vpcs/`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`VPCs | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-vpcs-Deh6etz7.js`),__vite__mapDeps([160,1,73,8,9,10,3,11,32,28,17,18,19,20,26,37,128])),`component`)}),Mc=w(`/_auth/ecr/(repositories)/list-repositories/`)({loader:async({context:e})=>{await e.queryClient.query({...En,staleTime:`static`})},head:()=>({meta:[{title:`Repositories | ECR | Mulga`}]}),component:E(()=>L(()=>import(`./list-repositories-Civj5U6N.js`),__vite__mapDeps([161,1,73,8,9,10,3,42,11,32,28,48,49,35,162,18,19,20,163,51,52,26,57,58,31,33,34,36,5])),`component`)}),Nc=w(`/_auth/ecs/(clusters)/list-clusters/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...Dn,staleTime:`static`}),e.queryClient.query({...xn,staleTime:`static`})])},head:()=>({meta:[{title:`Clusters | ECS | Mulga`}]}),component:E(()=>L(()=>import(`./list-clusters-6_bfITq9.js`),__vite__mapDeps([164,1,9,73,8,10,3,42,32,28,11,48,49,35,17,18,19,20,95,96,51,52,23,26,55,57,58,31,33,34,36,5,97,37,106,107,45,12,46,108,68,47,98])),`component`)}),Pc=w(`/_auth/eks/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.query({...kn,staleTime:`static`})},head:()=>({meta:[{title:`Clusters | EKS | Mulga`}]}),component:E(()=>L(()=>import(`./list-clusters-PZmdiM18.js`),__vite__mapDeps([165,1,73,8,9,10,3,32,28,11,166,18,19,20,101,26,128])),`component`)}),Fc=w(`/_auth/iam/(groups)/list-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Fn,staleTime:`static`})},head:()=>({meta:[{title:`Groups | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-groups-BS-D1f3l.js`),__vite__mapDeps([167,1,73,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Ic=w(`/_auth/iam/(instance-profiles)/list-instance-profiles/`)({loader:async({context:e})=>{await e.queryClient.query({...Pn,staleTime:`static`})},head:()=>({meta:[{title:`Instance Profiles | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-instance-profiles-B3NosDUO.js`),__vite__mapDeps([168,1,73,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Lc=w(`/_auth/iam/(policies)/list-policies/`)({loader:async({context:e})=>{await e.queryClient.query({...In,staleTime:`static`})},head:()=>({meta:[{title:`Policies | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-policies-CAROO7y7.js`),__vite__mapDeps([169,1,73,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Rc=w(`/_auth/iam/(roles)/list-roles/`)({loader:async({context:e})=>{await e.queryClient.query({...Ln,staleTime:`static`})},head:()=>({meta:[{title:`Roles | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-roles-DE4rvajX.js`),__vite__mapDeps([170,1,73,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),zc=w(`/_auth/iam/(users)/list-users/`)({loader:async({context:e})=>{await e.queryClient.query({...Nn,staleTime:`static`})},head:()=>({meta:[{title:`Users | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-users-BTkkg-CL.js`),__vite__mapDeps([171,1,73,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Bc=w(`/_auth/rds/(db-instances)/describe-db-instances/`)({loader:async({context:e})=>{await e.queryClient.query({...Hn,staleTime:`static`})},head:()=>({meta:[{title:`Databases | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-instances-B6BR7T2v.js`),__vite__mapDeps([172,1,73,8,9,10,3,42,32,28,11,118,19,20,119,51,52,120,18,26,55,37,173,48,49,35,57,58,31,33,34,36,5])),`component`)}),Vc=w(`/_auth/rds/(parameter-groups)/describe-db-parameter-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...zn,staleTime:`static`})},head:()=>({meta:[{title:`Parameter Groups | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-parameter-groups-DQyH8P2s.js`),__vite__mapDeps([174,1,73,8,9,10,3,42,32,28,11,118,19,20,120,18,26,175,119,51,52,176,97,31,33,34,35,36,5])),`component`)}),Hc=w(`/_auth/rds/(snapshots)/describe-db-snapshots/`)({loader:async({context:e})=>{await e.queryClient.query({...Rn,staleTime:`static`})},head:()=>({meta:[{title:`Snapshots | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-snapshots-CunDnlE6.js`),__vite__mapDeps([177,1,73,8,9,10,3,42,11,32,28,118,19,20,120,18,26,37,178,7,62,34,35,12,45,13,36,5,49,63,64,65,66,48,119,51,52,54,57,58,81,82,83,31,33,121,179,176,97])),`component`)}),Uc=w(`/_auth/rds/(subnet-groups)/describe-db-subnet-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Bn,staleTime:`static`})},head:()=>({meta:[{title:`Subnet Groups | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-subnet-groups-Dh5SgrDI.js`),__vite__mapDeps([180,1,73,8,9,10,3,42,32,28,11,120,18,19,20,118,26,37,181,119,51,52,176,97,31,33,34,35,36,5])),`component`)}),K=As.update({id:`/_auth`,getParentRoute:()=>ks}),Wc=qn.update({id:`/login`,path:`/login`,getParentRoute:()=>ks}),Gc=js.update({id:`/`,path:`/`,getParentRoute:()=>K}),Kc=Ms.update({id:`/bedrock`,path:`/bedrock`,getParentRoute:()=>K}),qc=Ps.update({id:`/nodes`,path:`/nodes`,getParentRoute:()=>K}),Jc=Fs.update({id:`/s3/service-metrics`,path:`/s3/service-metrics`,getParentRoute:()=>K}),Yc=Is.update({id:`/ec2/(elastic-ips)/allocate-address`,path:`/ec2/allocate-address`,getParentRoute:()=>K}),Xc=Jn.update({id:`/ec2/(instances)/run-instances`,path:`/ec2/run-instances`,getParentRoute:()=>K}),Zc=Ls.update({id:`/ec2/(internet-gateways)/create-internet-gateway`,path:`/ec2/create-internet-gateway`,getParentRoute:()=>K}),Qc=Rs.update({id:`/ec2/(key)/create-key-pair`,path:`/ec2/create-key-pair`,getParentRoute:()=>K}),$c=zs.update({id:`/ec2/(key)/import-key-pair`,path:`/ec2/import-key-pair`,getParentRoute:()=>K}),el=Bs.update({id:`/ec2/(launch-templates)/create-launch-template`,path:`/ec2/create-launch-template`,getParentRoute:()=>K}),tl=Vs.update({id:`/ec2/(load-balancers)/create-load-balancer`,path:`/ec2/create-load-balancer`,getParentRoute:()=>K}),nl=Hs.update({id:`/ec2/(nat-gateways)/create-nat-gateway`,path:`/ec2/create-nat-gateway`,getParentRoute:()=>K}),rl=Us.update({id:`/ec2/(placement-groups)/create-placement-group`,path:`/ec2/create-placement-group`,getParentRoute:()=>K}),il=Ws.update({id:`/ec2/(route-tables)/create-route-table`,path:`/ec2/create-route-table`,getParentRoute:()=>K}),al=Gs.update({id:`/ec2/(security-groups)/create-security-group`,path:`/ec2/create-security-group`,getParentRoute:()=>K}),ol=Yn.update({id:`/ec2/(snapshots)/create-snapshot`,path:`/ec2/create-snapshot`,getParentRoute:()=>K}),sl=Ks.update({id:`/ec2/(subnet)/create-subnet`,path:`/ec2/create-subnet`,getParentRoute:()=>K}),cl=qs.update({id:`/ec2/(target-groups)/create-target-group`,path:`/ec2/create-target-group`,getParentRoute:()=>K}),ll=Js.update({id:`/ec2/(volumes)/create-volume`,path:`/ec2/create-volume`,getParentRoute:()=>K}),ul=Ys.update({id:`/ec2/(vpc)/create-vpc`,path:`/ec2/create-vpc`,getParentRoute:()=>K}),dl=Xn.update({id:`/ecs/(clusters)/create-service`,path:`/ecs/create-service`,getParentRoute:()=>K}),fl=Zn.update({id:`/ecs/(clusters)/register-task-definition`,path:`/ecs/register-task-definition`,getParentRoute:()=>K}),pl=Qn.update({id:`/ecs/(clusters)/run-task`,path:`/ecs/run-task`,getParentRoute:()=>K}),ml=Xs.update({id:`/ecs/(clusters)/task-definitions`,path:`/ecs/task-definitions`,getParentRoute:()=>K}),hl=Zs.update({id:`/eks/(clusters)/create-cluster`,path:`/eks/create-cluster`,getParentRoute:()=>K}),gl=Qs.update({id:`/iam/(groups)/create-group`,path:`/iam/create-group`,getParentRoute:()=>K}),_l=$s.update({id:`/iam/(instance-profiles)/create-instance-profile`,path:`/iam/create-instance-profile`,getParentRoute:()=>K}),vl=ec.update({id:`/iam/(policies)/create-policy`,path:`/iam/create-policy`,getParentRoute:()=>K}),yl=tc.update({id:`/iam/(roles)/create-role`,path:`/iam/create-role`,getParentRoute:()=>K}),bl=nc.update({id:`/iam/(users)/create-user`,path:`/iam/create-user`,getParentRoute:()=>K}),xl=rc.update({id:`/rds/(db-instances)/create-db-instance`,path:`/rds/create-db-instance`,getParentRoute:()=>K}),Sl=ic.update({id:`/rds/(parameter-groups)/create-db-parameter-group`,path:`/rds/create-db-parameter-group`,getParentRoute:()=>K}),Cl=ac.update({id:`/rds/(subnet-groups)/create-db-subnet-group`,path:`/rds/create-db-subnet-group`,getParentRoute:()=>K}),wl=oc.update({id:`/s3/(buckets)/create-bucket`,path:`/s3/create-bucket`,getParentRoute:()=>K}),Tl=sc.update({id:`/s3/ls/`,path:`/s3/ls/`,getParentRoute:()=>K}),El=cc.update({id:`/s3/ls/$bucket`,path:`/s3/ls/$bucket`,getParentRoute:()=>K}),Dl=lc.update({id:`/(catalog)/list-model-catalog/`,path:`/list-model-catalog/`,getParentRoute:()=>Kc}),Ol=uc.update({id:`/(guardrails)/list-guardrails/`,path:`/list-guardrails/`,getParentRoute:()=>Kc}),kl=dc.update({id:`/(guardrails)/list-guardrails/create`,path:`/list-guardrails/create`,getParentRoute:()=>Kc}),Al=fc.update({id:`/(knowledge-bases)/list-knowledge-bases/`,path:`/list-knowledge-bases/`,getParentRoute:()=>Kc}),jl=$n.update({id:`/(knowledge-bases)/list-knowledge-bases/$knowledgeBaseId`,path:`/list-knowledge-bases/$knowledgeBaseId`,getParentRoute:()=>Kc}),Ml=pc.update({id:`/(knowledge-bases)/list-knowledge-bases/create`,path:`/list-knowledge-bases/create`,getParentRoute:()=>Kc}),Nl=mc.update({id:`/(model-access)/list-model-access/`,path:`/list-model-access/`,getParentRoute:()=>Kc}),Pl=hc.update({id:`/(playground)/playground/`,path:`/playground/`,getParentRoute:()=>Kc}),Fl=gc.update({id:`/ec2/(elastic-ips)/describe-addresses/`,path:`/ec2/describe-addresses/`,getParentRoute:()=>K}),Il=er.update({id:`/ec2/(elastic-ips)/describe-addresses/$id`,path:`/ec2/describe-addresses/$id`,getParentRoute:()=>K}),Ll=_c.update({id:`/ec2/(images)/describe-images/`,path:`/ec2/describe-images/`,getParentRoute:()=>K}),Rl=tr.update({id:`/ec2/(images)/describe-images/$id`,path:`/ec2/describe-images/$id`,getParentRoute:()=>K}),zl=vc.update({id:`/ec2/(instances)/describe-instances/`,path:`/ec2/describe-instances/`,getParentRoute:()=>K}),Bl=nr.update({id:`/ec2/(instances)/describe-instances/$id`,path:`/ec2/describe-instances/$id`,getParentRoute:()=>K}),Vl=yc.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/`,path:`/ec2/describe-internet-gateways/`,getParentRoute:()=>K}),Hl=rr.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/$id`,path:`/ec2/describe-internet-gateways/$id`,getParentRoute:()=>K}),Ul=bc.update({id:`/ec2/(key)/describe-key-pairs/`,path:`/ec2/describe-key-pairs/`,getParentRoute:()=>K}),Wl=ir.update({id:`/ec2/(key)/describe-key-pairs/$id`,path:`/ec2/describe-key-pairs/$id`,getParentRoute:()=>K}),Gl=xc.update({id:`/ec2/(launch-templates)/describe-launch-templates/`,path:`/ec2/describe-launch-templates/`,getParentRoute:()=>K}),Kl=ar.update({id:`/ec2/(launch-templates)/describe-launch-templates/$id`,path:`/ec2/describe-launch-templates/$id`,getParentRoute:()=>K}),ql=Sc.update({id:`/ec2/(load-balancers)/describe-load-balancers/`,path:`/ec2/describe-load-balancers/`,getParentRoute:()=>K}),Jl=or.update({id:`/ec2/(load-balancers)/describe-load-balancers/$id`,path:`/ec2/describe-load-balancers/$id`,getParentRoute:()=>K}),Yl=Cc.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/`,path:`/ec2/describe-nat-gateways/`,getParentRoute:()=>K}),Xl=sr.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/$id`,path:`/ec2/describe-nat-gateways/$id`,getParentRoute:()=>K}),Zl=wc.update({id:`/ec2/(placement-groups)/describe-placement-groups/`,path:`/ec2/describe-placement-groups/`,getParentRoute:()=>K}),Ql=cr.update({id:`/ec2/(placement-groups)/describe-placement-groups/$id`,path:`/ec2/describe-placement-groups/$id`,getParentRoute:()=>K}),$l=Tc.update({id:`/ec2/(route-tables)/describe-route-tables/`,path:`/ec2/describe-route-tables/`,getParentRoute:()=>K}),eu=lr.update({id:`/ec2/(route-tables)/describe-route-tables/$id`,path:`/ec2/describe-route-tables/$id`,getParentRoute:()=>K}),tu=Ec.update({id:`/ec2/(security-groups)/describe-security-groups/`,path:`/ec2/describe-security-groups/`,getParentRoute:()=>K}),nu=We.update({id:`/ec2/(security-groups)/describe-security-groups/$id`,path:`/ec2/describe-security-groups/$id`,getParentRoute:()=>K}),q=Dc.update({id:`/ec2/(snapshots)/describe-snapshots/`,path:`/ec2/describe-snapshots/`,getParentRoute:()=>K}),ru=ze.update({id:`/ec2/(snapshots)/describe-snapshots/$id`,path:`/ec2/describe-snapshots/$id`,getParentRoute:()=>K}),iu=Oc.update({id:`/ec2/(subnet)/describe-subnets/`,path:`/ec2/describe-subnets/`,getParentRoute:()=>K}),au=ur.update({id:`/ec2/(subnet)/describe-subnets/$id`,path:`/ec2/describe-subnets/$id`,getParentRoute:()=>K}),ou=kc.update({id:`/ec2/(target-groups)/describe-target-groups/`,path:`/ec2/describe-target-groups/`,getParentRoute:()=>K}),su=dr.update({id:`/ec2/(target-groups)/describe-target-groups/$id`,path:`/ec2/describe-target-groups/$id`,getParentRoute:()=>K}),cu=Ac.update({id:`/ec2/(volumes)/describe-volumes/`,path:`/ec2/describe-volumes/`,getParentRoute:()=>K}),lu=fr.update({id:`/ec2/(volumes)/describe-volumes/$id`,path:`/ec2/describe-volumes/$id`,getParentRoute:()=>K}),uu=pr.update({id:`/ec2/(volumes)/modify-volume/$id`,path:`/ec2/modify-volume/$id`,getParentRoute:()=>K}),du=jc.update({id:`/ec2/(vpc)/describe-vpcs/`,path:`/ec2/describe-vpcs/`,getParentRoute:()=>K}),fu=mr.update({id:`/ec2/(vpc)/describe-vpcs/$id`,path:`/ec2/describe-vpcs/$id`,getParentRoute:()=>K}),pu=Mc.update({id:`/ecr/(repositories)/list-repositories/`,path:`/ecr/list-repositories/`,getParentRoute:()=>K}),mu=hr.update({id:`/ecr/(repositories)/list-repositories/$id`,path:`/ecr/list-repositories/$id`,getParentRoute:()=>K}),hu=Nc.update({id:`/ecs/(clusters)/list-clusters/`,path:`/ecs/list-clusters/`,getParentRoute:()=>K}),gu=gr.update({id:`/ecs/(clusters)/list-clusters/$clusterName`,path:`/ecs/list-clusters/$clusterName`,getParentRoute:()=>K}),_u=Pc.update({id:`/eks/(clusters)/list-clusters/`,path:`/eks/list-clusters/`,getParentRoute:()=>K}),vu=He.update({id:`/eks/(clusters)/list-clusters/$clusterName`,path:`/eks/list-clusters/$clusterName`,getParentRoute:()=>K}),yu=Fc.update({id:`/iam/(groups)/list-groups/`,path:`/iam/list-groups/`,getParentRoute:()=>K}),bu=_r.update({id:`/iam/(groups)/list-groups/$groupName`,path:`/iam/list-groups/$groupName`,getParentRoute:()=>K}),xu=Ic.update({id:`/iam/(instance-profiles)/list-instance-profiles/`,path:`/iam/list-instance-profiles/`,getParentRoute:()=>K}),Su=vr.update({id:`/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`,path:`/iam/list-instance-profiles/$instanceProfileName`,getParentRoute:()=>K}),Cu=Lc.update({id:`/iam/(policies)/list-policies/`,path:`/iam/list-policies/`,getParentRoute:()=>K}),wu=yr.update({id:`/iam/(policies)/list-policies/$policyArn`,path:`/iam/list-policies/$policyArn`,getParentRoute:()=>K}),Tu=Rc.update({id:`/iam/(roles)/list-roles/`,path:`/iam/list-roles/`,getParentRoute:()=>K}),Eu=br.update({id:`/iam/(roles)/list-roles/$roleName`,path:`/iam/list-roles/$roleName`,getParentRoute:()=>K}),Du=zc.update({id:`/iam/(users)/list-users/`,path:`/iam/list-users/`,getParentRoute:()=>K}),Ou=xr.update({id:`/iam/(users)/list-users/$userName`,path:`/iam/list-users/$userName`,getParentRoute:()=>K}),ku=Bc.update({id:`/rds/(db-instances)/describe-db-instances/`,path:`/rds/describe-db-instances/`,getParentRoute:()=>K}),Au=Sr.update({id:`/rds/(db-instances)/describe-db-instances/$id`,path:`/rds/describe-db-instances/$id`,getParentRoute:()=>K}),ju=Vc.update({id:`/rds/(parameter-groups)/describe-db-parameter-groups/`,path:`/rds/describe-db-parameter-groups/`,getParentRoute:()=>K}),Mu=Cr.update({id:`/rds/(parameter-groups)/describe-db-parameter-groups/$name`,path:`/rds/describe-db-parameter-groups/$name`,getParentRoute:()=>K}),Nu=Hc.update({id:`/rds/(snapshots)/describe-db-snapshots/`,path:`/rds/describe-db-snapshots/`,getParentRoute:()=>K}),Pu=wr.update({id:`/rds/(snapshots)/describe-db-snapshots/$id`,path:`/rds/describe-db-snapshots/$id`,getParentRoute:()=>K}),Fu=Tr.update({id:`/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id`,path:`/rds/restore-db-instance-from-db-snapshot/$id`,getParentRoute:()=>K}),Iu=Uc.update({id:`/rds/(subnet-groups)/describe-db-subnet-groups/`,path:`/rds/describe-db-subnet-groups/`,getParentRoute:()=>K}),Lu=Er.update({id:`/rds/(subnet-groups)/describe-db-subnet-groups/$name`,path:`/rds/describe-db-subnet-groups/$name`,getParentRoute:()=>K}),Ru=Dr.update({id:`/`,path:`/`,getParentRoute:()=>El}),zu=Or.update({id:`/$`,path:`/$`,getParentRoute:()=>El}),Bu=kr.update({id:`/(guardrails)/list-guardrails/$guardrailId/`,path:`/list-guardrails/$guardrailId/`,getParentRoute:()=>Kc}),Vu=Ar.update({id:`/(guardrails)/list-guardrails/$guardrailId/edit`,path:`/list-guardrails/$guardrailId/edit`,getParentRoute:()=>Kc}),Hu=jr.update({id:`/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName`,path:`/ecs/list-clusters/$clusterName/services/$serviceName`,getParentRoute:()=>K}),Uu=Mr.update({id:`/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId`,path:`/ecs/list-clusters/$clusterName/tasks/$taskId`,getParentRoute:()=>K}),Wu={AuthBedrockguardrailsListGuardrailsCreateRoute:kl,AuthBedrockknowledgeBasesListKnowledgeBasesKnowledgeBaseIdRoute:jl,AuthBedrockknowledgeBasesListKnowledgeBasesCreateRoute:Ml,AuthBedrockcatalogListModelCatalogIndexRoute:Dl,AuthBedrockguardrailsListGuardrailsIndexRoute:Ol,AuthBedrockknowledgeBasesListKnowledgeBasesIndexRoute:Al,AuthBedrockmodelAccessListModelAccessIndexRoute:Nl,AuthBedrockplaygroundPlaygroundIndexRoute:Pl,AuthBedrockguardrailsListGuardrailsGuardrailIdEditRoute:Vu,AuthBedrockguardrailsListGuardrailsGuardrailIdIndexRoute:Bu},Gu=Kc._addFileChildren(Wu),Ku={AuthS3LsBucketSplatRoute:zu,AuthS3LsBucketIndexRoute:Ru},qu={AuthBedrockRouteRoute:Gu,AuthNodesRoute:qc,AuthIndexRoute:Gc,AuthS3ServiceMetricsRoute:Jc,AuthS3LsBucketRouteRoute:El._addFileChildren(Ku),AuthEc2elasticIpsAllocateAddressRoute:Yc,AuthEc2instancesRunInstancesRoute:Xc,AuthEc2internetGatewaysCreateInternetGatewayRoute:Zc,AuthEc2keyCreateKeyPairRoute:Qc,AuthEc2keyImportKeyPairRoute:$c,AuthEc2launchTemplatesCreateLaunchTemplateRoute:el,AuthEc2loadBalancersCreateLoadBalancerRoute:tl,AuthEc2natGatewaysCreateNatGatewayRoute:nl,AuthEc2placementGroupsCreatePlacementGroupRoute:rl,AuthEc2routeTablesCreateRouteTableRoute:il,AuthEc2securityGroupsCreateSecurityGroupRoute:al,AuthEc2snapshotsCreateSnapshotRoute:ol,AuthEc2subnetCreateSubnetRoute:sl,AuthEc2targetGroupsCreateTargetGroupRoute:cl,AuthEc2volumesCreateVolumeRoute:ll,AuthEc2vpcCreateVpcRoute:ul,AuthEcsclustersCreateServiceRoute:dl,AuthEcsclustersRegisterTaskDefinitionRoute:fl,AuthEcsclustersRunTaskRoute:pl,AuthEcsclustersTaskDefinitionsRoute:ml,AuthEksclustersCreateClusterRoute:hl,AuthIamgroupsCreateGroupRoute:gl,AuthIaminstanceProfilesCreateInstanceProfileRoute:_l,AuthIampoliciesCreatePolicyRoute:vl,AuthIamrolesCreateRoleRoute:yl,AuthIamusersCreateUserRoute:bl,AuthRdsdbInstancesCreateDbInstanceRoute:xl,AuthRdsparameterGroupsCreateDbParameterGroupRoute:Sl,AuthRdssubnetGroupsCreateDbSubnetGroupRoute:Cl,AuthS3bucketsCreateBucketRoute:wl,AuthS3LsIndexRoute:Tl,AuthEc2elasticIpsDescribeAddressesIdRoute:Il,AuthEc2imagesDescribeImagesIdRoute:Rl,AuthEc2instancesDescribeInstancesIdRoute:Bl,AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute:Hl,AuthEc2keyDescribeKeyPairsIdRoute:Wl,AuthEc2launchTemplatesDescribeLaunchTemplatesIdRoute:Kl,AuthEc2loadBalancersDescribeLoadBalancersIdRoute:Jl,AuthEc2natGatewaysDescribeNatGatewaysIdRoute:Xl,AuthEc2placementGroupsDescribePlacementGroupsIdRoute:Ql,AuthEc2routeTablesDescribeRouteTablesIdRoute:eu,AuthEc2securityGroupsDescribeSecurityGroupsIdRoute:nu,AuthEc2snapshotsDescribeSnapshotsIdRoute:ru,AuthEc2subnetDescribeSubnetsIdRoute:au,AuthEc2targetGroupsDescribeTargetGroupsIdRoute:su,AuthEc2volumesDescribeVolumesIdRoute:lu,AuthEc2volumesModifyVolumeIdRoute:uu,AuthEc2vpcDescribeVpcsIdRoute:fu,AuthEcrrepositoriesListRepositoriesIdRoute:mu,AuthEcsclustersListClustersClusterNameRoute:gu,AuthEksclustersListClustersClusterNameRoute:vu,AuthIamgroupsListGroupsGroupNameRoute:bu,AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute:Su,AuthIampoliciesListPoliciesPolicyArnRoute:wu,AuthIamrolesListRolesRoleNameRoute:Eu,AuthIamusersListUsersUserNameRoute:Ou,AuthRdsdbInstancesDescribeDbInstancesIdRoute:Au,AuthRdsparameterGroupsDescribeDbParameterGroupsNameRoute:Mu,AuthRdssnapshotsDescribeDbSnapshotsIdRoute:Pu,AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRoute:Fu,AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRoute:Lu,AuthEc2elasticIpsDescribeAddressesIndexRoute:Fl,AuthEc2imagesDescribeImagesIndexRoute:Ll,AuthEc2instancesDescribeInstancesIndexRoute:zl,AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute:Vl,AuthEc2keyDescribeKeyPairsIndexRoute:Ul,AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRoute:Gl,AuthEc2loadBalancersDescribeLoadBalancersIndexRoute:ql,AuthEc2natGatewaysDescribeNatGatewaysIndexRoute:Yl,AuthEc2placementGroupsDescribePlacementGroupsIndexRoute:Zl,AuthEc2routeTablesDescribeRouteTablesIndexRoute:$l,AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute:tu,AuthEc2snapshotsDescribeSnapshotsIndexRoute:q,AuthEc2subnetDescribeSubnetsIndexRoute:iu,AuthEc2targetGroupsDescribeTargetGroupsIndexRoute:ou,AuthEc2volumesDescribeVolumesIndexRoute:cu,AuthEc2vpcDescribeVpcsIndexRoute:du,AuthEcrrepositoriesListRepositoriesIndexRoute:pu,AuthEcsclustersListClustersIndexRoute:hu,AuthEksclustersListClustersIndexRoute:_u,AuthIamgroupsListGroupsIndexRoute:yu,AuthIaminstanceProfilesListInstanceProfilesIndexRoute:xu,AuthIampoliciesListPoliciesIndexRoute:Cu,AuthIamrolesListRolesIndexRoute:Tu,AuthIamusersListUsersIndexRoute:Du,AuthRdsdbInstancesDescribeDbInstancesIndexRoute:ku,AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRoute:ju,AuthRdssnapshotsDescribeDbSnapshotsIndexRoute:Nu,AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRoute:Iu,AuthEcsclustersListClustersClusterNameServicesServiceNameRoute:Hu,AuthEcsclustersListClustersClusterNameTasksTaskIdRoute:Uu},Ju={AuthRouteRoute:K._addFileChildren(qu),LoginRoute:Wc},Yu=ks._addFileChildren(Ju)._addFileTypes(),Xu=Ss();xs(Xu);var Zu=fi({routeTree:Yu,context:{queryClient:Xu},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0});async function J(e){try{await Ee()}catch(t){e.render((0,z.jsxs)(`div`,{className:`mx-auto my-16 max-w-160 font-system`,children:[(0,z.jsx)(`h1`,{children:`Console unavailable`}),(0,z.jsx)(`p`,{children:`This cluster did not report its region, so the console cannot sign requests. Check that the serving node has a region set in its configuration.`}),(0,z.jsx)(`pre`,{children:t instanceof Error?t.message:String(t)})]}));return}e.render((0,z.jsx)(R.StrictMode,{children:(0,z.jsx)(ki,{defaultTheme:`dark`,storageKey:`spinifex-ui-theme`,children:(0,z.jsx)(p,{client:Xu,children:(0,z.jsx)(ts,{children:(0,z.jsx)(hi,{router:Zu})})})})}))}var Y=document.querySelector(`#app`);Y&&!Y.innerHTML&&await J(Ei.createRoot(Y)); \ No newline at end of file +`).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,i,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&dn(e,``+r);else return;break;case`className`:Xt(e,`class`,r);break;case`tabIndex`:Xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Xt(e,n,r);break;case`style`:mn(e,r,o);return;case`data`:if(t!==`object`){Xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,i.name,i,null),ep(e,t,`formEncType`,i.formEncType,i,null),ep(e,t,`formMethod`,i.formMethod,i,null),ep(e,t,`formTarget`,i.formTarget,i,null)):(ep(e,t,`encType`,i.encType,i,null),ep(e,t,`method`,i.method,i,null),ep(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=yn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=vn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Yt(e,`popover`,r);break;case`xlinkActuate`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Yt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=L(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+L(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+L(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+L(n.imageSizes)+`"]`)):i+=`[href="`+L(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Mt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+L(r)+`"][href="`+L(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Lt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Rt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Lt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Rt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Lt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Rt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=Te.current)?bm(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Lt(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Lt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(i,e,o,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Lt(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Pm(e){return`href="`+L(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Mt]){r.loading=1;return}}else t=e.createElement(`link`),t[Mt]=!0,t.onload=t.onerror=zt.bind(null,t),np(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+L(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+L(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var i=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var o=e.querySelector(Fm(i));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=Im(n),(i=vm.get(i))&&Hm(r,i),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(i=e.querySelector(zm(o)))?(t.instance=i,Rt(i),i):(r=n,(i=vm.get(o))&&(r=T({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Rt(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ti()}))(),1),B=i(),Di=(0,R.createContext)(void 0);function Oi(e,t){try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return t}function ki(e){let t=(0,B.c)(14),{children:n,defaultTheme:r,storageKey:i}=e,a=r===void 0?`dark`:r,o=i===void 0?`ui-theme`:i,s;t[0]!==a||t[1]!==o?(s=()=>Oi(o,a),t[0]=a,t[1]=o,t[2]=s):s=t[2];let[c,l]=(0,R.useState)(s),u,d;t[3]===c?(u=t[4],d=t[5]):(u=()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),c===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(c)},d=[c],t[3]=c,t[4]=u,t[5]=d),(0,R.useEffect)(u,d);let f;t[6]===o?f=t[7]:(f=e=>{try{localStorage.setItem(o,e)}catch{}l(e)},t[6]=o,t[7]=f);let p;t[8]!==f||t[9]!==c?(p={theme:c,setTheme:f},t[8]=f,t[9]=c,t[10]=p):p=t[10];let m=p,h;return t[11]!==n||t[12]!==m?(h=(0,z.jsx)(Di.Provider,{value:m,children:n}),t[11]=n,t[12]=m,t[13]=h):h=t[13],h}function Ai(){let e=(0,R.useContext)(Di);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}var ji={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};ji.node;var Mi=F(ji),Ni={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Ni.node;var Pi=F(Ni),Fi={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};Fi.node;var Ii=F(Fi),Li={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};Li.node;var Ri=F(Li),zi={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};zi.node;var Bi=F(zi),Vi={name:`container`,size:24,node:[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]};Vi.node;var Hi=F(Vi),Ui={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};Ui.node;var Wi=F(Ui),Gi={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Gi.node;var Ki=F(Gi),qi={name:`file-stack`,size:24,node:[[`path`,{d:`M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1`,key:`likhh7`}],[`path`,{d:`M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1`,key:`17ky3x`}],[`path`,{d:`M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z`,key:`1hyeo0`}]]};qi.node;var Ji=F(qi),Yi={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Yi.node;var Xi=F(Yi),Zi={name:`id-card`,size:24,node:[[`path`,{d:`M13 19a4 4 0 00-8 0`,key:`cugzd5`}],[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]};Zi.node;var Qi=F(Zi),$i={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};$i.node;var ea=F($i),ta={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};ta.node;var na=F(ta),ra={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};ra.node;var V=F(ra),ia={name:`layout-list`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]};ia.node;var aa=F(ia),oa={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};oa.node;var sa=F(oa),ca={name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]};ca.node;var la=F(ca),ua={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};ua.node;var da=F(ua),fa={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};fa.node;var pa=F(fa),ma={name:`package`,size:24,node:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]};ma.node;var ha=F(ma),ga={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};ga.node;var _a=F(ga),va={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};va.node;var ya=F(va),ba={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};ba.node;var xa=F(ba),Sa={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Sa.node;var Ca=F(Sa),wa={name:`user-cog`,size:24,node:[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};wa.node;var Ta=F(wa),Ea={name:`users-round`,size:24,node:[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]],aliases:[`users-2`]};Ea.node;var Da=F(Ea),Oa={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Oa.node;var ka=F(Oa);function Aa(e,t){return t!=null&&!st(t)?0:typeof e==`function`?e():e}function ja(e,t,n){let r=Aa(e,n);return typeof r==`number`?r:r?.[t]}function Ma(e){return typeof e==`function`?e():e}function Na(e,t){return t||e===`click`||e===`mousedown`}function Pa(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Fa=R.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ut,currentIdRef:{current:null},currentContextRef:{current:null}});function Ia(e,t){e.current=t.current}function La(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=R.useRef(n),a=R.useRef(n),o=R.useRef(null),s=R.useRef(null),c=Gt();return Ye(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:ja(i.current,`open`),close:ja(n,`close`)}},[n,o,i,a]),(0,z.jsx)(Fa.Provider,{value:R.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Ra(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=R.useContext(Fa),[d,f]=R.useState(!1),p=R.useRef(n);return Ye(()=>{p.current=n},[n]),Ye(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),Ye(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:ja(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Ft(Lt))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),Ye(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,Ia(a,s),u.clear()}},[c,i,a,r,s,u]),R.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function za(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Ba(e){return e!=null&&e.clientX!=null}function Va(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=R.useRef(!1),l=R.useRef(null),[u,d]=R.useState(),[f,p]=R.useState([]),m=Ke(t=>{e.set(`positionReference`,t)}),h=Ke((t,n,i)=>{c.current||(!s.current.openEvent||Ba(s.current.openEvent))&&e.set(`positionReference`,za(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Ke(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=st(u)?a:i;R.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Ze(a);function r(t){let n=et(t);nt(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Ba(s.current.openEvent)?l.current=j(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),R.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),R.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),R.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=R.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return R.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}var Ha=me();function Ua(e){let t=R.useCallback(t=>e===void 0?Ce:e.subscribeStore(t),[e]),n=R.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Ha.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Wa=xt&&Ct;function Ga(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=R.useRef(!1),s=R.useRef(null),c=R.useRef(!0),l=Gt();R.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ze(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Qe(t)&&t===Mt(it(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return dt(j(r,`blur`,i),Wa&&j(r,`keydown`,a,!0),Wa&&j(r,`pointerdown`,l,!0))},[e,n]),R.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Ge(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=R.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=et(n.nativeEvent);if(Ge(a)){if(Wa&&!n.relatedTarget){if(!c.current&&!Ot(a))return}else if(!ht(a))return}let u=pt(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,Ft(Vt,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,Ft(Vt,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Ge(r)&&r.hasAttribute(ut(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Mt(it(t));(r||n!==t)&&(nt(a.current.floatingContext?.refs.floating.current,n)||nt(t,n)||o||pt(r??n,e.context.triggerElements)||e.setOpen(!1,Ft(Vt,i)))})}}},[a,r,e,l]);return R.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Ka=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Ut;restTimeout=new Ut;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},qa=new WeakMap;function Ja(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&qa.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),qa.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Ya(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=qa.get(n);a&&a!==e&&Ja(a),Ja(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,qa.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Xa(e){let t=e.context.dataRef.current,n=xe(()=>t.hoverInteractionState??Ka.create()).current;return t.hoverInteractionState||=n,It(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Za(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=ot(),u=at(),d=Xa(e),f=Gt(),p=Ke(()=>Na(c.current.openEvent?.type,d.interactedInside)),m=Ke(()=>Pa(c.current.openEvent?.type)),h=Ke(()=>{Ja(d)});Ye(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),R.useEffect(()=>h,[h]),Ye(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Ge(s)&&o){let e=s,t=o,n=it(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??lt(e,`[data-rootownerid]`)??n.body;return Ya(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),R.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Et(l.nodesRef.current,u).length>0)}function a(t){let n=ja(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Ft(zt,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=et(e);if(!yt(t)){d.interactedInside=!1;return}d.interactedInside=lt(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(pt(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Ge(o)&&Et(l.nodesRef.current,r,!1).some(e=>nt(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Ft(zt,n)),l.events.emit(`floating.closed`,n)})}let y=o;return dt(y&&j(y,`mouseenter`,g),y&&j(y,`mouseleave`,_),y&&j(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Qa=n(_e(),1),$a={current:null};function eo(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=$a,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=ot(l),v=Xa(e),y=R.useRef(!1),b=M(i),x=M(r),S=M(o),C=M(n),w=M(p),T=M(f),E=Ke(()=>Na(h.current.openEvent?.type,v.interactedInside)),D=Ke(()=>w.current?.()!==!1),O=Ke((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!nt(t,n);if(!Ge(r))return!1;let a=r;return i.hasMatchingElement(e=>nt(e,a))&&(!t||!nt(t,a))}),k=Ke(()=>{v.handler&&=(it(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),ee=Ke(()=>{Ja(v)});return u&&(v.handleCloseOptions=i?.__options),R.useEffect(()=>k,[k]),R.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===zt,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),R.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=ja(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Ft(zt,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Ft(zt,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Ge(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!st(v.pointerType))return;let n=Ma(S.current),r=ja(x.current,`open`,v.pointerType),i=et(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Ge(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(nt(t,i)){c=t;break}}Ge(o)&&Ge(s)&&!e.context.triggerElements.hasElement(o)&&nt(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Ge(c)&&Ge(s)&&nt(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,Ft(zt,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Ft(zt,t,c))}):g&&D()&&e.setOpen(!0,Ft(zt,t,c)))}function o(n){if(E()){ee();return}k();let r=e.select(`domReferenceElement`),i=it(r);v.restTimeout.clear(),v.restTimeoutPending=!1;let a=h.current.floatingContext??d?.();if(!pt(n.relatedTarget,e.context.triggerElements)){if(b.current&&a){e.select(`open`)||v.openChangeTimeout.clear();let r=c.current;v.handler=b.current({...a,tree:_,x:n.clientX,y:n.clientY,onClose(){ee(),k(),C.current&&!E()&&r===e.select(`domReferenceElement`)&&t(n,!0)}}),i.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!nt(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){nt(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?j(r,`mouseout`,l):void 0;return s?dt(j(r,`mousemove`,i,{once:!0}),j(r,`mouseenter`,i),j(r,`mouseleave`,o),f):dt(j(r,`mouseenter`,i),j(r,`mouseleave`,o),f)},[k,ee,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),R.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!st(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;Ya(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Ma(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Ft(zt,n,r))}v.pointerType===`touch`?Qa.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}var to=.1,no=to*to,ro=.5;function io(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ao(e,t,n,r,i,a,o,s,c,l){let u=!1;return io(e,t,n,r,i,a)&&(u=!u),io(e,t,i,a,o,s)&&(u=!u),io(e,t,o,s,c,l)&&(u=!u),io(e,t,c,l,n,r)&&(u=!u),u}function oo(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function so(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function co(e={}){let{blockPointerEvents:t=!1}=e,n=new Ut,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*no;return u=e,d=t,f=n,o0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,ee=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let te=!1;switch(c){case`top`:te=so(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:te=so(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:te=so(d,f,S.right-1,ee,x.left+1,k);break;case`right`:te=so(d,f,x.right-1,ee,S.left+1,k)}if(te)return;if(l&&!oo(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let ne=!1;switch(c){case`top`:{let n=T?ro/2:ro*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+ro+1,o=C||T?S.bottom-ro:S.top,s=C?T?S.bottom-ro:S.top:S.bottom-ro;ne=ao(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?ro/2:ro*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-ro,o=C||T?S.top+ro:S.bottom,s=C?T?S.top+ro:S.bottom:S.top+ro;ne=ao(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?ro/2:ro*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+ro+1,o=w||E?S.right-ro:S.left,s=w?E?S.right-ro:S.left:S.right-ro;ne=ao(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?ro/2:ro*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-ro,o=w||E?S.left+ro:S.right,s=w?E?S.left+ro:S.right:S.left+ro;ne=ao(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}ne?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var lo=vt(function(e){return $t(`dialog`,e)});function uo(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(lo,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function fo(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(tn,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function po(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`fixed inset-0 z-50 bg-black/80 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(Qt,{className:i,"data-slot":`sheet-overlay`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function mo(e){let t=(0,B.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0||o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(po,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=P(`fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,z.jsxs)(Xt,{"data-slot":`sheet-close`,render:(0,z.jsx)(Xe,{className:`absolute top-4 right-4`,size:`icon-sm`,variant:`ghost`}),children:[(0,z.jsx)(Ue,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,z.jsxs)(fo,{children:[l,(0,z.jsxs)(Zt,{className:u,"data-side":s,"data-slot":`sheet-content`,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function ho(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex flex-col gap-1.5 p-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-slot":`sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function go(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`text-sm font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(rn,{className:i,"data-slot":`sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _o(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`text-xs/relaxed text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(nn,{className:i,"data-slot":`sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var vo=R.createContext(void 0);function yo(e){let t=R.useContext(vo);if(t===void 0&&!e)throw Error(Je(72));return t}var bo={...en,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},xo=class extends Tt{constructor(e,t,n){let r=new ft;super(So(e,r,t,n),Co(r),bo)}setOpen=(e,t)=>{mt(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Ft(Rt,e))}};function So(e,t,n,r=!1){return{...Yt(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Co(e){return{popupRef:R.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var wo=vt(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=$e((e,t)=>new xo({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),jt(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=ct(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=R.useRef(null);Ye(()=>{m&&t&&p.setOpen(!1,Ft(Ht))},[m,t,p]),Ye(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),Ye(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),R.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Ft(Bt))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,z.jsxs)(vo.Provider,{value:p,children:[l&&(0,z.jsx)(Nt,{handle:l,store:p}),T&&(0,z.jsx)(To,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function To({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=bt(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Va(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=R.useMemo(()=>be(a.reference,i.reference),[a.reference,i.reference]);return tt(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??ye}),null}var Eo=R.createContext(void 0);function Do(){return R.useContext(Eo)}var Oo=`data-base-ui-tooltip-trigger`;function ko(e){let t=et(e);return Ge(t)?t:null}var Ao=_t(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=yo(!0),m=Ua(a)??p;if(!m)throw Error(Je(82));let h=Wt(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=R.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=St(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Do(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=Ra(v,{open:_}),O=Xa(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),ee=s??k,te=M(ee),ne=m.useState(`trackCursorAxis`),re=m.useState(`disableHoverablePopup`),ie=R.useRef(!1),ae=Gt(),oe=R.useRef(void 0);function se(){return D&&w.current!=null?0:c??C??600}function ce(e){let t=y.current;if(!t||!e)return!1;let n=lt(e,`[${Oo}]`);return n!==null&&n!==t&&nt(t,n)}function A(e){let t=ce(e);return ie.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,ae.clear()),t}let le=eo(v,{enabled:!ee,mouseOnly:!0,move:!1,handleClose:!re&&ne!==`both`?co():null,restMs:se,delay(){return u==null&&D?{close:ja(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!ie.current}}),ue=Ga(v,{enabled:!ee}).reference,de=e=>{let t=ie.current,n=ko(e),r=A(n),i=y.current,a=i&&n&&nt(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Ft(zt,e));return}if(t&&!r&&a&&!te.current&&!m.select(`open`)&&i&&st(oe.current)){let t=()=>{!ie.current&&!te.current&&!m.select(`open`)&&m.setOpen(!0,Ft(zt,e,i))},n=se();n===0?(ae.clear(),t()):ae.start(n,t)}},fe=m.useState(`appliedTriggerProps`,S||ne!==`none`);return Se(`button`,e,{state:{open:_},ref:[t,x,y],props:[le,ue,fe,{onMouseOver(e){de(e.nativeEvent)},onFocus(e){ce(ko(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){ie.current=!1,ae.clear(),oe.current=void 0},onPointerEnter(e){oe.current=e.pointerType},onPointerDown(e){oe.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[wt]:ee?``:void 0,[Oo]:ee?void 0:``},f],stateAttributesMapping:Dt})}),jo=R.createContext(void 0);function Mo(){let e=R.useContext(jo);if(e===void 0)throw Error(Je(70));return e}var No=R.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=rt({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,z.jsxs)(R.Fragment,{children:[l,c&&Qa.createPortal(n,c)]})}),Po=R.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return yo().useState(`mounted`)||n?(0,z.jsx)(jo.Provider,{value:n,children:(0,z.jsx)(No,{ref:t,...r})}):null}),Fo=R.createContext(void 0);function Io(){let e=R.useContext(Fo);if(e===void 0)throw Error(Je(71));return e}var Lo=R.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Pt,style:g,..._}=e,v=yo(),y=Mo(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=v.useState(`adaptiveOrigin`),O=qt({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:D}),k=R.useMemo(()=>({open:b,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,O.side,O.align,O.anchorHidden,S,T]),ee=I(e,k,{styles:O.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,z.jsx)(Fo.Provider,{value:O,children:ee})}),Ro=R.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=yo(),{side:s,align:c}=Io(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ve({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Za(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Se(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[At,f,Kt(d),a],stateAttributesMapping:gt})}),zo=R.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=yo(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Io(),f={open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)};return Se(`div`,e,{state:f,ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:kt})}),Bo=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=R.useMemo(()=>({open:t,close:n}),[t,n]);return(0,z.jsx)(Eo.Provider,{value:t,children:(0,z.jsx)(La,{delay:i,timeoutMs:r,children:e.children})})};function Vo(e){let t=(0,B.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,z.jsx)(Bo,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function H(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(Vo,{children:(0,z.jsx)(wo,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function U(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,z.jsx)(Ao,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Ho(e){let t=(0,B.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=P(`z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background **:data-[slot=kbd]:rounded-md`,r),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsx)(zo,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`}),t[10]=m):m=t[10];let h;t[11]!==n||t[12]!==i||t[13]!==p?(h=(0,z.jsxs)(Ro,{className:p,"data-slot":`tooltip-content`,...i,children:[n,m]}),t[11]=n,t[12]=i,t[13]=p,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==f||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,z.jsx)(Po,{children:(0,z.jsx)(Lo,{align:d,alignOffset:f,className:`isolate z-50`,side:l,sideOffset:u,children:h})}),t[15]=d,t[16]=f,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}var Uo=window.matchMedia(`(max-width: 767px)`);function Wo(e){return Uo.addEventListener(`change`,e),()=>{Uo.removeEventListener(`change`,e)}}function Go(){return Uo.matches}function Ko(){return(0,R.useSyncExternalStore)(Wo,Go)}var qo=`sidebar_state`,Jo=604800,Yo=`12rem`,Xo=`16rem`,Zo=`3rem`,Qo=`b`,$o=R.createContext(null);function es(){let e=R.useContext($o);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function ts(e){let t=(0,B.c)(36),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0||c,u=Ko(),[d,f]=R.useState(!1),[p,m]=R.useState(l),h=i??p,g;t[8]!==h||t[9]!==o?(g=e=>{let t=typeof e==`function`?e(h):e;o?o(t):m(t),document.cookie=`${qo}=${t}; path=/; max-age=${Jo}`},t[8]=h,t[9]=o,t[10]=g):g=t[10];let _=g,v;t[11]!==u||t[12]!==_?(v=()=>{u?f(rs):_(ns)},t[11]=u,t[12]=_,t[13]=v):v=t[13];let y=v,b,x;t[14]===y?(b=t[15],x=t[16]):(b=()=>{let e=e=>{e.key===Qo&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},x=[y],t[14]=y,t[15]=b,t[16]=x),R.useEffect(b,x);let S=h?`expanded`:`collapsed`,C;t[17]!==u||t[18]!==h||t[19]!==d||t[20]!==_||t[21]!==S||t[22]!==y?(C={state:S,open:h,setOpen:_,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:y},t[17]=u,t[18]=h,t[19]=d,t[20]=_,t[21]=S,t[22]=y,t[23]=C):C=t[23];let w=C,T;t[24]===s?T=t[25]:(T={"--sidebar-width":Yo,"--sidebar-width-icon":Zo,...s},t[24]=s,t[25]=T);let E=T,D;t[26]===r?D=t[27]:(D=P(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[26]=r,t[27]=D);let O;t[28]!==n||t[29]!==a||t[30]!==D||t[31]!==E?(O=(0,z.jsx)(`div`,{className:D,"data-slot":`sidebar-wrapper`,style:E,...a,children:n}),t[28]=n,t[29]=a,t[30]=D,t[31]=E,t[32]=O):O=t[32];let k;return t[33]!==w||t[34]!==O?(k=(0,z.jsx)($o.Provider,{value:w,children:O}),t[33]=w,t[34]=O,t[35]=k):k=t[35],k}function ns(e){return!e}function rs(e){return!e}function is(e){let t=(0,B.c)(46),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offExamples`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=es();if(u===`none`){let e;t[7]===r?e=t[8]:(e=P(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,z.jsx)(`div`,{className:e,"data-slot":`sidebar`,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":Xo},t[13]=e):e=t[13];let r=e,a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,z.jsxs)(ho,{className:`sr-only`,children:[(0,z.jsx)(go,{children:`Sidebar`}),(0,z.jsx)(_o,{children:`Displays the mobile sidebar.`})]}),t[14]=a):a=t[14];let o;t[15]===n?o=t[16]:(o=(0,z.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[15]=n,t[16]=o);let s;t[17]!==c||t[18]!==o?(s=(0,z.jsxs)(mo,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,side:c,style:r,children:[a,o]}),t[17]=c,t[18]=o,t[19]=s):s=t[19];let l;return t[20]!==p||t[21]!==i||t[22]!==m||t[23]!==s?(l=(0,z.jsx)(uo,{onOpenChange:m,open:p,...i,children:s}),t[20]=p,t[21]=i,t[22]=m,t[23]=s,t[24]=l):l=t[24],l}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[25]===g?_=t[26]:(_=P(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offExamples]:w-0`,`group-data-[side=right]:rotate-180`,g),t[25]=g,t[26]=_);let v;t[27]===_?v=t[28]:(v=(0,z.jsx)(`div`,{className:_,"data-slot":`sidebar-gap`}),t[27]=_,t[28]=v);let y=c===`left`?`left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]`,b=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,x;t[29]!==r||t[30]!==y||t[31]!==b?(x=P(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,y,b,r),t[29]=r,t[30]=y,t[31]=b,t[32]=x):x=t[32];let S;t[33]===n?S=t[34]:(S=(0,z.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,children:n}),t[33]=n,t[34]=S);let C;t[35]!==i||t[36]!==x||t[37]!==S?(C=(0,z.jsx)(`div`,{className:x,"data-slot":`sidebar-container`,...i,children:S}),t[35]=i,t[36]=x,t[37]=S,t[38]=C):C=t[38];let w;return t[39]!==c||t[40]!==f||t[41]!==C||t[42]!==h||t[43]!==v||t[44]!==l?(w=(0,z.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":h,"data-side":c,"data-slot":`sidebar`,"data-state":f,"data-variant":l,children:[v,C]}),t[39]=c,t[40]=f,t[41]=C,t[42]=h,t[43]=v,t[44]=l,t[45]=w):w=t[45],w}function as(e){let t=(0,B.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=es(),o;t[4]===n?o=t[5]:(o=P(n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,z.jsx)(_a,{}),l=(0,z.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,z.jsxs)(Xe,{className:o,"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,onClick:s,size:`icon-lg`,variant:`ghost`,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function os(e){let t=(0,B.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{toggleSidebar:i}=es(),a;t[3]===n?a=t[4]:(a=P(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full hover:group-data-[collapsible=offExamples]:bg-sidebar`,`[[data-side=left][data-collapsible=offExamples]_&]:-right-2`,`[[data-side=right][data-collapsible=offExamples]_&]:-left-2`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a||t[7]!==i?(o=(0,z.jsx)(`button`,{"aria-label":`Toggle Sidebar`,className:a,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,onClick:i,tabIndex:-1,title:`Toggle Sidebar`,type:`button`,...r}),t[5]=r,t[6]=a,t[7]=i,t[8]=o):o=t[8],o}var ss=N(`flex flex-col gap-2 p-2`,{variants:{variant:{default:``,brand:`flex-row items-center px-4 py-3`}},defaultVariants:{variant:`default`}});function cs(e){let t=(0,B.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]!==n||t[5]!==a?(o=P(ss({variant:a,className:n})),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,z.jsx)(`div`,{className:o,"data-sidebar":`header`,"data-slot":`sidebar-header`,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function ls(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-sidebar":`footer`,"data-slot":`sidebar-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function us(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(Jt,{className:i,"data-sidebar":`separator`,"data-slot":`sidebar-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ds(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto`,`group-data-[collapsible=icon]:[scrollbar-width:none] group-data-[collapsible=icon]:[&::-webkit-scrollbar]:hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-sidebar":`content`,"data-slot":`sidebar-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fs(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`relative flex w-full min-w-0 flex-col px-2 py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`div`,{className:i,"data-sidebar":`group`,"data-slot":`sidebar-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ps(e){let t=(0,B.c)(10),n,r,i,a;if(t[0]!==e){let{className:o,render:s,...c}=e;n=s,a=we,r=`div`,i=be({className:P(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,o)},c),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o={slot:`sidebar-group-label`,sidebar:`group-label`},t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==r||t[8]!==i?(s={defaultTagName:r,props:i,render:n,state:o},t[6]=n,t[7]=r,t[8]=i,t[9]=s):s=t[9],a(s)}function ms(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`flex w-full min-w-0 flex-col gap-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`ul`,{className:i,"data-sidebar":`menu`,"data-slot":`sidebar-menu`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function W(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=P(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,z.jsx)(`li`,{className:i,"data-sidebar":`menu-item`,"data-slot":`sidebar-menu-item`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var hs=N(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-xs`,sm:`h-7 text-xs`,lg:`h-12 text-xs group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function G(e){let t=(0,B.c)(18),{render:n,isActive:r,variant:i,size:a,tooltip:o,className:s,...c}=e,l=r!==void 0&&r,u=i===void 0?`default`:i,d=a===void 0?`default`:a,{isMobile:f,state:p}=es(),m=be({className:P(hs({variant:u,size:d}),s)},c),h;t[0]!==n||t[1]!==o?(h=o?(0,z.jsx)(U,{}):n,t[0]=n,t[1]=o,t[2]=h):h=t[2];let g;t[3]!==l||t[4]!==d?(g={slot:`sidebar-menu-button`,sidebar:`menu-button`,size:d,active:l},t[3]=l,t[4]=d,t[5]=g):g=t[5];let _;t[6]!==m||t[7]!==h||t[8]!==g?(_={defaultTagName:`button`,props:m,render:h,state:g},t[6]=m,t[7]=h,t[8]=g,t[9]=_):_=t[9];let v=we(_);if(!o)return v;let y;t[10]===o?y=t[11]:(y=typeof o==`string`?{children:o}:o,t[10]=o,t[11]=y);let b=y,x=p!==`collapsed`||f,S;t[12]!==x||t[13]!==b?(S=(0,z.jsx)(Ho,{align:`center`,hidden:x,side:`right`,...b}),t[12]=x,t[13]=b,t[14]=S):S=t[14];let C;return t[15]!==v||t[16]!==S?(C=(0,z.jsxs)(H,{children:[v,S]}),t[15]=v,t[16]=S,t[17]=C):C=t[17],C}var gs=new Set([`InvalidClientTokenId`,`AuthFailure`,`MissingAuthenticationToken`,`UnrecognizedClientException`,`ExpiredToken`,`ExpiredTokenException`,`InvalidAccessKeyId`]);function _s(e){return typeof e==`object`&&!!e&&`name`in e&&typeof e.name==`string`}function vs(e){return _s(e)&&gs.has(e.name)}var ys=!1;function bs(e,t){!ys&&vs(e)&&(ys=!0,Te(),an(),t.clear(),window.location.pathname!==`/login`&&(window.location.href=`/login?reason=expired`))}function xs(e){return Oe(()=>{an(),e.clear(),window.location.href=`/login`})}function Ss(){let e=new Ir({queryCache:new Fr({onError:t=>{bs(t,e)}}),mutationCache:new Nr({onError:t=>{bs(t,e)}}),defaultOptions:{queries:{staleTime:5e3,refetchIntervalInBackground:!1}}});return e}function Cs(){let e=(0,B.c)(8),{theme:t,setTheme:n}=Ai(),r;e[0]!==n||e[1]!==t?(r=()=>{n(t===`light`?`dark`:t===`dark`?`light`:`dark`)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i=r,a,o,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,z.jsx)(Ca,{className:`size-[1.2rem] scale-100 rotate-0 transition-transform dark:scale-0 dark:-rotate-90`}),o=(0,z.jsx)(pa,{className:`absolute size-[1.2rem] scale-0 rotate-90 transition-transform dark:scale-100 dark:rotate-0`}),s=(0,z.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`}),e[3]=a,e[4]=o,e[5]=s):(a=e[3],o=e[4],s=e[5]);let c;return e[6]===i?c=e[7]:(c=(0,z.jsxs)(Xe,{onClick:i,size:`icon-sm`,variant:`bare`,children:[a,o,s]}),e[6]=i,e[7]=c),c}function ws(){let e=(0,B.c)(7),{isAdmin:t,license:n}=Kn(),r=t&&n===`open-source`,i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=P(`z-50 flex h-10 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 text-sidebar-foreground`,`sticky top-0`),a=(0,z.jsx)(as,{className:`-ml-1`}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let o;e[2]===r?o=e[3]:(o=r&&(0,z.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:P(qe({variant:`outline`,size:`sm`})),children:`Upgrade`}),e[2]=r,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,z.jsx)(Cs,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,z.jsxs)(`header`,{className:i,children:[a,(0,z.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2`,children:[o,s]})]}),e[5]=o,e[6]=c),c}function Ts(){let e=(0,B.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(`h1`,{className:`text-4xl font-bold`,children:`404`}),n=(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Page not found`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,z.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4`,children:[t,n,(0,z.jsx)(A,{to:`/`,children:(0,z.jsx)(Xe,{variant:`outline`,children:`Go back home`})})]}),e[2]=r):r=e[2],r}function Es(){let e=(0,B.c)(259),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:Ds},e[0]=t):t=e[0];let n=gi(t),r=ge(),i=a(),{isAdmin:o}=Kn(),s;e[1]!==r||e[2]!==i?(s=function(){Te(),an(),i.clear(),r({to:`/login`})},e[1]=r,e[2]=i,e[3]=s):s=e[3];let c=s,l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsxs)(cs,{variant:`brand`,children:[(0,z.jsx)(`img`,{src:`/mulga-logo.svg`,alt:`Mulga`,className:`size-6 shrink-0 dark:invert`}),(0,z.jsx)(`span`,{className:`truncate text-sm font-semibold group-data-[collapsible=icon]:hidden`,children:`Spinifex`})]}),e[4]=l):l=e[4];let u;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(ps,{children:`General`}),e[5]=u):u=e[5];let d=n===`/`,f,p;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,z.jsx)(Xi,{className:`size-4`}),p=(0,z.jsx)(`span`,{children:`Dashboard`}),e[6]=f,e[7]=p):(f=e[6],p=e[7]);let m;e[8]===d?m=e[9]:(m=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/`,children:(0,z.jsxs)(G,{isActive:d,tooltip:`Dashboard`,children:[f,p]})})}),e[8]=d,e[9]=m);let h;e[10]!==o||e[11]!==n?(h=o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/nodes`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/nodes`),tooltip:`Nodes`,children:[(0,z.jsx)(Fe,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Nodes`})]})})}),e[10]=o,e[11]=n,e[12]=h):h=e[12];let g;e[13]!==m||e[14]!==h?(g=(0,z.jsxs)(fs,{children:[u,(0,z.jsxs)(ms,{children:[m,h]})]}),e[13]=m,e[14]=h,e[15]=g):g=e[15];let _;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,z.jsx)(ps,{children:`EC2`}),e[16]=_):_=e[16];let v;e[17]===n?v=e[18]:(v=n.startsWith(`/ec2/describe-instances`)||n.startsWith(`/ec2/run-instances`),e[17]=n,e[18]=v);let y,b;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,z.jsx)(Fe,{className:`size-4`}),b=(0,z.jsx)(`span`,{children:`Instances`}),e[19]=y,e[20]=b):(y=e[19],b=e[20]);let x;e[21]===v?x=e[22]:(x=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-instances`,children:(0,z.jsxs)(G,{isActive:v,tooltip:`Instances`,children:[y,b]})})}),e[21]=v,e[22]=x);let S;e[23]===n?S=e[24]:(S=n.startsWith(`/ec2/describe-launch-templates`)||n.startsWith(`/ec2/create-launch-template`),e[23]=n,e[24]=S);let C,w;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,z.jsx)(Ji,{className:`size-4`}),w=(0,z.jsx)(`span`,{children:`Launch Templates`}),e[25]=C,e[26]=w):(C=e[25],w=e[26]);let T;e[27]===S?T=e[28]:(T=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-launch-templates`,children:(0,z.jsxs)(G,{isActive:S,tooltip:`Launch Templates`,children:[C,w]})})}),e[27]=S,e[28]=T);let E;e[29]===n?E=e[30]:(E=n.startsWith(`/ec2/describe-images`),e[29]=n,e[30]=E);let D,O;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,z.jsx)(Re,{className:`size-4`}),O=(0,z.jsx)(`span`,{children:`Images`}),e[31]=D,e[32]=O):(D=e[31],O=e[32]);let k;e[33]===E?k=e[34]:(k=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-images`,children:(0,z.jsxs)(G,{isActive:E,tooltip:`Images`,children:[D,O]})})}),e[33]=E,e[34]=k);let ee;e[35]===n?ee=e[36]:(ee=n.startsWith(`/ec2/describe-key-pairs`),e[35]=n,e[36]=ee);let te,ne;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,z.jsx)(je,{className:`size-4`}),ne=(0,z.jsx)(`span`,{children:`Key Pairs`}),e[37]=te,e[38]=ne):(te=e[37],ne=e[38]);let re;e[39]===ee?re=e[40]:(re=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-key-pairs`,children:(0,z.jsxs)(G,{isActive:ee,tooltip:`Key Pairs`,children:[te,ne]})})}),e[39]=ee,e[40]=re);let ie;e[41]===n?ie=e[42]:(ie=n.startsWith(`/ec2/describe-addresses`)||n.startsWith(`/ec2/allocate-address`),e[41]=n,e[42]=ie);let ae,oe;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,z.jsx)(la,{className:`size-4`}),oe=(0,z.jsx)(`span`,{children:`Elastic IPs`}),e[43]=ae,e[44]=oe):(ae=e[43],oe=e[44]);let se;e[45]===ie?se=e[46]:(se=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-addresses`,children:(0,z.jsxs)(G,{isActive:ie,tooltip:`Elastic IPs`,children:[ae,oe]})})}),e[45]=ie,e[46]=se);let ce;e[47]===n?ce=e[48]:(ce=n.startsWith(`/ec2/describe-volumes`)||n.startsWith(`/ec2/create-volume`)||n.startsWith(`/ec2/modify-volume`),e[47]=n,e[48]=ce);let le,ue;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,z.jsx)(Pe,{className:`size-4`}),ue=(0,z.jsx)(`span`,{children:`Volumes`}),e[49]=le,e[50]=ue):(le=e[49],ue=e[50]);let de;e[51]===ce?de=e[52]:(de=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-volumes`,children:(0,z.jsxs)(G,{isActive:ce,tooltip:`Volumes`,children:[le,ue]})})}),e[51]=ce,e[52]=de);let fe;e[53]===n?fe=e[54]:(fe=n.startsWith(`/ec2/describe-snapshots`)||n.startsWith(`/ec2/create-snapshot`),e[53]=n,e[54]=fe);let pe,me;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,z.jsx)(Ae,{className:`size-4`}),me=(0,z.jsx)(`span`,{children:`Snapshots`}),e[55]=pe,e[56]=me):(pe=e[55],me=e[56]);let he;e[57]===fe?he=e[58]:(he=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-snapshots`,children:(0,z.jsxs)(G,{isActive:fe,tooltip:`Snapshots`,children:[pe,me]})})}),e[57]=fe,e[58]=he);let _e;e[59]===n?_e=e[60]:(_e=n.startsWith(`/ec2/describe-placement-groups`)||n.startsWith(`/ec2/create-placement-group`),e[59]=n,e[60]=_e);let ve,j;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,z.jsx)(na,{className:`size-4`}),j=(0,z.jsx)(`span`,{children:`Placement Groups`}),e[61]=ve,e[62]=j):(ve=e[61],j=e[62]);let M;e[63]===_e?M=e[64]:(M=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-placement-groups`,children:(0,z.jsxs)(G,{isActive:_e,tooltip:`Placement Groups`,children:[ve,j]})})}),e[63]=_e,e[64]=M);let ye;e[65]===n?ye=e[66]:(ye=n.startsWith(`/ec2/describe-load-balancers`)||n.startsWith(`/ec2/create-load-balancer`),e[65]=n,e[66]=ye);let be,xe;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,z.jsx)(Le,{className:`size-4`}),xe=(0,z.jsx)(`span`,{children:`Load Balancers`}),e[67]=be,e[68]=xe):(be=e[67],xe=e[68]);let Se;e[69]===ye?Se=e[70]:(Se=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-load-balancers`,children:(0,z.jsxs)(G,{isActive:ye,tooltip:`Load Balancers`,children:[be,xe]})})}),e[69]=ye,e[70]=Se);let Ce;e[71]===n?Ce=e[72]:(Ce=n.startsWith(`/ec2/describe-target-groups`)||n.startsWith(`/ec2/create-target-group`),e[71]=n,e[72]=Ce);let N,we;e[73]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,z.jsx)(Wi,{className:`size-4`}),we=(0,z.jsx)(`span`,{children:`Target Groups`}),e[73]=N,e[74]=we):(N=e[73],we=e[74]);let P;e[75]===Ce?P=e[76]:(P=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-target-groups`,children:(0,z.jsxs)(G,{isActive:Ce,tooltip:`Target Groups`,children:[N,we]})})}),e[75]=Ce,e[76]=P);let Ee;e[77]!==x||e[78]!==T||e[79]!==k||e[80]!==re||e[81]!==se||e[82]!==de||e[83]!==he||e[84]!==M||e[85]!==Se||e[86]!==P?(Ee=(0,z.jsxs)(fs,{children:[_,(0,z.jsxs)(ms,{children:[x,T,k,re,se,de,he,M,Se,P]})]}),e[77]=x,e[78]=T,e[79]=k,e[80]=re,e[81]=se,e[82]=de,e[83]=he,e[84]=M,e[85]=Se,e[86]=P,e[87]=Ee):Ee=e[87];let De;e[88]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,z.jsx)(ps,{children:`Networking`}),e[88]=De):De=e[88];let Oe;e[89]===n?Oe=e[90]:(Oe=n.startsWith(`/ec2/describe-vpcs`)||n.startsWith(`/ec2/create-vpc`),e[89]=n,e[90]=Oe);let F,ze;e[91]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,z.jsx)(Be,{className:`size-4`}),ze=(0,z.jsx)(`span`,{children:`VPCs`}),e[91]=F,e[92]=ze):(F=e[91],ze=e[92]);let He;e[93]===Oe?He=e[94]:(He=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-vpcs`,children:(0,z.jsxs)(G,{isActive:Oe,tooltip:`VPCs`,children:[F,ze]})})}),e[93]=Oe,e[94]=He);let Ue;e[95]===n?Ue=e[96]:(Ue=n.startsWith(`/ec2/describe-subnets`)||n.startsWith(`/ec2/create-subnet`),e[95]=n,e[96]=Ue);let We,Ge;e[97]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,z.jsx)(V,{className:`size-4`}),Ge=(0,z.jsx)(`span`,{children:`Subnets`}),e[97]=We,e[98]=Ge):(We=e[97],Ge=e[98]);let Ke;e[99]===Ue?Ke=e[100]:(Ke=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-subnets`,children:(0,z.jsxs)(G,{isActive:Ue,tooltip:`Subnets`,children:[We,Ge]})})}),e[99]=Ue,e[100]=Ke);let qe;e[101]===n?qe=e[102]:(qe=n.startsWith(`/ec2/describe-security-groups`)||n.startsWith(`/ec2/create-security-group`),e[101]=n,e[102]=qe);let Je,Ye;e[103]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,z.jsx)(xa,{className:`size-4`}),Ye=(0,z.jsx)(`span`,{children:`Security Groups`}),e[103]=Je,e[104]=Ye):(Je=e[103],Ye=e[104]);let Xe;e[105]===qe?Xe=e[106]:(Xe=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-security-groups`,children:(0,z.jsxs)(G,{isActive:qe,tooltip:`Security Groups`,children:[Je,Ye]})})}),e[105]=qe,e[106]=Xe);let Ze;e[107]===n?Ze=e[108]:(Ze=n.startsWith(`/ec2/describe-route-tables`)||n.startsWith(`/ec2/create-route-table`),e[107]=n,e[108]=Ze);let Qe,$e;e[109]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,z.jsx)(ya,{className:`size-4`}),$e=(0,z.jsx)(`span`,{children:`Route Tables`}),e[109]=Qe,e[110]=$e):(Qe=e[109],$e=e[110]);let et;e[111]===Ze?et=e[112]:(et=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-route-tables`,children:(0,z.jsxs)(G,{isActive:Ze,tooltip:`Route Tables`,children:[Qe,$e]})})}),e[111]=Ze,e[112]=et);let tt;e[113]===n?tt=e[114]:(tt=n.startsWith(`/ec2/describe-internet-gateways`),e[113]=n,e[114]=tt);let nt,rt;e[115]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,z.jsx)(Ie,{className:`size-4`}),rt=(0,z.jsx)(`span`,{children:`Internet Gateways`}),e[115]=nt,e[116]=rt):(nt=e[115],rt=e[116]);let it;e[117]===tt?it=e[118]:(it=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-internet-gateways`,children:(0,z.jsxs)(G,{isActive:tt,tooltip:`Internet Gateways`,children:[nt,rt]})})}),e[117]=tt,e[118]=it);let at;e[119]===n?at=e[120]:(at=n.startsWith(`/ec2/describe-nat-gateways`)||n.startsWith(`/ec2/create-nat-gateway`),e[119]=n,e[120]=at);let ot,st;e[121]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,z.jsx)(Me,{className:`size-4`}),st=(0,z.jsx)(`span`,{children:`NAT Gateways`}),e[121]=ot,e[122]=st):(ot=e[121],st=e[122]);let ct;e[123]===at?ct=e[124]:(ct=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ec2/describe-nat-gateways`,children:(0,z.jsxs)(G,{isActive:at,tooltip:`NAT Gateways`,children:[ot,st]})})}),e[123]=at,e[124]=ct);let lt;e[125]!==He||e[126]!==Ke||e[127]!==Xe||e[128]!==et||e[129]!==it||e[130]!==ct?(lt=(0,z.jsxs)(fs,{children:[De,(0,z.jsxs)(ms,{children:[He,Ke,Xe,et,it,ct]})]}),e[125]=He,e[126]=Ke,e[127]=Xe,e[128]=et,e[129]=it,e[130]=ct,e[131]=lt):lt=e[131];let ut;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,z.jsx)(ps,{children:`Containers`}),e[132]=ut):ut=e[132];let dt;e[133]===n?dt=e[134]:(dt=n.startsWith(`/eks/list-clusters`)||n.startsWith(`/eks/create-cluster`),e[133]=n,e[134]=dt);let ft,pt;e[135]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,z.jsx)(Ii,{className:`size-4`}),pt=(0,z.jsx)(`span`,{children:`EKS`}),e[135]=ft,e[136]=pt):(ft=e[135],pt=e[136]);let mt;e[137]===dt?mt=e[138]:(mt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/eks/list-clusters`,children:(0,z.jsxs)(G,{isActive:dt,tooltip:`EKS clusters`,children:[ft,pt]})})}),e[137]=dt,e[138]=mt);let ht;e[139]===n?ht=e[140]:(ht=n.startsWith(`/ecr/list-repositories`),e[139]=n,e[140]=ht);let gt,_t;e[141]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,z.jsx)(ha,{className:`size-4`}),_t=(0,z.jsx)(`span`,{children:`ECR`}),e[141]=gt,e[142]=_t):(gt=e[141],_t=e[142]);let vt;e[143]===ht?vt=e[144]:(vt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ecr/list-repositories`,children:(0,z.jsxs)(G,{isActive:ht,tooltip:`ECR repositories`,children:[gt,_t]})})}),e[143]=ht,e[144]=vt);let yt;e[145]===n?yt=e[146]:(yt=n.startsWith(`/ecs/`),e[145]=n,e[146]=yt);let bt,xt;e[147]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,z.jsx)(Hi,{className:`size-4`}),xt=(0,z.jsx)(`span`,{children:`ECS`}),e[147]=bt,e[148]=xt):(bt=e[147],xt=e[148]);let St;e[149]===yt?St=e[150]:(St=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/ecs/list-clusters`,children:(0,z.jsxs)(G,{isActive:yt,tooltip:`ECS clusters`,children:[bt,xt]})})}),e[149]=yt,e[150]=St);let Ct;e[151]!==mt||e[152]!==vt||e[153]!==St?(Ct=(0,z.jsxs)(fs,{children:[ut,(0,z.jsxs)(ms,{children:[mt,vt,St]})]}),e[151]=mt,e[152]=vt,e[153]=St,e[154]=Ct):Ct=e[154];let wt;e[155]===Symbol.for(`react.memo_cache_sentinel`)?(wt=(0,z.jsx)(ps,{children:`RDS`}),e[155]=wt):wt=e[155];let Tt;e[156]===n?Tt=e[157]:(Tt=n.startsWith(`/rds/describe-db-instances`)||n.startsWith(`/rds/create-db-instance`),e[156]=n,e[157]=Tt);let Et,Dt;e[158]===Symbol.for(`react.memo_cache_sentinel`)?(Et=(0,z.jsx)(Ki,{className:`size-4`}),Dt=(0,z.jsx)(`span`,{children:`Databases`}),e[158]=Et,e[159]=Dt):(Et=e[158],Dt=e[159]);let Ot;e[160]===Tt?Ot=e[161]:(Ot=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-instances`,children:(0,z.jsxs)(G,{isActive:Tt,tooltip:`Databases`,children:[Et,Dt]})})}),e[160]=Tt,e[161]=Ot);let kt;e[162]===n?kt=e[163]:(kt=n.startsWith(`/rds/describe-db-snapshots`)||n.startsWith(`/rds/restore-db-instance-from-db-snapshot`),e[162]=n,e[163]=kt);let At,jt;e[164]===Symbol.for(`react.memo_cache_sentinel`)?(At=(0,z.jsx)(Ae,{className:`size-4`}),jt=(0,z.jsx)(`span`,{children:`Snapshots`}),e[164]=At,e[165]=jt):(At=e[164],jt=e[165]);let Mt;e[166]===kt?Mt=e[167]:(Mt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-snapshots`,children:(0,z.jsxs)(G,{isActive:kt,tooltip:`DB Snapshots`,children:[At,jt]})})}),e[166]=kt,e[167]=Mt);let Nt;e[168]===n?Nt=e[169]:(Nt=n.startsWith(`/rds/describe-db-subnet-groups`)||n.startsWith(`/rds/create-db-subnet-group`),e[168]=n,e[169]=Nt);let Pt,Ft;e[170]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,z.jsx)(V,{className:`size-4`}),Ft=(0,z.jsx)(`span`,{children:`Subnet Groups`}),e[170]=Pt,e[171]=Ft):(Pt=e[170],Ft=e[171]);let It;e[172]===Nt?It=e[173]:(It=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-subnet-groups`,children:(0,z.jsxs)(G,{isActive:Nt,tooltip:`DB Subnet Groups`,children:[Pt,Ft]})})}),e[172]=Nt,e[173]=It);let Lt;e[174]===n?Lt=e[175]:(Lt=n.startsWith(`/rds/describe-db-parameter-groups`)||n.startsWith(`/rds/create-db-parameter-group`),e[174]=n,e[175]=Lt);let Rt,zt;e[176]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=(0,z.jsx)(Ve,{className:`size-4`}),zt=(0,z.jsx)(`span`,{children:`Parameter Groups`}),e[176]=Rt,e[177]=zt):(Rt=e[176],zt=e[177]);let Bt;e[178]===Lt?Bt=e[179]:(Bt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/rds/describe-db-parameter-groups`,children:(0,z.jsxs)(G,{isActive:Lt,tooltip:`DB Parameter Groups`,children:[Rt,zt]})})}),e[178]=Lt,e[179]=Bt);let Vt;e[180]!==Mt||e[181]!==It||e[182]!==Bt||e[183]!==Ot?(Vt=(0,z.jsxs)(fs,{children:[wt,(0,z.jsxs)(ms,{children:[Ot,Mt,It,Bt]})]}),e[180]=Mt,e[181]=It,e[182]=Bt,e[183]=Ot,e[184]=Vt):Vt=e[184];let Ht;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(Ht=(0,z.jsx)(ps,{children:`IAM`}),e[185]=Ht):Ht=e[185];let Ut;e[186]===n?Ut=e[187]:(Ut=n.startsWith(`/iam/list-users`)||n.startsWith(`/iam/create-user`),e[186]=n,e[187]=Ut);let Wt,Gt;e[188]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=(0,z.jsx)(ka,{className:`size-4`}),Gt=(0,z.jsx)(`span`,{children:`Users`}),e[188]=Wt,e[189]=Gt):(Wt=e[188],Gt=e[189]);let Kt;e[190]===Ut?Kt=e[191]:(Kt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-users`,children:(0,z.jsxs)(G,{isActive:Ut,tooltip:`Users`,children:[Wt,Gt]})})}),e[190]=Ut,e[191]=Kt);let qt;e[192]===n?qt=e[193]:(qt=n.startsWith(`/iam/list-groups`)||n.startsWith(`/iam/create-group`),e[192]=n,e[193]=qt);let I,Jt;e[194]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,z.jsx)(Da,{className:`size-4`}),Jt=(0,z.jsx)(`span`,{children:`Groups`}),e[194]=I,e[195]=Jt):(I=e[194],Jt=e[195]);let Yt;e[196]===qt?Yt=e[197]:(Yt=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-groups`,children:(0,z.jsxs)(G,{isActive:qt,tooltip:`Groups`,children:[I,Jt]})})}),e[196]=qt,e[197]=Yt);let Xt;e[198]===n?Xt=e[199]:(Xt=n.startsWith(`/iam/list-policies`)||n.startsWith(`/iam/create-policy`),e[198]=n,e[199]=Xt);let Zt,Qt;e[200]===Symbol.for(`react.memo_cache_sentinel`)?(Zt=(0,z.jsx)(Ne,{className:`size-4`}),Qt=(0,z.jsx)(`span`,{children:`Policies`}),e[200]=Zt,e[201]=Qt):(Zt=e[200],Qt=e[201]);let $t;e[202]===Xt?$t=e[203]:($t=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-policies`,children:(0,z.jsxs)(G,{isActive:Xt,tooltip:`Policies`,children:[Zt,Qt]})})}),e[202]=Xt,e[203]=$t);let en;e[204]===n?en=e[205]:(en=n.startsWith(`/iam/list-roles`)||n.startsWith(`/iam/create-role`),e[204]=n,e[205]=en);let tn,nn;e[206]===Symbol.for(`react.memo_cache_sentinel`)?(tn=(0,z.jsx)(Ta,{className:`size-4`}),nn=(0,z.jsx)(`span`,{children:`Roles`}),e[206]=tn,e[207]=nn):(tn=e[206],nn=e[207]);let rn;e[208]===en?rn=e[209]:(rn=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-roles`,children:(0,z.jsxs)(G,{isActive:en,tooltip:`Roles`,children:[tn,nn]})})}),e[208]=en,e[209]=rn);let L;e[210]===n?L=e[211]:(L=n.startsWith(`/iam/list-instance-profiles`)||n.startsWith(`/iam/create-instance-profile`),e[210]=n,e[211]=L);let on,sn;e[212]===Symbol.for(`react.memo_cache_sentinel`)?(on=(0,z.jsx)(Qi,{className:`size-4`}),sn=(0,z.jsx)(`span`,{children:`Instance Profiles`}),e[212]=on,e[213]=sn):(on=e[212],sn=e[213]);let cn;e[214]===L?cn=e[215]:(cn=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/iam/list-instance-profiles`,children:(0,z.jsxs)(G,{isActive:L,tooltip:`Instance Profiles`,children:[on,sn]})})}),e[214]=L,e[215]=cn);let ln;e[216]!==Kt||e[217]!==Yt||e[218]!==$t||e[219]!==rn||e[220]!==cn?(ln=(0,z.jsxs)(fs,{children:[Ht,(0,z.jsxs)(ms,{children:[Kt,Yt,$t,rn,cn]})]}),e[216]=Kt,e[217]=Yt,e[218]=$t,e[219]=rn,e[220]=cn,e[221]=ln):ln=e[221];let un;e[222]===Symbol.for(`react.memo_cache_sentinel`)?(un=(0,z.jsx)(ps,{children:`S3`}),e[222]=un):un=e[222];let dn;e[223]===n?dn=e[224]:(dn=n.startsWith(`/s3/ls`),e[223]=n,e[224]=dn);let fn,pn;e[225]===Symbol.for(`react.memo_cache_sentinel`)?(fn=(0,z.jsx)(Fe,{className:`size-4`}),pn=(0,z.jsx)(`span`,{children:`Buckets`}),e[225]=fn,e[226]=pn):(fn=e[225],pn=e[226]);let mn;e[227]===dn?mn=e[228]:(mn=(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/s3/ls`,children:(0,z.jsxs)(G,{isActive:dn,tooltip:`Buckets`,children:[fn,pn]})})}),e[227]=dn,e[228]=mn);let hn;e[229]!==o||e[230]!==n?(hn=o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/s3/service-metrics`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/s3/service-metrics`),tooltip:`Service Metrics`,children:[(0,z.jsx)(Mi,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Service Metrics`})]})})}),e[229]=o,e[230]=n,e[231]=hn):hn=e[231];let gn;e[232]!==mn||e[233]!==hn?(gn=(0,z.jsxs)(fs,{children:[un,(0,z.jsxs)(ms,{children:[mn,hn]})]}),e[232]=mn,e[233]=hn,e[234]=gn):gn=e[234];let _n;e[235]!==o||e[236]!==n?(_n=ke()&&(0,z.jsxs)(fs,{children:[(0,z.jsx)(ps,{children:`Ochre`}),(0,z.jsxs)(ms,{children:[(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-knowledge-bases`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-knowledge-bases`),tooltip:`Knowledge Bases`,children:[(0,z.jsx)(Ri,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Knowledge Bases`})]})})}),(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-guardrails`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-guardrails`),tooltip:`Guardrails`,children:[(0,z.jsx)(Ne,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Guardrails`})]})})}),(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/playground`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/playground`),tooltip:`Playground`,children:[(0,z.jsx)(da,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Playground`})]})})}),o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-model-catalog`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-model-catalog`),tooltip:`Model Catalog`,children:[(0,z.jsx)(aa,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Model Catalog`})]})})}),o&&(0,z.jsx)(W,{children:(0,z.jsx)(A,{to:`/bedrock/list-model-access`,children:(0,z.jsxs)(G,{isActive:n.startsWith(`/bedrock/list-model-access`),tooltip:`Model Access`,children:[(0,z.jsx)(ea,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Model Access`})]})})})]})]}),e[235]=o,e[236]=n,e[237]=_n):_n=e[237];let vn;e[238]===o?vn=e[239]:(vn=o&&(0,z.jsxs)(fs,{children:[(0,z.jsx)(ps,{children:`Documentation`}),(0,z.jsx)(ms,{children:(0,z.jsx)(W,{children:(0,z.jsx)(`a`,{href:`https://docs.mulgadc.com`,target:`_blank`,rel:`noopener noreferrer`,children:(0,z.jsxs)(G,{tooltip:`Documentation`,children:[(0,z.jsx)(Pi,{className:`size-4`}),(0,z.jsx)(`span`,{children:`Docs`})]})})})})]}),e[238]=o,e[239]=vn);let yn;e[240]!==Vt||e[241]!==ln||e[242]!==gn||e[243]!==_n||e[244]!==vn||e[245]!==Ee||e[246]!==lt||e[247]!==g||e[248]!==Ct?(yn=(0,z.jsxs)(ds,{children:[g,Ee,lt,Ct,Vt,ln,gn,_n,vn]}),e[240]=Vt,e[241]=ln,e[242]=gn,e[243]=_n,e[244]=vn,e[245]=Ee,e[246]=lt,e[247]=g,e[248]=Ct,e[249]=yn):yn=e[249];let bn;e[250]===Symbol.for(`react.memo_cache_sentinel`)?(bn=(0,z.jsx)(us,{className:`mx-0 w-full`}),e[250]=bn):bn=e[250];let xn,Sn;e[251]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,z.jsx)(sa,{className:`size-4`}),Sn=(0,z.jsx)(`span`,{children:`Sign out`}),e[251]=xn,e[252]=Sn):(xn=e[251],Sn=e[252]);let Cn;e[253]===c?Cn=e[254]:(Cn=(0,z.jsxs)(ls,{children:[bn,(0,z.jsx)(ms,{children:(0,z.jsx)(W,{children:(0,z.jsxs)(G,{onClick:c,tooltip:`Sign out`,children:[xn,Sn]})})})]}),e[253]=c,e[254]=Cn);let wn;e[255]===Symbol.for(`react.memo_cache_sentinel`)?(wn=(0,z.jsx)(os,{}),e[255]=wn):wn=e[255];let Tn;return e[256]!==yn||e[257]!==Cn?(Tn=(0,z.jsxs)(is,{collapsible:`icon`,children:[l,yn,Cn,wn]}),e[256]=yn,e[257]=Cn,e[258]=Tn):Tn=e[258],Tn}function Ds(e){return e.pathname}function Os(e){let t=(0,B.c)(18),{error:n,reset:r}=e,i=ne(),o=a(),s;t[0]!==o||t[1]!==r||t[2]!==i?(s=function(){o.invalidateQueries(),r(),i.invalidate()},t[0]=o,t[1]=r,t[2]=i,t[3]=s):s=t[3];let c=s,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(Es,{}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(ws,{}),t[5]=u):u=t[5];let d,f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,z.jsx)(`div`,{className:`flex justify-center`,children:(0,z.jsx)(Bi,{className:`size-12 text-destructive`})}),f=(0,z.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Something went wrong`}),t[6]=d,t[7]=f):(d=t[6],f=t[7]);let p=(n instanceof Error?n.message:String(n))||`An unexpected error occurred`,m;t[8]===p?m=t[9]:(m=(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:p}),t[8]=p,t[9]=m);let h;t[10]===c?h=t[11]:(h=(0,z.jsx)(Xe,{onClick:c,variant:`default`,children:`Try Again`}),t[10]=c,t[11]=h);let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,z.jsx)(A,{to:`/`,children:(0,z.jsx)(Xe,{variant:`outline`,children:`Go Home`})}),t[12]=g):g=t[12];let _;t[13]===h?_=t[14]:(_=(0,z.jsxs)(`div`,{className:`flex justify-center gap-2`,children:[h,g]}),t[13]=h,t[14]=_);let v;return t[15]!==_||t[16]!==m?(v=(0,z.jsxs)(z.Fragment,{children:[l,(0,z.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[u,(0,z.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 pt-0`,children:(0,z.jsxs)(`div`,{className:`max-w-md space-y-4 text-center`,children:[d,f,m,_]})})]})]}),t[15]=_,t[16]=m,t[17]=v):v=t[17],v}var ks=T()({head:()=>({meta:[{title:`Mulga`}]}),component:()=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Si,{}),(0,z.jsx)(Es,{}),(0,z.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[(0,z.jsx)(ws,{}),(0,z.jsx)(`div`,{className:`flex flex-1 flex-col p-8`,children:(0,z.jsx)(de,{})})]})]}),errorComponent:Os,notFoundComponent:Ts}),As=w(`/_auth`)({beforeLoad:()=>{if(!De())throw ee({to:`/login`})},component:E(()=>L(()=>import(`./route-CubfShDh.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),js=w(`/_auth/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...yn,staleTime:`static`}),e.queryClient.query({...un,staleTime:`static`}),e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...Sn,staleTime:`static`}),e.queryClient.query({...Un,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`}),e.queryClient.query({...hn,staleTime:`static`}),e.queryClient.query({...bn,staleTime:`static`}),e.queryClient.query({..._n,staleTime:`static`})])},head:()=>({meta:[{title:`Dashboard | Mulga`}]}),component:E(()=>L(()=>import(`./_auth-X7QMSNE1.js`),__vite__mapDeps([6,1,7,8,9,10,3,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,5,37])),`component`)}),Ms=w(`/_auth/bedrock`)({beforeLoad:()=>{ke()||re({throw:!0})},component:E(()=>L(()=>import(`./route-FwtkMxrS.js`),__vite__mapDeps([38,1,2,3,4,5])),`component`)});async function Ns({context:e}){let t=await e.queryClient.query(Wn);if(!Gn(t.Account))throw ee({to:`/`})}var Ps=w(`/_auth/nodes`)({beforeLoad:Ns,head:()=>({meta:[{title:`Nodes | Mulga`}]}),component:E(()=>L(()=>import(`./nodes-CDZdINDB.js`),__vite__mapDeps([39,1,7,8,9,10,3,11,13,12,14,22,18,23,26,27,28,29,30])),`component`)}),Fs=w(`/_auth/s3/service-metrics`)({beforeLoad:Ns,head:()=>({meta:[{title:`Service Metrics | S3 | Mulga`}]}),component:E(()=>L(()=>import(`./service-metrics-BVtgmWJ_.js`),__vite__mapDeps([40,1,7,8,9,22,18,11,23,26,27,28,29,30])),`component`)}),Is=w(`/_auth/ec2/(elastic-ips)/allocate-address`)({head:()=>({meta:[{title:`Allocate Elastic IP | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./allocate-address-DiTLfKWR.js`),__vite__mapDeps([41,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59,60])),`component`)}),Ls=w(`/_auth/ec2/(internet-gateways)/create-internet-gateway`)({head:()=>({meta:[{title:`Create Internet Gateway | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-internet-gateway-CSQ2FjBW.js`),__vite__mapDeps([61,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59,60])),`component`)}),Rs=w(`/_auth/ec2/(key)/create-key-pair`)({head:()=>({meta:[{title:`Create Key Pair | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-key-pair-dW4BQsgU.js`),__vite__mapDeps([62,1,42,3,43,10,12,45,63,34,28,11,32,35,13,36,5,49,64,65,66,67,68,44,46,47,69,48,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,31,33,59,60])),`component`)}),zs=w(`/_auth/ec2/(key)/import-key-pair`)({head:()=>({meta:[{title:`Import Key Pair | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./import-key-pair-0ELY5K70.js`),__vite__mapDeps([70,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,71,59,60])),`component`)}),Bs=w(`/_auth/ec2/(launch-templates)/create-launch-template`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...xn,staleTime:`static`}),e.queryClient.query({...gn,staleTime:`static`}),e.queryClient.query({...Sn,staleTime:`static`}),e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Launch Template | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-launch-template-DulI-7mK.js`),__vite__mapDeps([72,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59,60,73,74,8,63,34,36,5,64,65,66,67,71,75])),`component`)}),Vs=w(`/_auth/ec2/(load-balancers)/create-load-balancer`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`}),e.queryClient.query({...Mn,staleTime:`static`}),e.queryClient.query({...on,staleTime:`static`}),e.queryClient.query({...jn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Load Balancer | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-load-balancer-W6nchY7J.js`),__vite__mapDeps([76,1,74,8,9,42,3,11,43,10,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,77,18,19,20,78,51,52,54,55,57,58,71,31,33,60,17,79,80,81,26,56,82,83,84,85,75])),`component`)}),Hs=w(`/_auth/ec2/(nat-gateways)/create-nat-gateway`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...bn,staleTime:`static`})])},head:()=>({meta:[{title:`Create NAT Gateway | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-nat-gateway-BizJZv4a.js`),__vite__mapDeps([86,1,74,8,9,10,3,42,11,43,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59,60])),`component`)}),Us=w(`/_auth/ec2/(placement-groups)/create-placement-group`)({head:()=>({meta:[{title:`Create Placement Group | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-placement-group-DwCGRPfh.js`),__vite__mapDeps([87,1,42,3,43,10,12,63,34,28,11,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,59,60])),`component`)}),Ws=w(`/_auth/ec2/(route-tables)/create-route-table`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`Create Route Table | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-route-table-CvCL2dgp.js`),__vite__mapDeps([88,1,74,8,9,42,3,11,43,10,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59,60])),`component`)}),Gs=w(`/_auth/ec2/(security-groups)/create-security-group`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`Create Security Group | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-security-group-DDFS2csw.js`),__vite__mapDeps([89,1,74,8,9,42,3,11,43,10,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59,60])),`component`)}),Ks=w(`/_auth/ec2/(subnet)/create-subnet`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...Cn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Subnet | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-subnet-CwCaYy-j.js`),__vite__mapDeps([90,1,74,8,9,42,3,11,43,10,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59,60])),`component`)}),qs=w(`/_auth/ec2/(target-groups)/create-target-group`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`Create Target Group | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-target-group-6Q20aaDf.js`),__vite__mapDeps([91,1,74,8,9,42,3,43,10,12,44,11,45,13,46,32,28,47,17,18,19,20,79,51,52,80,26,54,55,56,60,85,63,34,35,36,5,49,64,65,66,67,48,57,58,82,83,84,75])),`component`)}),Js=w(`/_auth/ec2/(volumes)/create-volume`)({loader:async({context:e})=>{await e.queryClient.query({...Cn,staleTime:`static`})},head:()=>({meta:[{title:`Create Volume | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-volume-DWaiGJ7o.js`),__vite__mapDeps([92,1,74,8,9,42,3,43,10,12,63,34,28,11,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,17,18,19,20,50,51,52,53,26,54,55,56,57,58,59,60])),`component`)}),Ys=w(`/_auth/ec2/(vpc)/create-vpc`)({head:()=>({meta:[{title:`Create VPC | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./create-vpc-DXNh9rhY.js`),__vite__mapDeps([93,1,42,3,43,10,12,13,14,63,34,28,11,32,35,45,36,5,49,64,65,66,67,44,46,47,48,50,9,51,52,19,20,17,18,53,26,54,55,56,57,58,82,83,84,59,60])),`component`)}),Xs=w(`/_auth/ecs/(clusters)/task-definitions`)({loader:async({context:e})=>{await e.queryClient.query({...On,staleTime:`static`})},head:()=>({meta:[{title:`Task Definitions | ECS | Mulga`}]}),component:E(()=>L(()=>import(`./task-definitions-CQw_GMot.js`),__vite__mapDeps([94,1,74,8,9,10,3,32,28,11,95,18,19,20,96,51,52,23,26,55,97,31,33,34,35,36,5,98])),`component`)}),Zs=w(`/_auth/eks/(clusters)/create-cluster`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...Ln,staleTime:`static`}),e.queryClient.query({...xn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Cluster | EKS | Mulga`}]}),component:E(()=>L(()=>import(`./create-cluster-CApKB1rK.js`),__vite__mapDeps([99,1,9,74,8,42,3,11,43,10,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,48,17,18,19,20,100,51,52,101,102,53,103,104,105,26,54,55,56,57,58,31,33,106,107,46,108,69,47,109])),`component`)}),Qs=w(`/_auth/iam/(groups)/create-group`)({head:()=>({meta:[{title:`Create Group | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-group-pYEVC2_3.js`),__vite__mapDeps([110,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,111,102])),`component`)}),$s=w(`/_auth/iam/(instance-profiles)/create-instance-profile`)({head:()=>({meta:[{title:`Create Instance Profile | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-instance-profile-DxE9Kc_7.js`),__vite__mapDeps([112,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,111,102])),`component`)}),ec=w(`/_auth/iam/(policies)/create-policy`)({head:()=>({meta:[{title:`Create Policy | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-policy-DkdYgt_C.js`),__vite__mapDeps([113,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,114,102,71,111])),`component`)}),tc=w(`/_auth/iam/(roles)/create-role`)({head:()=>({meta:[{title:`Create Role | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-role-BX7vmYsz.js`),__vite__mapDeps([115,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,114,102,71,111])),`component`)}),nc=w(`/_auth/iam/(users)/create-user`)({head:()=>({meta:[{title:`Create User | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./create-user-DOwRczkA.js`),__vite__mapDeps([116,1,42,3,43,10,12,44,11,45,13,46,32,28,47,48,49,35,103,9,51,52,19,20,104,26,54,55,56,57,58,111,102])),`component`)}),rc=w(`/_auth/rds/(db-instances)/create-db-instance`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...Vn,staleTime:`static`}),e.queryClient.query({...Bn,staleTime:`static`}),e.queryClient.query({...zn,staleTime:`static`}),e.queryClient.query({...wn,staleTime:`static`}),e.queryClient.query({...fn,staleTime:`static`}),e.queryClient.query({...xn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Database | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./create-db-instance-D7UFjBf8.js`),__vite__mapDeps([117,1,9,7,8,74,42,3,43,10,12,63,34,28,11,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,17,18,19,20,118,119,51,52,120,26,54,55,56,57,58,82,83,84,106,107,108,69,121,122])),`component`)}),ic=w(`/_auth/rds/(parameter-groups)/create-db-parameter-group`)({loader:async({context:e})=>{await e.queryClient.query({...Vn,staleTime:`static`})},head:()=>({meta:[{title:`Create Parameter Group | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./create-db-parameter-group-Bh4GnsZG.js`),__vite__mapDeps([123,1,74,8,9,42,3,43,10,12,63,34,28,11,32,35,45,13,36,5,49,64,65,66,67,44,46,47,48,118,19,20,119,51,52,120,18,26,54,55,56,57,58,82,83,84])),`component`)}),ac=w(`/_auth/rds/(subnet-groups)/create-db-subnet-group`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...pn,staleTime:`static`}),e.queryClient.query({...fn,staleTime:`static`})])},head:()=>({meta:[{title:`Create Subnet Group | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./create-db-subnet-group-CG8t0czE.js`),__vite__mapDeps([124,1,74,8,9,42,3,11,43,10,12,44,45,13,46,32,28,47,48,49,35,17,18,19,20,118,119,51,52,26,54,55,56,57,58,82,83,84])),`component`)}),oc=w(`/_auth/s3/(buckets)/create-bucket`)({head:()=>({meta:[{title:`Create Bucket | S3 | Mulga`}]}),component:E(()=>L(()=>import(`./create-bucket-CFZ3UDyF.js`),__vite__mapDeps([125,1,42,3,11,43,10,12,44,45,13,46,32,28,47,48,49,35,126,9,51,52,19,20,26,54,55,56,57,58])),`component`)}),sc=w(`/_auth/s3/ls/`)({loader:async({context:e})=>{await e.queryClient.query({...Un,staleTime:`static`})},head:()=>({meta:[{title:`Buckets | S3 | Mulga`}]}),component:E(()=>L(()=>import(`./ls-Ch0gLLl0.js`),__vite__mapDeps([127,1,74,8,9,10,3,11,32,28,21,18,19,20,26,128])),`component`)}),cc=w(`/_auth/s3/ls/$bucket`)({component:E(()=>L(()=>import(`./route-wY81OJOr.js`),__vite__mapDeps([129,1,2,3,4,5])),`component`)}),lc=w(`/_auth/bedrock/(catalog)/list-model-catalog/`)({beforeLoad:Ns,head:()=>({meta:[{title:`Model Catalog | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-model-catalog-A4jsVZ23.js`),__vite__mapDeps([130,1,7,8,9,11,22,18,23,26,27,28,29,30])),`component`)}),uc=w(`/_auth/bedrock/(guardrails)/list-guardrails/`)({loader:async({context:e})=>{await e.queryClient.query({...sn,staleTime:`static`})},head:()=>({meta:[{title:`Guardrails | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-guardrails-hPsuLUzv.js`),__vite__mapDeps([131,1,74,8,9,10,3,32,28,11,132,18,19,20,133,26,37,128])),`component`)}),dc=w(`/_auth/bedrock/(guardrails)/list-guardrails/create`)({head:()=>({meta:[{title:`Create Guardrail | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./create-Cux85l28.js`),__vite__mapDeps([134,1,135,9,51,52,11,19,20,133,136,42,3,43,10,12,63,34,28,32,35,45,13,36,5,49,64,65,66,67,83,84,48,26,54,55,56,57,58,82,71])),`component`)}),fc=w(`/_auth/bedrock/(knowledge-bases)/list-knowledge-bases/`)({loader:async({context:e})=>{await e.queryClient.query({...ln,staleTime:`static`})},head:()=>({meta:[{title:`Knowledge Bases | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-knowledge-bases-BXEkLOG4.js`),__vite__mapDeps([137,1,74,8,9,10,3,32,28,11,138,18,19,20,139,26,37,128])),`component`)}),pc=w(`/_auth/bedrock/(knowledge-bases)/list-knowledge-bases/create`)({loader:async({context:e})=>{await e.queryClient.query({...cn,staleTime:`static`})},head:()=>({meta:[{title:`Create Knowledge Base | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./create-B9l7cnNQ.js`),__vite__mapDeps([140,1,74,8,9,42,3,43,10,12,63,34,28,11,32,35,45,13,36,5,49,64,65,66,67,48,132,18,19,20,133,141,51,52,139,26,54,55,56,57,58,71])),`component`)}),mc=w(`/_auth/bedrock/(model-access)/list-model-access/`)({beforeLoad:Ns,head:()=>({meta:[{title:`Model Access | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./list-model-access-fq46KS1I.js`),__vite__mapDeps([142,1,9,51,52,7,8,63,34,28,11,32,35,12,45,13,36,5,49,64,65,66,67,48,22,18,23,26,27,29,30,57,58])),`component`)}),hc=w(`/_auth/bedrock/(playground)/playground/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...cn,staleTime:`static`}),e.queryClient.query({...sn,staleTime:`static`})])},head:()=>({meta:[{title:`Playground | Ochre | Mulga`}]}),component:E(()=>L(()=>import(`./playground-6qk0JzT_.js`),__vite__mapDeps([143,1,51,9,52,74,8,11,13,12,63,34,28,32,35,45,36,5,49,64,65,66,67,44,46,47,48,19,20,132,18,133,144,26,27,29,57,58,71])),`component`)}),gc=w(`/_auth/ec2/(elastic-ips)/describe-addresses/`)({loader:async({context:e})=>{await e.queryClient.query({...bn,staleTime:`static`})},head:()=>({meta:[{title:`Elastic IPs | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-addresses-DKzX98T-.js`),__vite__mapDeps([145,1,74,8,9,10,3,11,32,28,17,18,19,20,26,128])),`component`)}),_c=w(`/_auth/ec2/(images)/describe-images/`)({loader:async({context:e})=>{await e.queryClient.query({...xn,staleTime:`static`})},head:()=>({meta:[{title:`Images | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-images-uDOH87L-.js`),__vite__mapDeps([146,1,74,8,9,17,18,11,19,20,26,37,128,10,3,106])),`component`)}),vc=w(`/_auth/ec2/(instances)/describe-instances/`)({loader:async({context:e})=>{await e.queryClient.query({...yn,staleTime:`static`})},head:()=>({meta:[{title:`Instances | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-instances-Dy-wjx-1.js`),__vite__mapDeps([147,1,74,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),yc=w(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/`)({loader:async({context:e})=>{await e.queryClient.query({..._n,staleTime:`static`})},head:()=>({meta:[{title:`Internet Gateways | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-internet-gateways-D2fxK-t7.js`),__vite__mapDeps([148,1,74,8,9,10,3,11,32,28,17,18,19,20,26,128])),`component`)}),bc=w(`/_auth/ec2/(key)/describe-key-pairs/`)({loader:async({context:e})=>{await e.queryClient.query({...Sn,staleTime:`static`})},head:()=>({meta:[{title:`Key Pairs | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-key-pairs-uhUP3fNL.js`),__vite__mapDeps([149,1,74,8,9,10,3,32,28,11,17,18,19,20,26,128])),`component`)}),xc=w(`/_auth/ec2/(launch-templates)/describe-launch-templates/`)({loader:async({context:e})=>{await e.queryClient.query({...vn,staleTime:`static`})},head:()=>({meta:[{title:`Launch Templates | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-launch-templates-D2qJ15Ic.js`),__vite__mapDeps([150,1,74,8,9,10,3,32,28,11,17,18,19,20,26,27,29,128])),`component`)}),Sc=w(`/_auth/ec2/(load-balancers)/describe-load-balancers/`)({loader:async({context:e})=>{await e.queryClient.query({...An,staleTime:`static`})},head:()=>({meta:[{title:`Load Balancers | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-load-balancers-D8qLLQ9R.js`),__vite__mapDeps([151,1,74,8,9,10,3,42,11,32,28,81,18,19,20,80,26,37])),`component`)}),Cc=w(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/`)({loader:async({context:e})=>{await e.queryClient.query({...hn,staleTime:`static`})},head:()=>({meta:[{title:`NAT Gateways | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-nat-gateways-BPbTBJMq.js`),__vite__mapDeps([152,1,74,8,9,10,3,11,32,28,17,18,19,20,26,37,128])),`component`)}),wc=w(`/_auth/ec2/(placement-groups)/describe-placement-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Tn,staleTime:`static`})},head:()=>({meta:[{title:`Placement Groups | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-placement-groups-UnAMO3Vm.js`),__vite__mapDeps([153,1,74,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),Tc=w(`/_auth/ec2/(route-tables)/describe-route-tables/`)({loader:async({context:e})=>{await e.queryClient.query({...mn,staleTime:`static`})},head:()=>({meta:[{title:`Route Tables | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-route-tables-C5vM_rCX.js`),__vite__mapDeps([154,1,74,8,9,10,3,11,32,28,17,18,19,20,26,27,29,128])),`component`)}),Ec=w(`/_auth/ec2/(security-groups)/describe-security-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...wn,staleTime:`static`})},head:()=>({meta:[{title:`Security Groups | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-security-groups-CneDmHJo.js`),__vite__mapDeps([155,1,74,8,9,10,3,11,32,28,17,18,19,20,26,128])),`component`)}),Dc=w(`/_auth/ec2/(snapshots)/describe-snapshots/`)({loader:async({context:e})=>{await e.queryClient.query({...dn,staleTime:`static`})},head:()=>({meta:[{title:`Snapshots | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-snapshots-Dse70vYJ.js`),__vite__mapDeps([156,1,74,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),Oc=w(`/_auth/ec2/(subnet)/describe-subnets/`)({loader:async({context:e})=>{await e.queryClient.query({...pn,staleTime:`static`})},head:()=>({meta:[{title:`Subnets | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-subnets-CzhHYMcn.js`),__vite__mapDeps([157,1,74,8,9,10,3,11,32,28,17,18,19,20,26,37,128])),`component`)}),kc=w(`/_auth/ec2/(target-groups)/describe-target-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Mn,staleTime:`static`})},head:()=>({meta:[{title:`Target Groups | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-target-groups-BHJFiqsY.js`),__vite__mapDeps([158,1,7,8,9,74,10,3,42,32,28,11,81,18,19,20,80,26])),`component`)}),Ac=w(`/_auth/ec2/(volumes)/describe-volumes/`)({loader:async({context:e})=>{await e.queryClient.query({...un,staleTime:`static`})},head:()=>({meta:[{title:`Volumes | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-volumes-Boo4HMfw.js`),__vite__mapDeps([159,1,74,8,9,10,3,32,28,11,17,18,19,20,26,37,128])),`component`)}),jc=w(`/_auth/ec2/(vpc)/describe-vpcs/`)({loader:async({context:e})=>{await e.queryClient.query({...fn,staleTime:`static`})},head:()=>({meta:[{title:`VPCs | EC2 | Mulga`}]}),component:E(()=>L(()=>import(`./describe-vpcs-g_JygVRv.js`),__vite__mapDeps([160,1,74,8,9,10,3,11,32,28,17,18,19,20,26,37,128])),`component`)}),Mc=w(`/_auth/ecr/(repositories)/list-repositories/`)({loader:async({context:e})=>{await e.queryClient.query({...En,staleTime:`static`})},head:()=>({meta:[{title:`Repositories | ECR | Mulga`}]}),component:E(()=>L(()=>import(`./list-repositories-Civj5U6N.js`),__vite__mapDeps([161,1,74,8,9,10,3,42,11,32,28,48,49,35,162,18,19,20,163,51,52,26,57,58,31,33,34,36,5])),`component`)}),Nc=w(`/_auth/ecs/(clusters)/list-clusters/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.query({...Dn,staleTime:`static`}),e.queryClient.query({...xn,staleTime:`static`})])},head:()=>({meta:[{title:`Clusters | ECS | Mulga`}]}),component:E(()=>L(()=>import(`./list-clusters-AbZxr_aS.js`),__vite__mapDeps([164,1,9,74,8,10,3,42,32,28,11,48,49,35,17,18,19,20,95,96,51,52,23,26,55,57,58,31,33,34,36,5,97,37,106,107,45,12,46,108,69,47,98])),`component`)}),Pc=w(`/_auth/eks/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.query({...kn,staleTime:`static`})},head:()=>({meta:[{title:`Clusters | EKS | Mulga`}]}),component:E(()=>L(()=>import(`./list-clusters-PZmdiM18.js`),__vite__mapDeps([165,1,74,8,9,10,3,32,28,11,166,18,19,20,101,26,128])),`component`)}),Fc=w(`/_auth/iam/(groups)/list-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Fn,staleTime:`static`})},head:()=>({meta:[{title:`Groups | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-groups-BS-D1f3l.js`),__vite__mapDeps([167,1,74,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Ic=w(`/_auth/iam/(instance-profiles)/list-instance-profiles/`)({loader:async({context:e})=>{await e.queryClient.query({...Pn,staleTime:`static`})},head:()=>({meta:[{title:`Instance Profiles | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-instance-profiles-B3NosDUO.js`),__vite__mapDeps([168,1,74,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Lc=w(`/_auth/iam/(policies)/list-policies/`)({loader:async({context:e})=>{await e.queryClient.query({...In,staleTime:`static`})},head:()=>({meta:[{title:`Policies | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-policies-CAROO7y7.js`),__vite__mapDeps([169,1,74,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Rc=w(`/_auth/iam/(roles)/list-roles/`)({loader:async({context:e})=>{await e.queryClient.query({...Ln,staleTime:`static`})},head:()=>({meta:[{title:`Roles | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-roles-DE4rvajX.js`),__vite__mapDeps([170,1,74,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),zc=w(`/_auth/iam/(users)/list-users/`)({loader:async({context:e})=>{await e.queryClient.query({...Nn,staleTime:`static`})},head:()=>({meta:[{title:`Users | IAM | Mulga`}]}),component:E(()=>L(()=>import(`./list-users-BTkkg-CL.js`),__vite__mapDeps([171,1,74,8,9,10,3,32,28,11,105,18,19,20,104,102,26,128])),`component`)}),Bc=w(`/_auth/rds/(db-instances)/describe-db-instances/`)({loader:async({context:e})=>{await e.queryClient.query({...Hn,staleTime:`static`})},head:()=>({meta:[{title:`Databases | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-instances-DCjyXkqN.js`),__vite__mapDeps([172,1,74,8,9,10,3,42,32,28,11,118,19,20,119,51,52,120,18,26,55,37,173,48,49,35,57,58,31,33,34,36,5])),`component`)}),Vc=w(`/_auth/rds/(parameter-groups)/describe-db-parameter-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...zn,staleTime:`static`})},head:()=>({meta:[{title:`Parameter Groups | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-parameter-groups-DQyH8P2s.js`),__vite__mapDeps([174,1,74,8,9,10,3,42,32,28,11,118,19,20,120,18,26,175,119,51,52,176,97,31,33,34,35,36,5])),`component`)}),Hc=w(`/_auth/rds/(snapshots)/describe-db-snapshots/`)({loader:async({context:e})=>{await e.queryClient.query({...Rn,staleTime:`static`})},head:()=>({meta:[{title:`Snapshots | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-snapshots-D90zgrwD.js`),__vite__mapDeps([177,1,74,8,9,10,3,42,11,32,28,118,19,20,120,18,26,37,178,7,63,34,35,12,45,13,36,5,49,64,65,66,67,48,119,51,52,54,57,58,82,83,84,31,33,121,179,176,97])),`component`)}),Uc=w(`/_auth/rds/(subnet-groups)/describe-db-subnet-groups/`)({loader:async({context:e})=>{await e.queryClient.query({...Bn,staleTime:`static`})},head:()=>({meta:[{title:`Subnet Groups | RDS | Mulga`}]}),component:E(()=>L(()=>import(`./describe-db-subnet-groups-LArErlrP.js`),__vite__mapDeps([180,1,74,8,9,10,3,42,32,28,11,120,18,19,20,118,26,37,181,119,51,52,176,97,31,33,34,35,36,5])),`component`)}),K=As.update({id:`/_auth`,getParentRoute:()=>ks}),Wc=qn.update({id:`/login`,path:`/login`,getParentRoute:()=>ks}),Gc=js.update({id:`/`,path:`/`,getParentRoute:()=>K}),Kc=Ms.update({id:`/bedrock`,path:`/bedrock`,getParentRoute:()=>K}),qc=Ps.update({id:`/nodes`,path:`/nodes`,getParentRoute:()=>K}),Jc=Fs.update({id:`/s3/service-metrics`,path:`/s3/service-metrics`,getParentRoute:()=>K}),Yc=Is.update({id:`/ec2/(elastic-ips)/allocate-address`,path:`/ec2/allocate-address`,getParentRoute:()=>K}),Xc=Jn.update({id:`/ec2/(instances)/run-instances`,path:`/ec2/run-instances`,getParentRoute:()=>K}),Zc=Ls.update({id:`/ec2/(internet-gateways)/create-internet-gateway`,path:`/ec2/create-internet-gateway`,getParentRoute:()=>K}),Qc=Rs.update({id:`/ec2/(key)/create-key-pair`,path:`/ec2/create-key-pair`,getParentRoute:()=>K}),$c=zs.update({id:`/ec2/(key)/import-key-pair`,path:`/ec2/import-key-pair`,getParentRoute:()=>K}),el=Bs.update({id:`/ec2/(launch-templates)/create-launch-template`,path:`/ec2/create-launch-template`,getParentRoute:()=>K}),tl=Vs.update({id:`/ec2/(load-balancers)/create-load-balancer`,path:`/ec2/create-load-balancer`,getParentRoute:()=>K}),nl=Hs.update({id:`/ec2/(nat-gateways)/create-nat-gateway`,path:`/ec2/create-nat-gateway`,getParentRoute:()=>K}),rl=Us.update({id:`/ec2/(placement-groups)/create-placement-group`,path:`/ec2/create-placement-group`,getParentRoute:()=>K}),il=Ws.update({id:`/ec2/(route-tables)/create-route-table`,path:`/ec2/create-route-table`,getParentRoute:()=>K}),al=Gs.update({id:`/ec2/(security-groups)/create-security-group`,path:`/ec2/create-security-group`,getParentRoute:()=>K}),ol=Yn.update({id:`/ec2/(snapshots)/create-snapshot`,path:`/ec2/create-snapshot`,getParentRoute:()=>K}),sl=Ks.update({id:`/ec2/(subnet)/create-subnet`,path:`/ec2/create-subnet`,getParentRoute:()=>K}),cl=qs.update({id:`/ec2/(target-groups)/create-target-group`,path:`/ec2/create-target-group`,getParentRoute:()=>K}),ll=Js.update({id:`/ec2/(volumes)/create-volume`,path:`/ec2/create-volume`,getParentRoute:()=>K}),ul=Ys.update({id:`/ec2/(vpc)/create-vpc`,path:`/ec2/create-vpc`,getParentRoute:()=>K}),dl=Xn.update({id:`/ecs/(clusters)/create-service`,path:`/ecs/create-service`,getParentRoute:()=>K}),fl=Zn.update({id:`/ecs/(clusters)/register-task-definition`,path:`/ecs/register-task-definition`,getParentRoute:()=>K}),pl=Qn.update({id:`/ecs/(clusters)/run-task`,path:`/ecs/run-task`,getParentRoute:()=>K}),ml=Xs.update({id:`/ecs/(clusters)/task-definitions`,path:`/ecs/task-definitions`,getParentRoute:()=>K}),hl=Zs.update({id:`/eks/(clusters)/create-cluster`,path:`/eks/create-cluster`,getParentRoute:()=>K}),gl=Qs.update({id:`/iam/(groups)/create-group`,path:`/iam/create-group`,getParentRoute:()=>K}),_l=$s.update({id:`/iam/(instance-profiles)/create-instance-profile`,path:`/iam/create-instance-profile`,getParentRoute:()=>K}),vl=ec.update({id:`/iam/(policies)/create-policy`,path:`/iam/create-policy`,getParentRoute:()=>K}),yl=tc.update({id:`/iam/(roles)/create-role`,path:`/iam/create-role`,getParentRoute:()=>K}),bl=nc.update({id:`/iam/(users)/create-user`,path:`/iam/create-user`,getParentRoute:()=>K}),xl=rc.update({id:`/rds/(db-instances)/create-db-instance`,path:`/rds/create-db-instance`,getParentRoute:()=>K}),Sl=ic.update({id:`/rds/(parameter-groups)/create-db-parameter-group`,path:`/rds/create-db-parameter-group`,getParentRoute:()=>K}),Cl=ac.update({id:`/rds/(subnet-groups)/create-db-subnet-group`,path:`/rds/create-db-subnet-group`,getParentRoute:()=>K}),wl=oc.update({id:`/s3/(buckets)/create-bucket`,path:`/s3/create-bucket`,getParentRoute:()=>K}),Tl=sc.update({id:`/s3/ls/`,path:`/s3/ls/`,getParentRoute:()=>K}),El=cc.update({id:`/s3/ls/$bucket`,path:`/s3/ls/$bucket`,getParentRoute:()=>K}),Dl=lc.update({id:`/(catalog)/list-model-catalog/`,path:`/list-model-catalog/`,getParentRoute:()=>Kc}),Ol=uc.update({id:`/(guardrails)/list-guardrails/`,path:`/list-guardrails/`,getParentRoute:()=>Kc}),kl=dc.update({id:`/(guardrails)/list-guardrails/create`,path:`/list-guardrails/create`,getParentRoute:()=>Kc}),Al=fc.update({id:`/(knowledge-bases)/list-knowledge-bases/`,path:`/list-knowledge-bases/`,getParentRoute:()=>Kc}),jl=$n.update({id:`/(knowledge-bases)/list-knowledge-bases/$knowledgeBaseId`,path:`/list-knowledge-bases/$knowledgeBaseId`,getParentRoute:()=>Kc}),Ml=pc.update({id:`/(knowledge-bases)/list-knowledge-bases/create`,path:`/list-knowledge-bases/create`,getParentRoute:()=>Kc}),Nl=mc.update({id:`/(model-access)/list-model-access/`,path:`/list-model-access/`,getParentRoute:()=>Kc}),Pl=hc.update({id:`/(playground)/playground/`,path:`/playground/`,getParentRoute:()=>Kc}),Fl=gc.update({id:`/ec2/(elastic-ips)/describe-addresses/`,path:`/ec2/describe-addresses/`,getParentRoute:()=>K}),Il=er.update({id:`/ec2/(elastic-ips)/describe-addresses/$id`,path:`/ec2/describe-addresses/$id`,getParentRoute:()=>K}),Ll=_c.update({id:`/ec2/(images)/describe-images/`,path:`/ec2/describe-images/`,getParentRoute:()=>K}),Rl=tr.update({id:`/ec2/(images)/describe-images/$id`,path:`/ec2/describe-images/$id`,getParentRoute:()=>K}),zl=vc.update({id:`/ec2/(instances)/describe-instances/`,path:`/ec2/describe-instances/`,getParentRoute:()=>K}),Bl=nr.update({id:`/ec2/(instances)/describe-instances/$id`,path:`/ec2/describe-instances/$id`,getParentRoute:()=>K}),Vl=yc.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/`,path:`/ec2/describe-internet-gateways/`,getParentRoute:()=>K}),Hl=rr.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/$id`,path:`/ec2/describe-internet-gateways/$id`,getParentRoute:()=>K}),Ul=bc.update({id:`/ec2/(key)/describe-key-pairs/`,path:`/ec2/describe-key-pairs/`,getParentRoute:()=>K}),Wl=ir.update({id:`/ec2/(key)/describe-key-pairs/$id`,path:`/ec2/describe-key-pairs/$id`,getParentRoute:()=>K}),Gl=xc.update({id:`/ec2/(launch-templates)/describe-launch-templates/`,path:`/ec2/describe-launch-templates/`,getParentRoute:()=>K}),Kl=ar.update({id:`/ec2/(launch-templates)/describe-launch-templates/$id`,path:`/ec2/describe-launch-templates/$id`,getParentRoute:()=>K}),ql=Sc.update({id:`/ec2/(load-balancers)/describe-load-balancers/`,path:`/ec2/describe-load-balancers/`,getParentRoute:()=>K}),Jl=or.update({id:`/ec2/(load-balancers)/describe-load-balancers/$id`,path:`/ec2/describe-load-balancers/$id`,getParentRoute:()=>K}),Yl=Cc.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/`,path:`/ec2/describe-nat-gateways/`,getParentRoute:()=>K}),Xl=sr.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/$id`,path:`/ec2/describe-nat-gateways/$id`,getParentRoute:()=>K}),Zl=wc.update({id:`/ec2/(placement-groups)/describe-placement-groups/`,path:`/ec2/describe-placement-groups/`,getParentRoute:()=>K}),Ql=cr.update({id:`/ec2/(placement-groups)/describe-placement-groups/$id`,path:`/ec2/describe-placement-groups/$id`,getParentRoute:()=>K}),$l=Tc.update({id:`/ec2/(route-tables)/describe-route-tables/`,path:`/ec2/describe-route-tables/`,getParentRoute:()=>K}),eu=lr.update({id:`/ec2/(route-tables)/describe-route-tables/$id`,path:`/ec2/describe-route-tables/$id`,getParentRoute:()=>K}),tu=Ec.update({id:`/ec2/(security-groups)/describe-security-groups/`,path:`/ec2/describe-security-groups/`,getParentRoute:()=>K}),nu=We.update({id:`/ec2/(security-groups)/describe-security-groups/$id`,path:`/ec2/describe-security-groups/$id`,getParentRoute:()=>K}),q=Dc.update({id:`/ec2/(snapshots)/describe-snapshots/`,path:`/ec2/describe-snapshots/`,getParentRoute:()=>K}),ru=ze.update({id:`/ec2/(snapshots)/describe-snapshots/$id`,path:`/ec2/describe-snapshots/$id`,getParentRoute:()=>K}),iu=Oc.update({id:`/ec2/(subnet)/describe-subnets/`,path:`/ec2/describe-subnets/`,getParentRoute:()=>K}),au=ur.update({id:`/ec2/(subnet)/describe-subnets/$id`,path:`/ec2/describe-subnets/$id`,getParentRoute:()=>K}),ou=kc.update({id:`/ec2/(target-groups)/describe-target-groups/`,path:`/ec2/describe-target-groups/`,getParentRoute:()=>K}),su=dr.update({id:`/ec2/(target-groups)/describe-target-groups/$id`,path:`/ec2/describe-target-groups/$id`,getParentRoute:()=>K}),cu=Ac.update({id:`/ec2/(volumes)/describe-volumes/`,path:`/ec2/describe-volumes/`,getParentRoute:()=>K}),lu=fr.update({id:`/ec2/(volumes)/describe-volumes/$id`,path:`/ec2/describe-volumes/$id`,getParentRoute:()=>K}),uu=pr.update({id:`/ec2/(volumes)/modify-volume/$id`,path:`/ec2/modify-volume/$id`,getParentRoute:()=>K}),du=jc.update({id:`/ec2/(vpc)/describe-vpcs/`,path:`/ec2/describe-vpcs/`,getParentRoute:()=>K}),fu=mr.update({id:`/ec2/(vpc)/describe-vpcs/$id`,path:`/ec2/describe-vpcs/$id`,getParentRoute:()=>K}),pu=Mc.update({id:`/ecr/(repositories)/list-repositories/`,path:`/ecr/list-repositories/`,getParentRoute:()=>K}),mu=hr.update({id:`/ecr/(repositories)/list-repositories/$id`,path:`/ecr/list-repositories/$id`,getParentRoute:()=>K}),hu=Nc.update({id:`/ecs/(clusters)/list-clusters/`,path:`/ecs/list-clusters/`,getParentRoute:()=>K}),gu=gr.update({id:`/ecs/(clusters)/list-clusters/$clusterName`,path:`/ecs/list-clusters/$clusterName`,getParentRoute:()=>K}),_u=Pc.update({id:`/eks/(clusters)/list-clusters/`,path:`/eks/list-clusters/`,getParentRoute:()=>K}),vu=He.update({id:`/eks/(clusters)/list-clusters/$clusterName`,path:`/eks/list-clusters/$clusterName`,getParentRoute:()=>K}),yu=Fc.update({id:`/iam/(groups)/list-groups/`,path:`/iam/list-groups/`,getParentRoute:()=>K}),bu=_r.update({id:`/iam/(groups)/list-groups/$groupName`,path:`/iam/list-groups/$groupName`,getParentRoute:()=>K}),xu=Ic.update({id:`/iam/(instance-profiles)/list-instance-profiles/`,path:`/iam/list-instance-profiles/`,getParentRoute:()=>K}),Su=vr.update({id:`/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`,path:`/iam/list-instance-profiles/$instanceProfileName`,getParentRoute:()=>K}),Cu=Lc.update({id:`/iam/(policies)/list-policies/`,path:`/iam/list-policies/`,getParentRoute:()=>K}),wu=yr.update({id:`/iam/(policies)/list-policies/$policyArn`,path:`/iam/list-policies/$policyArn`,getParentRoute:()=>K}),Tu=Rc.update({id:`/iam/(roles)/list-roles/`,path:`/iam/list-roles/`,getParentRoute:()=>K}),Eu=br.update({id:`/iam/(roles)/list-roles/$roleName`,path:`/iam/list-roles/$roleName`,getParentRoute:()=>K}),Du=zc.update({id:`/iam/(users)/list-users/`,path:`/iam/list-users/`,getParentRoute:()=>K}),Ou=xr.update({id:`/iam/(users)/list-users/$userName`,path:`/iam/list-users/$userName`,getParentRoute:()=>K}),ku=Bc.update({id:`/rds/(db-instances)/describe-db-instances/`,path:`/rds/describe-db-instances/`,getParentRoute:()=>K}),Au=Sr.update({id:`/rds/(db-instances)/describe-db-instances/$id`,path:`/rds/describe-db-instances/$id`,getParentRoute:()=>K}),ju=Vc.update({id:`/rds/(parameter-groups)/describe-db-parameter-groups/`,path:`/rds/describe-db-parameter-groups/`,getParentRoute:()=>K}),Mu=Cr.update({id:`/rds/(parameter-groups)/describe-db-parameter-groups/$name`,path:`/rds/describe-db-parameter-groups/$name`,getParentRoute:()=>K}),Nu=Hc.update({id:`/rds/(snapshots)/describe-db-snapshots/`,path:`/rds/describe-db-snapshots/`,getParentRoute:()=>K}),Pu=wr.update({id:`/rds/(snapshots)/describe-db-snapshots/$id`,path:`/rds/describe-db-snapshots/$id`,getParentRoute:()=>K}),Fu=Tr.update({id:`/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id`,path:`/rds/restore-db-instance-from-db-snapshot/$id`,getParentRoute:()=>K}),Iu=Uc.update({id:`/rds/(subnet-groups)/describe-db-subnet-groups/`,path:`/rds/describe-db-subnet-groups/`,getParentRoute:()=>K}),Lu=Er.update({id:`/rds/(subnet-groups)/describe-db-subnet-groups/$name`,path:`/rds/describe-db-subnet-groups/$name`,getParentRoute:()=>K}),Ru=Dr.update({id:`/`,path:`/`,getParentRoute:()=>El}),zu=Or.update({id:`/$`,path:`/$`,getParentRoute:()=>El}),Bu=kr.update({id:`/(guardrails)/list-guardrails/$guardrailId/`,path:`/list-guardrails/$guardrailId/`,getParentRoute:()=>Kc}),Vu=Ar.update({id:`/(guardrails)/list-guardrails/$guardrailId/edit`,path:`/list-guardrails/$guardrailId/edit`,getParentRoute:()=>Kc}),Hu=jr.update({id:`/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName`,path:`/ecs/list-clusters/$clusterName/services/$serviceName`,getParentRoute:()=>K}),Uu=Mr.update({id:`/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId`,path:`/ecs/list-clusters/$clusterName/tasks/$taskId`,getParentRoute:()=>K}),Wu={AuthBedrockguardrailsListGuardrailsCreateRoute:kl,AuthBedrockknowledgeBasesListKnowledgeBasesKnowledgeBaseIdRoute:jl,AuthBedrockknowledgeBasesListKnowledgeBasesCreateRoute:Ml,AuthBedrockcatalogListModelCatalogIndexRoute:Dl,AuthBedrockguardrailsListGuardrailsIndexRoute:Ol,AuthBedrockknowledgeBasesListKnowledgeBasesIndexRoute:Al,AuthBedrockmodelAccessListModelAccessIndexRoute:Nl,AuthBedrockplaygroundPlaygroundIndexRoute:Pl,AuthBedrockguardrailsListGuardrailsGuardrailIdEditRoute:Vu,AuthBedrockguardrailsListGuardrailsGuardrailIdIndexRoute:Bu},Gu=Kc._addFileChildren(Wu),Ku={AuthS3LsBucketSplatRoute:zu,AuthS3LsBucketIndexRoute:Ru},qu={AuthBedrockRouteRoute:Gu,AuthNodesRoute:qc,AuthIndexRoute:Gc,AuthS3ServiceMetricsRoute:Jc,AuthS3LsBucketRouteRoute:El._addFileChildren(Ku),AuthEc2elasticIpsAllocateAddressRoute:Yc,AuthEc2instancesRunInstancesRoute:Xc,AuthEc2internetGatewaysCreateInternetGatewayRoute:Zc,AuthEc2keyCreateKeyPairRoute:Qc,AuthEc2keyImportKeyPairRoute:$c,AuthEc2launchTemplatesCreateLaunchTemplateRoute:el,AuthEc2loadBalancersCreateLoadBalancerRoute:tl,AuthEc2natGatewaysCreateNatGatewayRoute:nl,AuthEc2placementGroupsCreatePlacementGroupRoute:rl,AuthEc2routeTablesCreateRouteTableRoute:il,AuthEc2securityGroupsCreateSecurityGroupRoute:al,AuthEc2snapshotsCreateSnapshotRoute:ol,AuthEc2subnetCreateSubnetRoute:sl,AuthEc2targetGroupsCreateTargetGroupRoute:cl,AuthEc2volumesCreateVolumeRoute:ll,AuthEc2vpcCreateVpcRoute:ul,AuthEcsclustersCreateServiceRoute:dl,AuthEcsclustersRegisterTaskDefinitionRoute:fl,AuthEcsclustersRunTaskRoute:pl,AuthEcsclustersTaskDefinitionsRoute:ml,AuthEksclustersCreateClusterRoute:hl,AuthIamgroupsCreateGroupRoute:gl,AuthIaminstanceProfilesCreateInstanceProfileRoute:_l,AuthIampoliciesCreatePolicyRoute:vl,AuthIamrolesCreateRoleRoute:yl,AuthIamusersCreateUserRoute:bl,AuthRdsdbInstancesCreateDbInstanceRoute:xl,AuthRdsparameterGroupsCreateDbParameterGroupRoute:Sl,AuthRdssubnetGroupsCreateDbSubnetGroupRoute:Cl,AuthS3bucketsCreateBucketRoute:wl,AuthS3LsIndexRoute:Tl,AuthEc2elasticIpsDescribeAddressesIdRoute:Il,AuthEc2imagesDescribeImagesIdRoute:Rl,AuthEc2instancesDescribeInstancesIdRoute:Bl,AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute:Hl,AuthEc2keyDescribeKeyPairsIdRoute:Wl,AuthEc2launchTemplatesDescribeLaunchTemplatesIdRoute:Kl,AuthEc2loadBalancersDescribeLoadBalancersIdRoute:Jl,AuthEc2natGatewaysDescribeNatGatewaysIdRoute:Xl,AuthEc2placementGroupsDescribePlacementGroupsIdRoute:Ql,AuthEc2routeTablesDescribeRouteTablesIdRoute:eu,AuthEc2securityGroupsDescribeSecurityGroupsIdRoute:nu,AuthEc2snapshotsDescribeSnapshotsIdRoute:ru,AuthEc2subnetDescribeSubnetsIdRoute:au,AuthEc2targetGroupsDescribeTargetGroupsIdRoute:su,AuthEc2volumesDescribeVolumesIdRoute:lu,AuthEc2volumesModifyVolumeIdRoute:uu,AuthEc2vpcDescribeVpcsIdRoute:fu,AuthEcrrepositoriesListRepositoriesIdRoute:mu,AuthEcsclustersListClustersClusterNameRoute:gu,AuthEksclustersListClustersClusterNameRoute:vu,AuthIamgroupsListGroupsGroupNameRoute:bu,AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute:Su,AuthIampoliciesListPoliciesPolicyArnRoute:wu,AuthIamrolesListRolesRoleNameRoute:Eu,AuthIamusersListUsersUserNameRoute:Ou,AuthRdsdbInstancesDescribeDbInstancesIdRoute:Au,AuthRdsparameterGroupsDescribeDbParameterGroupsNameRoute:Mu,AuthRdssnapshotsDescribeDbSnapshotsIdRoute:Pu,AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRoute:Fu,AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRoute:Lu,AuthEc2elasticIpsDescribeAddressesIndexRoute:Fl,AuthEc2imagesDescribeImagesIndexRoute:Ll,AuthEc2instancesDescribeInstancesIndexRoute:zl,AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute:Vl,AuthEc2keyDescribeKeyPairsIndexRoute:Ul,AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRoute:Gl,AuthEc2loadBalancersDescribeLoadBalancersIndexRoute:ql,AuthEc2natGatewaysDescribeNatGatewaysIndexRoute:Yl,AuthEc2placementGroupsDescribePlacementGroupsIndexRoute:Zl,AuthEc2routeTablesDescribeRouteTablesIndexRoute:$l,AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute:tu,AuthEc2snapshotsDescribeSnapshotsIndexRoute:q,AuthEc2subnetDescribeSubnetsIndexRoute:iu,AuthEc2targetGroupsDescribeTargetGroupsIndexRoute:ou,AuthEc2volumesDescribeVolumesIndexRoute:cu,AuthEc2vpcDescribeVpcsIndexRoute:du,AuthEcrrepositoriesListRepositoriesIndexRoute:pu,AuthEcsclustersListClustersIndexRoute:hu,AuthEksclustersListClustersIndexRoute:_u,AuthIamgroupsListGroupsIndexRoute:yu,AuthIaminstanceProfilesListInstanceProfilesIndexRoute:xu,AuthIampoliciesListPoliciesIndexRoute:Cu,AuthIamrolesListRolesIndexRoute:Tu,AuthIamusersListUsersIndexRoute:Du,AuthRdsdbInstancesDescribeDbInstancesIndexRoute:ku,AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRoute:ju,AuthRdssnapshotsDescribeDbSnapshotsIndexRoute:Nu,AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRoute:Iu,AuthEcsclustersListClustersClusterNameServicesServiceNameRoute:Hu,AuthEcsclustersListClustersClusterNameTasksTaskIdRoute:Uu},Ju={AuthRouteRoute:K._addFileChildren(qu),LoginRoute:Wc},Yu=ks._addFileChildren(Ju)._addFileTypes(),Xu=Ss();xs(Xu);var Zu=fi({routeTree:Yu,context:{queryClient:Xu},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0});async function J(e){try{await Ee()}catch(t){e.render((0,z.jsxs)(`div`,{className:`mx-auto my-16 max-w-160 font-system`,children:[(0,z.jsx)(`h1`,{children:`Console unavailable`}),(0,z.jsx)(`p`,{children:`This cluster did not report its region, so the console cannot sign requests. Check that the serving node has a region set in its configuration.`}),(0,z.jsx)(`pre`,{children:t instanceof Error?t.message:String(t)})]}));return}e.render((0,z.jsx)(R.StrictMode,{children:(0,z.jsx)(ki,{defaultTheme:`dark`,storageKey:`spinifex-ui-theme`,children:(0,z.jsx)(p,{client:Xu,children:(0,z.jsx)(ts,{children:(0,z.jsx)(hi,{router:Zu})})})})}))}var Y=document.querySelector(`#app`);Y&&!Y.innerHTML&&await J(Ei.createRoot(Y)); \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/launch-template-data-fields-4CYo9au8.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/launch-template-data-fields-4CYo9au8.js new file mode 100644 index 000000000..c3c5c1774 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/launch-template-data-fields-4CYo9au8.js @@ -0,0 +1,2 @@ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{M as ee}from"./httpRequest-Bc1WZmsd.js";import{t as te}from"./chevron-down-DuqoHmYM.js";import{c as r,i,n as a,s as o,t as s}from"./select-Bgl6IAYG.js";import{t as ne}from"./input-CpcyJw4R.js";import{O as re,c as ie,o as ae,p as oe,w as se}from"./ec2-DJL24ekw.js";import{a as ce,n as c}from"./zod-VwMMRSfy.js";import{n as le,r as ue,s as l,t as u}from"./field-ChkDR_wL.js";import{t as de}from"./textarea-BNxO_Zsf.js";import{t as fe}from"./ec2-Cr9GrTUU.js";import{n as pe,r as me,t as he}from"./collapsible-BFqxt1IG.js";var ge=t(),d=e(),_e=`gp3`,ve=1,ye=16384;function f(e){let t=(0,ge.c)(107),{control:f,register:p,errors:m}=e,{data:Oe}=n(ae),{data:ke}=n(ie),{data:Ae}=n(oe),{data:je}=n(re),{data:Me}=n(se),h;t[0]===Oe.Images?h=t[1]:(h=Oe.Images??[],t[0]=Oe.Images,t[1]=h);let g=h,_;t[2]===Ae.KeyPairs?_=t[3]:(_=Ae.KeyPairs??[],t[2]=Ae.KeyPairs,t[3]=_);let Ne=_,v;t[4]===je.Subnets?v=t[5]:(v=je.Subnets??[],t[4]=je.Subnets,t[5]=v);let y=v,b;t[6]===Me.SecurityGroups?b=t[7]:(b=Me.SecurityGroups??[],t[6]=Me.SecurityGroups,t[7]=b);let x=b,S;t[8]===ke.InstanceTypes?S=t[9]:(S=ke.InstanceTypes??[],t[8]=ke.InstanceTypes,t[9]=S);let C;t[10]===S?C=t[11]:(C=[...new Set(S.map(De).filter(Ee))].toSorted(),t[10]=S,t[11]=C);let Pe=C,w;t[12]===f?w=t[13]:(w={control:f,name:`subnetId`},t[12]=f,t[13]=w);let Fe=ce(w),Ie;t[14]!==Fe||t[15]!==y?(Ie=y.find(e=>e.SubnetId===Fe)?.VpcId,t[14]=Fe,t[15]=y,t[16]=Ie):Ie=t[16];let T=Ie,Le;t[17]!==T||t[18]!==x?(Le=T?x.filter(e=>e.VpcId===T):x,t[17]=T,t[18]=x,t[19]=Le):Le=t[19];let Re=Le,ze;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),t[20]=ze):ze=t[20];let E;t[21]!==m.imageId||t[22]!==g?(E=e=>{let{field:t}=e,n=g.find(e=>e.ImageId===t.value);return(0,d.jsxs)(s,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,d.jsx)(o,{"aria-invalid":!!m.imageId,className:`w-full`,id:`imageId`,children:(0,d.jsx)(r,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,d.jsx)(a,{children:g.map(Te)})]})},t[21]=m.imageId,t[22]=g,t[23]=E):E=t[23];let D;t[24]!==f||t[25]!==E?(D=(0,d.jsx)(c,{control:f,name:`imageId`,render:E}),t[24]=f,t[25]=E,t[26]=D):D=t[26];let O;t[27]===m.imageId?O=t[28]:(O=(0,d.jsx)(ue,{errors:[m.imageId]}),t[27]=m.imageId,t[28]=O);let k;t[29]!==D||t[30]!==O?(k=(0,d.jsxs)(u,{children:[ze,D,O]}),t[29]=D,t[30]=O,t[31]=k):k=t[31];let Be;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),t[32]=Be):Be=t[32];let A;t[33]!==m.instanceType||t[34]!==Pe?(A=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>{t.onChange(e)},value:t.value||``,children:[(0,d.jsx)(o,{"aria-invalid":!!m.instanceType,className:`w-full`,id:`instanceType`,children:(0,d.jsx)(r,{})}),(0,d.jsx)(a,{children:Pe.map(we)})]})},t[33]=m.instanceType,t[34]=Pe,t[35]=A):A=t[35];let j;t[36]!==f||t[37]!==A?(j=(0,d.jsx)(c,{control:f,name:`instanceType`,render:A}),t[36]=f,t[37]=A,t[38]=j):j=t[38];let M;t[39]===m.instanceType?M=t[40]:(M=(0,d.jsx)(ue,{errors:[m.instanceType]}),t[39]=m.instanceType,t[40]=M);let N;t[41]!==j||t[42]!==M?(N=(0,d.jsxs)(u,{children:[Be,j,M]}),t[41]=j,t[42]=M,t[43]=N):N=t[43];let Ve;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),t[44]=Ve):Ve=t[44];let P;t[45]===Ne?P=t[46]:(P=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,d.jsx)(o,{className:`w-full`,id:`keyName`,children:(0,d.jsx)(r,{})}),(0,d.jsxs)(a,{children:[(0,d.jsx)(i,{value:`none`,children:`none`}),Ne.map(Ce)]})]})},t[45]=Ne,t[46]=P);let F;t[47]!==f||t[48]!==P?(F=(0,d.jsxs)(u,{children:[Ve,(0,d.jsx)(c,{control:f,name:`keyName`,render:P})]}),t[47]=f,t[48]=P,t[49]=F):F=t[49];let He;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),t[50]=He):He=t[50];let I;t[51]===y?I=t[52]:(I=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,d.jsx)(o,{className:`w-full`,id:`subnetId`,children:(0,d.jsx)(r,{})}),(0,d.jsxs)(a,{children:[(0,d.jsx)(i,{value:`none`,children:`none`}),y.map(Se)]})]})},t[51]=y,t[52]=I);let L;t[53]!==f||t[54]!==I?(L=(0,d.jsxs)(u,{children:[He,(0,d.jsx)(c,{control:f,name:`subnetId`,render:I})]}),t[53]=f,t[54]=I,t[55]=L):L=t[55];let Ue;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,d.jsx)(l,{children:`Security Groups`}),t[56]=Ue):Ue=t[56];let We=T?`Applies to VPC ${T}`:`Showing all security groups — select a subnet to filter by VPC`,R;t[57]===We?R=t[58]:(R=(0,d.jsx)(le,{children:We}),t[57]=We,t[58]=R);let z;t[59]===Re?z=t[60]:(z=e=>{let{field:t}=e,n=t.value??[],te=new Set(n),r=e=>{t.onChange(n.includes(e)?n.filter(t=>t!==e):[...n,e])};return Re.length===0?(0,d.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups available.`}):(0,d.jsx)(`div`,{className:`space-y-1`,children:Re.map(e=>(0,d.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,d.jsx)(`input`,{"aria-label":`Security group ${ee(e)}`,checked:te.has(e.GroupId??``),onChange:()=>{r(e.GroupId??``)},type:`checkbox`}),(0,d.jsx)(`span`,{className:`font-mono`,children:ee(e)})]},e.GroupId))})},t[59]=Re,t[60]=z);let B;t[61]!==f||t[62]!==z?(B=(0,d.jsx)(c,{control:f,name:`securityGroupIds`,render:z}),t[61]=f,t[62]=z,t[63]=B):B=t[63];let V;t[64]!==R||t[65]!==B?(V=(0,d.jsxs)(u,{children:[Ue,R,B]}),t[64]=R,t[65]=B,t[66]=V):V=t[66];let Ge,Ke;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`userData`,children:`User Data`})}),Ke=(0,d.jsx)(le,{children:`Cloud-init or shell script run at first boot.`}),t[67]=Ge,t[68]=Ke):(Ge=t[67],Ke=t[68]);let H;t[69]===p?H=t[70]:(H=p(`userData`),t[69]=p,t[70]=H);let U;t[71]===H?U=t[72]:(U=(0,d.jsxs)(u,{children:[Ge,Ke,(0,d.jsx)(de,{className:`min-h-32`,variant:`code`,id:`userData`,placeholder:`#!/bin/bash +echo hello`,...H})]}),t[71]=H,t[72]=U);let qe;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,d.jsxs)(me,{className:`group`,variant:`field`,render:(0,d.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,d.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,d.jsx)(te,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),t[73]=qe):qe=t[73];let Je;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),t[74]=Je):Je=t[74];let Ye=!!m.rootVolumeSize,W;t[75]===p?W=t[76]:(W=p(`rootVolumeSize`,{setValueAs:xe}),t[75]=p,t[76]=W);let G;t[77]!==Ye||t[78]!==W?(G=(0,d.jsx)(ne,{"aria-invalid":Ye,id:`rootVolumeSize`,max:ye,min:ve,placeholder:`use AMI default`,type:`number`,...W}),t[77]=Ye,t[78]=W,t[79]=G):G=t[79];let K;t[80]===m.rootVolumeSize?K=t[81]:(K=(0,d.jsx)(ue,{errors:[m.rootVolumeSize]}),t[80]=m.rootVolumeSize,t[81]=K);let q;t[82]!==G||t[83]!==K?(q=(0,d.jsxs)(u,{children:[Je,G,K]}),t[82]=G,t[83]=K,t[84]=q):q=t[84];let J;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),t[85]=J):J=t[85];let Y;t[86]===m.rootVolumeType?Y=t[87]:(Y=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>{t.onChange(e)},value:t.value??_e,children:[(0,d.jsx)(o,{"aria-invalid":!!m.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,d.jsx)(r,{})}),(0,d.jsx)(a,{children:fe.map(be)})]})},t[86]=m.rootVolumeType,t[87]=Y);let X;t[88]!==f||t[89]!==Y?(X=(0,d.jsx)(c,{control:f,name:`rootVolumeType`,render:Y}),t[88]=f,t[89]=Y,t[90]=X):X=t[90];let Z;t[91]===m.rootVolumeType?Z=t[92]:(Z=(0,d.jsx)(ue,{errors:[m.rootVolumeType]}),t[91]=m.rootVolumeType,t[92]=Z);let Q;t[93]!==X||t[94]!==Z?(Q=(0,d.jsxs)(u,{children:[J,X,Z]}),t[93]=X,t[94]=Z,t[95]=Q):Q=t[95];let $;t[96]!==q||t[97]!==Q?($=(0,d.jsxs)(he,{children:[qe,(0,d.jsxs)(pe,{className:`mt-3`,variant:`panel`,children:[q,Q]})]}),t[96]=q,t[97]=Q,t[98]=$):$=t[98];let Xe;return t[99]!==k||t[100]!==N||t[101]!==F||t[102]!==L||t[103]!==V||t[104]!==U||t[105]!==$?(Xe=(0,d.jsxs)(d.Fragment,{children:[k,N,F,L,V,U,$]}),t[99]=k,t[100]=N,t[101]=F,t[102]=L,t[103]=V,t[104]=U,t[105]=$,t[106]=Xe):Xe=t[106],Xe}function be(e){return(0,d.jsx)(i,{value:e,children:e},e)}function xe(e){return e===``||e==null?void 0:Number(e)}function Se(e){return(0,d.jsx)(i,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function Ce(e){return(0,d.jsx)(i,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function we(e){return(0,d.jsx)(i,{value:e,children:e},e)}function Te(e){return(0,d.jsxs)(i,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function Ee(e){return!!e}function De(e){return e.InstanceType}export{f as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/launch-template-data-fields-CcRkOt3t.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/launch-template-data-fields-CcRkOt3t.js deleted file mode 100644 index d847e322c..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/launch-template-data-fields-CcRkOt3t.js +++ /dev/null @@ -1,2 +0,0 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./chevron-down-DuqoHmYM.js";import{c as r,i,n as a,s as o,t as s}from"./select-Bgl6IAYG.js";import{t as te}from"./input-CpcyJw4R.js";import{O as ne,c as re,o as ie,p as ae,w as oe}from"./ec2-DJL24ekw.js";import{a as se,n as c}from"./zod-VwMMRSfy.js";import{n as ce,r as l,s as u,t as d}from"./field-ChkDR_wL.js";import{t as le}from"./textarea-BNxO_Zsf.js";import{t as ue}from"./ec2-CmqOirWQ.js";import{n as de,r as fe,t as pe}from"./collapsible-BFqxt1IG.js";var me=t(),f=e(),he=`gp3`,ge=1,_e=16384;function p(e){let t=(0,me.c)(107),{control:p,register:m,errors:h}=e,{data:Ee}=n(ie),{data:De}=n(re),{data:Oe}=n(ae),{data:ke}=n(ne),{data:Ae}=n(oe),je;t[0]===Ee.Images?je=t[1]:(je=Ee.Images??[],t[0]=Ee.Images,t[1]=je);let g=je,_;t[2]===Oe.KeyPairs?_=t[3]:(_=Oe.KeyPairs??[],t[2]=Oe.KeyPairs,t[3]=_);let Me=_,v;t[4]===ke.Subnets?v=t[5]:(v=ke.Subnets??[],t[4]=ke.Subnets,t[5]=v);let y=v,b;t[6]===Ae.SecurityGroups?b=t[7]:(b=Ae.SecurityGroups??[],t[6]=Ae.SecurityGroups,t[7]=b);let x=b,S;t[8]===De.InstanceTypes?S=t[9]:(S=De.InstanceTypes??[],t[8]=De.InstanceTypes,t[9]=S);let C;t[10]===S?C=t[11]:(C=[...new Set(S.map(Te).filter(we))].toSorted(),t[10]=S,t[11]=C);let Ne=C,w;t[12]===p?w=t[13]:(w={control:p,name:`subnetId`},t[12]=p,t[13]=w);let Pe=se(w),T;t[14]!==Pe||t[15]!==y?(T=y.find(e=>e.SubnetId===Pe)?.VpcId,t[14]=Pe,t[15]=y,t[16]=T):T=t[16];let E=T,Fe;t[17]!==E||t[18]!==x?(Fe=E?x.filter(e=>e.VpcId===E):x,t[17]=E,t[18]=x,t[19]=Fe):Fe=t[19];let Ie=Fe,Le;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),t[20]=Le):Le=t[20];let D;t[21]!==h.imageId||t[22]!==g?(D=e=>{let{field:t}=e,n=g.find(e=>e.ImageId===t.value);return(0,f.jsxs)(s,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,f.jsx)(o,{"aria-invalid":!!h.imageId,className:`w-full`,id:`imageId`,children:(0,f.jsx)(r,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,f.jsx)(a,{children:g.map(Ce)})]})},t[21]=h.imageId,t[22]=g,t[23]=D):D=t[23];let O;t[24]!==p||t[25]!==D?(O=(0,f.jsx)(c,{control:p,name:`imageId`,render:D}),t[24]=p,t[25]=D,t[26]=O):O=t[26];let k;t[27]===h.imageId?k=t[28]:(k=(0,f.jsx)(l,{errors:[h.imageId]}),t[27]=h.imageId,t[28]=k);let A;t[29]!==O||t[30]!==k?(A=(0,f.jsxs)(d,{children:[Le,O,k]}),t[29]=O,t[30]=k,t[31]=A):A=t[31];let Re;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),t[32]=Re):Re=t[32];let j;t[33]!==h.instanceType||t[34]!==Ne?(j=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>{t.onChange(e)},value:t.value||``,children:[(0,f.jsx)(o,{"aria-invalid":!!h.instanceType,className:`w-full`,id:`instanceType`,children:(0,f.jsx)(r,{})}),(0,f.jsx)(a,{children:Ne.map(Se)})]})},t[33]=h.instanceType,t[34]=Ne,t[35]=j):j=t[35];let M;t[36]!==p||t[37]!==j?(M=(0,f.jsx)(c,{control:p,name:`instanceType`,render:j}),t[36]=p,t[37]=j,t[38]=M):M=t[38];let N;t[39]===h.instanceType?N=t[40]:(N=(0,f.jsx)(l,{errors:[h.instanceType]}),t[39]=h.instanceType,t[40]=N);let P;t[41]!==M||t[42]!==N?(P=(0,f.jsxs)(d,{children:[Re,M,N]}),t[41]=M,t[42]=N,t[43]=P):P=t[43];let ze;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),t[44]=ze):ze=t[44];let F;t[45]===Me?F=t[46]:(F=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,f.jsx)(o,{className:`w-full`,id:`keyName`,children:(0,f.jsx)(r,{})}),(0,f.jsxs)(a,{children:[(0,f.jsx)(i,{value:`none`,children:`none`}),Me.map(xe)]})]})},t[45]=Me,t[46]=F);let I;t[47]!==p||t[48]!==F?(I=(0,f.jsxs)(d,{children:[ze,(0,f.jsx)(c,{control:p,name:`keyName`,render:F})]}),t[47]=p,t[48]=F,t[49]=I):I=t[49];let Be;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),t[50]=Be):Be=t[50];let L;t[51]===y?L=t[52]:(L=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,f.jsx)(o,{className:`w-full`,id:`subnetId`,children:(0,f.jsx)(r,{})}),(0,f.jsxs)(a,{children:[(0,f.jsx)(i,{value:`none`,children:`none`}),y.map(be)]})]})},t[51]=y,t[52]=L);let R;t[53]!==p||t[54]!==L?(R=(0,f.jsxs)(d,{children:[Be,(0,f.jsx)(c,{control:p,name:`subnetId`,render:L})]}),t[53]=p,t[54]=L,t[55]=R):R=t[55];let Ve;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,f.jsx)(u,{children:`Security Groups`}),t[56]=Ve):Ve=t[56];let He=E?`Applies to VPC ${E}`:`Showing all security groups — select a subnet to filter by VPC`,z;t[57]===He?z=t[58]:(z=(0,f.jsx)(ce,{children:He}),t[57]=He,t[58]=z);let B;t[59]===Ie?B=t[60]:(B=e=>{let{field:t}=e,n=t.value??[],ee=new Set(n),r=e=>{t.onChange(n.includes(e)?n.filter(t=>t!==e):[...n,e])};return Ie.length===0?(0,f.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups available.`}):(0,f.jsx)(`div`,{className:`space-y-1`,children:Ie.map(e=>(0,f.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,f.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:ee.has(e.GroupId??``),onChange:()=>{r(e.GroupId??``)},type:`checkbox`}),(0,f.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})},t[59]=Ie,t[60]=B);let V;t[61]!==p||t[62]!==B?(V=(0,f.jsx)(c,{control:p,name:`securityGroupIds`,render:B}),t[61]=p,t[62]=B,t[63]=V):V=t[63];let H;t[64]!==z||t[65]!==V?(H=(0,f.jsxs)(d,{children:[Ve,z,V]}),t[64]=z,t[65]=V,t[66]=H):H=t[66];let Ue,We;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`userData`,children:`User Data`})}),We=(0,f.jsx)(ce,{children:`Cloud-init or shell script run at first boot.`}),t[67]=Ue,t[68]=We):(Ue=t[67],We=t[68]);let U;t[69]===m?U=t[70]:(U=m(`userData`),t[69]=m,t[70]=U);let W;t[71]===U?W=t[72]:(W=(0,f.jsxs)(d,{children:[Ue,We,(0,f.jsx)(le,{className:`min-h-32`,variant:`code`,id:`userData`,placeholder:`#!/bin/bash -echo hello`,...U})]}),t[71]=U,t[72]=W);let Ge;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,f.jsxs)(fe,{className:`group`,variant:`field`,render:(0,f.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,f.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,f.jsx)(ee,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),t[73]=Ge):Ge=t[73];let Ke;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),t[74]=Ke):Ke=t[74];let qe=!!h.rootVolumeSize,G;t[75]===m?G=t[76]:(G=m(`rootVolumeSize`,{setValueAs:ye}),t[75]=m,t[76]=G);let K;t[77]!==qe||t[78]!==G?(K=(0,f.jsx)(te,{"aria-invalid":qe,id:`rootVolumeSize`,max:_e,min:ge,placeholder:`use AMI default`,type:`number`,...G}),t[77]=qe,t[78]=G,t[79]=K):K=t[79];let q;t[80]===h.rootVolumeSize?q=t[81]:(q=(0,f.jsx)(l,{errors:[h.rootVolumeSize]}),t[80]=h.rootVolumeSize,t[81]=q);let J;t[82]!==K||t[83]!==q?(J=(0,f.jsxs)(d,{children:[Ke,K,q]}),t[82]=K,t[83]=q,t[84]=J):J=t[84];let Je;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,f.jsx)(u,{children:(0,f.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),t[85]=Je):Je=t[85];let Y;t[86]===h.rootVolumeType?Y=t[87]:(Y=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>{t.onChange(e)},value:t.value??he,children:[(0,f.jsx)(o,{"aria-invalid":!!h.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,f.jsx)(r,{})}),(0,f.jsx)(a,{children:ue.map(ve)})]})},t[86]=h.rootVolumeType,t[87]=Y);let X;t[88]!==p||t[89]!==Y?(X=(0,f.jsx)(c,{control:p,name:`rootVolumeType`,render:Y}),t[88]=p,t[89]=Y,t[90]=X):X=t[90];let Z;t[91]===h.rootVolumeType?Z=t[92]:(Z=(0,f.jsx)(l,{errors:[h.rootVolumeType]}),t[91]=h.rootVolumeType,t[92]=Z);let Q;t[93]!==X||t[94]!==Z?(Q=(0,f.jsxs)(d,{children:[Je,X,Z]}),t[93]=X,t[94]=Z,t[95]=Q):Q=t[95];let $;t[96]!==J||t[97]!==Q?($=(0,f.jsxs)(pe,{children:[Ge,(0,f.jsxs)(de,{className:`mt-3`,variant:`panel`,children:[J,Q]})]}),t[96]=J,t[97]=Q,t[98]=$):$=t[98];let Ye;return t[99]!==A||t[100]!==P||t[101]!==I||t[102]!==R||t[103]!==H||t[104]!==W||t[105]!==$?(Ye=(0,f.jsxs)(f.Fragment,{children:[A,P,I,R,H,W,$]}),t[99]=A,t[100]=P,t[101]=I,t[102]=R,t[103]=H,t[104]=W,t[105]=$,t[106]=Ye):Ye=t[106],Ye}function ve(e){return(0,f.jsx)(i,{value:e,children:e},e)}function ye(e){return e===``||e==null?void 0:Number(e)}function be(e){return(0,f.jsx)(i,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function xe(e){return(0,f.jsx)(i,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function Se(e){return(0,f.jsx)(i,{value:e,children:e},e)}function Ce(e){return(0,f.jsxs)(i,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function we(e){return!!e}function Te(e){return e.InstanceType}export{p as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-clusters-6_bfITq9.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-clusters-AbZxr_aS.js similarity index 98% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-clusters-6_bfITq9.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-clusters-AbZxr_aS.js index 5ee61ca0b..a86e056dc 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-clusters-6_bfITq9.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-clusters-AbZxr_aS.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{A as i}from"./removable-TyvHreKc.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{t as c}from"./button-Bae9vdts.js";import{t as l}from"./input-CpcyJw4R.js";import{o as u}from"./ec2-DJL24ekw.js";import{n as d}from"./ecs-DRWPOVsw.js";import{r as f,t as p}from"./ecs-BsOdvIYx.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{t as h}from"./error-banner-BcDqaPk7.js";import{s as g,t as _}from"./field-ChkDR_wL.js";import{a as v,i as y,l as b,n as x,o as S,r as C,s as w,t as T}from"./alert-dialog-BYzNCmBp.js";import{t as E}from"./delete-confirmation-dialog-BIyYnba2.js";import{t as D}from"./state-badge-BD9XGBez.js";import{t as O}from"./system-managed-Dk7ySh_E.js";import{t as k}from"./system-image-required-ClBzX7Hd.js";import{t as A}from"./ecs-section-nav-DYhkEr-O.js";var j=r(),M=t(n(),1),N=e();function P(e){let t=(0,j.c)(32),{open:n,onOpenChange:r}=e,i=p(),[a,o]=(0,M.useState)(``),s;t[0]!==i||t[1]!==r?(s=function(e){e||(o(``),i.reset()),r(e)},t[0]=i,t[1]=r,t[2]=s):s=t[2];let c=s,u;t[3]!==i||t[4]!==c||t[5]!==a?(u=async function(){try{await i.mutateAsync(a.trim()),c(!1)}catch{}},t[3]=i,t[4]=c,t[5]=a,t[6]=u):u=t[6];let d=u,f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,N.jsxs)(w,{children:[(0,N.jsx)(b,{children:`Create Cluster`}),(0,N.jsx)(v,{children:`A cluster groups the services, tasks, and container instances that run on it.`})]}),t[7]=f):f=t[7];let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,N.jsx)(g,{children:(0,N.jsx)(`label`,{htmlFor:`clusterName`,children:`Name`})}),t[8]=m):m=t[8];let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>{o(e.target.value)},t[9]=h):h=t[9];let E;t[10]===a?E=t[11]:(E=(0,N.jsxs)(_,{children:[m,(0,N.jsx)(l,{id:`clusterName`,onChange:h,placeholder:`my-cluster`,value:a})]}),t[10]=a,t[11]=E);let D;t[12]===i.error?D=t[13]:(D=i.error&&(0,N.jsx)(`p`,{className:`text-sm text-destructive`,children:i.error.message}),t[12]=i.error,t[13]=D);let O;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,N.jsx)(C,{children:`Cancel`}),t[14]=O):O=t[14];let k;t[15]!==i.isPending||t[16]!==a?(k=i.isPending||!a.trim(),t[15]=i.isPending,t[16]=a,t[17]=k):k=t[17];let A;t[18]===d?A=t[19]:(A=e=>{e.preventDefault(),d()},t[18]=d,t[19]=A);let P=i.isPending?`Creating…`:`Create Cluster`,F;t[20]!==A||t[21]!==P||t[22]!==k?(F=(0,N.jsxs)(S,{children:[O,(0,N.jsx)(x,{disabled:k,onClick:A,children:P})]}),t[20]=A,t[21]=P,t[22]=k,t[23]=F):F=t[23];let I;t[24]!==F||t[25]!==E||t[26]!==D?(I=(0,N.jsxs)(y,{children:[f,E,D,F]}),t[24]=F,t[25]=E,t[26]=D,t[27]=I):I=t[27];let L;return t[28]!==c||t[29]!==n||t[30]!==I?(L=(0,N.jsx)(T,{onOpenChange:c,open:n,children:I}),t[28]=c,t[29]=n,t[30]=I,t[31]=L):L=t[31],L}function F(){let e=s(),t=i(),{data:n}=a(d),{data:r}=a(u),l=f(),[p,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(null),[y,b]=(0,M.useState)(!1),x=(r.Images??[]).some(O);async function S(){b(!0);try{await t.invalidateQueries({queryKey:u.queryKey})}finally{b(!1)}}function C(){_&&l.mutate(_,{onSuccess:()=>{v(null)}})}return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(m,{actions:(0,N.jsx)(c,{disabled:!x,onClick:()=>{g(!0)},children:`Create Cluster`}),title:`Clusters`}),(0,N.jsx)(A,{}),!x&&(0,N.jsx)(k,{className:`mb-6`,description:`ECS clusters need a Spinifex-managed node image (containerd + ecs-agent) to launch container instances. Import it before creating a cluster.`,importCommand:`spx admin images import --name spinifex-ecs-node`,isRechecking:y,onRecheck:S,title:`ECS system image not found`}),l.isError&&(0,N.jsx)(h,{error:l.error instanceof Error?l.error:void 0,msg:`Failed to delete cluster.`}),n.length>0?(0,N.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,N.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Services`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running Tasks`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Instances`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,N.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,N.jsx)(`tbody`,{children:n.map(t=>{if(!t.clusterName)return null;let n=t.clusterName;return(0,N.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await e({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:n}})},children:[(0,N.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,N.jsx)(o,{className:`text-primary hover:underline`,onClick:e=>{e.stopPropagation()},params:{clusterName:n},to:`/ecs/list-clusters/$clusterName`,children:n})}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:(0,N.jsx)(D,{state:t.status})}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:t.activeServicesCount??0}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:t.runningTasksCount??0}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:t.registeredContainerInstancesCount??0}),(0,N.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,N.jsx)(c,{onClick:e=>{e.stopPropagation(),v(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,N.jsx)(`p`,{className:`text-muted-foreground`,children:`No ECS clusters found.`}),(0,N.jsx)(P,{onOpenChange:g,open:p}),(0,N.jsx)(E,{description:`This permanently deletes cluster "${_}" and force-stops every task it holds. This cannot be undone.`,isPending:l.isPending,onConfirm:C,onOpenChange:e=>{e||v(null)},open:_!==null,title:`Delete cluster`})]})}var I=F;export{I as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{A as i}from"./removable-TyvHreKc.js";import{t as a}from"./useSuspenseQuery-C2bXkW_k.js";import{t as o}from"./link-cv-r823H.js";import{t as s}from"./useNavigate-BiiHYpLW.js";import{t as c}from"./button-Bae9vdts.js";import{t as l}from"./input-CpcyJw4R.js";import{o as u}from"./ec2-DJL24ekw.js";import{n as d}from"./ecs-DRWPOVsw.js";import{r as f,t as p}from"./ecs-BsOdvIYx.js";import{t as m}from"./page-heading-M0NyqAmu.js";import{t as h}from"./error-banner-BcDqaPk7.js";import{s as g,t as _}from"./field-ChkDR_wL.js";import{a as v,i as y,l as b,n as x,o as S,r as C,s as w,t as T}from"./alert-dialog-BYzNCmBp.js";import{t as E}from"./delete-confirmation-dialog-BIyYnba2.js";import{t as D}from"./state-badge-BiFj5bbX.js";import{t as O}from"./system-managed-Dk7ySh_E.js";import{t as k}from"./system-image-required-ClBzX7Hd.js";import{t as A}from"./ecs-section-nav-DYhkEr-O.js";var j=r(),M=t(n(),1),N=e();function P(e){let t=(0,j.c)(32),{open:n,onOpenChange:r}=e,i=p(),[a,o]=(0,M.useState)(``),s;t[0]!==i||t[1]!==r?(s=function(e){e||(o(``),i.reset()),r(e)},t[0]=i,t[1]=r,t[2]=s):s=t[2];let c=s,u;t[3]!==i||t[4]!==c||t[5]!==a?(u=async function(){try{await i.mutateAsync(a.trim()),c(!1)}catch{}},t[3]=i,t[4]=c,t[5]=a,t[6]=u):u=t[6];let d=u,f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,N.jsxs)(w,{children:[(0,N.jsx)(b,{children:`Create Cluster`}),(0,N.jsx)(v,{children:`A cluster groups the services, tasks, and container instances that run on it.`})]}),t[7]=f):f=t[7];let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,N.jsx)(g,{children:(0,N.jsx)(`label`,{htmlFor:`clusterName`,children:`Name`})}),t[8]=m):m=t[8];let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>{o(e.target.value)},t[9]=h):h=t[9];let E;t[10]===a?E=t[11]:(E=(0,N.jsxs)(_,{children:[m,(0,N.jsx)(l,{id:`clusterName`,onChange:h,placeholder:`my-cluster`,value:a})]}),t[10]=a,t[11]=E);let D;t[12]===i.error?D=t[13]:(D=i.error&&(0,N.jsx)(`p`,{className:`text-sm text-destructive`,children:i.error.message}),t[12]=i.error,t[13]=D);let O;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,N.jsx)(C,{children:`Cancel`}),t[14]=O):O=t[14];let k;t[15]!==i.isPending||t[16]!==a?(k=i.isPending||!a.trim(),t[15]=i.isPending,t[16]=a,t[17]=k):k=t[17];let A;t[18]===d?A=t[19]:(A=e=>{e.preventDefault(),d()},t[18]=d,t[19]=A);let P=i.isPending?`Creating…`:`Create Cluster`,F;t[20]!==A||t[21]!==P||t[22]!==k?(F=(0,N.jsxs)(S,{children:[O,(0,N.jsx)(x,{disabled:k,onClick:A,children:P})]}),t[20]=A,t[21]=P,t[22]=k,t[23]=F):F=t[23];let I;t[24]!==F||t[25]!==E||t[26]!==D?(I=(0,N.jsxs)(y,{children:[f,E,D,F]}),t[24]=F,t[25]=E,t[26]=D,t[27]=I):I=t[27];let L;return t[28]!==c||t[29]!==n||t[30]!==I?(L=(0,N.jsx)(T,{onOpenChange:c,open:n,children:I}),t[28]=c,t[29]=n,t[30]=I,t[31]=L):L=t[31],L}function F(){let e=s(),t=i(),{data:n}=a(d),{data:r}=a(u),l=f(),[p,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(null),[y,b]=(0,M.useState)(!1),x=(r.Images??[]).some(O);async function S(){b(!0);try{await t.invalidateQueries({queryKey:u.queryKey})}finally{b(!1)}}function C(){_&&l.mutate(_,{onSuccess:()=>{v(null)}})}return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(m,{actions:(0,N.jsx)(c,{disabled:!x,onClick:()=>{g(!0)},children:`Create Cluster`}),title:`Clusters`}),(0,N.jsx)(A,{}),!x&&(0,N.jsx)(k,{className:`mb-6`,description:`ECS clusters need a Spinifex-managed node image (containerd + ecs-agent) to launch container instances. Import it before creating a cluster.`,importCommand:`spx admin images import --name spinifex-ecs-node`,isRechecking:y,onRecheck:S,title:`ECS system image not found`}),l.isError&&(0,N.jsx)(h,{error:l.error instanceof Error?l.error:void 0,msg:`Failed to delete cluster.`}),n.length>0?(0,N.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,N.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Services`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running Tasks`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Instances`}),(0,N.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,N.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,N.jsx)(`tbody`,{children:n.map(t=>{if(!t.clusterName)return null;let n=t.clusterName;return(0,N.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await e({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:n}})},children:[(0,N.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,N.jsx)(o,{className:`text-primary hover:underline`,onClick:e=>{e.stopPropagation()},params:{clusterName:n},to:`/ecs/list-clusters/$clusterName`,children:n})}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:(0,N.jsx)(D,{state:t.status})}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:t.activeServicesCount??0}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:t.runningTasksCount??0}),(0,N.jsx)(`td`,{className:`px-4 py-2`,children:t.registeredContainerInstancesCount??0}),(0,N.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,N.jsx)(c,{onClick:e=>{e.stopPropagation(),v(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,N.jsx)(`p`,{className:`text-muted-foreground`,children:`No ECS clusters found.`}),(0,N.jsx)(P,{onOpenChange:g,open:p}),(0,N.jsx)(E,{description:`This permanently deletes cluster "${_}" and force-stops every task it holds. This cannot be undone.`,isPending:l.isPending,onConfirm:C,onOpenChange:e=>{e||v(null)},open:_!==null,title:`Delete cluster`})]})}var I=F;export{I as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-guardrails-DMr8tneU.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-guardrails-hPsuLUzv.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-guardrails-DMr8tneU.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-guardrails-hPsuLUzv.js index 045d8a5f2..9a6e129fa 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-guardrails-DMr8tneU.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-guardrails-hPsuLUzv.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{n as i}from"./button-Bae9vdts.js";import{i as a}from"./bedrock-DIbdgKPF.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BD9XGBez.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.guardrails?s=e[1]:(s=t.guardrails??[],e[0]=t.guardrails,e[1]=s);let c;if(e[2]!==s){let t=s.toSorted(p),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{className:i({size:`sm`}),to:`/bedrock/list-guardrails/create`,children:`Create guardrail`}),title:`Guardrails`}),e[4]=n):n=e[4],c=(0,u.jsxs)(u.Fragment,{children:[n,t.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:t.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No guardrails found.`})]}),e[2]=s,e[3]=c}else c=e[3];return c}function f(e){return e.id?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.status}),params:{guardrailId:e.id},subtitle:e.id,title:e.name??e.id,to:`/bedrock/list-guardrails/$guardrailId`},e.id):null}function p(e,t){let n=e.name?.toLowerCase()??``,r=t.name?.toLowerCase()??``;return n.localeCompare(r)}var m=d;export{m as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{n as i}from"./button-Bae9vdts.js";import{i as a}from"./bedrock-DIbdgKPF.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BiFj5bbX.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.guardrails?s=e[1]:(s=t.guardrails??[],e[0]=t.guardrails,e[1]=s);let c;if(e[2]!==s){let t=s.toSorted(p),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{className:i({size:`sm`}),to:`/bedrock/list-guardrails/create`,children:`Create guardrail`}),title:`Guardrails`}),e[4]=n):n=e[4],c=(0,u.jsxs)(u.Fragment,{children:[n,t.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:t.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No guardrails found.`})]}),e[2]=s,e[3]=c}else c=e[3];return c}function f(e){return e.id?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.status}),params:{guardrailId:e.id},subtitle:e.id,title:e.name??e.id,to:`/bedrock/list-guardrails/$guardrailId`},e.id):null}function p(e,t){let n=e.name?.toLowerCase()??``,r=t.name?.toLowerCase()??``;return n.localeCompare(r)}var m=d;export{m as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-knowledge-bases-B75Tw2nR.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-knowledge-bases-BXEkLOG4.js similarity index 95% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-knowledge-bases-B75Tw2nR.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-knowledge-bases-BXEkLOG4.js index 360c4ba4b..f6d051747 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-knowledge-bases-B75Tw2nR.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/list-knowledge-bases-BXEkLOG4.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{n as i}from"./button-Bae9vdts.js";import{i as a}from"./bedrockAgent-BIsnxh0q.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BD9XGBez.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.knowledgeBaseSummaries?s=e[1]:(s=t.knowledgeBaseSummaries??[],e[0]=t.knowledgeBaseSummaries,e[1]=s);let c;if(e[2]!==s){let t=s.toSorted(p),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{className:i({size:`sm`}),to:`/bedrock/list-knowledge-bases/create`,children:`Create knowledge base`}),title:`Knowledge Bases`}),e[4]=n):n=e[4],c=(0,u.jsxs)(u.Fragment,{children:[n,t.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:t.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No knowledge bases found.`})]}),e[2]=s,e[3]=c}else c=e[3];return c}function f(e){return e.knowledgeBaseId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.status}),params:{knowledgeBaseId:e.knowledgeBaseId},subtitle:e.knowledgeBaseId,title:e.name??e.knowledgeBaseId,to:`/bedrock/list-knowledge-bases/$knowledgeBaseId`},e.knowledgeBaseId):null}function p(e,t){let n=e.name?.toLowerCase()??``,r=t.name?.toLowerCase()??``;return n.localeCompare(r)}var m=d;export{m as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useSuspenseQuery-C2bXkW_k.js";import{t as r}from"./link-cv-r823H.js";import{n as i}from"./button-Bae9vdts.js";import{i as a}from"./bedrockAgent-BIsnxh0q.js";import{t as o}from"./page-heading-M0NyqAmu.js";import{t as s}from"./state-badge-BiFj5bbX.js";import{t as c}from"./list-card-DXP5Yi9a.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.knowledgeBaseSummaries?s=e[1]:(s=t.knowledgeBaseSummaries??[],e[0]=t.knowledgeBaseSummaries,e[1]=s);let c;if(e[2]!==s){let t=s.toSorted(p),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{className:i({size:`sm`}),to:`/bedrock/list-knowledge-bases/create`,children:`Create knowledge base`}),title:`Knowledge Bases`}),e[4]=n):n=e[4],c=(0,u.jsxs)(u.Fragment,{children:[n,t.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:t.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No knowledge bases found.`})]}),e[2]=s,e[3]=c}else c=e[3];return c}function f(e){return e.knowledgeBaseId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.status}),params:{knowledgeBaseId:e.knowledgeBaseId},subtitle:e.knowledgeBaseId,title:e.name??e.knowledgeBaseId,to:`/bedrock/list-knowledge-bases/$knowledgeBaseId`},e.knowledgeBaseId):null}function p(e,t){let n=e.name?.toLowerCase()??``,r=t.name?.toLowerCase()??``;return n.localeCompare(r)}var m=d;export{m as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/listener-form-y_owZS3C.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/listener-form-y_owZS3C.js new file mode 100644 index 000000000..af975571b --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/listener-form-y_owZS3C.js @@ -0,0 +1 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{A as i}from"./removable-TyvHreKc.js";import{t as a}from"./useMutation-DV0DQvGm.js";import{c as o,i as s,n as c,s as l,t as u}from"./select-Bgl6IAYG.js";import{t as d}from"./button-Bae9vdts.js";import{t as ee}from"./input-CpcyJw4R.js";import{n as f,za as p}from"./awsClient-I-S7JTV9.js";import{i as m,n as h,r as g}from"./acm-BGw6nz9A.js";import{a as _,n as v}from"./zod-VwMMRSfy.js";import{t as y}from"./error-banner-BcDqaPk7.js";import{r as b,s as x,t as S}from"./field-ChkDR_wL.js";import{t as te}from"./textarea-BNxO_Zsf.js";import{a as C,i as ne,l as re,n as w,o as T,r as ie,s as E,t as D}from"./alert-dialog-BYzNCmBp.js";import{s as O}from"./elbv2-B_G5anft.js";var k=class extends m(h,g,`ImportCertificate`,p){},ae=t(n(),1),oe=r(),A=new TextEncoder;function j(){let e=(0,oe.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:M,onSuccess:()=>{t.invalidateQueries({queryKey:[`acm`,`certificates`]})}},e[0]=t,e[1]=n),a(n)}async function M(e){let t=new k({Certificate:A.encode(e.certificate),PrivateKey:A.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?A.encode(e.certificateChain):void 0});return await f().send(t)}var N=e();function P(e){let t=(0,oe.c)(53),{open:n,onOpenChange:r,onImported:i}=e,[a,o]=(0,ae.useState)(``),[s,c]=(0,ae.useState)(``),[l,u]=(0,ae.useState)(``),d=j(),ee;t[0]===d?ee=t[1]:(ee=()=>{o(``),c(``),u(``),d.reset()},t[0]=d,t[1]=ee);let f=ee,p;t[2]!==r||t[3]!==f?(p=e=>{e||f(),r(e)},t[2]=r,t[3]=f,t[4]=p):p=t[4];let m=p,h;t[5]!==a||t[6]!==s?(h=a.trim().length>0&&s.trim().length>0,t[5]=a,t[6]=s,t[7]=h):h=t[7];let g=h,_;t[8]!==g||t[9]!==a||t[10]!==l||t[11]!==d||t[12]!==i||t[13]!==r||t[14]!==s||t[15]!==f?(_=async()=>{if(g)try{let e=await d.mutateAsync({certificate:a,privateKey:s,certificateChain:l});e.CertificateArn&&i(e.CertificateArn),f(),r(!1)}catch{}},t[8]=g,t[9]=a,t[10]=l,t[11]=d,t[12]=i,t[13]=r,t[14]=s,t[15]=f,t[16]=_):_=t[16];let v=_,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,N.jsxs)(E,{children:[(0,N.jsx)(re,{children:`Import certificate`}),(0,N.jsx)(C,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),t[17]=b):b=t[17];let O;t[18]===d.error?O=t[19]:(O=d.error&&(0,N.jsx)(y,{error:d.error,msg:`Failed to import certificate`}),t[18]=d.error,t[19]=O);let k;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),t[20]=k):k=t[20];let A;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{o(e.target.value)},t[21]=A):A=t[21];let M;t[22]===a?M=t[23]:(M=(0,N.jsxs)(S,{children:[k,(0,N.jsx)(te,{size:`sm`,variant:`code`,id:`cert-body`,onChange:A,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:a})]}),t[22]=a,t[23]=M);let P;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),t[24]=P):P=t[24];let F;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{c(e.target.value)},t[25]=F):F=t[25];let I;t[26]===s?I=t[27]:(I=(0,N.jsxs)(S,{children:[P,(0,N.jsx)(te,{size:`sm`,variant:`code`,id:`cert-key`,onChange:F,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:s})]}),t[26]=s,t[27]=I);let L;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),t[28]=L):L=t[28];let R;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{u(e.target.value)},t[29]=R):R=t[29];let z;t[30]===l?z=t[31]:(z=(0,N.jsxs)(S,{children:[L,(0,N.jsx)(te,{size:`sm`,variant:`code`,id:`cert-chain`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:l})]}),t[30]=l,t[31]=z);let B;t[32]!==I||t[33]!==z||t[34]!==M?(B=(0,N.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[M,I,z]}),t[32]=I,t[33]=z,t[34]=M,t[35]=B):B=t[35];let V;t[36]===d.isPending?V=t[37]:(V=(0,N.jsx)(ie,{disabled:d.isPending,children:`Cancel`}),t[36]=d.isPending,t[37]=V);let se=!g||d.isPending,ce=d.isPending?`Importing…`:`Import`,H;t[38]!==v||t[39]!==se||t[40]!==ce?(H=(0,N.jsx)(w,{disabled:se,onClick:v,children:ce}),t[38]=v,t[39]=se,t[40]=ce,t[41]=H):H=t[41];let U;t[42]!==V||t[43]!==H?(U=(0,N.jsxs)(T,{children:[V,H]}),t[42]=V,t[43]=H,t[44]=U):U=t[44];let W;t[45]!==B||t[46]!==U||t[47]!==O?(W=(0,N.jsxs)(ne,{width:`lg`,children:[b,O,B,U]}),t[45]=B,t[46]=U,t[47]=O,t[48]=W):W=t[48];let G;return t[49]!==m||t[50]!==n||t[51]!==W?(G=(0,N.jsx)(D,{onOpenChange:m,open:n,children:W}),t[49]=m,t[50]=n,t[51]=W,t[52]=G):G=t[52],G}var F=80,I=443,L=[],R=[];function z(e){let t=e.CertificateArn?.split(`/`).pop()??e.CertificateArn??``;return e.DomainName?`${e.DomainName} · ${t}`:t}function B(e,t){if(!O(e))return{port:t.port===I?F:t.port,certificateArn:void 0,sslPolicy:void 0};let n=e===`HTTPS`?t.sslPolicy||`ELBSecurityPolicy-2016-08`:void 0;return{port:t.port===F?I:t.port,certificateArn:t.certificateArn,sslPolicy:n}}function V(e){let t=(0,oe.c)(55),{form:n,protocols:r,targetGroups:i,certificates:a,sslPolicies:s}=e,f=a===void 0?L:a,p=s===void 0?R:s,{control:m,register:h,getValues:g,setValue:y,formState:te}=n,{errors:C}=te,[ne,re]=(0,ae.useState)(!1),w;t[0]===m?w=t[1]:(w={control:m,name:`protocol`},t[0]=m,t[1]=w);let T=_(w),ie=T===`HTTPS`,E;t[2]===T?E=t[3]:(E=O(T),t[2]=T,t[3]=E);let D=E,k;t[4]!==g||t[5]!==y?(k=e=>{if(!e)return;let t=B(e,g());y(`port`,t.port),y(`certificateArn`,t.certificateArn),y(`sslPolicy`,t.sslPolicy)},t[4]=g,t[5]=y,t[6]=k):k=t[6];let A=k,j;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),t[7]=j):j=t[7];let M;t[8]!==A||t[9]!==r?(M=e=>{let{field:t}=e;return(0,N.jsxs)(u,{onValueChange:e=>{t.onChange(e),A(e)},value:t.value,children:[(0,N.jsx)(l,{className:`w-full`,id:`listener-protocol`,children:(0,N.jsx)(o,{})}),(0,N.jsx)(c,{children:r.map(U)})]})},t[8]=A,t[9]=r,t[10]=M):M=t[10];let F;t[11]!==m||t[12]!==M?(F=(0,N.jsxs)(S,{children:[j,(0,N.jsx)(v,{control:m,name:`protocol`,render:M})]}),t[11]=m,t[12]=M,t[13]=F):F=t[13];let I;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),t[14]=I):I=t[14];let z=!!C.port,V=D?`443`:`80`,W;t[15]===h?W=t[16]:(W=h(`port`,{valueAsNumber:!0}),t[15]=h,t[16]=W);let G;t[17]!==z||t[18]!==V||t[19]!==W?(G=(0,N.jsx)(ee,{"aria-invalid":z,id:`listener-port`,inputMode:`numeric`,placeholder:V,type:`number`,...W}),t[17]=z,t[18]=V,t[19]=W,t[20]=G):G=t[20];let K;t[21]===C.port?K=t[22]:(K=(0,N.jsx)(b,{errors:[C.port]}),t[21]=C.port,t[22]=K);let q;t[23]!==G||t[24]!==K?(q=(0,N.jsxs)(S,{children:[I,G,K]}),t[23]=G,t[24]=K,t[25]=q):q=t[25];let J;t[26]!==f||t[27]!==m||t[28]!==C.certificateArn||t[29]!==ne||t[30]!==ie||t[31]!==D||t[32]!==y||t[33]!==p?(J=D&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(S,{children:[(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,N.jsx)(v,{control:m,name:`certificateArn`,render:e=>{let{field:t}=e;return(0,N.jsxs)(u,{onValueChange:t.onChange,value:t.value??``,children:[(0,N.jsx)(l,{"aria-invalid":!!C.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,N.jsx)(o,{placeholder:`Select certificate`})}),(0,N.jsx)(c,{children:f.map(H)})]})}}),(0,N.jsx)(b,{errors:[C.certificateArn]}),(0,N.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[f.length===0&&(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,N.jsx)(d,{className:`ml-auto`,onClick:()=>{re(!0)},size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),ie&&(0,N.jsxs)(S,{children:[(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,N.jsx)(v,{control:m,name:`sslPolicy`,render:e=>{let{field:t}=e;return(0,N.jsxs)(u,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,N.jsx)(l,{className:`w-full`,id:`listener-ssl-policy`,children:(0,N.jsx)(o,{})}),(0,N.jsx)(c,{children:p.map(ce)})]})}})]}),(0,N.jsx)(P,{onImported:e=>{y(`certificateArn`,e,{shouldValidate:!0})},onOpenChange:re,open:ne})]}),t[26]=f,t[27]=m,t[28]=C.certificateArn,t[29]=ne,t[30]=ie,t[31]=D,t[32]=y,t[33]=p,t[34]=J):J=t[34];let le;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,N.jsx)(x,{children:(0,N.jsx)(`label`,{htmlFor:`listener-default-tg`,children:`Default target group`})}),t[35]=le):le=t[35];let Y;t[36]!==C.defaultTargetGroupArn||t[37]!==i?(Y=e=>{let{field:t}=e;return(0,N.jsxs)(u,{onValueChange:t.onChange,value:t.value??``,children:[(0,N.jsx)(l,{"aria-invalid":!!C.defaultTargetGroupArn,className:`w-full`,id:`listener-default-tg`,children:(0,N.jsx)(o,{placeholder:`Select target group`})}),(0,N.jsx)(c,{children:i.map(se)})]})},t[36]=C.defaultTargetGroupArn,t[37]=i,t[38]=Y):Y=t[38];let X;t[39]!==m||t[40]!==Y?(X=(0,N.jsx)(v,{control:m,name:`defaultTargetGroupArn`,render:Y}),t[39]=m,t[40]=Y,t[41]=X):X=t[41];let Z;t[42]===C.defaultTargetGroupArn?Z=t[43]:(Z=(0,N.jsx)(b,{errors:[C.defaultTargetGroupArn]}),t[42]=C.defaultTargetGroupArn,t[43]=Z);let Q;t[44]===i.length?Q=t[45]:(Q=i.length===0&&(0,N.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups available in this VPC. Create one first.`}),t[44]=i.length,t[45]=Q);let $;t[46]!==X||t[47]!==Z||t[48]!==Q?($=(0,N.jsxs)(S,{children:[le,X,Z,Q]}),t[46]=X,t[47]=Z,t[48]=Q,t[49]=$):$=t[49];let ue;return t[50]!==q||t[51]!==J||t[52]!==$||t[53]!==F?(ue=(0,N.jsxs)(N.Fragment,{children:[F,q,J,$]}),t[50]=q,t[51]=J,t[52]=$,t[53]=F,t[54]=ue):ue=t[54],ue}function se(e){return(0,N.jsxs)(s,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function ce(e){return(0,N.jsx)(s,{value:e.Name??``,children:e.Name},e.Name)}function H(e){return(0,N.jsx)(s,{value:e.CertificateArn??``,children:z(e)},e.CertificateArn)}function U(e){return(0,N.jsx)(s,{value:e,children:e},e)}export{B as n,P as r,V as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-8RMGpU18.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-B3erxZcb.js similarity index 59% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-8RMGpU18.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-B3erxZcb.js index 97ed41423..176a97b0f 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-8RMGpU18.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-B3erxZcb.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-instances-BkaiNDDU.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/chevron-down-DuqoHmYM.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/cli-command-panel-DPooQRso.js","assets/copy-3Ip4Zkw5.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-DFivrtZe.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ec2-CmqOirWQ.js","assets/system-managed-Dk7ySh_E.js","assets/gpu-instance-type-select-Dr56r-me.js","assets/collapsible-BFqxt1IG.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{M as a,O as o,c as s,h as c,o as l,p as u,w as d,y as f}from"./ec2-DJL24ekw.js";var p=()=>i(()=>import(`./run-instances-BkaiNDDU.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])),m=r({launchTemplateId:n().optional().catch(void 0),launchTemplateVersion:n().optional().catch(void 0)}),h=e(`/_auth/ec2/(instances)/run-instances`)({validateSearch:m,loader:async({context:e})=>{await Promise.all([e.queryClient.query({...l,staleTime:`static`}),e.queryClient.query({...u,staleTime:`static`}),e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...o,staleTime:`static`}),e.queryClient.query({...f,staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...d,staleTime:`static`}),e.queryClient.query({...c,staleTime:`static`})])},head:()=>({meta:[{title:`Run Instances | EC2 | Mulga`}]}),component:t(p,`component`)});export{h as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-instances-BfaIx5Tj.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/chevron-down-DuqoHmYM.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/cli-command-panel-DPooQRso.js","assets/copy-3Ip4Zkw5.js","assets/use-copy-to-clipboard-Bscc1MgN.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ec2-iXujaheD.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/subnet-calculator-DDrAb5xp.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ec2-Cr9GrTUU.js","assets/elbv2-B_G5anft.js","assets/system-managed-Dk7ySh_E.js","assets/gpu-instance-type-select-Dr56r-me.js","assets/collapsible-BFqxt1IG.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{M as a,O as o,c as s,h as c,o as l,p as u,w as d,y as f}from"./ec2-DJL24ekw.js";var p=()=>i(()=>import(`./run-instances-BfaIx5Tj.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])),m=r({launchTemplateId:n().optional().catch(void 0),launchTemplateVersion:n().optional().catch(void 0)}),h=e(`/_auth/ec2/(instances)/run-instances`)({validateSearch:m,loader:async({context:e})=>{await Promise.all([e.queryClient.query({...l,staleTime:`static`}),e.queryClient.query({...u,staleTime:`static`}),e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...o,staleTime:`static`}),e.queryClient.query({...f,staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...d,staleTime:`static`}),e.queryClient.query({...c,staleTime:`static`})])},head:()=>({meta:[{title:`Run Instances | EC2 | Mulga`}]}),component:t(p,`component`)});export{h as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-BfaIx5Tj.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-BfaIx5Tj.js new file mode 100644 index 000000000..6d660691e --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-BfaIx5Tj.js @@ -0,0 +1,18 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as ee}from"./useQuery-DVjCHx2S.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as te}from"./useNavigate-BiiHYpLW.js";import{M as ne,O as re}from"./httpRequest-Bc1WZmsd.js";import{t as ie}from"./back-link-DjawJm5W.js";import{t as ae}from"./chevron-down-DuqoHmYM.js";import{c as a,i as o,n as s,s as c,t as l}from"./select-Bgl6IAYG.js";import{t as oe}from"./cli-command-panel-DPooQRso.js";import{t as se}from"./button-Bae9vdts.js";import{t as u}from"./input-CpcyJw4R.js";import{M as ce,O as le,c as ue,h as de,m as fe,o as pe,p as me,w as he,y as ge}from"./ec2-DJL24ekw.js";import{f as _e}from"./ec2-iXujaheD.js";import{t as d}from"./run-instances-B3erxZcb.js";import{t as ve}from"./page-heading-M0NyqAmu.js";import{a as f,i as ye,n as p,t as be}from"./zod-VwMMRSfy.js";import{t as xe}from"./error-banner-BcDqaPk7.js";import{n as Se,r as m,s as h,t as g}from"./field-ChkDR_wL.js";import{b as Ce,i as we,t as Te}from"./ec2-Cr9GrTUU.js";import{i as Ee}from"./system-managed-Dk7ySh_E.js";import{t as De}from"./gpu-instance-type-select-Dr56r-me.js";import{n as Oe,r as ke,t as Ae}from"./collapsible-BFqxt1IG.js";var je=r(),Me=t(n(),1),_=e(),Ne=`/dev/sda1`,Pe=`gp3`,Fe=1,Ie=16384;function v(e){let t=(0,je.c)(140),{launchTemplateId:n,launchTemplateVersion:r}=e,d=te(),{data:Ee}=i(pe),{data:Ne}=i(me),{data:v}=i(ue),{data:it}=i(le),{data:at}=i(ge),{data:ot}=i(ce),{data:st}=i(he),{data:ct}=i(de),y=_e(),lt;t[0]===Ee.Images?lt=t[1]:(lt=Ee.Images??[],t[0]=Ee.Images,t[1]=lt);let b=lt.filter(et),ut;t[2]===Ne.KeyPairs?ut=t[3]:(ut=Ne.KeyPairs??[],t[2]=Ne.KeyPairs,t[3]=ut);let dt=ut,ft;t[4]===it.Subnets?ft=t[5]:(ft=it.Subnets??[],t[4]=it.Subnets,t[5]=ft);let pt=ft,mt;t[6]===at.PlacementGroups?mt=t[7]:(mt=at.PlacementGroups??[],t[6]=at.PlacementGroups,t[7]=mt);let ht=mt,gt;t[8]===ot.Vpcs?gt=t[9]:(gt=ot.Vpcs??[],t[8]=ot.Vpcs,t[9]=gt);let _t=gt,vt;t[10]===st.SecurityGroups?vt=t[11]:(vt=st.SecurityGroups??[],t[10]=st.SecurityGroups,t[11]=vt);let yt=vt,bt;t[12]===ct.LaunchTemplates?bt=t[13]:(bt=ct.LaunchTemplates??[],t[12]=ct.LaunchTemplates,t[13]=bt);let xt=bt,St;t[14]===_t?St=t[15]:(St=(_t.find($e)??_t[0])?.VpcId,t[14]=_t,t[15]=St);let Ct=St,wt=Ce(yt.map(Qe)),x;if(t[16]!==v.InstanceTypes){x={};for(let e of v.InstanceTypes??[]){let t=e.InstanceType;t&&(x[t]=(x[t]??0)+1)}t[16]=v.InstanceTypes,t[17]=x}else x=t[17];let S=Object.keys(x).toSorted(),Tt=b[0]?.ImageId,Et=dt[0]?.KeyName,Dt=S.find(Ze)??S[0],Ot=tt(b.find(e=>e.ImageId===Tt)),kt;t[18]===x?kt=t[19]:(kt=e=>!e.instanceType||e.count<=(x[e.instanceType]??1),t[18]=x,t[19]=kt);let{control:C,handleSubmit:At,register:w,setValue:T,getValues:jt,watch:Mt,formState:Nt}=ye({resolver:be(we.refine(kt,{message:`Cannot exceed available capacity`,path:[`count`]}).superRefine((e,t)=>{let n=tt(b.find(t=>t.ImageId===e.imageId)).snapshotSize;e.rootVolumeSize!==void 0&&n!==void 0&&e.rootVolumeSizee.InstanceType===It))?.GpuInfo?.Gpus?.[0],Rt=D?.Name?.startsWith(`MIG `)?D.Name.slice(4):void 0,zt;t[22]===C?zt=t[23]:(zt={control:C,name:`imageId`},t[22]=C,t[23]=zt);let Bt=f(zt),Vt;t[24]===Bt?Vt=t[25]:(Vt=e=>e.ImageId===Bt,t[24]=Bt,t[25]=Vt);let O=tt(b.find(Vt)),Ht;t[26]===C?Ht=t[27]:(Ht={control:C,name:`subnetId`},t[26]=C,t[27]=Ht);let Ut=f(Ht),Wt;t[28]===C?Wt=t[29]:(Wt={control:C,name:`securityGroupMode`},t[28]=C,t[29]=Wt);let Gt=f(Wt),Kt;t[30]===C?Kt=t[31]:(Kt={control:C,name:`ruleSource`},t[30]=C,t[31]=Kt);let qt=f(Kt),Jt=f({control:C,name:`securityGroupIds`})??[],Yt;t[32]===Jt?Yt=t[33]:(Yt=new Set(Jt),t[32]=Jt,t[33]=Yt);let Xt=Yt,Zt;t[34]===C?Zt=t[35]:(Zt={control:C,name:`launchTemplateId`},t[34]=C,t[35]=Zt);let k=f(Zt),Qt;t[36]===C?Qt=t[37]:(Qt={control:C,name:`launchTemplateVersion`},t[36]=C,t[37]=Qt);let $t=f(Qt),en=k??``,A;t[38]===en?A=t[39]:(A=fe(en),t[38]=en,t[39]=A);let tn=!!k,nn;t[40]!==A||t[41]!==tn?(nn={...A,enabled:tn},t[40]=A,t[41]=tn,t[42]=nn):nn=t[42];let rn=ee(nn),an;t[43]===rn.data?.LaunchTemplateVersions?an=t[44]:(an=rn.data?.LaunchTemplateVersions??[],t[43]=rn.data?.LaunchTemplateVersions,t[44]=an);let j=an,on;t[45]!==$t||t[46]!==j?(on=nt(j,$t)?.LaunchTemplateData,t[45]=$t,t[46]=j,t[47]=on):on=t[47];let M=on,sn;t[48]!==Ct||t[49]!==Ut||t[50]!==pt?(sn=pt.find(e=>e.SubnetId===Ut)?.VpcId??Ct,t[48]=Ct,t[49]=Ut,t[50]=pt,t[51]=sn):sn=t[51];let N=sn,cn;t[52]!==N||t[53]!==yt?(cn=N?yt.filter(e=>e.VpcId===N):yt,t[52]=N,t[53]=yt,t[54]=cn):cn=t[54];let ln=cn,un;t[55]!==jt||t[56]!==T?(un=e=>{let t=jt(`securityGroupIds`)??[],n=t.includes(e)?t.filter(t=>t!==e):[...t,e];T(`securityGroupIds`,n,{shouldValidate:!0})},t[55]=jt,t[56]=T,t[57]=un):un=t[57];let dn=un,fn,pn;t[58]!==O.deviceName||t[59]!==T?(fn=()=>{T(`rootDeviceName`,O.deviceName)},pn=[O.deviceName,T],t[58]=O.deviceName,t[59]=T,t[60]=fn,t[61]=pn):(fn=t[60],pn=t[61]),(0,Me.useEffect)(fn,pn);let mn;t[62]!==y||t[63]!==N||t[64]!==d?(mn=async e=>{let t=e.launchTemplateId?{count:e.count,launchTemplateId:e.launchTemplateId,launchTemplateVersion:e.launchTemplateVersion,resolvedVpcId:N}:{...e,resolvedVpcId:N};await y.mutateAsync(t),d({to:`/ec2/describe-instances`})},t[62]=y,t[63]=N,t[64]=d,t[65]=mn):mn=t[65];let hn=mn,P,F;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(ie,{to:`/ec2/describe-instances`,children:`Back to instances`}),F=(0,_.jsx)(ve,{title:`Run Instances`}),t[66]=P,t[67]=F):(P=t[66],F=t[67]);let I;t[68]!==k||t[69]!==S?(I=S.length===0&&!k&&(0,_.jsx)(xe,{msg:`No compute available. No new instances can be created until compute is available.`}),t[68]=k,t[69]=S,t[70]=I):I=t[70];let L;t[71]===y.error?L=t[72]:(L=y.error&&(0,_.jsx)(xe,{error:y.error,msg:`Failed to create instance`}),t[71]=y.error,t[72]=L);let R;t[73]!==At||t[74]!==hn?(R=At(hn),t[73]=At,t[74]=hn,t[75]=R):R=t[75];let gn;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(gn=(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateId`,children:`Launch Template`})}),t[76]=gn):gn=t[76];let z;t[77]===xt?z=t[78]:(z=e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,_.jsx)(c,{className:`w-full`,id:`launchTemplateId`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`none`,children:`none`}),xt.map(Xe)]})]})},t[77]=xt,t[78]=z);let B;t[79]!==C||t[80]!==z?(B=(0,_.jsxs)(g,{children:[gn,(0,_.jsx)(p,{control:C,name:`launchTemplateId`,render:z})]}),t[79]=C,t[80]=z,t[81]=B):B=t[81];let V;t[82]!==C||t[83]!==M||t[84]!==k||t[85]!==j?(V=k&&(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateVersion`,children:`Version`})}),(0,_.jsx)(p,{control:C,name:`launchTemplateVersion`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??`$Default`,children:[(0,_.jsx)(c,{className:`w-full`,id:`launchTemplateVersion`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`$Default`,children:`$Default`}),(0,_.jsx)(o,{value:`$Latest`,children:`$Latest`}),j.map(Ye)]})]})}}),M&&(0,_.jsxs)(`div`,{className:`mt-3 space-y-1 rounded-md border border-border p-3 text-xs`,children:[(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`Configuration from this version:`}),(0,_.jsxs)(`p`,{children:[`Image:`,` `,(0,_.jsx)(`span`,{className:`font-mono`,children:M.ImageId??`—`})]}),(0,_.jsxs)(`p`,{children:[`Instance type:`,` `,(0,_.jsx)(`span`,{className:`font-mono`,children:M.InstanceType??`—`})]}),(0,_.jsxs)(`p`,{children:[`Key pair:`,` `,(0,_.jsx)(`span`,{className:`font-mono`,children:M.KeyName??`—`})]})]})]}),t[82]=C,t[83]=M,t[84]=k,t[85]=j,t[86]=V):V=t[86];let _n=!k&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,_.jsx)(p,{control:C,name:`imageId`,render:e=>{let{field:t}=e,n=b.find(e=>e.ImageId===t.value);return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,_.jsx)(c,{"aria-invalid":!!E.imageId,className:`w-full`,id:`imageId`,children:(0,_.jsx)(a,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,_.jsx)(s,{children:b.map(Je)})]})}}),(0,_.jsx)(m,{errors:[E.imageId]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,_.jsx)(p,{control:C,name:`instanceType`,render:e=>{let{field:t}=e;return(0,_.jsx)(De,{"aria-invalid":!!E.instanceType,availabilityByType:x,className:`w-full`,id:`instanceType`,instanceTypes:v.InstanceTypes??[],onValueChange:t.onChange,value:t.value??``})}}),D&&(0,_.jsxs)(Se,{children:[`GPU: `,D.Name,D.MemoryInfo?.SizeInMiB!==void 0&&` · ${re(D.MemoryInfo.SizeInMiB)} VRAM`,Rt&&` · MIG ${Rt} slice`]}),(0,_.jsx)(m,{errors:[E.instanceType]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,_.jsx)(p,{control:C,name:`keyName`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,_.jsx)(c,{"aria-invalid":!!E.keyName,className:`w-full`,id:`keyName`,children:(0,_.jsx)(a,{})}),(0,_.jsx)(s,{children:dt.map(qe)})]})}}),(0,_.jsx)(m,{errors:[E.keyName]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,_.jsx)(p,{control:C,name:`subnetId`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,_.jsx)(c,{className:`w-full`,id:`subnetId`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`none`,children:`none`}),pt.map(Ke)]})]})}})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:`Security Group`}),(0,_.jsx)(Se,{children:N?`Applies to VPC ${N}`:`No VPC resolved — select a subnet`}),(0,_.jsx)(p,{control:C,name:`securityGroupMode`,render:Ge}),Gt===`create`?(0,_.jsxs)(`div`,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`newSgName`,children:`Name`})}),(0,_.jsx)(u,{"aria-invalid":!!E.newSgName,id:`newSgName`,type:`text`,...w(`newSgName`)}),(0,_.jsx)(m,{errors:[E.newSgName]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`newSgDescription`,children:`Description`})}),(0,_.jsx)(u,{id:`newSgDescription`,type:`text`,...w(`newSgDescription`)})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:`Inbound rules`}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(p,{control:C,name:`allowSsh`,render:We}),(0,_.jsx)(p,{control:C,name:`allowHttp`,render:Ue}),(0,_.jsx)(p,{control:C,name:`allowHttps`,render:He})]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:`Source`}),(0,_.jsx)(p,{control:C,name:`ruleSource`,render:Ve}),qt===`custom`&&(0,_.jsxs)(`div`,{className:`mt-2`,children:[(0,_.jsx)(u,{"aria-invalid":!!E.customCidr,placeholder:`203.0.113.0/24`,type:`text`,...w(`customCidr`)}),(0,_.jsx)(m,{errors:[E.customCidr]})]})]})]}):(0,_.jsxs)(`div`,{className:`mt-3`,children:[ln.length===0?(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the resolved VPC.`}):(0,_.jsx)(`div`,{className:`space-y-1`,children:ln.map(e=>(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,_.jsx)(`input`,{"aria-label":`Security group ${ne(e)}`,checked:Xt.has(e.GroupId??``),onChange:()=>{dn(e.GroupId??``)},type:`checkbox`}),(0,_.jsx)(`span`,{className:`font-mono`,children:ne(e)})]},e.GroupId))}),(0,_.jsx)(m,{errors:[E.securityGroupIds]})]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`placementGroupName`,children:`Placement Group`})}),(0,_.jsx)(p,{control:C,name:`placementGroupName`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,_.jsx)(c,{className:`w-full`,id:`placementGroupName`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`none`,children:`none`}),ht.map(Be)]})]})}})]})]}),vn;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(vn=(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),t[87]=vn):vn=t[87];let yn=!!E.count,H;t[88]===w?H=t[89]:(H=w(`count`,{valueAsNumber:!0}),t[88]=w,t[89]=H);let U;t[90]!==yn||t[91]!==H?(U=(0,_.jsx)(u,{"aria-describedby":`count-description`,"aria-invalid":yn,id:`count`,type:`number`,...H}),t[90]=yn,t[91]=H,t[92]=U):U=t[92];let bn=It&&`Available capacity for ${It}: ${Lt}`,W;t[93]===bn?W=t[94]:(W=(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:bn}),t[93]=bn,t[94]=W);let G;t[95]===E.count?G=t[96]:(G=(0,_.jsx)(m,{errors:[E.count]}),t[95]=E.count,t[96]=G);let K;t[97]!==U||t[98]!==W||t[99]!==G?(K=(0,_.jsxs)(g,{children:[vn,U,W,G]}),t[97]=U,t[98]=W,t[99]=G,t[100]=K):K=t[100];let q;t[101]!==C||t[102]!==E.rootDeviceName||t[103]!==E.rootVolumeSize||t[104]!==E.rootVolumeType||t[105]!==w||t[106]!==O.snapshotSize||t[107]!==k?(q=!k&&(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(Ae,{children:[(0,_.jsxs)(ke,{className:`group`,variant:`field`,render:(0,_.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,_.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,_.jsx)(ae,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),(0,_.jsxs)(Oe,{className:`mt-3`,variant:`panel`,children:[(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`rootDeviceName`,children:`Device Name`})}),(0,_.jsx)(u,{"aria-invalid":!!E.rootDeviceName,id:`rootDeviceName`,type:`text`,...w(`rootDeviceName`)}),(0,_.jsx)(m,{errors:[E.rootDeviceName]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),(0,_.jsx)(u,{"aria-invalid":!!E.rootVolumeSize,id:`rootVolumeSize`,max:Ie,min:O.snapshotSize??Fe,placeholder:O.snapshotSize?`${O.snapshotSize} (AMI default)`:`use AMI / backend default`,type:`number`,...w(`rootVolumeSize`,{setValueAs:ze})}),O.snapshotSize!==void 0&&(0,_.jsxs)(Se,{children:[`AMI snapshot size: `,O.snapshotSize,` GiB`]}),(0,_.jsx)(m,{errors:[E.rootVolumeSize]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),(0,_.jsx)(p,{control:C,name:`rootVolumeType`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??Pe,children:[(0,_.jsx)(c,{"aria-invalid":!!E.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,_.jsx)(a,{})}),(0,_.jsx)(s,{children:Te.map(Re)})]})}}),(0,_.jsx)(m,{errors:[E.rootVolumeType]})]}),(0,_.jsx)(g,{children:(0,_.jsx)(p,{control:C,name:`rootDeleteOnTermination`,render:Le})})]})]})}),t[101]=C,t[102]=E.rootDeviceName,t[103]=E.rootVolumeSize,t[104]=E.rootVolumeType,t[105]=w,t[106]=O.snapshotSize,t[107]=k,t[108]=q):q=t[108];let J;t[109]!==N||t[110]!==Mt?(J=rt(Mt,N),t[109]=N,t[110]=Mt,t[111]=J):J=t[111];let Y;t[112]===J?Y=t[113]:(Y=(0,_.jsx)(oe,{commands:J}),t[112]=J,t[113]=Y);let xn=Pt||y.isPending,X;t[114]===d?X=t[115]:(X=async()=>{await d({to:`/ec2/describe-instances`})},t[114]=d,t[115]=X);let Z;t[116]!==xn||t[117]!==X?(Z=(0,_.jsx)(se,{disabled:xn,onClick:X,type:`button`,variant:`outline`,children:`Cancel`}),t[116]=xn,t[117]=X,t[118]=Z):Z=t[118];let Sn=Pt||y.isPending||!k&&S.length===0,Cn=Pt||y.isPending?`Creating…`:`Create Instance`,Q;t[119]!==Sn||t[120]!==Cn?(Q=(0,_.jsx)(se,{disabled:Sn,type:`submit`,children:Cn}),t[119]=Sn,t[120]=Cn,t[121]=Q):Q=t[121];let wn;t[122]!==Z||t[123]!==Q?(wn=(0,_.jsxs)(`div`,{className:`flex gap-2`,children:[Z,Q]}),t[122]=Z,t[123]=Q,t[124]=wn):wn=t[124];let $;t[125]!==R||t[126]!==B||t[127]!==V||t[128]!==_n||t[129]!==K||t[130]!==q||t[131]!==Y||t[132]!==wn?($=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:R,children:[B,V,_n,K,q,Y,wn]}),t[125]=R,t[126]=B,t[127]=V,t[128]=_n,t[129]=K,t[130]=q,t[131]=Y,t[132]=wn,t[133]=$):$=t[133];let Tn;return t[134]!==P||t[135]!==F||t[136]!==I||t[137]!==L||t[138]!==$?(Tn=(0,_.jsxs)(_.Fragment,{children:[P,F,I,L,$]}),t[134]=P,t[135]=F,t[136]=I,t[137]=L,t[138]=$,t[139]=Tn):Tn=t[139],Tn}function Le(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Delete on termination`,checked:t.value??!0,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Delete on termination`]})}function Re(e){return(0,_.jsx)(o,{value:e,children:e},e)}function ze(e){return e===``||e==null?void 0:Number(e)}function Be(e){return(0,_.jsxs)(o,{value:e.GroupName??``,children:[e.GroupName,` (`,e.Strategy,`)`]},e.GroupId)}function Ve(e){let{field:t}=e;return(0,_.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Source anywhere`,checked:t.value===`anywhere`,name:t.name,onChange:()=>{t.onChange(`anywhere`)},type:`radio`}),`Anywhere (0.0.0.0/0)`]}),(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Source custom CIDR`,checked:t.value===`custom`,name:t.name,onChange:()=>{t.onChange(`custom`)},type:`radio`}),`Custom CIDR`]})]})}function He(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Allow HTTPS`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Allow HTTPS (tcp/443)`]})}function Ue(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Allow HTTP`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Allow HTTP (tcp/80)`]})}function We(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Allow SSH`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Allow SSH (tcp/22)`]})}function Ge(e){let{field:t}=e;return(0,_.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Create new security group`,checked:t.value===`create`,name:t.name,onChange:()=>{t.onChange(`create`)},type:`radio`}),`Create new`]}),(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Select existing security group`,checked:t.value===`existing`,name:t.name,onChange:()=>{t.onChange(`existing`)},type:`radio`}),`Select existing`]})]})}function Ke(e){return(0,_.jsx)(o,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function qe(e){return(0,_.jsx)(o,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function Je(e){return(0,_.jsxs)(o,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function Ye(e){return(0,_.jsxs)(o,{value:String(e.VersionNumber),children:[`v`,e.VersionNumber]},e.VersionNumber)}function Xe(e){return(0,_.jsx)(o,{value:e.LaunchTemplateId??``,children:e.LaunchTemplateName??e.LaunchTemplateId},e.LaunchTemplateId)}function Ze(e){return e.endsWith(`.nano`)}function Qe(e){return e.GroupName??``}function $e(e){return e.IsDefault}function et(e){return!Ee(e)}function tt(e){let t=e?.RootDeviceName??Ne,n=e?.BlockDeviceMappings??[];return{deviceName:t,snapshotSize:(n.find(e=>e.DeviceName===t)??n[0])?.Ebs?.VolumeSize}}function nt(e,t){if(e.length===0)return;if(!t||t===`$Default`)return e.find(e=>e.DefaultVersion)??e[0];if(t===`$Latest`)return e.toSorted((e,t)=>(t.VersionNumber??0)-(e.VersionNumber??0))[0];let n=Number(t);return e.find(e=>e.VersionNumber===n)}function rt(e,t){let n=e(`launchTemplateId`)??``;if(n){let t=e(`launchTemplateVersion`)||`$Default`,r=e(`count`)??0;return[{label:`Run Instances`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ + --launch-template`},{type:`value`,value:` LaunchTemplateId=${n},Version=${t}`},{type:`flag`,value:` \\ + --count`},{type:`value`,value:` ${r||1}`}]}]}let r=e(`imageId`)??``,ee=e(`instanceType`)??``,i=e(`keyName`)??``,te=e(`subnetId`)??``,ne=e(`placementGroupName`)??``,re=e(`count`)??0,ie=e(`rootDeviceName`)??``,ae=e(`rootVolumeSize`),a=e(`rootVolumeType`),o=e(`rootDeleteOnTermination`),s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ + --image-id`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ + --instance-type`},{type:`value`,value:` ${ee||``}`},{type:`flag`,value:` \\ + --key-name`},{type:`value`,value:` ${i||``}`}];te&&s.push({type:`flag`,value:` \\ + --subnet-id`},{type:`value`,value:` ${te}`}),ne&&s.push({type:`flag`,value:` \\ + --placement`},{type:`value`,value:` GroupName=${ne}`}),s.push({type:`flag`,value:` \\ + --count`},{type:`value`,value:` ${re||1}`});let c=e(`securityGroupMode`)||`create`,l=e(`newSgName`)??``,oe=e(`newSgDescription`)??``,se=e(`ruleSource`)||`anywhere`,u=e(`customCidr`)??``,ce=[];if(c===`create`){ce.push({label:`Create security group`,parts:[{type:`bin`,value:`SG_ID=$(AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\ + --group-name`},{type:`value`,value:` ${l||``}`},{type:`flag`,value:` \\ + --description`},{type:`value`,value:` '${oe||`Created by launch wizard`}'`},{type:`flag`,value:` \\ + --vpc-id`},{type:`value`,value:` ${t??``}`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'GroupId' --output text)`}]});let n=se===`custom`&&u?u:`0.0.0.0/0`,r=[...e(`allowSsh`)===!0?[22]:[],...e(`allowHttp`)===!0?[80]:[],...e(`allowHttps`)===!0?[443]:[]];if(r.length>0){let e=JSON.stringify(r.map(e=>({IpProtocol:`tcp`,FromPort:e,ToPort:e,IpRanges:[{CidrIp:n}]})));ce.push({label:`Authorize inbound rules`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 authorize-security-group-ingress`},{type:`flag`,value:` \\ + --group-id`},{type:`value`,value:` $SG_ID`},{type:`flag`,value:` \\ + --ip-permissions`},{type:`value`,value:` '${e}'`}]})}s.push({type:`flag`,value:` \\ + --security-group-ids`},{type:`value`,value:` $SG_ID`})}else{let t=e(`securityGroupIds`)??[];t.length>0&&s.push({type:`flag`,value:` \\ + --security-group-ids`},{type:`value`,value:` ${t.join(` `)}`})}if(ae!==void 0||a!==void 0||o!==void 0){let e=JSON.stringify([{DeviceName:ie||Ne,Ebs:{VolumeSize:ae,VolumeType:a||void 0,DeleteOnTermination:o}}]);s.push({type:`flag`,value:` \\ + --block-device-mappings`},{type:`value`,value:` '${e}'`})}return[...ce,{label:`Run Instances`,parts:s}]}function it(){let e=(0,je.c)(3),{launchTemplateId:t,launchTemplateVersion:n}=d.useSearch(),r;return e[0]!==t||e[1]!==n?(r=(0,_.jsx)(v,{launchTemplateId:t,launchTemplateVersion:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{it as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-BkaiNDDU.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-BkaiNDDU.js deleted file mode 100644 index dac779e3e..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-instances-BkaiNDDU.js +++ /dev/null @@ -1,18 +0,0 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DTT1fEHg.js";import{t as ee}from"./useQuery-DVjCHx2S.js";import{t as i}from"./useSuspenseQuery-C2bXkW_k.js";import{t as te}from"./useNavigate-BiiHYpLW.js";import{O as ne}from"./httpRequest-Bc1WZmsd.js";import{t as re}from"./back-link-DjawJm5W.js";import{t as ie}from"./chevron-down-DuqoHmYM.js";import{c as a,i as o,n as s,s as c,t as l}from"./select-Bgl6IAYG.js";import{t as ae}from"./cli-command-panel-DPooQRso.js";import{t as oe}from"./button-Bae9vdts.js";import{t as u}from"./input-CpcyJw4R.js";import{M as se,O as ce,c as le,h as ue,m as de,o as fe,p as pe,w as me,y as he}from"./ec2-DJL24ekw.js";import{f as ge}from"./ec2-DFivrtZe.js";import{t as d}from"./run-instances-8RMGpU18.js";import{t as _e}from"./page-heading-M0NyqAmu.js";import{a as f,i as ve,n as p,t as ye}from"./zod-VwMMRSfy.js";import{t as be}from"./error-banner-BcDqaPk7.js";import{n as xe,r as m,s as h,t as g}from"./field-ChkDR_wL.js";import{b as Se,i as Ce,t as we}from"./ec2-CmqOirWQ.js";import{i as Te}from"./system-managed-Dk7ySh_E.js";import{t as Ee}from"./gpu-instance-type-select-Dr56r-me.js";import{n as De,r as Oe,t as ke}from"./collapsible-BFqxt1IG.js";var Ae=r(),je=t(n(),1),_=e(),Me=`/dev/sda1`,Ne=`gp3`,Pe=1,Fe=16384;function v(e){let t=(0,Ae.c)(140),{launchTemplateId:n,launchTemplateVersion:r}=e,d=te(),{data:Te}=i(fe),{data:Me}=i(pe),{data:v}=i(le),{data:rt}=i(ce),{data:it}=i(he),{data:at}=i(se),{data:ot}=i(me),{data:st}=i(ue),y=ge(),ct;t[0]===Te.Images?ct=t[1]:(ct=Te.Images??[],t[0]=Te.Images,t[1]=ct);let b=ct.filter($e),lt;t[2]===Me.KeyPairs?lt=t[3]:(lt=Me.KeyPairs??[],t[2]=Me.KeyPairs,t[3]=lt);let ut=lt,dt;t[4]===rt.Subnets?dt=t[5]:(dt=rt.Subnets??[],t[4]=rt.Subnets,t[5]=dt);let ft=dt,pt;t[6]===it.PlacementGroups?pt=t[7]:(pt=it.PlacementGroups??[],t[6]=it.PlacementGroups,t[7]=pt);let mt=pt,ht;t[8]===at.Vpcs?ht=t[9]:(ht=at.Vpcs??[],t[8]=at.Vpcs,t[9]=ht);let gt=ht,_t;t[10]===ot.SecurityGroups?_t=t[11]:(_t=ot.SecurityGroups??[],t[10]=ot.SecurityGroups,t[11]=_t);let vt=_t,yt;t[12]===st.LaunchTemplates?yt=t[13]:(yt=st.LaunchTemplates??[],t[12]=st.LaunchTemplates,t[13]=yt);let bt=yt,xt;t[14]===gt?xt=t[15]:(xt=(gt.find(Qe)??gt[0])?.VpcId,t[14]=gt,t[15]=xt);let St=xt,Ct=Se(vt.map(Ze)),x;if(t[16]!==v.InstanceTypes){x={};for(let e of v.InstanceTypes??[]){let t=e.InstanceType;t&&(x[t]=(x[t]??0)+1)}t[16]=v.InstanceTypes,t[17]=x}else x=t[17];let S=Object.keys(x).toSorted(),wt=b[0]?.ImageId,Tt=ut[0]?.KeyName,Et=S.find(Xe)??S[0],Dt=et(b.find(e=>e.ImageId===wt)),Ot;t[18]===x?Ot=t[19]:(Ot=e=>!e.instanceType||e.count<=(x[e.instanceType]??1),t[18]=x,t[19]=Ot);let{control:C,handleSubmit:kt,register:w,setValue:T,getValues:At,watch:jt,formState:Mt}=ve({resolver:ye(Ce.refine(Ot,{message:`Cannot exceed available capacity`,path:[`count`]}).superRefine((e,t)=>{let n=et(b.find(t=>t.ImageId===e.imageId)).snapshotSize;e.rootVolumeSize!==void 0&&n!==void 0&&e.rootVolumeSizee.InstanceType===Ft))?.GpuInfo?.Gpus?.[0],Lt=D?.Name?.startsWith(`MIG `)?D.Name.slice(4):void 0,Rt;t[22]===C?Rt=t[23]:(Rt={control:C,name:`imageId`},t[22]=C,t[23]=Rt);let zt=f(Rt),Bt;t[24]===zt?Bt=t[25]:(Bt=e=>e.ImageId===zt,t[24]=zt,t[25]=Bt);let O=et(b.find(Bt)),Vt;t[26]===C?Vt=t[27]:(Vt={control:C,name:`subnetId`},t[26]=C,t[27]=Vt);let Ht=f(Vt),Ut;t[28]===C?Ut=t[29]:(Ut={control:C,name:`securityGroupMode`},t[28]=C,t[29]=Ut);let Wt=f(Ut),Gt;t[30]===C?Gt=t[31]:(Gt={control:C,name:`ruleSource`},t[30]=C,t[31]=Gt);let Kt=f(Gt),qt=f({control:C,name:`securityGroupIds`})??[],Jt;t[32]===qt?Jt=t[33]:(Jt=new Set(qt),t[32]=qt,t[33]=Jt);let Yt=Jt,Xt;t[34]===C?Xt=t[35]:(Xt={control:C,name:`launchTemplateId`},t[34]=C,t[35]=Xt);let k=f(Xt),Zt;t[36]===C?Zt=t[37]:(Zt={control:C,name:`launchTemplateVersion`},t[36]=C,t[37]=Zt);let Qt=f(Zt),$t=k??``,A;t[38]===$t?A=t[39]:(A=de($t),t[38]=$t,t[39]=A);let en=!!k,tn;t[40]!==A||t[41]!==en?(tn={...A,enabled:en},t[40]=A,t[41]=en,t[42]=tn):tn=t[42];let nn=ee(tn),rn;t[43]===nn.data?.LaunchTemplateVersions?rn=t[44]:(rn=nn.data?.LaunchTemplateVersions??[],t[43]=nn.data?.LaunchTemplateVersions,t[44]=rn);let j=rn,an;t[45]!==Qt||t[46]!==j?(an=tt(j,Qt)?.LaunchTemplateData,t[45]=Qt,t[46]=j,t[47]=an):an=t[47];let M=an,on;t[48]!==St||t[49]!==Ht||t[50]!==ft?(on=ft.find(e=>e.SubnetId===Ht)?.VpcId??St,t[48]=St,t[49]=Ht,t[50]=ft,t[51]=on):on=t[51];let N=on,sn;t[52]!==N||t[53]!==vt?(sn=N?vt.filter(e=>e.VpcId===N):vt,t[52]=N,t[53]=vt,t[54]=sn):sn=t[54];let cn=sn,ln;t[55]!==At||t[56]!==T?(ln=e=>{let t=At(`securityGroupIds`)??[],n=t.includes(e)?t.filter(t=>t!==e):[...t,e];T(`securityGroupIds`,n,{shouldValidate:!0})},t[55]=At,t[56]=T,t[57]=ln):ln=t[57];let un=ln,dn,fn;t[58]!==O.deviceName||t[59]!==T?(dn=()=>{T(`rootDeviceName`,O.deviceName)},fn=[O.deviceName,T],t[58]=O.deviceName,t[59]=T,t[60]=dn,t[61]=fn):(dn=t[60],fn=t[61]),(0,je.useEffect)(dn,fn);let pn;t[62]!==y||t[63]!==N||t[64]!==d?(pn=async e=>{let t=e.launchTemplateId?{count:e.count,launchTemplateId:e.launchTemplateId,launchTemplateVersion:e.launchTemplateVersion,resolvedVpcId:N}:{...e,resolvedVpcId:N};await y.mutateAsync(t),d({to:`/ec2/describe-instances`})},t[62]=y,t[63]=N,t[64]=d,t[65]=pn):pn=t[65];let mn=pn,P,F;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(re,{to:`/ec2/describe-instances`,children:`Back to instances`}),F=(0,_.jsx)(_e,{title:`Run Instances`}),t[66]=P,t[67]=F):(P=t[66],F=t[67]);let I;t[68]!==k||t[69]!==S?(I=S.length===0&&!k&&(0,_.jsx)(be,{msg:`No compute available. No new instances can be created until compute is available.`}),t[68]=k,t[69]=S,t[70]=I):I=t[70];let L;t[71]===y.error?L=t[72]:(L=y.error&&(0,_.jsx)(be,{error:y.error,msg:`Failed to create instance`}),t[71]=y.error,t[72]=L);let R;t[73]!==kt||t[74]!==mn?(R=kt(mn),t[73]=kt,t[74]=mn,t[75]=R):R=t[75];let hn;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(hn=(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateId`,children:`Launch Template`})}),t[76]=hn):hn=t[76];let z;t[77]===bt?z=t[78]:(z=e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,_.jsx)(c,{className:`w-full`,id:`launchTemplateId`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`none`,children:`none`}),bt.map(Ye)]})]})},t[77]=bt,t[78]=z);let B;t[79]!==C||t[80]!==z?(B=(0,_.jsxs)(g,{children:[hn,(0,_.jsx)(p,{control:C,name:`launchTemplateId`,render:z})]}),t[79]=C,t[80]=z,t[81]=B):B=t[81];let V;t[82]!==C||t[83]!==M||t[84]!==k||t[85]!==j?(V=k&&(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateVersion`,children:`Version`})}),(0,_.jsx)(p,{control:C,name:`launchTemplateVersion`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??`$Default`,children:[(0,_.jsx)(c,{className:`w-full`,id:`launchTemplateVersion`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`$Default`,children:`$Default`}),(0,_.jsx)(o,{value:`$Latest`,children:`$Latest`}),j.map(Je)]})]})}}),M&&(0,_.jsxs)(`div`,{className:`mt-3 space-y-1 rounded-md border border-border p-3 text-xs`,children:[(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`Configuration from this version:`}),(0,_.jsxs)(`p`,{children:[`Image:`,` `,(0,_.jsx)(`span`,{className:`font-mono`,children:M.ImageId??`—`})]}),(0,_.jsxs)(`p`,{children:[`Instance type:`,` `,(0,_.jsx)(`span`,{className:`font-mono`,children:M.InstanceType??`—`})]}),(0,_.jsxs)(`p`,{children:[`Key pair:`,` `,(0,_.jsx)(`span`,{className:`font-mono`,children:M.KeyName??`—`})]})]})]}),t[82]=C,t[83]=M,t[84]=k,t[85]=j,t[86]=V):V=t[86];let gn=!k&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,_.jsx)(p,{control:C,name:`imageId`,render:e=>{let{field:t}=e,n=b.find(e=>e.ImageId===t.value);return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,_.jsx)(c,{"aria-invalid":!!E.imageId,className:`w-full`,id:`imageId`,children:(0,_.jsx)(a,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,_.jsx)(s,{children:b.map(qe)})]})}}),(0,_.jsx)(m,{errors:[E.imageId]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,_.jsx)(p,{control:C,name:`instanceType`,render:e=>{let{field:t}=e;return(0,_.jsx)(Ee,{"aria-invalid":!!E.instanceType,availabilityByType:x,className:`w-full`,id:`instanceType`,instanceTypes:v.InstanceTypes??[],onValueChange:t.onChange,value:t.value??``})}}),D&&(0,_.jsxs)(xe,{children:[`GPU: `,D.Name,D.MemoryInfo?.SizeInMiB!==void 0&&` · ${ne(D.MemoryInfo.SizeInMiB)} VRAM`,Lt&&` · MIG ${Lt} slice`]}),(0,_.jsx)(m,{errors:[E.instanceType]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,_.jsx)(p,{control:C,name:`keyName`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,_.jsx)(c,{"aria-invalid":!!E.keyName,className:`w-full`,id:`keyName`,children:(0,_.jsx)(a,{})}),(0,_.jsx)(s,{children:ut.map(Ke)})]})}}),(0,_.jsx)(m,{errors:[E.keyName]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,_.jsx)(p,{control:C,name:`subnetId`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,_.jsx)(c,{className:`w-full`,id:`subnetId`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`none`,children:`none`}),ft.map(Ge)]})]})}})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:`Security Group`}),(0,_.jsx)(xe,{children:N?`Applies to VPC ${N}`:`No VPC resolved — select a subnet`}),(0,_.jsx)(p,{control:C,name:`securityGroupMode`,render:We}),Wt===`create`?(0,_.jsxs)(`div`,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`newSgName`,children:`Name`})}),(0,_.jsx)(u,{"aria-invalid":!!E.newSgName,id:`newSgName`,type:`text`,...w(`newSgName`)}),(0,_.jsx)(m,{errors:[E.newSgName]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`newSgDescription`,children:`Description`})}),(0,_.jsx)(u,{id:`newSgDescription`,type:`text`,...w(`newSgDescription`)})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:`Inbound rules`}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(p,{control:C,name:`allowSsh`,render:Ue}),(0,_.jsx)(p,{control:C,name:`allowHttp`,render:He}),(0,_.jsx)(p,{control:C,name:`allowHttps`,render:Ve})]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:`Source`}),(0,_.jsx)(p,{control:C,name:`ruleSource`,render:Be}),Kt===`custom`&&(0,_.jsxs)(`div`,{className:`mt-2`,children:[(0,_.jsx)(u,{"aria-invalid":!!E.customCidr,placeholder:`203.0.113.0/24`,type:`text`,...w(`customCidr`)}),(0,_.jsx)(m,{errors:[E.customCidr]})]})]})]}):(0,_.jsxs)(`div`,{className:`mt-3`,children:[cn.length===0?(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the resolved VPC.`}):(0,_.jsx)(`div`,{className:`space-y-1`,children:cn.map(e=>(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,_.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Yt.has(e.GroupId??``),onChange:()=>{un(e.GroupId??``)},type:`checkbox`}),(0,_.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))}),(0,_.jsx)(m,{errors:[E.securityGroupIds]})]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`placementGroupName`,children:`Placement Group`})}),(0,_.jsx)(p,{control:C,name:`placementGroupName`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e===`none`?void 0:e)},value:t.value??`none`,children:[(0,_.jsx)(c,{className:`w-full`,id:`placementGroupName`,children:(0,_.jsx)(a,{})}),(0,_.jsxs)(s,{children:[(0,_.jsx)(o,{value:`none`,children:`none`}),mt.map(ze)]})]})}})]})]}),_n;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(_n=(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),t[87]=_n):_n=t[87];let vn=!!E.count,H;t[88]===w?H=t[89]:(H=w(`count`,{valueAsNumber:!0}),t[88]=w,t[89]=H);let U;t[90]!==vn||t[91]!==H?(U=(0,_.jsx)(u,{"aria-describedby":`count-description`,"aria-invalid":vn,id:`count`,type:`number`,...H}),t[90]=vn,t[91]=H,t[92]=U):U=t[92];let yn=Ft&&`Available capacity for ${Ft}: ${It}`,W;t[93]===yn?W=t[94]:(W=(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:yn}),t[93]=yn,t[94]=W);let G;t[95]===E.count?G=t[96]:(G=(0,_.jsx)(m,{errors:[E.count]}),t[95]=E.count,t[96]=G);let K;t[97]!==U||t[98]!==W||t[99]!==G?(K=(0,_.jsxs)(g,{children:[_n,U,W,G]}),t[97]=U,t[98]=W,t[99]=G,t[100]=K):K=t[100];let q;t[101]!==C||t[102]!==E.rootDeviceName||t[103]!==E.rootVolumeSize||t[104]!==E.rootVolumeType||t[105]!==w||t[106]!==O.snapshotSize||t[107]!==k?(q=!k&&(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(ke,{children:[(0,_.jsxs)(Oe,{className:`group`,variant:`field`,render:(0,_.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,_.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,_.jsx)(ie,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),(0,_.jsxs)(De,{className:`mt-3`,variant:`panel`,children:[(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`rootDeviceName`,children:`Device Name`})}),(0,_.jsx)(u,{"aria-invalid":!!E.rootDeviceName,id:`rootDeviceName`,type:`text`,...w(`rootDeviceName`)}),(0,_.jsx)(m,{errors:[E.rootDeviceName]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),(0,_.jsx)(u,{"aria-invalid":!!E.rootVolumeSize,id:`rootVolumeSize`,max:Fe,min:O.snapshotSize??Pe,placeholder:O.snapshotSize?`${O.snapshotSize} (AMI default)`:`use AMI / backend default`,type:`number`,...w(`rootVolumeSize`,{setValueAs:Re})}),O.snapshotSize!==void 0&&(0,_.jsxs)(xe,{children:[`AMI snapshot size: `,O.snapshotSize,` GiB`]}),(0,_.jsx)(m,{errors:[E.rootVolumeSize]})]}),(0,_.jsxs)(g,{children:[(0,_.jsx)(h,{children:(0,_.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),(0,_.jsx)(p,{control:C,name:`rootVolumeType`,render:e=>{let{field:t}=e;return(0,_.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??Ne,children:[(0,_.jsx)(c,{"aria-invalid":!!E.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,_.jsx)(a,{})}),(0,_.jsx)(s,{children:we.map(Le)})]})}}),(0,_.jsx)(m,{errors:[E.rootVolumeType]})]}),(0,_.jsx)(g,{children:(0,_.jsx)(p,{control:C,name:`rootDeleteOnTermination`,render:Ie})})]})]})}),t[101]=C,t[102]=E.rootDeviceName,t[103]=E.rootVolumeSize,t[104]=E.rootVolumeType,t[105]=w,t[106]=O.snapshotSize,t[107]=k,t[108]=q):q=t[108];let J;t[109]!==N||t[110]!==jt?(J=nt(jt,N),t[109]=N,t[110]=jt,t[111]=J):J=t[111];let Y;t[112]===J?Y=t[113]:(Y=(0,_.jsx)(ae,{commands:J}),t[112]=J,t[113]=Y);let bn=Nt||y.isPending,X;t[114]===d?X=t[115]:(X=async()=>{await d({to:`/ec2/describe-instances`})},t[114]=d,t[115]=X);let Z;t[116]!==bn||t[117]!==X?(Z=(0,_.jsx)(oe,{disabled:bn,onClick:X,type:`button`,variant:`outline`,children:`Cancel`}),t[116]=bn,t[117]=X,t[118]=Z):Z=t[118];let xn=Nt||y.isPending||!k&&S.length===0,Sn=Nt||y.isPending?`Creating…`:`Create Instance`,Q;t[119]!==xn||t[120]!==Sn?(Q=(0,_.jsx)(oe,{disabled:xn,type:`submit`,children:Sn}),t[119]=xn,t[120]=Sn,t[121]=Q):Q=t[121];let Cn;t[122]!==Z||t[123]!==Q?(Cn=(0,_.jsxs)(`div`,{className:`flex gap-2`,children:[Z,Q]}),t[122]=Z,t[123]=Q,t[124]=Cn):Cn=t[124];let $;t[125]!==R||t[126]!==B||t[127]!==V||t[128]!==gn||t[129]!==K||t[130]!==q||t[131]!==Y||t[132]!==Cn?($=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:R,children:[B,V,gn,K,q,Y,Cn]}),t[125]=R,t[126]=B,t[127]=V,t[128]=gn,t[129]=K,t[130]=q,t[131]=Y,t[132]=Cn,t[133]=$):$=t[133];let wn;return t[134]!==P||t[135]!==F||t[136]!==I||t[137]!==L||t[138]!==$?(wn=(0,_.jsxs)(_.Fragment,{children:[P,F,I,L,$]}),t[134]=P,t[135]=F,t[136]=I,t[137]=L,t[138]=$,t[139]=wn):wn=t[139],wn}function Ie(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Delete on termination`,checked:t.value??!0,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Delete on termination`]})}function Le(e){return(0,_.jsx)(o,{value:e,children:e},e)}function Re(e){return e===``||e==null?void 0:Number(e)}function ze(e){return(0,_.jsxs)(o,{value:e.GroupName??``,children:[e.GroupName,` (`,e.Strategy,`)`]},e.GroupId)}function Be(e){let{field:t}=e;return(0,_.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Source anywhere`,checked:t.value===`anywhere`,name:t.name,onChange:()=>{t.onChange(`anywhere`)},type:`radio`}),`Anywhere (0.0.0.0/0)`]}),(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Source custom CIDR`,checked:t.value===`custom`,name:t.name,onChange:()=>{t.onChange(`custom`)},type:`radio`}),`Custom CIDR`]})]})}function Ve(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Allow HTTPS`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Allow HTTPS (tcp/443)`]})}function He(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Allow HTTP`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Allow HTTP (tcp/80)`]})}function Ue(e){let{field:t}=e;return(0,_.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,_.jsx)(`input`,{"aria-label":`Allow SSH`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),`Allow SSH (tcp/22)`]})}function We(e){let{field:t}=e;return(0,_.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Create new security group`,checked:t.value===`create`,name:t.name,onChange:()=>{t.onChange(`create`)},type:`radio`}),`Create new`]}),(0,_.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{"aria-label":`Select existing security group`,checked:t.value===`existing`,name:t.name,onChange:()=>{t.onChange(`existing`)},type:`radio`}),`Select existing`]})]})}function Ge(e){return(0,_.jsx)(o,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function Ke(e){return(0,_.jsx)(o,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function qe(e){return(0,_.jsxs)(o,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function Je(e){return(0,_.jsxs)(o,{value:String(e.VersionNumber),children:[`v`,e.VersionNumber]},e.VersionNumber)}function Ye(e){return(0,_.jsx)(o,{value:e.LaunchTemplateId??``,children:e.LaunchTemplateName??e.LaunchTemplateId},e.LaunchTemplateId)}function Xe(e){return e.endsWith(`.nano`)}function Ze(e){return e.GroupName??``}function Qe(e){return e.IsDefault}function $e(e){return!Te(e)}function et(e){let t=e?.RootDeviceName??Me,n=e?.BlockDeviceMappings??[];return{deviceName:t,snapshotSize:(n.find(e=>e.DeviceName===t)??n[0])?.Ebs?.VolumeSize}}function tt(e,t){if(e.length===0)return;if(!t||t===`$Default`)return e.find(e=>e.DefaultVersion)??e[0];if(t===`$Latest`)return e.toSorted((e,t)=>(t.VersionNumber??0)-(e.VersionNumber??0))[0];let n=Number(t);return e.find(e=>e.VersionNumber===n)}function nt(e,t){let n=e(`launchTemplateId`)??``;if(n){let t=e(`launchTemplateVersion`)||`$Default`,r=e(`count`)??0;return[{label:`Run Instances`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ - --launch-template`},{type:`value`,value:` LaunchTemplateId=${n},Version=${t}`},{type:`flag`,value:` \\ - --count`},{type:`value`,value:` ${r||1}`}]}]}let r=e(`imageId`)??``,ee=e(`instanceType`)??``,i=e(`keyName`)??``,te=e(`subnetId`)??``,ne=e(`placementGroupName`)??``,re=e(`count`)??0,ie=e(`rootDeviceName`)??``,a=e(`rootVolumeSize`),o=e(`rootVolumeType`),s=e(`rootDeleteOnTermination`),c=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ - --image-id`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ - --instance-type`},{type:`value`,value:` ${ee||``}`},{type:`flag`,value:` \\ - --key-name`},{type:`value`,value:` ${i||``}`}];te&&c.push({type:`flag`,value:` \\ - --subnet-id`},{type:`value`,value:` ${te}`}),ne&&c.push({type:`flag`,value:` \\ - --placement`},{type:`value`,value:` GroupName=${ne}`}),c.push({type:`flag`,value:` \\ - --count`},{type:`value`,value:` ${re||1}`});let l=e(`securityGroupMode`)||`create`,ae=e(`newSgName`)??``,oe=e(`newSgDescription`)??``,u=e(`ruleSource`)||`anywhere`,se=e(`customCidr`)??``,ce=[];if(l===`create`){ce.push({label:`Create security group`,parts:[{type:`bin`,value:`SG_ID=$(AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\ - --group-name`},{type:`value`,value:` ${ae||``}`},{type:`flag`,value:` \\ - --description`},{type:`value`,value:` '${oe||`Created by launch wizard`}'`},{type:`flag`,value:` \\ - --vpc-id`},{type:`value`,value:` ${t??``}`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'GroupId' --output text)`}]});let n=u===`custom`&&se?se:`0.0.0.0/0`,r=[...e(`allowSsh`)===!0?[22]:[],...e(`allowHttp`)===!0?[80]:[],...e(`allowHttps`)===!0?[443]:[]];if(r.length>0){let e=JSON.stringify(r.map(e=>({IpProtocol:`tcp`,FromPort:e,ToPort:e,IpRanges:[{CidrIp:n}]})));ce.push({label:`Authorize inbound rules`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 authorize-security-group-ingress`},{type:`flag`,value:` \\ - --group-id`},{type:`value`,value:` $SG_ID`},{type:`flag`,value:` \\ - --ip-permissions`},{type:`value`,value:` '${e}'`}]})}c.push({type:`flag`,value:` \\ - --security-group-ids`},{type:`value`,value:` $SG_ID`})}else{let t=e(`securityGroupIds`)??[];t.length>0&&c.push({type:`flag`,value:` \\ - --security-group-ids`},{type:`value`,value:` ${t.join(` `)}`})}if(a!==void 0||o!==void 0||s!==void 0){let e=JSON.stringify([{DeviceName:ie||Me,Ebs:{VolumeSize:a,VolumeType:o||void 0,DeleteOnTermination:s}}]);c.push({type:`flag`,value:` \\ - --block-device-mappings`},{type:`value`,value:` '${e}'`})}return[...ce,{label:`Run Instances`,parts:c}]}function rt(){let e=(0,Ae.c)(3),{launchTemplateId:t,launchTemplateVersion:n}=d.useSearch(),r;return e[0]!==t||e[1]!==n?(r=(0,_.jsx)(v,{launchTemplateId:t,launchTemplateVersion:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{rt as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-B-TnTr2m.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-B-TnTr2m.js deleted file mode 100644 index e92583e0e..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-B-TnTr2m.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useQuery-DVjCHx2S.js";import{t as r}from"./useSuspenseQuery-C2bXkW_k.js";import{t as ee}from"./useNavigate-BiiHYpLW.js";import{t as te}from"./back-link-DjawJm5W.js";import{c as ne,i,n as re,s as ie,t as ae}from"./select-Bgl6IAYG.js";import{t as oe}from"./input-CpcyJw4R.js";import{O as se,w as ce}from"./ec2-DJL24ekw.js";import{a as le,o as ue}from"./ecs-DRWPOVsw.js";import{c as de}from"./ecs-BsOdvIYx.js";import{t as a}from"./run-task-BZ2XaUEF.js";import{t as fe}from"./page-heading-M0NyqAmu.js";import{a as pe,i as me,n as he,t as ge}from"./zod-VwMMRSfy.js";import{t as _e}from"./error-banner-BcDqaPk7.js";import{t as ve}from"./form-actions-C3zG6ld2.js";import{r as ye,s as be,t as xe}from"./field-ChkDR_wL.js";import{i as Se}from"./ecs-CA1ohYPx.js";var Ce=t(),o=e();function s(e){return e.split(`/`).at(-1)??e}function c(e){let t=(0,Ce.c)(88),{cluster:i}=e,a=ee(),s=de(),{data:c}=r(ue),{data:l}=r(se),{data:Te}=r(ce),u;t[0]===l.Subnets?u=t[1]:(u=l.Subnets??[],t[0]=l.Subnets,t[1]=u);let Ee=u,d;t[2]===Te.SecurityGroups?d=t[3]:(d=Te.SecurityGroups??[],t[2]=Te.SecurityGroups,t[3]=d);let De=d,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=ge(Se),t[4]=f):f=t[4];let p,m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],m=[],t[5]=p,t[6]=m):(p=t[5],m=t[6]);let h;t[7]===i?h=t[8]:(h={resolver:f,defaultValues:{cluster:i,taskDefinition:``,count:1,subnets:p,securityGroups:m,assignPublicIp:!1}},t[7]=i,t[8]=h);let{control:g,handleSubmit:Oe,register:_,setValue:ke,getValues:Ae,formState:je}=me(h),{errors:v,isSubmitting:y}=je,b;t[9]===g?b=t[10]:(b={control:g,name:`taskDefinition`},t[9]=g,t[10]=b);let x=pe(b),S;t[11]===x?S=t[12]:(S=le(x),t[11]=x,t[12]=S);let{data:Me}=n(S),C=Me?.networkMode===`awsvpc`,w;t[13]===g?w=t[14]:(w={control:g,name:`subnets`},t[13]=g,t[14]=w);let T=pe(w),E;t[15]===g?E=t[16]:(E={control:g,name:`securityGroups`},t[15]=g,t[16]=E);let D=pe(E),O;t[17]===T?O=t[18]:(O=new Set(T),t[17]=T,t[18]=O);let Ne=O,k;t[19]===D?k=t[20]:(k=new Set(D),t[19]=D,t[20]=k);let Pe=k,A;t[21]!==Ae||t[22]!==ke?(A=(e,t)=>{let n=Ae(e);ke(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})},t[21]=Ae,t[22]=ke,t[23]=A):A=t[23];let j=A,M;t[24]!==i||t[25]!==a?(M=function(){a({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:i}})},t[24]=i,t[25]=a,t[26]=M):M=t[26];let N=M,P;t[27]!==C||t[28]!==N||t[29]!==s?(P=function(e){s.mutate({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,awsvpc:C,subnets:e.subnets,securityGroups:e.securityGroups,assignPublicIp:e.assignPublicIp},{onSuccess:N})},t[27]=C,t[28]=N,t[29]=s,t[30]=P):P=t[30];let Fe=P,Ie=C&&T.length===0,F;t[31]===i?F=t[32]:(F={clusterName:i},t[31]=i,t[32]=F);let I;t[33]!==i||t[34]!==F?(I=(0,o.jsx)(te,{params:F,to:`/ecs/list-clusters/$clusterName`,children:i}),t[33]=i,t[34]=F,t[35]=I):I=t[35];let Le=`Cluster: ${i}`,L;t[36]===Le?L=t[37]:(L=(0,o.jsx)(fe,{subtitle:Le,title:`Run Task`}),t[36]=Le,t[37]=L);let R;t[38]!==s.error||t[39]!==s.isError?(R=s.isError&&(0,o.jsx)(_e,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to run task.`}),t[38]=s.error,t[39]=s.isError,t[40]=R):R=t[40];let z;t[41]!==Oe||t[42]!==Fe?(z=Oe(Fe),t[41]=Oe,t[42]=Fe,t[43]=z):z=t[43];let B;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,o.jsx)(be,{children:(0,o.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),t[44]=B):B=t[44];let V;t[45]===c?V=t[46]:(V=e=>{let{field:t}=e;return(0,o.jsxs)(ae,{onValueChange:t.onChange,value:t.value,children:[(0,o.jsx)(ie,{className:`w-full`,id:`taskDefinition`,children:(0,o.jsx)(ne,{placeholder:`Select a task definition`})}),(0,o.jsx)(re,{children:c.map(we)})]})},t[45]=c,t[46]=V);let H;t[47]!==g||t[48]!==V?(H=(0,o.jsx)(he,{control:g,name:`taskDefinition`,render:V}),t[47]=g,t[48]=V,t[49]=H):H=t[49];let U;t[50]===v.taskDefinition?U=t[51]:(U=(0,o.jsx)(ye,{errors:[v.taskDefinition]}),t[50]=v.taskDefinition,t[51]=U);let W;t[52]!==H||t[53]!==U?(W=(0,o.jsxs)(xe,{children:[B,H,U]}),t[52]=H,t[53]=U,t[54]=W):W=t[54];let G;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,o.jsx)(be,{children:(0,o.jsx)(`label`,{htmlFor:`count`,children:`Count`})}),t[55]=G):G=t[55];let K;t[56]===_?K=t[57]:(K=_(`count`,{valueAsNumber:!0}),t[56]=_,t[57]=K);let q;t[58]===K?q=t[59]:(q=(0,o.jsx)(oe,{id:`count`,type:`number`,...K}),t[58]=K,t[59]=q);let J;t[60]===v.count?J=t[61]:(J=(0,o.jsx)(ye,{errors:[v.count]}),t[60]=v.count,t[61]=J);let Y;t[62]!==q||t[63]!==J?(Y=(0,o.jsxs)(xe,{children:[G,q,J]}),t[62]=q,t[63]=J,t[64]=Y):Y=t[64];let X;t[65]!==C||t[66]!==_||t[67]!==De||t[68]!==Pe||t[69]!==Ne||t[70]!==Ee||t[71]!==j?(X=C&&(0,o.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,o.jsx)(`div`,{className:`mt-2 space-y-1`,children:Ee.map(e=>(0,o.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,o.jsx)(`input`,{checked:Ne.has(e.SubnetId??``),onChange:()=>{j(`subnets`,e.SubnetId??``)},type:`checkbox`}),(0,o.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,o.jsx)(`div`,{className:`mt-2 space-y-1`,children:De.map(e=>(0,o.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,o.jsx)(`input`,{checked:Pe.has(e.GroupId??``),onChange:()=>{j(`securityGroups`,e.GroupId??``)},type:`checkbox`}),(0,o.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,o.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,o.jsx)(`input`,{type:`checkbox`,..._(`assignPublicIp`)}),(0,o.jsx)(`span`,{children:`Assign public IP`})]})]}),t[65]=C,t[66]=_,t[67]=De,t[68]=Pe,t[69]=Ne,t[70]=Ee,t[71]=j,t[72]=X):X=t[72];let Re=s.isPending||Ie,Z;t[73]!==N||t[74]!==y||t[75]!==Re?(Z=(0,o.jsx)(ve,{isPending:Re,isSubmitting:y,onCancel:N,pendingLabel:`Running…`,submitLabel:`Run Task`}),t[73]=N,t[74]=y,t[75]=Re,t[76]=Z):Z=t[76];let Q;t[77]!==z||t[78]!==W||t[79]!==Y||t[80]!==X||t[81]!==Z?(Q=(0,o.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:z,children:[W,Y,X,Z]}),t[77]=z,t[78]=W,t[79]=Y,t[80]=X,t[81]=Z,t[82]=Q):Q=t[82];let $;return t[83]!==I||t[84]!==L||t[85]!==R||t[86]!==Q?($=(0,o.jsxs)(o.Fragment,{children:[I,L,R,Q]}),t[83]=I,t[84]=L,t[85]=R,t[86]=Q,t[87]=$):$=t[87],$}function we(e){let t=s(e);return(0,o.jsx)(i,{value:t,children:t},e)}function l(){let e=(0,Ce.c)(2),{cluster:t}=a.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,o.jsx)(c,{cluster:t}),e[0]=t,e[1]=n),n}export{l as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-BZ2XaUEF.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-CAY9EhS0.js similarity index 82% rename from spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-BZ2XaUEF.js rename to spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-CAY9EhS0.js index 4d2f7ddb1..052810151 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-BZ2XaUEF.js +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-CAY9EhS0.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-task-B-TnTr2m.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/httpRequest-Bc1WZmsd.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/signed-fetch-BHraeSLO.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ecs-CA1ohYPx.js"])))=>i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{O as a,w as o}from"./ec2-DJL24ekw.js";import{o as s}from"./ecs-DRWPOVsw.js";var c=()=>i(()=>import(`./run-task-B-TnTr2m.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])),l=r({cluster:n().catch(``)}),u=e(`/_auth/ecs/(clusters)/run-task`)({validateSearch:l,loader:async({context:e})=>{await Promise.all([e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...o,staleTime:`static`})])},head:()=>({meta:[{title:`Run Task | ECS | Mulga`}]}),component:t(c,`component`)});export{u as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-task-in8xarMd.js","assets/compiler-runtime-DTT1fEHg.js","assets/useQuery-DVjCHx2S.js","assets/useBaseQuery-BzVOpEso.js","assets/removable-TyvHreKc.js","assets/useSuspenseQuery-C2bXkW_k.js","assets/useNavigate-BiiHYpLW.js","assets/matchContext-Dxo67MeP.js","assets/httpRequest-Bc1WZmsd.js","assets/back-link-DjawJm5W.js","assets/link-cv-r823H.js","assets/createLucideIcon-DI_DJF-h.js","assets/select-Bgl6IAYG.js","assets/useValueAsRef-DbvX_oWn.js","assets/dist-oTooRiSa.js","assets/button-Bae9vdts.js","assets/reason-parts-DS9EIifS.js","assets/check-DKS02ExQ.js","assets/chevron-down-DuqoHmYM.js","assets/useScrollLock-DPIS-H3s.js","assets/with-selector-DwL8goiN.js","assets/useValueChanged-3Des54hH.js","assets/usePositioner-CRZWTJxW.js","assets/DirectionContext-CO1nR263.js","assets/useCompositeListItem-D7RLSwDM.js","assets/useControlled-CCRnPsks.js","assets/input-CpcyJw4R.js","assets/ec2-DJL24ekw.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-I-S7JTV9.js","assets/index.browser-ByUCT8up.js","assets/ecs-DRWPOVsw.js","assets/ecs-BsOdvIYx.js","assets/useMutation-DV0DQvGm.js","assets/mutation--CHjRtbG.js","assets/signed-fetch-BHraeSLO.js","assets/page-heading-M0NyqAmu.js","assets/zod-VwMMRSfy.js","assets/error-banner-BcDqaPk7.js","assets/form-actions-C3zG6ld2.js","assets/field-ChkDR_wL.js","assets/separator-BqVPQr-v.js","assets/ecs-CA1ohYPx.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-qWqE2u8p.js";import{b as n,v as r}from"./httpRequest-Bc1WZmsd.js";import{_o as i}from"./awsClient-I-S7JTV9.js";import{O as a,w as o}from"./ec2-DJL24ekw.js";import{o as s}from"./ecs-DRWPOVsw.js";var c=()=>i(()=>import(`./run-task-in8xarMd.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])),l=r({cluster:n().catch(``)}),u=e(`/_auth/ecs/(clusters)/run-task`)({validateSearch:l,loader:async({context:e})=>{await Promise.all([e.queryClient.query({...s,staleTime:`static`}),e.queryClient.query({...a,staleTime:`static`}),e.queryClient.query({...o,staleTime:`static`})])},head:()=>({meta:[{title:`Run Task | ECS | Mulga`}]}),component:t(c,`component`)});export{u as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-in8xarMd.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-in8xarMd.js new file mode 100644 index 000000000..a8b9dba59 --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/run-task-in8xarMd.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{t as n}from"./useQuery-DVjCHx2S.js";import{t as ee}from"./useSuspenseQuery-C2bXkW_k.js";import{t as te}from"./useNavigate-BiiHYpLW.js";import{M as ne}from"./httpRequest-Bc1WZmsd.js";import{t as re}from"./back-link-DjawJm5W.js";import{c as ie,i as r,n as ae,s as oe,t as se}from"./select-Bgl6IAYG.js";import{t as ce}from"./input-CpcyJw4R.js";import{O as le,w as ue}from"./ec2-DJL24ekw.js";import{a as de,o as fe}from"./ecs-DRWPOVsw.js";import{c as pe}from"./ecs-BsOdvIYx.js";import{t as i}from"./run-task-CAY9EhS0.js";import{t as me}from"./page-heading-M0NyqAmu.js";import{a as he,i as ge,n as _e,t as ve}from"./zod-VwMMRSfy.js";import{t as ye}from"./error-banner-BcDqaPk7.js";import{t as be}from"./form-actions-C3zG6ld2.js";import{r as xe,s as Se,t as Ce}from"./field-ChkDR_wL.js";import{i as we}from"./ecs-CA1ohYPx.js";var Te=t(),a=e();function o(e){return e.split(`/`).at(-1)??e}function s(e){let t=(0,Te.c)(88),{cluster:r}=e,i=te(),o=pe(),{data:s}=ee(fe),{data:c}=ee(le),{data:De}=ee(ue),l;t[0]===c.Subnets?l=t[1]:(l=c.Subnets??[],t[0]=c.Subnets,t[1]=l);let Oe=l,u;t[2]===De.SecurityGroups?u=t[3]:(u=De.SecurityGroups??[],t[2]=De.SecurityGroups,t[3]=u);let ke=u,d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=ve(we),t[4]=d):d=t[4];let f,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],p=[],t[5]=f,t[6]=p):(f=t[5],p=t[6]);let m;t[7]===r?m=t[8]:(m={resolver:d,defaultValues:{cluster:r,taskDefinition:``,count:1,subnets:f,securityGroups:p,assignPublicIp:!1}},t[7]=r,t[8]=m);let{control:h,handleSubmit:Ae,register:g,setValue:_,getValues:v,formState:je}=ge(m),{errors:y,isSubmitting:Me}=je,b;t[9]===h?b=t[10]:(b={control:h,name:`taskDefinition`},t[9]=h,t[10]=b);let Ne=he(b),x;t[11]===Ne?x=t[12]:(x=de(Ne),t[11]=Ne,t[12]=x);let{data:Pe}=n(x),S=Pe?.networkMode===`awsvpc`,C;t[13]===h?C=t[14]:(C={control:h,name:`subnets`},t[13]=h,t[14]=C);let w=he(C),T;t[15]===h?T=t[16]:(T={control:h,name:`securityGroups`},t[15]=h,t[16]=T);let E=he(T),D;t[17]===w?D=t[18]:(D=new Set(w),t[17]=w,t[18]=D);let O=D,k;t[19]===E?k=t[20]:(k=new Set(E),t[19]=E,t[20]=k);let Fe=k,A;t[21]!==v||t[22]!==_?(A=(e,t)=>{let n=v(e);_(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})},t[21]=v,t[22]=_,t[23]=A):A=t[23];let j=A,M;t[24]!==r||t[25]!==i?(M=function(){i({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:r}})},t[24]=r,t[25]=i,t[26]=M):M=t[26];let N=M,P;t[27]!==S||t[28]!==N||t[29]!==o?(P=function(e){o.mutate({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,awsvpc:S,subnets:e.subnets,securityGroups:e.securityGroups,assignPublicIp:e.assignPublicIp},{onSuccess:N})},t[27]=S,t[28]=N,t[29]=o,t[30]=P):P=t[30];let Ie=P,Le=S&&w.length===0,F;t[31]===r?F=t[32]:(F={clusterName:r},t[31]=r,t[32]=F);let I;t[33]!==r||t[34]!==F?(I=(0,a.jsx)(re,{params:F,to:`/ecs/list-clusters/$clusterName`,children:r}),t[33]=r,t[34]=F,t[35]=I):I=t[35];let Re=`Cluster: ${r}`,L;t[36]===Re?L=t[37]:(L=(0,a.jsx)(me,{subtitle:Re,title:`Run Task`}),t[36]=Re,t[37]=L);let R;t[38]!==o.error||t[39]!==o.isError?(R=o.isError&&(0,a.jsx)(ye,{error:o.error instanceof Error?o.error:void 0,msg:`Failed to run task.`}),t[38]=o.error,t[39]=o.isError,t[40]=R):R=t[40];let z;t[41]!==Ae||t[42]!==Ie?(z=Ae(Ie),t[41]=Ae,t[42]=Ie,t[43]=z):z=t[43];let B;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,a.jsx)(Se,{children:(0,a.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),t[44]=B):B=t[44];let V;t[45]===s?V=t[46]:(V=e=>{let{field:t}=e;return(0,a.jsxs)(se,{onValueChange:t.onChange,value:t.value,children:[(0,a.jsx)(oe,{className:`w-full`,id:`taskDefinition`,children:(0,a.jsx)(ie,{placeholder:`Select a task definition`})}),(0,a.jsx)(ae,{children:s.map(Ee)})]})},t[45]=s,t[46]=V);let H;t[47]!==h||t[48]!==V?(H=(0,a.jsx)(_e,{control:h,name:`taskDefinition`,render:V}),t[47]=h,t[48]=V,t[49]=H):H=t[49];let U;t[50]===y.taskDefinition?U=t[51]:(U=(0,a.jsx)(xe,{errors:[y.taskDefinition]}),t[50]=y.taskDefinition,t[51]=U);let W;t[52]!==H||t[53]!==U?(W=(0,a.jsxs)(Ce,{children:[B,H,U]}),t[52]=H,t[53]=U,t[54]=W):W=t[54];let G;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,a.jsx)(Se,{children:(0,a.jsx)(`label`,{htmlFor:`count`,children:`Count`})}),t[55]=G):G=t[55];let K;t[56]===g?K=t[57]:(K=g(`count`,{valueAsNumber:!0}),t[56]=g,t[57]=K);let q;t[58]===K?q=t[59]:(q=(0,a.jsx)(ce,{id:`count`,type:`number`,...K}),t[58]=K,t[59]=q);let J;t[60]===y.count?J=t[61]:(J=(0,a.jsx)(xe,{errors:[y.count]}),t[60]=y.count,t[61]=J);let Y;t[62]!==q||t[63]!==J?(Y=(0,a.jsxs)(Ce,{children:[G,q,J]}),t[62]=q,t[63]=J,t[64]=Y):Y=t[64];let X;t[65]!==S||t[66]!==g||t[67]!==ke||t[68]!==Fe||t[69]!==O||t[70]!==Oe||t[71]!==j?(X=S&&(0,a.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,a.jsx)(`div`,{className:`mt-2 space-y-1`,children:Oe.map(e=>(0,a.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,a.jsx)(`input`,{checked:O.has(e.SubnetId??``),onChange:()=>{j(`subnets`,e.SubnetId??``)},type:`checkbox`}),(0,a.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,a.jsx)(`div`,{className:`mt-2 space-y-1`,children:ke.map(e=>(0,a.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,a.jsx)(`input`,{checked:Fe.has(e.GroupId??``),onChange:()=>{j(`securityGroups`,e.GroupId??``)},type:`checkbox`}),(0,a.jsx)(`span`,{className:`font-mono`,children:ne(e)})]},e.GroupId))})]}),(0,a.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,a.jsx)(`input`,{type:`checkbox`,...g(`assignPublicIp`)}),(0,a.jsx)(`span`,{children:`Assign public IP`})]})]}),t[65]=S,t[66]=g,t[67]=ke,t[68]=Fe,t[69]=O,t[70]=Oe,t[71]=j,t[72]=X):X=t[72];let ze=o.isPending||Le,Z;t[73]!==N||t[74]!==Me||t[75]!==ze?(Z=(0,a.jsx)(be,{isPending:ze,isSubmitting:Me,onCancel:N,pendingLabel:`Running…`,submitLabel:`Run Task`}),t[73]=N,t[74]=Me,t[75]=ze,t[76]=Z):Z=t[76];let Q;t[77]!==z||t[78]!==W||t[79]!==Y||t[80]!==X||t[81]!==Z?(Q=(0,a.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:z,children:[W,Y,X,Z]}),t[77]=z,t[78]=W,t[79]=Y,t[80]=X,t[81]=Z,t[82]=Q):Q=t[82];let $;return t[83]!==I||t[84]!==L||t[85]!==R||t[86]!==Q?($=(0,a.jsxs)(a.Fragment,{children:[I,L,R,Q]}),t[83]=I,t[84]=L,t[85]=R,t[86]=Q,t[87]=$):$=t[87],$}function Ee(e){let t=o(e);return(0,a.jsx)(r,{value:t,children:t},e)}function c(){let e=(0,Te.c)(2),{cluster:t}=i.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,a.jsx)(s,{cluster:t}),e[0]=t,e[1]=n),n}export{c as component}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/state-badge-BD9XGBez.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/state-badge-BD9XGBez.js deleted file mode 100644 index 26aef6f51..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/state-badge-BD9XGBez.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{C as n}from"./httpRequest-Bc1WZmsd.js";var r=t(),i=e(),a=new Set([`running`,`available`,`completed`,`Complete`,`Active`]),o=new Set([`stopped`,`error`,`failed`]),s=new Set([`pending`,`shutting-down`,`stopping`,`creating`,`modifying`,`backing-up`,`rebooting`,`starting`,`recovering`,`deleting`]);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(e){let t=(0,r.c)(5),{state:a}=e,o;t[0]===a?o=t[1]:(o=n(`rounded-full px-2 py-1 text-xs`,c(a)),t[0]=a,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}export{l as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/assets/state-badge-BiFj5bbX.js b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/state-badge-BiFj5bbX.js new file mode 100644 index 000000000..6aa7e643c --- /dev/null +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/assets/state-badge-BiFj5bbX.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime-DTT1fEHg.js";import{C as n}from"./httpRequest-Bc1WZmsd.js";var r=t(),i=e(),a=new Set([`running`,`available`,`completed`,`Complete`,`Active`,`ACTIVE`,`AVAILABLE`,`COMPLETE`,`READY`]),o=new Set([`stopped`,`error`,`failed`,`FAILED`,`DELETE_UNSUCCESSFUL`,`UPDATE_UNSUCCESSFUL`]),s=new Set([`pending`,`shutting-down`,`stopping`,`creating`,`modifying`,`backing-up`,`rebooting`,`starting`,`recovering`,`deleting`,`CREATING`,`DELETING`,`IN_PROGRESS`,`STARTING`,`STOPPING`,`UPDATING`,`VERSIONING`]);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(e){let t=(0,r.c)(5),{state:a}=e,o;t[0]===a?o=t[1]:(o=n(`rounded-full px-2 py-1 text-xs`,c(a)),t[0]=a,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}export{l as t}; \ No newline at end of file diff --git a/spinifex/runtime/roles/spinifexui/frontend/dist/index.html b/spinifex/runtime/roles/spinifexui/frontend/dist/index.html index db777cb77..0116c9680 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/dist/index.html +++ b/spinifex/runtime/roles/spinifexui/frontend/dist/index.html @@ -7,7 +7,7 @@ - + @@ -32,12 +32,12 @@ - + - + @@ -66,45 +66,45 @@ - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - + - - + + - + - + - + - - + + diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.test.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.test.tsx index 0588dc0b7..2eec1fcba 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.test.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.test.tsx @@ -15,9 +15,10 @@ import { import { ALL_LISTENER_PROTOCOLS, type CreateListenerFormData, + DEFAULT_SSL_POLICY, } from "@/types/elbv2" -import { ListenerForm } from "./listener-form" +import { ListenerForm, listenerProtocolDefaults } from "./listener-form" const TGS: TargetGroup[] = [ { @@ -155,3 +156,59 @@ describe("ListenerForm", () => { expect(screen.getByLabelText("Security policy")).toBeInTheDocument() }) }) + +describe("listenerProtocolDefaults", () => { + it("moves HTTP's default port to 443 and seeds the SSL policy on HTTPS", () => { + expect(listenerProtocolDefaults("HTTPS", { port: 80 })).toStrictEqual({ + port: 443, + certificateArn: undefined, + sslPolicy: DEFAULT_SSL_POLICY, + }) + }) + + it("keeps a chosen SSL policy and certificate on HTTPS", () => { + expect( + listenerProtocolDefaults("HTTPS", { + port: 8443, + certificateArn: "arn:cert", + sslPolicy: "custom-policy", + }), + ).toStrictEqual({ + port: 8443, + certificateArn: "arn:cert", + sslPolicy: "custom-policy", + }) + }) + + it("keeps the certificate but clears the SSL policy on TLS", () => { + expect( + listenerProtocolDefaults("TLS", { + port: 443, + certificateArn: "arn:cert", + sslPolicy: DEFAULT_SSL_POLICY, + }), + ).toStrictEqual({ + port: 443, + certificateArn: "arn:cert", + sslPolicy: undefined, + }) + }) + + it("moves 443 back to 80 and drops TLS fields on an insecure protocol", () => { + expect( + listenerProtocolDefaults("HTTP", { + port: 443, + certificateArn: "arn:cert", + sslPolicy: DEFAULT_SSL_POLICY, + }), + ).toStrictEqual({ + port: 80, + certificateArn: undefined, + sslPolicy: undefined, + }) + }) + + it("leaves a custom port alone", () => { + expect(listenerProtocolDefaults("TCP", { port: 9000 }).port).toBe(9000) + }) +}) diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.tsx index 56d72200a..4cfa440c7 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/listener-form.tsx @@ -44,6 +44,37 @@ function certLabel(cert: CertificateSummary): string { return cert.DomainName ? `${cert.DomainName} · ${id}` : id } +export interface ListenerProtocolFields { + port: number + certificateArn?: string + sslPolicy?: string +} + +// The port and TLS fields a protocol switch implies. The port moves only off +// the other protocol's default; an SSL policy is HTTPS-only, and an insecure +// protocol drops cert + policy so the server doesn't reject them. +export function listenerProtocolDefaults( + next: ListenerProtocolValue, + current: ListenerProtocolFields, +): ListenerProtocolFields { + if (!isSecureProtocol(next)) { + return { + port: current.port === HTTPS_PORT ? HTTP_PORT : current.port, + certificateArn: undefined, + sslPolicy: undefined, + } + } + + const sslPolicy = + next === "HTTPS" ? current.sslPolicy || DEFAULT_SSL_POLICY : undefined + + return { + port: current.port === HTTP_PORT ? HTTPS_PORT : current.port, + certificateArn: current.certificateArn, + sslPolicy, + } +} + export function ListenerForm({ form, protocols, @@ -65,38 +96,15 @@ export function ListenerForm({ const isHttps = protocol === "HTTPS" const isSecure = isSecureProtocol(protocol) - // Side-effects of a protocol switch, applied after the field's own onChange: - // bump the default port (only when still on the other protocol's default) and - // toggle the TLS fields. A secure protocol (HTTPS/TLS) keeps the certificate; - // an SSL policy is HTTPS-only. Moving to an insecure protocol clears cert + - // policy so the server doesn't reject them. const applyProtocolDefaults = (next: ListenerProtocolValue | null) => { if (!next) { return } - const current = getValues("port") - - if (isSecureProtocol(next)) { - if (current === HTTP_PORT) { - setValue("port", HTTPS_PORT) - } - - if (next === "HTTPS") { - if (!getValues("sslPolicy")) { - setValue("sslPolicy", DEFAULT_SSL_POLICY) - } - } else { - setValue("sslPolicy", undefined) - } - } else { - if (current === HTTPS_PORT) { - setValue("port", HTTP_PORT) - } - - setValue("certificateArn", undefined) - setValue("sslPolicy", undefined) - } + const fields = listenerProtocolDefaults(next, getValues()) + setValue("port", fields.port) + setValue("certificateArn", fields.certificateArn) + setValue("sslPolicy", fields.sslPolicy) } return ( diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/security-groups-editor.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/security-groups-editor.tsx index 72febb01d..843e1f104 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/security-groups-editor.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/components/elbv2/security-groups-editor.tsx @@ -2,6 +2,7 @@ import type { SecurityGroup } from "@aws-sdk/client-ec2" import { useState } from "react" import { Button } from "@/components/ui/button" +import { securityGroupLabel } from "@/lib/utils" interface SecurityGroupsEditorProps { // Security groups in the load balancer's VPC, selectable for attachment. @@ -88,16 +89,14 @@ export function SecurityGroupsEditor({ key={sg.GroupId} > { toggle(sg.GroupId ?? "") }} type="checkbox" /> - - {sg.GroupId} ({sg.GroupName}) - + {securityGroupLabel(sg)} )) )} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.test.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.test.tsx index b2763e1c6..65f4c4d77 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.test.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.test.tsx @@ -28,6 +28,37 @@ describe("StateBadge", () => { }, ) + // Every GuardrailStatus, KnowledgeBaseStatus, DataSourceStatus and + // IngestionJobStatus value except STOPPED, which stays neutral. + it.each(["ACTIVE", "AVAILABLE", "COMPLETE", "READY"])( + "renders green for Bedrock success status '%s'", + (state) => { + render() + expect(screen.getByText(state).className).toContain("bg-green-100") + }, + ) + + it.each(["FAILED", "DELETE_UNSUCCESSFUL", "UPDATE_UNSUCCESSFUL"])( + "renders red for Bedrock error status '%s'", + (state) => { + render() + expect(screen.getByText(state).className).toContain("bg-red-100") + }, + ) + + it.each([ + "CREATING", + "DELETING", + "IN_PROGRESS", + "STARTING", + "STOPPING", + "UPDATING", + "VERSIONING", + ])("renders yellow for Bedrock in-progress status '%s'", (state) => { + render() + expect(screen.getByText(state).className).toContain("bg-yellow-100") + }) + it("renders gray for terminated state", () => { render() const badge = screen.getByText("terminated") diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.tsx index 98c5402a8..b1d9f745a 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/components/state-badge.tsx @@ -8,12 +8,24 @@ const SUCCESS_STATES = new Set([ "completed", "Complete", "Active", + // Bedrock guardrails, knowledge bases, data sources and ingestion jobs. + "ACTIVE", + "AVAILABLE", + "COMPLETE", + "READY", ]) // "stopped" stays an error state because EC2 reads it that way. RDS treats a // stopped instance as a normal resting state, so its badge is redder than the // state warrants; splitting the map by service is its own change. -const ERROR_STATES = new Set(["stopped", "error", "failed"]) +const ERROR_STATES = new Set([ + "stopped", + "error", + "failed", + "FAILED", + "DELETE_UNSUCCESSFUL", + "UPDATE_UNSUCCESSFUL", +]) const WARNING_STATES = new Set([ "pending", @@ -26,6 +38,13 @@ const WARNING_STATES = new Set([ "starting", "recovering", "deleting", + "CREATING", + "DELETING", + "IN_PROGRESS", + "STARTING", + "STOPPING", + "UPDATING", + "VERSIONING", ]) function getStateClass(state: string | undefined): string { diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/components/vpc-wizard/tag-editor.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/components/vpc-wizard/tag-editor.tsx deleted file mode 100644 index 2b728e889..000000000 --- a/spinifex/runtime/roles/spinifexui/frontend/src/components/vpc-wizard/tag-editor.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Plus, Trash2 } from "lucide-react" -import type { UseFormReturn } from "react-hook-form" -import { useFieldArray } from "react-hook-form" - -import { Button } from "@/components/ui/button" -import { Input } from "@/components/ui/input" -import type { CreateVpcWizardFormData } from "@/types/ec2" - -interface TagEditorProps { - form: UseFormReturn -} - -export function TagEditor({ form }: TagEditorProps) { - // The rows are keyed by the field array's own id rather than the index so - // removing a row does not leave the inputs below it showing the previous - // row's registered values. - const { fields, append, remove } = useFieldArray({ - control: form.control, - name: "tags", - }) - - return ( -
- {fields.map((field, index) => ( -
- - - -
- ))} - -
- ) -} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.test.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.test.tsx index 7368abcd1..e08eea696 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.test.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.test.tsx @@ -1089,6 +1089,30 @@ describe("useCreateVpc", () => { }) }) + it("sends user tags after the Name tag", async () => { + createQueryClient() + const { result } = renderHook(() => useCreateVpc(), { wrapper }) + + result.current.mutate({ + cidrBlock: "10.0.0.0/16", + name: "my-vpc", + tags: [{ key: "Env", value: "prod" }], + }) + + await waitFor(() => { + expect(result.current.isSuccess).toBeTruthy() + }) + expect(mockSend.mock.calls[0]?.[0].input.TagSpecifications).toStrictEqual([ + { + ResourceType: "vpc", + Tags: [ + { Key: "Name", Value: "my-vpc" }, + { Key: "Env", Value: "prod" }, + ], + }, + ]) + }) + it("omits TagSpecifications when name is empty", async () => { createQueryClient() const { result } = renderHook(() => useCreateVpc(), { wrapper }) diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.ts b/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.ts index ad45a7e8c..6a6a9b692 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.ts +++ b/spinifex/runtime/roles/spinifexui/frontend/src/mutations/ec2.ts @@ -851,14 +851,11 @@ export function useCreateVpc() { mutationFn: async (params: CreateVpcFormData) => { const command = new CreateVpcCommand({ CidrBlock: params.cidrBlock, - TagSpecifications: params.name - ? [ - { - ResourceType: "vpc", - Tags: [{ Key: "Name", Value: params.name }], - }, - ] - : undefined, + TagSpecifications: buildTagSpec( + ResourceType.vpc, + params.name, + toSdkTags(params.tags ?? []), + ), }) return await getEc2Client().send(command) @@ -1533,6 +1530,10 @@ export function useDisassociateRouteTable() { }) } +function toSdkTags(tags: { key: string; value: string }[]): Tag[] { + return tags.map((t) => ({ Key: t.key, Value: t.value })) +} + function buildTags(name: string | undefined, extraTags: Tag[]): Tag[] { const tags: Tag[] = [] @@ -1599,10 +1600,7 @@ export function useCreateVpcWizard() { const created: WizardCreatedResource[] = [] const prefix = params.autoGenerateNames ? params.namePrefix : undefined - const extraTags: Tag[] = params.tags.map((t) => ({ - Key: t.key, - Value: t.value, - })) + const extraTags = toSdkTags(params.tags) let currentStep = "creating VPC" diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx index a99aa2129..67413d8a6 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx @@ -40,7 +40,7 @@ import { SelectValue, } from "@/components/ui/select" import { isSystemManagedImage } from "@/lib/system-managed" -import { formatVRAMMiB } from "@/lib/utils" +import { formatVRAMMiB, securityGroupLabel } from "@/lib/utils" import { useCreateInstance } from "@/mutations/ec2" import { ec2ImagesQueryOptions, @@ -734,7 +734,7 @@ export function RunInstancesPage({ key={sg.GroupId} > { toggleSg(sg.GroupId ?? "") @@ -742,7 +742,7 @@ export function RunInstancesPage({ type="checkbox" /> - {sg.GroupId} ({sg.GroupName}) + {securityGroupLabel(sg)} ))} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/describe-instances/index.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/describe-instances/index.tsx index 61ca1b6b5..977205bc8 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/describe-instances/index.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(instances)/describe-instances/index.tsx @@ -78,7 +78,7 @@ function Ec2() { badge={} key={instance.InstanceId} params={{ id: instance.InstanceId }} - subtitle={`${instance.InstanceType}`} + subtitle={instance.InstanceType} title={instance.InstanceId} to="/ec2/describe-instances/$id" /> diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(launch-templates)/-components/launch-template-data-fields.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(launch-templates)/-components/launch-template-data-fields.tsx index 43f25412e..5760de873 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(launch-templates)/-components/launch-template-data-fields.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(launch-templates)/-components/launch-template-data-fields.tsx @@ -23,6 +23,7 @@ import { SelectValue, } from "@/components/ui/select" import { Textarea } from "@/components/ui/textarea" +import { securityGroupLabel } from "@/lib/utils" import { ec2ImagesQueryOptions, ec2InstanceTypesQueryOptions, @@ -267,16 +268,14 @@ export function LaunchTemplateDataFields({ key={sg.GroupId} > { toggle(sg.GroupId ?? "") }} type="checkbox" /> - - {sg.GroupId} ({sg.GroupName}) - + {securityGroupLabel(sg)} ))} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(load-balancers)/-components/create-load-balancer-page.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(load-balancers)/-components/create-load-balancer-page.tsx index ce5520835..5aea4b4a1 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(load-balancers)/-components/create-load-balancer-page.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(load-balancers)/-components/create-load-balancer-page.tsx @@ -17,6 +17,7 @@ import { type CommandPart, } from "@/components/cli-command-panel" import { CertificateImportDialog } from "@/components/elbv2/certificate-import-dialog" +import { listenerProtocolDefaults } from "@/components/elbv2/listener-form" import { TargetGroupForm } from "@/components/elbv2/target-group-form" import { ErrorBanner } from "@/components/error-banner" import { FormActions } from "@/components/form-actions" @@ -32,7 +33,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select" -import { getNameTag } from "@/lib/utils" +import { getNameTag, securityGroupLabel } from "@/lib/utils" import { type LbWizardResult, useCreateLoadBalancerWizard, @@ -54,8 +55,8 @@ import { type ListenerProtocolValue, type TargetGroupProtocol, createLoadBalancerSchema, - createTargetGroupSchema, DEFAULT_SSL_POLICY, + createTargetGroupSchema, defaultProtocolForType, isSecureProtocol, protocolsForType, @@ -241,32 +242,12 @@ export function CreateLoadBalancerPage() { syncTargetGroupProtocol(proto) } - // Adjust port + secure fields on a listener-protocol switch, mirroring the - // standalone listener form: secure protocols default to 443 and seed the SSL - // policy; non-secure ones drop cert + policy so the server doesn't reject. - const SECURE_PORT = 443 - const handleProtocolChange = (next: ListenerProtocolValue) => { setValue("listener.protocol", next) - const current = getValues("listener.port") - - if (isSecureProtocol(next)) { - if (current === 80) { - setValue("listener.port", SECURE_PORT) - } - - if (next === "HTTPS" && !getValues("listener.sslPolicy")) { - setValue("listener.sslPolicy", DEFAULT_SSL_POLICY) - } - } else { - if (current === SECURE_PORT) { - setValue("listener.port", 80) - } - - setValue("listener.certificateArn", undefined) - setValue("listener.sslPolicy", undefined) - } - + const fields = listenerProtocolDefaults(next, getValues("listener")) + setValue("listener.port", fields.port) + setValue("listener.certificateArn", fields.certificateArn) + setValue("listener.sslPolicy", fields.sslPolicy) syncTargetGroupProtocol(next) } @@ -563,16 +544,14 @@ export function CreateLoadBalancerPage() { key={sg.GroupId} > { toggleSg(sg.GroupId ?? "") }} type="checkbox" /> - - {sg.GroupId} ({sg.GroupName}) - + {securityGroupLabel(sg)} ))} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/$id.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/$id.tsx index 1e5907aa8..1e0bbdce3 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/$id.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/$id.tsx @@ -31,6 +31,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select" +import { securityGroupLabel } from "@/lib/utils" import { useAuthorizeSecurityGroupEgress, useAuthorizeSecurityGroupIngress, @@ -435,7 +436,7 @@ function SecurityGroupDetail() { } subtitle="Security Group Details" - title={sg.GroupName ? `${sg.GroupId} (${sg.GroupName})` : sg.GroupId} + title={securityGroupLabel(sg)} /> diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/index.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/index.tsx index dd2b2a7c3..db9612062 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/index.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(security-groups)/describe-security-groups/index.tsx @@ -5,6 +5,7 @@ import { createFileRoute, Link } from "@tanstack/react-router" import { ListCard } from "@/components/list-card" import { PageHeading } from "@/components/page-heading" import { Button } from "@/components/ui/button" +import { securityGroupLabel } from "@/lib/utils" import { ec2SecurityGroupsQueryOptions } from "@/queries/ec2" export const Route = createFileRoute( @@ -54,9 +55,7 @@ function SecurityGroups() { key={sg.GroupId} params={{ id: sg.GroupId }} subtitle={sg.VpcId ?? ""} - title={ - sg.GroupName ? `${sg.GroupId} (${sg.GroupName})` : sg.GroupId - } + title={securityGroupLabel(sg)} to="/ec2/describe-security-groups/$id" /> ) diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(vpc)/create-vpc.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(vpc)/create-vpc.tsx index e46156405..8bab1eb8b 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(vpc)/create-vpc.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ec2/(vpc)/create-vpc.tsx @@ -17,6 +17,7 @@ import { import { ErrorBanner } from "@/components/error-banner" import { FormActions } from "@/components/form-actions" import { PageHeading } from "@/components/page-heading" +import { TagsFieldArray } from "@/components/tags-field-array" import { Button } from "@/components/ui/button" import { Field, FieldError, FieldTitle } from "@/components/ui/field" import { Input } from "@/components/ui/input" @@ -128,6 +129,7 @@ function CreateVpc() { const result = await createVpcMutation.mutateAsync({ cidrBlock: data.cidrBlock, name: name || undefined, + tags: data.tags, }) const vpcId = result.Vpc?.VpcId @@ -309,6 +311,8 @@ function CreateVpc() { /> + + {/* VPC and more sections */} {mode === "vpc-and-more" && ( <> diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/create-service-page.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/create-service-page.tsx index d54a745b7..bc6acd0b8 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/create-service-page.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/create-service-page.tsx @@ -16,6 +16,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select" +import { securityGroupLabel } from "@/lib/utils" import { useCreateService } from "@/mutations/ecs" import { ec2SecurityGroupsQueryOptions, @@ -217,9 +218,7 @@ export function CreateServicePage({ cluster }: { cluster: string }) { }} type="checkbox" /> - - {sg.GroupId} ({sg.GroupName}) - + {securityGroupLabel(sg)} ))} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx index bfab2ff7c..c023dbab1 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx @@ -15,6 +15,7 @@ import { } from "@/components/ui/alert-dialog" import { Field, FieldTitle } from "@/components/ui/field" import { Input } from "@/components/ui/input" +import { securityGroupLabel } from "@/lib/utils" import { useProvisionCapacity } from "@/mutations/ecs" import { ec2InstanceTypesQueryOptions, @@ -163,7 +164,7 @@ export function ProvisionCapacityDialog({ {securityGroups.map((sg) => ( ))} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/run-task-page.tsx b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/run-task-page.tsx index caaa5a05e..f53a0f37d 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/run-task-page.tsx +++ b/spinifex/runtime/roles/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/run-task-page.tsx @@ -16,6 +16,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select" +import { securityGroupLabel } from "@/lib/utils" import { useRunTask } from "@/mutations/ecs" import { ec2SecurityGroupsQueryOptions, @@ -209,9 +210,7 @@ export function RunTaskPage({ cluster }: { cluster: string }) { }} type="checkbox" /> - - {sg.GroupId} ({sg.GroupName}) - + {securityGroupLabel(sg)} ))} diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.test.ts b/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.test.ts index 5d9b663c4..624d6d76a 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.test.ts +++ b/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.test.ts @@ -13,7 +13,6 @@ import { createVolumeSchema, createVpcSchema, createVpcWizardSchema, - formTagSchema, importKeyPairSchema, launchTemplateFormSchema, modifyVolumeSchema, @@ -597,23 +596,6 @@ describe("createPlacementGroupSchema", () => { }) }) -describe("formTagSchema", () => { - it("accepts valid tag with key and value", () => { - const result = formTagSchema.safeParse({ key: "Env", value: "prod" }) - expect(result.success).toBeTruthy() - }) - - it("accepts tag with empty value", () => { - const result = formTagSchema.safeParse({ key: "Env", value: "" }) - expect(result.success).toBeTruthy() - }) - - it("rejects tag with empty key", () => { - const result = formTagSchema.safeParse({ key: "", value: "prod" }) - expect(result.success).toBeFalsy() - }) -}) - describe("createSecurityGroupSchema", () => { it("accepts valid security group params", () => { const result = createSecurityGroupSchema.safeParse({ @@ -817,6 +799,21 @@ describe("createVpcWizardSchema", () => { expect(result.success).toBeTruthy() }) + // AWS caps tag keys at 128 characters and values at 256. + it.each([ + { key: "k".repeat(128), value: "v".repeat(256), ok: true }, + { key: "k".repeat(129), value: "v", ok: false }, + { key: "k", value: "v".repeat(257), ok: false }, + { key: "", value: "v", ok: false }, + ])("validates tag lengths (%#)", ({ key, value, ok }) => { + const result = createVpcWizardSchema.safeParse({ + ...validBase, + tags: [{ key, value }], + }) + + expect(result.success).toBe(ok) + }) + it("rejects invalid mode", () => { const result = createVpcWizardSchema.safeParse({ ...validBase, diff --git a/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.ts b/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.ts index 40574bd06..fafa37a02 100644 --- a/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.ts +++ b/spinifex/runtime/roles/spinifexui/frontend/src/types/ec2.ts @@ -6,6 +6,7 @@ import { isValidCidr, resolveSubnetCidrs, } from "@/lib/subnet-calculator" +import { tagSchema } from "@/types/elbv2" const CIDR_REGEX = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/ @@ -314,17 +315,11 @@ export const createVpcSchema = z.object({ .min(1, "CIDR block is required") .regex(CIDR_REGEX, "Must be a valid CIDR block (e.g. 10.0.0.0/16)"), name: z.string().optional(), + tags: z.array(tagSchema).optional(), }) export type CreateVpcFormData = z.infer -export const formTagSchema = z.object({ - key: z.string().min(1, "Key is required"), - value: z.string(), -}) - -export type FormTag = z.infer - export const createVpcWizardSchema = z .object({ mode: z.enum(["vpc-only", "vpc-and-more"]), @@ -347,7 +342,7 @@ export const createVpcWizardSchema = z privateSubnetCount: z.number().int().min(0).max(2), publicSubnetCidrs: z.array(z.string()), privateSubnetCidrs: z.array(z.string()), - tags: z.array(formTagSchema), + tags: z.array(tagSchema), }) .superRefine((data, ctx) => { if (data.mode !== "vpc-and-more" || !isValidCidr(data.cidrBlock)) {