diff --git a/spinifex/services/spinifexui/frontend/dist/assets/index-awme6Qxw.js b/spinifex/services/spinifexui/frontend/dist/assets/index-rzJa9NZh.js similarity index 99% rename from spinifex/services/spinifexui/frontend/dist/assets/index-awme6Qxw.js rename to spinifex/services/spinifexui/frontend/dist/assets/index-rzJa9NZh.js index 734163d32..bada08c0d 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/index-awme6Qxw.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/index-rzJa9NZh.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-D7BWFb1L.js","assets/compiler-runtime-D_vZfn79.js","assets/Match-CrrE0itw.js","assets/matchContext-DjfNTEDZ.js","assets/useSelector-XEeNlp06.js","assets/with-selector-DrM041uv.js","assets/_auth-DswURgF5.js","assets/useQuery-DYWWbj49.js","assets/useBaseQuery-CzDY6wqT.js","assets/removable-D46SpnLb.js","assets/query-m8erMzOC.js","assets/link--yKtFaUD.js","assets/cluster-config-CcgVqOtd.js","assets/hex-encoding-B19xAT_7.js","assets/createLucideIcon-BQgzNCBR.js","assets/chevron-down-Dt4q6d24.js","assets/chevron-right-c57whaks.js","assets/waypoints-CMfoqtKm.js","assets/admin-context-CiKuY4du.js","assets/sts-kW1d0Xwd.js","assets/signed-fetch-D1SB4aKE.js","assets/ec2-CCAn-6df.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-DjEz6fCd.js","assets/index.browser-C3WbWNjZ.js","assets/s3-D6vzgmtY.js","assets/page-heading-vksh_67w.js","assets/badge-BXXcqX5B.js","assets/dist-PvzynrOg.js","assets/useRender-0Fj5n3zz.js","assets/card-BGjCi3TF.js","assets/admin-CyqWINE1.js","assets/alert-dialog-BGdO_ZZ8.js","assets/button-BmF3NkRN.js","assets/DialogTitle-D9gSrBJQ.js","assets/useValueAsRef-DFSFe5q2.js","assets/createBaseUIEventDetails-6tg7xR90.js","assets/useScrollLock-UCO56VpV.js","assets/state-badge-BHJNxFjy.js","assets/route-BNkyXGXg.js","assets/nodes-Da1ki_yF.js","assets/redirect-B4OxYbs2.js","assets/service-metrics-Jk4hT8M3.js","assets/allocate-address-ZqTItSii.js","assets/useNavigate-BE2dudMo.js","assets/back-link-ClWIMTeP.js","assets/cli-command-panel-BL5mvq9F.js","assets/check-BO7W8OSs.js","assets/copy-CamWo-pg.js","assets/use-copy-to-clipboard-DjiD3qo6.js","assets/input-DvWeo5Im.js","assets/useValueChanged-BfXX0nXX.js","assets/useControlled-DwxdYHYK.js","assets/ec2-HI9slLqq.js","assets/useMutation-NT1XM96J.js","assets/mutation-DOzUbiF3.js","assets/subnet-calculator-BlCTyGtY.js","assets/zod--rr_fIWG.js","assets/error-banner-DeOeVBKS.js","assets/form-actions-BM5SSRaw.js","assets/field-CahcouR1.js","assets/separator-Dk6pq5Mi.js","assets/ec2-DYyvWK8H.js","assets/create-internet-gateway-BqmjUHBq.js","assets/create-key-pair-DFYXp5jP.js","assets/select-DRkdOlEZ.js","assets/usePositioner-Ci93Kkvj.js","assets/DirectionContext-C9rdm8xn.js","assets/useCompositeListItem-SK6lAv7_.js","assets/download-B-6MA128.js","assets/triangle-alert-DcjzeKLg.js","assets/import-key-pair-BeYSJIwP.js","assets/textarea-Brim6vW6.js","assets/create-launch-template-B6u6zuXd.js","assets/launch-template-data-fields-DXSaeQT1.js","assets/useSuspenseQuery-DjTjhvWj.js","assets/collapsible-G2jzsPAG.js","assets/create-load-balancer-D9bZSD2u.js","assets/acm-C_n5nc60.js","assets/certificate-import-dialog-BKPIe_2r.js","assets/elbv2-DV-Njky4.js","assets/commandBuilder-DMJ7b_gn.js","assets/elbv2-C7rkISys.js","assets/tags-field-array-Jyj0_D5G.js","assets/plus-BodhJT2v.js","assets/trash-DVab4pEz.js","assets/target-group-form-CDd4W8zZ.js","assets/elbv2-DxvANZtx.js","assets/create-nat-gateway-1TzC0jMR.js","assets/create-placement-group-gL3_4_k-.js","assets/create-route-table-D4FwVly8.js","assets/create-security-group-BrCRzVvG.js","assets/create-subnet-Bv4smqtl.js","assets/create-target-group-BRBAA_n1.js","assets/create-volume-Di53MpqK.js","assets/create-vpc-12La27bX.js","assets/task-definitions-t1FHPiYB.js","assets/ecs-CRu-sgfi.js","assets/ecs-CSk2EKkA.js","assets/delete-confirmation-dialog-D3aiL1Yh.js","assets/ecs-section-nav-Dg6riPcF.js","assets/create-cluster-CvQZp54_.js","assets/eks-Z3FAx2E1.js","assets/commandBuilder-DelhRTpj.js","assets/json-Dg2dAdkf.js","assets/iam-D7ym88kt.js","assets/commandBuilder-fH0kh9xE.js","assets/iam-C7YVePfW.js","assets/system-managed-Dk7ySh_E.js","assets/system-image-required-ChsrtxY_.js","assets/rotate-cw-FTUcK_f-.js","assets/policy-document-viewer-DAhLJAGU.js","assets/create-group-L0hNqFOD.js","assets/iam-B3TMH369.js","assets/create-instance-profile--5i-dSXV.js","assets/create-policy-DRvAsj7-.js","assets/json-editor-DVfpMIqD.js","assets/create-role-dumUjrUW.js","assets/create-user-dryHUZh7.js","assets/create-db-instance-Cn5R4pg-.js","assets/rds-DbrM1YP4.js","assets/rds-D8QMlwfg.js","assets/rds-CO_Q1Jd7.js","assets/picker-notice-tK9XfUSR.js","assets/security-group-checkboxes-B2_pzuOd.js","assets/create-db-parameter-group-BZLQUzQE.js","assets/create-db-subnet-group-BtZ9umMj.js","assets/create-bucket-lL-KCXyj.js","assets/s3-vQ4ETAIx.js","assets/ls-C-nd4ZAh.js","assets/list-card-D7q-u7EW.js","assets/route-DlBDXNqa.js","assets/list-model-catalog-COGuQrQS.js","assets/list-guardrails-6Tclnq53.js","assets/bedrock-BXhwmrk8.js","assets/commandBuilder-DnK6kY6X.js","assets/create-GFtAHtLY.js","assets/bedrock-CqyVaotA.js","assets/guardrail-form-page-GzTYaEB_.js","assets/list-knowledge-bases-BfoP31JA.js","assets/bedrockAgent-NcTcWllI.js","assets/commandBuilder-B5s4jzh0.js","assets/create-CLQ9OT3p.js","assets/bedrockAgent-CzC9pBUd.js","assets/list-model-access-BK2IXNd-.js","assets/playground-COvZK7mq.js","assets/commandBuilder-CpOwm-tW.js","assets/describe-addresses-D6AvpPm6.js","assets/describe-images-CfTLecM8.js","assets/describe-instances-DzfY5k0J.js","assets/describe-internet-gateways-ccIWe6sf.js","assets/describe-key-pairs-E1SVNMBp.js","assets/describe-launch-templates-B_FfzYPE.js","assets/describe-load-balancers-Bqa2Xa-p.js","assets/describe-nat-gateways-D867gesM.js","assets/describe-placement-groups-C-IHyFtH.js","assets/describe-route-tables-CYFfJ3gc.js","assets/describe-security-groups-Bp0GsX4P.js","assets/describe-snapshots-PAQ9Dy7y.js","assets/describe-subnets-xfqXZ8GX.js","assets/describe-target-groups-BBpN-JDh.js","assets/describe-volumes-B-w4DzBS.js","assets/describe-vpcs-CSZTlLgm.js","assets/list-repositories-DSb9YTpO.js","assets/ecr-DI30eAD-.js","assets/ecr-DX6FIs-G.js","assets/list-clusters-D9j1AZcZ.js","assets/list-clusters-CMRpQ8j0.js","assets/eks-DIsiwmvE.js","assets/list-groups-we0whW-L.js","assets/list-instance-profiles-Doy-oUB9.js","assets/list-policies-CkGJYUMf.js","assets/list-roles-DOfrIzfq.js","assets/list-users-B_uGeK5H.js","assets/describe-db-instances-CiqvFykL.js","assets/delete-db-instance-dialog-DfRzJ0d-.js","assets/describe-db-parameter-groups-BNCejXtj.js","assets/delete-db-parameter-group-dialog-BGNur5Xt.js","assets/rds-delete-dialog-BFBpEdP0.js","assets/describe-db-snapshots-ChAgJdMY.js","assets/create-db-snapshot-dialog-WppC3263.js","assets/delete-db-snapshot-dialog-Daydn6xT.js","assets/describe-db-subnet-groups-DDlIVsCy.js","assets/delete-db-subnet-group-dialog-aDA8TDsZ.js"])))=>i.map(i=>d[i]); -import{i as e,n as t,o as n,r,t as i}from"./compiler-runtime-D_vZfn79.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-D46SpnLb.js";import{t as b}from"./query-m8erMzOC.js";import{t as x}from"./mutation-DOzUbiF3.js";import{A as S,C,E as w,N as T,O as E,S as D,T as O,_ as ee,a as te,b as ne,c as re,d as ie,f as ae,h as oe,i as se,j as ce,k as le,l as ue,m as de,n as fe,o as pe,p as me,r as he,t as k,u as ge,v as _e,w as ve,x as A,y as j}from"./link--yKtFaUD.js";import{a as ye,i as be,n as xe,o as Se,r as Ce,s as M,t as we}from"./Match-CrrE0itw.js";import{n as Te,r as Ee}from"./matchContext-DjfNTEDZ.js";import{n as De,t as Oe}from"./redirect-B4OxYbs2.js";import{i as ke,n as N,r as Ae,t as P}from"./lazyRouteComponent-FwK4I13J.js";import{a as je,n as Me,r as Ne,t as Pe}from"./useSelector-XEeNlp06.js";import{n as Fe}from"./with-selector-DrM041uv.js";import{t as Ie}from"./useNavigate-BE2dudMo.js";import{f as Le,i as Re,n as ze,t as Be}from"./useValueAsRef-DFSFe5q2.js";import{a as Ve,f as He,l as Ue,n as We,o as Ge,t as Ke,u as qe}from"./dist-PvzynrOg.js";import{t as Je}from"./useRender-0Fj5n3zz.js";import{a as Ye,lt as F,n as Xe,o as Ze,r as Qe,tn as I}from"./cluster-config-CcgVqOtd.js";import{t as L}from"./createLucideIcon-BQgzNCBR.js";import{t as $e}from"./camera-bmANKZ8M.js";import{a as et,c as tt,i as nt,n as rt,o as it,r as at,s as ot,t as st}from"./waypoints-CMfoqtKm.js";import{n as ct,t as lt}from"./_id-C1ZHl8qr.js";import{n as ut,t as dt}from"./_clusterName-CP53XTg8.js";import{n as ft,t as pt}from"./_id-Opgk3GCZ.js";import{_ as mt,b as ht,n as gt,o as _t,s as vt,t as yt,y as bt}from"./button-BmF3NkRN.js";import{C as xt,E as St,S as R,b as Ct,f as wt,g as Tt,h as Et,i as Dt,m as Ot,s as kt,t as At,v as jt,w as Mt,x as Nt,y as Pt}from"./createBaseUIEventDetails-6tg7xR90.js";import{$ as Ft,D as It,E as Lt,H as Rt,L as zt,M as Bt,O as Vt,P as Ht,S as Ut,St as Wt,Y as z,at as Gt,b as Kt,ct as qt,g as Jt,h as Yt,it as Xt,j as Zt,k as Qt,m as $t,nt as en,ot as tn,p as nn,st as rn,tt as an,ut as on,w as sn,wt as cn,x as ln,y as un,z as dn}from"./useScrollLock-UCO56VpV.js";import{n as fn,r as pn,t as mn}from"./usePositioner-Ci93Kkvj.js";import"./input-DvWeo5Im.js";import{t as hn}from"./separator-Dk6pq5Mi.js";import{a as gn,c as _n,i as vn,l as yn,n as bn,o as xn,r as Sn,s as Cn,t as wn}from"./DialogTitle-D9gSrBJQ.js";import{t as Tn}from"./awsClient-DjEz6fCd.js";import{n as En,t as Dn}from"./admin-context-CiKuY4du.js";import{t as On}from"./acm-C_n5nc60.js";import{i as kn,t as An}from"./bedrock-BXhwmrk8.js";import{i as jn}from"./bedrockAgent-NcTcWllI.js";import{A as Mn,E as Nn,M as Pn,O as Fn,S as In,_ as Ln,c as Rn,d as zn,h as Bn,l as Vn,n as Hn,o as Un,p as Wn,r as Gn,w as Kn,y as qn}from"./ec2-CCAn-6df.js";import{n as Jn}from"./ecr-DI30eAD-.js";import{n as Yn,o as Xn}from"./ecs-CRu-sgfi.js";import{c as Zn}from"./eks-DIsiwmvE.js";import{a as Qn,o as $n,u as er}from"./elbv2-C7rkISys.js";import{C as tr,f as nr,l as rr,p as ir,y as ar}from"./iam-C7YVePfW.js";import{a as or,d as sr,h as cr,o as lr,r as ur}from"./rds-CO_Q1Jd7.js";import{n as dr}from"./s3-D6vzgmtY.js";import{t as fr}from"./login-CTHbkecJ.js";import{t as pr}from"./run-instances-uzNV7Rqt.js";import{t as mr}from"./create-snapshot-Cmaa6Esv.js";import{t as hr}from"./create-service-Bj2HMaEq.js";import{t as gr}from"./register-task-definition-CKB8h_tl.js";import{t as _r}from"./run-task-BrQ0yS2W.js";import{t as vr}from"./_knowledgeBaseId-_FBvZz0O.js";import{t as yr}from"./_id-Bw8uaoFS.js";import{t as br}from"./_id-n8cgZlCi.js";import{t as xr}from"./_id-DbTStX4J.js";import{t as Sr}from"./_id-Bqo1s8f_.js";import{t as Cr}from"./_id-DESBLtzc.js";import{t as wr}from"./_id-9llFMrLP.js";import{t as Tr}from"./_id-BJNxKC3r.js";import{t as Er}from"./_id-BdtZzzDp.js";import{t as Dr}from"./_id-DWUYfpFv.js";import{t as Or}from"./_id-DSOThlQ3.js";import{t as kr}from"./_id-CwNPz3D5.js";import{t as Ar}from"./_id-DTzm41rv.js";import{t as jr}from"./_id-DyYV0B-I.js";import{t as Mr}from"./_id-ScwULmhn.js";import{t as Nr}from"./_id-DQU8S-RO.js";import{t as Pr}from"./_id-qnzRpOBs.js";import{t as Fr}from"./_clusterName-hVpJAhzA.js";import{t as Ir}from"./_groupName-Bp5RmQNe.js";import{t as Lr}from"./_instanceProfileName-DTrVfW0U.js";import{t as Rr}from"./_policyArn-UFhjC1tr.js";import{t as zr}from"./_roleName-D64-onU0.js";import{t as Br}from"./_userName-CDEkzFt0.js";import{t as Vr}from"./_id-cnRvuBUb.js";import{t as Hr}from"./_name-DJOX9RhL.js";import{t as Ur}from"./_id-DeqV-X6H.js";import{t as Wr}from"./_id-Ge1mo7dP.js";import{t as Gr}from"./_name-CQZcKMo_.js";import{t as Kr}from"./_bucket-BkFvFSwe.js";import{t as qr}from"./_-CowhiZz2.js";import{t as Jr}from"./_guardrailId.index-Dj-3TTXe.js";import{t as Yr}from"./_guardrailId.edit-BDjuJVZ2.js";import{t as Xr}from"./_serviceName-CNRJJ5ze.js";import{t as Zr}from"./_taskId-BRWP8jxv.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 Qr=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=$r(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=$r(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=$r(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=$r(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 $r(e){return e.options.scope?.id}var ei=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){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&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()})})}},ti=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ei,this.#t=e.mutationCache||new Qr,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 ni(){try{return sessionStorage}catch{return}}var ri=`tsr-scroll-restoration-v1_3`,ii=ni();function ai(){try{return JSON.parse(ii?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function oi(){try{ii?.setItem(ri,JSON.stringify(si))}catch{}}var si=ai(),ci=`data-scroll-restoration-id`,li=e=>e.state.__TSR_key||e.href;function ui(e){let t=e.getAttribute(ci);if(t)return`[${ci}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var di=!1,fi=`window`;function pi(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function mi(e){let t=new Set;for(let n of e){if(n===fi)continue;let e=pi(n);e&&t.add(e)}return t}function hi(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||li,a=new Set,o=e=>{let t=si[e]||={};for(let e of a)e===document?t[fi]={scrollX,scrollY}:e.isConnected&&(t[ui(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,di=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{di||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),oi()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=si[d];if(e){let t=si[u];for(let n in e){if(n===fi){if(s)continue}else{let e=pi(n);if(!e||s&&o&&(l??=mi(o),l.has(e)))continue}t||=si[u]={},t[n]??=e[n]}}}di=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=mi(o));let t=e&&i&&c,s=r.restoring?si[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===fi){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=pi(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{di=!1}}))}function gi(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function _i(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function vi(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=_i(r):Array.isArray(t)?t.push(_i(r)):n[e]=[t,_i(r)]}return n}var yi=/^(?:\s|["[{\d-]|fa|nu|tr)/,bi=Si(JSON.parse),xi=Ci(JSON.stringify,JSON.parse);function Si(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=vi(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!yi.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ci(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!yi.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=gi(e,r);return t?`?${t}`:``}}function wi(e){return{input:({url:t})=>{for(let n of e)t=Ei(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Di(e[n],t);return t}}}function Ti(e){let t=pe(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=se([`/`,t,e.pathname]),e)}}function Ei(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Di(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Oi(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{_e(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var ki=`__TSR_index`,Ai=`popstate`,ji=`beforeunload`,Mi=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Ni(e){let t=Mi.exec(e);return t?`/`+e.slice(t[0].length):e}function Pi(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` +import{i as e,n as t,o as n,r,t as i}from"./compiler-runtime-D_vZfn79.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-D46SpnLb.js";import{t as b}from"./query-m8erMzOC.js";import{t as x}from"./mutation-DOzUbiF3.js";import{A as S,C,E as w,N as T,O as E,S as D,T as O,_ as ee,a as te,b as ne,c as re,d as ie,f as ae,h as oe,i as se,j as ce,k as le,l as ue,m as de,n as fe,o as pe,p as me,r as he,t as k,u as ge,v as _e,w as ve,x as A,y as j}from"./link--yKtFaUD.js";import{a as ye,i as be,n as xe,o as Se,r as Ce,s as M,t as we}from"./Match-CrrE0itw.js";import{n as Te,r as Ee}from"./matchContext-DjfNTEDZ.js";import{n as De,t as Oe}from"./redirect-B4OxYbs2.js";import{i as ke,n as N,r as Ae,t as P}from"./lazyRouteComponent-FwK4I13J.js";import{a as je,n as Me,r as Ne,t as Pe}from"./useSelector-XEeNlp06.js";import{n as Fe}from"./with-selector-DrM041uv.js";import{t as Ie}from"./useNavigate-BE2dudMo.js";import{f as Le,i as Re,n as ze,t as Be}from"./useValueAsRef-DFSFe5q2.js";import{a as Ve,f as He,l as Ue,n as We,o as Ge,t as Ke,u as qe}from"./dist-PvzynrOg.js";import{t as Je}from"./useRender-0Fj5n3zz.js";import{a as Ye,lt as F,n as Xe,o as Ze,r as Qe,tn as I}from"./cluster-config-CcgVqOtd.js";import{t as L}from"./createLucideIcon-BQgzNCBR.js";import{t as $e}from"./camera-bmANKZ8M.js";import{a as et,c as tt,i as nt,n as rt,o as it,r as at,s as ot,t as st}from"./waypoints-CMfoqtKm.js";import{n as ct,t as lt}from"./_id-C1ZHl8qr.js";import{n as ut,t as dt}from"./_clusterName-CP53XTg8.js";import{n as ft,t as pt}from"./_id-Opgk3GCZ.js";import{_ as mt,b as ht,n as gt,o as _t,s as vt,t as yt,y as bt}from"./button-BmF3NkRN.js";import{C as xt,E as St,S as R,b as Ct,f as wt,g as Tt,h as Et,i as Dt,m as Ot,s as kt,t as At,v as jt,w as Mt,x as Nt,y as Pt}from"./createBaseUIEventDetails-6tg7xR90.js";import{$ as Ft,D as It,E as Lt,H as Rt,L as zt,M as Bt,O as Vt,P as Ht,S as Ut,St as Wt,Y as z,at as Gt,b as Kt,ct as qt,g as Jt,h as Yt,it as Xt,j as Zt,k as Qt,m as $t,nt as en,ot as tn,p as nn,st as rn,tt as an,ut as on,w as sn,wt as cn,x as ln,y as un,z as dn}from"./useScrollLock-UCO56VpV.js";import{n as fn,r as pn,t as mn}from"./usePositioner-Ci93Kkvj.js";import"./input-DvWeo5Im.js";import{t as hn}from"./separator-Dk6pq5Mi.js";import{a as gn,c as _n,i as vn,l as yn,n as bn,o as xn,r as Sn,s as Cn,t as wn}from"./DialogTitle-D9gSrBJQ.js";import{t as Tn}from"./awsClient-DjEz6fCd.js";import{n as En,t as Dn}from"./admin-context-CiKuY4du.js";import{t as On}from"./acm-C_n5nc60.js";import{i as kn,t as An}from"./bedrock-BXhwmrk8.js";import{i as jn}from"./bedrockAgent-NcTcWllI.js";import{A as Mn,E as Nn,M as Pn,O as Fn,S as In,_ as Ln,c as Rn,d as zn,h as Bn,l as Vn,n as Hn,o as Un,p as Wn,r as Gn,w as Kn,y as qn}from"./ec2-CCAn-6df.js";import{n as Jn}from"./ecr-DI30eAD-.js";import{n as Yn,o as Xn}from"./ecs-CRu-sgfi.js";import{c as Zn}from"./eks-DIsiwmvE.js";import{a as Qn,o as $n,u as er}from"./elbv2-C7rkISys.js";import{C as tr,f as nr,l as rr,p as ir,y as ar}from"./iam-C7YVePfW.js";import{a as or,d as sr,h as cr,o as lr,r as ur}from"./rds-CO_Q1Jd7.js";import{n as dr}from"./s3-D6vzgmtY.js";import{t as fr}from"./login-CTHbkecJ.js";import{t as pr}from"./run-instances-BH13c7lP.js";import{t as mr}from"./create-snapshot-Cmaa6Esv.js";import{t as hr}from"./create-service-Bj2HMaEq.js";import{t as gr}from"./register-task-definition-CKB8h_tl.js";import{t as _r}from"./run-task-BrQ0yS2W.js";import{t as vr}from"./_knowledgeBaseId-_FBvZz0O.js";import{t as yr}from"./_id-Bw8uaoFS.js";import{t as br}from"./_id-n8cgZlCi.js";import{t as xr}from"./_id-DbTStX4J.js";import{t as Sr}from"./_id-Bqo1s8f_.js";import{t as Cr}from"./_id-DESBLtzc.js";import{t as wr}from"./_id-9llFMrLP.js";import{t as Tr}from"./_id-BJNxKC3r.js";import{t as Er}from"./_id-BdtZzzDp.js";import{t as Dr}from"./_id-DWUYfpFv.js";import{t as Or}from"./_id-DSOThlQ3.js";import{t as kr}from"./_id-CwNPz3D5.js";import{t as Ar}from"./_id-DTzm41rv.js";import{t as jr}from"./_id-DyYV0B-I.js";import{t as Mr}from"./_id-ScwULmhn.js";import{t as Nr}from"./_id-DQU8S-RO.js";import{t as Pr}from"./_id-qnzRpOBs.js";import{t as Fr}from"./_clusterName-hVpJAhzA.js";import{t as Ir}from"./_groupName-Bp5RmQNe.js";import{t as Lr}from"./_instanceProfileName-DTrVfW0U.js";import{t as Rr}from"./_policyArn-UFhjC1tr.js";import{t as zr}from"./_roleName-D64-onU0.js";import{t as Br}from"./_userName-CDEkzFt0.js";import{t as Vr}from"./_id-cnRvuBUb.js";import{t as Hr}from"./_name-DJOX9RhL.js";import{t as Ur}from"./_id-DeqV-X6H.js";import{t as Wr}from"./_id-Ge1mo7dP.js";import{t as Gr}from"./_name-CQZcKMo_.js";import{t as Kr}from"./_bucket-BkFvFSwe.js";import{t as qr}from"./_-CowhiZz2.js";import{t as Jr}from"./_guardrailId.index-Dj-3TTXe.js";import{t as Yr}from"./_guardrailId.edit-BDjuJVZ2.js";import{t as Xr}from"./_serviceName-CNRJJ5ze.js";import{t as Zr}from"./_taskId-BRWP8jxv.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 Qr=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=$r(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=$r(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=$r(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=$r(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 $r(e){return e.options.scope?.id}var ei=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){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&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()})})}},ti=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ei,this.#t=e.mutationCache||new Qr,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 ni(){try{return sessionStorage}catch{return}}var ri=`tsr-scroll-restoration-v1_3`,ii=ni();function ai(){try{return JSON.parse(ii?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function oi(){try{ii?.setItem(ri,JSON.stringify(si))}catch{}}var si=ai(),ci=`data-scroll-restoration-id`,li=e=>e.state.__TSR_key||e.href;function ui(e){let t=e.getAttribute(ci);if(t)return`[${ci}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var di=!1,fi=`window`;function pi(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function mi(e){let t=new Set;for(let n of e){if(n===fi)continue;let e=pi(n);e&&t.add(e)}return t}function hi(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||li,a=new Set,o=e=>{let t=si[e]||={};for(let e of a)e===document?t[fi]={scrollX,scrollY}:e.isConnected&&(t[ui(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,di=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{di||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),oi()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=si[d];if(e){let t=si[u];for(let n in e){if(n===fi){if(s)continue}else{let e=pi(n);if(!e||s&&o&&(l??=mi(o),l.has(e)))continue}t||=si[u]={},t[n]??=e[n]}}}di=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=mi(o));let t=e&&i&&c,s=r.restoring?si[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===fi){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=pi(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{di=!1}}))}function gi(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function _i(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function vi(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=_i(r):Array.isArray(t)?t.push(_i(r)):n[e]=[t,_i(r)]}return n}var yi=/^(?:\s|["[{\d-]|fa|nu|tr)/,bi=Si(JSON.parse),xi=Ci(JSON.stringify,JSON.parse);function Si(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=vi(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!yi.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ci(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!yi.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=gi(e,r);return t?`?${t}`:``}}function wi(e){return{input:({url:t})=>{for(let n of e)t=Ei(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Di(e[n],t);return t}}}function Ti(e){let t=pe(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=se([`/`,t,e.pathname]),e)}}function Ei(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Di(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Oi(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{_e(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var ki=`__TSR_index`,Ai=`popstate`,ji=`beforeunload`,Mi=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Ni(e){let t=Mi.exec(e);return t?`/`+e.slice(t[0].length):e}function Pi(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` \r`.includes(e)?``:encodeURIComponent(e))),Ni(e)}function Fi(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Ri(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[ki];i=Ii(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[ki];i=Ii(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[ki]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Ii(e,t){t||={};let n=zi();return{...t,key:n,__TSR_key:n,[ki]:e}}function Li(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Pi(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Ri(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=zi();t.history.replaceState({[ki]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Ri(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[ki]-l.state[ki],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Fi({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ji,x,{capture:!0}),t.removeEventListener(Ai,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(ji,x,{capture:!0}),t.addEventListener(Ai,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Ri(e,t){let n=Pi(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=zi();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[ki]:0,key:a,__TSR_key:a}}}function zi(){return(Math.random()+1).toString(36).substring(7)}function Bi(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Vi(e){return e.pathname+e.search+e.hash}function Hi(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Ui(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Wi({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Gi(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Ki(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var qi=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=fe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Li()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=oe(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Oi(this.latestLocation,e),hi(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=pe(a);t&&t!==`/`&&e.push(Ti({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:wi(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=de(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&me(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:j(e),external:!1,searchStr:o,search:le(t?.search,i),hash:j(r.slice(1)),state:ce(t?.state,a)}}let o=new URL(i,this.origin),s=Ei(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:j(Ni(s.pathname)),external:!!this.rewrite&&Bi(s,this.origin),searchStr:l,search:le(t?.search,c),hash:j(s.hash.slice(1)),state:ce(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>te({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=ie(re(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=Ri(t.href,{});t={...t,to:Ei(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n),i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=ea(t.params,o),l=this.routesByPath[re(s)],u;if(l)u=this.getRouteBranch(l);else if(s.includes(`$`))u=[];else{let[e,t,n]=this.getMatchedRoutes(s);u=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(u=[...u,this.options.notFoundRoute])}if(u.length&&O(c))for(let e of u){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let d=e.leaveParams?s:j(Ni(he({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath)),f=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};u.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Zi(t.options.validateSearch,{...e,...f}))}catch{}}),f=e}f=Qi(f,t,u,e._includeValidateSearch),f=le(a,f);let p=this.options.stringifySearch(f),m=t.hash===!0?n.hash:t.hash?C(t.hash,n.hash):void 0,h=m?`#${m}`:``,g=t.state===!0?n.state:t.state?C(t.state,n.state):{};t.state&&(g=ce(n.state,g));let _=`${d}${p}${h}`,v,y,b=!1;if(this.rewrite){let e=new URL(_,this.origin),t=e.origin,n=Di(this.rewrite,e);v=Vi(e),Bi(n,t)?(y=n.href,b=!0):y=Ni(Vi(n))}else v=A(_),y=v;return{publicHref:y,href:v,pathname:d,search:f,searchStr:p,state:g,hash:m??``,external:b,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=ge(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=ea(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Ji(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=re(this.latestLocation.href)===re(n.href)&&ne(Wi(n.state),Wi(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?ve(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Ji(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Ga(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Ui(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Hi(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(S.test(n)||(r=ve(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Bi(e,this.origin)||(n=Vi(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=B,this.preloadRoute=e=>Ka(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=ae(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!ne(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?ne(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??xi,parseSearch:e.parseSearch??bi,protocolAllowlist:e.protocolAllowlist??ee}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=ue(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:re(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?$i(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=Zi(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=C(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function $i(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Ee}function ea(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,C(e,n))}function ta(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function na(e,t){return e.options[t]?.preload?.()}function ra(e,t){let n=na(e,`component`),r=na(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function B(e,t,n){let r=()=>t===!1?void 0:t?na(e,t):ra(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function ia(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function pa(e,t){return e.routesById[t.routeId]}function ma(e,t,n){return Oe(e)?[la,e]:Se(e)?(e.routeId||=n,[ca,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[sa,e]):[oa,e]}function ha(e,t){let n=ma(t,!0,e.id);if(n[0]!==sa)return n;try{e.options.onError?.(n[1])}catch(t){n=ma(t,!0,e.id)}return n}function ga(e,t,n,r,i){return i[0].signal.aborted?ua:Ma(e,t,n,ha(n,r),i)}async function _a(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return ya(e,r),[i,ga(e,t,u,a,n)]}if(c.aborted)return[i,ua];let p=r.paramsError??r.searchError;if(p!==void 0)return ya(e,r),[i,ga(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Sa(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?fa(a,c):a);if(c.aborted)return[i,ua];let s=Ma(e,t,u,ma(o,!1,u.id),n);if(s[0]!==oa)return ya(e,r),[i,s];r.context={...r.context,...o}}catch(a){return ya(e,r),[i,ga(e,t,u,a,n)]}finally{r.status=h,Sa(e,r,!1,n[0])}}i()}function va(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function ya(e,t){let n=t._flight;t._flight=void 0,va(e,t,n)?.abort()}function ba(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=va(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function xa(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Sa(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Ca(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function wa(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return ua;if(!i)return[oa,void 0];let l=n._flight;Sa(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ca(e,t,n,r,s,a,!!o[3]))).then(e=>ma(e,!1,r.id),e=>ma(e,!0,r.id)).then(t=>(t[0]!==oa&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===sa&&l[2]?ha(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Ma(e,t,r,await fa(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return ya(e,n),ua}finally{Sa(e,n,!1,s)}}function Ta(e,t,n){t[0]!==la&&(e.status=`success`,e.error=void 0,t[0]===oa?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Ea(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&ya(e,r)}function Da(e,t){return t[0]===sa||t[0]===ca?{...e,status:t[0]===sa?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Oa(e,t,n,r,i,a,o){let s=t[1][n],c=pa(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Ca(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=ua)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,ya(e,s),p=ga(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,va(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?wa(e,t,s,c,g,i,a).then(t=>(Ta(s,t,l),t[0]===oa&&(m&&!a[0].signal.aborted&&Ea(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[oa,s.loaderData]),T=(async()=>{try{let e=B(c,void 0,C);e&&await fa(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,ga(e,t,c,r,a)]}let r=await w;x&&r[0]===oa&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Da(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=wa(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Ta(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Da(E,e))}async function ka(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=pa(e,t[n]);try{let e=B(i,!1);e&&await fa(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Aa(e,t){t[2]&&=(ba(e,t[2].map(e=>e[3])),void 0)}async function ja(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=la)throw[a,t];!i&&t[0]!==oa&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===la)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Ma(e,t,n,r,i,a){for(;r[0]===la;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[la,t]:[la,t,a]}return[la,o,n]}catch(e){r=a?[sa,e]:ha(n,e),a=!0}}return r}async function Na(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===ca?ka(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=la)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==oa&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=la){let n=s[1];if(n[0]!==la||n[1].options.reloadDocument||n[2])return Aa(e,t),n;c=!0,s=[0,[sa,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===sa?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=pa(e,u);try{await fa(i?Promise.resolve().then(()=>B(m,l===sa?`errorComponent`:`notFoundComponent`)):Promise.all([B(m),B(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Aa(e,t),ua}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Aa(e,t),ba(e,o),p()):u.status=`success`}return t}async function Pa(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await ka(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=la&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Na(e,i,u,r[0],ja(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=ja(i[2],void 0,void 0,h.then(e=>da(e)?0:ia(n).length,()=>0))),o=await h}catch(t){if(Aa(e,i),t===a&&a.aborted)return ua;throw t}return da(o)?o:Pa(e,o,a,r[6]===n.length?r[6]:0)}function Ia(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>Ia(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function La(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function Ra(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!ia(t[3]).some(e=>e.id===n[1]))return;let i;try{await fa(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function za(e,t){e._committed=t,e.stores.setMatches(t)}function Ba(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=ia(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Gi(n);za(e,n),ba(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Ki(e,i,n,a,l,t)}async function Va(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Ha(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Ua(e,t,n,r,i){let a=n.map(e=>({...e}));xa(a);for(let t of r)ya(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Na(e,o,r,t[0],i)}catch(t){throw ba(e,a),t}if(da(s)){ba(e,a),s[0]===la&&e._tx===t&&e._committed===n&&await Ha(e,t,s);return}if(await Pa(e,s,t[0].signal),e._tx!==t||e._committed!==n){ba(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),ya(e,n))}za(e,a),ba(e,n,a)}async function Wa(e,t,n,r,i,a){let o=await Fa(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(da(o)){let n=o[0]===la&&e._tx===t;if((!n||o[1].options.reloadDocument)&&La(e,t),ba(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){La(e,t);return}await Ha(e,t,o);return}let s=o[1];if(e._tx===t&&await Ra(e,t),e._tx!==t){La(e,t),ba(e,s),Aa(e,o);return}let c=t[2],l=Ui(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Ra(e,t),e._tx!==t){La(e,t),ba(e,s),Aa(e,o);return}let n=await e.startTransition(()=>{La(e,t),Ba(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Aa(e,o);return}u?.length&&Ua(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Ga(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Ui(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Va(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});xa(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){ba(e,m),await Va(e,n);return}e._preflight=void 0;let g,_=()=>Wa(e,y,f,()=>Ia(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Va(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Sa(e,t,!1)}n[0].abort(),ba(e,n[3],y[3],!0)}if(e._tx!==y){ba(e,y[3]),y[3]=[],g?.(),await Va(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Ia(e,y),g?.(_()),await y[5]}async function Ka(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),xa(a),o=(e._preloads??=new Map).set(i,a),s=await Fa(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),ba(e,a)),i.abort()}if(!da(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Se(e)||console.error(e);return}}}function qa(e,t){if(e)return typeof e==`string`?e:e[t]}function Ja(e){return e?.scriptFormat??`module`}function Ya(e,t,n){let r=Xa(t),i=qa(n,`script`)??r.crossOrigin;return{...Ja(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function Xa(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Za(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 Qa(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function $a({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 eo(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 to=[],no=0,{link:ro,unlink:io,propagate:ao,checkDirty:oo,shallowPropagate:so}=$a({update(e){return e._update()},notify(e){to[lo++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,mo(e))}}),co=0,lo=0,uo,fo=0;function po(e){try{++fo,e()}finally{--fo||ho()}}function mo(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=io(n,e)}function ho(){if(!(fo>0)){for(;co{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=uo,o=t?.compare??Object.is;if(n)uo=i,++no,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{uo=a,n&&(i.flags&=-5),mo(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&oo(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&so(e)}}else e&32&&(i.flags=e&-33);return uo!==void 0&&ro(i,uo,no),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ao(e),so(e),ho())}},i}function _o(e){let t=()=>{let t=uo;uo=n,++no,n.depsTail=void 0,n.flags=6;try{return e()}finally{uo=t,n.flags&=-5,mo(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&&oo(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,mo(this)}};return t(),n}var V=n(r(),1);function vo(e,t){let n=e[1];e.length=0,n?.(t)}function yo({t:e}){let t=Me(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{vo(n,!1),n.push(i,a),e(t),V.startTransition(r)}),T(()=>{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(re(r.publicHref)!==re(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`,...Ui(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}var H=t();function bo(){let e=Me(),t=e.routesById[Ee],n=Ce(e,t),r=e.ssr?be:V.Suspense,i=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(yo,{t:V.useState()[1]}),(0,H.jsx)(r,{fallback:n,children:(0,H.jsx)(xo,{})})]});return e.options.InnerWrap?(0,H.jsx)(e.options.InnerWrap,{children:i}):i}function xo(){let e=Me(),t=e._rendered,n=Pe(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;T(()=>{t[0]===n&&vo(t,!0)},[t,n]);let a=i?(0,H.jsx)(we,{routeId:i}):null;return(0,H.jsx)(Te.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,H.jsx)(ye,{getResetKey:()=>r,onCatch:void 0,children:a})})}var So=e=>({createMutableStore:go,createReadonlyStore:go,batch:po}),Co=e=>new wo(e),wo=class extends qi{constructor(e){super(e,So)}};function To({router:e,children:t,...n}){O(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,H.jsx)(Ne.Provider,{value:e,children:t});return e.options.Wrap?(0,H.jsx)(e.options.Wrap,{children:r}):r}function Eo({router:e,...t}){return(0,H.jsx)(To,{router:e,...t,children:(0,H.jsx)(bo,{})})}function Do(e){let t=Me();return Pe(t.stores.location,ke(e,t))}function Oo(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 ko(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=V.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,H.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,H.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,H.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,H.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,H.jsx)(Ao,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Ao({attrs:e,children:t,preventScriptHoist:n}){Me();let r=je(),i=V.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(V.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 Oo(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,Oo(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,H.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,H.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,H.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function jo(e,t,n,r){n=aa(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:D(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=Qa(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:qa(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:{...Ya(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 Za(m,a),m.push(...d),Za(m,c),m.push(...u),Za(m,f),Za(m,p),m}var Mo=e=>{let t=Me(),n=t.options.ssr?.nonce,r=V.useCallback(r=>jo(t,n,r,e),[e,n,t]);return Pe(t.stores.matches,r,{compare:ne})};function No(e){let t=Mo(e.assetCrossOrigin),n=Me().options.ssr?.nonce;return(0,H.jsx)(H.Fragment,{children:t.map(e=>(0,V.createElement)(ko,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Po=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&&ne(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&&ne(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 ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(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,ne(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}}}})),Fo=e(((e,t)=>{t.exports=Po()})),Io=e((e=>{var t=Fo(),n=r(),i=Le();function a(e){var t=`https://react.dev/errors/`+e;if(1xe||(e.current=be[xe],be[xe]=null,xe--)}function M(e,t){xe++,be[xe]=e.current,e.current=t}var we=Se(null),Te=Se(null),Ee=Se(null),De=Se(null);function Oe(e,t){switch(M(Ee,t),M(Te,e),M(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),M(we,e)}function ke(){Ce(we),Ce(Te),Ce(Ee)}function N(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,M(De,e)),t=we.current;var n=dp(t,e.type);t!==n&&(M(Te,e),M(we,n))}function Ae(e){Te.current===e&&(Ce(we),Ce(Te)),De.current===e&&(Ce(De),sh._currentValue=ye)}var P,je;function Me(e){if(P===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||``,je=-1)`:-1i.map(i=>d[i]); -import{n as e,t}from"./lazyRouteComponent-FwK4I13J.js";import{g as n,lt as r,m as i}from"./cluster-config-CcgVqOtd.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-CCAn-6df.js";var p=()=>r(()=>import(`./run-instances-CiI-HVLv.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])),m=i({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-Dq2g7qud.js","assets/compiler-runtime-D_vZfn79.js","assets/useQuery-DYWWbj49.js","assets/useBaseQuery-CzDY6wqT.js","assets/removable-D46SpnLb.js","assets/query-m8erMzOC.js","assets/useSuspenseQuery-DjTjhvWj.js","assets/useNavigate-BE2dudMo.js","assets/useSelector-XEeNlp06.js","assets/with-selector-DrM041uv.js","assets/cluster-config-CcgVqOtd.js","assets/hex-encoding-B19xAT_7.js","assets/back-link-ClWIMTeP.js","assets/link--yKtFaUD.js","assets/createLucideIcon-BQgzNCBR.js","assets/chevron-down-Dt4q6d24.js","assets/select-DRkdOlEZ.js","assets/useValueAsRef-DFSFe5q2.js","assets/dist-PvzynrOg.js","assets/button-BmF3NkRN.js","assets/createBaseUIEventDetails-6tg7xR90.js","assets/check-BO7W8OSs.js","assets/useValueChanged-BfXX0nXX.js","assets/useScrollLock-UCO56VpV.js","assets/usePositioner-Ci93Kkvj.js","assets/DirectionContext-C9rdm8xn.js","assets/useControlled-DwxdYHYK.js","assets/useCompositeListItem-SK6lAv7_.js","assets/cli-command-panel-BL5mvq9F.js","assets/copy-CamWo-pg.js","assets/use-copy-to-clipboard-DjiD3qo6.js","assets/input-DvWeo5Im.js","assets/ec2-CCAn-6df.js","assets/queryOptions-Dfvzj6n2.js","assets/awsClient-DjEz6fCd.js","assets/index.browser-C3WbWNjZ.js","assets/ec2-HI9slLqq.js","assets/useMutation-NT1XM96J.js","assets/mutation-DOzUbiF3.js","assets/subnet-calculator-BlCTyGtY.js","assets/page-heading-vksh_67w.js","assets/zod--rr_fIWG.js","assets/error-banner-DeOeVBKS.js","assets/field-CahcouR1.js","assets/separator-Dk6pq5Mi.js","assets/ec2-DYyvWK8H.js","assets/system-managed-Dk7ySh_E.js","assets/gpu-instance-type-select-Cu5c3ioO.js","assets/collapsible-G2jzsPAG.js"])))=>i.map(i=>d[i]); +import{n as e,t}from"./lazyRouteComponent-FwK4I13J.js";import{g as n,lt as r,m as i}from"./cluster-config-CcgVqOtd.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-CCAn-6df.js";var p=()=>r(()=>import(`./run-instances-Dq2g7qud.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])),m=i({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/services/spinifexui/frontend/dist/assets/run-instances-CiI-HVLv.js b/spinifex/services/spinifexui/frontend/dist/assets/run-instances-Dq2g7qud.js similarity index 87% rename from spinifex/services/spinifexui/frontend/dist/assets/run-instances-CiI-HVLv.js rename to spinifex/services/spinifexui/frontend/dist/assets/run-instances-Dq2g7qud.js index c9c73dae1..9f6f93938 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/run-instances-CiI-HVLv.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/run-instances-Dq2g7qud.js @@ -1,4 +1,4 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime-D_vZfn79.js";import{t as ee}from"./useQuery-DYWWbj49.js";import{t as i}from"./useSuspenseQuery-DjTjhvWj.js";import{t as te}from"./useNavigate-BE2dudMo.js";import{on as ne}from"./cluster-config-CcgVqOtd.js";import{t as re}from"./back-link-ClWIMTeP.js";import{t as ie}from"./chevron-down-Dt4q6d24.js";import{c as a,i as o,n as s,s as c,t as l}from"./select-DRkdOlEZ.js";import{t as ae}from"./cli-command-panel-BL5mvq9F.js";import{t as oe}from"./button-BmF3NkRN.js";import{t as u}from"./input-DvWeo5Im.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-CCAn-6df.js";import{f as ge}from"./ec2-HI9slLqq.js";import{t as d}from"./run-instances-uzNV7Rqt.js";import{t as _e}from"./page-heading-vksh_67w.js";import{a as f,i as ve,n as p,t as ye}from"./zod--rr_fIWG.js";import{t as be}from"./error-banner-DeOeVBKS.js";import{n as xe,r as m,s as h,t as g}from"./field-CahcouR1.js";import{b as Se,i as Ce,t as we}from"./ec2-DYyvWK8H.js";import{i as Te}from"./system-managed-Dk7ySh_E.js";import{t as Ee}from"./gpu-instance-type-select-Cu5c3ioO.js";import{n as De,r as Oe,t as ke}from"./collapsible-G2jzsPAG.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 flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,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 space-y-4 rounded-md border border-border p-4`,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`,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`,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`,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`,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:` \\ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime-D_vZfn79.js";import{t as ee}from"./useQuery-DYWWbj49.js";import{t as i}from"./useSuspenseQuery-DjTjhvWj.js";import{t as te}from"./useNavigate-BE2dudMo.js";import{on as ne}from"./cluster-config-CcgVqOtd.js";import{t as re}from"./back-link-ClWIMTeP.js";import{t as ie}from"./chevron-down-Dt4q6d24.js";import{c as a,i as o,n as s,s as c,t as l}from"./select-DRkdOlEZ.js";import{t as ae}from"./cli-command-panel-BL5mvq9F.js";import{t as oe}from"./button-BmF3NkRN.js";import{t as u}from"./input-DvWeo5Im.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-CCAn-6df.js";import{f as ge}from"./ec2-HI9slLqq.js";import{t as d}from"./run-instances-BH13c7lP.js";import{t as _e}from"./page-heading-vksh_67w.js";import{a as f,i as ve,n as p,t as ye}from"./zod--rr_fIWG.js";import{t as be}from"./error-banner-DeOeVBKS.js";import{n as xe,r as m,s as h,t as g}from"./field-CahcouR1.js";import{b as Se,i as Ce,t as we}from"./ec2-DYyvWK8H.js";import{i as Te}from"./system-managed-Dk7ySh_E.js";import{t as Ee}from"./gpu-instance-type-select-Cu5c3ioO.js";import{n as De,r as Oe,t as ke}from"./collapsible-G2jzsPAG.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 flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,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 space-y-4 rounded-md border border-border p-4`,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:` \\ diff --git a/spinifex/services/spinifexui/frontend/dist/index.html b/spinifex/services/spinifexui/frontend/dist/index.html index 3c98a30c2..99a5cfcbc 100644 --- a/spinifex/services/spinifexui/frontend/dist/index.html +++ b/spinifex/services/spinifexui/frontend/dist/index.html @@ -7,7 +7,7 @@ - + @@ -66,7 +66,7 @@ - + diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx index 3c890eed8..50047cd2f 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx @@ -537,6 +537,7 @@ export function RunInstancesPage({ { field.onChange("create") }} @@ -548,6 +549,7 @@ export function RunInstancesPage({ { field.onChange("existing") }} @@ -653,6 +655,7 @@ export function RunInstancesPage({ { field.onChange("anywhere") }} @@ -664,6 +667,7 @@ export function RunInstancesPage({ { field.onChange("custom") }}